From 80fd9daed79eb612c3c323fa25e1eb01062d56f4 Mon Sep 17 00:00:00 2001 From: tristancaron Date: Mon, 23 Mar 2015 20:23:45 +0100 Subject: [PATCH 0001/1506] Service Worker Api --- service_worker_api/service_worker_api-test.ts | 188 ++++ service_worker_api/service_worker_api.d.ts | 896 ++++++++++++++++++ 2 files changed, 1084 insertions(+) create mode 100644 service_worker_api/service_worker_api-test.ts create mode 100644 service_worker_api/service_worker_api.d.ts diff --git a/service_worker_api/service_worker_api-test.ts b/service_worker_api/service_worker_api-test.ts new file mode 100644 index 0000000000..67ce58cd40 --- /dev/null +++ b/service_worker_api/service_worker_api-test.ts @@ -0,0 +1,188 @@ +/// + +var OFFLINE_CACHE = "cache_test"; +var OFFLINE_URL = "localhost"; + +self.addEventListener('fetch', function(event: FetchEvent) { + if (event.request.method === 'GET' && + event.request.headers.get('accept').indexOf('text/html') !== -1) { + console.log('Handling fetch event for', event.request.url); + event.respondWith( + self.fetch(event.request).catch(function(e) { + console.error('Fetch failed; returning offline page instead.', e); + return self.caches.open(OFFLINE_CACHE).then(function(cache: Cache) { + return cache.match(OFFLINE_URL); + }); + }) + ); + } +}); + +self.caches.open('v1').then(function(cache: Cache) { + cache.matchAll('/images/').then(function(response: Array) { + response.forEach(function(element, index, array) { + cache.delete(element); + + }); + }); + +}); + +self.addEventListener('install', function(event: InstallEvent) { + event.waitUntil( + self.caches.open('v1').then(function(cache: Cache) { + return cache.add('/sw-test/index.html'); + }) + ); +}); + +self.addEventListener('install', function(event: InstallEvent) { + event.waitUntil( + self.caches.open('v1').then(function(cache) { + return cache.addAll( + '/sw-test/', + '/sw-test/index.html', + '/sw-test/style.css', + '/sw-test/app.js', + '/sw-test/image-list.js', + '/sw-test/star-wars-logo.jpg', + '/sw-test/gallery/', + '/sw-test/gallery/bountyHunters.jpg', + '/sw-test/gallery/myLittleVader.jpg', + '/sw-test/gallery/snowTroopers.jpg' + ); + }) + ); +}); + +self.addEventListener('fetch', function(event: FetchEvent) { + var cachedResponse = self.caches.match(event.request).catch(function() { + return self.fetch(event.request).then(function(response: Response) { + return self.caches.open('v1').then(function(cache) { + cache.put(event.request, response.clone()); + return response; + }); + }); + }).catch(function() { + return self.caches.match('/sw-test/gallery/myLittleVader.jpg'); + }); + + event.respondWith(cachedResponse); +}); + +self.caches.open('v1').then(function(cache) { + cache.match('/images/image.png').then(function(response) { + cache.delete(response); + }); +}); + +self.caches.open('v1').then(function(cache: Cache) { + cache.keys().then(function(response) { + response.forEach(function(element, index, array) { + cache.delete(element); + }); + }); +}); + +self.caches.has('v1').then(function() { + self.caches.delete('v1').then(function() { + + }); +}); + +self.addEventListener('activate', function(event: ExtendableEvent) { + var cacheWhitelist = ['v2']; + + event.waitUntil( + self.caches.keys().then(function(keyList) { + for(var i = 0; i < keyList.length; i++) { + if (cacheWhitelist.indexOf(keyList[i]) === -1) { + return self.caches.delete(keyList[i]); + } + } + }) + ); +}); + +function sendMessage(message) { + return new Promise(function(resolve, reject) { + var messageChannel = new MessageChannel(); + messageChannel.port1.onmessage = function(event) { + if (event.data.error) { + reject(event.data.error); + } else { + resolve(event.data); + } + }; + navigator.serviceWorker.controller.postMessage(message, [messageChannel.port2]); + }); +} + +self.clients.matchAll({type: "test"}).then(function(clients) { + for(var i = 0 ; i < clients.length ; i++) { + if(clients[i].url === 'index.html') { + self.clients.openWindow(clients[i].url); + // or do something else involving the matching client + } + } +}); + +self.addEventListener('activate', function(e: ExtendableEvent) { + e.waitUntil(self.clients.claim()); +}); + +navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(function(registration) { + // At this point, registration has taken place. + // The service worker will not handle requests until this page and any + // other instances of this page (in other tabs, etc.) have been + // closed/reloaded. + var serviceWorker; + if (registration.installing) { + serviceWorker = registration.installing; + } else if (registration.waiting) { + serviceWorker = registration.waiting; + } else if (registration.active) { + serviceWorker = registration.active; + } + if (serviceWorker) { + console.log(serviceWorker.state); + serviceWorker.addEventListener('statechange', function(e) { + console.log(e.target.state); + }); + } +}).catch(function(error) { + // Something went wrong during registration. The service-worker.js file + // might be unavailable or contain a syntax error. + +}); + +navigator.serviceWorker.getRegistration('/app').then(function(registration: ServiceWorkerRegistration) { + +}); + +navigator.serviceWorker.getRegistrations().then(function(registrations: Array) { + +}); + +self.registration.unregister(); + +self.addEventListener('install', function(event: ExtendableEvent) { + event.waitUntil(self.skipWaiting()); +}); + +self.addEventListener('notificationclick', function(event: NotificationEvent) { + console.log('On notification click: ', event.notification.tag); + event.notification.close(); + + // This looks to see if the current is already open and + // focuses if it is + event.waitUntil(self.clients.matchAll({ + type: "window" + }).then(function(clientList) { + for (var i = 0; i < clientList.length; i++) { + var client = clientList[i]; + } + if (self.clients.openWindow) + return self.clients.openWindow('/'); + })); +}); \ No newline at end of file diff --git a/service_worker_api/service_worker_api.d.ts b/service_worker_api/service_worker_api.d.ts new file mode 100644 index 0000000000..f9b2981463 --- /dev/null +++ b/service_worker_api/service_worker_api.d.ts @@ -0,0 +1,896 @@ +// Type definitions for service_worker_api +// Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API +// Definitions by: Tristan Caron +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +/** + * Provides methods relating to the body of the response/request, allowing you + * to declare what its content type is and how it should be handled. + */ +interface Body { + /** + * Contains a Boolean that indicates whether the body has been read. + * @readonly + */ + bodyUsed: boolean; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with an ArrayBuffer. + */ + arrayBuffer(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a Blob. + */ + blob(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a FormData object. + */ + formData(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a JSON object. + */ + json(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a USVString (text). + */ + text(): Promise; + +} + +/** + * Represents response/request headers, allowing you to query them and take + * different actions depending on the results. + */ +interface Header { + new(): Header; + + /** + * Appends a new value onto an existing header inside a Headers object, or + * adds the header if it does not already exist. + * + * @param name The name of the HTTP header you want to add to the Headers + * object. + * @param value The value of the HTTP header you want to add. + */ + append(name: string, value: string): void; + + /** + * Deletes a header from a Headers object. + * + * @param name The name of the HTTP header you want to delete from the + * Headers object. + */ + delete(name: string): void; + + /** + * Returns the first value of a given header from within a Headers object. + * + * @param name The name of the HTTP header whose value you want to retrieve + * from the Headers object. If the given name is not the name of an + * HTTP header, this method throws a TypeError. + */ + get(name: string): string; + + /** + * Returns an array of all the values of a header within a Headers object + * with a given name. + * + * @param name The name of the HTTP header whose values you want to retrieve + * from the Headers object. If the given name is not the name of an + * HTTP header, this method throws a TypeError. + */ + getAll(name:string): Array; + + /** + * Returns a boolean stating whether a Headers object contains a + * certain header. + * + * @param name The name of the HTTP header you want to test for. If the + * given name is not the name of an HTTP header, this method throws + * a TypeError. + */ + has(name: string): boolean; + + /** + * Sets a new value for an existing header inside a Headers object, or + * adds the header if it does not already exist. + * + * @param name The name of the HTTP header you want to set to a new value. + * If the given name is not the name of an HTTP header, this method throws + * a TypeError. + * @param value The new value you want to set. + */ + set(name: string, value: string): void; +} + +/** + * Represents the response to a request. + */ +interface Response extends Body { + new(): Response; + + /** + * Contains the type of the response (e.g., basic, cors). + * @readonly + */ + type: string; + + /** + * Contains the URL of the response. + * @readonly + */ + url: string; + + /** + * Contains a boolean stating whether this is the final URL of the response. + */ + useFinalURL: boolean; + + /** + * Contains the status code of the response (e.g., 200 for a success). + * @readonly + */ + status: number; + + /** + * Contains a boolean stating whether the response was successful + * (status in the range 200-299) or not. + * @readonly + */ + ok: boolean; + + /** + * Contains the status message corresponding to the status code + * (e.g., OK for 200). + * @readonly + */ + statusText: string; + + /** + * Contains the Headers object associated with the response. + * @readonly + */ + headers: Header; + + /** + * Creates a clone of a Response object. + */ + clone(): Response; + + /** + * Returns a new Response object associated with a network error. + */ + error(): Response; + + /** + * Creates a new response with a different URL. + */ + redirect(): Response; +} + +/** + * Represents a resource request. + */ +interface Request extends Body { + new(): Request; + + /** + * Contains the request's method (GET, POST, etc.). + * @readonly + */ + method: string; + + /** + * Contains the URL of the request. + * @readonly + */ + url: string; + + /** + * Contains the associated Headers object of the request. + * @readonly + */ + headers: Header; + + /** + * Contains the context of the request (e.g., audio, image, iframe, etc.). + * @readonly + */ + context: string; + + /** + * Contains the referrer of the request (e.g., client). + * @readonly + */ + referrer: string; + + /** + * Contains the mode of the request (e.g., cors, no-cors, same-origin). + * @readonly + */ + mode: string; + + /** + * Contains the credentials of the request (e.g., omit, same-origin). + * @readonly + */ + credentials: string; + + /** + * Contains the cache mode of the request (e.g., default, reload, no-cache). + * @readonly + */ + cache: string; + + /** + * Creates a copy of the current Request object. + */ + clone(): Request; +} + +/** + * An CacheOptions object allowing you to set specific control options for the + * matching done in the match operation. + * + * @property [ignoreSearch] A Boolean that specifies whether the matching + * process should ignore the query string in the url. If set to true, + * the ?value=bar part of http://foo.com/?value=bar would be ignored when + * performing a match. It defaults to false. + * + * @property [ignoreMethod] A Boolean that, when set to true, prevents matching + * operations from validating the Request http method (normally only GET + * and HEAD are allowed.) It defaults to false. + * + * @property [ignoreVary] A Boolean that when set to true tells the matching + * operation not to perform VARY header matching — i.e. if the URL matches you + * will get a match regardless of the Response object having a VARY header or + * not. It defaults to false. + * + * @property [cacheName] A DOMString that represents a specific cache to search + * within. Note that this option is ignored by Cache.match(). + */ +interface CacheOptions { + ignoreSearch?: boolean; + ignoreMethod?: boolean; + ignoreVary?: boolean; + cacheName?: string; +} + +/** + * Represents the storage for Request / Response object pairs that are cached as + * part of the ServiceWorker life cycle. + */ +interface Cache { + /** + * Returns a Promise that resolves to the response associated with the first + * matching request in the Cache object. + * + * @param request The Request you are attempting to find in the Cache. + * @param {CacheOptions} options + */ + match(request: Request | string, options?: CacheOptions): Promise; + + /** + * Returns a Promise that resolves to an array of all matching requests in + * the Cache object. + * + * @param request The Request you are attempting to find in the Cache. + * @param {CacheOptions} options + */ + matchAll(request: Request | string, options?: CacheOptions): Promise>; + + /** + * Returns a Promise that resolves to a new Cache entry whose key + * is the request. + * + * @param request The Request you want to add to the cache. + */ + add(request: Request | string): Promise; + + /** + * Returns a Promise that resolves to a new array of Cache entries whose + * keys are the requests. + * + * @param request An array of Request objects you want to add to the cache. + */ + addAll(...request: Array): Promise; + + /** + * Adds additional key/value pairs to the current Cache object. + * + * @param request The Request you want to add to the cache. + * @param response The response you want to match up to the request. + */ + put(request: Request, response: Response): Promise; + + /** + * Finds the Cache entry whose key is the request, and if found, deletes the + * Cache entry and returns a Promise that resolves to true. If no Cache + * entry is found, it returns false. + * + * @param request The Request you are looking to delete. + * @param {CacheOptions} options + */ + delete(request: Request | string, options?: CacheOptions): Promise; + + /** + * Returns a Promise that resolves to an array of Cache keys. + * + * @param request The Request want to return, if a specific key is desired. + * @param {CacheOptions} options + */ + keys(request?: Request, options?: CacheOptions): Promise>; +} + +/** + * Represents the storage for Cache objects. It provides a master directory of + * all the named caches that a ServiceWorker can access and maintains a mapping + * of string names to corresponding Cache objects. + */ +interface CacheStorage { + /** + * Checks if a given Request is a key in any of the Cache objects that the + * CacheStorage object tracks and returns a Promise that resolves + * to that match. + * + * @param request The Request you are looking for a match for in the CacheStorage. + * @param {CacheOptions} options + */ + match(request: Request | string, options?: CacheOptions): Promise; + + /** + * Returns a Promise that resolves to true if a Cache object matching + * the cacheName exists. + * + * @param cacheName The Request you are looking for a match for in the + * CacheStorage. + */ + has(cacheName: string): Promise; + + /** + * Returns a Promise that resolves to the Cache object matching + * the cacheName. + * + * @param cacheName The name of the cache you want to open. + */ + open(cacheName: string): Promise; + + /** + * Finds the Cache object matching the cacheName, and if found, deletes the + * Cache object and returns a Promise that resolves to true. If no + * Cache object is found, it returns false. + * + * @param cacheName The name of the cache you want to delete. + */ + delete(cacheName: string): Promise; + + /** + * Returns a Promise that will resolve with an array containing strings + * corresponding to all of the named Cache objects tracked by the + * CacheStorage. Use this method to iterate over a list of all the + * Cache objects. + */ + keys(): Promise>; +} + +/** + * Represents the scope of a service worker client. A service worker client is + * either a document in a browser context or a SharedWorker, which is controlled + * by an active worker. + */ +interface ServiceWorkerClient { + /** + * Allows a service worker client to send a message to a ServiceWorker. + * + * @param message The message to send to the service worker. + * @param [transfer] A transferable object such as, for example, a reference + * to a port. + */ + postMessage(message: string, transfer?: Object): void; + + /** + * Indicates the type of browsing context of the current client. + * This value can be one of auxiliary, top-level, nested, or none. + * @readonly + */ + frameType: string; + + /** + * Returns the id of the Client object. + * @readonly + */ + id: string; + + /** + * The URL of the current service worker client. + * @readonly + */ + url: string; +} + +interface WindowClient extends ServiceWorkerClient { + /** + * Gives user input focus to the current client. + */ + focus(): Promise; + + /** + * A boolean that indicates whether the current client has focus. + * @readonly + */ + focused: boolean; + + /** + * Indicates the visibility of the current client. This value can be one of + * hidden, visible, prerender, or unloaded. + * @readonly + */ + visibilityState: string; +} + +interface ServiceWorkerClientsMatchOptions { + includeUncontrolled?: boolean; + type?: string; +} + +/** + * Represents a container for a list of Client objects; the main way to access + * the active service worker clients at the current origin. + */ +interface ServiceWorkerClients { + /** + * Gets a list of service worker clients and returns them in a Promise. + * Include the options parameter to return all service worker clients whose + * origin is the same as the associated service worker's origin. If options + * are not included, the method returns only the service worker clients + * controlled by the service worker. + * + * @param options + */ + matchAll(options: ServiceWorkerClientsMatchOptions): Promise>; + + /** + * Opens a service worker Client in a new browser window. + * + * @param url A string representing the URL of the client you want to open + * in the window. + */ + openWindow(url: string): Promise; + + /** + * Allows an active Service Worker to set itself as the active worker for a + * client page when the worker and the page are in the same scope. + */ + claim(): Promise; +} + +/** + * Extends the lifetime of the install and activate events dispatched on the + * ServiceWorkerGlobalScope as part of the service worker lifecycle. This + * ensures that any functional events (like FetchEvent) are not dispatched to + * the ServiceWorker until it upgrades database schemas, deletes outdated cache + * entries, etc. + */ +interface ExtendableEvent extends Event { + /** + * Extends the lifetime of the event. + * It is intended to be called in the install EventHandler for the + * installing worker and on the active EventHandler for the active worker. + * + * @param all + */ + waitUntil(all: any): any; +} + +/** + * The parameter passed into the ServiceWorkerGlobalScope.onfetch handler, + * FetchEvent represents a fetch action that is dispatched on the + * ServiceWorkerGlobalScope of a ServiceWorker. It contains information about + * the request and resulting response, and provides the FetchEvent.respondWith() + * method, which allows us to provide an arbitrary response back to the + * controlled page. + */ +interface FetchEvent extends Event { + /** + * Returns a Boolean that is true if the event was dispatched with the + * user's intention for the page to reload, and false otherwise. Typically, + * pressing the refresh button in a browser is a reload, while clicking a + * link and pressing the back button is not. + * @readonly + */ + isReload: boolean; + + /** + * Returns the Request that triggered the event handler. + * @readonly + */ + request: Request; + + /** + * Returns the Client that the current service worker is controlling. + * @readonly + */ + client: ServiceWorkerClient; + + /** + * Resolves by returning a Response or a network error to Fetch. + * + * @param any + */ + respondWith(any): Response; +} + +/** + * Represents a service worker. Multiple browsing contexts (e.g. pages, workers, + * etc.) can be associated with the same ServiceWorker object. + */ +interface ServiceWorker extends Worker { + /** + * Returns the ServiceWorker serialized script URL defined as part of + * ServiceWorkerRegistration. The URL must be on the same origin as the + * document that registers the ServiceWorker. + * @readonly + */ + scriptURL: string; + + /** + * Returns the state of the service worker. It returns one of the following + * values: installing, installed, activating, activated, or redundant. + * @readonly + */ + state: string; + + /** + * An EventListener property called whenever an event of type statechange + * is fired; it is basically fired anytime the ServiceWorker.state changes. + * + * @param [statechangeevent] + */ + onstatechange: (statechangeevent?: Event) => void; +} + +/** + * The PushSubscription interface provides a subcription's URL endpoint and + * subscription ID. + */ +interface PushSubscription { + /** + * The endpoint associated with the push subscription. + * @readonly + */ + endpoint: any; + + /** + * The subscription ID associated with the push subscription. + * @readonly + */ + subscriptionId: any; +} + +/** + * The PushManager interface provides a way to receive notifications from + * third-party servers as well as request URLs for push notifications. + * This interface has replaced functionality offered by the obsolete + * PushRegistrationManager. + */ +interface PushManager { + /** + * Returns a promise that resolves to a PushSubscription with details of a + * new push subscription. + */ + subscribe(): Promise; + + /** + * Returns a promise that resolves to a PushSubscription details of + * the retrieved push subscription. + */ + getSubscription(): Promise; + + /** + * Returns a promise that resolves to the PushPermissionStatus of the + * requesting webapp, which will be one of granted, denied, or default. + */ + hasPermission(): Promise; +} + +/** + * Represents a service worker registration. + */ +interface ServiceWorkerRegistration extends EventTarget { + /** + * Returns a unique identifier for a service worker registration. + * This must be on the same origin as the document that registers + * the ServiceWorker. + * @readonly + */ + scope: any; + + /** + * Returns a service worker whose state is installing. This is initially + * set to null. + * @readonly + */ + installing: ServiceWorker; + + /** + * Returns a service worker whose state is installed. This is initially + * set to null. + * @readonly + */ + waiting: ServiceWorker; + + /** + * Returns a service worker whose state is either activating or activated. + * This is initially set to null. An active worker will control a + * ServiceWorkerClient if the client's URL falls within the scope of the + * registration (the scope option set when ServiceWorkerContainer.register + * is first called). + * @readonly + */ + active: ServiceWorker; + + /** + * Returns an interface to for managing push subscriptions, including + * subcribing, getting an anctive subscription, and accessing push + * permission status. + * @readonly + */ + pushManager: PushManager; + + /** + * An EventListener property called whenever an event of type updatefound + * is fired; it is fired any time the ServiceWorkerRegistration.installing + * property acquires a new service worker. + */ + onupdatefound: () => void; + + /** + * Allows you to update a service worker. + */ + update(); + + /** + * Unregisters the service worker registration and returns a promise + * (see Promise). The service worker will finish any ongoing operations + * before it is unregistered. + */ + unregister(): Promise; +} + +interface ServiceWorkerRegisterOptions { + scope: string; +} + +/** + * Provides an object representing the service worker as an overall unit in the + * network ecosystem, including facilities to register, unregister and update + * service workers, and access the state of service workers + * and their registrations. + */ +interface ServiceWorkerContainer { + /** + * Returns a ServiceWorker object if its state is activated (the same object + * returned by ServiceWorkerRegistration.active). This property returns null + * if the request is a force refresh (Shift + refresh) or if there is no + * active worker. + * @readonly + */ + controller: ServiceWorker; + + /** + * Defines whether a service worker is ready to control a page or not. + * It returns a Promise that will never reject, which resolves to a + * ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker. + * @readonly + */ + ready: Promise; + + /** + * An event handler fired whenever a controllerchange event occurs — when + * the document's associated ServiceWorkerRegistration acquires a new + * ServiceWorkerRegistration.active worker. + * + * @param [controllerchangeevent] + */ + oncontrollerchange: (controllerchangeevent?: Event) => void; + + /** + * An event handler fired whenever an error event occurs in the associated + * service workers. + * + * @param [errorevent] + */ + onerror: (errorevent?: ErrorEvent) => void; + + /** + * An event handler fired whenever a message event occurs — when incoming + * messages are received to the ServiceWorkerContainer object (e.g. via a + * MessagePort.postMessage() call.) + * + * @param [messageevent] + */ + onmessage: (messageevent?: MessageEvent) => void; + + /** + * Creates or updates a ServiceWorkerRegistration for the given scriptURL. + * + * @param scriptURL The URL of the service worker script. + * @param [options] An options object to provide options upon registration. + * Currently available options are: scope: A USVString representing a URL + * that defines a service worker's registration scope; what range of URLs a + * service worker can control. This is usually a relative URL, and it + * defaults to '/' when not specified. + */ + register(scriptURL: string, options?: ServiceWorkerRegisterOptions): Promise; + + /** + * Gets a ServiceWorkerRegistration object whose scope URL matches the + * provided document URL. If the method can't return a + * ServiceWorkerRegistration, it returns a Promise. + * + * @param [scope] A unique identifier for a service worker registration — the + * scope URL of the registration object you want to return. This is usually + * a relative URL. + */ + getRegistration(scope?: string): Promise; + + /** + * Returns all ServiceWorkerRegistrations associated with a + * ServiceWorkerContainer in an array. If the method can't return + * ServiceWorkerRegistrations, it returns a Promise. + */ + getRegistrations(): Promise>; +} + +/** + * The parameter passed into the oninstall handler, the InstallEvent interface + * represents an install action that is dispatched on the + * ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, + * it ensures that functional events such as FetchEvent are not dispatched + * during installation. + */ +interface InstallEvent extends ExtendableEvent { + /** + * Returns the ServiceWorker that is currently actively controlling the page. + * @readonly + */ + activeWorker: ServiceWorker; +} + +interface ServiceWorkerGlobalScope { + /** + * Contains the Clients object associated with the service worker. + * @readonly + */ + clients: ServiceWorkerClients; + + /** + * Contains the ServiceWorkerRegistration object that represents the + * service worker's registration. + * @readonly + */ + registration: ServiceWorkerRegistration; + + /** + * An event handler fired whenever an activate event occurs — when a + * ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active + * worker. + * + * @param [activateevent] + */ + onactivate: (activateevent?: ExtendableEvent) => void; + + /** + * Not defined in the spec yet, but it looks like this will be fired when + * the device is nearly out of storage space, prompting the UA to start + * claiming back some space from web apps that are using client-side storage, + * and the current app is targeted. + * + * @param [beforeevictedevent] + */ + onbeforeevicted: (beforeevictedevent?: Event) => void; + + /** + * Not defined in the spec yet, but it looks like this will be fired when + * the device is out of storage space, and the UA claims back some space + * from the current app. + * + * @param [evictedevent] + */ + onevicted: (evictedevent?: Event) => void; + + /** + * An event handler fired whenever a fetch event occurs — when a fetch() + * is called. + * + * @param [fetchevent] + */ + onfetch: (fetchevent?: FetchEvent) => void; + + /** + * An event handler fired whenever an install event occurs — when a + * ServiceWorkerRegistration acquires a new + * ServiceWorkerRegistration.installing worker. + * + * @param [installevent] + */ + oninstall: (installevent?: InstallEvent) => void; + + /** + * An event handler fired whenever a message event occurs — when incoming + * messages are received. Controlled pages can use the + * MessagePort.postMessage() method to send messages to service workers. + * The service worker can optionally send a response back via the + * MessagePort exposed in event.data.port, corresponding to the controlled + * page. + * + * @param [messageevent] + */ + onmessage: (messageevent?: MessageEvent) => void; + + /** + * An event handler fired whenever a notificationclick event occurs — when + * a user clicks on a displayed notification. + * + * @param [notificationclickevent] + */ + onnotificationclick: (notificationclickevent?: NotificationEvent) => void; + + /** + * An event handler fired whenever a push event occurs — when a server + * push notification is received. + * + * @param [onpushevent] + */ + onpush: (onpushevent?: Event) => void; + + /** + * An event handler fired whenever a pushsubscriptionchange event occurs — + * when a push subscription has been invalidated, or is about to be + * invalidated (e.g. when a push service sets an expiration time). + * + * @param [pushsubscriptionchangeevent] + */ + onpushsubscriptionchange: (pushsubscriptionchangeevent?: Event) => void; + + /** + * Allows the current service worker registration to progress from waiting + * to active state while service worker clients are using it. + */ + skipWaiting(): Promise; + + /** + * TODO GlobalFetch + * @param url + * @param init + */ + fetch(url: string | Request, init?: Object): Promise; +} + +interface Navigator { + /** + * Returns a ServiceWorkerContainer object, which provides access to + * registration, removal, upgrade, and communication with the ServiceWorker + * objects for the associated document. + */ + serviceWorker: ServiceWorkerContainer; +} + +interface Window extends ServiceWorkerGlobalScope { + caches: CacheStorage; +} + +interface NotificationEvent extends Event, ExtendableEvent { + notification: any; +} \ No newline at end of file From 8164f9d8b9123bf8c71f555276ef826d7a0a9d37 Mon Sep 17 00:00:00 2001 From: tristancaron Date: Mon, 23 Mar 2015 20:25:42 +0100 Subject: [PATCH 0002/1506] Revert "Service Worker Api" This reverts commit 80fd9daed79eb612c3c323fa25e1eb01062d56f4. --- service_worker_api/service_worker_api-test.ts | 188 ---- service_worker_api/service_worker_api.d.ts | 896 ------------------ 2 files changed, 1084 deletions(-) delete mode 100644 service_worker_api/service_worker_api-test.ts delete mode 100644 service_worker_api/service_worker_api.d.ts diff --git a/service_worker_api/service_worker_api-test.ts b/service_worker_api/service_worker_api-test.ts deleted file mode 100644 index 67ce58cd40..0000000000 --- a/service_worker_api/service_worker_api-test.ts +++ /dev/null @@ -1,188 +0,0 @@ -/// - -var OFFLINE_CACHE = "cache_test"; -var OFFLINE_URL = "localhost"; - -self.addEventListener('fetch', function(event: FetchEvent) { - if (event.request.method === 'GET' && - event.request.headers.get('accept').indexOf('text/html') !== -1) { - console.log('Handling fetch event for', event.request.url); - event.respondWith( - self.fetch(event.request).catch(function(e) { - console.error('Fetch failed; returning offline page instead.', e); - return self.caches.open(OFFLINE_CACHE).then(function(cache: Cache) { - return cache.match(OFFLINE_URL); - }); - }) - ); - } -}); - -self.caches.open('v1').then(function(cache: Cache) { - cache.matchAll('/images/').then(function(response: Array) { - response.forEach(function(element, index, array) { - cache.delete(element); - - }); - }); - -}); - -self.addEventListener('install', function(event: InstallEvent) { - event.waitUntil( - self.caches.open('v1').then(function(cache: Cache) { - return cache.add('/sw-test/index.html'); - }) - ); -}); - -self.addEventListener('install', function(event: InstallEvent) { - event.waitUntil( - self.caches.open('v1').then(function(cache) { - return cache.addAll( - '/sw-test/', - '/sw-test/index.html', - '/sw-test/style.css', - '/sw-test/app.js', - '/sw-test/image-list.js', - '/sw-test/star-wars-logo.jpg', - '/sw-test/gallery/', - '/sw-test/gallery/bountyHunters.jpg', - '/sw-test/gallery/myLittleVader.jpg', - '/sw-test/gallery/snowTroopers.jpg' - ); - }) - ); -}); - -self.addEventListener('fetch', function(event: FetchEvent) { - var cachedResponse = self.caches.match(event.request).catch(function() { - return self.fetch(event.request).then(function(response: Response) { - return self.caches.open('v1').then(function(cache) { - cache.put(event.request, response.clone()); - return response; - }); - }); - }).catch(function() { - return self.caches.match('/sw-test/gallery/myLittleVader.jpg'); - }); - - event.respondWith(cachedResponse); -}); - -self.caches.open('v1').then(function(cache) { - cache.match('/images/image.png').then(function(response) { - cache.delete(response); - }); -}); - -self.caches.open('v1').then(function(cache: Cache) { - cache.keys().then(function(response) { - response.forEach(function(element, index, array) { - cache.delete(element); - }); - }); -}); - -self.caches.has('v1').then(function() { - self.caches.delete('v1').then(function() { - - }); -}); - -self.addEventListener('activate', function(event: ExtendableEvent) { - var cacheWhitelist = ['v2']; - - event.waitUntil( - self.caches.keys().then(function(keyList) { - for(var i = 0; i < keyList.length; i++) { - if (cacheWhitelist.indexOf(keyList[i]) === -1) { - return self.caches.delete(keyList[i]); - } - } - }) - ); -}); - -function sendMessage(message) { - return new Promise(function(resolve, reject) { - var messageChannel = new MessageChannel(); - messageChannel.port1.onmessage = function(event) { - if (event.data.error) { - reject(event.data.error); - } else { - resolve(event.data); - } - }; - navigator.serviceWorker.controller.postMessage(message, [messageChannel.port2]); - }); -} - -self.clients.matchAll({type: "test"}).then(function(clients) { - for(var i = 0 ; i < clients.length ; i++) { - if(clients[i].url === 'index.html') { - self.clients.openWindow(clients[i].url); - // or do something else involving the matching client - } - } -}); - -self.addEventListener('activate', function(e: ExtendableEvent) { - e.waitUntil(self.clients.claim()); -}); - -navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(function(registration) { - // At this point, registration has taken place. - // The service worker will not handle requests until this page and any - // other instances of this page (in other tabs, etc.) have been - // closed/reloaded. - var serviceWorker; - if (registration.installing) { - serviceWorker = registration.installing; - } else if (registration.waiting) { - serviceWorker = registration.waiting; - } else if (registration.active) { - serviceWorker = registration.active; - } - if (serviceWorker) { - console.log(serviceWorker.state); - serviceWorker.addEventListener('statechange', function(e) { - console.log(e.target.state); - }); - } -}).catch(function(error) { - // Something went wrong during registration. The service-worker.js file - // might be unavailable or contain a syntax error. - -}); - -navigator.serviceWorker.getRegistration('/app').then(function(registration: ServiceWorkerRegistration) { - -}); - -navigator.serviceWorker.getRegistrations().then(function(registrations: Array) { - -}); - -self.registration.unregister(); - -self.addEventListener('install', function(event: ExtendableEvent) { - event.waitUntil(self.skipWaiting()); -}); - -self.addEventListener('notificationclick', function(event: NotificationEvent) { - console.log('On notification click: ', event.notification.tag); - event.notification.close(); - - // This looks to see if the current is already open and - // focuses if it is - event.waitUntil(self.clients.matchAll({ - type: "window" - }).then(function(clientList) { - for (var i = 0; i < clientList.length; i++) { - var client = clientList[i]; - } - if (self.clients.openWindow) - return self.clients.openWindow('/'); - })); -}); \ No newline at end of file diff --git a/service_worker_api/service_worker_api.d.ts b/service_worker_api/service_worker_api.d.ts deleted file mode 100644 index f9b2981463..0000000000 --- a/service_worker_api/service_worker_api.d.ts +++ /dev/null @@ -1,896 +0,0 @@ -// Type definitions for service_worker_api -// Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API -// Definitions by: Tristan Caron -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -/** - * Provides methods relating to the body of the response/request, allowing you - * to declare what its content type is and how it should be handled. - */ -interface Body { - /** - * Contains a Boolean that indicates whether the body has been read. - * @readonly - */ - bodyUsed: boolean; - - /** - * Takes a Response stream and reads it to completion. - * It returns a promise that resolves with an ArrayBuffer. - */ - arrayBuffer(): Promise; - - /** - * Takes a Response stream and reads it to completion. - * It returns a promise that resolves with a Blob. - */ - blob(): Promise; - - /** - * Takes a Response stream and reads it to completion. - * It returns a promise that resolves with a FormData object. - */ - formData(): Promise; - - /** - * Takes a Response stream and reads it to completion. - * It returns a promise that resolves with a JSON object. - */ - json(): Promise; - - /** - * Takes a Response stream and reads it to completion. - * It returns a promise that resolves with a USVString (text). - */ - text(): Promise; - -} - -/** - * Represents response/request headers, allowing you to query them and take - * different actions depending on the results. - */ -interface Header { - new(): Header; - - /** - * Appends a new value onto an existing header inside a Headers object, or - * adds the header if it does not already exist. - * - * @param name The name of the HTTP header you want to add to the Headers - * object. - * @param value The value of the HTTP header you want to add. - */ - append(name: string, value: string): void; - - /** - * Deletes a header from a Headers object. - * - * @param name The name of the HTTP header you want to delete from the - * Headers object. - */ - delete(name: string): void; - - /** - * Returns the first value of a given header from within a Headers object. - * - * @param name The name of the HTTP header whose value you want to retrieve - * from the Headers object. If the given name is not the name of an - * HTTP header, this method throws a TypeError. - */ - get(name: string): string; - - /** - * Returns an array of all the values of a header within a Headers object - * with a given name. - * - * @param name The name of the HTTP header whose values you want to retrieve - * from the Headers object. If the given name is not the name of an - * HTTP header, this method throws a TypeError. - */ - getAll(name:string): Array; - - /** - * Returns a boolean stating whether a Headers object contains a - * certain header. - * - * @param name The name of the HTTP header you want to test for. If the - * given name is not the name of an HTTP header, this method throws - * a TypeError. - */ - has(name: string): boolean; - - /** - * Sets a new value for an existing header inside a Headers object, or - * adds the header if it does not already exist. - * - * @param name The name of the HTTP header you want to set to a new value. - * If the given name is not the name of an HTTP header, this method throws - * a TypeError. - * @param value The new value you want to set. - */ - set(name: string, value: string): void; -} - -/** - * Represents the response to a request. - */ -interface Response extends Body { - new(): Response; - - /** - * Contains the type of the response (e.g., basic, cors). - * @readonly - */ - type: string; - - /** - * Contains the URL of the response. - * @readonly - */ - url: string; - - /** - * Contains a boolean stating whether this is the final URL of the response. - */ - useFinalURL: boolean; - - /** - * Contains the status code of the response (e.g., 200 for a success). - * @readonly - */ - status: number; - - /** - * Contains a boolean stating whether the response was successful - * (status in the range 200-299) or not. - * @readonly - */ - ok: boolean; - - /** - * Contains the status message corresponding to the status code - * (e.g., OK for 200). - * @readonly - */ - statusText: string; - - /** - * Contains the Headers object associated with the response. - * @readonly - */ - headers: Header; - - /** - * Creates a clone of a Response object. - */ - clone(): Response; - - /** - * Returns a new Response object associated with a network error. - */ - error(): Response; - - /** - * Creates a new response with a different URL. - */ - redirect(): Response; -} - -/** - * Represents a resource request. - */ -interface Request extends Body { - new(): Request; - - /** - * Contains the request's method (GET, POST, etc.). - * @readonly - */ - method: string; - - /** - * Contains the URL of the request. - * @readonly - */ - url: string; - - /** - * Contains the associated Headers object of the request. - * @readonly - */ - headers: Header; - - /** - * Contains the context of the request (e.g., audio, image, iframe, etc.). - * @readonly - */ - context: string; - - /** - * Contains the referrer of the request (e.g., client). - * @readonly - */ - referrer: string; - - /** - * Contains the mode of the request (e.g., cors, no-cors, same-origin). - * @readonly - */ - mode: string; - - /** - * Contains the credentials of the request (e.g., omit, same-origin). - * @readonly - */ - credentials: string; - - /** - * Contains the cache mode of the request (e.g., default, reload, no-cache). - * @readonly - */ - cache: string; - - /** - * Creates a copy of the current Request object. - */ - clone(): Request; -} - -/** - * An CacheOptions object allowing you to set specific control options for the - * matching done in the match operation. - * - * @property [ignoreSearch] A Boolean that specifies whether the matching - * process should ignore the query string in the url. If set to true, - * the ?value=bar part of http://foo.com/?value=bar would be ignored when - * performing a match. It defaults to false. - * - * @property [ignoreMethod] A Boolean that, when set to true, prevents matching - * operations from validating the Request http method (normally only GET - * and HEAD are allowed.) It defaults to false. - * - * @property [ignoreVary] A Boolean that when set to true tells the matching - * operation not to perform VARY header matching — i.e. if the URL matches you - * will get a match regardless of the Response object having a VARY header or - * not. It defaults to false. - * - * @property [cacheName] A DOMString that represents a specific cache to search - * within. Note that this option is ignored by Cache.match(). - */ -interface CacheOptions { - ignoreSearch?: boolean; - ignoreMethod?: boolean; - ignoreVary?: boolean; - cacheName?: string; -} - -/** - * Represents the storage for Request / Response object pairs that are cached as - * part of the ServiceWorker life cycle. - */ -interface Cache { - /** - * Returns a Promise that resolves to the response associated with the first - * matching request in the Cache object. - * - * @param request The Request you are attempting to find in the Cache. - * @param {CacheOptions} options - */ - match(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to an array of all matching requests in - * the Cache object. - * - * @param request The Request you are attempting to find in the Cache. - * @param {CacheOptions} options - */ - matchAll(request: Request | string, options?: CacheOptions): Promise>; - - /** - * Returns a Promise that resolves to a new Cache entry whose key - * is the request. - * - * @param request The Request you want to add to the cache. - */ - add(request: Request | string): Promise; - - /** - * Returns a Promise that resolves to a new array of Cache entries whose - * keys are the requests. - * - * @param request An array of Request objects you want to add to the cache. - */ - addAll(...request: Array): Promise; - - /** - * Adds additional key/value pairs to the current Cache object. - * - * @param request The Request you want to add to the cache. - * @param response The response you want to match up to the request. - */ - put(request: Request, response: Response): Promise; - - /** - * Finds the Cache entry whose key is the request, and if found, deletes the - * Cache entry and returns a Promise that resolves to true. If no Cache - * entry is found, it returns false. - * - * @param request The Request you are looking to delete. - * @param {CacheOptions} options - */ - delete(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to an array of Cache keys. - * - * @param request The Request want to return, if a specific key is desired. - * @param {CacheOptions} options - */ - keys(request?: Request, options?: CacheOptions): Promise>; -} - -/** - * Represents the storage for Cache objects. It provides a master directory of - * all the named caches that a ServiceWorker can access and maintains a mapping - * of string names to corresponding Cache objects. - */ -interface CacheStorage { - /** - * Checks if a given Request is a key in any of the Cache objects that the - * CacheStorage object tracks and returns a Promise that resolves - * to that match. - * - * @param request The Request you are looking for a match for in the CacheStorage. - * @param {CacheOptions} options - */ - match(request: Request | string, options?: CacheOptions): Promise; - - /** - * Returns a Promise that resolves to true if a Cache object matching - * the cacheName exists. - * - * @param cacheName The Request you are looking for a match for in the - * CacheStorage. - */ - has(cacheName: string): Promise; - - /** - * Returns a Promise that resolves to the Cache object matching - * the cacheName. - * - * @param cacheName The name of the cache you want to open. - */ - open(cacheName: string): Promise; - - /** - * Finds the Cache object matching the cacheName, and if found, deletes the - * Cache object and returns a Promise that resolves to true. If no - * Cache object is found, it returns false. - * - * @param cacheName The name of the cache you want to delete. - */ - delete(cacheName: string): Promise; - - /** - * Returns a Promise that will resolve with an array containing strings - * corresponding to all of the named Cache objects tracked by the - * CacheStorage. Use this method to iterate over a list of all the - * Cache objects. - */ - keys(): Promise>; -} - -/** - * Represents the scope of a service worker client. A service worker client is - * either a document in a browser context or a SharedWorker, which is controlled - * by an active worker. - */ -interface ServiceWorkerClient { - /** - * Allows a service worker client to send a message to a ServiceWorker. - * - * @param message The message to send to the service worker. - * @param [transfer] A transferable object such as, for example, a reference - * to a port. - */ - postMessage(message: string, transfer?: Object): void; - - /** - * Indicates the type of browsing context of the current client. - * This value can be one of auxiliary, top-level, nested, or none. - * @readonly - */ - frameType: string; - - /** - * Returns the id of the Client object. - * @readonly - */ - id: string; - - /** - * The URL of the current service worker client. - * @readonly - */ - url: string; -} - -interface WindowClient extends ServiceWorkerClient { - /** - * Gives user input focus to the current client. - */ - focus(): Promise; - - /** - * A boolean that indicates whether the current client has focus. - * @readonly - */ - focused: boolean; - - /** - * Indicates the visibility of the current client. This value can be one of - * hidden, visible, prerender, or unloaded. - * @readonly - */ - visibilityState: string; -} - -interface ServiceWorkerClientsMatchOptions { - includeUncontrolled?: boolean; - type?: string; -} - -/** - * Represents a container for a list of Client objects; the main way to access - * the active service worker clients at the current origin. - */ -interface ServiceWorkerClients { - /** - * Gets a list of service worker clients and returns them in a Promise. - * Include the options parameter to return all service worker clients whose - * origin is the same as the associated service worker's origin. If options - * are not included, the method returns only the service worker clients - * controlled by the service worker. - * - * @param options - */ - matchAll(options: ServiceWorkerClientsMatchOptions): Promise>; - - /** - * Opens a service worker Client in a new browser window. - * - * @param url A string representing the URL of the client you want to open - * in the window. - */ - openWindow(url: string): Promise; - - /** - * Allows an active Service Worker to set itself as the active worker for a - * client page when the worker and the page are in the same scope. - */ - claim(): Promise; -} - -/** - * Extends the lifetime of the install and activate events dispatched on the - * ServiceWorkerGlobalScope as part of the service worker lifecycle. This - * ensures that any functional events (like FetchEvent) are not dispatched to - * the ServiceWorker until it upgrades database schemas, deletes outdated cache - * entries, etc. - */ -interface ExtendableEvent extends Event { - /** - * Extends the lifetime of the event. - * It is intended to be called in the install EventHandler for the - * installing worker and on the active EventHandler for the active worker. - * - * @param all - */ - waitUntil(all: any): any; -} - -/** - * The parameter passed into the ServiceWorkerGlobalScope.onfetch handler, - * FetchEvent represents a fetch action that is dispatched on the - * ServiceWorkerGlobalScope of a ServiceWorker. It contains information about - * the request and resulting response, and provides the FetchEvent.respondWith() - * method, which allows us to provide an arbitrary response back to the - * controlled page. - */ -interface FetchEvent extends Event { - /** - * Returns a Boolean that is true if the event was dispatched with the - * user's intention for the page to reload, and false otherwise. Typically, - * pressing the refresh button in a browser is a reload, while clicking a - * link and pressing the back button is not. - * @readonly - */ - isReload: boolean; - - /** - * Returns the Request that triggered the event handler. - * @readonly - */ - request: Request; - - /** - * Returns the Client that the current service worker is controlling. - * @readonly - */ - client: ServiceWorkerClient; - - /** - * Resolves by returning a Response or a network error to Fetch. - * - * @param any - */ - respondWith(any): Response; -} - -/** - * Represents a service worker. Multiple browsing contexts (e.g. pages, workers, - * etc.) can be associated with the same ServiceWorker object. - */ -interface ServiceWorker extends Worker { - /** - * Returns the ServiceWorker serialized script URL defined as part of - * ServiceWorkerRegistration. The URL must be on the same origin as the - * document that registers the ServiceWorker. - * @readonly - */ - scriptURL: string; - - /** - * Returns the state of the service worker. It returns one of the following - * values: installing, installed, activating, activated, or redundant. - * @readonly - */ - state: string; - - /** - * An EventListener property called whenever an event of type statechange - * is fired; it is basically fired anytime the ServiceWorker.state changes. - * - * @param [statechangeevent] - */ - onstatechange: (statechangeevent?: Event) => void; -} - -/** - * The PushSubscription interface provides a subcription's URL endpoint and - * subscription ID. - */ -interface PushSubscription { - /** - * The endpoint associated with the push subscription. - * @readonly - */ - endpoint: any; - - /** - * The subscription ID associated with the push subscription. - * @readonly - */ - subscriptionId: any; -} - -/** - * The PushManager interface provides a way to receive notifications from - * third-party servers as well as request URLs for push notifications. - * This interface has replaced functionality offered by the obsolete - * PushRegistrationManager. - */ -interface PushManager { - /** - * Returns a promise that resolves to a PushSubscription with details of a - * new push subscription. - */ - subscribe(): Promise; - - /** - * Returns a promise that resolves to a PushSubscription details of - * the retrieved push subscription. - */ - getSubscription(): Promise; - - /** - * Returns a promise that resolves to the PushPermissionStatus of the - * requesting webapp, which will be one of granted, denied, or default. - */ - hasPermission(): Promise; -} - -/** - * Represents a service worker registration. - */ -interface ServiceWorkerRegistration extends EventTarget { - /** - * Returns a unique identifier for a service worker registration. - * This must be on the same origin as the document that registers - * the ServiceWorker. - * @readonly - */ - scope: any; - - /** - * Returns a service worker whose state is installing. This is initially - * set to null. - * @readonly - */ - installing: ServiceWorker; - - /** - * Returns a service worker whose state is installed. This is initially - * set to null. - * @readonly - */ - waiting: ServiceWorker; - - /** - * Returns a service worker whose state is either activating or activated. - * This is initially set to null. An active worker will control a - * ServiceWorkerClient if the client's URL falls within the scope of the - * registration (the scope option set when ServiceWorkerContainer.register - * is first called). - * @readonly - */ - active: ServiceWorker; - - /** - * Returns an interface to for managing push subscriptions, including - * subcribing, getting an anctive subscription, and accessing push - * permission status. - * @readonly - */ - pushManager: PushManager; - - /** - * An EventListener property called whenever an event of type updatefound - * is fired; it is fired any time the ServiceWorkerRegistration.installing - * property acquires a new service worker. - */ - onupdatefound: () => void; - - /** - * Allows you to update a service worker. - */ - update(); - - /** - * Unregisters the service worker registration and returns a promise - * (see Promise). The service worker will finish any ongoing operations - * before it is unregistered. - */ - unregister(): Promise; -} - -interface ServiceWorkerRegisterOptions { - scope: string; -} - -/** - * Provides an object representing the service worker as an overall unit in the - * network ecosystem, including facilities to register, unregister and update - * service workers, and access the state of service workers - * and their registrations. - */ -interface ServiceWorkerContainer { - /** - * Returns a ServiceWorker object if its state is activated (the same object - * returned by ServiceWorkerRegistration.active). This property returns null - * if the request is a force refresh (Shift + refresh) or if there is no - * active worker. - * @readonly - */ - controller: ServiceWorker; - - /** - * Defines whether a service worker is ready to control a page or not. - * It returns a Promise that will never reject, which resolves to a - * ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker. - * @readonly - */ - ready: Promise; - - /** - * An event handler fired whenever a controllerchange event occurs — when - * the document's associated ServiceWorkerRegistration acquires a new - * ServiceWorkerRegistration.active worker. - * - * @param [controllerchangeevent] - */ - oncontrollerchange: (controllerchangeevent?: Event) => void; - - /** - * An event handler fired whenever an error event occurs in the associated - * service workers. - * - * @param [errorevent] - */ - onerror: (errorevent?: ErrorEvent) => void; - - /** - * An event handler fired whenever a message event occurs — when incoming - * messages are received to the ServiceWorkerContainer object (e.g. via a - * MessagePort.postMessage() call.) - * - * @param [messageevent] - */ - onmessage: (messageevent?: MessageEvent) => void; - - /** - * Creates or updates a ServiceWorkerRegistration for the given scriptURL. - * - * @param scriptURL The URL of the service worker script. - * @param [options] An options object to provide options upon registration. - * Currently available options are: scope: A USVString representing a URL - * that defines a service worker's registration scope; what range of URLs a - * service worker can control. This is usually a relative URL, and it - * defaults to '/' when not specified. - */ - register(scriptURL: string, options?: ServiceWorkerRegisterOptions): Promise; - - /** - * Gets a ServiceWorkerRegistration object whose scope URL matches the - * provided document URL. If the method can't return a - * ServiceWorkerRegistration, it returns a Promise. - * - * @param [scope] A unique identifier for a service worker registration — the - * scope URL of the registration object you want to return. This is usually - * a relative URL. - */ - getRegistration(scope?: string): Promise; - - /** - * Returns all ServiceWorkerRegistrations associated with a - * ServiceWorkerContainer in an array. If the method can't return - * ServiceWorkerRegistrations, it returns a Promise. - */ - getRegistrations(): Promise>; -} - -/** - * The parameter passed into the oninstall handler, the InstallEvent interface - * represents an install action that is dispatched on the - * ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, - * it ensures that functional events such as FetchEvent are not dispatched - * during installation. - */ -interface InstallEvent extends ExtendableEvent { - /** - * Returns the ServiceWorker that is currently actively controlling the page. - * @readonly - */ - activeWorker: ServiceWorker; -} - -interface ServiceWorkerGlobalScope { - /** - * Contains the Clients object associated with the service worker. - * @readonly - */ - clients: ServiceWorkerClients; - - /** - * Contains the ServiceWorkerRegistration object that represents the - * service worker's registration. - * @readonly - */ - registration: ServiceWorkerRegistration; - - /** - * An event handler fired whenever an activate event occurs — when a - * ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active - * worker. - * - * @param [activateevent] - */ - onactivate: (activateevent?: ExtendableEvent) => void; - - /** - * Not defined in the spec yet, but it looks like this will be fired when - * the device is nearly out of storage space, prompting the UA to start - * claiming back some space from web apps that are using client-side storage, - * and the current app is targeted. - * - * @param [beforeevictedevent] - */ - onbeforeevicted: (beforeevictedevent?: Event) => void; - - /** - * Not defined in the spec yet, but it looks like this will be fired when - * the device is out of storage space, and the UA claims back some space - * from the current app. - * - * @param [evictedevent] - */ - onevicted: (evictedevent?: Event) => void; - - /** - * An event handler fired whenever a fetch event occurs — when a fetch() - * is called. - * - * @param [fetchevent] - */ - onfetch: (fetchevent?: FetchEvent) => void; - - /** - * An event handler fired whenever an install event occurs — when a - * ServiceWorkerRegistration acquires a new - * ServiceWorkerRegistration.installing worker. - * - * @param [installevent] - */ - oninstall: (installevent?: InstallEvent) => void; - - /** - * An event handler fired whenever a message event occurs — when incoming - * messages are received. Controlled pages can use the - * MessagePort.postMessage() method to send messages to service workers. - * The service worker can optionally send a response back via the - * MessagePort exposed in event.data.port, corresponding to the controlled - * page. - * - * @param [messageevent] - */ - onmessage: (messageevent?: MessageEvent) => void; - - /** - * An event handler fired whenever a notificationclick event occurs — when - * a user clicks on a displayed notification. - * - * @param [notificationclickevent] - */ - onnotificationclick: (notificationclickevent?: NotificationEvent) => void; - - /** - * An event handler fired whenever a push event occurs — when a server - * push notification is received. - * - * @param [onpushevent] - */ - onpush: (onpushevent?: Event) => void; - - /** - * An event handler fired whenever a pushsubscriptionchange event occurs — - * when a push subscription has been invalidated, or is about to be - * invalidated (e.g. when a push service sets an expiration time). - * - * @param [pushsubscriptionchangeevent] - */ - onpushsubscriptionchange: (pushsubscriptionchangeevent?: Event) => void; - - /** - * Allows the current service worker registration to progress from waiting - * to active state while service worker clients are using it. - */ - skipWaiting(): Promise; - - /** - * TODO GlobalFetch - * @param url - * @param init - */ - fetch(url: string | Request, init?: Object): Promise; -} - -interface Navigator { - /** - * Returns a ServiceWorkerContainer object, which provides access to - * registration, removal, upgrade, and communication with the ServiceWorker - * objects for the associated document. - */ - serviceWorker: ServiceWorkerContainer; -} - -interface Window extends ServiceWorkerGlobalScope { - caches: CacheStorage; -} - -interface NotificationEvent extends Event, ExtendableEvent { - notification: any; -} \ No newline at end of file From 9c55d70b9b91c4a7d95a0993313e9e5e8541890a Mon Sep 17 00:00:00 2001 From: tristancaron Date: Mon, 23 Mar 2015 20:26:39 +0100 Subject: [PATCH 0003/1506] Revert "Revert "Service Worker Api"" This reverts commit 8164f9d8b9123bf8c71f555276ef826d7a0a9d37. --- service_worker_api/service_worker_api-test.ts | 188 ++++ service_worker_api/service_worker_api.d.ts | 896 ++++++++++++++++++ 2 files changed, 1084 insertions(+) create mode 100644 service_worker_api/service_worker_api-test.ts create mode 100644 service_worker_api/service_worker_api.d.ts diff --git a/service_worker_api/service_worker_api-test.ts b/service_worker_api/service_worker_api-test.ts new file mode 100644 index 0000000000..67ce58cd40 --- /dev/null +++ b/service_worker_api/service_worker_api-test.ts @@ -0,0 +1,188 @@ +/// + +var OFFLINE_CACHE = "cache_test"; +var OFFLINE_URL = "localhost"; + +self.addEventListener('fetch', function(event: FetchEvent) { + if (event.request.method === 'GET' && + event.request.headers.get('accept').indexOf('text/html') !== -1) { + console.log('Handling fetch event for', event.request.url); + event.respondWith( + self.fetch(event.request).catch(function(e) { + console.error('Fetch failed; returning offline page instead.', e); + return self.caches.open(OFFLINE_CACHE).then(function(cache: Cache) { + return cache.match(OFFLINE_URL); + }); + }) + ); + } +}); + +self.caches.open('v1').then(function(cache: Cache) { + cache.matchAll('/images/').then(function(response: Array) { + response.forEach(function(element, index, array) { + cache.delete(element); + + }); + }); + +}); + +self.addEventListener('install', function(event: InstallEvent) { + event.waitUntil( + self.caches.open('v1').then(function(cache: Cache) { + return cache.add('/sw-test/index.html'); + }) + ); +}); + +self.addEventListener('install', function(event: InstallEvent) { + event.waitUntil( + self.caches.open('v1').then(function(cache) { + return cache.addAll( + '/sw-test/', + '/sw-test/index.html', + '/sw-test/style.css', + '/sw-test/app.js', + '/sw-test/image-list.js', + '/sw-test/star-wars-logo.jpg', + '/sw-test/gallery/', + '/sw-test/gallery/bountyHunters.jpg', + '/sw-test/gallery/myLittleVader.jpg', + '/sw-test/gallery/snowTroopers.jpg' + ); + }) + ); +}); + +self.addEventListener('fetch', function(event: FetchEvent) { + var cachedResponse = self.caches.match(event.request).catch(function() { + return self.fetch(event.request).then(function(response: Response) { + return self.caches.open('v1').then(function(cache) { + cache.put(event.request, response.clone()); + return response; + }); + }); + }).catch(function() { + return self.caches.match('/sw-test/gallery/myLittleVader.jpg'); + }); + + event.respondWith(cachedResponse); +}); + +self.caches.open('v1').then(function(cache) { + cache.match('/images/image.png').then(function(response) { + cache.delete(response); + }); +}); + +self.caches.open('v1').then(function(cache: Cache) { + cache.keys().then(function(response) { + response.forEach(function(element, index, array) { + cache.delete(element); + }); + }); +}); + +self.caches.has('v1').then(function() { + self.caches.delete('v1').then(function() { + + }); +}); + +self.addEventListener('activate', function(event: ExtendableEvent) { + var cacheWhitelist = ['v2']; + + event.waitUntil( + self.caches.keys().then(function(keyList) { + for(var i = 0; i < keyList.length; i++) { + if (cacheWhitelist.indexOf(keyList[i]) === -1) { + return self.caches.delete(keyList[i]); + } + } + }) + ); +}); + +function sendMessage(message) { + return new Promise(function(resolve, reject) { + var messageChannel = new MessageChannel(); + messageChannel.port1.onmessage = function(event) { + if (event.data.error) { + reject(event.data.error); + } else { + resolve(event.data); + } + }; + navigator.serviceWorker.controller.postMessage(message, [messageChannel.port2]); + }); +} + +self.clients.matchAll({type: "test"}).then(function(clients) { + for(var i = 0 ; i < clients.length ; i++) { + if(clients[i].url === 'index.html') { + self.clients.openWindow(clients[i].url); + // or do something else involving the matching client + } + } +}); + +self.addEventListener('activate', function(e: ExtendableEvent) { + e.waitUntil(self.clients.claim()); +}); + +navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(function(registration) { + // At this point, registration has taken place. + // The service worker will not handle requests until this page and any + // other instances of this page (in other tabs, etc.) have been + // closed/reloaded. + var serviceWorker; + if (registration.installing) { + serviceWorker = registration.installing; + } else if (registration.waiting) { + serviceWorker = registration.waiting; + } else if (registration.active) { + serviceWorker = registration.active; + } + if (serviceWorker) { + console.log(serviceWorker.state); + serviceWorker.addEventListener('statechange', function(e) { + console.log(e.target.state); + }); + } +}).catch(function(error) { + // Something went wrong during registration. The service-worker.js file + // might be unavailable or contain a syntax error. + +}); + +navigator.serviceWorker.getRegistration('/app').then(function(registration: ServiceWorkerRegistration) { + +}); + +navigator.serviceWorker.getRegistrations().then(function(registrations: Array) { + +}); + +self.registration.unregister(); + +self.addEventListener('install', function(event: ExtendableEvent) { + event.waitUntil(self.skipWaiting()); +}); + +self.addEventListener('notificationclick', function(event: NotificationEvent) { + console.log('On notification click: ', event.notification.tag); + event.notification.close(); + + // This looks to see if the current is already open and + // focuses if it is + event.waitUntil(self.clients.matchAll({ + type: "window" + }).then(function(clientList) { + for (var i = 0; i < clientList.length; i++) { + var client = clientList[i]; + } + if (self.clients.openWindow) + return self.clients.openWindow('/'); + })); +}); \ No newline at end of file diff --git a/service_worker_api/service_worker_api.d.ts b/service_worker_api/service_worker_api.d.ts new file mode 100644 index 0000000000..f9b2981463 --- /dev/null +++ b/service_worker_api/service_worker_api.d.ts @@ -0,0 +1,896 @@ +// Type definitions for service_worker_api +// Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API +// Definitions by: Tristan Caron +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +/** + * Provides methods relating to the body of the response/request, allowing you + * to declare what its content type is and how it should be handled. + */ +interface Body { + /** + * Contains a Boolean that indicates whether the body has been read. + * @readonly + */ + bodyUsed: boolean; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with an ArrayBuffer. + */ + arrayBuffer(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a Blob. + */ + blob(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a FormData object. + */ + formData(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a JSON object. + */ + json(): Promise; + + /** + * Takes a Response stream and reads it to completion. + * It returns a promise that resolves with a USVString (text). + */ + text(): Promise; + +} + +/** + * Represents response/request headers, allowing you to query them and take + * different actions depending on the results. + */ +interface Header { + new(): Header; + + /** + * Appends a new value onto an existing header inside a Headers object, or + * adds the header if it does not already exist. + * + * @param name The name of the HTTP header you want to add to the Headers + * object. + * @param value The value of the HTTP header you want to add. + */ + append(name: string, value: string): void; + + /** + * Deletes a header from a Headers object. + * + * @param name The name of the HTTP header you want to delete from the + * Headers object. + */ + delete(name: string): void; + + /** + * Returns the first value of a given header from within a Headers object. + * + * @param name The name of the HTTP header whose value you want to retrieve + * from the Headers object. If the given name is not the name of an + * HTTP header, this method throws a TypeError. + */ + get(name: string): string; + + /** + * Returns an array of all the values of a header within a Headers object + * with a given name. + * + * @param name The name of the HTTP header whose values you want to retrieve + * from the Headers object. If the given name is not the name of an + * HTTP header, this method throws a TypeError. + */ + getAll(name:string): Array; + + /** + * Returns a boolean stating whether a Headers object contains a + * certain header. + * + * @param name The name of the HTTP header you want to test for. If the + * given name is not the name of an HTTP header, this method throws + * a TypeError. + */ + has(name: string): boolean; + + /** + * Sets a new value for an existing header inside a Headers object, or + * adds the header if it does not already exist. + * + * @param name The name of the HTTP header you want to set to a new value. + * If the given name is not the name of an HTTP header, this method throws + * a TypeError. + * @param value The new value you want to set. + */ + set(name: string, value: string): void; +} + +/** + * Represents the response to a request. + */ +interface Response extends Body { + new(): Response; + + /** + * Contains the type of the response (e.g., basic, cors). + * @readonly + */ + type: string; + + /** + * Contains the URL of the response. + * @readonly + */ + url: string; + + /** + * Contains a boolean stating whether this is the final URL of the response. + */ + useFinalURL: boolean; + + /** + * Contains the status code of the response (e.g., 200 for a success). + * @readonly + */ + status: number; + + /** + * Contains a boolean stating whether the response was successful + * (status in the range 200-299) or not. + * @readonly + */ + ok: boolean; + + /** + * Contains the status message corresponding to the status code + * (e.g., OK for 200). + * @readonly + */ + statusText: string; + + /** + * Contains the Headers object associated with the response. + * @readonly + */ + headers: Header; + + /** + * Creates a clone of a Response object. + */ + clone(): Response; + + /** + * Returns a new Response object associated with a network error. + */ + error(): Response; + + /** + * Creates a new response with a different URL. + */ + redirect(): Response; +} + +/** + * Represents a resource request. + */ +interface Request extends Body { + new(): Request; + + /** + * Contains the request's method (GET, POST, etc.). + * @readonly + */ + method: string; + + /** + * Contains the URL of the request. + * @readonly + */ + url: string; + + /** + * Contains the associated Headers object of the request. + * @readonly + */ + headers: Header; + + /** + * Contains the context of the request (e.g., audio, image, iframe, etc.). + * @readonly + */ + context: string; + + /** + * Contains the referrer of the request (e.g., client). + * @readonly + */ + referrer: string; + + /** + * Contains the mode of the request (e.g., cors, no-cors, same-origin). + * @readonly + */ + mode: string; + + /** + * Contains the credentials of the request (e.g., omit, same-origin). + * @readonly + */ + credentials: string; + + /** + * Contains the cache mode of the request (e.g., default, reload, no-cache). + * @readonly + */ + cache: string; + + /** + * Creates a copy of the current Request object. + */ + clone(): Request; +} + +/** + * An CacheOptions object allowing you to set specific control options for the + * matching done in the match operation. + * + * @property [ignoreSearch] A Boolean that specifies whether the matching + * process should ignore the query string in the url. If set to true, + * the ?value=bar part of http://foo.com/?value=bar would be ignored when + * performing a match. It defaults to false. + * + * @property [ignoreMethod] A Boolean that, when set to true, prevents matching + * operations from validating the Request http method (normally only GET + * and HEAD are allowed.) It defaults to false. + * + * @property [ignoreVary] A Boolean that when set to true tells the matching + * operation not to perform VARY header matching — i.e. if the URL matches you + * will get a match regardless of the Response object having a VARY header or + * not. It defaults to false. + * + * @property [cacheName] A DOMString that represents a specific cache to search + * within. Note that this option is ignored by Cache.match(). + */ +interface CacheOptions { + ignoreSearch?: boolean; + ignoreMethod?: boolean; + ignoreVary?: boolean; + cacheName?: string; +} + +/** + * Represents the storage for Request / Response object pairs that are cached as + * part of the ServiceWorker life cycle. + */ +interface Cache { + /** + * Returns a Promise that resolves to the response associated with the first + * matching request in the Cache object. + * + * @param request The Request you are attempting to find in the Cache. + * @param {CacheOptions} options + */ + match(request: Request | string, options?: CacheOptions): Promise; + + /** + * Returns a Promise that resolves to an array of all matching requests in + * the Cache object. + * + * @param request The Request you are attempting to find in the Cache. + * @param {CacheOptions} options + */ + matchAll(request: Request | string, options?: CacheOptions): Promise>; + + /** + * Returns a Promise that resolves to a new Cache entry whose key + * is the request. + * + * @param request The Request you want to add to the cache. + */ + add(request: Request | string): Promise; + + /** + * Returns a Promise that resolves to a new array of Cache entries whose + * keys are the requests. + * + * @param request An array of Request objects you want to add to the cache. + */ + addAll(...request: Array): Promise; + + /** + * Adds additional key/value pairs to the current Cache object. + * + * @param request The Request you want to add to the cache. + * @param response The response you want to match up to the request. + */ + put(request: Request, response: Response): Promise; + + /** + * Finds the Cache entry whose key is the request, and if found, deletes the + * Cache entry and returns a Promise that resolves to true. If no Cache + * entry is found, it returns false. + * + * @param request The Request you are looking to delete. + * @param {CacheOptions} options + */ + delete(request: Request | string, options?: CacheOptions): Promise; + + /** + * Returns a Promise that resolves to an array of Cache keys. + * + * @param request The Request want to return, if a specific key is desired. + * @param {CacheOptions} options + */ + keys(request?: Request, options?: CacheOptions): Promise>; +} + +/** + * Represents the storage for Cache objects. It provides a master directory of + * all the named caches that a ServiceWorker can access and maintains a mapping + * of string names to corresponding Cache objects. + */ +interface CacheStorage { + /** + * Checks if a given Request is a key in any of the Cache objects that the + * CacheStorage object tracks and returns a Promise that resolves + * to that match. + * + * @param request The Request you are looking for a match for in the CacheStorage. + * @param {CacheOptions} options + */ + match(request: Request | string, options?: CacheOptions): Promise; + + /** + * Returns a Promise that resolves to true if a Cache object matching + * the cacheName exists. + * + * @param cacheName The Request you are looking for a match for in the + * CacheStorage. + */ + has(cacheName: string): Promise; + + /** + * Returns a Promise that resolves to the Cache object matching + * the cacheName. + * + * @param cacheName The name of the cache you want to open. + */ + open(cacheName: string): Promise; + + /** + * Finds the Cache object matching the cacheName, and if found, deletes the + * Cache object and returns a Promise that resolves to true. If no + * Cache object is found, it returns false. + * + * @param cacheName The name of the cache you want to delete. + */ + delete(cacheName: string): Promise; + + /** + * Returns a Promise that will resolve with an array containing strings + * corresponding to all of the named Cache objects tracked by the + * CacheStorage. Use this method to iterate over a list of all the + * Cache objects. + */ + keys(): Promise>; +} + +/** + * Represents the scope of a service worker client. A service worker client is + * either a document in a browser context or a SharedWorker, which is controlled + * by an active worker. + */ +interface ServiceWorkerClient { + /** + * Allows a service worker client to send a message to a ServiceWorker. + * + * @param message The message to send to the service worker. + * @param [transfer] A transferable object such as, for example, a reference + * to a port. + */ + postMessage(message: string, transfer?: Object): void; + + /** + * Indicates the type of browsing context of the current client. + * This value can be one of auxiliary, top-level, nested, or none. + * @readonly + */ + frameType: string; + + /** + * Returns the id of the Client object. + * @readonly + */ + id: string; + + /** + * The URL of the current service worker client. + * @readonly + */ + url: string; +} + +interface WindowClient extends ServiceWorkerClient { + /** + * Gives user input focus to the current client. + */ + focus(): Promise; + + /** + * A boolean that indicates whether the current client has focus. + * @readonly + */ + focused: boolean; + + /** + * Indicates the visibility of the current client. This value can be one of + * hidden, visible, prerender, or unloaded. + * @readonly + */ + visibilityState: string; +} + +interface ServiceWorkerClientsMatchOptions { + includeUncontrolled?: boolean; + type?: string; +} + +/** + * Represents a container for a list of Client objects; the main way to access + * the active service worker clients at the current origin. + */ +interface ServiceWorkerClients { + /** + * Gets a list of service worker clients and returns them in a Promise. + * Include the options parameter to return all service worker clients whose + * origin is the same as the associated service worker's origin. If options + * are not included, the method returns only the service worker clients + * controlled by the service worker. + * + * @param options + */ + matchAll(options: ServiceWorkerClientsMatchOptions): Promise>; + + /** + * Opens a service worker Client in a new browser window. + * + * @param url A string representing the URL of the client you want to open + * in the window. + */ + openWindow(url: string): Promise; + + /** + * Allows an active Service Worker to set itself as the active worker for a + * client page when the worker and the page are in the same scope. + */ + claim(): Promise; +} + +/** + * Extends the lifetime of the install and activate events dispatched on the + * ServiceWorkerGlobalScope as part of the service worker lifecycle. This + * ensures that any functional events (like FetchEvent) are not dispatched to + * the ServiceWorker until it upgrades database schemas, deletes outdated cache + * entries, etc. + */ +interface ExtendableEvent extends Event { + /** + * Extends the lifetime of the event. + * It is intended to be called in the install EventHandler for the + * installing worker and on the active EventHandler for the active worker. + * + * @param all + */ + waitUntil(all: any): any; +} + +/** + * The parameter passed into the ServiceWorkerGlobalScope.onfetch handler, + * FetchEvent represents a fetch action that is dispatched on the + * ServiceWorkerGlobalScope of a ServiceWorker. It contains information about + * the request and resulting response, and provides the FetchEvent.respondWith() + * method, which allows us to provide an arbitrary response back to the + * controlled page. + */ +interface FetchEvent extends Event { + /** + * Returns a Boolean that is true if the event was dispatched with the + * user's intention for the page to reload, and false otherwise. Typically, + * pressing the refresh button in a browser is a reload, while clicking a + * link and pressing the back button is not. + * @readonly + */ + isReload: boolean; + + /** + * Returns the Request that triggered the event handler. + * @readonly + */ + request: Request; + + /** + * Returns the Client that the current service worker is controlling. + * @readonly + */ + client: ServiceWorkerClient; + + /** + * Resolves by returning a Response or a network error to Fetch. + * + * @param any + */ + respondWith(any): Response; +} + +/** + * Represents a service worker. Multiple browsing contexts (e.g. pages, workers, + * etc.) can be associated with the same ServiceWorker object. + */ +interface ServiceWorker extends Worker { + /** + * Returns the ServiceWorker serialized script URL defined as part of + * ServiceWorkerRegistration. The URL must be on the same origin as the + * document that registers the ServiceWorker. + * @readonly + */ + scriptURL: string; + + /** + * Returns the state of the service worker. It returns one of the following + * values: installing, installed, activating, activated, or redundant. + * @readonly + */ + state: string; + + /** + * An EventListener property called whenever an event of type statechange + * is fired; it is basically fired anytime the ServiceWorker.state changes. + * + * @param [statechangeevent] + */ + onstatechange: (statechangeevent?: Event) => void; +} + +/** + * The PushSubscription interface provides a subcription's URL endpoint and + * subscription ID. + */ +interface PushSubscription { + /** + * The endpoint associated with the push subscription. + * @readonly + */ + endpoint: any; + + /** + * The subscription ID associated with the push subscription. + * @readonly + */ + subscriptionId: any; +} + +/** + * The PushManager interface provides a way to receive notifications from + * third-party servers as well as request URLs for push notifications. + * This interface has replaced functionality offered by the obsolete + * PushRegistrationManager. + */ +interface PushManager { + /** + * Returns a promise that resolves to a PushSubscription with details of a + * new push subscription. + */ + subscribe(): Promise; + + /** + * Returns a promise that resolves to a PushSubscription details of + * the retrieved push subscription. + */ + getSubscription(): Promise; + + /** + * Returns a promise that resolves to the PushPermissionStatus of the + * requesting webapp, which will be one of granted, denied, or default. + */ + hasPermission(): Promise; +} + +/** + * Represents a service worker registration. + */ +interface ServiceWorkerRegistration extends EventTarget { + /** + * Returns a unique identifier for a service worker registration. + * This must be on the same origin as the document that registers + * the ServiceWorker. + * @readonly + */ + scope: any; + + /** + * Returns a service worker whose state is installing. This is initially + * set to null. + * @readonly + */ + installing: ServiceWorker; + + /** + * Returns a service worker whose state is installed. This is initially + * set to null. + * @readonly + */ + waiting: ServiceWorker; + + /** + * Returns a service worker whose state is either activating or activated. + * This is initially set to null. An active worker will control a + * ServiceWorkerClient if the client's URL falls within the scope of the + * registration (the scope option set when ServiceWorkerContainer.register + * is first called). + * @readonly + */ + active: ServiceWorker; + + /** + * Returns an interface to for managing push subscriptions, including + * subcribing, getting an anctive subscription, and accessing push + * permission status. + * @readonly + */ + pushManager: PushManager; + + /** + * An EventListener property called whenever an event of type updatefound + * is fired; it is fired any time the ServiceWorkerRegistration.installing + * property acquires a new service worker. + */ + onupdatefound: () => void; + + /** + * Allows you to update a service worker. + */ + update(); + + /** + * Unregisters the service worker registration and returns a promise + * (see Promise). The service worker will finish any ongoing operations + * before it is unregistered. + */ + unregister(): Promise; +} + +interface ServiceWorkerRegisterOptions { + scope: string; +} + +/** + * Provides an object representing the service worker as an overall unit in the + * network ecosystem, including facilities to register, unregister and update + * service workers, and access the state of service workers + * and their registrations. + */ +interface ServiceWorkerContainer { + /** + * Returns a ServiceWorker object if its state is activated (the same object + * returned by ServiceWorkerRegistration.active). This property returns null + * if the request is a force refresh (Shift + refresh) or if there is no + * active worker. + * @readonly + */ + controller: ServiceWorker; + + /** + * Defines whether a service worker is ready to control a page or not. + * It returns a Promise that will never reject, which resolves to a + * ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker. + * @readonly + */ + ready: Promise; + + /** + * An event handler fired whenever a controllerchange event occurs — when + * the document's associated ServiceWorkerRegistration acquires a new + * ServiceWorkerRegistration.active worker. + * + * @param [controllerchangeevent] + */ + oncontrollerchange: (controllerchangeevent?: Event) => void; + + /** + * An event handler fired whenever an error event occurs in the associated + * service workers. + * + * @param [errorevent] + */ + onerror: (errorevent?: ErrorEvent) => void; + + /** + * An event handler fired whenever a message event occurs — when incoming + * messages are received to the ServiceWorkerContainer object (e.g. via a + * MessagePort.postMessage() call.) + * + * @param [messageevent] + */ + onmessage: (messageevent?: MessageEvent) => void; + + /** + * Creates or updates a ServiceWorkerRegistration for the given scriptURL. + * + * @param scriptURL The URL of the service worker script. + * @param [options] An options object to provide options upon registration. + * Currently available options are: scope: A USVString representing a URL + * that defines a service worker's registration scope; what range of URLs a + * service worker can control. This is usually a relative URL, and it + * defaults to '/' when not specified. + */ + register(scriptURL: string, options?: ServiceWorkerRegisterOptions): Promise; + + /** + * Gets a ServiceWorkerRegistration object whose scope URL matches the + * provided document URL. If the method can't return a + * ServiceWorkerRegistration, it returns a Promise. + * + * @param [scope] A unique identifier for a service worker registration — the + * scope URL of the registration object you want to return. This is usually + * a relative URL. + */ + getRegistration(scope?: string): Promise; + + /** + * Returns all ServiceWorkerRegistrations associated with a + * ServiceWorkerContainer in an array. If the method can't return + * ServiceWorkerRegistrations, it returns a Promise. + */ + getRegistrations(): Promise>; +} + +/** + * The parameter passed into the oninstall handler, the InstallEvent interface + * represents an install action that is dispatched on the + * ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent, + * it ensures that functional events such as FetchEvent are not dispatched + * during installation. + */ +interface InstallEvent extends ExtendableEvent { + /** + * Returns the ServiceWorker that is currently actively controlling the page. + * @readonly + */ + activeWorker: ServiceWorker; +} + +interface ServiceWorkerGlobalScope { + /** + * Contains the Clients object associated with the service worker. + * @readonly + */ + clients: ServiceWorkerClients; + + /** + * Contains the ServiceWorkerRegistration object that represents the + * service worker's registration. + * @readonly + */ + registration: ServiceWorkerRegistration; + + /** + * An event handler fired whenever an activate event occurs — when a + * ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active + * worker. + * + * @param [activateevent] + */ + onactivate: (activateevent?: ExtendableEvent) => void; + + /** + * Not defined in the spec yet, but it looks like this will be fired when + * the device is nearly out of storage space, prompting the UA to start + * claiming back some space from web apps that are using client-side storage, + * and the current app is targeted. + * + * @param [beforeevictedevent] + */ + onbeforeevicted: (beforeevictedevent?: Event) => void; + + /** + * Not defined in the spec yet, but it looks like this will be fired when + * the device is out of storage space, and the UA claims back some space + * from the current app. + * + * @param [evictedevent] + */ + onevicted: (evictedevent?: Event) => void; + + /** + * An event handler fired whenever a fetch event occurs — when a fetch() + * is called. + * + * @param [fetchevent] + */ + onfetch: (fetchevent?: FetchEvent) => void; + + /** + * An event handler fired whenever an install event occurs — when a + * ServiceWorkerRegistration acquires a new + * ServiceWorkerRegistration.installing worker. + * + * @param [installevent] + */ + oninstall: (installevent?: InstallEvent) => void; + + /** + * An event handler fired whenever a message event occurs — when incoming + * messages are received. Controlled pages can use the + * MessagePort.postMessage() method to send messages to service workers. + * The service worker can optionally send a response back via the + * MessagePort exposed in event.data.port, corresponding to the controlled + * page. + * + * @param [messageevent] + */ + onmessage: (messageevent?: MessageEvent) => void; + + /** + * An event handler fired whenever a notificationclick event occurs — when + * a user clicks on a displayed notification. + * + * @param [notificationclickevent] + */ + onnotificationclick: (notificationclickevent?: NotificationEvent) => void; + + /** + * An event handler fired whenever a push event occurs — when a server + * push notification is received. + * + * @param [onpushevent] + */ + onpush: (onpushevent?: Event) => void; + + /** + * An event handler fired whenever a pushsubscriptionchange event occurs — + * when a push subscription has been invalidated, or is about to be + * invalidated (e.g. when a push service sets an expiration time). + * + * @param [pushsubscriptionchangeevent] + */ + onpushsubscriptionchange: (pushsubscriptionchangeevent?: Event) => void; + + /** + * Allows the current service worker registration to progress from waiting + * to active state while service worker clients are using it. + */ + skipWaiting(): Promise; + + /** + * TODO GlobalFetch + * @param url + * @param init + */ + fetch(url: string | Request, init?: Object): Promise; +} + +interface Navigator { + /** + * Returns a ServiceWorkerContainer object, which provides access to + * registration, removal, upgrade, and communication with the ServiceWorker + * objects for the associated document. + */ + serviceWorker: ServiceWorkerContainer; +} + +interface Window extends ServiceWorkerGlobalScope { + caches: CacheStorage; +} + +interface NotificationEvent extends Event, ExtendableEvent { + notification: any; +} \ No newline at end of file From 1e6428c3474fa9174a1d218be30ac350e0a48f6e Mon Sep 17 00:00:00 2001 From: tristancaron Date: Mon, 23 Mar 2015 21:10:09 +0100 Subject: [PATCH 0004/1506] Service Worker API --- service_worker_api/service_worker_api-test.ts | 6 +++--- service_worker_api/service_worker_api.d.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/service_worker_api/service_worker_api-test.ts b/service_worker_api/service_worker_api-test.ts index 67ce58cd40..a28446a382 100644 --- a/service_worker_api/service_worker_api-test.ts +++ b/service_worker_api/service_worker_api-test.ts @@ -104,7 +104,7 @@ self.addEventListener('activate', function(event: ExtendableEvent) { ); }); -function sendMessage(message) { +function sendMessage(message: string) { return new Promise(function(resolve, reject) { var messageChannel = new MessageChannel(); messageChannel.port1.onmessage = function(event) { @@ -136,7 +136,7 @@ navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(functi // The service worker will not handle requests until this page and any // other instances of this page (in other tabs, etc.) have been // closed/reloaded. - var serviceWorker; + var serviceWorker: ServiceWorkerRegistration; if (registration.installing) { serviceWorker = registration.installing; } else if (registration.waiting) { @@ -146,7 +146,7 @@ navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(functi } if (serviceWorker) { console.log(serviceWorker.state); - serviceWorker.addEventListener('statechange', function(e) { + serviceWorker.addEventListener('statechange', function(e: Event) { console.log(e.target.state); }); } diff --git a/service_worker_api/service_worker_api.d.ts b/service_worker_api/service_worker_api.d.ts index f9b2981463..3851d0ec10 100644 --- a/service_worker_api/service_worker_api.d.ts +++ b/service_worker_api/service_worker_api.d.ts @@ -1,6 +1,6 @@ // Type definitions for service_worker_api // Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API -// Definitions by: Tristan Caron +// Definitions by: Tristan Caron // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -526,9 +526,9 @@ interface FetchEvent extends Event { /** * Resolves by returning a Response or a network error to Fetch. * - * @param any + * @param all */ - respondWith(any): Response; + respondWith(all: any): Response; } /** @@ -658,7 +658,7 @@ interface ServiceWorkerRegistration extends EventTarget { /** * Allows you to update a service worker. */ - update(); + update(): void; /** * Unregisters the service worker registration and returns a promise From d12ab0b655fbe42f35d257773fb23219d608d252 Mon Sep 17 00:00:00 2001 From: tristancaron Date: Mon, 23 Mar 2015 21:19:54 +0100 Subject: [PATCH 0005/1506] Service Worker API --- service_worker_api/service_worker_api-test.ts | 4 ++-- service_worker_api/service_worker_api.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service_worker_api/service_worker_api-test.ts b/service_worker_api/service_worker_api-test.ts index a28446a382..e144880ba1 100644 --- a/service_worker_api/service_worker_api-test.ts +++ b/service_worker_api/service_worker_api-test.ts @@ -136,7 +136,7 @@ navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(functi // The service worker will not handle requests until this page and any // other instances of this page (in other tabs, etc.) have been // closed/reloaded. - var serviceWorker: ServiceWorkerRegistration; + var serviceWorker: ServiceWorker; if (registration.installing) { serviceWorker = registration.installing; } else if (registration.waiting) { @@ -146,7 +146,7 @@ navigator.serviceWorker.register('service-worker.js', {scope: './'}).then(functi } if (serviceWorker) { console.log(serviceWorker.state); - serviceWorker.addEventListener('statechange', function(e: Event) { + serviceWorker.addEventListener('statechange', function(e: any) { console.log(e.target.state); }); } diff --git a/service_worker_api/service_worker_api.d.ts b/service_worker_api/service_worker_api.d.ts index 3851d0ec10..77c80b6706 100644 --- a/service_worker_api/service_worker_api.d.ts +++ b/service_worker_api/service_worker_api.d.ts @@ -557,7 +557,7 @@ interface ServiceWorker extends Worker { * * @param [statechangeevent] */ - onstatechange: (statechangeevent?: Event) => void; + onstatechange: (statechangeevent?: any) => void; } /** From 3405f194a1f2c11e68d524971ab98591648067a5 Mon Sep 17 00:00:00 2001 From: bryn austin bellomy Date: Sat, 25 Apr 2015 20:00:43 -0500 Subject: [PATCH 0006/1506] adding cliff module --- cliff/cliff.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cliff/cliff.d.ts diff --git a/cliff/cliff.d.ts b/cliff/cliff.d.ts new file mode 100644 index 0000000000..e0db79c986 --- /dev/null +++ b/cliff/cliff.d.ts @@ -0,0 +1,14 @@ +// Type definitions for cliff 0.1.10 +// Project: https://github.com/flatiron/cliff +// Definitions by: bryn austin bellomy +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +declare module "cliff" { + export function inspect(obj:any): string; + export function stringifyRows(rows:string[][], colors?:string[]): string; + export function stringifyObjectRows(rows:Array<{}>, keys:string[], colors?:string[]): string; + export function putRows(level:string, rows:string[][], colors?:string[]): void; + export function putObjectRows(level:string, rows:Array<{}>, keys:string[], colors?:string[]): void; + export function putObject(level:string, object:any, rewriters?:any, padding?:any): void; +} From 4be08db681656d8a5e00d3c02e02c2bd9c8f452f Mon Sep 17 00:00:00 2001 From: bryn austin bellomy Date: Sat, 25 Apr 2015 20:01:25 -0500 Subject: [PATCH 0007/1506] adding blessed module --- blessed/blessed.d.ts | 1269 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1269 insertions(+) create mode 100644 blessed/blessed.d.ts diff --git a/blessed/blessed.d.ts b/blessed/blessed.d.ts new file mode 100644 index 0000000000..6746afe5f5 --- /dev/null +++ b/blessed/blessed.d.ts @@ -0,0 +1,1269 @@ +// Type definitions for blessed 0.1.5 +// Project: https://github.com/chjj/blessed +// Definitions by: bryn austin bellomy +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "blessed" +{ + import events = require('events'); + import buffer = require('buffer'); + import child_process = require('child_process'); + + module Blessed + { + export var colors: Colors; + + export interface GenericCallback { + (...args:any[]): void; + } + + export interface ColorPair { + /** background, must be number (-1 for default). */ + bg?: number; + /** foreground, must be number (-1 for default). */ + fg?: number; + } + + export interface Style extends ColorPair { + bold?: boolean; + underline?: boolean; + border: Border; + hover: ColorPair; + } + + export interface Border extends ColorPair { + /** type of border ('line' or 'bg'). */ + type?: string; //'line'|'bg'; + /** character to use if bg type, default is space. */ + ch?: string; + } + + export interface Padding { + top?:number; + right?:number; + bottom?:number; + left?:number; + } + + export interface Position { + /** offsets of the element relative to its parent. can be a number, percentage (0-100%), or keyword (center). right and bottom do not accept keywords. */ + top?:number|string; + /** offsets of the element relative to its parent. can be a number, percentage (0-100%), or keyword (center). right and bottom do not accept keywords. */ + right?:number|string; + /** offsets of the element relative to its parent. can be a number, percentage (0-100%), or keyword (center). right and bottom do not accept keywords. */ + bottom?:number|string; + /** offsets of the element relative to its parent. can be a number, percentage (0-100%), or keyword (center). right and bottom do not accept keywords. */ + left?:number|string; + /** width of the element, can be a number, percentage (0-100%), or keyword (half or shrink). */ + width?:number|string; + /** height of the element, can be a number, percentage (0-100%), or keyword (half or shrink). */ + height?:number|string; + } + + export interface KeyCode { + name: string; + ctrl: boolean; + meta: boolean; + shift: boolean; + sequence: string; + full: string; + } + + export class Program + { + /** + Wrap the given text in terminal formatting codes corresponding to the given attribute + name. The `attr` string can be of the form `red fg` or `52 bg` where `52` is a 0-255 + integer color number. + */ + text (text:string, attr:string): string; + } + + export interface Colors { + /** Either pass a hex string, an array of 3 numbers, or three separate numbers representing an RGB value. This returns the 0-255 color number for that color. */ + match (r:string|number[]|number, g?:number, b?:number): number; + + /** An array of the 255 colors as hex strings. */ + colors: string[]; + } + + export interface NodeOptions + { + screen?: Screen; + parent?: Node; + children?: Node[]; + } + + export class Node extends events.EventEmitter + { + constructor(options?:NodeOptions); + + type : string; + options : NodeOptions; + parent : Node; + screen : Screen; + children : Node[]; + data : any; + _ : any; + $ : any; + index : number; + + // on(event:string, callback:() => void); + // on(event:'adopt', callback:() => void); + // on(event:'remove', callback:() => void); + // on(event:'reparent', callback:() => void); + // on(event:'attach', callback:() => void); + // on(event:'detach', callback:() => void); + + prepend(node:Node): void; + append(node:Node): void; + remove(node:Node): void; + insert(node:Node, index:number): void; + insertBefore(node:Node, refNode:Node): void; + insertAfter(node:Node, refNode:Node): void; + detach(): void; + // emitDescendants(): void; + // get(key:string): any; + // get(key:string, default:any): any; + // set(key:string, value:any): void; + } + + export interface ScreenOptions extends NodeOptions + { + /** the blessed Program to be associated with. will be automatically instantiated if none is provided. */ + program?: any; + /** attempt to perform CSR optimization on all possible elements (not just full-width ones, elements with uniform cells to their sides). this is known to cause flickering with elements that are not full-width, however, it is more optimal for terminal rendering. */ + smartCSR?: boolean; + /** do CSR on any element within 20 cols of the screen edge on either side. faster than smartCSR, but may cause flickering depending on what is on each side of the element. */ + fastCSR?: boolean; + /** attempt to perform back_color_erase optimizations for terminals that support it. it will also work with terminals that don't support it, but only on lines with the default background color. as it stands with the current implementation, it's uncertain how much terminal performance this adds at the cost of overhead within node. */ + useBCE?: boolean; + /** amount of time (in ms) to redraw the screen after the terminal is resized (default: 300). */ + resizeTimeout?: number; + /** the width of tabs within an element's content. */ + tabSize?: number; + /** automatically position child elements with border and padding in mind. */ + autoPadding?: boolean; + /** the name of the logfile to use. if specified but the file does not exist, it will be created. see log method. */ + log?: string; + /** dump all output and input to desired file. can be used together with log option if set as a boolean. */ + dump?: any; + /** debug mode. enables usage of the `debug` method. also creates a debug console which will display when pressing F12. it will display all log and debug messages. */ + debug?: boolean; + /** Array of keys in their full format (e.g. C-c) to ignore when keys are locked. Useful for creating a key that will always exit no matter whether the keys are locked. */ + ignoreLocked?: string[]; + + /** Do not clear the screen, only scroll down enough to make room for the elements on the screen. do not use the alternate screenbuffer. useful for writing a CLI tool or some kind of prompt (experimental - see test/widget-noalt.js) */ + noAlt?: boolean; + + /** Options for the cursor. */ + cursor?: CursorOptions; + } + + export interface CursorOptions { + /** have blessed draw a custom cursor and hide the terminal cursor (experimental). */ + artificial?: boolean; + /** shape of the artificial cursor. can be: block, underline, or line. */ + shape?: string; //'block'|'underline'|'line'; + /** whether the artificial cursor blinks. */ + blink?: boolean; + /** color of the artificial cursor. accepts any valid color value (null is default). */ + color?: string; + } + + export interface ScreenEventCallback { + (character:string, keyCode:KeyCode): void; + } + + export class Screen extends Node + { + constructor(options?:ScreenOptions); + + /** the blessed Program object. */ + program: any; + /** the blessed Tput object (only available if you passed tput: true to the Program constructor.) */ + tput: any; + /** top of the focus history stack. */ + focused: any; + /** width of the screen (same as program.cols). */ + width: number; + /** height of the screen (same as program.rows). */ + height: number; + /** same as screen.width. */ + cols: number; + /** same as screen.height. */ + rows: number; + + /** calculated relative left offset. */ + left: number; + /** calculated relative right offset. */ + right: number; + /** calculated relative top offset. */ + top: number; + /** calculated relative bottom offset. */ + bottom: number; + /** calculated absolute left offset. */ + aleft: number; + /** calculated absolute right offset. */ + aright: number; + /** calculated absolute top offset. */ + atop: number; + /** calculated absolute bottom offset. */ + abottom: number; + + + /** whether the focused element grabs all keypresses. */ + grabKeys: boolean; + /** prevent keypresses from being received by any element. */ + lockKeys: boolean; + /** the currently hovered element. only set if mouse events are bound. */ + hover: Element; + /** set or get window title. */ + title: string; + + /** write string to the log file if one was created. */ + log(...msg:any[]): void; + /** same as the log method, but only gets called if the debug option was set. */ + debug(...msg:string[]): void; + /** allocate a new pending screen buffer and a new output screen buffer. */ + alloc(): void; + /** draw the screen based on the contents of the screen buffer. */ + draw(start:number, end:number): void; + /** render all child elements, writing all data to the screen buffer and drawing the screen. */ + render(): void; + /** clear any region on the screen. */ + clearRegion(x1:number, x2:number, y1:number, y2:number): void; + /** fill any region with a character of a certain attribute. */ + fillRegion(attr:number, ch:string, x1:number, x2:number, y1:number, y2:number): void; + /** focus element by offset of focusable elements. */ + focusOffset(offset:number): void; + /** focus previous element in the index. */ + focusPrevious(): void; + /** focus next element in the index. */ + focusNext(): void; + /** push element on the focus stack (equivalent to screen.focused = el). */ + focusPush(element:Element): void; + /** pop element off the focus stack. */ + focusPop(): void; + /** save the focused element. */ + saveFocus(): void; + /** restore the saved focused element. */ + restoreFocus(): void; + /** "rewind" focus to the last visible and attached element. */ + rewindFocus(): void; + /** bind a keypress listener for a specific key. */ + key(keyEvents:string|string[], callback:ScreenEventCallback): void; + /** bind a keypress listener for a specific key once. */ + onceKey(keyEvents:string|string[], callback:ScreenEventCallback): void; + /** remove a keypress listener for a specific key. */ + unkey(name:string, listener:ScreenEventCallback): void; + /** spawn a process in the foreground, return to blessed app after exit. */ + spawn(file:string, args:string[], options:NodeChildProcessExecOptions): child_process.ChildProcess; + /** spawn a process in the foreground, return to blessed app after exit. executes callback on error or exit. */ + exec(file:string, args:string[], options:NodeChildProcessExecOptions, callback:GenericCallback): child_process.ChildProcess; + /** read data from text editor. */ + readEditor(options:{}, callback:GenericCallback): void; + /** set effects based on two events and attributes. */ + setEffects(el:Element, fel:Element, over:string, out:string, effects:Style, temp?:string): void; + /** insert a line into the screen (using csr: this bypasses the output buffer). */ + insertLine(n:number, y:number, top:number, bottom:number): void; + /** delete a line from the screen (using csr: this bypasses the output buffer). */ + deleteLine(n:number, y:number, top:number, bottom:number): void; + /** insert a line at the bottom of the screen. */ + insertBottom(top:number, bottom:number): void; + /** insert a line at the top of the screen. */ + insertTop(top:number, bottom:number): void; + /** delete a line at the bottom of the screen. */ + deleteBottom(top:number, bottom:number): void; + /** delete a line at the top of the screen. */ + deleteTop(top:number, bottom:number): void; + + /** enable mouse events for the screen and optionally an element (automatically called when a form of on('mouse') is bound). */ + enableMouse(el?:Element): void; + /** enable keypress events for the screen and optionally an element (automatically called when a form of on('keypress') is bound). */ + enableKeys(el?:Element): void; + /** enable key and mouse events. calls bot enableMouse and enableKeys. */ + enableInput(el?:Element): void; + + /** attempt to copy text to clipboard using iTerm2's propriety sequence. returns true if successful. */ + copyToClipboard(text:string): boolean; + /** attempt to change cursor shape. will not work in all terminals (see artificial cursors for a solution to this). returns true if successful. */ + cursorShape(shape:string, blink:boolean): boolean; + /** attempt to change cursor color. returns true if successful. */ + cursorColor(color: string): boolean; + /** attempt to reset cursor. returns true if successful. */ + cursorReset(): boolean; + + } + + export interface ElementOptions extends NodeOptions + { + fg?: string; + bg?: string; + scrollbar?: ColorPair; + focus?: Style; + hover?: Style; + + /** border object, see below. */ + border?: Border; + /** positioning options. */ + position?: Position; + /** amount of padding on the inside of the element. can be a number or an object containing the properties: left, right, top, and bottom. */ + padding?: number|Padding; + /** element's text content. */ + content?: string; + /** element is clickable. */ + clickable?: boolean; + /** element is focusable and can receive key input. */ + input?: boolean; + /** element is focused. */ + focused?: boolean; + /** whether the element is hidden. */ + hidden?: boolean; + /** a simple text label for the element. */ + label?: string; + /** a floating text label for the element which appears on mouseover. */ + hoverText?: string; + /** text alignment: left, center, or right. */ + align?: string; + /** vertical text alignment: top, middle, or bottom. */ + valign?: string; + /** shrink/flex/grow to content and child elements. width/height during render. */ + shrink?: any; + /** width of the element, can be a number, percentage (0-100%), or keyword (half or shrink). */ + width?: number|string; + /** height of the element, can be a number, percentage (0-100%), or keyword (half or shrink). */ + height?: number|string; + /** whether the element is scrollable or not. */ + scrollable?: boolean; + /** background character (default is whitespace ). */ + ch?: string; + /** allow the element to be dragged with the mouse. */ + draggable?: boolean; + } + + export class Element extends Node + { + constructor(options?:ElementOptions); + + /** name of the element. useful for form submission. */ + name: string; + /** border object. */ + border: Border; + /** contains attributes (e.g. fg/bg/underline). see above. */ + style: Style; + /** raw width, height, and offsets. */ + position: Position; + /** type of border (line or bg). bg by default. */ + type: string; //'line'|'bg'; + /** character to use if bg type, default is space. */ + ch: string; + /** raw text content. */ + content: string; + /** whether the element is hidden or not. */ + hidden: boolean; + /** whether the element is visible or not. */ + visible: boolean; + /** whether the element is attached to a screen in its ancestry somewhere. */ + detached: boolean; + /** calculated width. */ + width: number; + /** calculated height. */ + height: number; + /** whether the element is draggable. set to true to allow dragging. */ + draggable: boolean; + + + + /** calculated relative left offset. */ + left: number; + /** calculated relative right offset. */ + right: number; + /** calculated relative top offset. */ + top: number; + /** calculated relative bottom offset. */ + bottom: number; + /** calculated absolute left offset. */ + aleft: number; + /** calculated absolute right offset. */ + aright: number; + /** calculated absolute top offset. */ + atop: number; + /** calculated absolute bottom offset. */ + abottom: number; + + + /** write content and children to the screen buffer. */ + render(): void; + /** hide element. */ + hide(): void; + /** show element. */ + show(): void; + /** toggle hidden/shown. */ + toggle(): void; + /** focus element. */ + focus(): void; + /** bind a keypress listener for a specific key. */ + key(name:string|string[], listener:(character?:any, keyCode?:any) => void): void; + /** bind a keypress listener for a specific key once. */ + onceKey(name:string, listener:() => void): void; + /** remove a keypress listener for a specific key. */ + unkey(name:string, listener:() => void): void; + /** same as el.on('screen', ...) except this will automatically cleanup listeners after the element is detached. */ + onScreenEvent(event:string, listener:(...args:any[]) => void): void; + /** set the z-index of the element (changes rendering order). */ + setIndex(z:number): void; + /** put the element in front of its siblings. */ + setFront(): void; + /** put the element in back of its siblings. */ + setBack(): void; + /** set the label text for the top-left corner. example options: {text:'foo',side:'left'} */ + setLabel(textOrOptions:string|{}): void; + /** remove the label completely. */ + removeLabel(): void; + /** set the hover text for the bottom-right corner. example options: {text:'foo'} */ + setHover(textOrOptions:string|{}): void; + /** remove the hover label completely. */ + removeHover(): void; + /** set the content. note: when text is input, it will be stripped of all non-SGR escape codes, tabs will be replaced with 8 spaces, and tags will be replaced with SGR codes (if enabled). */ + setContent(text:string): void; + /** return content, slightly different from el.content. assume the above formatting. */ + getContent(): void; + /** similar to setContent, but ignore tags and remove escape codes. */ + setText(text:string): void; + /** similar to getContent, but return content with tags and escape codes removed. */ + getText(): void; + /** insert a line into the box's content. */ + insertLine(index:number, lines:string|string[]): void; + /** delete a line from the box's content. */ + deleteLine(index:number, numLines:number): void; + /** get a line from the box's content. */ + getLine(index:number): void; + /** get a line from the box's content from the visible top. */ + getBaseLine(index:number): void; + /** set a line in the box's content. */ + setLine(index:number, line:string): void; + /** set a line in the box's content from the visible top. */ + setBaseLine(index:number, line:string): void; + /** clear a line from the box's content. */ + clearLine(index:number): void; + /** clear a line from the box's content from the visible top. */ + clearBaseLine(index:number): void; + /** insert a line at the top of the box. */ + insertTop(lines:string|string[]): void; + /** insert a line at the bottom of the box. */ + insertBottom(lines:string|string[]): void; + /** delete a line at the top of the box. */ + deleteTop(): void; + /** delete a line at the bottom of the box. */ + deleteBottom(): void; + /** unshift a line onto the top of the content. */ + unshiftLine(lines:string|string[]): void; + /** shift a line off the top of the content. */ + shiftLine(index:number): void; + /** push a line onto the bottom of the content. */ + pushLine(lines:string|string[]): void; + /** pop a line off the bottom of the content. */ + popLine(index:number): void; + /** an array containing the content lines. */ + getLines(): void; + /** an array containing the lines as they are displayed on the screen. */ + getScreenLines(): void; + /** get a string's real length, taking into account tags. */ + textLength(text:string): number; + + /** enable dragging of the element. */ + enableDrag(): void; + /** disable dragging of the element. */ + disableDrag(): void; + } + + + // + // Box + // + + export interface BoxOptions extends ElementOptions { + // intentionally empty + } + + export class Box extends Element { + constructor(options?:BoxOptions); + // intentionally empty + } + + + // + // ScrollableBox + // + + export interface ScrollableBoxOptions extends BoxOptions { + /** a limit to the childBase. default is `Infinity`. */ + baseLimit: number; + /** a option which causes the ignoring of `childOffset`. this in turn causes the childBase to change every time the element is scrolled. */ + alwaysScroll: boolean; + /** object enabling a scrollbar. */ + scrollbar: ScrollBar; + } + + /** A box with scrollable content. */ + export class ScrollableBox extends Box { + constructor(options?:ScrollableBoxOptions); + + /** the offset of the top of the scroll content. */ + childBase: number; + /** the offset of the chosen item/line. */ + childOffset: number; + /** scroll the content by a relative offset. */ + scroll(offset:number): void; + /** scroll the content to an absolute index. */ + scrollTo(index:number): void; + /** same as `scrollTo`. */ + setScroll(index:number): void; + /** set the current scroll index in percentage (0-100). */ + setScrollPerc(perc:number): void; + /** get the current scroll index in lines. */ + getScroll(): number; + /** get the actual height of the scrolling area. */ + getScrollHeight(): number; + /** get the current scroll index in percentage. */ + getScrollPerc(): number; + /** reset the scroll index to its initial state. */ + resetScroll(): void; + + } + + export interface ScrollBar { + /** style of the scrollbar. */ + style: Style; + /** style of the scrollbar track if present (takes regular style options). */ + track: Style; + } + + + // + // ScrollableText + // + + export interface ScrollableTextOptions extends ScrollableBoxOptions { + /** whether to enable automatic mouse support for this element. */ + mouse: boolean; + /** use predefined keys for navigating the text. */ + keys: boolean; + /** use vi keys with the `keys` option. */ + vi: boolean; + } + + /** __DEPRECATED__ - Use Box with the `scrollable` and `alwaysScroll` options instead. A scrollable text box which can display and scroll text, as well as handle pre-existing newlines and escape codes. */ + export class ScrollableText extends ScrollableBox { + constructor(options?:ScrollableTextOptions); + } + + + + // + // Text + // + + export interface TextOptions extends ElementOptions { + align?: string; //'left'|'center'|'right'; + } + + export class Text extends Element { + constructor(options?:TextOptions); + // intentionally empty + } + + + // + // Line + // + + export interface LineOptions extends BoxOptions { + orientation?: string; //'vertical'|'horizontal'; + style?: Style; + } + + export class Line extends Box { + constructor(options?:LineOptions); + // intentionally empty + } + + + // + // List + // + + export interface ListStyle extends Style { + selected?: Style; + item?: Style; + } + + export interface ListOptions extends BoxOptions + { + style?: ListStyle; + + /** whether to automatically enable mouse support for this list (allows clicking items). */ + mouse?: boolean; + /** use predefined keys for navigating the list. */ + keys?: any; + /** use vi keys with the keys option. */ + vi?: boolean; + /** an array of strings which become the list's items. */ + items?: string[]; + /** a function that is called when vi mode is enabled and the key / is pressed. This function accepts a callback function which should be called with the search string. The search string is then used to jump to an item that is found in items. */ + search?: (callback:(searchString:string) => void) => void; + /** whether the list is interactive and can have items selected (default: true). */ + interactive?: boolean; + } + + export class List extends Box + { + constructor(options?:ListOptions); + + /** The text of the currently selected item. */ + value:string; + /** The items in the list. */ + items:string[]; + /** The items in the list. */ + ritems:string[]; + /** The index of the current selection. */ + selected:number; + + /** add an item based on a string. */ + addItem(text:string): void; + /** returns the item index from the list. child can be an element, index, or string. */ + getItemIndex(child:Element|number|string): void; + /** returns the item element. child can be an element, index, or string. */ + getItem(child:Element|number|string): void; + /** removes an item from the list. child can be an element, index, or string. */ + removeItem(child:Element|number|string): void; + /** clears all items from the list. */ + clearItems(): void; + /** sets the list items to multiple strings. */ + setItems(items:string[]): void; + /** Sets the current selection by absolute index. */ + select(index:number): void; + /** Changes the current selection based on current offset. */ + move(offset:number): void; + /** select item above selected. */ + up(amount:number): void; + /** select item below selected. */ + down(amount:number): void; + /** show/focus list and pick an item. the callback is executed with the result. */ + pick(cwd:string, callback:(err:any, file:string) => void): void; + + /** show/focus list and pick an item. the callback is executed with the result. */ + pick(callback:(err:any, file:string) => void): void; + } + + // + // Input + // + + export interface InputOptions extends BoxOptions { + // intentionally empty + } + + export class Input extends Box { + constructor(options?:InputOptions); + // intentionally empty + } + + export interface InputOptions extends BoxOptions { + // intentionally empty + } + + // + // Textarea + // + + export interface TextareaOptions extends InputOptions + { + /** use pre-defined keys (`i` or `enter` for insert, `e` for editor, `C-e` for editor while inserting). */ + keys?: boolean; + /** use pre-defined mouse events (right-click for editor). */ + mouse?: boolean; + /** call `readInput()` when the element is focused. automatically unfocus. */ + inputOnFocus?: boolean; + } + + /** A box which allows multiline text input. */ + export class Textarea extends Input + { + constructor(options?:TextareaOptions); + + /** the input text. __read-only__. */ + value: string; + + /** submit the textarea (emits `submit`). */ + submit(): void; + /** cancel the textarea (emits `cancel`). */ + cancel(): void; + /** grab key events and start reading text from the keyboard. takes a callback which receives the final value. */ + readInput(callback:GenericCallback): void; + /** open text editor in `$EDITOR`, read the output from the resulting file. takes a callback which receives the final value. */ + readEditor(callback:GenericCallback): void; + /** the same as `this.value`, for now. */ + getValue(): string; + /** clear input. */ + clearValue(): void; + /** set value. */ + setValue(text:string): void; + } + + + // + // Textbox + // + + export interface TextboxOptions extends TextareaOptions { + /** completely hide text. */ + secret?: boolean; + /** replace text with asterisks (`*`). */ + censor?: boolean; + } + + /** A box which allows text input. */ + export class Textbox extends Textarea { + constructor(options?:TextboxOptions); + + /** completely hide text. */ + secret: boolean; + /** replace text with asterisks (`*`). */ + censor: boolean; + } + + + // + // Button + // + + export interface ButtonOptions extends InputOptions { + } + + /** A button which can be focused and allows key and mouse input. */ + export class Button extends Input { + constructor(options?:ButtonOptions); + + // on(event:string, callback:() => void): void; + // on(event:'press', callback:() => void); + + /** press button. emits 'press'. */ + press(): void; + } + + + // + // ProgressBar + // + + export interface ProgressBarOptions extends InputOptions { + /** can be `horizontal` or `vertical`. */ + orientation: string; + /** the character to fill the bar with (default is space). */ + pch: string; + /** the amount filled (0 - 100). */ + filled: number; + /** same as `filled`. */ + value: number; + /** enable key support. */ + keys: boolean; + /** enable mouse support. */ + mouse: boolean; + + /** contains the extra key 'bar', which defines the style of the bar contents itself. */ + style: ProgressBarStyle; + } + + export interface ProgressBarStyle extends Style { + /** style of the bar contents itself. */ + bar: Style; + } + + + export class ProgressBar extends Input { + constructor(options?:ProgressBarOptions); + + /** progress the bar by a fill amount. */ + progress(amount:number): void; + /** set progress to specific amount. */ + setProgress(amount:number): void; + /** reset the bar. */ + reset(): void; + } + + // + // Checkbox + // + + export interface CheckboxOptions extends InputOptions { + /** whether the element is checked or not. */ + checked: boolean; + /** enable mouse support. */ + mouse: boolean; + } + + + /** A checkbox which can be used in a form element. */ + export class Checkbox extends Input + { + constructor(options?:CheckboxOptions); + + /** the text next to the checkbox (do not use setcontent, use `check.text = ''`). */ + text: string; + /** whether the element is checked or not. */ + checked: boolean; + /** same as `checked`. */ + value: boolean; + + /** check the element. */ + check(): void; + /** uncheck the element. */ + uncheck(): void; + /** toggle checked state. */ + toggle(): void; + } + + + // + // RadioSet + // + + export interface RadioSetOptions extends BoxOptions { + } + + + export class RadioSet extends Box { + constructor(options?:RadioSetOptions); + } + + + // + // RadioButton + // + + export interface RadioButtonOptions extends CheckboxOptions { + } + + + /** A radio button which can be used in a form element. */ + export class RadioButton extends Checkbox { + constructor(options?:RadioButtonOptions); + } + + + + // + // Prompt + // + + export interface PromptOptions extends BoxOptions { + } + + + /** A prompt box containing a text input, okay, and cancel buttons (automatically hidden). */ + export class Prompt extends Box + { + constructor(options?:PromptOptions); + + /** show the prompt and wait for the result of the textbox. set text and initial value */ + input(text:string, value:any, callback:(val:any) => void): void; + /** show the prompt and wait for the result of the textbox. set text and initial value */ + setInput(text:string, value:any, callback:(val:any) => void): void; + /** show the prompt and wait for the result of the textbox. set text and initial value */ + readInput(text:string, value:any, callback:(val:any) => void): void; + } + + + // + // Question + // + + export interface QuestionOptions extends BoxOptions { + } + + + /** A question box containing okay and cancel buttons (automatically hidden). */ + export class Question extends Box + { + constructor(options?:QuestionOptions); + + /** ask a `question`. `callback` will yield the result. */ + ask(question:string, callback:(result:any) => void): void; + } + + + // + // Message + // + + export interface MessageOptions extends BoxOptions { + } + + + /** A box containing a message to be displayed (automatically hidden). */ + export class Message extends Box + { + constructor(options?:MessageOptions); + + /** display a message for a time (default is 3 seconds). set time to 0 for a perpetual message that is dismissed on keypress. */ + log(text:string, timeOrCallback:number|MessageCallback, callback?:MessageCallback): void; + /** display a message for a time (default is 3 seconds). set time to 0 for a perpetual message that is dismissed on keypress. */ + display(text:string, timeOrCallback:number|MessageCallback, callback?:MessageCallback): void; + /** display an error in the same way. */ + error(text:string, timeOrCallback:number|MessageCallback, callback?:MessageCallback): void; + } + + export interface MessageCallback { + (): void; + } + + + // + // Loading + // + + export interface LoadingOptions extends BoxOptions { + } + + /** A box with a spinning line to denote loading (automatically hidden). */ + export class Loading extends Box + { + constructor(options?:LoadingOptions); + + /** display the loading box with a message. will lock keys until `stop` is called. */ + load(text:string): void; + /** hide loading box. unlock keys. */ + stop(): void; + } + + + // + // Listbar + // + + export interface ListbarOptions extends BoxOptions + { + /** Listbar's `style` object includes sub-styles for `selected` and `item`. */ + style?: ListbarStyle; + + /** set buttons using an object with keys as titles of buttons, containing of objects containing keys of `keys` and `callback`. */ + items?: ListbarItemSet; + /** set buttons using an object with keys as titles of buttons, containing of objects containing keys of `keys` and `callback`. */ + commands?: ListbarItemSet; + /** automatically bind list buttons to keys 0-9. */ + autoCommandKeys?: boolean; + } + + export interface ListbarItemSet { + [name: string]: ListbarItem; + } + + export interface ListbarItem { + keys: string[]; + callback: GenericCallback; + } + + export interface ListbarStyle extends Style + { + /** style for a selected item. */ + selected: Style; + /** style for an unselected item. */ + item: Style; + } + + /** A horizontal list. Useful for a main menu bar. */ + export class Listbar extends Box + { + constructor(options?:ListbarOptions); + + /** append an item to the bar. */ + add(item:ListbarItem, callback:GenericCallback): void; + /** append an item to the bar. */ + addItem(item:ListbarItem, callback:GenericCallback): void; + /** append an item to the bar. */ + appendItem(item:ListbarItem, callback:GenericCallback): void; + + /** select button and execute its callback. */ + selectTab(index: number): void; + + /** set commands (see `commands` option above). */ + setItems(commands: ListbarItemSet): void; + /** select an item on the bar. */ + select(offset: number): void; + /** remove item from the bar. */ + removeItem(child:ListbarItem): void; + /** move focus relatively across the bar. */ + move(offset: number): void; + /** move focus left relatively across the bar. */ + moveLeft(offset: number): void; + /** move focus right relatively across the bar. */ + moveRight(offset: number): void; + } + + + // + // Log + // + + export interface LogOptions extends ScrollableTextOptions { + /** amount of scrollback allowed. default: Infinity. */ + scrollback?: number; + /** scroll to bottom on input even if the user has scrolled up. default: false. */ + scrollOnInput?: boolean; + } + + + /** A log permanently scrolled to the bottom. */ + export class Log extends ScrollableText + { + constructor(options?:LogOptions); + + /** amount of scrollback allowed. default: Infinity. */ + scrollback: number; + /** scroll to bottom on input even if the user has scrolled up. default: false. */ + scrollOnInput: boolean; + + /** add a log line. */ + log(text:string): void; + /** add a log line. */ + add(text:string): void; + } + + + // + // Table + // + + export interface TableOptions extends BoxOptions + { + /** array of array of strings representing rows (same as `data`). */ + rows?: string[][]; + /** array of array of strings representing rows (same as `rows`). */ + data?: string[][]; + /** spaces to attempt to pad on the sides of each cell. `2` by default: one space on each side (only useful if the width is shrunken). */ + pad?: number; + /** do not draw inner cells. */ + noCellBorders?: boolean; + /** fill cell borders with the adjacent background color. */ + fillCellBorders?: boolean; + + /** includes `header` and `cell` substyles. */ + style?: TableStyle; + } + + export interface TableStyle extends Style { + /** header style. */ + header: Style; + /** cell style. */ + cell: Style; + } + + /** A stylized table of text elements. */ + export class Table extends Box + { + /** includes `header` and `cell` substyles. */ + style: TableStyle; + + /** set rows in table. array of arrays of strings. */ + setData(rows: string[][]): void; + /** set rows in table. array of arrays of strings. */ + setRows(rows: string[][]): void; + } + + + // + // ListTable + // + + export interface ListTableOptions extends ListOptions + { + /** array of array of strings representing rows (same as `data`). */ + rows?: string[][]; + /** array of array of strings representing rows (same as `rows`). */ + data?: string[][]; + /** spaces to attempt to pad on the sides of each cell. `2` by default: one space on each side (only useful if the width is shrunken). */ + pad?: number; + + /** do not draw inner cells. */ + noCellBorders?: boolean; + + /** includes `header` and `cell` substyles. */ + style?: TableStyle; + } + + export interface ListTableStyle extends TableStyle { + } + + + /** A stylized table of text elements with a list. */ + export class ListTable extends List + { + constructor(options?:ListTableOptions); + + /** set rows in table. array of arrays of strings. */ + setData(rows: string[][]): void; + /** set rows in table. array of arrays of strings. */ + setRows(rows: string[][]): void; + } + + // + // Image + // + + export interface ImageOptions extends BoxOptions { + /** path to image. */ + file: string; + /** path to w3mimgdisplay. if a proper w3mimgdisplay path is not given, blessed will search the entire disk for the binary. */ + w3m: string; + } + + + /** Display an image in the terminal (jpeg, png, gif) using w3mimgdisplay. Requires w3m to be installed. X11 required: works in xterm, urxvt, and possibly other terminals. */ + export class Image extends Box + { + constructor(options?:ImageOptions); + + /** set the image in the box to a new path. */ + setImage (img:string, callback:GenericCallback): void; + /** clear the current image. */ + clearImage (callback:GenericCallback): void; + /** get the size of an image file in pixels. */ + imageSize (img:string, callback:GenericCallback): void; + /** get the size of the terminal in pixels. */ + termSize (callback:GenericCallback): void; + /** get the pixel to cell ratio for the terminal. */ + getPixelRatio (callback:GenericCallback): void; + } + + + // + // Form + // + + export interface FormOptions extends BoxOptions { + /** allow default keys (tab, vi keys, enter). */ + keys?:boolean; + /** allow vi keys. */ + vi?:boolean; + } + + export class Form extends Box + { + constructor(options?:FormOptions); + + /** last submitted data. */ + submission: any; + + // on(event:string, callback:() => void): void; + // on(event:'submit', callback:(data) => void): void; + // on(event:'cancel', callback:() => void): void; + // on(event:'reset', callback:() => void): void; + + next(): void; + previous(): void; + + resetSelected(): void; + /** focus first form element. */ + focusFirst(): void; + /** focus last form element. */ + focusLast(): void; + /** focus next form element. */ + focusNext(): void; + /** focus previous form element. */ + focusPrevious(): void; + /** submit the form. */ + submit(): void; + /** discard the form. */ + cancel(): void; + /** clear the form. */ + reset(): void; + } + + + // + // FileManager + // + + export interface FileManagerOptions extends ListOptions { + cwd?: string; + } + + export interface DirectoryEntry { + name: string; + text: string; + dir: boolean; + symlink: boolean; + } + + export class FileManager extends List + { + constructor(options?:FileManagerOptions); + + cwd: string; + + useFormatter (formatterFn:(entry:DirectoryEntry) => DirectoryEntry): void; + + /** refresh the file list (perform a readdir on cwd and update the list items). */ + refresh (cwd?:string, callback?:() => void): void; + + /** refresh the file list. */ + refresh (callback?:() => void): void; + + /** reset back to original cwd. */ + reset (cwd?:string, callback?:() => void): void; + } + + + // + // Terminal + // + + export interface TerminalOptions extends BoxOptions + { + /** handler for input data. */ + handler?: (userInput:Buffer) => void; + /** name of shell. $SHELL by default. */ + shell?:string; + /** args for shell. */ + args?:any; + /** can be line, underline, and block. */ + cursor?:string; //'line'|'underline'|'block'; + } + + export class Terminal extends Box + { + /** reference to the headless term.js terminal. */ + term: any; + /** reference to the pty.js pseudo terminal. */ + pty: any; + + /** write data to the terminal. */ + write(data:string): void; + + /** nearly identical to `element.screenshot`, however, the specified region includes the terminal's _entire_ scrollback, rather than just what is visible on the screen. */ + screenshot(xi?:number, xl?:number, yi?:number, yl?:number): string; + } + + + export interface NodeChildProcessExecOptions + { + cwd?: string; + stdio?: any; + customFds?: any; + env?: any; + encoding?: string; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + } + } + + export = Blessed; +} + + + From efd7ae7dd16f7d27e4abf5ec1aa885c07f134e1c Mon Sep 17 00:00:00 2001 From: crissdev Date: Tue, 7 Jul 2015 15:56:05 +0300 Subject: [PATCH 0008/1506] improve definition for knockout.punches --- knockout.punches/knockout.punches-tests.ts | 24 ++++++++++++++++++- knockout.punches/knockout.punches.d.ts | 28 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/knockout.punches/knockout.punches-tests.ts b/knockout.punches/knockout.punches-tests.ts index bd5d53a5c5..bec2b1a4ef 100644 --- a/knockout.punches/knockout.punches-tests.ts +++ b/knockout.punches/knockout.punches-tests.ts @@ -2,7 +2,29 @@ function test_enable() { - ko.punches.enableAll(); +} +function test_filters() { + ko.filters.default([], 'Empty'); + ko.filters.default(null, 'Empty'); + ko.filters.default(0, 'Empty'); + ko.filters.default(' ', 'Empty'); + + ko.filters.fit('abcdef0123456789', 10); + ko.filters.fit('abcdef0123456789', 10, '_'); + ko.filters.fit('abcdef0123456789', 10, '_', 'left'); + ko.filters.fit('abcdef0123456789', 10, '_', 'middle'); + ko.filters.fit('abcdef0123456789', 10, '_', 'right'); + + ko.filters.json({}); + ko.filters.json({}, null, 4); + + ko.filters.number('123456789'); + ko.filters.number(12345.6789); + + ko.filters.lowercase('TEST'); + ko.filters.uppercase('test'); + + ko.filters.replace('1234abcd', '1234', ''); } \ No newline at end of file diff --git a/knockout.punches/knockout.punches.d.ts b/knockout.punches/knockout.punches.d.ts index d219d61f15..8bcb29ee89 100644 --- a/knockout.punches/knockout.punches.d.ts +++ b/knockout.punches/knockout.punches.d.ts @@ -9,8 +9,36 @@ interface KnockoutPunchesStatic { enableAll(): void; } +interface KnockoutPunchesFilters { + // Convert the value to uppercase. + uppercase(value: string): string; + + // Convert the value to lowercase. + lowercase(value: string): string; + + // Perform a search and replace on the value using String#replace. + replace(value: string, search: string, replace: string): string; + + // Trim the value if it’s longer than the given length. The trimmed portion is + // replaced with ... or the replacement value, if given. By default, the value + // is trimmed on the right but can be changed to left or middle through the + // where option. For example: name | fit:10::'middle' will + // convert Shakespeare to Shak...are. + fit(value: number | string, length?: number, replacement?: string, trimWhere?: string): string; + + // Convert the value to a JSON string using ko.toJSON. You can give a space value to format the JSON output. + json(rootObject: any, space?: any, replacer?: any): string; + + // Format the value using toLocaleString. + number(value: number | string): string; + + // If the value is blank, null, or an empty array, replace it with the given default value + default(value: any, defaultValue?: any): any; +} + interface KnockoutStatic { punches: KnockoutPunchesStatic; + filters: KnockoutPunchesFilters; } declare module "knockout.punches" { From 83993bac9533e17f7a469aae02f79f7e68decb7a Mon Sep 17 00:00:00 2001 From: kimamula Date: Wed, 30 Sep 2015 00:26:52 +0900 Subject: [PATCH 0009/1506] update jQuery.append, prepend, before and after --- jquery/jquery-tests.ts | 17 ++++++++++++++--- jquery/jquery.d.ts | 16 ++++++++-------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index 1f723fde32..b9e835ebc7 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -41,7 +41,7 @@ function test_addClass() { function test_after() { $('.inner').after('

Test

'); - $('
').after('

'); + $('
').after('

').after(document.createDocumentFragment()); $('
').after('

').addClass('foo') .filter('p').attr('id', 'bar').html('hello') .end() @@ -504,7 +504,7 @@ function test_toggle() { function test_append() { $('.inner').append('

Test

'); - $('.container').append($('h2')); + $('.container').append($('h2')).append(document.createDocumentFragment()); var $newdiv1 = $('
'), newdiv2 = document.createElement('div'), @@ -554,7 +554,7 @@ function test_attributeSelectors() { function test_before() { $('.inner').before('

Test

'); - $('.container').before($('h2')); + $('.container').before($('h2')).before(document.createDocumentFragment()); $("
").before("

"); var $newdiv1 = $('
'), newdiv2 = document.createElement('div'), @@ -941,6 +941,17 @@ function test_clone() { .clone()); } +function test_prepend() { + $('.inner').prepend('

Test

'); + $('.container').prepend($('h2')).prepend(document.createDocumentFragment()); + + var $newdiv1 = $('
'), + newdiv2 = document.createElement('div'), + existingdiv1 = document.getElementById('foo'); + + $('body').prepend($newdiv1, [newdiv2, existingdiv1]); +} + function test_prependTo() { $("

Test

").prependTo(".inner"); $("h2").prependTo($(".container")); diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 3641af8503..8f99ce3d5d 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -2579,10 +2579,10 @@ interface JQuery { /** * Insert content, specified by the parameter, after each element in the set of matched elements. * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. + * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. */ - after(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; + after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, after each element in the set of matched elements. * @@ -2593,10 +2593,10 @@ interface JQuery { /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. + * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. */ - append(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; + append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. * @@ -2614,10 +2614,10 @@ interface JQuery { /** * Insert content, specified by the parameter, before each element in the set of matched elements. * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. + * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. */ - before(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; + before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, before each element in the set of matched elements. * @@ -2662,10 +2662,10 @@ interface JQuery { /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. + * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. */ - prepend(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery; + prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. * From 12cae19c1c23a970d76c45032a2559406bd4c666 Mon Sep 17 00:00:00 2001 From: Hiraash Thawfeek Date: Tue, 29 Sep 2015 23:15:53 +0530 Subject: [PATCH 0010/1506] Including definitions for Commangular library The commangular library definitions are added as per https://github.com/yukatan/commangular --- commangular/commangular-mock.d.ts | 73 ++++++++ commangular/commangular.d.ts | 273 ++++++++++++++++++++++++++++++ 2 files changed, 346 insertions(+) create mode 100644 commangular/commangular-mock.d.ts create mode 100644 commangular/commangular.d.ts diff --git a/commangular/commangular-mock.d.ts b/commangular/commangular-mock.d.ts new file mode 100644 index 0000000000..8f74b659fc --- /dev/null +++ b/commangular/commangular-mock.d.ts @@ -0,0 +1,73 @@ +// Type definitions for Commangular Mock 0.9.0 +// Project: http://commangular.org +// Definitions by: Hiraash Thawfeek +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module commangular { + + /////////////////////////////////////////////////////////////////////////// + // Commangular Static + // see http://commangular.org/docs/#commangular-namespace + /////////////////////////////////////////////////////////////////////////// + interface ICommAngularStatic { + + /** + * Mock dispatch function for testing commands. + */ + dispatch( ec: ICommandCall, callback: Function ); + } + + interface ICommandCall { + /** + * Name of the command that needs to + * execute + */ + command: string; + + /** + * Data that needs to be passed to the command + */ + data?: any; + } + + + /** + * Object type expected to be passed into the callback function + * of the dispatch() function + */ + interface ICommandInfo { + /** + * The data that was passed into the command + * @param key The property name that is in the object that was passed + */ + dataPassed( key : string ) : any; + + /** + * The data that was returned by the command + * @param key The result key that was defined in the command. If no result + * was defined use 'lastResult' as the key + */ + resultKey( key: string ): any; + + /** + * Indicates if the command execution was cancelled. + */ + canceled( ): boolean; + + /** + * Indicates if the command was executed???? + */ + commandExecuted( ): boolean; + } + +} + + +/** +* Mock dispatch function for testing commands. +* @param ec an ICommandCall object +* @param callback The function that will be called upon the completion of the command +* function should expecte an ICommandInfo paramter. +*/ +declare function dispatch( ec: commangular.ICommandCall, callback: Function ); + diff --git a/commangular/commangular.d.ts b/commangular/commangular.d.ts new file mode 100644 index 0000000000..bf3cbb5d94 --- /dev/null +++ b/commangular/commangular.d.ts @@ -0,0 +1,273 @@ +// Type definitions for Commangular 0.9.0 +// Project: http://commangular.org +// Definitions by: Hiraash Thawfeek +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare var commangular: commangular.ICommAngularStatic; + +declare module commangular { + + /////////////////////////////////////////////////////////////////////////// + // Commangular Static + // see http://commangular.org/docs/#commangular-namespace + /////////////////////////////////////////////////////////////////////////// + interface ICommAngularStatic { + + /** + * Use this function to create and register a command with Commangular + * + * @param commandName It's the name of the command you are creating. It's useful to reference the command from the command provider. + * @param commandFunction It's the command class that will be executed when commangular runs this command. + * It has to be something that implements ICommand. Same as angular syntax + * @param commandConfig It's and object with paramaters to configure the command execution. + */ + create (commandName: string, commandFunction: Function, commandConfig?:ICommandConfig) : void; + command (commandName: string, commandFunction: Function, commandConfig?:ICommandConfig) : void; + + /** + * This function allows you to hijack the execution before or after and + * execute some cross cutting functionality. + * see http://commangular.org/docs/#command-aspects + * @param aspectDescriptor The interceptor descriptor has two parts 'Where' and 'What'. + * Where do you want to intercept? you've 5 options : + * - @Before : The interceptor will be executed before the command. You will be able to + * cancel the command or modify the data that will be injected in the command or do + * some other operation you need before the command execution. + * - @After : The interceptor will be executed just after the command and before any other next + * command. You can get the lastResult from the command, cancel execution etc etc. + * - @AfterExecution : This intercetor is executed just after the command execute method and + * it can get the result from the command and update it before the onResult method is executed. + * - @AfterThrowing : This interceptor will be executed if the command or any interceptor of + * the command throws an exception. You can get the error throwed injected to do what you need. + * - @Around : The interceptor is executed around a command.That means that a especial + * object 'processor' will be injected in the interceptor and you can invoke the command + * or the next interceptor. It will be better explained below. + * @param aspectFunction It's the command class execute function that will be run for the given aspect. + * @param order You can chain any number of interceptors to the same command, so if you need to executed + * the interceptor in a specific order you can indicate it here. An order of 0 is assigned by default. + */ + aspect ( aspectDescriptor: string, aspectFunction: ICommand, order: number ) : void; + + /** + * Event aspects work the same way command aspects do, but they intercept all the command groups instead, + * so you can run some function before the command group starts it's execution , after or when any + * command or interceptor in the group throw an exception. + * see http://commangular.org/docs/#event-aspects + * @param aspectDescriptor The interceptor descriptor has two parts 'Where' and 'What'. + * Where do you want to intercept? you've 3 options : + * - @Before : The interceptor will be executed before the command. You will be able to + * cancel the command or modify the data that will be injected in the command or do + * some other operation you need before the command execution. + * - @After : The interceptor will be executed just after the command and before any other next + * command. You can get the lastResult from the command, cancel execution etc etc. + * - @AfterThrowing : This interceptor will be executed if the command or any interceptor of + * the command throws an exception. You can get the error throwed injected to do what you need. + * @param aspectFunction It's the command class execute function that will be run for the given aspect. + * @param order You can chain any number of interceptors to the same command, so if you need to executed + * the interceptor in a specific order you can indicate it here. An order of 0 is assigned by default. + */ + eventAspect( aspectDescriptor: string, aspectFunction: ICommand, order: number ) : void; + + /** + * TBD + */ + resolver( commandName: string, resolverFunction ) : void; + + /** + * Clears all commands and aspects registered with commangular. + */ + reset() : void; + + /** + * Can be used to enable/disable debug + */ + debug( enableDebug : boolean ) : void; + + /** + * TBD + */ + build() : void; + } + + /** + * The command function/object + * see http://commangular.org/docs/#commangular-namespace + */ + interface ICommand { + /** + * This function is what gets called when the command executes. + * It can take parameters in as injected by angular + */ + execute() : any; + + } + + interface IResultCommand extends ICommand{ + /** + * Is executed after the execute method and the interception chain and can receive + * the result from the execute method of the same command. + * + * @param result Value/object returned by the execution. + */ + onResult ( result: any ) : void; + + /** + * Is executed when the executed method ends with an error. Can receive the error throw by the execute method. + * @param error The error that occured during execution + */ + onError ( error: Error ) : void; + } + + /** + * The result object expected in the promise returned by the dispatch function + * This must be extended to add custom result keys + * see http://commangular.org/docs/#returning-result-from-commands + */ + interface ICommandResult { + /** + * By defualt the result of the command will be found in this property + */ + lastResult : any; + } + + /** + * Command creation configuration + * see http://commangular.org/docs/#the-command-config-object + */ + interface ICommandConfig { + /** + * This property instruct commangular to keep the value returned by the command in the value + * key passed in 'resultKey'. It has to be a string. It means that after the execution of this + * commands you will be able to inject on the next command using that key and the result of the command will be injected. + */ + resultKey : string; + } + + /** + * All the command configuration of your application is done in an angular config block and + * with the $commangularProvider. The provider is responsible to build the command strutures and + * map them to the desired event names. You can create multiple configs blocks in angular, so you + * can have multiple command config blocks to separate functional parts of your application. + * see http://commangular.org/docs/#using-the-provider + */ + interface ICommAngularProvider { + + /** + * This function lets you map a even name to a command sequence + * @param eventName An event that will be watched by commangular + */ + mapTo( eventName: string ) : ICommAngularDescriptor; + + /** + * Used along with mapTo function. Creates a sequence of commands that + * execute after one and other + * see http://commangular.org/docs/#building-command-sequences + */ + asSequence(): ICommAngularDescriptor; + + /** + * Used along with mapTo function. Maps commands to be executed parallel + * see http://commangular.org/docs/#building-parallel-commands + */ + asParallel(): ICommAngularDescriptor; + + /** + * A command flow is a decision point inside the command group.You can have any number + * of flows inside a command group and nesting them how you perfer. + * see http://commangular.org/docs/#building-command-flows + */ + asFlow(): ICommAngularDescriptor; + + findCommand( eventName: string ): ICommAngularDescriptor; + + } + + /** + * The service that enables the execution of commands + * see http://commangular.org/docs/#dispatching-events + */ + interface ICommAngularService { + + /** + * This function executes the given command sequence. + * see http://commangular.org/docs/#dispatching-events + * @param eventName Name of the even that will trigger a command sequence + * @param data Data of any type that will be passed to the command. + */ + dispatch( eventName: string, data?: any ) : ng.IPromise; + } + + interface ICommAngularDescriptor { + + /** + * Used along with mapTo function. Creates a sequence of commands that + * execute after one and other + * see http://commangular.org/docs/#building-command-sequences + */ + asSequence (): ICommAngularDescriptor; + + /** + * Used along with mapTo function. Maps commands to be executed parallel + * see http://commangular.org/docs/#building-parallel-commands + */ + asParallel(): ICommAngularDescriptor; + + /** + * A command flow is a decision point inside the command group.You can have any number + * of flows inside a command group and nesting them how you perfer. + * see http://commangular.org/docs/#building-command-flows + */ + asFlow(): ICommAngularDescriptor; + + /** + * Add commands to a descriptor. + * @param command The name that was used to create the command. + */ + add ( command: string ): ICommAngularDescriptor; + + /** + * Add descriptor to a descriptor. + * @param descriptor Another descriptor attached to a sequnce of commands. + */ + add ( descriptor: ICommAngularDescriptor ): ICommAngularDescriptor; + + /** + * This is to be used with flowing commands to attach an expression that + * evaluates using Angular $parse. + * see http://commangular.org/docs/#building-command-flows + * @param expression A string form expression that can make use of services to validate conditions. + * @param services A comma seperated list of services that are used in the above expression + */ + link ( expression: string, services?: string ): ICommAngularDescriptor; + + /** + * Works with the link function to attach a command to the flow if the + * expression becomes truthy. + * see http://commangular.org/docs/#building-command-flows + * @param command The name that was used to create the command. + */ + to ( command: string ): ICommAngularDescriptor; + + } + +} + +/** + * Extending the angular rootScope to include the dispatch function in all scopes. + */ +declare module angular { + + interface IRootScopeService { + + /** + * Commangular method to execute a command. + * @param eventName Name of the even that will trigger a command sequence + * @param data Data of any type that will be passed to the command. + */ + dispatch( eventName: string, data?: any ) : ng.IPromise; + + } + +} \ No newline at end of file From 683a6e7ec04521ccffc299fd89bcedd870d7582b Mon Sep 17 00:00:00 2001 From: Hiraash Thawfeek Date: Tue, 29 Sep 2015 23:31:03 +0530 Subject: [PATCH 0011/1506] Fixes for missing parts of the definition based on the CI test on DefinitelyTyped --- commangular/commangular-mock.d.ts | 4 ++-- commangular/commangular.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commangular/commangular-mock.d.ts b/commangular/commangular-mock.d.ts index 8f74b659fc..134e4d0d1e 100644 --- a/commangular/commangular-mock.d.ts +++ b/commangular/commangular-mock.d.ts @@ -14,7 +14,7 @@ declare module commangular { /** * Mock dispatch function for testing commands. */ - dispatch( ec: ICommandCall, callback: Function ); + dispatch( ec: ICommandCall, callback: Function ): void; } interface ICommandCall { @@ -69,5 +69,5 @@ declare module commangular { * @param callback The function that will be called upon the completion of the command * function should expecte an ICommandInfo paramter. */ -declare function dispatch( ec: commangular.ICommandCall, callback: Function ); +declare function dispatch( ec: commangular.ICommandCall, callback: Function ): void; diff --git a/commangular/commangular.d.ts b/commangular/commangular.d.ts index bf3cbb5d94..b03a22574e 100644 --- a/commangular/commangular.d.ts +++ b/commangular/commangular.d.ts @@ -73,7 +73,7 @@ declare module commangular { /** * TBD */ - resolver( commandName: string, resolverFunction ) : void; + resolver( commandName: string, resolverFunction : Function ) : void; /** * Clears all commands and aspects registered with commangular. From c1f3aa4bc80f8f3c73d17db9fd6ef0003e7f0b18 Mon Sep 17 00:00:00 2001 From: James Gardner Date: Mon, 5 Oct 2015 09:39:03 +1300 Subject: [PATCH 0012/1506] Added AddClasses option to DroppableOptions interface The AddClasses option seems to be missing from the DroppableOptions interface. I have added it to the interface and alphabetically re-ordered the options so they match with the jQueryUI documentation. --- jqueryui/jqueryui.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index a49a779e28..2487087d60 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -474,9 +474,10 @@ declare module JQueryUI { } interface DroppableOptions extends DroppableEvents { - disabled?: boolean; accept?: any; activeClass?: string; + addClasses?: boolean; + disabled?: boolean; greedy?: boolean; hoverClass?: string; scope?: string; From e36c90fb816f60509bdf3984d4851ad6a63446a7 Mon Sep 17 00:00:00 2001 From: Simon Gausmann Date: Thu, 15 Oct 2015 14:43:40 +0200 Subject: [PATCH 0013/1506] adding typings for node-cache-manager lib --- cache-manager/cache-manager-tests.ts | 51 ++++++++++++++++++++++++++++ cache-manager/cache-manager.d.ts | 36 ++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 cache-manager/cache-manager-tests.ts create mode 100644 cache-manager/cache-manager.d.ts diff --git a/cache-manager/cache-manager-tests.ts b/cache-manager/cache-manager-tests.ts new file mode 100644 index 0000000000..36d2a559a0 --- /dev/null +++ b/cache-manager/cache-manager-tests.ts @@ -0,0 +1,51 @@ +/// + +import * as cacheManager from 'cache-manager' + +const memoryCache = cacheManager.caching({store: 'memory', max: 100, ttl: 10/*seconds*/}); +const ttl = 5; + +memoryCache.set('foo', 'bar', {ttl: ttl}, (err) => { + + if (err) { + throw err; + } + + memoryCache.get('foo', (err, result) => { + + // console.log(result); + + memoryCache.del('foo', (err) => { + }); + + }); +}); + +function getUser(id:number, cb:Function) { + + cb(null, {id: id, name: 'Bob'}); +} + +const userId = 123; +const key = 'user_' + userId; + +// Note: ttl is optional in wrap() +memoryCache.wrap<{id: number, name: string}>(key, (cb) => { + + getUser(userId, cb); + +}, {ttl: ttl}, (err, user) => { + + //console.log(user); + + // Second time fetches user from memoryCache + memoryCache.wrap<{id: number, name: string}>(key, (cb)=> { + + getUser(userId, cb); + + }, (err, user) => { + + //console.log(user); + + }); +}); \ No newline at end of file diff --git a/cache-manager/cache-manager.d.ts b/cache-manager/cache-manager.d.ts new file mode 100644 index 0000000000..e7cad31740 --- /dev/null +++ b/cache-manager/cache-manager.d.ts @@ -0,0 +1,36 @@ +// Type definitions for cache-manager v1.2.0 +// Project: https://github.com/BryanDonovan/node-cache-manager +// Definitions by: Simon Gausmann www.gausmann-media.de +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module 'cache-manager' { + + + interface ICachingConfig { + ttl: number; + } + interface IStoreConfig extends ICachingConfig { + store:string; + max?: number; + isCacheableValue?:(value:any)=>boolean; + } + interface ICache { + set(key:string, value:T, options:ICachingConfig, callback?:(error:any)=>void):void; + set(key:string, value:T, ttl:number, callback?:(error:any)=>void):void; + + wrap(key:string, wrapper:(callback:(error:any, result:T)=>void)=>void, options:ICachingConfig, callback:(error:any, result:T)=>void):void; + wrap(key:string, wrapper:(callback:(error:any, result:T)=>void)=>void, callback:(error:any, result:T)=>void):void; + + get(key:string, callback:(error:any, result:T)=>void):void; + + del(key:string, callback?:(error:any)=>void):void; + } + + + module cacheManager { + function caching(ICongig:IStoreConfig):ICache; + + function multiCaching(Caches:ICache[]):ICache; + } + + export = cacheManager; +} \ No newline at end of file From d1b97507ac1b9097e48a8cf2abd23f1a5c0c38d1 Mon Sep 17 00:00:00 2001 From: Simon Gausmann Date: Thu, 15 Oct 2015 15:05:49 +0200 Subject: [PATCH 0014/1506] website in comments --- cache-manager/cache-manager.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cache-manager/cache-manager.d.ts b/cache-manager/cache-manager.d.ts index e7cad31740..d912f9f7bd 100644 --- a/cache-manager/cache-manager.d.ts +++ b/cache-manager/cache-manager.d.ts @@ -1,6 +1,6 @@ // Type definitions for cache-manager v1.2.0 // Project: https://github.com/BryanDonovan/node-cache-manager -// Definitions by: Simon Gausmann www.gausmann-media.de +// Definitions by: Simon Gausmann // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'cache-manager' { @@ -26,6 +26,7 @@ declare module 'cache-manager' { } + module cacheManager { function caching(ICongig:IStoreConfig):ICache; @@ -33,4 +34,4 @@ declare module 'cache-manager' { } export = cacheManager; -} \ No newline at end of file +} From d201ae04f7545013f581da033384ec7e967b14b2 Mon Sep 17 00:00:00 2001 From: Dominic Alie Date: Thu, 15 Oct 2015 14:05:21 -0400 Subject: [PATCH 0015/1506] Sylvester type definitions --- sylvester/sylvester-test.ts | 207 +++++++++ sylvester/sylvester.d.ts | 825 ++++++++++++++++++++++++++++++++++++ 2 files changed, 1032 insertions(+) create mode 100644 sylvester/sylvester-test.ts create mode 100644 sylvester/sylvester.d.ts diff --git a/sylvester/sylvester-test.ts b/sylvester/sylvester-test.ts new file mode 100644 index 0000000000..1eb5e076ec --- /dev/null +++ b/sylvester/sylvester-test.ts @@ -0,0 +1,207 @@ +/// +interface IAny { + a: any; +} + +var obj: IAny; +var n: number = 0; +var bool: boolean = false; +var str: string = ''; + +var l: Line = Line.create(v, v); +var m: Matrix = Matrix.create(v); +var p: Plane = Plane.create(v, v); +var v: Vector = Vector.create([n, n]); + +l = Line.create([n], [n]); +l = Line.X; +l = Line.Y; +l = Line.Z; +v = l.anchor; +bool = l.contains(v); +v = l.direction; +n = l.distanceFrom(l); +n = l.distanceFrom(v); +n = l.distanceFrom(p); +l = l.dup(); +bool = l.eql(l); +v = l.intersectionWith(l); +v = l.intersectionWith(p); +bool = l.intersects(l); +bool = l.intersects(p); +bool = l.isParallelTo(l); +bool = l.isParallelTo(p); +bool = l.liesIn(p); +v = l.pointClosestTo(l); +v = l.pointClosestTo(v); +l = l.reflectionIn(l); +l = l.reflectionIn(p); +l = l.reflectionIn(v); +l = l.rotate(n, l); +l = l.rotate(n, v); +l = l.setVectors([n, n], v); +l = l.setVectors(v, [n, n]); +l = l.translate(v); +l = l.translate([n, n]); + +m = Matrix.create(m); +m = Matrix.create([n]); +m = Matrix.create([[n]]); +m = Matrix.create(v); +m = Matrix.Diagonal(m); +m = Matrix.Diagonal([n]); +m = Matrix.Diagonal([[n]]); +m = Matrix.Diagonal(v); +m = Matrix.I(n); +m = Matrix.Random(n, n); +m = Matrix.Rotation(n); +m = Matrix.Rotation(n, v); +m = Matrix.RotationX(n); +m = Matrix.RotationY(n); +m = Matrix.RotationZ(n); +m = Matrix.Zero(n, n); +m = m.add(m); +m = m.augment(m); +m = m.augment(v); +bool = m.canMultiplyFromLeft(m); +v = m.col(n); +n = m.cols(); +n = m.det(); +n = m.determinant(); +v = m.diagonal(); +obj = m.dimensions(); +m = m.dup(); +v = m.e(n, n); +var element: number[][] = m.elements; +bool = m.eql(m); +bool = m.eql(v); +obj = m.indexOf(n); +str = m.inspect(); +m = m.inv(); +m = m.inverse(); +bool = m.isSameSizeAs(m); +bool = m.isSingular(); +bool = m.isSquare(); + +m = m.map((x, i, j) => { + n = x; + n = i; + n = j; +}); + +n = m.max(); +m = m.minor(n, n, n, n); +m = m.multiply(n); +m = m.multiply(m); +v = m.multiply(v); +n = m.rank(); +n = m.rk(); +m = m.round(); +v = m.row(n); +n = m.rows(); +m = m.setElements(m); +m = m.setElements([n, n]); +m = m.setElements([[n, n]]); +m = m.setElements(v); +m = m.snapTo(n); +m = m.subtract(m); +m = m.toRightTriangular(); +m = m.toUpperTriangular(); +n = m.tr(); +n = m.trace(); +m = m.transpose(); +m = m.x(m); +m = m.x(n); +v = m.x(v); + +p = Plane.create([0], [0]); +p = Plane.XY; +p = Plane.YX; +p = Plane.YZ; +p = Plane.ZX; +v = p.anchor; +bool = p.contains(v); +bool = p.contains(l); +n = p.distanceFrom(p); +n = p.distanceFrom(v); +n = p.distanceFrom(l); +p = p.dup(); +bool = p.eql(p); +v = p.intersectionWith(l); +l = p.intersectionWith(p); +bool = p.intersects(p); +bool = p.intersects(l); +bool = p.isParallelTo(p); +bool = p.isParallelTo(l); +bool = p.isPerpendicularTo(p); +v = p.normal; +v = p.pointClosestTo(v); +p = p.reflectionIn(p); +p = p.reflectionIn(v); +p = p.reflectionIn(l); +p = p.rotate(n, l); +p = p.setVectors([n], [n]); +p = p.setVectors(v, v); +p = p.setVectors([n], [n], [n]); +p = p.setVectors(v, v, v); +p = p.translate([n]); +p = p.translate(v); + +v = Vector.create(v); +v = Vector.i; +v = Vector.j; +v = Vector.k; +v = Vector.Random(n); +v = Vector.Zero(n); +v = v.add(v); +v = v.add([n, n]); +n = v.angleFrom(v); +v = v.cross(v); +v = v.cross([n, n]); +n = v.dimensions(); +n = v.distanceFrom(v); +n = v.distanceFrom(l); +n = v.distanceFrom(p); +n = v.dot(v); +n = v.dot([n, n]); +v = v.dup(); +n = v.e(n); + +v.each((x, i) => { + n = x; + n = i; +}); + +var elements: number[] = v.elements; +bool = v.eql(v); +bool = v.eql([n, n]); +n = v.indexOf(n); +str = v.inspect(); +bool = v.isAntiparallelTo(v); +bool = v.isParallelTo(v); +bool = v.isPerpendicularTo(v); +bool = v.liesIn(p); +bool = v.liesOn(l); + +v = v.map((x, i) => { + n = x; + n = i; +}); + +n = v.max(); +n = v.modulus(); +v = v.multiply(n); +v = v.reflectionIn(v); +v = v.reflectionIn(l); +v = v.reflectionIn(p); +v = v.rotate(n, v); +v = v.rotate(n, l); +v = v.round(); +v = v.setElements(v); +v = v.setElements([n, n]); +v = v.snapTo(n); +v = v.subtract(v); +v = v.to3D(); +m = v.toDiagonalMatrix(); +v = v.toUnitVector(); +v = v.x(n); \ No newline at end of file diff --git a/sylvester/sylvester.d.ts b/sylvester/sylvester.d.ts new file mode 100644 index 0000000000..0aa869d38c --- /dev/null +++ b/sylvester/sylvester.d.ts @@ -0,0 +1,825 @@ +// Type definitions for sylvester 0.1.3 +// Project: https://github.com/jcoglan/sylvester +// Definitions by: Stephane Alie +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// === Sylvester === +// Vector and Matrix mathematics modules for JavaScript +// Copyright (c) 2007 James Coglan + +interface VectorStatic { + /** + * Constructor function. + */ + create(elements: Vector|Array): Vector; + + i: Vector; + j: Vector; + k: Vector; + + /** + * Random vector of size n. + * + * @param {number} n The vector size. + */ + Random(n: number): Vector; + + /** + * Vector filled with zeros. + * + * @param {number} n The vector size. + */ + Zero(n: number): Vector; +} + +interface Vector { + /** + * Gets an array containing the vector's elements. + */ + elements: Array; + + /** + * Returns element i of the vector. + */ + e(i: number): number; + + /** + * Returns the number of elements the vector has. + */ + dimensions(): number; + + /** + * Returns the modulus ('length') of the vector. + */ + modulus(): number; + + /** + * Returns true if the vector is equal to the argument. + * + * @param {Vector|Array} vector The vector to compare equality. + */ + eql(vector: Vector|Array): boolean; + + /** + * Returns a copy of the vector. + */ + dup(): Vector; + + /** + * Maps the vector to another vector according to the given function. + * + * @param {Function} fn The function to apply to each element (x, i) => {}. + */ + map(fn: (x: number, i: number) => any): Vector; + + /** + * Calls the iterator for each element of the vector in turn. + * + * @param {Function} fn The function to apply to each element (x, i) => {}. + */ + each(fn: (x: number, i: number) => any): void; + + /** + * Returns a new vector created by normalizing the receiver. + */ + toUnitVector(): Vector; + + /** + * Returns the angle between the vector and the argument (also a vector). + * + * @param {Vector} vector The other vector to calculate the angle. + */ + angleFrom(vector: Vector): number; + + /** + * Returns true if the vector is parallel to the argument. + * + * @param {Vector} vector The other vector. + */ + isParallelTo(vector: Vector): boolean; + + /** + * Returns true if the vector is antiparallel to the argument. + * + * @param {Vector} vector The other vector. + */ + isAntiparallelTo(vector: Vector): boolean; + + /** + * Returns true iff the vector is perpendicular to the argument. + * + * @param {Vector} vector The other vector. + */ + isPerpendicularTo(vector: Vector): boolean; + + /** + * Returns the result of adding the argument to the vector. + * + * @param {Vector|Array} vector The vector. + */ + add(vector: Vector|Array): Vector; + + /** + * Returns the result of subtracting the argument from the vector. + * + * @param {Vector|Array} vector The vector. + */ + subtract(vector: Vector|Array): Vector; + + /** + * Returns the result of multiplying the elements of the vector by the argument. + * + * @param {number} k The value by which to multiply the vector. + */ + multiply(k: number): Vector; + + /** + * Returns the result of multiplying the elements of the vector by the argument (Alias for multiply(k)). + * + * @param {number} k The value by which to multiply the vector. + */ + x(k: number): Vector; + + /** + * Returns the scalar product of the vector with the argument. Both vectors must have equal dimensionality. + * + * @param: {Vector|Array} vector The other vector. + */ + dot(vector: Vector|Array): number; + + /** + * Returns the vector product of the vector with the argument. Both vectors must have dimensionality 3. + * + * @param {Vector|Array} vector The other vector. + */ + cross(vector: Vector|Array): Vector; + + /** + * Returns the (absolute) largest element of the vector. + */ + max(): number; + + /** + * Returns the index of the first match found. + * + * @param {number} x The value. + */ + indexOf(x: number): number; + + /** + * Returns a diagonal matrix with the vector's elements as its diagonal elements. + */ + toDiagonalMatrix(): Matrix; + + /** + * Returns the result of rounding the elements of the vector. + */ + round(): Vector; + + /** + * Returns a copy of the vector with elements set to the given value if they differ from + * it by less than Sylvester.precision. + * + * @param {number} x The value to snap to. + */ + snapTo(x: number): Vector; + + /** + * Returns the vector's distance from the argument, when considered as a point in space. + * + * @param {Vector|Line|Plane} obj The object to calculate the distance. + */ + distanceFrom(obj: Vector|Line|Plane): number; + + /** + * Returns true if the vector is point on the given line. + * + * @param {Line} line The line. + */ + liesOn(line: Line): boolean; + + /** + * Return true if the vector is a point in the given plane. + * + * @param {Plane} plane The plane. + */ + liesIn(plane: Plane): boolean; + + /** + * Rotates the vector about the given object. The object should be a point if the vector is 2D, + * and a line if it is 3D. Be careful with line directions! + * + * @param {number} t The angle in radians. + * @param {Vector|Line} obj The rotation axis. + */ + rotate(t: number, obj: Vector|Line): Vector; + + /** + * Returns the result of reflecting the point in the given point, line or plane. + * + * @param {Vector|Line|Plane} obj The object. + */ + reflectionIn(obj: Vector|Line|Plane): Vector; + + /** + * Utility to make sure vectors are 3D. If they are 2D, a zero z-component is added. + */ + to3D(): Vector; + + /** + * Returns a string representation of the vector. + */ + inspect(): string; + + /** + * Set vector's elements from an array. + * + * @param {Vector|Array} els The elements. + */ + setElements(els: Vector|Array): Vector; +} + +interface MatrixStatic { + /** + * Constructor function. + * + * @param {Array|Array>|Vector|Matrix} elements The elements. + */ + create(elements: Array|Array>|Vector | Matrix): Matrix; + + /** + * Identity matrix of size n. + * + * @param {number} n The size. + */ + I(n: number): Matrix; + + /** + * Diagonal matrix - all off-diagonal elements are zero + * + * @param {any} elements The elements. + */ + Diagonal(elements: Array|Array>|Vector | Matrix): Matrix; + + /** + * Rotation matrix about some axis. If no axis is supplied, assume we're after a 2D transform. + * + * @param {number} theta The angle in radians. + * @param {Vector} a [Optional] The axis. + */ + Rotation(theta: number, a?: Vector): Matrix; + + RotationX(t: number): Matrix; + RotationY(t: number): Matrix; + RotationZ(t: number): Matrix; + + /** + * Random matrix of n rows, m columns. + * + * @param {number} n The number of rows. + * @param {number} m The number of columns. + */ + Random(n: number, m: number): Matrix; + + /** + * Matrix filled with zeros. + * + * @param {number} n The number of rows. + * @param {number} m The number of columns. + */ + Zero(n: number, m: number): Matrix; +} + +interface Matrix { + /** + * Gets a nested array containing the matrix's elements. + */ + elements: Array>; + /** + * Returns element (i,j) of the matrix. + * + * @param {number} i The row index. + * @param {number} j The column index. + */ + e(i: number, j: number): any; + + /** + * Returns row k of the matrix as a vector. + * + * @param {number} i The row index. + */ + row(i: number): Vector; + + /** + * Returns column k of the matrix as a vector. + * + * @param {number} j The column index. + */ + col(j: number): Vector; + + /** + * Returns the number of rows/columns the matrix has. + * + * @return {any} An object { rows: , cols: }. + */ + dimensions(): any; + + /** + * Returns the number of rows in the matrix. + */ + rows(): number; + + /** + * Returns the number of columns in the matrix. + */ + cols(): number; + + /** + * Returns true if the matrix is equal to the argument. You can supply a vector as the argument, + * in which case the receiver must be a one-column matrix equal to the vector. + * + * @param {Vector|Matrix} matrix The argument to compare. + */ + eql(matrix: Vector|Matrix): boolean; + + /** + * Returns a copy of the matrix. + */ + dup(): Matrix; + + /** + * Maps the matrix to another matrix (of the same dimensions) according to the given function. + * + * @param {Function} fn The function. + */ + map(fn: (x: number, i: number, j: number) => any): Matrix; + + /** + * Returns true iff the argument has the same dimensions as the matrix. + * + * @param {Matrix} matrix The other matrix. + */ + isSameSizeAs(matrix: Matrix): boolean; + + /** + * Returns the result of adding the argument to the matrix. + * + * @param {Matrix} matrix The matrix to add. + */ + add(matrix: Matrix): Matrix; + + /** + * Returns the result of subtracting the argument from the matrix. + * + * @param {Matrix} matrix The matrix to substract. + */ + subtract(matrix: Matrix): Matrix; + + /** + * Returns true iff the matrix can multiply the argument from the left. + * + * @param {Matrix} matrix The matrix. + */ + canMultiplyFromLeft(matrix: Matrix): boolean; + + /** + * Returns the result of multiplying the matrix from the right by the argument. If the argument is a scalar + * then just multiply all the elements. If the argument is a vector, a vector is returned, which saves you + * having to remember calling col(1) on the result. + * + * @param {number|Matrix} matrix The multiplier. + */ + multiply(matrix: number|Matrix): Matrix; + + /** + * Returns the result of multiplying the matrix from the right by the argument. If the argument is a scalar + * then just multiply all the elements. If the argument is a vector, a vector is returned, which saves you + * having to remember calling col(1) on the result. + * + * @param {Vector} vector The multiplier. + */ + multiply(vector: Vector): Vector; + + x(matrix: number|Matrix): Matrix; + + x(vector: Vector): Vector; + + /** + * Returns a submatrix taken from the matrix. Argument order is: start row, start col, nrows, ncols. + * Element selection wraps if the required index is outside the matrix's bounds, so you could use + * this to perform row/column cycling or copy-augmenting. + * + * @param {number} a Starting row index. + * @param {number} b Starting column index. + * @param {number} c Number of rows. + * @param {number} d Number of columns. + */ + minor(a: number, b: number, c: number, d: number): Matrix; + + /** + * Returns the transpose of the matrix. + */ + transpose(): Matrix; + + /** + * Returns true if the matrix is square. + */ + isSquare(): boolean; + + /** + * Returns the (absolute) largest element of the matrix. + */ + max(): number; + + /** + * Returns the indeces of the first match found by reading row-by-row from left to right. + * + * @param {number} x The value. + * + * @return {any} The element indeces i.e: { row:1, col:1 } + */ + indexOf(x: number): any; + + /** + * If the matrix is square, returns the diagonal elements as a vector; otherwise, returns null. + */ + diagonal(): Vector; + + /** + * Make the matrix upper (right) triangular by Gaussian elimination. This method only adds multiples + * of rows to other rows. No rows are scaled up or switched, and the determinant is preserved. + */ + toRightTriangular(): Matrix; + toUpperTriangular(): Matrix; + + /** + * Returns the determinant for square matrices. + */ + determinant(): number; + det(): number; + + /** + * Returns true if the matrix is singular. + */ + isSingular(): boolean; + + /** + * Returns the trace for square matrices. + */ + trace(): number; + tr(): number; + + /** + * Returns the rank of the matrix. + */ + rank(): number; + rk(): number; + + /** + * Returns the result of attaching the given argument to the right-hand side of the matrix. + * + * @param {Matrix|Vector} matrix The matrix or vector. + */ + augment(matrix: Matrix|Vector): Matrix; + + /** + * Returns the inverse (if one exists) using Gauss-Jordan. + */ + inverse(): Matrix; + inv(): Matrix; + + /** + * Returns the result of rounding all the elements. + */ + round(): Matrix; + + /** + * Returns a copy of the matrix with elements set to the given value if they differ from it + * by less than Sylvester.precision. + * + * @param {number} x The value. + */ + snapTo(x: number): Matrix; + + /** + * Returns a string representation of the matrix. + */ + inspect(): string; + + /** + * Set the matrix's elements from an array. If the argument passed is a vector, the resulting matrix + * will be a single column. + * + * @param {Array|Array>|Vector|Matrix} matrix The elements. + */ + setElements(matrix: Array|Array>|Vector|Matrix): Matrix; +} + +interface LineStatic { + /** + * Constructor function. + * + * @param Array|Vector anchor The anchor vector. + * @param Array|Vector direction The direction vector. + */ + create(anchor: Array|Vector, direction: Array|Vector): Line; + + X: Line; + Y: Line; + Z: Line; +} + +interface Line { + /** + * Gets the 3D vector corresponding to a point on the line. + */ + anchor: Vector; + + /** + * Gets a normalized 3D vector representing the line's direction. + */ + direction: Vector; + + /** + * Returns true if the argument occupies the same space as the line. + * + * @param {Line} line The other line. + */ + eql(line: Line): boolean; + + /** + * Returns a copy of the line. + */ + dup(): Line; + + /** + * Returns the result of translating the line by the given vector/array. + * + * @param {Vector|Array} vector The translation vector. + */ + translate(vector: Vector|Array): Line; + + /** + * Returns true if the line is parallel to the argument. Here, 'parallel to' means that the argument's + * direction is either parallel or antiparallel to the line's own direction. A line is parallel to a + * plane if the two do not have a unique intersection. + * + * @param {Line|Plane} obj The object. + */ + isParallelTo(obj: Line|Plane): boolean; + + /** + * Returns the line's perpendicular distance from the argument, which can be a point, a line or a plane. + * + * @param {Vector|Line|Plane} obj The object. + */ + distanceFrom(obj: Vector|Line|Plane): number; + + /** + * Returns true if the argument is a point on the line. + * + * @param {Vector} point The point. + */ + contains(point: Vector): boolean; + + /** + * Returns true if the line lies in the given plane. + * + * @param {Plane} plane The plane. + */ + liesIn(plane: Plane): boolean; + + /** + * Returns true if the line has a unique point of intersection with the argument. + * + * @param {Line|Plane} obj The object. + */ + intersects(obj: Line|Plane): boolean; + + /** + * Returns the unique intersection point with the argument, if one exists. + * + * @param {Line|Plane} obj The object. + */ + intersectionWith(obj: Line|Plane): Vector; + + /** + * Returns the point on the line that is closest to the given point or line. + * + * @param {Vector|Line} obj The object. + */ + pointClosestTo(obj: Vector|Line): Vector; + + /** + * Returns a copy of the line rotated by t radians about the given line. Works by finding the argument's + * closest point to this line's anchor point (call this C) and rotating the anchor about C. Also rotates + * the line's direction about the argument's. Be careful with this - the rotation axis' direction + * affects the outcome! + * + * @param {number} t The angle in radians. + * @param {Vector|Line} axis The axis. + */ + rotate(t: number, axis: Vector|Line): Line; + + /** + * Returns the line's reflection in the given point or line. + * + * @param {Vector|Line|Plane} obj The object. + */ + reflectionIn(obj: Vector|Line|Plane): Line; + + /** + * Set the line's anchor point and direction. + * + * @param {Array|Vector} anchor The anchor vector. + * @param {Array|Vector} direction The direction vector. + */ + setVectors(anchor: Array|Vector, direction: Array|Vector): Line; +} + +interface PlaneStatic { + /** + * Constructor function. + */ + create(anchor: Array|Vector, normal: Array|Vector): Plane; + + /** + * Constructor function. + */ + create(anchor: Array|Vector, v1: Array|Vector, v2: Array|Vector): Plane; + + XY: Plane; + YZ: Plane; + ZX: Plane; + YX: Plane; +} + +interface Plane { + /** + * Gets the 3D vector corresponding to a point in the plane. + */ + anchor: Vector; + + /** + * Gets a normalized 3D vector perpendicular to the plane. + */ + normal: Vector; + + /** + * Returns true if the plane occupies the same space as the argument. + * + * @param {Plane} plane The other plane. + */ + eql(plane: Plane): boolean; + + /** + * Returns a copy of the plane. + */ + dup(): Plane; + + /** + * Returns the result of translating the plane by the given vector. + * + * @param {Array|Vector} vector The translation vector. + */ + translate(vector: Array|Vector): Plane; + + /** + * Returns true if the plane is parallel to the argument. Will return true if the planes are equal, + * or if you give a line and it lies in the plane. + * + * @param {Line|Plane} obj The object. + */ + isParallelTo(obj: Line|Plane): boolean; + + /** + * Returns true if the receiver is perpendicular to the argument. + * + * @param {Plane} plane The other plane. + */ + isPerpendicularTo(plane: Plane): boolean; + + /** + * Returns the plane's distance from the given object (point, line or plane). + * + * @parm {Vector|Line|Plane} obj The object. + */ + distanceFrom(obj: Vector|Line|Plane): number; + + /** + * Returns true if the plane contains the given point or line. + * + * @param {Vector|Line} obj The object. + */ + contains(obj: Vector|Line): boolean; + + /** + * Returns true if the plane has a unique point/line of intersection with the argument. + * + * @param {Line|Plane} obj The object. + */ + intersects(obj: Line|Plane): boolean; + + /** + * Returns the unique intersection with the argument, if one exists. + * + * @param {Line} line The line. + */ + intersectionWith(line: Line): Vector; + + /** + * Returns the unique intersection with the argument, if one exists. + * + * @param {Plane} plane The plane. + */ + intersectionWith(plane: Plane): Line; + + /** + * Returns the point in the plane closest to the given point. + * + * @param {Vector} point The point. + */ + pointClosestTo(point: Vector): Vector; + + /** + * Returns a copy of the plane, rotated by t radians about the given line. See notes on Line#rotate. + * + * @param {number} t The angle in radians. + * @param {Line} axis The line axis. + */ + rotate(t: number, axis: Line): Plane; + + /** + * Returns the reflection of the plane in the given point, line or plane. + * + * @param {Vector|Line|Plane} obj The object. + */ + reflectionIn(obj: Vector|Line|Plane): Plane; + + /** + * Sets the anchor point and normal to the plane. Normal vector is normalised before storage. + * + * @param {Array|Vector} anchor The anchor vector. + * @param {Array|Vector} normal The normal vector. + */ + setVectors(anchor: Array|Vector, normal: Array|Vector): Plane; + + /** + * Sets the anchor point and normal to the plane. The normal is calculated by assuming the three points + * should lie in the same plane. Normal vector is normalised before storage. + * + * @param {Array|Vector} anchor The anchor vector. + * @param {Array|Vector} v1 The first direction vector. + * @param {Array|Vector} v2 The second direction vector. + */ + setVectors(anchor: Array|Vector, v1: Array|Vector, v2: Array|Vector): Plane; +} + +declare module Sylvester { + export var version: string; + export var precision: number; +} + +declare var Vector: VectorStatic; +declare var Matrix: MatrixStatic; +declare var Line: LineStatic; +declare var Plane: PlaneStatic; + +/** +* Constructor function. +* +* @param {Vector|Array): Vector; + +/** +* Constructor function. +* +* @param {Array|Array>|Vector|Matrix} elements The elements. +*/ +declare function $M(elements: Array|Array>|Vector | Matrix): Matrix; + +/** +* Constructor function. +* +* @param Array|Vector anchor The anchor vector. +* @param Array|Vector direction The direction vector. +*/ +declare function $L(anchor: Array|Vector, direction: Array|Vector): Line; + +/** +* Constructor function. +* +* @param {Array|Vector} anchor The anchor vector. +* @param {Array|Vector} normal The normal vector. +*/ +declare function $P(anchor: Array|Vector, normal: Array|Vector): Plane; + +/** + * Constructor function. + * + * @param {Array|Vector} anchor The anchor vector. + * @param {Array|Vector} v1 The first direction vector. + * @param {Array|Vecotr} v2 The second direction vector. + */ +declare function $P(anchor: Array|Vector, v1: Array|Vector, v2: Array|Vector): Plane; \ No newline at end of file From 1fbadc073327fd627065c772509069b23c755d30 Mon Sep 17 00:00:00 2001 From: Simon Gausmann Date: Wed, 21 Oct 2015 20:45:16 +0200 Subject: [PATCH 0016/1506] removing I from Interface-Names --- cache-manager/cache-manager-tests.ts | 16 ++++++++-------- cache-manager/cache-manager.d.ts | 27 +++++++++++++-------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/cache-manager/cache-manager-tests.ts b/cache-manager/cache-manager-tests.ts index 36d2a559a0..36eeb4c141 100644 --- a/cache-manager/cache-manager-tests.ts +++ b/cache-manager/cache-manager-tests.ts @@ -2,10 +2,10 @@ import * as cacheManager from 'cache-manager' -const memoryCache = cacheManager.caching({store: 'memory', max: 100, ttl: 10/*seconds*/}); +const memoryCache = cacheManager.caching({ store: 'memory', max: 100, ttl: 10/*seconds*/ }); const ttl = 5; -memoryCache.set('foo', 'bar', {ttl: ttl}, (err) => { +memoryCache.set('foo', 'bar', { ttl: ttl }, (err) => { if (err) { throw err; @@ -21,25 +21,25 @@ memoryCache.set('foo', 'bar', {ttl: ttl}, (err) => { }); }); -function getUser(id:number, cb:Function) { +function getUser(id: number, cb: Function) { - cb(null, {id: id, name: 'Bob'}); + cb(null, { id: id, name: 'Bob' }); } const userId = 123; const key = 'user_' + userId; // Note: ttl is optional in wrap() -memoryCache.wrap<{id: number, name: string}>(key, (cb) => { +memoryCache.wrap<{ id: number, name: string }>(key, (cb) => { getUser(userId, cb); -}, {ttl: ttl}, (err, user) => { +}, { ttl: ttl }, (err, user) => { //console.log(user); // Second time fetches user from memoryCache - memoryCache.wrap<{id: number, name: string}>(key, (cb)=> { + memoryCache.wrap<{ id: number, name: string }>(key, (cb) => { getUser(userId, cb); @@ -48,4 +48,4 @@ memoryCache.wrap<{id: number, name: string}>(key, (cb) => { //console.log(user); }); -}); \ No newline at end of file +}); diff --git a/cache-manager/cache-manager.d.ts b/cache-manager/cache-manager.d.ts index d912f9f7bd..9570857f01 100644 --- a/cache-manager/cache-manager.d.ts +++ b/cache-manager/cache-manager.d.ts @@ -5,32 +5,31 @@ declare module 'cache-manager' { - interface ICachingConfig { + interface CachingConfig { ttl: number; } - interface IStoreConfig extends ICachingConfig { - store:string; + interface StoreConfig extends CachingConfig { + store: string; max?: number; - isCacheableValue?:(value:any)=>boolean; + isCacheableValue?: (value: any) => boolean; } - interface ICache { - set(key:string, value:T, options:ICachingConfig, callback?:(error:any)=>void):void; - set(key:string, value:T, ttl:number, callback?:(error:any)=>void):void; + interface Cache { + set(key: string, value: T, options: CachingConfig, callback?: (error: any) => void): void; + set(key: string, value: T, ttl: number, callback?: (error: any) => void): void; - wrap(key:string, wrapper:(callback:(error:any, result:T)=>void)=>void, options:ICachingConfig, callback:(error:any, result:T)=>void):void; - wrap(key:string, wrapper:(callback:(error:any, result:T)=>void)=>void, callback:(error:any, result:T)=>void):void; + wrap(key: string, wrapper: (callback: (error: any, result: T) => void) => void, options: CachingConfig, callback: (error: any, result: T) => void): void; + wrap(key: string, wrapper: (callback: (error: any, result: T) => void) => void, callback: (error: any, result: T) => void): void; - get(key:string, callback:(error:any, result:T)=>void):void; + get(key: string, callback: (error: any, result: T) => void): void; - del(key:string, callback?:(error:any)=>void):void; + del(key: string, callback?: (error: any) => void): void; } module cacheManager { - function caching(ICongig:IStoreConfig):ICache; - - function multiCaching(Caches:ICache[]):ICache; + function caching(ICongig: StoreConfig): Cache; + function multiCaching(Caches: Cache[]): Cache; } export = cacheManager; From 2319d7a678b044b3a31c00acbd87f23c233cfd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Ostroz=CC=8Cli=CC=81k?= Date: Thu, 29 Oct 2015 13:28:44 +0100 Subject: [PATCH 0017/1506] Added karma-chai-sinon --- karma-chai-sinon/karma-chai-sinon.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 karma-chai-sinon/karma-chai-sinon.d.ts diff --git a/karma-chai-sinon/karma-chai-sinon.d.ts b/karma-chai-sinon/karma-chai-sinon.d.ts new file mode 100644 index 0000000000..059a1b80ef --- /dev/null +++ b/karma-chai-sinon/karma-chai-sinon.d.ts @@ -0,0 +1,12 @@ +// Type definitions for karma-chai-sinon 0.1.5 +// Project: https://github.com/tubalmartin/karma-chai-sinon +// Definitions by: Václav Ostrožlík +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare var should: Chai.Should; +declare var expect: Chai.ExpectStatic; +declare var assert: Chai.AssertStatic; +declare var sinon: Sinon.SinonStatic; From 6d2b4cc7a04d45df15cafe6bdb16c697e7413d2e Mon Sep 17 00:00:00 2001 From: Dominic Alie Date: Fri, 30 Oct 2015 10:12:18 -0400 Subject: [PATCH 0018/1506] Fix namespace issue --- sylvester/sylvester-test.ts | 17 +++ sylvester/sylvester.d.ts | 212 ++++++++++++++++++------------------ 2 files changed, 123 insertions(+), 106 deletions(-) diff --git a/sylvester/sylvester-test.ts b/sylvester/sylvester-test.ts index 1eb5e076ec..e42bb374e0 100644 --- a/sylvester/sylvester-test.ts +++ b/sylvester/sylvester-test.ts @@ -13,10 +13,14 @@ var m: Matrix = Matrix.create(v); var p: Plane = Plane.create(v, v); var v: Vector = Vector.create([n, n]); +l = $L(v, v); +l = $L([n], [n]); l = Line.create([n], [n]); + l = Line.X; l = Line.Y; l = Line.Z; + v = l.anchor; bool = l.contains(v); v = l.direction; @@ -44,10 +48,15 @@ l = l.setVectors(v, [n, n]); l = l.translate(v); l = l.translate([n, n]); +m = $M(m); +m = $M([n]); +m = $M([[n]]); +m = $M(v); m = Matrix.create(m); m = Matrix.create([n]); m = Matrix.create([[n]]); m = Matrix.create(v); + m = Matrix.Diagonal(m); m = Matrix.Diagonal([n]); m = Matrix.Diagonal([[n]]); @@ -114,11 +123,15 @@ m = m.x(m); m = m.x(n); v = m.x(v); +p = $P([n], [n]); +p = $P(v, v); p = Plane.create([0], [0]); + p = Plane.XY; p = Plane.YX; p = Plane.YZ; p = Plane.ZX; + v = p.anchor; bool = p.contains(v); bool = p.contains(l); @@ -147,10 +160,14 @@ p = p.setVectors(v, v, v); p = p.translate([n]); p = p.translate(v); +v = $V(v); +v = $V([n]); v = Vector.create(v); + v = Vector.i; v = Vector.j; v = Vector.k; + v = Vector.Random(n); v = Vector.Zero(n); v = v.add(v); diff --git a/sylvester/sylvester.d.ts b/sylvester/sylvester.d.ts index 0aa869d38c..2b899728f7 100644 --- a/sylvester/sylvester.d.ts +++ b/sylvester/sylvester.d.ts @@ -7,29 +7,111 @@ // Vector and Matrix mathematics modules for JavaScript // Copyright (c) 2007 James Coglan -interface VectorStatic { - /** - * Constructor function. - */ - create(elements: Vector|Array): Vector; +declare module Sylvester { + interface VectorStatic { + /** + * Constructor function. + */ + create(elements: Vector|Array): Vector; - i: Vector; - j: Vector; - k: Vector; + i: Vector; + j: Vector; + k: Vector; - /** - * Random vector of size n. - * - * @param {number} n The vector size. - */ - Random(n: number): Vector; + /** + * Random vector of size n. + * + * @param {number} n The vector size. + */ + Random(n: number): Vector; - /** - * Vector filled with zeros. - * - * @param {number} n The vector size. - */ - Zero(n: number): Vector; + /** + * Vector filled with zeros. + * + * @param {number} n The vector size. + */ + Zero(n: number): Vector; + } + interface MatrixStatic { + /** + * Constructor function. + * + * @param {Array|Array>|Vector|Matrix} elements The elements. + */ + create(elements: Array|Array>|Vector | Matrix): Matrix; + + /** + * Identity matrix of size n. + * + * @param {number} n The size. + */ + I(n: number): Matrix; + + /** + * Diagonal matrix - all off-diagonal elements are zero + * + * @param {any} elements The elements. + */ + Diagonal(elements: Array|Array>|Vector | Matrix): Matrix; + + /** + * Rotation matrix about some axis. If no axis is supplied, assume we're after a 2D transform. + * + * @param {number} theta The angle in radians. + * @param {Vector} a [Optional] The axis. + */ + Rotation(theta: number, a?: Vector): Matrix; + + RotationX(t: number): Matrix; + RotationY(t: number): Matrix; + RotationZ(t: number): Matrix; + + /** + * Random matrix of n rows, m columns. + * + * @param {number} n The number of rows. + * @param {number} m The number of columns. + */ + Random(n: number, m: number): Matrix; + + /** + * Matrix filled with zeros. + * + * @param {number} n The number of rows. + * @param {number} m The number of columns. + */ + Zero(n: number, m: number): Matrix; + } + + interface LineStatic { + /** + * Constructor function. + * + * @param Array|Vector anchor The anchor vector. + * @param Array|Vector direction The direction vector. + */ + create(anchor: Array|Vector, direction: Array|Vector): Line; + + X: Line; + Y: Line; + Z: Line; + } + interface PlaneStatic { + /** + * Constructor function. + */ + create(anchor: Array|Vector, normal: Array|Vector): Plane; + + /** + * Constructor function. + */ + create(anchor: Array|Vector, v1: Array|Vector, v2: Array|Vector): Plane; + + XY: Plane; + YZ: Plane; + ZX: Plane; + YX: Plane; + } } interface Vector { @@ -239,57 +321,6 @@ interface Vector { setElements(els: Vector|Array): Vector; } -interface MatrixStatic { - /** - * Constructor function. - * - * @param {Array|Array>|Vector|Matrix} elements The elements. - */ - create(elements: Array|Array>|Vector | Matrix): Matrix; - - /** - * Identity matrix of size n. - * - * @param {number} n The size. - */ - I(n: number): Matrix; - - /** - * Diagonal matrix - all off-diagonal elements are zero - * - * @param {any} elements The elements. - */ - Diagonal(elements: Array|Array>|Vector | Matrix): Matrix; - - /** - * Rotation matrix about some axis. If no axis is supplied, assume we're after a 2D transform. - * - * @param {number} theta The angle in radians. - * @param {Vector} a [Optional] The axis. - */ - Rotation(theta: number, a?: Vector): Matrix; - - RotationX(t: number): Matrix; - RotationY(t: number): Matrix; - RotationZ(t: number): Matrix; - - /** - * Random matrix of n rows, m columns. - * - * @param {number} n The number of rows. - * @param {number} m The number of columns. - */ - Random(n: number, m: number): Matrix; - - /** - * Matrix filled with zeros. - * - * @param {number} n The number of rows. - * @param {number} m The number of columns. - */ - Zero(n: number, m: number): Matrix; -} - interface Matrix { /** * Gets a nested array containing the matrix's elements. @@ -515,20 +546,6 @@ interface Matrix { setElements(matrix: Array|Array>|Vector|Matrix): Matrix; } -interface LineStatic { - /** - * Constructor function. - * - * @param Array|Vector anchor The anchor vector. - * @param Array|Vector direction The direction vector. - */ - create(anchor: Array|Vector, direction: Array|Vector): Line; - - X: Line; - Y: Line; - Z: Line; -} - interface Line { /** * Gets the 3D vector corresponding to a point on the line. @@ -637,23 +654,6 @@ interface Line { setVectors(anchor: Array|Vector, direction: Array|Vector): Line; } -interface PlaneStatic { - /** - * Constructor function. - */ - create(anchor: Array|Vector, normal: Array|Vector): Plane; - - /** - * Constructor function. - */ - create(anchor: Array|Vector, v1: Array|Vector, v2: Array|Vector): Plane; - - XY: Plane; - YZ: Plane; - ZX: Plane; - YX: Plane; -} - interface Plane { /** * Gets the 3D vector corresponding to a point in the plane. @@ -780,10 +780,10 @@ declare module Sylvester { export var precision: number; } -declare var Vector: VectorStatic; -declare var Matrix: MatrixStatic; -declare var Line: LineStatic; -declare var Plane: PlaneStatic; +declare var Vector: Sylvester.VectorStatic; +declare var Matrix: Sylvester.MatrixStatic; +declare var Line: Sylvester.LineStatic; +declare var Plane: Sylvester.PlaneStatic; /** * Constructor function. From 9c433c79496fb2b79a6e87f7e4be5d3bc3dfdf5a Mon Sep 17 00:00:00 2001 From: Dominic Alie Date: Mon, 2 Nov 2015 09:52:28 -0500 Subject: [PATCH 0019/1506] Renamed test file --- sylvester/{sylvester-test.ts => sylvester-tests.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sylvester/{sylvester-test.ts => sylvester-tests.ts} (100%) diff --git a/sylvester/sylvester-test.ts b/sylvester/sylvester-tests.ts similarity index 100% rename from sylvester/sylvester-test.ts rename to sylvester/sylvester-tests.ts From b97eba0f03f534499b220f6a12af8da7855d5342 Mon Sep 17 00:00:00 2001 From: aaronbeall Date: Fri, 20 Nov 2015 12:59:08 -0500 Subject: [PATCH 0020/1506] Update react-addons-css-transition-group.d.ts with Timeout properties Added missing transitionAppearTimeout, transitionEnterTimeout, transitionLeaveTimeout to CSSTransitionGroupProps --- react/react-addons-css-transition-group.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/react/react-addons-css-transition-group.d.ts b/react/react-addons-css-transition-group.d.ts index c9b40476d5..19db30ec5e 100644 --- a/react/react-addons-css-transition-group.d.ts +++ b/react/react-addons-css-transition-group.d.ts @@ -20,8 +20,11 @@ declare namespace __React { interface CSSTransitionGroupProps extends TransitionGroupProps { transitionName: string | CSSTransitionGroupTransitionName; transitionAppear?: boolean; + transitionAppearTimeout?: number; transitionEnter?: boolean; + transitionEnterTimeout?: number; transitionLeave?: boolean; + transitionLeaveTimeout?: number; } type CSSTransitionGroup = ComponentClass; From a98b730f38c175babaad498da2000a41ade24ce0 Mon Sep 17 00:00:00 2001 From: Droritos Date: Sat, 28 Nov 2015 12:25:55 +0200 Subject: [PATCH 0021/1506] Create lockr.d.ts --- lockr/lockr.d.ts | 108 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 lockr/lockr.d.ts diff --git a/lockr/lockr.d.ts b/lockr/lockr.d.ts new file mode 100644 index 0000000000..eba2b85609 --- /dev/null +++ b/lockr/lockr.d.ts @@ -0,0 +1,108 @@ +// Type definitions for lockr 0.8.3 +// Project: https://github.com/tsironis/lockr +// Definitions by: Dror Weiss +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare var Lockr: lockr.ILockrStatic; + +declare module lockr { + interface ILockrStatic { + + /** + * Set a key to a particular value or a hash object (Object or Array) under a hash key. + * @param key + * @param value + */ + set(key: string, value: string | number | Object); + + /** + * Set a key to a particular value or a hash object (Object or Array) under a hash key. + * @param key + * @param value + */ + set(key: string, value: Array); + + /** + * Removes all data associated to a key. + * @param key + */ + rm(key: string); + + /** + * Returns the saved value for given key, even if the saved value is hash object. + * If value is null or undefined it returns a default value. + * @param key + * @param defaultValue + */ + get(key: string, defaultValue?: T): T; + + /** + * Adds a unique value to a particular set under a hash key. + * @param key + * @param value + */ + sadd(key: string, value: string | number | Object); + + /** + * Adds a unique value to a particular set under a hash key. + * @param key + * @param value + */ + sadd(key: string, value: Array); + + /** + * Returns the values of a particular set under a hash key. + * @param key + */ + smembers(key: string): (string | number | Object)[]; + + /** + * Returns the values of a particular set under a hash key. + * @param key + */ + smembers(key: string): Array; + + /** + * Returns whether the value exists in a particular set under a hash key. + * @param key + * @param value + */ + sismember(key: string, value: string | number | Object): boolean; + + /** + * Returns whether the value exists in a particular set under a hash key. + * @param key + * @param value + */ + sismember(key: string, value: Array): boolean; + + /** + * Removes a value from a particular set under a hash key. + * @param key + * @param value + */ + srem(key: string, value: string | number | Object); + + /** + * Removes a value from a particular set under a hash key. + * @param key + * @param value + */ + srem(key: string, value: Array); + + /** + * Returns all saved values & objects, in an Array. + */ + getAll(): (string | number | Object)[]; + + /** + * Empties localStorage. + */ + flush(); + } +} + + +declare module "lockr" { + export = Lockr; +} From 8b3ef3165d577de1621fbb174b90bc3a106b3e18 Mon Sep 17 00:00:00 2001 From: Droritos Date: Sat, 28 Nov 2015 13:05:13 +0200 Subject: [PATCH 0022/1506] Update lockr.d.ts --- lockr/lockr.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lockr/lockr.d.ts b/lockr/lockr.d.ts index eba2b85609..6655bf2b22 100644 --- a/lockr/lockr.d.ts +++ b/lockr/lockr.d.ts @@ -8,6 +8,11 @@ declare var Lockr: lockr.ILockrStatic; declare module lockr { interface ILockrStatic { + /** + * The prefix used by lockr. + */ + prefix: string; + /** * Set a key to a particular value or a hash object (Object or Array) under a hash key. * @param key From 39ac2bba70530ac65281823d8cce5202873d50f4 Mon Sep 17 00:00:00 2001 From: Droritos Date: Sat, 28 Nov 2015 13:06:11 +0200 Subject: [PATCH 0023/1506] Create lockr-tests.ts --- lockr/lockr-tests.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lockr/lockr-tests.ts diff --git a/lockr/lockr-tests.ts b/lockr/lockr-tests.ts new file mode 100644 index 0000000000..a791413965 --- /dev/null +++ b/lockr/lockr-tests.ts @@ -0,0 +1,25 @@ +/// + +Lockr.set('test', 123); +Lockr.sadd('array', 2); +Lockr.sadd('array', 3); +Lockr.set('hash', {"test": 123, "hey": "whatsup"}); +Lockr.set('hash', [1, 2, 3]); +Lockr.set('valueFalse', false); +Lockr.set('value0', 0); + +let value; +value = Lockr.get('test'); +Lockr.rm('test'); + +let contents; +contents = Lockr.getAll(); +Lockr.flush(); + +Lockr.sadd('test_set', 1); +Lockr.sadd('test_set', 2); +Lockr.smembers('test_set'); +Lockr.sismember('test_set', 1); +Lockr.srem('test_set', 1); + +Lockr.prefix = "imaprefix"; From f3ace73ce186068711d968e124bc1f5f1b1166fc Mon Sep 17 00:00:00 2001 From: Droritos Date: Sat, 28 Nov 2015 13:12:56 +0200 Subject: [PATCH 0024/1506] Update lockr.d.ts --- lockr/lockr.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lockr/lockr.d.ts b/lockr/lockr.d.ts index 6655bf2b22..169db126f5 100644 --- a/lockr/lockr.d.ts +++ b/lockr/lockr.d.ts @@ -18,20 +18,20 @@ declare module lockr { * @param key * @param value */ - set(key: string, value: string | number | Object); + set(key: string, value: string | number | Object): void; /** * Set a key to a particular value or a hash object (Object or Array) under a hash key. * @param key * @param value */ - set(key: string, value: Array); + set(key: string, value: Array): void; /** * Removes all data associated to a key. * @param key */ - rm(key: string); + rm(key: string): void; /** * Returns the saved value for given key, even if the saved value is hash object. @@ -46,14 +46,14 @@ declare module lockr { * @param key * @param value */ - sadd(key: string, value: string | number | Object); + sadd(key: string, value: string | number | Object): void; /** * Adds a unique value to a particular set under a hash key. * @param key * @param value */ - sadd(key: string, value: Array); + sadd(key: string, value: Array): void; /** * Returns the values of a particular set under a hash key. @@ -86,14 +86,14 @@ declare module lockr { * @param key * @param value */ - srem(key: string, value: string | number | Object); + srem(key: string, value: string | number | Object): void; /** * Removes a value from a particular set under a hash key. * @param key * @param value */ - srem(key: string, value: Array); + srem(key: string, value: Array): void; /** * Returns all saved values & objects, in an Array. @@ -103,7 +103,7 @@ declare module lockr { /** * Empties localStorage. */ - flush(); + flush(): void; } } From e9880e3833ae5f39fbae9b424e9f77a86da62add Mon Sep 17 00:00:00 2001 From: Droritos Date: Sat, 28 Nov 2015 13:19:03 +0200 Subject: [PATCH 0025/1506] Update lockr-tests.ts --- lockr/lockr-tests.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lockr/lockr-tests.ts b/lockr/lockr-tests.ts index a791413965..d1e2542121 100644 --- a/lockr/lockr-tests.ts +++ b/lockr/lockr-tests.ts @@ -8,12 +8,10 @@ Lockr.set('hash', [1, 2, 3]); Lockr.set('valueFalse', false); Lockr.set('value0', 0); -let value; -value = Lockr.get('test'); +let value = Lockr.get('test'); Lockr.rm('test'); -let contents; -contents = Lockr.getAll(); +let contents = Lockr.getAll(); Lockr.flush(); Lockr.sadd('test_set', 1); From 13e6958c49d05cd0093dd24448811ecbce35be7c Mon Sep 17 00:00:00 2001 From: Droritos Date: Sat, 28 Nov 2015 13:20:38 +0200 Subject: [PATCH 0026/1506] Update lockr-tests.ts --- lockr/lockr-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lockr/lockr-tests.ts b/lockr/lockr-tests.ts index d1e2542121..c8b3596630 100644 --- a/lockr/lockr-tests.ts +++ b/lockr/lockr-tests.ts @@ -8,7 +8,7 @@ Lockr.set('hash', [1, 2, 3]); Lockr.set('valueFalse', false); Lockr.set('value0', 0); -let value = Lockr.get('test'); +let value = Lockr.get('test'); Lockr.rm('test'); let contents = Lockr.getAll(); From 3e1a4a1af0564a993639a72d61835edbd4d0eabc Mon Sep 17 00:00:00 2001 From: Droritos Date: Sun, 6 Dec 2015 15:22:46 +0200 Subject: [PATCH 0027/1506] Update lockr.d.ts Changed naming of interface ILockrStatic to LockrStatic --- lockr/lockr.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lockr/lockr.d.ts b/lockr/lockr.d.ts index 169db126f5..c615c13e5d 100644 --- a/lockr/lockr.d.ts +++ b/lockr/lockr.d.ts @@ -3,10 +3,10 @@ // Definitions by: Dror Weiss // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare var Lockr: lockr.ILockrStatic; +declare var Lockr: lockr.LockrStatic; declare module lockr { - interface ILockrStatic { + interface LockrStatic { /** * The prefix used by lockr. From f4f0812f254fafa92c45bca356aa3e570c163f72 Mon Sep 17 00:00:00 2001 From: Ian Ker-Seymer Date: Mon, 7 Dec 2015 13:22:33 -0500 Subject: [PATCH 0028/1506] Add NavbarHeader to react-bootstrap --- react-bootstrap/react-bootstrap.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/react-bootstrap/react-bootstrap.d.ts b/react-bootstrap/react-bootstrap.d.ts index c63c55e9d0..80286f1743 100644 --- a/react-bootstrap/react-bootstrap.d.ts +++ b/react-bootstrap/react-bootstrap.d.ts @@ -475,6 +475,15 @@ declare module "react-bootstrap" { interface NavBrandClass extends React.ComponentClass { } var NavBrand: NavBrandClass; + // + // ---------------------------------------- + interface NavbarHeaderProps { + + } + interface NavbarHeader extends React.ReactElement { } + interface NavbarHeaderClass extends React.ComponentClass { } + var NavbarHeader: NavbarHeaderClass; + // // ---------------------------------------- From fe3f2f35a881cd824c8da1142ff0b21a3071a372 Mon Sep 17 00:00:00 2001 From: cherrydev Date: Mon, 7 Dec 2015 12:45:56 -0800 Subject: [PATCH 0029/1506] added missing static functions Function definition for Dexie.delete at Dexie.js:3246 Function definition for Dexie.exists at Dexie.js:3259 Other static definitions are still missing. --- dexie/dexie.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dexie/dexie.d.ts b/dexie/dexie.d.ts index 13b9b31e0b..2de122385e 100644 --- a/dexie/dexie.d.ts +++ b/dexie/dexie.d.ts @@ -37,6 +37,10 @@ declare class Dexie { static shallowClone(obj: Object): Object; static deepClone(obj: Object): Object; + + static delete(databaseName : string): Dexie.Promise; + + static exists(databaseName : string): Dexie.Promise; version(versionNumber: number): Dexie.Version; From ae8fce14da334c1e525aa2515bbc494073448232 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Thu, 10 Dec 2015 09:37:39 +1100 Subject: [PATCH 0030/1506] Update definitions for ES6 compatability, NOTE: Confusion over cryptojs vs crypto-js. I would suggest merging the two projects but this needs to happen on the npm repository first... --- crypto-js/crypto-js.d.ts | 579 +++++++++++++++++++++++++++++++++++---- 1 file changed, 520 insertions(+), 59 deletions(-) diff --git a/crypto-js/crypto-js.d.ts b/crypto-js/crypto-js.d.ts index 0f02514027..cde0abd9b9 100644 --- a/crypto-js/crypto-js.d.ts +++ b/crypto-js/crypto-js.d.ts @@ -1,67 +1,528 @@ -// Type definitions for crypto-js v3.1.3 +// Type definitions for crypto-js v3.1.5 // Project: https://github.com/evanvosberg/crypto-js -// Definitions by: Michael Zabka +// Definitions by: Michael Zabka , Jason Turner // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module CryptoJS { - type Hash = (message: string, key?: string, ...options: any[]) => string; +declare module CryptoJSLocal{ + module lib{ + interface Base{ + extend(overrides: Object): Object + init(...args: any[]): void + //arguments of create() is same as init(). This is true for all subclasses + create(...args: any[]): Base + mixIn(properties: Object): void + clone(): Base + } - export interface Hashes { - MD5: Hash; - SHA1: Hash; - SHA256: Hash; - SHA224: Hash; - SHA512: Hash; - SHA384: Hash; - SHA3: Hash; - RIPEMD160: Hash; - HmacMD5: Hash; - HmacSHA1: Hash; - HmacSHA256: Hash; - HmacSHA224: Hash; - HmacSHA512: Hash; - HmacSHA384: Hash; - HmacSHA3: Hash; - HmacRIPEMD160: Hash; - PBKDF2: Hash; - AES: Hash; - TripleDES: Hash; - RC4: Hash; - Rabbit: Hash; - RabbitLegacy: Hash; - EvpKDF: Hash; - format: { - OpenSSL: Hash; - Hex: Hash; - }; - enc: { - Latin1: Hash; - Utf8: Hash; - Hex: Hash; - Utf16: Hash; - Base64: Hash; - }; - mode: { - CFB: Hash; - CTR: Hash; - CTRGladman: Hash; - OFB: Hash; - ECB: Hash; - }; - pad: { - Pkcs7: Hash; - Ansix923: Hash; - Iso10126: Hash; - Iso97971: Hash; - ZeroPadding: Hash; - NoPadding: Hash; - }; - } + interface WordArray extends Base{ + words: number[] + sigBytes: number + init(words?: number[], sigBytes?: number): void + create(words?: number[], sigBytes?: number): WordArray - export var hashes: Hashes; + init(typedArray: ArrayBuffer): void + init(typedArray: Int8Array): void + + //Because TypeScript uses a structural type system then we don't need (& can't) + //declare oveload function init, create for the following type (same as Int8Array): + //then Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array + //Note also: Uint8ClampedArray is not defined in lib.d.ts & not supported in IE + //@see http://compatibility.shwups-cms.ch/en/home?&property=Uint8ClampedArray + + create(typedArray: ArrayBuffer): WordArray + create(typedArray: Int8Array): WordArray + + toString(encoder?: enc.IEncoder): string + concat(wordArray: WordArray): WordArray + clamp(): void + clone(): WordArray + random(nBytes: number): WordArray + } + + interface BufferedBlockAlgorithm extends Base{ + reset(): void + clone(): BufferedBlockAlgorithm + } + + //tparam C - Configuration type + interface IHasher extends BufferedBlockAlgorithm{ + cfg: C + init(cfg?: C): void + create(cfg?: C): IHasher + + update(messageUpdate: string): Hasher + update(messageUpdate: WordArray): Hasher + + finalize(messageUpdate?: string): WordArray + finalize(messageUpdate?: WordArray): WordArray + + blockSize: number + + _createHelper(hasher: Hasher): IHasherHelper + _createHmacHelper(hasher: Hasher): IHasherHmacHelper + + clone(): IHasher + } + interface Hasher extends IHasher{} + + //tparam C - Configuration type + interface IHasherHelper{ + (message: string, cfg?: C): WordArray + (message: WordArray, cfg?: C): WordArray + } + interface HasherHelper extends IHasherHelper{} + + interface IHasherHmacHelper{ + (message: string, key: string): WordArray + (message: string, key: WordArray): WordArray + (message: WordArray, key: string): WordArray + (message: WordArray, key: WordArray): WordArray + } + + //tparam C - Configuration type + interface ICipher extends BufferedBlockAlgorithm{ + cfg: C + createEncryptor(key: WordArray, cfg?: C): ICipher + createDecryptor(key: WordArray, cfg?: C): ICipher + + create(xformMode?: number, key?: WordArray, cfg?: C): ICipher + init(xformMode?: number, key?: WordArray, cfg?: C): void + + process(dataUpdate: string): WordArray + process(dataUpdate: WordArray): WordArray + + finalize(dataUpdate?: string): WordArray + finalize(dataUpdate?: WordArray): WordArray + + keySize: number + ivSize: number + + _createHelper(cipher: Cipher): ICipherHelper + + clone(): ICipher + } + interface Cipher extends ICipher{} + + interface IStreamCipher extends ICipher{ + drop?: number; + + createEncryptor(key: WordArray, cfg?: C): IStreamCipher + createDecryptor(key: WordArray, cfg?: C): IStreamCipher + + create(xformMode?: number, key?: WordArray, cfg?: C): IStreamCipher + + blockSize: number + } + interface StreamCipher extends IStreamCipher{} + + interface BlockCipherMode extends Base{ + createEncryptor(cipher: Cipher, iv: number[]): mode.IBlockCipherEncryptor + createDecryptor(cipher: Cipher, iv: number[]): mode.IBlockCipherDecryptor + init(cipher?: Cipher, iv?: number[]): void + create(cipher?: Cipher, iv?: number[]): BlockCipherMode + } + + //BlockCipher has interface same as IStreamCipher + interface BlockCipher extends IStreamCipher{} + + interface IBlockCipherCfg { + iv?: WordArray; + mode?: mode.IBlockCipherModeImpl //default CBC + padding?: pad.IPaddingImpl //default Pkcs7 + } + + interface CipherParamsData { + ciphertext?: lib.WordArray + key?: lib.WordArray + iv?: lib.WordArray + salt?: lib.WordArray + algorithm?: Cipher + mode?: mode.IBlockCipherModeImpl + padding?: pad.IPaddingImpl + blockSize?: number + formatter?: format.IFormatter + } + + interface CipherParams extends Base, CipherParamsData{ + init(cipherParams?: CipherParamsData): void + create(cipherParams?: CipherParamsData): CipherParams + toString(formatter?: format.IFormatter): string + } + + //tparam C - Configuration type + interface ISerializableCipher extends Base{ + cfg: C + encrypt(cipher: Cipher, message: WordArray, key: WordArray, cfg?: C): CipherParams + encrypt(cipher: Cipher, message: string, key: WordArray, cfg?: C): CipherParams + + decrypt(cipher: Cipher, ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray + decrypt(cipher: Cipher, ciphertext: string, key: WordArray, cfg?: C): WordArray + } + + interface SerializableCipher extends ISerializableCipher{} + interface ISerializableCipherCfg{ + format?: format.IFormatter //default OpenSSLFormatter + iv?: WordArray; + mode?: mode.IBlockCipherModeImpl; + padding?: pad.IPaddingImpl; + } + + interface IPasswordBasedCipher extends Base{ + cfg: C + encrypt(cipher: Cipher, message: WordArray, password: string, cfg?: C): CipherParams + encrypt(cipher: Cipher, message: string, password: string, cfg?: C): CipherParams + + decrypt(cipher: Cipher, ciphertext: CipherParamsData, password: string, cfg?: C): WordArray + decrypt(cipher: Cipher, ciphertext: string, password: string, cfg?: C): WordArray + } + + interface PasswordBasedCipher extends IPasswordBasedCipher{} + interface IPasswordBasedCipherCfg extends ISerializableCipherCfg{ + kdf?: kdf.IKdfImpl //default OpenSSLKdf + mode?: mode.IBlockCipherModeImpl; + padding?: pad.IPaddingImpl; + } + + /** see Cipher._createHelper */ + interface ICipherHelper{ + encrypt(message: string, password: string, cfg?: C): CipherParams + encrypt(message: string, key: WordArray, cfg?: C): CipherParams + encrypt(message: WordArray, password: string, cfg?: C): CipherParams + encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams + + decrypt(ciphertext: string, password: string, cfg?: C): WordArray + decrypt(ciphertext: string, key: WordArray, cfg?: C): WordArray + decrypt(ciphertext: CipherParamsData, password: string, cfg?: C): WordArray + decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray + } + + interface CipherHelper extends ICipherHelper{} + interface LibStatic{ + Base: lib.Base + WordArray: lib.WordArray + CipherParams: lib.CipherParams + SerializableCipher: lib.SerializableCipher + PasswordBasedCipher: lib.PasswordBasedCipher + } + } + + module enc{ + interface IEncoder{ + stringify(wordArray: lib.WordArray): string + } + interface IDecoder{ + parse(s: string): lib.WordArray + } + interface ICoder extends IEncoder, IDecoder {} + + interface EncStatic{ + Hex: ICoder + Latin1: ICoder + Utf8: ICoder + Base64: ICoder + Utf16: ICoder + Utf16BE: ICoder + Utf16LE: ICoder + } + } + + module kdf{ + interface KdfStatic{ + OpenSSL: IKdfImpl + } + + interface IKdfImpl{ + execute(password: string, keySize: number, ivSize: number, salt?: string): lib.CipherParams + execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams + } + } + + module format{ + interface FormatStatic{ + OpenSSL: IFormatter + Hex: IFormatter + } + + interface IFormatter{ + stringify(cipherParams: lib.CipherParamsData): string + parse(s: string): lib.CipherParams + } + } + + module algo{ + interface AlgoStatic{ + AES: algo.AES + DES: algo.DES + TripleDES: algo.TripleDES + + RabbitLegacy: algo.RabbitLegacy + Rabbit: algo.Rabbit + RC4: algo.RC4 + + MD5: algo.MD5 + RIPEMD160: algo.RIPEMD160 + SHA1: algo.SHA1 + SHA256: algo.SHA256 + SHA224: algo.SHA224 + SHA384: algo.SHA384 + SHA512: algo.SHA512 + + SHA3: algo.SHA3 + + HMAC: algo.HMAC + + EvpKDF: algo.EvpKDF + PBKDF2: algo.PBKDF2 + + RC4Drop: algo.RC4Drop + } + + interface IBlockCipherImpl extends lib.BlockCipher{ + encryptBlock(M: number[], offset: number): void + decryptBlock(M: number[], offset: number): void + + createEncryptor(key: lib.WordArray, cfg?: lib.CipherParamsData): IBlockCipherImpl + createDecryptor(key: lib.WordArray, cfg?: lib.CipherParamsData): IBlockCipherImpl + + create(xformMode?: number, key?: lib.WordArray, cfg?: lib.IBlockCipherCfg): IBlockCipherImpl + } + + interface AES extends IBlockCipherImpl{} + interface DES extends IBlockCipherImpl{} + interface TripleDES extends IBlockCipherImpl{} + + interface RabbitLegacy extends lib.StreamCipher{} + interface Rabbit extends lib.StreamCipher{} + interface RC4 extends lib.StreamCipher{} + + interface MD5 extends lib.Hasher{} + interface RIPEMD160 extends lib.Hasher{} + interface SHA1 extends lib.Hasher{} + interface SHA256 extends lib.Hasher{} + interface SHA224 extends lib.Hasher{} + interface SHA384 extends lib.Hasher{} + interface SHA512 extends lib.Hasher{} + + interface SHA3 extends lib.IHasher{} + interface ISHA3Cfg{ + outputLength?: number //default 512 + } + + interface HMAC extends lib.Base{ + init(hasher?: lib.Hasher, key?: string): void + init(hasher?: lib.Hasher, key?: lib.WordArray): void + create(hasher?: lib.Hasher, key?: string): HMAC + create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC + + update(messageUpdate: string): HMAC + update(messageUpdate: lib.WordArray): HMAC + + finalize(messageUpdate?: string): lib.WordArray + finalize(messageUpdate?: lib.WordArray): lib.WordArray + } + + interface EvpKDF extends lib.Base{ + cfg: IEvpKDFCfg + init(cfg?: IEvpKDFCfg): void + create(cfg?: IEvpKDFCfg): EvpKDF + compute(password: string, salt: string): lib.WordArray + compute(password: string, salt: lib.WordArray): lib.WordArray + compute(password: lib.WordArray, salt: string): lib.WordArray + compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray + } + interface IEvpKDFCfg{ + keySize?: number //default 128/32 + hasher?: lib.Hasher //default MD5, or SHA1 with PBKDF2 + iterations?: number //default 1 + } + interface IEvpKDFHelper{ + (password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray + (password: string, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray + (password: lib.WordArray, salt: string, cfg?: IEvpKDFCfg): lib.WordArray + (password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray + } + + interface PBKDF2 extends EvpKDF{} //PBKDF2 is same as EvpKDF + + interface RC4Drop extends RC4 { } + } + + module mode{ + interface ModeStatic{ + CBC: mode.CBC + CFB: mode.CFB + CTR: mode.CTR + CTRGladman: mode.CTRGladman + ECB: mode.ECB + OFB: mode.OFB + } + + interface IBlockCipherEncryptor extends lib.BlockCipherMode{ + processBlock(words: number[], offset: number): void + } + interface IBlockCipherDecryptor extends lib.BlockCipherMode{ //exactly as IBlockCipherEncryptor + processBlock(words: number[], offset: number): void + } + interface IBlockCipherModeImpl extends lib.BlockCipherMode{ + Encryptor: IBlockCipherEncryptor + Decryptor: IBlockCipherDecryptor + } + + interface CBC extends IBlockCipherModeImpl{} + interface CFB extends IBlockCipherModeImpl{} + interface CTR extends IBlockCipherModeImpl{} + interface CTRGladman extends IBlockCipherModeImpl{} + interface ECB extends IBlockCipherModeImpl{} + interface OFB extends IBlockCipherModeImpl{} + } + + module pad{ + interface PadStatic{ + Pkcs7: pad.Pkcs7 + AnsiX923: pad.AnsiX923 + Iso10126: pad.Iso10126 + Iso97971: pad.Iso97971 + ZeroPadding: pad.ZeroPadding + NoPadding: pad.NoPadding + } + + interface IPaddingImpl{ + pad(data: lib.WordArray, blockSize: number): void + unpad(data: lib.WordArray): void + } + + interface Pkcs7 extends IPaddingImpl{} + interface AnsiX923 extends IPaddingImpl{} + interface Iso10126 extends IPaddingImpl{} + interface Iso97971 extends IPaddingImpl{} + interface ZeroPadding extends IPaddingImpl{} + interface NoPadding extends IPaddingImpl{} + } + + module x64{ + interface X64Static{ + Word: x64.Word + WordArray: x64.WordArray + } + + interface Word extends lib.Base{ + high: number + low: number + + init(high?: number, low?: number): void + create(high?: number, low?: number): Word + } + + interface WordArray extends lib.Base{ + words: Word[] + sigBytes: number + + init(words?: Word[], sigBytes?: number): void + create(words?: Word[], sigBytes?: number): WordArray + toX32(): lib.WordArray + clone(): WordArray + } + } + + interface CryptoJSStatic{ + lib: lib.LibStatic + enc: enc.EncStatic + kdf: kdf.KdfStatic + format: format.FormatStatic + algo: algo.AlgoStatic + mode: mode.ModeStatic + pad: pad.PadStatic + x64: x64.X64Static + + AES: CryptoJSLocal.lib.ICipherHelper + DES: CryptoJSLocal.lib.ICipherHelper + TripleDES: CryptoJSLocal.lib.ICipherHelper + + RabbitLegacy: CryptoJSLocal.lib.CipherHelper + Rabbit: CryptoJSLocal.lib.CipherHelper + RC4: CryptoJSLocal.lib.CipherHelper + RC4Drop: CryptoJSLocal.lib.ICipherHelper + + MD5: CryptoJSLocal.lib.HasherHelper + HmacMD5: CryptoJSLocal.lib.IHasherHmacHelper + RIPEMD160: CryptoJSLocal.lib.HasherHelper + HmacRIPEMD160: CryptoJSLocal.lib.IHasherHmacHelper + SHA1: CryptoJSLocal.lib.HasherHelper + HmacSHA1: CryptoJSLocal.lib.IHasherHmacHelper + SHA256: CryptoJSLocal.lib.HasherHelper + HmacSHA256: CryptoJSLocal.lib.IHasherHmacHelper + SHA224: CryptoJSLocal.lib.HasherHelper + HmacSHA224: CryptoJSLocal.lib.IHasherHmacHelper + SHA512: CryptoJSLocal.lib.HasherHelper + HmacSHA512: CryptoJSLocal.lib.IHasherHmacHelper + SHA384: CryptoJSLocal.lib.HasherHelper + HmacSHA384: CryptoJSLocal.lib.IHasherHmacHelper + + SHA3: CryptoJSLocal.lib.IHasherHelper + HmacSHA3: CryptoJSLocal.lib.IHasherHmacHelper + + EvpKDF: CryptoJSLocal.algo.IEvpKDFHelper + PBKDF2: CryptoJSLocal.algo.IEvpKDFHelper //PBKDF2 is same as EvpKDF + } + type Hash = (message: string, key?: string, ...options: any[]) => string; + + export interface Hashes { + MD5: Hash; + SHA1: Hash; + SHA256: Hash; + SHA224: Hash; + SHA512: Hash; + SHA384: Hash; + SHA3: Hash; + RIPEMD160: Hash; + HmacMD5: Hash; + HmacSHA1: Hash; + HmacSHA256: Hash; + HmacSHA224: Hash; + HmacSHA512: Hash; + HmacSHA384: Hash; + HmacSHA3: Hash; + HmacRIPEMD160: Hash; + PBKDF2: Hash; + AES: Hash; + TripleDES: Hash; + RC4: Hash; + Rabbit: Hash; + RabbitLegacy: Hash; + EvpKDF: Hash; + format: { + OpenSSL: Hash; + Hex: Hash; + }; + enc: { + Latin1: Hash; + Utf8: Hash; + Hex: Hash; + Utf16: Hash; + Base64: Hash; + }; + mode: { + CFB: Hash; + CTR: Hash; + CTRGladman: Hash; + OFB: Hash; + ECB: Hash; + }; + pad: { + Pkcs7: Hash; + Ansix923: Hash; + Iso10126: Hash; + Iso97971: Hash; + ZeroPadding: Hash; + NoPadding: Hash; + }; + } + + export var hashes: Hashes; } -declare module 'crypto-js' { - import hashes = CryptoJS.hashes; - export = hashes; +declare var CryptoJS: CryptoJSLocal.CryptoJSStatic; + +declare module "crypto-js" { + export = CryptoJS; } From ff75d43ec14eb0d457231790b36e68b347c54016 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Thu, 10 Dec 2015 11:04:01 +1100 Subject: [PATCH 0031/1506] Updated to include interceptor defintiions... --- axios/axios.d.ts | 289 ++++++++++++++++++++++++++--------------------- 1 file changed, 159 insertions(+), 130 deletions(-) diff --git a/axios/axios.d.ts b/axios/axios.d.ts index 48f57a73a3..86414bde6b 100644 --- a/axios/axios.d.ts +++ b/axios/axios.d.ts @@ -1,162 +1,191 @@ + // Type definitions for axios 0.5.2 // Project: https://github.com/mzabriskie/axios -// Definitions by: Marcel Buesing +// Definitions by: Marcel Buesing , Jason Turner // Definitions: https://github.com/borisyankov/DefinitelyTyped /// declare module Axios { - /** - * - request body data type - */ - interface AxiosXHRConfigBase { + /** + * - request body data type + */ + interface AxiosXHRConfigBase { + + /** + * Change the request data before it is sent to the server. + * This is only applicable for request methods 'PUT', 'POST', and 'PATCH' + * The last function in the array must return a string or an ArrayBuffer + */ + transformRequest?: ((data: T) => U) | [(data: T) => U]; + + /** + * change the response data to be made before it is passed to then/catch + */ + transformResponse?: (data: T) => U; + + /** + * custom headers to be sent + */ + headers?: Object; + + /** + * URL parameters to be sent with the request + */ + params?: Object; + + /** + * indicates whether or not cross-site Access-Control requests + * should be made using credentials + */ + withCredentials?: boolean; + + /** + * indicates the type of data that the server will respond with + * options are 'arraybuffer', 'blob', 'document', 'json', 'text' + */ + responseType?: string; + + /** + * name of the cookie to use as a value for xsrf token + */ + xsrfCookieName?: string; + + /** + * name of the http header that carries the xsrf token value + */ + xsrfHeaderName?: string; + + } /** - * Change the request data before it is sent to the server. - * This is only applicable for request methods 'PUT', 'POST', and 'PATCH' - * The last function in the array must return a string or an ArrayBuffer + * - request body data type */ - transformRequest?: ((data:T) => U)|[(data:T) => U]; + interface AxiosXHRConfig extends AxiosXHRConfigBase { + /** + * server URL that will be used for the request, options are: + * GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH + */ + url: string; + + /** + * request method to be used when making the request + */ + method?: string; + + /** + * data to be sent as the request body + * Only applicable for request methods 'PUT', 'POST', and 'PATCH' + * When no `transformRequest` is set, must be a string, an ArrayBuffer or a hash + */ + data?: T; + } /** - * change the response data to be made before it is passed to then/catch + * - expected response type, + * - request body data type */ - transformResponse?: (data:T) => U; + interface AxiosXHR { + /** + * Response that was provided by the server + */ + data: T; + + /** + * HTTP status code from the server response + */ + status: number; + + /** + * HTTP status message from the server response + */ + statusText: string; + + /** + * headers that the server responded with + */ + headers: Object; + + /** + * config that was provided to `axios` for the request + */ + config: AxiosXHRConfig; + } /** - * custom headers to be sent + * - expected response type, + * - request body data type */ - headers?: Object; + interface AxiosStatic { - /** - * URL parameters to be sent with the request - */ - params?: Object; + (config: AxiosXHRConfig): Promise>; - /** - * indicates whether or not cross-site Access-Control requests - * should be made using credentials - */ - withCredentials?: boolean; + new (config: AxiosXHRConfig): Promise>; - /** - * indicates the type of data that the server will respond with - * options are 'arraybuffer', 'blob', 'document', 'json', 'text' - */ - responseType?: string; - - /** - * name of the cookie to use as a value for xsrf token - */ - xsrfCookieName?: string; - - /** - * name of the http header that carries the xsrf token value - */ - xsrfHeaderName?: string; - - } - - /** - * - request body data type - */ - interface AxiosXHRConfig extends AxiosXHRConfigBase { - /** - * server URL that will be used for the request, options are: - * GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH - */ - url: string; - - /** - * request method to be used when making the request - */ - method?: string; - - /** - * data to be sent as the request body - * Only applicable for request methods 'PUT', 'POST', and 'PATCH' - * When no `transformRequest` is set, must be a string, an ArrayBuffer or a hash - */ - data?: T; - } - - /** - * - expected response type, - * - request body data type - */ - interface AxiosXHR { - /** - * Response that was provided by the server - */ - data: T; - - /** - * HTTP status code from the server response - */ - status: number; - - /** - * HTTP status message from the server response - */ - statusText: string; - - /** - * headers that the server responded with - */ - headers: Object; - - /** - * config that was provided to `axios` for the request - */ - config: AxiosXHRConfig; - } - - /** - * - expected response type, - * - request body data type - */ - interface AxiosStatic { - - (config: AxiosXHRConfig): Promise>; - - new (config: AxiosXHRConfig): Promise>; - - /** - * convenience alias, method = GET - */ - get(url: string, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = GET + */ + get(url: string, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = DELETE - */ - delete(url: string, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = DELETE + */ + delete(url: string, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = HEAD - */ - head(url: string, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = HEAD + */ + head(url: string, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = POST - */ - post(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = POST + */ + post(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = PUT - */ - put(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = PUT + */ + put(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = PATCH - */ - patch(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; - } + /** + * convenience alias, method = PATCH + */ + patch(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; + interceptors: { + request: Interceptor, + response: Interceptor + } + } + + + + export interface Response { + data?: any; + status?: number; + statusText?: string; + headers?: any; + config?: any; + } + export interface success { + (response: Response): void + } + export interface error { + (response: Axios.Response): void; + } + + export interface Interceptor { + use(success: success, error?: error): void; + eject(interceptor: Interceptor); + } } declare var axios: Axios.AxiosStatic; declare module "axios" { - export = axios; + export = axios; } + + + From f1dfef373316e7dac737171498be047e2cb71d52 Mon Sep 17 00:00:00 2001 From: Rafal Witczak Date: Sun, 29 Nov 2015 12:08:33 -0800 Subject: [PATCH 0032/1506] TSD file for angular-q-spread module --- angular-q-spread/angular-q-spread-test.ts | 42 +++++++++++++++++++++++ angular-q-spread/angular-q-spread.d.ts | 17 +++++++++ 2 files changed, 59 insertions(+) create mode 100644 angular-q-spread/angular-q-spread-test.ts create mode 100644 angular-q-spread/angular-q-spread.d.ts diff --git a/angular-q-spread/angular-q-spread-test.ts b/angular-q-spread/angular-q-spread-test.ts new file mode 100644 index 0000000000..932ecc4fa9 --- /dev/null +++ b/angular-q-spread/angular-q-spread-test.ts @@ -0,0 +1,42 @@ +/// + +interface IMyService { + getFirstname(): ng.IPromise; + getLastname(): ng.IPromise; +} + +interface IScope { + name: string; +} + +function TestCtrl($scope: IScope, $q: ng.IQService, MyService: IMyService) { + $scope.name = null; + + function firstCallback(firstname: string, lastname: string) + { + return firstname + ' ' + lastname; + } + + function anotherCallback(fullname: string) + { + $scope.name = fullname; + } + + function failureCallback(reason: any) + { + alert('Could not load data: ' + reason); + } + + $q + .all([ + MyService.getFirstname(), + MyService.getLastname() + ]) + .spread(firstCallback) + .then(anotherCallback) + .catch(failureCallback); +}; + +TestCtrl.$inject = ['$scope', '$q', 'MyService']; + +angular.module('test').controller('TestCtrl', TestCtrl); diff --git a/angular-q-spread/angular-q-spread.d.ts b/angular-q-spread/angular-q-spread.d.ts new file mode 100644 index 0000000000..3eb37dc4e0 --- /dev/null +++ b/angular-q-spread/angular-q-spread.d.ts @@ -0,0 +1,17 @@ +// Type definitions for angular-q-spread module +// Project: https://www.npmjs.com/package/angular-q-spread +// Definitions by: rafw87 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module angular { + interface IPromise { + /** + This method can be used as a replacement for then. Similarly, it takes two parameters, a callback when all promises are resolved and a callback for failure. The resolve callback is going to be called with the result of the list of promises passed to $q.all as separate parameters instead of one parameters which is an array. + * @param successCallback Callback for resolved promise, similar to then's one, but takes multiple parameters instead of single array parameter + * @param errorCallback Callback for error, the same as for then + */ + spread(successCallback: (...promiseValues: any[]) => IPromise|TResult, errorCallback?: (reason: any) => any): IPromise; + } +} From 8561b6b2ded8edbeea5ecfe1a8e24def963f257e Mon Sep 17 00:00:00 2001 From: cherrydev Date: Thu, 10 Dec 2015 14:43:38 -0800 Subject: [PATCH 0033/1506] Update dexie.d.ts Fix embarrassing typo --- dexie/dexie.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dexie/dexie.d.ts b/dexie/dexie.d.ts index 2de122385e..2a527cff93 100644 --- a/dexie/dexie.d.ts +++ b/dexie/dexie.d.ts @@ -13,7 +13,7 @@ interface Thenable { declare class Dexie { constructor(databaseName: string); - constructor(databaseName: string, options: { addons: Array<(db: Dexie) => void> }); + constructor(databaseName: string, options: { addons: Array<(db: Dexie) => void> });b name: string; tables: Dexie.Table[]; @@ -40,7 +40,7 @@ declare class Dexie { static delete(databaseName : string): Dexie.Promise; - static exists(databaseName : string): Dexie.Promise; + static exists(databaseName : string): Dexie.Promise; version(versionNumber: number): Dexie.Version; From 030953bec9719ad5069c5a434fe7f1c31f275ac9 Mon Sep 17 00:00:00 2001 From: cherrydev Date: Thu, 10 Dec 2015 14:49:05 -0800 Subject: [PATCH 0034/1506] Update dexie.d.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cat walked across the keyboard. Just not my day… --- dexie/dexie.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dexie/dexie.d.ts b/dexie/dexie.d.ts index 2a527cff93..ca90689fa0 100644 --- a/dexie/dexie.d.ts +++ b/dexie/dexie.d.ts @@ -13,7 +13,7 @@ interface Thenable { declare class Dexie { constructor(databaseName: string); - constructor(databaseName: string, options: { addons: Array<(db: Dexie) => void> });b + constructor(databaseName: string, options: { addons: Array<(db: Dexie) => void> }); name: string; tables: Dexie.Table[]; From 0a0cadd8536635c3e53a9757b9396d256d6dd2d5 Mon Sep 17 00:00:00 2001 From: darktutu Date: Fri, 11 Dec 2015 18:10:11 +0800 Subject: [PATCH 0035/1506] directive compile can return a function whit void IDirective --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index a489141d54..f90992e27e 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1650,7 +1650,7 @@ declare module angular { templateElement: IAugmentedJQuery, templateAttributes: IAttributes, transclude: ITranscludeFunction - ): IDirectivePrePost; + ): void | IDirectivePrePost; } interface IDirective { From 42fc54a14dc7f835da5cacc525926be1ad0f0e00 Mon Sep 17 00:00:00 2001 From: "raf_w87@wp.pl" Date: Sat, 12 Dec 2015 17:09:02 +0100 Subject: [PATCH 0036/1506] TSD file for angular-q-spread module - angular-q-spread-test.ts -> angular-q-spread-tests.ts --- .../{angular-q-spread-test.ts => angular-q-spread-tests.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename angular-q-spread/{angular-q-spread-test.ts => angular-q-spread-tests.ts} (100%) diff --git a/angular-q-spread/angular-q-spread-test.ts b/angular-q-spread/angular-q-spread-tests.ts similarity index 100% rename from angular-q-spread/angular-q-spread-test.ts rename to angular-q-spread/angular-q-spread-tests.ts From 02941d70e88487358f99e3b5700baf5411dc17c3 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 14 Dec 2015 15:34:11 +1100 Subject: [PATCH 0037/1506] Added react bootstrap validation --- .../react-bootstrap-validation.d.ts | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 react-bootstrap-validation/react-bootstrap-validation.d.ts diff --git a/react-bootstrap-validation/react-bootstrap-validation.d.ts b/react-bootstrap-validation/react-bootstrap-validation.d.ts new file mode 100644 index 0000000000..9eeee01c1f --- /dev/null +++ b/react-bootstrap-validation/react-bootstrap-validation.d.ts @@ -0,0 +1,83 @@ +/// + +declare module ReactBootstrapValidation{ + + export interface Form { + model; + validateOne: any; + validateAll: any; + errorHelp: string | any; + validationEvent: string; + onValidSubmit: any; + + } + export interface ValidatedInput + { + + name: string; + validationEvent: string; + validate: any; + + type: any; + label: any; + errorHelp: any; + } + + export interface Radio extends ValidatedInput { + + } + + + export interface RadioGroup extends ValidatedInput { + validationEvent: any; + } + + export interface Validator { + + required(val: String); + //Returns true if the value is not null.Can be used as an alias to !isNull validation rule. + isChecked(val: String); + + } + + export interface FileValidator extends Validator { + ref: any; + name: any; + type :any; + label:any; + multiple: any; + validate: any; + + isEmpty(files: FileList); + + /// Returns true if there are no files in file list. + isSingle(files: FileList); + + // Returns true if files count equals to 1. + isMultiple(files: FileList); + + //Returns true if files count is more than 1. + isFilesCount(files: FileList, min: Number, max:Array ); + + //Returns true if files count is within allowed range.If max is not supplied, checks if files count equals min. + isTotalSize(files: FileList, min: Number, max: Array); + + //Returns true if total size of all files is within allowed range. + isEachFileSize(files: FileList, min: Number, max: Array); + + //Returns true if each file's size is within allowed range. + isExtension(files: FileList, extensions: Array); + + //Returns true if each file's extension is in the extensions array. + isType(files: FileList, types: Array); + } + + export interface InputContainer { + + } + } + + +declare module 'react-bootstrap-validation' { + export = ReactBootstrapValidation; +} \ No newline at end of file From e348fb97b5a21d123b9669d6f6c4134288c5d36f Mon Sep 17 00:00:00 2001 From: samael Date: Mon, 14 Dec 2015 17:20:49 +0800 Subject: [PATCH 0038/1506] Update state-machine.d.ts Update to 2.3.5 --- state-machine/state-machine.d.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/state-machine/state-machine.d.ts b/state-machine/state-machine.d.ts index d17c58dc69..7065ee1983 100644 --- a/state-machine/state-machine.d.ts +++ b/state-machine/state-machine.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Finite State Machine 2.2 +// Type definitions for Finite State Machine 2.3.5 // Project: https://github.com/jakesgordon/javascript-state-machine -// Definitions by: Boris Yankov , Maarten Docter , William Sears +// Definitions by: Boris Yankov , Maarten Docter , William Sears , samael // Definitions: https://github.com/borisyankov/DefinitelyTyped interface StateMachineErrorCallback { @@ -29,7 +29,7 @@ interface StateMachineConfig { interface StateMachineStatic { - VERSION: string; // = "2.2.0" + VERSION: string; // = "2.3.5" WILDCARD: string; // = '*' ASYNC: string; // = 'async' @@ -37,7 +37,7 @@ interface StateMachineStatic { SUCCEEDED: number; // = 1, the event transitioned successfully from one state to another NOTRANSITION: number; // = 2, the event was successfull but no state transition was necessary CANCELLED: number; // = 3, the event was cancelled by the caller in a beforeEvent callback - ASYNC: number; // = 4, the event is asynchronous and the caller is in control of when the transition occurs + PENDING: number; // = 4, the event is asynchronous and the caller is in control of when the transition occurs }; Error: { @@ -62,13 +62,16 @@ interface StateMachineCan { (evt: string): boolean; } +interface StateMachineIsFinished { + (state: string): boolean; +} interface StateMachine { current: string; is: StateMachineIs; can: StateMachineCan; cannot: StateMachineCan; error: StateMachineErrorCallback; - + isFinished: StateMachineIsFinished; /* transition - only available when performing async state transitions; otherwise null. Can be a: [1] fsm.transition(); // called from async callback [2] fsm.transition.cancel(); From 70e18515c62fc1232ee8a4260ac28018d1f30b52 Mon Sep 17 00:00:00 2001 From: samael Date: Mon, 14 Dec 2015 17:23:31 +0800 Subject: [PATCH 0039/1506] Update to 2.3.5 Update to 2.3.5 --- state-machine/state-machine.d.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/state-machine/state-machine.d.ts b/state-machine/state-machine.d.ts index d17c58dc69..7065ee1983 100644 --- a/state-machine/state-machine.d.ts +++ b/state-machine/state-machine.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Finite State Machine 2.2 +// Type definitions for Finite State Machine 2.3.5 // Project: https://github.com/jakesgordon/javascript-state-machine -// Definitions by: Boris Yankov , Maarten Docter , William Sears +// Definitions by: Boris Yankov , Maarten Docter , William Sears , samael // Definitions: https://github.com/borisyankov/DefinitelyTyped interface StateMachineErrorCallback { @@ -29,7 +29,7 @@ interface StateMachineConfig { interface StateMachineStatic { - VERSION: string; // = "2.2.0" + VERSION: string; // = "2.3.5" WILDCARD: string; // = '*' ASYNC: string; // = 'async' @@ -37,7 +37,7 @@ interface StateMachineStatic { SUCCEEDED: number; // = 1, the event transitioned successfully from one state to another NOTRANSITION: number; // = 2, the event was successfull but no state transition was necessary CANCELLED: number; // = 3, the event was cancelled by the caller in a beforeEvent callback - ASYNC: number; // = 4, the event is asynchronous and the caller is in control of when the transition occurs + PENDING: number; // = 4, the event is asynchronous and the caller is in control of when the transition occurs }; Error: { @@ -62,13 +62,16 @@ interface StateMachineCan { (evt: string): boolean; } +interface StateMachineIsFinished { + (state: string): boolean; +} interface StateMachine { current: string; is: StateMachineIs; can: StateMachineCan; cannot: StateMachineCan; error: StateMachineErrorCallback; - + isFinished: StateMachineIsFinished; /* transition - only available when performing async state transitions; otherwise null. Can be a: [1] fsm.transition(); // called from async callback [2] fsm.transition.cancel(); From 06336e28fcead25080b58e7c5aae073b78cfe3c1 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sun, 20 Dec 2015 10:46:02 +1100 Subject: [PATCH 0040/1506] Revert "Merge branch 'master' of https://github.com/brewsoftware/DefinitelyTyped" This reverts commit 0adfcd3dfd9860cef6b73762fa8c1eb5c4886dad, reversing changes made to 40c60850ad6c8175a62d5ab48c4e016ea5b3dffe. --- axios/axios.d.ts | 289 ++++----- crypto-js/crypto-js.d.ts | 583 ++---------------- .../react-bootstrap-validation.d.ts | 83 --- 3 files changed, 191 insertions(+), 764 deletions(-) delete mode 100644 react-bootstrap-validation/react-bootstrap-validation.d.ts diff --git a/axios/axios.d.ts b/axios/axios.d.ts index 86414bde6b..48f57a73a3 100644 --- a/axios/axios.d.ts +++ b/axios/axios.d.ts @@ -1,191 +1,162 @@ - // Type definitions for axios 0.5.2 // Project: https://github.com/mzabriskie/axios -// Definitions by: Marcel Buesing , Jason Turner +// Definitions by: Marcel Buesing // Definitions: https://github.com/borisyankov/DefinitelyTyped /// declare module Axios { - /** - * - request body data type - */ - interface AxiosXHRConfigBase { - - /** - * Change the request data before it is sent to the server. - * This is only applicable for request methods 'PUT', 'POST', and 'PATCH' - * The last function in the array must return a string or an ArrayBuffer - */ - transformRequest?: ((data: T) => U) | [(data: T) => U]; - - /** - * change the response data to be made before it is passed to then/catch - */ - transformResponse?: (data: T) => U; - - /** - * custom headers to be sent - */ - headers?: Object; - - /** - * URL parameters to be sent with the request - */ - params?: Object; - - /** - * indicates whether or not cross-site Access-Control requests - * should be made using credentials - */ - withCredentials?: boolean; - - /** - * indicates the type of data that the server will respond with - * options are 'arraybuffer', 'blob', 'document', 'json', 'text' - */ - responseType?: string; - - /** - * name of the cookie to use as a value for xsrf token - */ - xsrfCookieName?: string; - - /** - * name of the http header that carries the xsrf token value - */ - xsrfHeaderName?: string; - - } + /** + * - request body data type + */ + interface AxiosXHRConfigBase { /** - * - request body data type + * Change the request data before it is sent to the server. + * This is only applicable for request methods 'PUT', 'POST', and 'PATCH' + * The last function in the array must return a string or an ArrayBuffer */ - interface AxiosXHRConfig extends AxiosXHRConfigBase { - /** - * server URL that will be used for the request, options are: - * GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH - */ - url: string; - - /** - * request method to be used when making the request - */ - method?: string; - - /** - * data to be sent as the request body - * Only applicable for request methods 'PUT', 'POST', and 'PATCH' - * When no `transformRequest` is set, must be a string, an ArrayBuffer or a hash - */ - data?: T; - } + transformRequest?: ((data:T) => U)|[(data:T) => U]; /** - * - expected response type, - * - request body data type + * change the response data to be made before it is passed to then/catch */ - interface AxiosXHR { - /** - * Response that was provided by the server - */ - data: T; - - /** - * HTTP status code from the server response - */ - status: number; - - /** - * HTTP status message from the server response - */ - statusText: string; - - /** - * headers that the server responded with - */ - headers: Object; - - /** - * config that was provided to `axios` for the request - */ - config: AxiosXHRConfig; - } + transformResponse?: (data:T) => U; /** - * - expected response type, - * - request body data type + * custom headers to be sent */ - interface AxiosStatic { + headers?: Object; - (config: AxiosXHRConfig): Promise>; + /** + * URL parameters to be sent with the request + */ + params?: Object; - new (config: AxiosXHRConfig): Promise>; + /** + * indicates whether or not cross-site Access-Control requests + * should be made using credentials + */ + withCredentials?: boolean; - /** - * convenience alias, method = GET - */ - get(url: string, config?: AxiosXHRConfigBase): Promise>; + /** + * indicates the type of data that the server will respond with + * options are 'arraybuffer', 'blob', 'document', 'json', 'text' + */ + responseType?: string; + + /** + * name of the cookie to use as a value for xsrf token + */ + xsrfCookieName?: string; + + /** + * name of the http header that carries the xsrf token value + */ + xsrfHeaderName?: string; + + } + + /** + * - request body data type + */ + interface AxiosXHRConfig extends AxiosXHRConfigBase { + /** + * server URL that will be used for the request, options are: + * GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH + */ + url: string; + + /** + * request method to be used when making the request + */ + method?: string; + + /** + * data to be sent as the request body + * Only applicable for request methods 'PUT', 'POST', and 'PATCH' + * When no `transformRequest` is set, must be a string, an ArrayBuffer or a hash + */ + data?: T; + } + + /** + * - expected response type, + * - request body data type + */ + interface AxiosXHR { + /** + * Response that was provided by the server + */ + data: T; + + /** + * HTTP status code from the server response + */ + status: number; + + /** + * HTTP status message from the server response + */ + statusText: string; + + /** + * headers that the server responded with + */ + headers: Object; + + /** + * config that was provided to `axios` for the request + */ + config: AxiosXHRConfig; + } + + /** + * - expected response type, + * - request body data type + */ + interface AxiosStatic { + + (config: AxiosXHRConfig): Promise>; + + new (config: AxiosXHRConfig): Promise>; + + /** + * convenience alias, method = GET + */ + get(url: string, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = DELETE - */ - delete(url: string, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = DELETE + */ + delete(url: string, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = HEAD - */ - head(url: string, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = HEAD + */ + head(url: string, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = POST - */ - post(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = POST + */ + post(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = PUT - */ - put(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; + /** + * convenience alias, method = PUT + */ + put(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; - /** - * convenience alias, method = PATCH - */ - patch(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; - interceptors: { - request: Interceptor, - response: Interceptor - } - } - - - - export interface Response { - data?: any; - status?: number; - statusText?: string; - headers?: any; - config?: any; - } - export interface success { - (response: Response): void - } - export interface error { - (response: Axios.Response): void; - } - - export interface Interceptor { - use(success: success, error?: error): void; - eject(interceptor: Interceptor); - } + /** + * convenience alias, method = PATCH + */ + patch(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>; + } } declare var axios: Axios.AxiosStatic; declare module "axios" { - export = axios; + export = axios; } - - - diff --git a/crypto-js/crypto-js.d.ts b/crypto-js/crypto-js.d.ts index cde0abd9b9..0f02514027 100644 --- a/crypto-js/crypto-js.d.ts +++ b/crypto-js/crypto-js.d.ts @@ -1,528 +1,67 @@ -// Type definitions for crypto-js v3.1.5 +// Type definitions for crypto-js v3.1.3 // Project: https://github.com/evanvosberg/crypto-js -// Definitions by: Michael Zabka , Jason Turner +// Definitions by: Michael Zabka // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module CryptoJSLocal{ - module lib{ - interface Base{ - extend(overrides: Object): Object - init(...args: any[]): void - //arguments of create() is same as init(). This is true for all subclasses - create(...args: any[]): Base - mixIn(properties: Object): void - clone(): Base - } - - interface WordArray extends Base{ - words: number[] - sigBytes: number - init(words?: number[], sigBytes?: number): void - create(words?: number[], sigBytes?: number): WordArray - - init(typedArray: ArrayBuffer): void - init(typedArray: Int8Array): void - - //Because TypeScript uses a structural type system then we don't need (& can't) - //declare oveload function init, create for the following type (same as Int8Array): - //then Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array - //Note also: Uint8ClampedArray is not defined in lib.d.ts & not supported in IE - //@see http://compatibility.shwups-cms.ch/en/home?&property=Uint8ClampedArray - - create(typedArray: ArrayBuffer): WordArray - create(typedArray: Int8Array): WordArray - - toString(encoder?: enc.IEncoder): string - concat(wordArray: WordArray): WordArray - clamp(): void - clone(): WordArray - random(nBytes: number): WordArray - } - - interface BufferedBlockAlgorithm extends Base{ - reset(): void - clone(): BufferedBlockAlgorithm - } - - //tparam C - Configuration type - interface IHasher extends BufferedBlockAlgorithm{ - cfg: C - init(cfg?: C): void - create(cfg?: C): IHasher - - update(messageUpdate: string): Hasher - update(messageUpdate: WordArray): Hasher - - finalize(messageUpdate?: string): WordArray - finalize(messageUpdate?: WordArray): WordArray - - blockSize: number - - _createHelper(hasher: Hasher): IHasherHelper - _createHmacHelper(hasher: Hasher): IHasherHmacHelper - - clone(): IHasher - } - interface Hasher extends IHasher{} - - //tparam C - Configuration type - interface IHasherHelper{ - (message: string, cfg?: C): WordArray - (message: WordArray, cfg?: C): WordArray - } - interface HasherHelper extends IHasherHelper{} - - interface IHasherHmacHelper{ - (message: string, key: string): WordArray - (message: string, key: WordArray): WordArray - (message: WordArray, key: string): WordArray - (message: WordArray, key: WordArray): WordArray - } - - //tparam C - Configuration type - interface ICipher extends BufferedBlockAlgorithm{ - cfg: C - createEncryptor(key: WordArray, cfg?: C): ICipher - createDecryptor(key: WordArray, cfg?: C): ICipher - - create(xformMode?: number, key?: WordArray, cfg?: C): ICipher - init(xformMode?: number, key?: WordArray, cfg?: C): void - - process(dataUpdate: string): WordArray - process(dataUpdate: WordArray): WordArray - - finalize(dataUpdate?: string): WordArray - finalize(dataUpdate?: WordArray): WordArray - - keySize: number - ivSize: number - - _createHelper(cipher: Cipher): ICipherHelper - - clone(): ICipher - } - interface Cipher extends ICipher{} - - interface IStreamCipher extends ICipher{ - drop?: number; - - createEncryptor(key: WordArray, cfg?: C): IStreamCipher - createDecryptor(key: WordArray, cfg?: C): IStreamCipher - - create(xformMode?: number, key?: WordArray, cfg?: C): IStreamCipher - - blockSize: number - } - interface StreamCipher extends IStreamCipher{} - - interface BlockCipherMode extends Base{ - createEncryptor(cipher: Cipher, iv: number[]): mode.IBlockCipherEncryptor - createDecryptor(cipher: Cipher, iv: number[]): mode.IBlockCipherDecryptor - init(cipher?: Cipher, iv?: number[]): void - create(cipher?: Cipher, iv?: number[]): BlockCipherMode - } - - //BlockCipher has interface same as IStreamCipher - interface BlockCipher extends IStreamCipher{} - - interface IBlockCipherCfg { - iv?: WordArray; - mode?: mode.IBlockCipherModeImpl //default CBC - padding?: pad.IPaddingImpl //default Pkcs7 - } - - interface CipherParamsData { - ciphertext?: lib.WordArray - key?: lib.WordArray - iv?: lib.WordArray - salt?: lib.WordArray - algorithm?: Cipher - mode?: mode.IBlockCipherModeImpl - padding?: pad.IPaddingImpl - blockSize?: number - formatter?: format.IFormatter - } - - interface CipherParams extends Base, CipherParamsData{ - init(cipherParams?: CipherParamsData): void - create(cipherParams?: CipherParamsData): CipherParams - toString(formatter?: format.IFormatter): string - } - - //tparam C - Configuration type - interface ISerializableCipher extends Base{ - cfg: C - encrypt(cipher: Cipher, message: WordArray, key: WordArray, cfg?: C): CipherParams - encrypt(cipher: Cipher, message: string, key: WordArray, cfg?: C): CipherParams - - decrypt(cipher: Cipher, ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray - decrypt(cipher: Cipher, ciphertext: string, key: WordArray, cfg?: C): WordArray - } - - interface SerializableCipher extends ISerializableCipher{} - interface ISerializableCipherCfg{ - format?: format.IFormatter //default OpenSSLFormatter - iv?: WordArray; - mode?: mode.IBlockCipherModeImpl; - padding?: pad.IPaddingImpl; - } - - interface IPasswordBasedCipher extends Base{ - cfg: C - encrypt(cipher: Cipher, message: WordArray, password: string, cfg?: C): CipherParams - encrypt(cipher: Cipher, message: string, password: string, cfg?: C): CipherParams - - decrypt(cipher: Cipher, ciphertext: CipherParamsData, password: string, cfg?: C): WordArray - decrypt(cipher: Cipher, ciphertext: string, password: string, cfg?: C): WordArray - } - - interface PasswordBasedCipher extends IPasswordBasedCipher{} - interface IPasswordBasedCipherCfg extends ISerializableCipherCfg{ - kdf?: kdf.IKdfImpl //default OpenSSLKdf - mode?: mode.IBlockCipherModeImpl; - padding?: pad.IPaddingImpl; - } - - /** see Cipher._createHelper */ - interface ICipherHelper{ - encrypt(message: string, password: string, cfg?: C): CipherParams - encrypt(message: string, key: WordArray, cfg?: C): CipherParams - encrypt(message: WordArray, password: string, cfg?: C): CipherParams - encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams - - decrypt(ciphertext: string, password: string, cfg?: C): WordArray - decrypt(ciphertext: string, key: WordArray, cfg?: C): WordArray - decrypt(ciphertext: CipherParamsData, password: string, cfg?: C): WordArray - decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray - } - - interface CipherHelper extends ICipherHelper{} - interface LibStatic{ - Base: lib.Base - WordArray: lib.WordArray - CipherParams: lib.CipherParams - SerializableCipher: lib.SerializableCipher - PasswordBasedCipher: lib.PasswordBasedCipher - } - } - - module enc{ - interface IEncoder{ - stringify(wordArray: lib.WordArray): string - } - interface IDecoder{ - parse(s: string): lib.WordArray - } - interface ICoder extends IEncoder, IDecoder {} - - interface EncStatic{ - Hex: ICoder - Latin1: ICoder - Utf8: ICoder - Base64: ICoder - Utf16: ICoder - Utf16BE: ICoder - Utf16LE: ICoder - } - } - - module kdf{ - interface KdfStatic{ - OpenSSL: IKdfImpl - } - - interface IKdfImpl{ - execute(password: string, keySize: number, ivSize: number, salt?: string): lib.CipherParams - execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams - } - } - - module format{ - interface FormatStatic{ - OpenSSL: IFormatter - Hex: IFormatter - } - - interface IFormatter{ - stringify(cipherParams: lib.CipherParamsData): string - parse(s: string): lib.CipherParams - } - } - - module algo{ - interface AlgoStatic{ - AES: algo.AES - DES: algo.DES - TripleDES: algo.TripleDES - - RabbitLegacy: algo.RabbitLegacy - Rabbit: algo.Rabbit - RC4: algo.RC4 - - MD5: algo.MD5 - RIPEMD160: algo.RIPEMD160 - SHA1: algo.SHA1 - SHA256: algo.SHA256 - SHA224: algo.SHA224 - SHA384: algo.SHA384 - SHA512: algo.SHA512 - - SHA3: algo.SHA3 - - HMAC: algo.HMAC - - EvpKDF: algo.EvpKDF - PBKDF2: algo.PBKDF2 - - RC4Drop: algo.RC4Drop - } - - interface IBlockCipherImpl extends lib.BlockCipher{ - encryptBlock(M: number[], offset: number): void - decryptBlock(M: number[], offset: number): void - - createEncryptor(key: lib.WordArray, cfg?: lib.CipherParamsData): IBlockCipherImpl - createDecryptor(key: lib.WordArray, cfg?: lib.CipherParamsData): IBlockCipherImpl - - create(xformMode?: number, key?: lib.WordArray, cfg?: lib.IBlockCipherCfg): IBlockCipherImpl - } - - interface AES extends IBlockCipherImpl{} - interface DES extends IBlockCipherImpl{} - interface TripleDES extends IBlockCipherImpl{} - - interface RabbitLegacy extends lib.StreamCipher{} - interface Rabbit extends lib.StreamCipher{} - interface RC4 extends lib.StreamCipher{} - - interface MD5 extends lib.Hasher{} - interface RIPEMD160 extends lib.Hasher{} - interface SHA1 extends lib.Hasher{} - interface SHA256 extends lib.Hasher{} - interface SHA224 extends lib.Hasher{} - interface SHA384 extends lib.Hasher{} - interface SHA512 extends lib.Hasher{} - - interface SHA3 extends lib.IHasher{} - interface ISHA3Cfg{ - outputLength?: number //default 512 - } - - interface HMAC extends lib.Base{ - init(hasher?: lib.Hasher, key?: string): void - init(hasher?: lib.Hasher, key?: lib.WordArray): void - create(hasher?: lib.Hasher, key?: string): HMAC - create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC - - update(messageUpdate: string): HMAC - update(messageUpdate: lib.WordArray): HMAC - - finalize(messageUpdate?: string): lib.WordArray - finalize(messageUpdate?: lib.WordArray): lib.WordArray - } - - interface EvpKDF extends lib.Base{ - cfg: IEvpKDFCfg - init(cfg?: IEvpKDFCfg): void - create(cfg?: IEvpKDFCfg): EvpKDF - compute(password: string, salt: string): lib.WordArray - compute(password: string, salt: lib.WordArray): lib.WordArray - compute(password: lib.WordArray, salt: string): lib.WordArray - compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray - } - interface IEvpKDFCfg{ - keySize?: number //default 128/32 - hasher?: lib.Hasher //default MD5, or SHA1 with PBKDF2 - iterations?: number //default 1 - } - interface IEvpKDFHelper{ - (password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray - (password: string, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray - (password: lib.WordArray, salt: string, cfg?: IEvpKDFCfg): lib.WordArray - (password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray - } - - interface PBKDF2 extends EvpKDF{} //PBKDF2 is same as EvpKDF - - interface RC4Drop extends RC4 { } - } - - module mode{ - interface ModeStatic{ - CBC: mode.CBC - CFB: mode.CFB - CTR: mode.CTR - CTRGladman: mode.CTRGladman - ECB: mode.ECB - OFB: mode.OFB - } - - interface IBlockCipherEncryptor extends lib.BlockCipherMode{ - processBlock(words: number[], offset: number): void - } - interface IBlockCipherDecryptor extends lib.BlockCipherMode{ //exactly as IBlockCipherEncryptor - processBlock(words: number[], offset: number): void - } - interface IBlockCipherModeImpl extends lib.BlockCipherMode{ - Encryptor: IBlockCipherEncryptor - Decryptor: IBlockCipherDecryptor - } - - interface CBC extends IBlockCipherModeImpl{} - interface CFB extends IBlockCipherModeImpl{} - interface CTR extends IBlockCipherModeImpl{} - interface CTRGladman extends IBlockCipherModeImpl{} - interface ECB extends IBlockCipherModeImpl{} - interface OFB extends IBlockCipherModeImpl{} - } - - module pad{ - interface PadStatic{ - Pkcs7: pad.Pkcs7 - AnsiX923: pad.AnsiX923 - Iso10126: pad.Iso10126 - Iso97971: pad.Iso97971 - ZeroPadding: pad.ZeroPadding - NoPadding: pad.NoPadding - } - - interface IPaddingImpl{ - pad(data: lib.WordArray, blockSize: number): void - unpad(data: lib.WordArray): void - } - - interface Pkcs7 extends IPaddingImpl{} - interface AnsiX923 extends IPaddingImpl{} - interface Iso10126 extends IPaddingImpl{} - interface Iso97971 extends IPaddingImpl{} - interface ZeroPadding extends IPaddingImpl{} - interface NoPadding extends IPaddingImpl{} - } - - module x64{ - interface X64Static{ - Word: x64.Word - WordArray: x64.WordArray - } - - interface Word extends lib.Base{ - high: number - low: number - - init(high?: number, low?: number): void - create(high?: number, low?: number): Word - } - - interface WordArray extends lib.Base{ - words: Word[] - sigBytes: number - - init(words?: Word[], sigBytes?: number): void - create(words?: Word[], sigBytes?: number): WordArray - toX32(): lib.WordArray - clone(): WordArray - } - } - - interface CryptoJSStatic{ - lib: lib.LibStatic - enc: enc.EncStatic - kdf: kdf.KdfStatic - format: format.FormatStatic - algo: algo.AlgoStatic - mode: mode.ModeStatic - pad: pad.PadStatic - x64: x64.X64Static - - AES: CryptoJSLocal.lib.ICipherHelper - DES: CryptoJSLocal.lib.ICipherHelper - TripleDES: CryptoJSLocal.lib.ICipherHelper - - RabbitLegacy: CryptoJSLocal.lib.CipherHelper - Rabbit: CryptoJSLocal.lib.CipherHelper - RC4: CryptoJSLocal.lib.CipherHelper - RC4Drop: CryptoJSLocal.lib.ICipherHelper - - MD5: CryptoJSLocal.lib.HasherHelper - HmacMD5: CryptoJSLocal.lib.IHasherHmacHelper - RIPEMD160: CryptoJSLocal.lib.HasherHelper - HmacRIPEMD160: CryptoJSLocal.lib.IHasherHmacHelper - SHA1: CryptoJSLocal.lib.HasherHelper - HmacSHA1: CryptoJSLocal.lib.IHasherHmacHelper - SHA256: CryptoJSLocal.lib.HasherHelper - HmacSHA256: CryptoJSLocal.lib.IHasherHmacHelper - SHA224: CryptoJSLocal.lib.HasherHelper - HmacSHA224: CryptoJSLocal.lib.IHasherHmacHelper - SHA512: CryptoJSLocal.lib.HasherHelper - HmacSHA512: CryptoJSLocal.lib.IHasherHmacHelper - SHA384: CryptoJSLocal.lib.HasherHelper - HmacSHA384: CryptoJSLocal.lib.IHasherHmacHelper - - SHA3: CryptoJSLocal.lib.IHasherHelper - HmacSHA3: CryptoJSLocal.lib.IHasherHmacHelper - - EvpKDF: CryptoJSLocal.algo.IEvpKDFHelper - PBKDF2: CryptoJSLocal.algo.IEvpKDFHelper //PBKDF2 is same as EvpKDF - } - type Hash = (message: string, key?: string, ...options: any[]) => string; - - export interface Hashes { - MD5: Hash; - SHA1: Hash; - SHA256: Hash; - SHA224: Hash; - SHA512: Hash; - SHA384: Hash; - SHA3: Hash; - RIPEMD160: Hash; - HmacMD5: Hash; - HmacSHA1: Hash; - HmacSHA256: Hash; - HmacSHA224: Hash; - HmacSHA512: Hash; - HmacSHA384: Hash; - HmacSHA3: Hash; - HmacRIPEMD160: Hash; - PBKDF2: Hash; - AES: Hash; - TripleDES: Hash; - RC4: Hash; - Rabbit: Hash; - RabbitLegacy: Hash; - EvpKDF: Hash; - format: { - OpenSSL: Hash; - Hex: Hash; - }; - enc: { - Latin1: Hash; - Utf8: Hash; - Hex: Hash; - Utf16: Hash; - Base64: Hash; - }; - mode: { - CFB: Hash; - CTR: Hash; - CTRGladman: Hash; - OFB: Hash; - ECB: Hash; - }; - pad: { - Pkcs7: Hash; - Ansix923: Hash; - Iso10126: Hash; - Iso97971: Hash; - ZeroPadding: Hash; - NoPadding: Hash; - }; - } - - export var hashes: Hashes; +declare module CryptoJS { + type Hash = (message: string, key?: string, ...options: any[]) => string; + + export interface Hashes { + MD5: Hash; + SHA1: Hash; + SHA256: Hash; + SHA224: Hash; + SHA512: Hash; + SHA384: Hash; + SHA3: Hash; + RIPEMD160: Hash; + HmacMD5: Hash; + HmacSHA1: Hash; + HmacSHA256: Hash; + HmacSHA224: Hash; + HmacSHA512: Hash; + HmacSHA384: Hash; + HmacSHA3: Hash; + HmacRIPEMD160: Hash; + PBKDF2: Hash; + AES: Hash; + TripleDES: Hash; + RC4: Hash; + Rabbit: Hash; + RabbitLegacy: Hash; + EvpKDF: Hash; + format: { + OpenSSL: Hash; + Hex: Hash; + }; + enc: { + Latin1: Hash; + Utf8: Hash; + Hex: Hash; + Utf16: Hash; + Base64: Hash; + }; + mode: { + CFB: Hash; + CTR: Hash; + CTRGladman: Hash; + OFB: Hash; + ECB: Hash; + }; + pad: { + Pkcs7: Hash; + Ansix923: Hash; + Iso10126: Hash; + Iso97971: Hash; + ZeroPadding: Hash; + NoPadding: Hash; + }; + } + + export var hashes: Hashes; } -declare var CryptoJS: CryptoJSLocal.CryptoJSStatic; - -declare module "crypto-js" { - export = CryptoJS; +declare module 'crypto-js' { + import hashes = CryptoJS.hashes; + export = hashes; } diff --git a/react-bootstrap-validation/react-bootstrap-validation.d.ts b/react-bootstrap-validation/react-bootstrap-validation.d.ts deleted file mode 100644 index 9eeee01c1f..0000000000 --- a/react-bootstrap-validation/react-bootstrap-validation.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/// - -declare module ReactBootstrapValidation{ - - export interface Form { - model; - validateOne: any; - validateAll: any; - errorHelp: string | any; - validationEvent: string; - onValidSubmit: any; - - } - export interface ValidatedInput - { - - name: string; - validationEvent: string; - validate: any; - - type: any; - label: any; - errorHelp: any; - } - - export interface Radio extends ValidatedInput { - - } - - - export interface RadioGroup extends ValidatedInput { - validationEvent: any; - } - - export interface Validator { - - required(val: String); - //Returns true if the value is not null.Can be used as an alias to !isNull validation rule. - isChecked(val: String); - - } - - export interface FileValidator extends Validator { - ref: any; - name: any; - type :any; - label:any; - multiple: any; - validate: any; - - isEmpty(files: FileList); - - /// Returns true if there are no files in file list. - isSingle(files: FileList); - - // Returns true if files count equals to 1. - isMultiple(files: FileList); - - //Returns true if files count is more than 1. - isFilesCount(files: FileList, min: Number, max:Array ); - - //Returns true if files count is within allowed range.If max is not supplied, checks if files count equals min. - isTotalSize(files: FileList, min: Number, max: Array); - - //Returns true if total size of all files is within allowed range. - isEachFileSize(files: FileList, min: Number, max: Array); - - //Returns true if each file's size is within allowed range. - isExtension(files: FileList, extensions: Array); - - //Returns true if each file's extension is in the extensions array. - isType(files: FileList, types: Array); - } - - export interface InputContainer { - - } - } - - -declare module 'react-bootstrap-validation' { - export = ReactBootstrapValidation; -} \ No newline at end of file From adaedc02189c2b4a6429637aef7ca8d88e66b063 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 22 Dec 2015 15:12:14 +1100 Subject: [PATCH 0041/1506] added re-validator --- revalidator/revalidator.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 revalidator/revalidator.d.ts diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts new file mode 100644 index 0000000000..aaf38ba78f --- /dev/null +++ b/revalidator/revalidator.d.ts @@ -0,0 +1,16 @@ +// Type definitions for axios 0.5.2 + +// Definitions by: Jason Turner +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module Revalidator { + interface RevalidatorStatic { + validate(object: any, schema: any, options: any): any; + } +} + +declare var revalidator: Revalidator.RevalidatorStatic; + +declare module "revalidator" { + export = revalidator; +} From 71a528be4d644460a64ec4c7f4dc727df8c91ff7 Mon Sep 17 00:00:00 2001 From: David Broder-Rodgers Date: Wed, 23 Dec 2015 14:05:39 +0000 Subject: [PATCH 0042/1506] Updated chai-things typing --- chai-things/chai-things.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chai-things/chai-things.d.ts b/chai-things/chai-things.d.ts index bc2b89c46f..0c00e1746e 100644 --- a/chai-things/chai-things.d.ts +++ b/chai-things/chai-things.d.ts @@ -1,7 +1,7 @@ // Type definitions for chai-things // Project: https://github.com/chaijs/chai-things // Definitions by: David Broder-Rodgers -// Definitions: https://github.com/DavidBR-SW/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -25,14 +25,14 @@ declare module Chai { interface Anything extends Assertion { (): any; - that: Assertion - with: Assertion + that: Assertion; + with: Assertion; } interface Something extends Assertion { (): any; - that: Assertion - with: Assertion + that: Assertion; + with: Assertion; } interface Item { From 3d4881b0799d1b2fabcebd8afbf0e50f450c6387 Mon Sep 17 00:00:00 2001 From: Darren Hill Date: Wed, 23 Dec 2015 11:25:30 -0500 Subject: [PATCH 0043/1506] Added Definitions for jSuite and SuiteScript --- jsuite/jsuite.d.ts | 42 + suitescript/suitescript.d.ts | 6625 ++++++++++++++++++++++++++++++++++ 2 files changed, 6667 insertions(+) create mode 100644 jsuite/jsuite.d.ts create mode 100644 suitescript/suitescript.d.ts diff --git a/jsuite/jsuite.d.ts b/jsuite/jsuite.d.ts new file mode 100644 index 0000000000..2d32c88e68 --- /dev/null +++ b/jsuite/jsuite.d.ts @@ -0,0 +1,42 @@ +// Type definitions for jSuite +// Project: https://github.com/darrenthill/jsuite +// Definitions by: Darren Hill +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +interface Iconfig { + logging?: boolean; + smartConvert?: boolean; + searchId?: string; + recordType?: string; + filterExpression?: any; + columns?: string; + start?: number; + end?: number; + maxUnitsUsage?: number; +} +declare module jSuite { + function getVersion(): string; + function setLogging(toggle: boolean): void; + function getRoleCenter(): any; + function getUser(): any; + function getScriptParameter(paramName: string): any; + function getDeploymentId(): any; + function getScriptId(): any; + function isProduction(): any; + function clearSublist(transaction: nlobjRecord, listType: string): void; + function getCompanyPreference(paramName: string): any; + function roundNum(num: number, length: number): number; + function isNumber(n: any): boolean; + function runSearch(config?: Iconfig): any; + function lookupField(dataIn: any): string; + function submitField(dataIn: any): any; + function asyncLookupField(config: any, callback: any): void; + function asyncSubmitField(config: any): JQueryXHR; + function audit(title: string, message: string): void; + function debug(title: string, message: string): void; + function error(title: string, message: string): void; + function emergency(title: string, message: string): void; +} diff --git a/suitescript/suitescript.d.ts b/suitescript/suitescript.d.ts new file mode 100644 index 0000000000..3fee0a8785 --- /dev/null +++ b/suitescript/suitescript.d.ts @@ -0,0 +1,6625 @@ +// Type definitions for Suite Script +// Project: http://www.netsuite.com +// Definitions by: Darren Hill +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace nlobjRecord.prototype { + // nlobjRecord.prototype.getSubList.!ret + + /** + * + */ + interface GetSubListRet { + + /** + * + */ + prototype : { + + /** + * + */ + addButton : /*no type*/{}; + + /** + * + */ + setLabel : /* nlobjSubList.prototype.setLabel */ any; + + /** + * + */ + setHelpText : /* nlobjSubList.prototype.setHelpText */ any; + + /** + * + */ + setDisplayType : /* nlobjSubList.prototype.setDisplayType */ any; + + /** + * + */ + setLineItemValue : /* nlobjSubList.prototype.setLineItemValue */ any; + + /** + * + */ + setLineItemMatrixValue : /* nlobjSubList.prototype.setLineItemMatrixValue */ any; + + /** + * + */ + setLineItemValues : /* nlobjSubList.prototype.setLineItemValues */ any; + + /** + * + */ + getLineItemCount : /* nlobjSubList.prototype.getLineItemCount */ any; + + /** + * + */ + addField : /* nlobjSubList.prototype.addField */ any; + + /** + * + */ + setUniqueField : /* nlobjSubList.prototype.setUniqueField */ any; + + /** + * + */ + addRefreshButton : /* nlobjSubList.prototype.addRefreshButton */ any; + + /** + * + */ + addMarkAllButtons : /* nlobjSubList.prototype.addMarkAllButtons */ any; + } + } +} +declare namespace nlobjRecord.prototype.GetSubListRet.prototype { + // nlobjRecord.prototype.getSubList.!ret.prototype.addButton.!ret + + /** + * + */ + interface AddButtonRet { + + /** + * + */ + prototype : { + + /** + * + */ + setLabel : /* nlobjButton.prototype.setLabel */ any; + + /** + * + */ + setDisabled : /* nlobjButton.prototype.setDisabled */ any; + } + } +} +declare namespace nlobjRecord.prototype { + // nlobjRecord.prototype.getField.!ret + + /** + * + */ + interface GetFieldRet { + + /** + * + */ + prototype : { + + /** + * + */ + getName : /* nlobjField.prototype.getName */ any; + + /** + * + */ + getLabel : /* nlobjField.prototype.getLabel */ any; + + /** + * + */ + getType : /* nlobjField.prototype.getType */ any; + + /** + * + */ + isHidden : /* nlobjField.prototype.isHidden */ any; + + /** + * + */ + isMandatory : /* nlobjField.prototype.isMandatory */ any; + + /** + * + */ + isDisabled : /* nlobjField.prototype.isDisabled */ any; + + /** + * + */ + setLabel : /* nlobjField.prototype.setLabel */ any; + + /** + * + */ + setAlias : /* nlobjField.prototype.setAlias */ any; + + /** + * + */ + setDefaultValue : /* nlobjField.prototype.setDefaultValue */ any; + + /** + * + */ + setDisabled : /* nlobjField.prototype.setDisabled */ any; + + /** + * + */ + setMandatory : /* nlobjField.prototype.setMandatory */ any; + + /** + * + */ + setMaxLength : /* nlobjField.prototype.setMaxLength */ any; + + /** + * + */ + setDisplayType : /* nlobjField.prototype.setDisplayType */ any; + + /** + * + */ + setBreakType : /* nlobjField.prototype.setBreakType */ any; + + /** + * + */ + setLayoutType : /* nlobjField.prototype.setLayoutType */ any; + + /** + * + */ + setLinkText : /* nlobjField.prototype.setLinkText */ any; + + /** + * + */ + setDisplaySize : /* nlobjField.prototype.setDisplaySize */ any; + + /** + * + */ + setPadding : /* nlobjField.prototype.setPadding */ any; + + /** + * + */ + setHelpText : /* nlobjField.prototype.setHelpText */ any; + + /** + * + */ + addSelectOption : /* nlobjField.prototype.addSelectOption */ any; + } + } +} +declare namespace nlobjPortlet.prototype { + // nlobjPortlet.prototype.addEditColumn.!0 + + /** + * + */ + interface AddEditColumn0 { + + /** + * + */ + prototype : { + + /** + * + */ + setLabel : /* nlobjColumn.prototype.setLabel */ any; + + /** + * + */ + setURL : /* nlobjColumn.prototype.setURL */ any; + + /** + * + */ + addParamToURL : /* nlobjColumn.prototype.addParamToURL */ any; + } + } +} +declare namespace nlobjForm.prototype { + // nlobjForm.prototype.addTab.!ret + + /** + * + */ + interface AddTabRet { + + /** + * + */ + prototype : { + + /** + * + */ + setLabel : /* nlobjTab.prototype.setLabel */ any; + + /** + * + */ + setHelpText : /* nlobjTab.prototype.setHelpText */ any; + } + } +} +declare namespace nlobjAssistant.prototype { + // nlobjAssistant.prototype.setCurrentStep.!0 + + /** + * + */ + interface SetCurrentStep0 { + + /** + * + */ + prototype : { + + /** + * + */ + setLabel : /* nlobjAssistantStep.prototype.setLabel */ any; + + /** + * + */ + setHelpText : /* nlobjAssistantStep.prototype.setHelpText */ any; + + /** + * + */ + getStepNumber : /* nlobjAssistantStep.prototype.getStepNumber */ any; + + /** + * + */ + getFieldValue : /* nlobjAssistantStep.prototype.getFieldValue */ any; + + /** + * + */ + getFieldValues : /* nlobjAssistantStep.prototype.getFieldValues */ any; + + /** + * + */ + getLineItemCount : /* nlobjAssistantStep.prototype.getLineItemCount */ any; + + /** + * + */ + getLineItemValue : /* nlobjAssistantStep.prototype.getLineItemValue */ any; + + /** + * + */ + getAllFields : /* nlobjAssistantStep.prototype.getAllFields */ any; + + /** + * + */ + getAllLineItems : /* nlobjAssistantStep.prototype.getAllLineItems */ any; + + /** + * + */ + getAllLineItemFields : /* nlobjAssistantStep.prototype.getAllLineItemFields */ any; + } + } +} +declare namespace nlobjForm.prototype { + // nlobjForm.prototype.addFieldGroup.!ret + + /** + * + */ + interface AddFieldGroupRet { + + /** + * + */ + prototype : { + + /** + * + */ + setLabel : /* nlobjFieldGroup.prototype.setLabel */ any; + + /** + * + */ + setCollapsible : /* nlobjFieldGroup.prototype.setCollapsible */ any; + + /** + * + */ + setSingleColumn : /* nlobjFieldGroup.prototype.setSingleColumn */ any; + + /** + * + */ + setShowBorder : /* nlobjFieldGroup.prototype.setShowBorder */ any; + } + } +} +declare namespace nlobjForm.prototype { + // nlobjForm.prototype.addButton.!ret + + /** + * + */ + interface AddButtonRet { + + /** + * + */ + prototype : { + + /** + * + */ + setLabel : /* nlobjButton.prototype.setLabel */ any; + + /** + * + */ + setDisabled : /* nlobjButton.prototype.setDisabled */ any; + } + } +} + +/** + * Return a new record using values from an existing record. + * @governance 10 units for transactions, 2 for custom records, 4 for all other records + * + * @param {string} type The record type name. + * @param {int} id The internal ID for the record. + * @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization. + * @return {nlobjRecord} Returns an nlobjRecord object of a copied record. + * + * @since 2007.0 + * @param type + * @param id + * @param initializeValues + * @return + */ +declare function nlapiCopyRecord(type:string, id:any, initializeValues:any):nlobjRecord; + +declare function nlapiDisableLineItemField(type:string, fldnam:string, val:boolean):void; +declare function nlapiDisableField(fldnam:string, val:any):void; + +/** + * Load an existing record from the system. + * @governance 10 units for transactions, 2 for custom records, 4 for all other records + * + * @param {string} type The record type name. + * @param {int} id The internal ID for the record. + * @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization. + * @return {nlobjRecord} Returns an nlobjRecord object of an existing NetSuite record. + * + * @exception {SSS_INVALID_RECORD_TYPE} + * @exception {SSS_TYPE_ARG_REQD} + * @exception {SSS_INVALID_INTERNAL_ID} + * @exception {SSS_ID_ARG_REQD} + * + * @since 2007.0 + * @param type + * @param id + * @param initializeValues + * @return + */ +declare function nlapiLoadRecord(type:string, id:any, initializeValues:any):nlobjRecord; + +/** + * Instantiate a new nlobjRecord object containing all the default field data for that record type. + * @governance 10 units for transactions, 2 for custom records, 4 for all other records + * + * @param {string} type record type ID. + * @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization. + * @return {nlobjRecord} Returns an nlobjRecord object of a new record from the system. + * + * @exception {SSS_INVALID_RECORD_TYPE} + * @exception {SSS_TYPE_ARG_REQD} + * + * @since 2007.0 + * @param type + * @param initializeValues + * @return + */ +declare function nlapiCreateRecord(type:string, initializeValues:any):nlobjRecord; + +/** + * Submit a record to the system for creation or update. + * @governance 20 units for transactions, 4 for custom records, 8 for all other records + * + * @param {nlobjRecord} record nlobjRecord object containing the data record. + * @param {boolean} [doSourcing] If not set, this argument defaults to false. + * @param {boolean} [ignoreMandatoryFields] Disables mandatory field validation for this submit operation. + * @return {string} internal ID for committed record. + * + * @exception {SSS_INVALID_RECORD_OBJ} + * @exception {SSS_RECORD_OBJ_REQD} + * @exception {SSS_INVALID_SOURCE_ARG} + * + * @since 2007.0 + * @param record + * @param doSourcing? + * @param ignoreMandatoryFields? + * @return + */ +declare function nlapiSubmitRecord(record:any, doSourcing?:boolean, ignoreMandatoryFields?:boolean):string; + +/** + * Delete a record from the system. + * @governance 20 units for transactions, 4 for custom records, 8 for all other records + * + * @param {string} type The record type name. + * @param {int} id The internal ID for the record. + * @return {void} + * + * @exception {SSS_INVALID_RECORD_TYPE} + * @exception {SSS_TYPE_ARG_REQD} + * @exception {SSS_INVALID_INTERNAL_ID} + * @exception {SSS_ID_ARG_REQD} + * + * @since 2007.0 + * @param type + * @param id + * @return + */ +declare function nlapiDeleteRecord(type:string, id:any):void; + +/** + * Perform a record search using an existing search or filters and columns. + * @governance 10 units + * @restriction returns the first 1000 rows in the search + * + * @param {string} type record type ID. + * @param {int, string} [id] The internal ID or script ID for the saved search to use for search. + * @param {nlobjSearchFilter, nlobjSearchFilter[]} [filters] [optional] A single nlobjSearchFilter object - or - an array of nlobjSearchFilter objects. + * @param {nlobjSearchColumn, nlobjSearchColumn[]} [columns] [optional] A single nlobjSearchColumn object - or - an array of nlobjSearchColumn objects. + * @return {nlobjSearchResult[]} Returns an array of nlobjSearchResult objects corresponding to the searched records. + * + * @exception {SSS_INVALID_RECORD_TYPE} + * @exception {SSS_TYPE_ARG_REQD} + * @exception {SSS_INVALID_SRCH_ID} + * @exception {SSS_INVALID_SRCH_FILTER} + * @exception {SSS_INVALID_SRCH_FILTER_JOIN} + * @exception {SSS_INVALID_SRCH_OPERATOR} + * @exception {SSS_INVALID_SRCH_COL_NAME} + * @exception {SSS_INVALID_SRCH_COL_JOIN} + * + * @since 2007.0 + * @param type + * @param id + * @param filters + * @param columns + */ +declare function nlapiSearchRecord(type:string, id:any, filters:any, columns:any):nlobjSearchResult[]; + +/** + * Perform a global record search across the system. + * @governance 10 units + * @restriction returns the first 1000 rows in the search + * + * @param {string} keywords Global search keywords string or expression. + * @return {nlobjSearchResult[]} Returns an Array of nlobjSearchResult objects containing the following four columns: name, type (as shown in the UI), info1, and info2. + * + * @since 2008.1 + * @param keywords + */ +declare function nlapiSearchGlobal(keywords:string):nlobjSearchResult[]; + +/** + * Perform a duplicate record search using Duplicate Detection criteria. + * @governance 10 units + * @restriction returns the first 1000 rows in the search + * + * @param {string} type The recordType you are checking duplicates for (for example, customer|lead|prospect|partner|vendor|contact). + * @param {string[]} [fields] array of field names used to detect duplicate (for example, companyname|email|name|phone|address1|city|state|zipcode). + * @param {int} [id] internal ID of existing record. Depending on the use case, id may or may not be a required argument. + * @return {nlobjSearchResult[]} Returns an Array of nlobjSearchResult objects corresponding to the duplicate records. + * + * @since 2008.1 + * @param type + * @param fields + * @param id? + */ +declare function nlapiSearchDuplicate(type:string, fields:any, id?:any):nlobjSearchResult[]; + +/** + * Create a new record using values from an existing record of a different type. + * @governance 10 units for transactions, 2 for custom records, 4 for all other records + * + * @param {string} type The record type name. + * @param {int} id The internal ID for the record. + * @param {string} transformType The recordType you are transforming the existing record into. + * @param {Object} [transformValues] An object containing transform default option/value pairs used to pre-configure transformed record + * @return {nlobjRecord} + * + * @exception {SSS_INVALID_URL_CATEGORY} + * @exception {SSS_CATEGORY_ARG_REQD} + * @exception {SSS_INVALID_TASK_ID} + * @exception {SSS_TASK_ID_REQD} + * @exception {SSS_INVALID_INTERNAL_ID} + * @exception {SSS_INVALID_EDITMODE_ARG} + * + * @since 2007.0 + * @param type + * @param id + * @param transformType + * @param transformValues? + * @return + */ +declare function nlapiTransformRecord(type:string, id:any, transformType:string, transformValues?:any):nlobjRecord; + +/** + * void a transaction based on type and id . + * @governance 10 units for transactions + * + * @param {string} type The transaction type name. + * @param {string} id The internal ID for the record. + * @return {string} if accounting preference is reversing journal, then it is new journal id, + * otherwise, it is the input record id + * + * @since 2014.1 + * @param type + * @param id + * @return + */ +declare function nlapiVoidTransaction(type:string, id:string):string; + +/** + * Fetch the value of one or more fields on a record. This API uses search to look up the fields and is much + * faster than loading the record in order to get the field. + * @governance 10 units for transactions, 2 for custom records, 4 for all other records + * + * @param {string} type The record type name. + * @param {int} id The internal ID for the record. + * @param {string, string[]} fields - field or fields to look up. + * @param {boolean} [text] If set then the display value is returned instead for select fields. + * @return {string, Object} single value or an Object of field name/value pairs depending on the fields argument. + * + * @since 2008.1 + * @param type + * @param id + * @param fields + * @param text? + */ +declare function nlapiLookupField(type:string, id:number, fields:string, text?:boolean):string; +declare function nlapiLookupField(type:string, id:number, fields:string[], text?:boolean):any; + +/** + * Submit the values of a field or set of fields for an existing record. + * @governance 10 units for transactions, 2 for custom records, 4 for all other records + * @restriction only supported for records and fields where DLE (Direct List Editing) is supported + * + * @param {string} type The record type name. + * @param {int} id The internal ID for the record. + * @param {string, string[]} fields field or fields being updated. + * @param {string, string[]} values field value or field values used for updating. + * @param {boolean} [doSourcing] If not set, this argument defaults to false and field sourcing does not occur. + * @return {void} + * + * @since 2008.1 + * @param type + * @param id + * @param fields + * @param values + * @param doSourcing? + * @return + */ +declare function nlapiSubmitField(type:string, id:any, fields:any, values:any, doSourcing?:boolean):void; + +/** + * Attach a single record to another with optional properties. + * @governance 10 units + * + * @param {string} type1 The record type name being attached + * @param {int} id1 The internal ID for the record being attached + * @param {string} type2 The record type name being attached to + * @param {int} id2 The internal ID for the record being attached to + * @param {Object} [properties] Object containing name/value pairs used to configure attach operation + * @return {void} + * + * @since 2008.2 + * @param type1 + * @param id1 + * @param type2 + * @param id2 + * @param properties? + * @return + */ +declare function nlapiAttachRecord(type1:string, id1:any, type2:string, id2:any, properties?:any):void; + +/** + * Detach a single record from another with optional properties. + * @governance 10 units + * + * @param {string} type1 The record type name being attached + * @param {int} id1 The internal ID for the record being attached + * @param {string} type2 The record type name being attached to + * @param {int} id2 The internal ID for the record being attached to + * @param {Object} [properties] Object containing name/value pairs used to configure detach operation + * @return {void} + * + * @since 2008.2 + * @param type1 + * @param id1 + * @param type2 + * @param id2 + * @param properties? + * @return + */ +declare function nlapiDetachRecord(type1:string, id1:any, type2:string, id2:any, properties?:any):void; + +/** + * Resolve a URL to a resource or object in the system. + * + * @param {string} type type specifier for URL: suitelet|tasklink|record|mediaitem + * @param {string} subtype subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid + * @param {string} [id] internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a + * @param {string} [pagemode] string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view) + * @return {string} + * + * @since 2007.0 + * @param type + * @param subtype + * @param id? + * @param pagemode? + * @return + */ +declare function nlapiResolveURL(type:string, subtype:string, id?:string, pagemode?:string):string; + +/** + * Redirect the user to a page. Only valid in the UI on Suitelets and User Events. In Client scripts this will initialize the redirect URL used upon submit. + * + * @param {string} type type specifier for URL: suitelet|tasklink|record|mediaitem + * @param {string} subtype subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid + * @param {string} [id] internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a + * @param {string} [pagemode] string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view) + * @param {Object} [parameters] Object used to specify additional URL parameters as name/value pairs + * @return {void} + * + * @since 2007.0 + * @param type + * @param subtype + * @param id? + * @param pagemode? + * @param parameters? + * @return + */ +declare function nlapiSetRedirectURL(type:string, subtype:string, id?:string, pagemode?:string, parameters?:any):void; + +/** + * Request a URL to an external or internal resource. + * @restriction NetSuite maintains a white list of CAs that are allowed for https requests. Please see the online documentation for the complete list. + * @governance 10 units + * + * @param {string} url A fully qualified URL to an HTTP(s) resource + * @param {string, Object} [postdata] - string, document, or Object containing POST payload + * @param {Object} [headers] - Object containing request headers. + * @param {function} [callback] - available on the Client to support asynchronous requests. function is passed an nlobjServerResponse with the results. + * @return {nlobjServerResponse} + * + * @exception {SSS_UNKNOWN_HOST} + * @exception {SSS_INVALID_HOST_CERT} + * @exception {SSS_REQUEST_TIME_EXCEEDED} + * + * @since 2007.0 + * @param url + * @param postdata + * @param headers? + * @param callback? + * @param method + * @return + */ +declare function nlapiRequestURL(url:string, postdata:any, headers?:any, callback?:any, method?:any):any; + +/** + * Return context information about the current user/script. + * + * @return {nlobjContext} + * + * @since 2007.0 + * @return + */ +declare function nlapiGetContext():any; + +/** + * Return the internal ID for the currently logged in user. Returns -4 when called from online forms or "Available without Login" Suitelets. + * + * @return {int} + * + * @since 2005.0 + * @return + */ +declare function nlapiGetUser():any; + +/** + * Return the internal ID for the current user's role. Returns 31 (Online Form User) when called from online forms or "Available without Login" Suitelets. + * + * @return {int} + * + * @since 2005.0 + * @return + */ +declare function nlapiGetRole():any; + +/** + * Return the internal ID for the current user's department. + * + * @return {int} + * + * @since 2005.0 + * @return + */ +declare function nlapiGetDepartment():any; + +/** + * Return the internal ID for the current user's location. + * + * @return {int} + * + * @since 2005.0 + * @return + */ +declare function nlapiGetLocation():any; + +/** + * Return the internal ID for the current user's subsidiary. + * + * @return {int} + * + * @since 2008.1 + * @return + */ +declare function nlapiGetSubsidiary():any; + +/** + * Return the recordtype corresponding to the current page or userevent script. + * + * @return {string} + * + * @since 2007.0 + * @return + */ +declare function nlapiGetRecordType():string; + +/** + * Return the internal ID corresponding to the current page or userevent script. + * + * @return {int} + * + * @since 2007.0 + * @return + */ +declare function nlapiGetRecordId():any; + +/** + * Send out an email and associate it with records in the system. + * Supported base types are entity for entities, transaction for transactions, activity for activities and cases, record|recordtype for custom records + * @governance 10 units + * @restriction all outbound emails subject to email Anti-SPAM policies + * + * @param {int} from internal ID for employee user on behalf of whom this email is sent + * @param {string, int} to email address or internal ID of user that this email is being sent to + * @param {string} subject email subject + * @param {string} body email body + * @param {string, string[]} cc copy email address(es) + * @param {string, string[]} bcc blind copy email address(es) + * @param {Object} records Object of base types -> internal IDs used to associate email to records. i.e. {entity: 100, record: 23, recordtype: customrecord_surveys} + * @param {nlobjFile[]} files array of nlobjFile objects (files) to include as attachments + * @param {boolean} notifySenderOnBounce controls whether or not the sender will receive email notification of bounced emails (defaults to false) + * @param {boolean} internalOnly controls or not the resultingMmessage record will be visible to non-employees on the Communication tab of attached records (defaults to false) + * @param {string} replyTo email reply-to address + * @return {void} + * + * @since 2007.0 + * @param from + * @param to + * @param subject + * @param body + * @param cc + * @param bcc + * @param records + * @param files + * @param notifySenderOnBounce + * @param internalOnly + * @param replyTo + * @return + */ +declare function nlapiSendEmail(from:any, to:any, subject:string, body:string, cc:any, bcc:any, records:any, files:any, notifySenderOnBounce:boolean, internalOnly:boolean, replyTo:string):any; + +/** + * Sends a single on-demand campaign email to a specified recipient and returns a campaign response ID to track the email. + * @governance 10 units + * @restriction works in conjunction with the Lead Nurturing (campaigndrip) sublist only + * + * @param {int} campaigneventid internal ID of the campaign event + * @param {int} recipientid internal ID of the recipient - the recipient must have an email + * @return {int} + * + * @since 2010.1 + * @param campaigneventid + * @param recipientid + * @return + */ +declare function nlapiSendCampaignEmail(campaigneventid:any, recipientid:any):any; + +/** + * Send out a fax and associate it with records in the system. This requires fax preferences to be configured. + * Supported base types are entity for entities, transaction for transactions, activity for activities and cases, record|recordtype for custom records + * @governance 10 units + * + * @param {int} from internal ID for employee user on behalf of whom this fax is sent + * @param {string, int} to fax address or internal ID of user that this fax is being sent to + * @param {string} subject fax subject + * @param {string} body fax body + * @param {Object} records Object of base types -> internal IDs used to associate fax to records. i.e. {entity: 100, record: 23, recordtype: customrecord_surveys} + * @param {nlobjFile[]} files array of nlobjFile objects (files) to include as attachments + * @return {void} + * + * @since 2008.2 + * @param from + * @param to + * @param subject + * @param body + * @param records + * @param files + * @return + */ +declare function nlapiSendFax(from:any, to:any, subject:string, body:string, records:any, files:any):any; + +/** + * Return field definition for a field. + * + * @param {string} fldnam the name of the field + * @return {nlobjField} + * + * @since 2009.1 + * @param fldnam + * @return + */ +declare function nlapiGetField(fldnam:string):any; + +/** + * Return field definition for a matrix field. + * + * @param {string} type matrix sublist name + * @param {string} fldnam matrix field name + * @param {int} column matrix field column index (1-based) + * @return {nlobjField} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @return + */ +declare function nlapiGetMatrixField(type:string, fldnam:string, column:any):any; + +/** + * Return field definition for a sublist field. + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} [linenum] line number for sublist field (1-based) and only valid for sublists of type staticlist and list + * @return {nlobjField} + * + * @since 2009.1 + * @param type + * @param fldnam + * @param linenum? + * @return + */ +declare function nlapiGetLineItemField(type:string, fldnam:string, linenum?:any):any; + +/** + * Return an nlobjField containing sublist field metadata. + * + * @param {string} type matrix sublist name + * @param {string} fldnam matrix field name + * @param {int} linenum line number (1-based) + * @param {int} column matrix column index (1-based) + * @return {nlobjField} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param linenum + * @param column + * @return + */ +declare function nlapiGetLineItemMatrixField(type:string, fldnam:string, linenum:any, column:any):any; + +/** + * Return the value of a field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam the field name + * @return {string} + * + * @since 2005.0 + * @param fldnam + * @return + */ +declare function nlapiGetFieldValue(fldnam:string):string; + +/** + * Set the value of a field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} fldnam the field name + * @param {string} value value used to set field + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2005.0 + * @param fldnam + * @param value + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetFieldValue(fldnam:string, value:string, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Return the display value of a select field's current selection on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam the field name + * @return {string} + * + * @since 2005.0 + * @param fldnam + * @return + */ +declare function nlapiGetFieldText(fldnam:string):string; + +/** + * Set the value of a field on the current record on a page using it's label. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} fldnam the field name + * @param {string} txt display name used to lookup field value + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2005.0 + * @param fldnam + * @param txt + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetFieldText(fldnam:string, txt:string, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Return the values of a multiselect field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam the field name + * @return {string[]} + * + * @since 2005.0 + * @param fldnam + */ +declare function nlapiGetFieldValues(fldnam:string):void; + +/** + * Set the values of a multiselect field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} fldnam field name + * @param {string[]} values array of strings containing values for field + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2005.0 + * @param fldnam + * @param values + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetFieldValues(fldnam:string, values:any, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Return the values (via display text) of a multiselect field on the current record. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam field name + * @return {string[]} + * + * @since 2009.1 + * @param fldnam + */ +declare function nlapiGetFieldTexts(fldnam:string):void; + +/** + * Set the values (via display text) of a multiselect field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} fldnam field name + * @param {string[]} texts array of strings containing display values for field + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2009.1 + * @param fldnam + * @param texts + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetFieldTexts(fldnam:string, texts:any, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Get the value of a matrix header field + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} column matrix column index (1-based) + * @return {string} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @return + */ +declare function nlapiGetMatrixValue(type:string, fldnam:string, column:any):string; + +/** + * Set the value of a matrix header field + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} column matrix column index (1-based) + * @param {string} value field value for matrix field + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @param value + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetMatrixValue(type:string, fldnam:string, column:any, value:string, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Get the current value of a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} column matrix column index (1-based) + * @return {string} value + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @return + */ +declare function nlapiGetCurrentLineItemMatrixValue(type:string, fldnam:string, column:any):string; + +/** + * Set the current value of a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @restriction synchronous arg is only supported in Client SuiteScript + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} column matrix column index (1-based) + * @param {string} value matrix field value + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @param value + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetCurrentLineItemMatrixValue(type:string, fldnam:string, column:any, value:string, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Return the value of a sublist matrix field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} linenum line number (1-based) + * @param {int} column column index (1-based) + * @param {string} value + * + * @since 2009.2 + * @param type + * @param fldnam + * @param linenum + * @param column + */ +declare function nlapiGetLineItemMatrixValue(type:string, fldnam:string, linenum:any, column:any):void; + +/** + * Return the value of a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} linenum line number (1-based) + * @return {string} + * + * @since 2005.0 + * @param type + * @param fldnam + * @param linenum + * @return + */ +declare function nlapiGetLineItemValue(type:string, fldnam:string, linenum:any):string; + +/** + * Return the value of a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} linenum line number (1-based) + * @param {string} timezone value + * @return {string} + * + * @since 2013.2 + * @param type + * @param fldnam + * @param linenum + * @param timezone + * @return + */ +declare function nlapiGetLineItemDateTimeValue(type:string, fldnam:string, linenum:any, timezone:string):string; + +/** + * Set the value of a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} linenum line number (1-based) + * @param {string} value + * @retun {void} + * + * @since 2005.0 + * @param type + * @param fldnam + * @param linenum + * @param value + */ +declare function nlapiSetLineItemValue(type:string, fldnam:string, linenum:any, value:string):void; + +/** + * Set the value of a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} linenum line number (1-based) + * @param {string} datetime value + * @param {string} timezone value + * @retun {void} + * + * @since 2013.2 + * @param type + * @param fldnam + * @param linenum + * @param value + * @param timezone + */ +declare function nlapiSetLineItemDateTimeValue(type:string, fldnam:string, linenum:any, value:any, timezone:string):void; + +/** + * Return the label of a select field's current selection for a particular line. + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} linenum line number (1-based) + * @return {string} + * + * @since 2005.0 + * @param type + * @param fldnam + * @param linenum + * @return + */ +declare function nlapiGetLineItemText(type:string, fldnam:string, linenum:any):string; + +/** + * Return the 1st line number that a sublist field value appears in + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} val the value being queried for in a sublist field + * @return {int} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param val + * @return + */ +declare function nlapiFindLineItemValue(type:string, fldnam:string, val:string):any; + +/** + * Return the 1st line number that a matrix field value appears in + * + * @param {string} type sublist name + * @param {string} fldnam matrix field name + * @param {int} column matrix column index (1-based) + * @param {string} val the value being queried for in a matrix field + * @return {int} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @param val + * @return + */ +declare function nlapiFindLineItemMatrixValue(type:string, fldnam:string, column:any, val:string):any; + +/** + * Return the number of columns for a matrix field + * + * @param {string} type sublist name + * @param {string} fldnam matrix field name + * @return {int} + * + * @since 2009.2 + * @param type + * @param fldnam + * @return + */ +declare function nlapiGetMatrixCount(type:string, fldnam:string):any; + +/** + * Return the number of sublists in a sublist on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @return {int} + * + * @since 2005.0 + * @param type + * @return + */ +declare function nlapiGetLineItemCount(type:string):any; + +/** + * Insert and select a new line into the sublist on a page or userevent. + * + * @param {string} type sublist name + * @param {int} [line] line number at which to insert a new line. + * @return{void} + * + * @since 2005.0 + * @param type + * @param line? + */ +declare function nlapiInsertLineItem(type:string, line?:any):void; + +/** + * Remove the currently selected line from the sublist on a page or userevent. + * + * @param {string} type sublist name + * @param {int} [line] line number to remove. + * @return {void} + * + * @since 2005.0 + * @param type + * @param line? + * @return + */ +declare function nlapiRemoveLineItem(type:string, line?:any):any; + +/** + * Set the value of a field on the currently selected line. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} value field value + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2005.0 + * @param type + * @param fldnam + * @param value + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetCurrentLineItemValue(type:string, fldnam:string, value:string, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Set the value of a field on the currently selected line. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} value field value + * @param {string} timezone value + * @return {void} + * + * @since 2013.2 + * @param type + * @param fldnam + * @param value + * @param timezone + * @return + */ +declare function nlapiSetCurrentLineItemDateTimeValue(type:string, fldnam:string, value:string, timezone:string):any; + +/** + * Set the value of a field on the currently selected line using it's label. + * @restriction synchronous arg is only supported in client SuiteScript + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} txt string containing display value or search text. + * @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true) + * @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false). + * @return {void} + * + * @since 2005.0 + * @param type + * @param fldnam + * @param txt + * @param firefieldchanged? + * @param synchronous? + * @return + */ +declare function nlapiSetCurrentLineItemText(type:string, fldnam:string, txt:string, firefieldchanged?:boolean, synchronous?:boolean):any; + +/** + * Return the value of a field on the currently selected line. + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @return {string} + * + * @since 2005.0 + * @param type + * @param fldnam + * @return + */ +declare function nlapiGetCurrentLineItemValue(type:string, fldnam:string):string; + +/** + * Return the value of a field on the currently selected line. + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} timezone value + * @return {string} + * + * @since 2013.2 + * @param type + * @param fldnam + * @param timezone + * @return + */ +declare function nlapiGetCurrentLineItemDateTimeValue(type:string, fldnam:string, timezone:string):string; + +/** + * Return the label of a select field's current selection on the currently selected line. + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @return {string} + * + * @since 2005.0 + * @param type + * @param fldnam + * @return + */ +declare function nlapiGetCurrentLineItemText(type:string, fldnam:string):string; + +/** + * Return the line number for the currently selected line. + * + * @param {string} type sublist name + * @return {int} + * + * @since 2005.0 + * @param type + * @return + */ +declare function nlapiGetCurrentLineItemIndex(type:string):any; + +/** + * Disable a sublist field. + * @restriction Only supported on sublists of type inlineeditor, editor and list (current field only) + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {boolean} disable if true then field is disabled + * @param {int} linenum line number for sublist field (1-based) and only valid for sublists of type list + * @return {void} + * + * @since 2009.1 + * @param type + * @param fldnam + * @param disable + * @param linenum + * @return + */ +declare function nlapiSetLineItemDisabled(type:string, fldnam:string, disable:boolean, linenum:any):any; + +/** + * Return field mandatoriness. + * + * @param {string} fldnam field name + * @return {boolean} + * + * @since 2009.1 + * @param fldnam + * @return + */ +declare function nlapiGetFieldMandatory(fldnam:string):boolean; + +/** + * Return sublist field mandatoriness. + * @restriction Only supported on sublists of type inlineeditor or editor (current field only) + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @return {boolean} + * + * @since 2009.1 + * @param type + * @param fldnam + * @return + */ +declare function nlapiGetLineItemMandatory(type:string, fldnam:string):boolean; + +/** + * Make a field mandatory. + * + * @param {string} fldnam field name + * @param {boolean} mandatory if true then field is made mandatory + * @return {void} + * + * @since 2009.1 + * @param fldnam + * @param mandatory + * @return + */ +declare function nlapiSetFieldMandatory(fldnam:string, mandatory:boolean):any; + +/** + * Make a sublist field mandatory. + * @restriction Only supported on sublists of type inlineeditor or editor (current field only) + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {boolean} mandatory if true then field is made mandatory + * @return {void} + * + * @since 2009.2 + * @param type + * @param fldnam + * @param mandatory + * @return + */ +declare function nlapiSetLineItemMandatory(type:string, fldnam:string, mandatory:boolean):any; + +/** + * Select an existing line in a sublist. + * + * @param {string} type sublist name + * @param {int} linenum line number to select + * @return {void} + * + * @since 2005.0 + * @param type + * @param linenum + * @return + */ +declare function nlapiSelectLineItem(type:string, linenum:any):any; + +/** + * Save changes made on the currently selected line to the sublist. + * + * @param {string} type sublist name + * @return {void} + * + * @since 2005.0 + * @param type + * @return + */ +declare function nlapiCommitLineItem(type:string):any; + +/** + * Cancel any changes made on the currently selected line. + * @restriction Only supported for sublists of type inlineeditor and editor + * + * @param {string} type sublist name + * @return {void} + * + * @since 2005.0 + * @param type + * @return + */ +declare function nlapiCancelLineItem(type:string):any; + +/** + * Select a new line in a sublist. + * @restriction Only supported for sublists of type inlineeditor and editor + * + * @param {string} type sublist name + * @return {void} + * + * @since 2005.0 + * @param type + * @return + */ +declare function nlapiSelectNewLineItem(type:string):any; + +/** + * Refresh the sublist table. + * @restriction Only supported for sublists of type inlineeditor, editor, and staticlist + * @restriction Client SuiteScript only. + * + * @param {string} type sublist name + * @return{void} + * + * @since 2005.0 + * @param type + */ +declare function nlapiRefreshLineItems(type:string):void; + +/** + * Adds a select option to a scripted select or multiselect field. + * @restriction Client SuiteScript only + * + * @param {string} fldnam field name + * @param {string} value internal ID for select option + * @param {string} text display text for select option + * @param {boolean} [selected] if true then option will be selected by default + * @return {void} + * + * @since 2008.2 + * @param fldnam + * @param value + * @param text + * @param selected? + * @return + */ +declare function nlapiInsertSelectOption(fldnam:string, value:string, text:string, selected?:boolean):any; + +/** + * Removes a select option (or all if value is null) from a scripted select or multiselect field. + * @restriction Client SuiteScript only + * + * @param {string} fldnam field name + * @param {string} value internal ID of select option to remove + * @return {void} + * + * @since 2008.2 + * @param fldnam + * @param value + * @return + */ +declare function nlapiRemoveSelectOption(fldnam:string, value:string):any; + +/** + * Adds a select option to a scripted select or multiselect sublist field. + * @restriction Client SuiteScript only + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} value internal ID for select option + * @param {string} text display text for select option + * @param {boolean} [selected] if true then option will be selected by default + * @return {void} + * + * @since 2008.2 + * @param type + * @param fldnam + * @param value + * @param text + * @param selected? + * @return + */ +declare function nlapiInsertLineItemOption(type:string, fldnam:string, value:string, text:string, selected?:boolean):any; + +/** + * Removes a select option (or all if value is null) from a scripted select or multiselect sublist field. + * @restriction Client SuiteScript only + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {string} value internal ID for select option to remove + * @return {void} + * + * @since 2008.2 + * @param type + * @param fldnam + * @param value + * @return + */ +declare function nlapiRemoveLineItemOption(type:string, fldnam:string, value:string):any; + +/** + * Returns true if any changes have been made to a sublist. + * @restriction Client SuiteScript only + * + * @param {string} type sublist name + * @return {boolean} + * + * @since 2005.0 + * @param type + * @return + */ +declare function nlapiIsLineItemChanged(type:string):boolean; + +/** + * Return an record object containing the data being submitted to the system for the currenr record. + * @restriction User Event scripts only + * + * @return {nlobjRecord} + * + * @since 2008.1 + * @return + */ +declare function nlapiGetNewRecord():any; + +/** + * Return an record object containing the current record's data prior to the write operation. + * @restriction beforeSubmit|afterSubmit User Event scripts only + * + * @return {nlobjRecord} + * + * @since 2008.1 + * @return + */ +declare function nlapiGetOldRecord():any; + +/** + * Create an nlobjError object that can be used to abort script execution and configure error notification + * + * @param {string} code error code + * @param {string} details error description + * @param {boolean} [suppressEmail] if true then suppress the error notification emails from being sent out (false by default). + * @return {nlobjError} + * + * @since 2008.2 + * @param code + * @param details + * @param suppressEmail? + * @return + */ +declare function nlapiCreateError(code:string, details:string, suppressEmail?:boolean):any; + +/** + * Return a new entry form page. + * @restriction Suitelets only + * + * @param {string} title page title + * @param {boolean} [hideHeader] true to hide the page header (false by default) + * @return {nlobjForm} + * + * @since 2008.2 + * @param title + * @param hideHeader? + * @return + */ +declare function nlapiCreateForm(title:string, hideHeader?:boolean):nlobjForm; + +/** + * Return a new list page. + * @restriction Suitelets only + * + * @param {string} title page title + * @param {boolean} [hideHeader] true to hide the page header (false by default) + * @return {nlobjList} + * + * @since 2008.2 + * @param title + * @param hideHeader? + * @return + */ +declare function nlapiCreateList(title:string, hideHeader?:boolean):any; + +/** + * Return a new assistant page. + * @restriction Suitelets only + * + * @param {string} title page title + * @param {boolean} [hideHeader] true to hide the page header (false by default) + * @return {nlobjAssistant} + * + * @since 2009.2 + * @param title + * @param hideHeader? + * @return + */ +declare function nlapiCreateAssistant(title:string, hideHeader?:boolean):any; + +/** + * Load a file from the file cabinet (via its internal ID or path). + * @governance 10 units + * @restriction Server SuiteScript only + * + * @param {string, int} id internal ID or relative path to file in the file cabinet (i.e. /SuiteScript/foo.js) + * @return {nlobjFile} + * + * @since 2008.2 + * @param id + * @return + */ +declare function nlapiLoadFile(id:any):any; + +/** + * Add/update a file in the file cabinet. + * @governance 20 units + * @restriction Server SuiteScript only + * + * @param {nlobjFile} file a file object to submit + * @return {int} return internal ID of file + * + * @since 2009.1 + * @param file + * @return + */ +declare function nlapiSubmitFile(file:any):any; + +/** + * Delete a file from the file cabinet. + * @governance 20 units + * @restriction Server SuiteScript only + * + * @param {int} id internal ID of file to be deleted + * @return {id} + * + * @since 2009.1 + * @param id + * @return + */ +declare function nlapiDeleteFile(id:any):any; + +/** + * Instantiate a file object (specifying the name, type, and contents which are base-64 encoded for binary types.) + * @restriction Server SuiteScript only + * + * @param {string} name file name + * @param {string} type file type i.e. plainText, htmlDoc, pdf, word (see documentation for the list of supported file types) + * @param {string} contents string containing file contents (must be base-64 encoded for binary types) + * @return {nlobjFile} + * + * @since 2009.1 + * @param name + * @param type + * @param contents + * @return + */ +declare function nlapiCreateFile(name:string, type:string, contents:string):any; + +/** + * Perform a mail merge operation using any template and up to 2 records and returns an nlobjFile with the results. + * @restriction only supported for record types that are available in mail merge: transactions, entities, custom records, and cases + * @restriction Server SuiteScript only + * @governance 10 units + * + * @param {int} id internal ID of template + * @param {string} baseType primary record type + * @param {int} baseId internal ID of primary record + * @param {string} [altType] secondary record type + * @param {int} [altId] internal ID of secondary record + * @param {Object} [fields] Object of merge field values to use in the mail merge (by default all field values are obtained from records) which overrides those from the record. + * @return {nlobjFile} + * + * @since 2008.2 + * @param id + * @param baseType + * @param baseId + * @param altType? + * @param altId? + * @param fields? + * @return + */ +declare function nlapiMergeRecord(id:any, baseType:string, baseId:any, altType?:string, altId?:any, fields?:any):any; + +/** + * Print a record (transaction) gievn its type, id, and output format. + * @restriction Server SuiteScript only + * @governance 10 units + * + * @param {string} type print output type: transaction|statement|packingslip|pickingticket + * @param {int} id internal ID of record to print + * @param {string} [format] output format: html|pdf|default + * @param {Object} [properties] Object of properties used to configure print + * @return {nlobjFile} + * + * @since 2008.2 + * @param type + * @param id + * @param format? + * @param properties? + * @return + */ +declare function nlapiPrintRecord(type:string, id:any, format?:string, properties?:any):any; + +/** + * Generate a PDF from XML using the BFO report writer (see http://big.faceless.org/products/report/). + * @restriction Server SuiteScript only + * @governance 10 units + * + * @param {string} input string containing BFO compliant XHTML + * @return {nlobjFile} + * + * @since 2009.1 + * @param input + * @return + */ +declare function nlapiXMLToPDF(input:string):any; + +/** + * Create a template renderer used to generate various outputs based on a template. + * @restriction Server SuiteScript only + * @governance 10 units + * + * @param {string} type media type: pdf|html + * @param {string} [engineType] [optional]: default is freemarker/html + * @return {nlobjTemplateRenderer} + * @return + */ +declare function nlapiCreateTemplateRenderer():any; + +/** + * Create an email merger used to assemble subject and body text of an email from a given + * FreeMarker template and a set of associated records. + * @restriction Server SuiteScript only + * + * @param {int} templateId internal ID of the template + * @return {nlobjEmailMerger} + * + * @since 2015.1 + * @param id + * @return + */ +declare function nlapiCreateEmailMerger(id:any):any; + +/** + * Create an entry in the script execution log (note that execution log entries are automatically purged after 30 days). + * + * @param {string} type log type: debug|audit|error|emergency + * @param {string} title log title (up to 90 characters supported) + * @param {string} [details] log details (up to 3000 characters supported) + * @return {void} + * + * @since 2008.1 + * @param type + * @param title + * @param details? + * @return + */ +declare function nlapiLogExecution(type:string, title:string, details?:string):any; + +/** + * Queue a scheduled script for immediate execution and return the status QUEUED if successfull. + * @restriction Server SuiteScript only + * @governance 20 units + * + * @param {string, int} script script ID or internal ID of scheduled script + * @param {string, int} [deployment] script ID or internal ID of scheduled script deployment. If empty, the first "free" deployment (i.e. status = Not Scheduled or Completed) will be used + * @param {Object} parameters Object of parameter name->values used in this scheduled script instance + * @return {string} QUEUED or null if no available deployments were found or the current status of the deployment specified if it was not available. + * + * @since 2008.1 + * @param script + * @param deployment + * @param parameters + * @return + */ +declare function nlapiScheduleScript(script:any, deployment:any, parameters:any):string; + +/** + * Return a URL with a generated OAuth token. + * @restriction Suitelets and Portlets only + * @governance 20 units + * + * @param {string} ssoAppKey + * @return {string} + * + * @since 2009.2 + * @param ssoAppKey + * @return + */ +declare function nlapiOutboundSSO(ssoAppKey:string):string; + +/** + * Loads a configuration record + * @restriction Server SuiteScript only + * @governance 10 units + * + * @param {string} type + * @return {nlobjConfiguration} + * + * @since 2009.2 + * @param type + * @return + */ +declare function nlapiLoadConfiguration(type:string):any; + +/** + * Commits all changes to a configuration record. + * @restriction Server SuiteScript only + * @governance 10 units + * + * @param {nlobjConfiguration} setup record + * @return (void) + * + * @since 2009.2 + * @param setup + */ +declare function nlapiSubmitConfiguration(setup:any):void; + +/** + * Convert a String into a Date object. + * + * @param {string} str date string in the user's date format, timeofday format, or datetime format + * @param {string} format format type to use: date|datetime|timeofday with date being the default + * @return {date} + * + * @since 2005.0 + * @param str + * @param format + * @return + */ +declare function nlapiStringToDate(str:string, format:string):any; + +/** + * Convert a Date object into a String + * + * @param {date} d date object being converted to a string + * @param {string} [formattype] format type to use: date|datetime|timeofday with date being the default + * @return {string} + * + * @since 2005.0 + * @param d + * @param formattype? + * @return + */ +declare function nlapiDateToString(d:any, formattype?:string):string; + +/** + * Add days to a Date object and returns a new Date + * + * @param {date} d date object used to calculate the new date + * @param {int} days the number of days to add to this date object. + * @return {date} + * + * @since 2008.1 + * @param d + * @param days + * @return + */ +declare function nlapiAddDays(d:any, days:any):any; + +/** + * Add months to a Date object and returns a new Date. + * + * @param {date} d date object used to calculate the new date + * @param {int} months the number of months to add to this date object. + * @return {date} + * + * @since 2008.1 + * @param d + * @param months + * @return + */ +declare function nlapiAddMonths(d:any, months:any):any; + +/** + * Format a number for data entry into a currency field. + * + * @param {string} str numeric string used to format for display as currency using user's locale + * @return {string} + * + * @since 2008.1 + * @param str + * @return + */ +declare function nlapiFormatCurrency(str:string):string; + +/** + * Encrypt a String using a SHA-1 hash function + * + * @param {string} s string to encrypt + * @return {string} + * + * @since 2009.2 + * @param s + * @return + */ +declare function nlapiEncrypt(s:string):string; + +/** + * Escape a String for use in an XML document. + * + * @param {string} text string to escape + * @return {string} + * + * @since 2008.1 + * @param text + * @return + */ +declare function nlapiEscapeXML(text:string):string; + +/** + * Convert a String into an XML document. Note that in Server SuiteScript XML is supported natively by the JS runtime using the e4x standard (http://en.wikipedia.org/wiki/E4X) + * This makes scripting XML simpler and more efficient + * + * @param {string} str string being parsed into an XML document + * @return {document} + * + * @since 2008.1 + * @param str + * @return + */ +declare function nlapiStringToXML(str:string):any; + +/** + * Convert an XML document into a String. Note that in Server SuiteScript XML is supported natively by the JS runtime using the e4x standard (http://en.wikipedia.org/wiki/E4X) + * This makes scripting XML data simpler and more efficient + * + * @param {document} xml document being serialized into a string + * @return {string} + * + * @since 2008.1 + * @param xml + * @return + */ +declare function nlapiXMLToString(xml:any):string; + +/** + * Validate that a given XML document conforms to a given XML schema. XML Schema Definition (XSD) is the expected schema format. + * + * @param {document} xmlDocument xml to validate + * @param {document} schemaDocument schema to enforce + * @param {string} schemaFolderId if your schema utilizes or tags which refer to sub-schemas by file name (as opposed to URL), + * provide the Internal Id of File Cabinet folder containing these sub-schemas as the schemaFolderId argument + * @throws {nlobjError} error containsing validation failure message(s) - limited to first 10 + * + * @since 2014.1 + * @param xmlDocument + * @param schemaDocument + * @param schemaFolderId + */ +declare function nlapiValidateXML(xmlDocument:any, schemaDocument:any, schemaFolderId:string):void; + +/** + * select a value from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix) + * + * @param {node} node node being queried + * @param {string} xpath string containing XPath expression. + * @return {string} + * + * @since 2008.2 + * @param node + * @param xpath + * @return + */ +declare function nlapiSelectValue(node:any, xpath:string):string; + +/** + * Select an array of values from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix) + * + * @param {node} node node being queried + * @param {string} xpath string containing XPath expression. + * @return {string[]} + * + * @since 2008.1 + * @param node + * @param xpath + */ +declare function nlapiSelectValues(node:any, xpath:string):void; + +/** + * Select a node from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix) + * + * @param {node} node node being queried + * @param {string} xpath string containing XPath expression. + * @return {node} + * + * @since 2008.1 + * @param node + * @param xpath + * @return + */ +declare function nlapiSelectNode(node:any, xpath:string):any; + +/** + * Select an array of nodes from an XML node using XPath. Supports custom namespaces (nodes in default namespace can be referenced using "nlapi" as the prefix) + * + * @param {node} node node being queried + * @param {string} xpath string containing XPath expression. + * @return {node[]} + * + * @since 2008.1 + * @param node + * @param xpath + */ +declare function nlapiSelectNodes(node:any, xpath:string):void; + +/** + * Calculate exchange rate between two currencies as of today or an optional effective date. + * @governance 10 units + * + * @param {string, int} fromCurrency internal ID or currency code of currency we are converting from + * @param {string, int} toCurrency internal ID or currency code of currency we are converting to + * @param {string} [date] string containing date of effective exchange rate. defaults to today + * @return {float} + * + * @since 2009.1 + * @param fromCurrency + * @param toCurrency + * @param date? + * @return + */ +declare function nlapiExchangeRate(fromCurrency:any, toCurrency:any, date?:string):any; + +/** + * Initiates a workflow on-demand and returns the workflow instance ID for the workflow-record combination. + * @governance 20 units + * + * @param {string} recordtype record type ID of the workflow base record + * @param {int} id internal ID of the base record + * @param {string, int} workflowid internal ID or script ID for the workflow definition + * @return {int} + * + * @since 2010.1 + * @param recordtype + * @param id + * @param workflowid + * @return + */ +declare function nlapiInitiateWorkflow(recordtype:string, id:any, workflowid:any):any; + +/** + * Initiates a workflow on-demand and returns the workflow instance ID for the workflow-record combination. + * @governance 20 units + * + * @param {string} recordtype record type ID of the workflow base record + * @param {string, int} id internal ID of the base record + * @param {string, int} workflowid internal ID or script ID for the workflow definition + * @return {string} + * + * @since 2014.2 + * @param recordType + * @param id + * @param workflowId + * @param parameters + * @return + */ +declare function nlapiInitiateWorkflowAsync(recordType:any, id:any, workflowId:any, parameters:any):string; + +/** + * Triggers a workflow on a record. + * @governance 20 units + * + * @param {string} recordtype record type ID of the workflow base record + * @param {int} id internal ID of the base record + * @param {string, int} workflowid internal ID or script ID for the workflow definition + * @param {string, int} actionid internal ID or script ID of the action script + * @param {string, int} stateid internal ID or script ID of the state contains the referenced add button action + * @return {int} + * + * @since 2010.1 + * @param recordtype + * @param id + * @param workflowid + * @param actionid + * @param stateid + * @return + */ +declare function nlapiTriggerWorkflow(recordtype:string, id:any, workflowid:any, actionid:any, stateid:any):any; + +/** + * Create a subrecord on a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param type + * @param fldnam + */ +declare function nlapiCreateCurrentLineSubrecord(type:string, fldnam:string):void; + +/** + * edit a subrecord on a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param type + * @param fldnam + */ +declare function nlapiEditCurrentLineItemSubrecord(type:string, fldnam:string):void; + +/** + * remove a subrecord on a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @retun {void} + * + * @since 2011.2 + * @param type + * @param fldnam + */ +declare function nlapiRemoveCurrentLineItemSubrecord(type:string, fldnam:string):void; + +/** + * view a subrecord on a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param type + * @param fldnam + */ +declare function nlapiViewCurrentLineItemSubrecord(type:string, fldnam:string):void; + +/** + * view a subrecord on a sublist field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param type + * @param fldnam + * @param linenum + */ +declare function nlapiViewLineItemSubrecord(type:string, fldnam:string, linenum:any):void; + +/** + * get a cache object. + * @param {string} name of the cache + * @return {nlobjCache} + * + * @since 2013.2 + * @param name + * @return + */ +declare function nlapiGetCache(name:string):any; + +/** + * create a subrecord on body field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam body field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param fldnam + */ +declare function createSubrecord(fldnam:string):void; + +/** + * edit a subrecord on body field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam body field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param fldnam + */ +declare function editSubrecord(fldnam:string):void; + +/** + * remove a subrecord on body field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam body field name + * @retun {void} + * + * @since 2011.2 + * @param fldnam + */ +declare function removeSubrecord(fldnam:string):void; + +/** + * view a subrecord on body field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam body field name + * @retun {nlobjSubrecord} + * + * @since 2011.2 + * @param fldnam + */ +declare function viewSubrecord(fldnam:string):void; + +/** + * Return a new instance of nlobjRecord used for accessing and manipulating record objects. + * + * @classDescription Class definition for business records in the system. + * @return {nlobjRecord} + * @constructor + * + * @since 2008.2 + */ +declare interface nlobjRecord { + + /** + * + * @return + */ + new (): any; + + /** + * Return the internalId of the record or NULL for new records. + * + * @return {int} Return the integer value of the record ID. + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @return + */ + getId(): any; + + /** + * Return the recordType corresponding to this record. + * + * @return {string} The string value of the record name internal ID + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @return + */ + getRecordType(): string; + + /** + * Return field metadata for field. + * + * @param {string} fldnam field name + * @return {nlobjField} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.1 + * @param fldnam + * @return + */ + getField(fldnam:string): () => void; + + /** + * Return sublist metadata for sublist. + * + * @param {string} type sublist name + * @return {nlobjSubList} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param type + * @return + */ + getSubList(type:string): () => void; + + /** + * Return field metadata for field. + * + * @param {string} type matrix sublist name + * @param {string} fldnam matrix field name + * @param {column} linenum matrix column (1-based) + * @return {nlobjField} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param type + * @param fldnam + * @param column + * @return + */ + getMatrixField(type:string, fldnam:string, column:any): () => void; + + /** + * Return metadata for sublist field. + * + * @param {string} type sublist name + * @param {string} fldnam sublist field name + * @param {int} [linenum] line number (1-based). If empty, the current sublist field is returned. only settable for sublists of type list + * @return {nlobjField} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param type + * @param fldnam + * @param linenum? + * @return + */ + getLineItemField(type:string, fldnam:string, linenum?:any): () => void; + + /** + * Return metadata for sublist field. + * + * @param {string} type matrix sublist name + * @param {string} fldnam matrix field name + * @param {int} linenum line number + * @param {column} linenum matrix column (1-based) + * @return {nlobjField} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param type + * @param fldnam + * @param linenum + * @param column + * @return + */ + getLineItemMatrixField(type:string, fldnam:string, linenum:any, column:any): () => void; + + /** + * Set the value of a field. + * + * @param {string} name field name + * @param {string} value field value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @param name + * @param value + * @return + */ + setFieldValue(name:string, value:string): any; + + /** + * Set the values of a multi-select field. + * + * @param {string} name field name + * @param {string[]} values string array containing field values + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @param name + * @param values + */ + setFieldValues(name:string, values:any): void; + + /** + * Return the value of a field. + * + * @param {string} name field name + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @param name + * @return + */ + getFieldValue(name:string): string; + + /** + * Return the selected values of a multi-select field as an Array. + * + * @param {string} name field name + * @return {string[]} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @param name + */ + getFieldValues(name:string): void; + + /** + * Set the value (via display value) of a select field. + * @restriction only supported for select fields + * + * @param {string} name field name + * @param {string} text field display value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.2 + * @param name + * @param text + * @return + */ + setFieldText(name:string, text:string): any; + + /** + * Set the values (via display values) of a multi-select field. + * @restriction only supported for multi-select fields + * + * @param {string} name field name + * @param {string[]} texts array of field display values + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.2 + * @param name + * @param texts + * @return + */ + setFieldTexts(name:string, texts:any): any; + + /** + * Return the display value for a select field. + * @restriction only supported for select fields + * + * @param {string} name field name + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.2 + * @param name + * @return + */ + getFieldText(name:string): string; + + /** + * Return the selected display values of a multi-select field as an Array. + * @restriction only supported for multi-select fields + * + * @param {string} name field name + * @return {string[]} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.2 + * @param name + */ + getFieldTexts(name:string): void; + + /** + * Get the value of a matrix header field. + * + * @param {string} type matrix sublist name + * @param {string} name matrix field name + * @param {int} column matrix column index (1-based) + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param type + * @param name + * @param column + * @return + */ + getMatrixValue(type:string, name:string, column:any): string; + + /** + * Set the value of a matrix header field. + * + * @param {string} type matrix sublist name + * @param {string} name matrix field name + * @param {int} column matrix column index (1-based) + * @param {string} value field value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param type + * @param name + * @param column + * @param value + * @return + */ + setMatrixValue(type:string, name:string, column:any, value:string): any; + + /** + * Return an Array of all field names on the record. + * + * @return {string[]} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + */ + getAllFields(): void; + + /** + * Return an Array of all field names on a record for a particular sublist. + * + * @param {string} group sublist name + * @return {string[]} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.2 + * @param group + */ + getAllLineItemFields(group:string): void; + + /** + * Set the value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line line number (1-based) + * @param {string} value sublist field value + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @param group + * @param name + * @param line + * @param value + */ + setLineItemValue(group:string, name:string, line:any, value:string): void; + + /** + * Set the value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line line number (1-based) + * @param {string} datetime value + * @param {string} timezone value + * + * @method + * @memberOf nlobjRecord + * + * @since 2013.2 + * @param group + * @param name + * @param line + * @param value + * @param timezone + */ + setLineItemDateTimeValue(group:string, name:string, line:any, value:any, timezone:string): void; + + /** + * Return the value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line line number (1-based) + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.1 + * @param group + * @param name + * @param line + */ + getLineItemValue(group:string, name:string, line:any): void; + + /** + * Return the value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line line number (1-based) + * @param {string} timezone value + * + * @method + * @memberOf nlobjRecord + * + * @since 2013.2 + * @param group + * @param name + * @param line + * @param timezone + */ + getLineItemDateTimeValue(group:string, name:string, line:any, timezone:string): void; + + /** + * Return the text value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line line number (1-based) + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2008.2 + * @param group + * @param name + * @param line + * @return + */ + getLineItemText(group:string, name:string, line:any): string; + + /** + * Set the current value of a sublist field. + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {string} value sublist field value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param name + * @param value + * @return + */ + setCurrentLineItemValue(group:string, name:string, value:string): any; + + /** + * Set the current value of a sublist field. + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {string} value sublist field value + * @param {string} timezone value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2013.2 + * @param group + * @param name + * @param value + * @param timezone + * @return + */ + setCurrentLineItemDateTimeValue(group:string, name:string, value:string, timezone:string): any; + + /** + * Return the current value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param name + * @return + */ + getCurrentLineItemValue(group:string, name:string): string; + + /** + * Return the current value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {string} timezone value + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2013.2 + * @param group + * @param name + * @param timezone + * @return + */ + getCurrentLineItemDateTimeValue(group:string, name:string, timezone:string): string; + + /** + * Return the current display value of a sublist field. + * + * @param {string} group sublist name + * @param {string} name sublist field name + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param name + * @return + */ + getCurrentLineItemText(group:string, name:string): string; + + /** + * Set the current value of a sublist matrix field. + * + * @param {string} group matrix sublist name + * @param {string} name matrix field name + * @param {int} column matrix field column index (1-based) + * @param {string} value matrix field value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param name + * @param column + * @param value + * @return + */ + setCurrentLineItemMatrixValue(group:string, name:string, column:any, value:string): any; + + /** + * Return the current value of a sublist matrix field. + * + * @param {string} group matrix sublist name + * @param {string} name matrix field name + * @param {int} column matrix field column index (1-based) + * @return {string} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param name + * @param column + * @return + */ + getCurrentLineItemMatrixValue(group:string, name:string, column:any): string; + + /** + * Return the number of columns for a matrix field. + * + * @param {string} group matrix sublist name + * @param {string} name matrix field name + * @return {int} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param name + * @return + */ + getMatrixCount(group:string, name:string): any; + + /** + * Return the number of lines in a sublist. + * + * @param {string} group sublist name + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + */ + getLineItemCount(group:string): void; + + /** + * Return line number for 1st occurence of field value in a sublist column. + * + * @param {string} group sublist name + * @param {string} fldnam sublist field name + * @param {string} value sublist field value + * @return {int} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param fldnam + * @param value + * @return + */ + findLineItemValue(group:string, fldnam:string, value:string): any; + + /** + * Return line number for 1st occurence of field value in a sublist column. + * + * @param {string} group sublist name + * @param {string} fldnam sublist field name + * @param {int} column matrix column index (1-based) + * @param {string} value matrix field value + * @return {int} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param fldnam + * @param column + * @param value + * @return + */ + findLineItemMatrixValue(group:string, fldnam:string, column:any, value:string): any; + + /** + * Insert a new line into a sublist. + * + * @param {string} group sublist name + * @param {int} [line] line index at which to insert line + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param line? + */ + insertLineItem(group:string, line?:any): void; + + /** + * Remove an existing line from a sublist. + * + * @param {string} group sublist name + * @param {int} [line] line number to remove + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param line? + */ + removeLineItem(group:string, line?:any): void; + + /** + * Insert and select a new line in a sublist. + * + * @param {string} group sublist name + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @return + */ + selectNewLineItem(group:string): any; + + /** + * Select an existing line in a sublist. + * + * @param {string} group sublist name + * @param {int} line line number to select + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @param line + * @return + */ + selectLineItem(group:string, line:any): any; + + /** + * Commit the current line in a sublist. + * + * @param {string} group sublist name + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 2009.2 + * @param group + * @return + */ + commitLineItem(group:string): any; + + /** + * set the value of a field. + * + * @param {string} name field name + * @param {string} value field value + * @return {void} + * + * @method + * @memberOf nlobjRecord + * + * @since 20013.2 + * @param name + * @param value + * @param timezone + * @return + */ + setDateTimeValue(name:string, value:string, timezone:string): any; + + /** + * Return the value of a field on the current record on a page. + * @restriction supported in client and user event scripts only. + * @param {string} fldnam the field name + * @param {string} timezone Olson value + * @return {string} + * + * @since 2013.2 + * @param fldnam + * @param timezone + * @return + */ + getDateTimeValue(fldnam:string, timezone:string): string; +} + +/** + * Return a new instance of nlobjConfiguration.. + * + * @classDescription Class definition for interacting with setup/configuration pages + * @return {nlobjConfiguration} + * @constructor + * + * @since 2009.2 + */ +declare interface nlobjConfiguration { + + /** + * + * @return + */ + new (): any; + + /** + * return the type corresponding to this setup record. + * + * @return {string} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @return + */ + getType(): string; + + /** + * return field metadata for field. + * + * @param {string} fldnam field name + * @return {nlobjField} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param fldnam + * @return + */ + getField(fldnam:string): () => void; + + /** + * set the value of a field. + * + * @param {string} name field name + * @param {string} value field value + * @return {void} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + * @param value + * @return + */ + setFieldValue(name:string, value:string): any; + + /** + * Set the values of a multi-select field. + * @restriction only supported for multi-select fields + * + * @param {string} name field name + * @param {string[]} value field values + * @return {void} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + * @param value + * @return + */ + setFieldValues(name:string, value:any): any; + + /** + * return the value of a field. + * + * @param {string} name field name + * @return {string} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + * @return + */ + getFieldValue(name:string): string; + + /** + * return the selected values of a multi-select field as an Array. + * @restriction only supported for multi-select fields + * + * @param {string} name field name + * @return {string[]} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + */ + getFieldValues(name:string): void; + + /** + * set the value (via display value) of a field. + * @restriction only supported for select fields + * + * @param {string} name field name + * @param {string} text field display text + * @return {void} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + * @param text + * @return + */ + setFieldText(name:string, text:string): any; + + /** + * set the values (via display values) of a multi-select field. + * @restriction only supported for multi-select fields + * + * @param {string} name field name + * @param {string[]} texts array of field display text values + * @return {void} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + * @param texts + * @return + */ + setFieldTexts(name:string, texts:any): any; + + /** + * return the text value of a field. + * @restriction only supported for select fields + * + * @param {string} name field name + * @return {string} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + * @return + */ + getFieldText(name:string): string; + + /** + * return the selected text values of a multi-select field as an Array. + * @param {string} name field name + * @return {string[]} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + * @param name + */ + getFieldTexts(name:string): void; + + /** + * return an Array of all field names on the record. + * @return {string[]} + * + * @method + * @memberOf nlobjConfiguration + * + * @since 2009.2 + */ + getAllFields(): void; +} + +/** + * Return a new instance of nlobjFile used for accessing and manipulating files in the file cabinet. + * + * @classDescription Encapsulation of files (media items) in the file cabinet. + * @return {nlobjFile} + * @constructor + * + * @since 2009.1 + */ +declare interface nlobjFile { + + /** + * + * @return + */ + new (): any; + + /** + * Return the name of the file. + * @return {string} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getName(): string; + + /** + * Sets the name of a file. + * @param {string} name the name of the file + * @return {void} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @param name + * @return + */ + setName(name:string): any; + + /** + * return the internal ID of the folder that this file is in. + * @return {int} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getFolder(): any; + + /** + * sets the internal ID of the folder that this file is in. + * @param {int} folder + * @return {void} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @param folder + * @return + */ + setFolder(folder:any): any; + + /** + * sets the character encoding for the file. + * @param {String} encoding + * @return {void} + * + * @method + * @memberOf nlobjFile + * + * @since 2010.2 + * @param encoding + * @return + */ + setEncoding(encoding:string): any; + + /** + * return true if the file is "Available without Login". + * @return {boolean} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + isOnline(): boolean; + + /** + * sets the file's "Available without Login" status. + * @param {boolean} online + * @return {void} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @param online + * @return + */ + setIsOnline(online:boolean): any; + + /** + * return true if the file is inactive. + * @return {boolean} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + isInactive(): boolean; + + /** + * sets the file's inactive status. + * @param {boolean} inactive + * @return {void} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @param inactive + * @return + */ + setIsInactive(inactive:boolean): any; + + /** + * return the file description. + * @return {string} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getDescription(): string; + + /** + * sets the file's description. + * @param {string} descr the file description + * @return {void} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @param descr + * @return + */ + setDescription(descr:string): any; + + /** + * Return the id of the file (if stored in the FC). + * @return {int} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getId(): any; + + /** + * Return the size of the file in bytes. + * @return {int} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getSize(): any; + + /** + * Return the URL of the file (if stored in the FC). + * @return {string} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getURL(): string; + + /** + * Return the type of the file. + * @return {string} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getType(): string; + + /** + * Return the value (base64 encoded for binary types) of the file. + * @return {string} + * + * @method + * @memberOf nlobjFile + * + * @since 2009.1 + * @return + */ + getValue(): string; +} + +/** + * Return a new instance of nlobjSearchFilter filter objects used to define search criteria. + * + * @classDescription search filter + * @constructor + * @param {string} name filter name. + * @param {string} join internal ID for joined search where this filter is defined + * @param {string} operator operator name (i.e. anyOf, contains, lessThan, etc..) + * @param {string|string[]} value + * @param {string} value2 + * @return {nlobjSearchFilter} + * + * @since 2007.0 + */ +declare interface nlobjSearchFilter { + + /** + * + * @param name + * @param join + * @param operator + * @param value + * @param value2 + * @return + */ + new (name:string, join:string, operator:string, value:any, value2:string): any; + + /** + * Return the name of this search filter. + * @return {string} + * + * @method + * @memberOf nlobjSearchFilter + * + * @since 2007.0 + * @return + */ + getName(): string; + + /** + * Return the join id for this search filter. + * @return {string} + * + * @method + * @memberOf nlobjSearchFilter + * + * @since 2008.1 + * @return + */ + getJoin(): string; + + /** + * Return the filter operator used. + * @return {string} + * + * @method + * @memberOf nlobjSearchFilter + * + * @since 2008.2 + * @return + */ + getOperator(): string; +} + +/** + * Return a new instance of nlobjSearchColumn used for column objects used to define search return columns. + * + * @classDescription search column. + * @return {nlobjSearchColumn} + * @constructor + * @param {string} name column name. + * @param {string} join internal ID for joined search where this column is defined + * @param {string} summary + * + * @since 2007.0 + */ +declare interface nlobjSearchColumn { + + /** + * + * @param name + * @param join + * @param summary + * @return + */ + new (name:string, join:string, summary:string): any; + + /** + * return the name of this search column. + * @return {string} + * + * @method + * @memberOf nlobjSearchColumn + * @since 2008.1 + * @return + */ + getName(): string; + + /** + * return the join id for this search column. + * @return {string} + * + * @method + * @memberOf nlobjSearchColumn + * @since 2008.1 + * @return + */ + getJoin(): string; + + /** + * return the label of this search column. + * @return {string} + * + * @method + * @memberOf nlobjSearchColumn + * + * @since 2009.1 + * @return + */ + getLabel(): string; + + /** + * return the summary type (avg,group,sum,count) of this search column. + * @return {string} + * + * @method + * @memberOf nlobjSearchColumn + * @since 2008.1 + * @return + */ + getSummary(): string; + + /** + * return formula for this search column. + * @return {string} + * + * @method + * @memberOf nlobjSearchColumn + * + * @since 2009.2 + * @return + */ + getFormula(): string; + + /** + * return nlobjSearchColumn sorted in either ascending or descending order. + * @return {nlobjSearchColumn} + * @param {boolean} sort if not set, defaults to false, which returns column data in ascending order. + * + * @method + * @memberOf nlobjSearchColumn + * + * @since 2010.1 + * @param order + * @return + */ + setSort(order:any): (name:string, join:string, summary:string) => void; +} + +/** + * Return a new instance of nlobjSearchResult used for search result row object. + * + * @classDescription Class definition for interacting with the results of a search operation + * @return {nlobjSearchResult} + * @constructor + */ +declare interface nlobjSearchResult { + + /** + * + * @return + */ + new (): any; + + /** + * return the internalId for the record returned in this row. + * @method + * @memberOf nlobjSearchResult + * @return {int} + * @return + */ + getId(): any; + + /** + * return the recordtype for the record returned in this row. + * @method + * @memberOf nlobjSearchResult + * @return {string} + * @return + */ + getRecordType(): string; + + /** + * return the value for a return column specified by name, join ID, and summary type. + * @param {string} name the name of the search column + * @param {string} join the join ID for the search column + * @param {string} summary summary type specified for this column + * @return {string} + * + * @method + * @memberOf nlobjSearchResult + * + * @since 2008.1 + * @param name + * @param join + * @param summary + * @return + */ + getValue(name:string, join:string, summary:string): string; + + /** + * return the text value of this return column if it's a select field. + * @param {string} name the name of the search column + * @param {string} join the join ID for the search column + * @param {string} summary summary type specified for this column + * @return {string} + * + * @method + * @memberOf nlobjSearchResult + * + * @since 2008.1 + * @param name + * @param join + * @param summary + * @return + */ + getText(name:string, join:string, summary:string): string; + + /** + * return an array of all nlobjSearchColumn objects returned in this search. + * @return {nlobjSearchColumn[]} + * + * @method + * @memberOf nlobjSearchResult + * + * @since 2009.2 + */ + getAllColumns(): void; +} + +/** + * Return a new instance of nlobjContext used for user and script context information. + * + * @classDescription Utility class providing information about the current user and the script runtime. + * @return {nlobjContext} + * @constructor + */ +declare interface nlobjContext { + + /** + * + * @return + */ + new (): any; + + /** + * return the name of the current user. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getName(): string; + + /** + * return the internalId of the current user. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getUser(): string; + + /** + * return the internalId of the current user's role. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getRole(): string; + + /** + * return the script ID of the current user's role. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2008.2 + * @return + */ + getRoleId(): string; + + /** + * return the internalId of the current user's center type. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2008.2 + * @return + */ + getRoleCenter(): string; + + /** + * return the email address of the current user. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getEmail(): string; + + /** + * return the internal ID of the contact logged in on behalf of a customer, vendor, or partner. It returns -1 for non-contact logins + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.1 + * @return + */ + getContact(): any; + + /** + * return the account ID of the current user. + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getCompany(): string; + + /** + * return the internalId of the current user's department. + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getDepartment(): any; + + /** + * return the internalId of the current user's location. + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getLocation(): any; + + /** + * return the internalId of the current user's subsidiary. + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getSubsidiary(): any; + + /** + * return the execution context for this script: webServices|csvImport|client|userInterface|scheduledScript|portlet|suitelet|debugger|custommassupdate + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getExecutionContext(): string; + + /** + * return the amount of usage units remaining for this script. + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2007.0 + * @return + */ + getRemainingUsage(): any; + + /** + * return true if feature is enabled, false otherwise + * @param {string} name + * @return {boolean} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @param name + * @return + */ + getFeature(name:string): boolean; + + /** + * return current user's permission level (0-4) for this permission + * @param {string} name + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @param name + * @return + */ + getPermission(name:string): any; + + /** + * return system or script preference selection for current user + * @param {string} name + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @param name + * @return + */ + getPreference(name:string): string; + + /** + * return value of session object set by script + * @param {string} name + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @param name + * @return + */ + getSessionObject(name:string): string; + + /** + * set the value of a session object using a key. + * @param {string} name + * @param {string} value + * @return {void} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @param name + * @param value + * @return + */ + setSessionObject(name:string, value:string): any; + + /** + * return an array containing the names of all keys used to set session objects + * @return {string[]} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + */ + getAllSessionObjects(): void; + + /** + * return the NetSuite version for the current account + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @return + */ + getVersion(): string; + + /** + * return the environment that the script is executing in: SANDBOX, PRODUCTION, BETA, INTERNAL + * @since 2008.2 + */ + getEnvironment(): void; + + /** + * return the logging level for the current script execution. Not supported in CLIENT scripts + * @since 2008.2 + */ + getLogLevel(): void; + + /** + * return the script ID for the current script + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @return + */ + getScriptId(): string; + + /** + * return the deployment ID for the current script + * @return {string} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @return + */ + getDeploymentId(): string; + + /** + * return the % complete specified for the current scheduled script execution + * @return {int} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @return + */ + getPercentComplete(): any; + + /** + * set the % complete for the current scheduled script execution + * @param {float} ct the percentage of records completed + * @return {void} + * + * @method + * @memberOf nlobjContext + * + * @since 2009.2 + * @param pct + * @return + */ + setPercentComplete(pct:any): any; + + /** + * return a system/script setting. Types are SCRIPT, SESSION, FEATURE, PERMISSION + * + * @param {string} type + * @param {string} name + * @since 2007.0 + * @deprecated + * @param type + * @param name + */ + getSetting(type:string, name:string): void; + + /** + * set a system/script setting. Only supported type is SESSION + * + * @param {string} type + * @param {string} name + * @param {string} value + * @since 2007.0 + * @deprecated + * @param type + * @param name + * @param value + */ + setSetting(type:string, name:string, value:string): void; + + /** + * return an Object containing name/value pairs of color groups to their corresponding RGB hex color based on the currenly logged in user's color them preferences. + * @return {Object} + * + * @method + * @memberOf nlobjContext + * + * @since 2010.1 + * @return + */ + getColorPreferences(): any; + + /** + * return the runtime version of SuiteScript, could be 1.0 or 2.0 + * @return {Object} + * + * @method + * @memberOf nlobjContext + * + * @since 2014.1 + * @return + */ + getRuntimeVersion(): any; +} + +/** + * Return a new instance of nlobjError used system or user-defined error object. + * + * @classDescription Encapsulation of errors thrown during script execution. + * @return {nlobjError} + * @constructor + */ +declare interface nlobjError { + + /** + * + * @return + */ + new (): any; + + /** + * return the error db ID for this error (if it was an unhandled unexpected error). + * @return {string} + * + * @method + * @memberOf nlobjError + * + * @since 2008.2 + * @return + */ + getId(): string; + + /** + * return the error code for this system or user-defined error. + * @return {string} + * + * @method + * @memberOf nlobjError + * + * @since 2008.2 + * @return + */ + getCode(): string; + + /** + * return the error description for this error. + * @return {string} + * + * @method + * @memberOf nlobjError + * + * @since 2008.2 + * @return + */ + getDetails(): string; + + /** + * return a stacktrace containing the location of the error. + * @return {string[]} + * + * @method + * @memberOf nlobjError + * + * @since 2008.2 + */ + getStackTrace(): void; + + /** + * return the userevent script name where this error was thrown. + * @return {string} + * + * @method + * @memberOf nlobjError + * + * @since 2008.2 + * @return + */ + getUserEvent(): string; + + /** + * return the internalid of the record if this error was thrown in an aftersubmit script. + * @return {int} + * + * @method + * @memberOf nlobjError + * + * @since 2008.2 + * @return + */ + getInternalId(): any; +} + +/** + * Return a new instance of nlobjServerResponse.. + * + * @classDescription Contains the results of a server response to an outbound Http(s) call. + * @return {nlobjServerResponse} + * @constructor + * + * @since 2008.1 + */ +declare interface nlobjServerResponse { + + /** + * + * @return + */ + new (): any; + + /** + * return the Content-Type header in response + * @return {string} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + * @return + */ + getContentType(): string; + + /** + * return the value of a header returned. + * @param {string} name the name of the header to return + * @return {string} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + * @param name + * @return + */ + getHeader(name:string): string; + + /** + * return all the values of a header returned. + * @param {string} name the name of the header to return + * @return {string[]} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + * @param name + */ + getHeaders(name:string): void; + + /** + * return an Array of all headers returned. + * @return {string[]} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + */ + getAllHeaders(): void; + + /** + * return the response code returned. + * @return {int} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + * @return + */ + getCode(): any; + + /** + * return the response body returned. + * @return {string} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + * @return + */ + getBody(): string; + + /** + * return the nlobjError thrown via a client call to nlapiRequestURL. + * @return {nlobjError} + * + * @method + * @memberOf nlobjServerResponse + * + * @since 2008.1 + * @return + */ + getError(): () => void; +} + +/** + * Return a new instance of nlobjResponse used for scripting web responses in Suitelets + * + * @classDescription Accessor to Http response made available to Suitelets. + * @return {nlobjResponse} + * @constructor + */ +declare interface nlobjResponse { + + /** + * + * @return + */ + new (): any; + + /** + * add a value for a response header. + * @param {string} name of header + * @param {string} value for header + * @return {void} + * + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param name + * @param value + * @return + */ + addHeader(name:string, value:string): any; + + /** + * set the value of a response header. + * @param {string} name of header + * @param {string} value for header + * @return {void} + * + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param name + * @param value + * @return + */ + setHeader(name:string, value:string): any; + + /** + * return the value of a response header. + * @param {string} name of header + * @return {string} + * + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @return + */ + getHeader(): string; + + /** + * return an Array of all response header values for a header + * @param {string} name of header + * @return {string[]} + * + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param name + */ + getHeaders(name:string): void; + + /** + * return an Array of all response headers + * @return {Object} + * + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @return + */ + getAllHeaders(): any; + + /** + * suppress caching for this response. + * @return {void} + * + * @method + * @memberOf nlobjResponse + * + * @since 2009.1 + * @return + */ + sendNoCache(): any; + + /** + * sets the content type for the response (and an optional filename for binary output). + * + * @param {string} type the file type i.e. plainText, word, pdf, htmldoc (see list of media item types) + * @param {string} filename the file name + * @param {string} disposition Content Disposition used for streaming attachments: inline|attachment + * @return {void} + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param type + * @param filename + * @param disposition + * @return + */ + setContentType(type:string, filename:string, disposition:string): any; + + /** + * sets the redirect URL for the response. all URLs must be internal unless the Suitelet is being executed in an "Available without Login" context + * at which point it can use type "external" to specify an external url via the subtype arg + * + * @param {string} type type specifier for URL: suitelet|tasklink|record|mediaitem|external + * @param {string} subtype subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid|url + * @param {string} [id] internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a + * @param {string} [pagemode] string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view) + * @param {Object} [parameters] Object used to specify additional URL parameters as name/value pairs + * @return {void} + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param type + * @param subtype + * @param id? + * @param pagemode? + * @param parameters? + * @return + */ + sendRedirect(type:string, subtype:string, id?:string, pagemode?:string, parameters?:any): any; + + /** + * write information (text/xml/html) to the response. + * + * @param {string} output + * @return {void} + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param output + * @return + */ + write(output:string): any; + + /** + * write line information (text/xml/html) to the response. + * + * @param {string} output + * @return {void} + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param output + * @return + */ + writeLine(output:string): any; + + /** + * write a UI object page. + * + * @param {Object} pageobject page UI object: nlobjList|nlobjAssistant|nlobjForm|nlobjDashboard + * @return {void} + * @method + * @memberOf nlobjResponse + * + * @since 2008.2 + * @param pageobject + * @return + */ + writePage(pageobject:any): any; + + /** + * sets the character encoding for the response. + * @param {String} encoding + * @return {void} + * @method + * @memberOf nlobjResponse + * + * @since 2012.2 + * @param encoding + * @return + */ + setEncoding(encoding:string): any; +} + +/** + * Return a new instance of nlobjRequest used for scripting web requests in Suitelets + * + * @classDescription Accessor to Http request data made available to Suitelets + * @return {nlobjRequest} + * @constructor + */ +declare interface nlobjRequest { + + /** + * + * @return + */ + new (): any; + + /** + * return the value of a request parameter. + * + * @param {string} name parameter name + * @return {string} + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @param name + * @return + */ + getParameter(name:string): string; + + /** + * return the values of a request parameter as an Array. + * + * @param {string} name parameter name + * @return {string[]} + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @param name + */ + getParameterValues(name:string): void; + + /** + * return an Object containing all the request parameters and their values. + * @return {Object} + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @return + */ + getAllParameters(): any; + + /** + * return the value of a sublist value. + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line sublist line number + * @return {string} + * + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @param group + * @param name + * @param line + * @return + */ + getLineItemValue(group:string, name:string, line:any): string; + + /** + * return the number of lines in a sublist. + * @param {string} group sublist name + * @return {int} + * + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @param group + * @return + */ + getLineItemCount(group:string): any; + + /** + * return the value of a request header. + * @param {string} name + * @return {string} + * + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @param name + * @return + */ + getHeader(name:string): string; + + /** + * return an Object containing all the request headers and their values. + * @return {Object} + * + * @method + * @memberOf nlobjRequest + * + * @since 2008.2 + * @return + */ + getAllHeaders(): any; + + /** + * return the value of an uploaded file. + * @param {string} name file field name + * @return {nlobjFile} + * + * @method + * @memberOf nlobjRequest + * + * @since 2009.1 + * @param name + * @return + */ + getFile(name:string): () => void; + + /** + * return an Object containing field names to file objects for all uploaded files. + * @return {Object} + * + * @method + * @memberOf nlobjRequest + * + * @since 2009.1 + * @return + */ + getAllFiles(): any; + + /** + * return the body of the POST request + * @return {string} + * + * @method + * @memberOf nlobjRequest + * @since 2008.1 + * @return + */ + getBody(): string; + + /** + * return the URL of the request + * @return {string} + * + * @method + * @memberOf nlobjRequest + * @since 2008.1 + * @return + */ + getURL(): string; + + /** + * return the METHOD of the request + * @return {string} + * + * @method + * @memberOf nlobjRequest + * @since 2008.1 + * @return + */ + getMethod(): string; +} + +/** + * Return a new instance of nlobjPortlet used for scriptable dashboard portlet. + * + * @classDescription UI Object used for building portlets that are displayed on dashboard pages + * @return {nlobjPortlet} + * @constructor + */ +declare interface nlobjPortlet { + + /** + * + * @return + */ + new (): any; + + /** + * set the portlet title. + * + * @param {string} title + * @since 2008.2 + * @param title + */ + setTitle(title:string): void; + + /** + * set the entire contents of the HTML portlet (will be placed inside a ...). + * + * @param {string} html + * @since 2008.2 + * @param html + */ + setHtml(html:string): void; + + /** + * add a column (nlobjColumn) to this LIST portlet and return it. + * + * @param {string} name column name + * @param {string} type column type + * @param {string} label column label + * @param {string} [align] column alignment + * @since 2008.2 + * @param name + * @param type + * @param label + * @param align? + */ + addColumn(name:string, type:string, label:string, align?:string): void; + + /** + * add an Edit column (nlobjColumn) to the left of the column specified (supported on LIST portlets only). + * + * @param {nlobjColumn} column + * @param {boolean} showView should Edit|View instead of Edit link + * @param {string} [showHref] column that evaluates to T or F that determines whether to disable the edit|view link per-row. + * @return {nlobjColumn} + * + * @since 2008.2 + * @param column + * @param showView + * @param showHref? + * @return + */ + addEditColumn(column:() => void, showView:boolean, showHref?:string): () => void; + + /** + * add a row (nlobjSearchResult or Array of name-value pairs) to this LIST portlet. + * + * @param {string[]|nlobjSearchResult} row + * @since 2008.2 + * @param row + */ + addRow(row:any): void; + + /** + * add multiple rows (Array of nlobjSearchResults or name-value pair Arrays) to this LIST portlet. + * + * @param {string[][]|nlobjSearchResult[]} rows + * @since 2008.2 + * @param rows + */ + addRows(rows:any): void; + + /** + * add a field (nlobjField) to this FORM portlet and return it. + * + * @param {string} name field name + * @param {string} type field type + * @param {string} [label] field label + * @param {string, int} [source] script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields + * @return {nlobjField} + * + * @since 2008.2 + * @param name + * @param type + * @param label? + * @param source + * @return + */ + addField(name:string, type:string, label?:string, source?:any): () => void; + + /** + * add a FORM submit button to this FORM portlet. + * + * @param {string} url URL that this form portlet will POST to + * @param {string} [label] label for submit button (defaults to Save) + * @since 2008.2 + * @param url + * @param label? + */ + setSubmitButton(url:string, label?:string): void; + + /** + * add a line (containing text or simple HTML) with optional indenting and URL to this LINKS portlet. + * + * @param {string} text data to output to line + * @param {string} [url] URL if this line should be clickable (if NULL then line will not be clickable) + * @param {int} indent # of indents to insert before text + * @since 2008.2 + * @param text + * @param url? + * @param indent + */ + addLine(text:string, url?:string, indent?:any): void; +} + +/** + * Return a new instance of nlobjList used for scriptable list page. + * + * @classDescription UI Object page type used for building lists + * @return {nlobjList} + * @constructor + */ +declare interface nlobjList { + + /** + * + * @return + */ + new (): any; + + /** + * set the page title. + * + * @param {string} title + * @since 2008.2 + * @param title + */ + setTitle(title:string): void; + + /** + * set the global style for this list: grid|report|plain|normal. + * + * @param {string} style overall style used to render list + * @since 2008.2 + * @param style + */ + setStyle(style:string): void; + + /** + * set the Client SuiteScript used for this page. + * + * @param {string, int} script script ID or internal ID for global client script used to enable Client SuiteScript on page + * @since 2008.2 + * @param script + */ + setScript(script:any): void; + + /** + * add a column (nlobjColumn) to this list and return it. + * + * @param {string} name column name + * @param {string} type column type + * @param {string} label column label + * @param {string} [align] column alignment + * @return {nlobjColumn} + * + * @since 2008.2 + * @param name + * @param type + * @param label + * @param align? + * @return + */ + addColumn(name:string, type:string, label:string, align?:string): () => void; + + /** + * add an Edit column (nlobjColumn) to the left of the column specified. + * + * @param {nlobjColumn} column + * @param {boolean} showView should Edit|View instead of Edit link + * @param {string} [showHref] column that evaluates to T or F that determines whether to disable the edit|view link per-row. + * @return {nlobjColumn} + * + * @since 2008.2 + * @param column + * @param showView + * @param showHref? + * @return + */ + addEditColumn(column:() => void, showView:boolean, showHref?:string): () => void; + + /** + * add a row (Array of name-value pairs or nlobjSearchResult) to this portlet. + * + * @param {string[], nlobjSearchResult} row data used to add a single row + * @since 2008.2 + * @param row + */ + addRow(row:any): void; + + /** + * add multiple rows (Array of nlobjSearchResults or name-value pair Arrays) to this portlet. + * + * @param {string[][], nlobjSearchResult[]} rows data used to add multiple rows + * @since 2008.2 + * @param rows + */ + addRows(rows:any): void; + + /** + * add a button (nlobjButton) to the footer of this page. + * + * @param {string} name button name + * @param {string} label button label + * @param {string} script button script (function name) + * @since 2008.2 + * @param name + * @param label + * @param script + */ + addButton(name:string, label:string, script:string): void; + + /** + * add a navigation cross-link to the page. + * + * @param {string} type page link type: crosslink|breadcrumb + * @param {string} title page link title + * @param {string} url URL for page link + * @since 2008.2 + * @param type + * @param title + * @param url + */ + addPageLink(type:string, title:string, url:string): void; +} + +/** + * Return a new instance of nlobjForm used for scriptable form page. + * + * @classDescription UI Object page type used for building basic data entry forms. + * @return {nlobjForm} + * @constructor + */ +declare interface nlobjForm { + + /** + * + * @return + */ + new (): nlobjForm; + + /** + * set the page title. + * + * @param {string} title + * @since 2008.2 + * @param title + */ + setTitle(title:string): void; + + /** + * set additional title Html. INTERNAL ONLY + * + * @param {string} title + * @since 2008.2 + * @param html + */ + addTitleHtml(html:any): void; + + /** + * set the Client Script definition used for this page. + * + * @param {string, int} script script ID or internal ID for global client script used to enable Client SuiteScript on page + * @since 2008.2 + * @param script + */ + setScript(script:any): void; + + /** + * set the values for all the fields on this form. + * + * @param {Object} values Object containing field name/value pairs + * @since 2008.2 + * @param values + */ + setFieldValues(values:any): void; + + /** + * add a navigation cross-link to the page. + * + * @param {string} type page link type: crosslink|breadcrumb + * @param {string} title page link title + * @param {string} url URL for page link + * @since 2008.2 + * @param type + * @param title + * @param url + */ + addPageLink(type:string, title:string, url:string): void; + + /** + * add a button to this form. + * + * @param {string} name button name + * @param {string} label button label + * @param {string} script button script (function name) + * @return {nlobjButton} + * + * @since 2008.2 + * @param name + * @param label + * @param script + * @return + */ + addButton(name:string, label:string, script?:string): nlobjButton; + + /** + * get a button from this form by name. + * @param {string} name + * @return {nlobjButton} + * + * @method + * @memberOf nlobjForm + * + * @since 2009.2 add + * @param name + * @return + */ + getButton(name:string): nlobjButton; + + /** + * add a reset button to this form. + * + * @param {string} [label] label for this button. defaults to "Reset" + * @return {nlobjButton} + * + * @since 2008.2 + * @param label? + * @return + */ + addResetButton(label?:string): nlobjButton; + + /** + * add a submit button to this form. + * + * @param {string} [label] label for this submit button. defaults to "Save" + * @return {nlobjButton} + * + * @since 2008.2 + * @param label? + * @return + */ + addSubmitButton(label?:string): nlobjButton; + + /** + * add a tab (nlobjTab) to this form and return it. + * + * @param {string} name tab name + * @param {string} label tab label + * @return {nlobjTab} + * + * @since 2008.2 + * @param name + * @param label + * @return + */ + addTab(name:string, label:string): nlobjTab; + + /** + * add a field (nlobjField) to this form and return it. + * + * @param {string} name field name + * @param {string} type field type + * @param {string} [label] field label + * @param {string, int} [source] script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields + * @param {string} [tab] tab name that this field will live on. If empty then the field is added to the main section of the form (immediately below the title bar) + * @return {nlobjField} + * + * @since 2008.2 + * @param name + * @param type + * @param label? + * @param sourceOrRadio + * @param tab? + * @return + */ + addField(name:string, type:string, label?:string, sourceOrRadio?:any, tab?:string): nlobjField; + + /** + * + * @param name + * @param label + * @param domain + * @param scriptId + * @param value + */ + addCredentialField(name:string, label:string, website?:string, scriptId?:string, value?:string, entityMatch?:boolean, tab?:string): nlobjField; + + /** + * add a subtab (nlobjTab) to this form and return it. + * + * @param {string} name subtab name + * @param {string} label subtab label + * @param {string} [tab] parent tab that this subtab lives on. If empty, it is added to the main tab. + * @return {nlobjTab} + * + * @since 2008.2 + * @param name + * @param label + * @param tab? + * @return + */ + addSubTab(name:string, label:string, tab?:string): nlobjTab; + + /** + * add a sublist (nlobjSubList) to this form and return it. + * + * @param {string} name sublist name + * @param {string} type sublist type: inlineeditor|editor|list|staticlist + * @param {string} label sublist label + * @param {string} [tab] parent tab that this sublist lives on. If empty, it is added to the main tab + * @return {nlobjSubList} + * + * @since 2008.2 + * @param name + * @param type + * @param label + * @param tab? + * @return + */ + addSubList(name:string, type:string, label:string, tab?:string): nlobjSubList; + + /** + * insert a tab (nlobjTab) before another tab (name). + * + * @param {nlobjTab} tab the tab object to insert + * @param {string} nexttab the name of the tab before which to insert this tab + * @return {nlobjTab} + * + * @since 2008.2 + * @param tab + * @param nexttab + * @return + */ + insertTab(tab:() => void, nexttab:string): nlobjTab; + + /** + * insert a field (nlobjField) before another field (name). + * + * @param {nlobjField} field the field object to insert + * @param {string} nextfld the name of the field before which to insert this field + * @return {nlobjField} + * + * @since 2008.2 + * @param field + * @param nextfld + * @return + */ + insertField(field:() => void, nextfld:string): nlobjField; + + /** + * insert a subtab (nlobjTab) before another subtab or sublist (name). + * + * @param {nlobjTab} subtab the subtab object to insert + * @param {string} nextsubtab the name of the subtab before which to insert this subtab + * @return {nlobjTab} + * + * @since 2008.2 + * @param subtab + * @param nextsubtab + * @return + */ + insertSubTab(subtab:() => void, nextsubtab:string): nlobjTab; + + /** + * insert a sublist (nlobjSubList) before another subtab or sublist (name). + * + * @param {nlobjSubList} sublist the sublist object to insert + * @param {string} nextsublist the name of the sublist before which to insert this sublist + * @return {nlobjSubList} + * + * @since 2008.2 + * @param sublist + * @param nextsublist + * @return + */ + insertSubList(sublist:() => void, nextsublist:string): nlobjSubList; + + /** + * return a tab (nlobjTab) on this form. + * + * @param {string} name tab name + * @return {nlobjTab} + * + * @since 2008.2 + * @param name + * @return + */ + getTab(name:string): nlobjTab; + + /** + * return a field (nlobjField) on this form. + * + * @param {string} name field name + * @param {string} [radio] if this is a radio field, specify which radio field to return based on radio value + * @return {nlobjField} + * + * @since 2008.2 + * @param name + * @param radio? + * @return + */ + getField(name:string, radio?:string): nlobjField; + + /** + * return a subtab (nlobjTab) on this form. + * + * @param {string} name subtab name + * @return {nlobjTab} + * + * @since 2008.2 + * @param name + * @return + */ + getSubTab(name:string): nlobjTab; + + /** + * return a sublist (nlobjSubList) on this form. + * + * @param {string} name sublist name + * @return {nlobjSubList} + * + * @since 2008.2 + * @param name + * @return + */ + getSubList(name:string): nlobjSubList; + + /** + * add a field group to the form. + * @param {string} name field group name + * @param {string} label field group label + * @param tab + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjForm + * + * @since 2011.1 + * @param name + * @param label + * @param tab + * @return + */ + addFieldGroup(name:string, label:string, tab:any): nlobjFieldGroup; + + /** + * get a list of all tabs. + * @return an array with names of all tabs + * + * @method + * @memberOf nlobjForm + * + * @since 2012.2 + */ + getTabs(): nlobjTab[]; +} + +/** + * Return a new instance of nlobjAssistant. + * + * @classDescription UI Object page type used to build multi-step "assistant" pages to simplify complex workflows. All data and state for an assistant is tracked automatically + * throughout the user's session up until completion of the assistant. + * + * @return {nlobjAssistant} + * @constructor + * + * @since 2009.2 + */ +declare interface nlobjAssistant { + + /** + * + * @return + */ + new (): any; + + /** + * set the page title. + * @param {string} title + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param title + * @return + */ + setTitle(title:string): any; + + /** + * set the script ID for Client Script used for this form. + * @param {string, int} script script ID or internal ID for global client script used to enable Client SuiteScript on page + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param script + * @return + */ + setScript(script:any): any; + + /** + * set the splash screen used for this page. + * @param {string} title splash portlet title + * @param {string} text1 splash portlet content (left side) + * @param {string} [text2] splash portlet content (right side) + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param title + * @param text1 + * @param text2? + * @return + */ + setSplash(title:string, text1:string, text2?:string): any; + + /** + * show/hide shortcut link. Always hidden on external pages + * @param {boolean} show enable/disable "Add To Shortcut" link on this page + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param show + * @return + */ + setShortcut(show:boolean): any; + + /** + * set the values for all the fields on this page. + * @param {Object} values Object of field name/value pairs used to set all fields on page + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param values + * @return + */ + setFieldValues(values:any): any; + + /** + * if ordered, steps are show on left and must be completed sequentially, otherwise steps are shown on top and can be done in any order + * @param {boolean} ordered If true (default assistant behavior) then a navigation order thru the steps/pages will be imposed on the user. Otherwise the user + * will be allowed to navigate across steps/pages in any order they choose. + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param ordered + * @return + */ + setOrdered(ordered:boolean): any; + + /** + * if numbered, step numbers are displayed next to the step's label in the navigation area + * @param {boolean} numbered If true (default assistant behavior) step numbers will be displayed next to the step label + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param numbered + * @return + */ + setNumbered(numbered:boolean): any; + + /** + * return true if all the steps have been completed. + * @return {boolean} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + isFinished(): boolean; + + /** + * mark assistant page as completed and optionally set the rich text to display on completed page. + * @param {string} html completion message (rich text) to display on the "Finish" page + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param html + * @return + */ + setFinished(html:string): any; + + /** + * return true if the assistant has an error message to display for the current step. + * @return {boolean} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + hasError(): boolean; + + /** + * set the error message for the currrent step. + * @param {string} html error message (rich text) to display on the page to the user + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param html + * @return + */ + setError(html:string): any; + + /** + * mark a step as current. It will be highlighted accordingly when the page is displayed + * @param {nlobjAssistantStep} step assistant step object representing the current step that the user is on. + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param step + * @return + */ + setCurrentStep(step:() => void): any; + + /** + * add a step to the assistant. + * @param {string} name the name of the step + * @param {string} label label used for this step + * @return {nlobjAssistantStep} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @param label + * @return + */ + addStep(name:string, label:string): () => void; + + /** + * add a field to this page and return it. + * @param {string} name field name + * @param {string} type field type + * @param {string} [label] field label + * @param {string, int} [source] script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields + * @param {string} [group] group name that this field will live on. If empty then the field is added to the main section of the page + * @return {nlobjField} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @param type + * @param label? + * @param source + * @param group? + * @return + */ + addField(name:string, type:string, label?:string, source?:any, group?:string): () => void; + + /** + * add a sublist to this page and return it. For now only sublists of type inlineeditor are supported + * @param {string} name sublist name + * @param {string} type sublist type (inlineeditor only for now) + * @param {string} label sublist label + * @return {nlobjSubList} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @param type + * @param label + * @return + */ + addSubList(name:string, type:string, label:string): () => void; + + /** + * add a field group to the page. + * @param {string} name field group name + * @param {string} label field group label + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @param label + * @return + */ + addFieldGroup(name:string, label:string): () => void; + + /** + * return an assistant step on this page. + * @param {string} name step name + * @return {nlobjAssistantStep} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @return + */ + getStep(name:string): () => void; + + /** + * return a field on this page. + * @param {string} name field name + * @return {nlobjField} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @return + */ + getField(name:string): () => void; + + /** + * return a sublist on this page. + * @param {string} name sublist name + * @return {nlobjSubList} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @return + */ + getSubList(name:string): () => void; + + /** + * return a field group on this page. + * @param {string} name field group name + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param name + * @return + */ + getFieldGroup(name:string): () => void; + + /** + * return an array of all the assistant steps for this assistant. + * @return {nlobjAssistantStep[]} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + */ + getAllSteps(): void; + + /** + * return an array of the names of all fields on this page. + * @return {string[]} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + */ + getAllFields(): void; + + /** + * return an array of the names of all sublists on this page . + * @return {string[]} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + */ + getAllSubLists(): void; + + /** + * return an array of the names of all field groups on this page. + * @return {string[]} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + */ + getAllFieldGroups(): void; + + /** + * return the last submitted action by the user: next|back|cancel|finish|jump + * @return {string} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + getLastAction(): string; + + /** + * return step from which the last submitted action came from + * @return {nlobjAssistantStep} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + getLastStep(): () => void; + + /** + * return the next logical step corresponding to the user's last submitted action. You should only call this after + * you have successfully captured all the information from the last step and are ready to move on to the next step. You + * would use the return value to set the current step prior to continuing. + * + * @return {nlobjAssistantStep} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + getNextStep(): () => void; + + /** + * return current step set via nlobjAssistant.setCurrentStep(step) + * @return {nlobjAssistantStep} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + getCurrentStep(): () => void; + + /** + * return the total number of steps in the assistant + * @return {int} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @return + */ + getStepCount(): any; + + /** + * redirect the user following a user submit operation. Use this to automatically redirect the user to the next logical step. + * @param {nlobjResponse} response the response object used to communicate back to the user's client + * @return {void} + * + * @method + * @memberOf nlobjAssistant + * + * @since 2009.2 + * @param response + * @return + */ + sendRedirect(response:() => void): any; +} + +/** + * Return a new instance of nlobjField used for scriptable form/sublist field. + * This object is READ-ONLY except for scripted fields created via the UI Object API using Suitelets or beforeLoad user events + * + * @classDescription Core descriptor for fields used to define records and also used to build pages and portlets. + * @return {nlobjField} + * @constructor + */ +declare interface nlobjField { + + /** + * + * @return + */ + new (): /* nlobjField */ any; + + /** + * return field name. + * @return {string} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @return + */ + getName(): string; + + /** + * return field label. + * @return {string} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @return + */ + getLabel(): string; + + /** + * return field type. + * @return {string} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @return + */ + getType(): string; + + /** + * return true if field is hidden. + * @return {boolean} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @return + */ + isHidden(): boolean; + + /** + * return true if field is mandatory. + * @return {boolean} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @return + */ + isMandatory(): boolean; + + /** + * return true if field is disabled. + * @return {boolean} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @return + */ + isDisabled(): boolean; + + /** + * set the label for this field. + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} label + * @return {nlobjField} + * + * @since 2008.2 + * @param label + * @return + */ + setLabel(label:string): () => void; + + /** + * set the alias used to set the value for this field. Defaults to field name. + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} alias column used to populate the field (mostly relevant when populating sublist fields) + * @return {nlobjField} + * + * @since 2008.2 + * @param alias + * @return + */ + setAlias(alias:string): () => void; + + /** + * set the default value for this field. + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} value + * @return {nlobjField} + * + * @since 2008.2 + * @param value + * @return + */ + setDefaultValue(value:string): () => void; + + /** + * Disable field via field metadata. + * This method is only supported on scripted fields via the UI Object API + * @param {boolean} disabled if true then field should be disabled. + * @return {nlobjField} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @param disabled + * @return + */ + setDisabled(disabled:boolean): () => void; + + /** + * make this field mandatory. + * This method is only supported on scripted fields via the UI Object API + * + * @param {boolean} mandatory if true then field becomes mandatory + * @return {nlobjField} + * + * @since 2008.2 + * @param mandatory + * @return + */ + setMandatory(mandatory:boolean): () => void; + + /** + * set the maxlength for this field (only valid for certain field types). + * This method is only supported on scripted fields via the UI Object API + * + * @param {int} maxlength maximum length for this field + * @return {nlobjField} + * + * @since 2008.2 + * @param maxlength + * @return + */ + setMaxLength(maxlength:any): () => void; + + /** + * set the display type for this field. + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} type display type: inline|normal|hidden|disabled|readonly|entry + * @return {nlobjField} + * + * @since 2008.2 + * @param type + * @return + */ + setDisplayType(type:string): () => void; + + /** + * set the break type (startcol|startrow|none) for this field. startrow is only used for fields with a layout type of outside + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} breaktype break type used to add a break in flow layout for this field: startcol|startrow|none + * @return {nlobjField} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @param breaktype + * @return + */ + setBreakType(breaktype:string): () => void; + + /** + * set the layout type and optionally the break type. + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} type layout type: outside|startrow|midrow|endrow|normal + * @param {string} [breaktype] break type: startcol|startrow|none + * @return {nlobjField} + * + * @since 2008.2 + * @param type + * @param breaktype? + * @return + */ + setLayoutType(type:string, breaktype?:string): () => void; + + /** + * set the text that gets displayed in lieu of the field value for URL fields. + * + * @param {string} text user-friendly display value in lieu of URL + * @return {nlobjField} + * + * @since 2008.2 + * @param text + * @return + */ + setLinkText(text:string): () => void; + + /** + * set the width and height for this field. + * This method is only supported on scripted fields via the UI Object API + * + * @param {int} width + * @param {int} height + * @return {nlobjField} + * + * @since 2008.2 + * @param width + * @param height + * @return + */ + setDisplaySize(width:any, height:any): () => void; + + /** + * set the amount of emppty vertical space (rows) between this field and the previous field. + * This method is only supported on scripted fields via the UI Object API + * + * @param {int} padding # of empty rows to display above field + * @return {nlobjField} + * + * @since 2008.2 + * @param padding + * @return + */ + setPadding(padding:any): () => void; + + /** + * set help text for this field. If inline is set on assistant pages, help is displayed inline below field + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} help field level help content (rich text) for field + * @param {string} [inline] if true then in addition to the popup field help, the help will also be displayed inline below field (supported on assistant pages only) + * @return {nlobjField} + * + * @method + * @memberOf nlobjField + * + * @since 2009.2 + * @param help + * @param inline? + * @return + */ + setHelpText(help:string, inline?:string): () => void; + + /** + * add a select option to this field (valid for select/multiselect fields). + * This method is only supported on scripted fields via the UI Object API + * + * @param {string} value internal ID for this select option + * @param {string} text display value for this select option + * @param {boolean} [selected] if true then this select option will be selected by default + * @since 2008.2 + * @param value + * @param text + * @param selected? + */ + addSelectOption(value:string, text:string, selected?:boolean): void; +} + +/** + * Return a new instance of nlobjSubList used for scriptable sublist (sublist). + * This object is READ-ONLY except for instances created via the UI Object API using Suitelets or beforeLoad user events. + * + * @classDescription high level container for defining sublist (many to one) relationships on a record or multi-line data entry UIs on pages. + * @return {nlobjSubList} + * @constructor + */ +declare interface nlobjSubList { + + /** + * + * @return + */ + new (): /* nlobjSubList */ any; + + /** + * set the label for this sublist. + * This method is only supported on sublists via the UI Object API + * + * @param {string} label + * @since 2008.2 + * @param label + */ + setLabel(label:string): void; + + /** + * set helper text for this sublist. + * This method is only supported on sublists via the UI Object API + * + * @param {string} help + * @since 2008.2 + * @param help + */ + setHelpText(help:string): void; + + /** + * set the displaytype for this sublist: hidden|normal. + * This method is only supported on scripted or staticlist sublists via the UI Object API + * + * @param {string} type + * @since 2008.2 + * @param type + */ + setDisplayType(type:string): void; + + /** + * set the value of a cell in this sublist. + * + * @param {string} field sublist field name + * @param {int} line line number (1-based) + * @param {string} value sublist value + * + * @method + * @memberOf nlobjSubList + * + * @since 2008.2 + * @param field + * @param line + * @param value + */ + setLineItemValue(field:string, line:any, value:string): void; + + /** + * set the value of a matrix cell in this sublist. + * @param {string} field matrix field name + * @param {int} line line number (1-based) + * @param {int} column matrix column index (1-based) + * @param {string} value matrix field value + * @return {void} + * + * @method + * @memberOf nlobjSubList + * + * @since 2009.2 + * @param field + * @param line + * @param column + * @param value + * @return + */ + setLineItemMatrixValue(field:string, line:any, column:any, value:string): any; + + /** + * set values for multiple lines (Array of nlobjSearchResults or name-value pair Arrays) in this sublist. + * Note that this method is only supported on scripted sublists via the UI Object API + * + * @param {string[][], nlobjSearchResult[]} values + * @since 2008.2 + * @param values + */ + setLineItemValues(values:any): void; + + /** + * Return the number of lines in a sublist. + * + * @param {string} group sublist name + * + * @method + * @memberOf nlobjSubList + * @since 2010.1 + * @param group + */ + getLineItemCount(group:string): void; + + /** + * add a field (column) to this sublist. + * + * @param {string} name field name + * @param {string} type field type + * @param {string} label field label + * @param {string, int} [source] script ID or internal ID for source list used for this select field + * @return {nlobjField} + * + * @method + * @memberOf nlobjSubList + * + * @since 2008.2 + * @param name + * @param type + * @param label + * @param source + * @return + */ + addField(name:string, type:string, label:string, source:any): () => void; + + /** + * designate a field on sublist that must be unique across all lines (only supported on sublists of type inlineeditor, editor). + * @param {string} fldnam the name of a field on this sublist whose value must be unique across all lines + * @return {nlobjField} + * + * @method + * @memberOf nlobjSubList + * + * @since 2009.2 + * @param fldnam + * @return + */ + setUniqueField(fldnam:string): () => void; + + /** + * add a button to this sublist. + * + * @param {string} name button name + * @param {string} label button label + * @param {string} script button script (function name) + * @return {nlobjButton} + * + * @method + * @memberOf nlobjSubList + * + * @since 2008.2 + * @param name + * @param label + * @param script + * @return + */ + addButton(name:string, label:string, script:string): () => void; + + /** + * add "Refresh" button to sublists of type "staticlist" to support manual refreshing of the sublist (without entire page reloads) if it's contents are very volatile + * @return {nlobjButton} + * + * @method + * @memberOf nlobjSubList + * + * @since 2009.2 + * @return + */ + addRefreshButton(): () => void; + + /** + * add "Mark All" and "Unmark All" buttons to this sublist of type "list". + * + * @method + * @memberOf nlobjSubList + * + * @since 2008.2 + */ + addMarkAllButtons(): void; +} + +/** + * Return a new instance of nlobjColumn used for scriptable list column. + * + * @classDescription Class definition for columns used on lists and list portlets. + * @return {nlobjColumn} + * @constructor + */ +declare interface nlobjColumn { + + /** + * + * @return + */ + new (): /* nlobjColumn */ any; + + /** + * set the header name for this column. + * + * @param {string} label the label for this column + * + * @method + * @memberOf nlobjColumn + * + * @since 2008.2 + * @param label + */ + setLabel(label:string): void; + + /** + * set the base URL (optionally defined per row) for this column. + * + * @param {string} value the base URL or a column in the datasource that returns the base URL for each row + * @param {boolean} perRow if true then the 1st arg is expected to be a column in the datasource + * + * @method + * @memberOf nlobjColumn + * + * @since 2008.2 + * @param value + * @param perRow + */ + setURL(value:string, perRow:boolean): void; + + /** + * add a URL parameter (optionally defined per row) to this column's URL. + * + * @param {string} param the name of a parameter to add to URL + * @param {string} value the value of the parameter to add to URL -or- a column in the datasource that returns the parameter value for each row + * @param {boolean} [perRow] if true then the 2nd arg is expected to be a column in the datasource + * + * @method + * @memberOf nlobjColumn + * + * @since 2008.2 + * @param param + * @param value + * @param perRow? + */ + addParamToURL(param:string, value:string, perRow?:boolean): void; +} + +/** + * Return a new instance of nlobjTab used for scriptable tab or subtab. + * + * @classDescription high level grouping for fields on a data entry form (nlobjForm). + * @return {nlobjTab} + * @constructor + */ +declare interface nlobjTab { + + /** + * + * @return + */ + new (): /* nlobjTab */ any; + + /** + * set the label for this tab or subtab. + * + * @param {string} label string used as label for this tab or subtab + * @return {nlobjTab} + * + * @since 2008.2 + * @param label + * @return + */ + setLabel(label:string): () => void; + + /** + * set helper text for this tab or subtab. + * + * @param {string} help inline help text used for this tab or subtab + * @return {nlobjTab} + * + * @since 2008.2 + * @param help + * @return + */ + setHelpText(help:string): () => void; +} + +/** + * Return a new instance of nlobjAssistantStep. + * + * @classDescription assistant step definition. Used to define individual steps/pages in multi-step workflows. + * @return {nlobjAssistantStep} + * @constructor + * + * @since 2009.2 + */ +declare interface nlobjAssistantStep { + + /** + * + * @return + */ + new (): /* nlobjAssistantStep */ any; + + /** + * set the label for this assistant step. + * @param {string} label display label used for this assistant step + * @return {void} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param label + * @return + */ + setLabel(label:string): any; + + /** + * set helper text for this assistant step. + * @param {string} help inline help text to display on assistant page for this step + * @return {nlobjAssistantStep} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param help + * @return + */ + setHelpText(help:string): () => void; + + /** + * return the index of this step in the assistant page (1-based) + * @return {int} the index of this step in the assistant (1-based) based on the order in which the steps were added. + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @return + */ + getStepNumber(): any; + + /** + * return the value of a field entered by the user during this step. + * @param {string} name field name + * @return {string} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param name + * @return + */ + getFieldValue(name:string): string; + + /** + * return the selected values of a multi-select field as an Array entered by the user during this step. + * @param {string} name multi-select field name + * @return {string[]} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param name + */ + getFieldValues(name:string): void; + + /** + * return the number of lines previously entered by the user in this step (or -1 if the sublist does not exist). + * @param {string} group sublist name + * @return {int} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param group + * @return + */ + getLineItemCount(group:string): any; + + /** + * return the value of a sublist field entered by the user during this step. + * @param {string} group sublist name + * @param {string} name sublist field name + * @param {int} line sublist (1-based) + * @return {string} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param group + * @param name + * @param line + * @return + */ + getLineItemValue(group:string, name:string, line:any): string; + + /** + * return an array of the names of all fields entered by the user during this step. + * @return {string[]} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + */ + getAllFields(): void; + + /** + * return an array of the names of all sublists entered by the user during this step. + * @return {string[]} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + */ + getAllLineItems(): void; + + /** + * return an array of the names of all sublist fields entered by the user during this step + * @param {string} group sublist name + * @return {string[]} + * + * @method + * @memberOf nlobjAssistantStep + * + * @since 2009.2 + * @param group + */ + getAllLineItemFields(group:string): void; +} + +/** + * Return a new instance of nlobjFieldGroup (currently only supported on nlobjAssistant pages) + * + * @classDescription object used for grouping fields on pages (currently only supported on assistant pages). + * @return {nlobjFieldGroup} + * @constructor + * + * @since 2009.2 + */ +declare interface nlobjFieldGroup { + + /** + * + * @return + */ + new (): /* nlobjFieldGroup */ any; + + /** + * set the label for this field group. + * @param {string} label display label for field group + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjFieldGroup + * + * @since 2009.2 + * @param label + * @return + */ + setLabel(label:string): () => void; + + /** + * set collapsibility property for this field group. + * + * @param {boolean} collapsible if true then this field group is collapsible + * @param {boolean} [defaultcollapsed] if true and the field group is collapsible, collapse this field group by default + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjFieldGroup + * + * @since 2009.2 + * @param collapsible + * @param defaultcollapsed? + * @return + */ + setCollapsible(collapsible:boolean, defaultcollapsed?:boolean): () => void; + + /** + * set singleColumn property for this field group. + * + * @param {boolean} singleColumn if true then this field group is displayed in single column + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjFieldGroup + * + * @since 2011.1 + * @param singleColumn + * @return + */ + setSingleColumn(singleColumn:boolean): () => void; + + /** + * set showBorder property for this field group. + * + * @param {boolean} showBorder if true then this field group shows border including label of group + * @return {nlobjFieldGroup} + * + * @method + * @memberOf nlobjFieldGroup + * + * @since 2011.1 + * @param showBorder + * @return + */ + setShowBorder(showBorder:boolean): () => void; +} + +/** + * Return a new instance of nlobjButton. + * + * @classDescription buttons used for triggering custom behaviors on pages. + * @return {nlobjButton} + * @constructor + * + * @since 2009.2 + */ +declare interface nlobjButton { + + /** + * + * @return + */ + new (): nlobjButton; + + /** + * set the label for this button. + * @param {string} label display label for button + * @return {nlobjButton} + * + * @method + * @memberOf nlobjButton + * + * @since 2008.2 + * @param label + * @return + */ + setLabel(label:string): nlobjButton; + + /** + * disable or enable button. + * @param {boolean} disabled if true then this button should be disabled on the page + * @return {nlobjButton} + * + * @method + * @memberOf nlobjButton + * + * @since 2008.2 + * @param disabled + * @return + */ + setDisabled(disabled:boolean): nlobjButton; + + setVisible(visible:boolean): nlobjButton; +} + +/** + * Return a new instance of nlobjSelectOption. + * + * @classDescription select|radio option used for building select fields via the UI Object API and for describing select|radio fields. + * @return {nlobjSelectOption} + * @constructor + * + * @since 2009.2 + */ +declare interface nlobjSelectOption { + + /** + * + * @return + */ + new (): any; + + /** + * return internal ID for select option + * @return {string} + * + * @method + * @memberOf nlobjSelectOption + * + * @since 2009.2 + * @return + */ + getId(): string; + + /** + * return display value for select option. + * @return {string} + * + * @method + * @memberOf nlobjSelectOption + * + * @since 2009.2 + * @return + */ + getText(): string; +} + +/** + * @return nlobjLogin + * + * @since 2012.2 + */ +declare function nlapiGetLogin():void; + +/** + * @param {string} Job Type + * @return {nlobjJobManager} + * + * @since 2013.1 + * @param jobType + * @return + */ +declare function nlapiGetJobManager(jobType:any):any; From e7df72296ea2a55f57ece35e28bb930ae93b19b5 Mon Sep 17 00:00:00 2001 From: Ian Ker-Seymer Date: Thu, 7 Jan 2016 22:23:43 -0500 Subject: [PATCH 0044/1506] Add redux-promise-middleware --- .../redux-promise-middleware-tests.ts | 46 +++++++++++++++++++ .../redux-promise-middleware.d.ts | 12 +++++ 2 files changed, 58 insertions(+) create mode 100644 redux-promise-middleware/redux-promise-middleware-tests.ts create mode 100644 redux-promise-middleware/redux-promise-middleware.d.ts diff --git a/redux-promise-middleware/redux-promise-middleware-tests.ts b/redux-promise-middleware/redux-promise-middleware-tests.ts new file mode 100644 index 0000000000..ef7e7d82de --- /dev/null +++ b/redux-promise-middleware/redux-promise-middleware-tests.ts @@ -0,0 +1,46 @@ +/// +/// + +import { createStore, applyMiddleware, Store, Dispatch } from "redux"; +import promiseMiddleware from "redux-promise-middleware"; + +declare var rootReducer: Function; +declare var Promise: any; +declare var doSomethingAsyncAndReturnPromise: any; +declare var someActionCreator: any; + +const createStoreWithMiddleware = applyMiddleware( + promiseMiddleware() +)(createStore); + +const store: Store = createStoreWithMiddleware(rootReducer); + +export function myAsyncActionCreator(data: any) { + return { + type: "ACTION", + payload: { + promise: doSomethingAsyncAndReturnPromise(data), + data: data + } + }; +} + +const actionCreator1 = () => ({ + type: "FIRST_ACTION_TYPE", + payload: { + promise: Promise.resolve({ + type: "SECOND_ACTION_TYPE", + payload: "...", + }) + } +}); + +const actionCreator2 = () => ({ + type: "FIRST_ACTION_TYPE", + payload: { + promise: Promise.resolve((action: string, dispatch: Redux.Dispatch, getState: Function) => { + dispatch({ type: "SECEOND_ACTION_TYPE", payload: "..." }); + dispatch(someActionCreator()); + }) + } +}); diff --git a/redux-promise-middleware/redux-promise-middleware.d.ts b/redux-promise-middleware/redux-promise-middleware.d.ts new file mode 100644 index 0000000000..e1350cde0e --- /dev/null +++ b/redux-promise-middleware/redux-promise-middleware.d.ts @@ -0,0 +1,12 @@ +// Type definitions for redux-promise-middleware +// Project: https://github.com/pburtchaell/redux-promise-middleware +// Definitions by: ianks +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "redux-promise-middleware" { + function promiseMiddleware(config?: { promiseTypeSuffixes: string[] }): Redux.Middleware; + + export default promiseMiddleware; +} From de8574d395843d0581c09b17e30046abf32354cb Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 19 Jan 2016 10:52:33 +0100 Subject: [PATCH 0045/1506] removed the KeyBinding constructor --- ace/ace.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/ace/ace.d.ts b/ace/ace.d.ts index 8fed295f20..b7ce4ebaa8 100644 --- a/ace/ace.d.ts +++ b/ace/ace.d.ts @@ -77,9 +77,6 @@ declare module AceAjax { onTextInput(text: any): void; } - var KeyBinding: { - new(editor: Editor): KeyBinding; - } export interface TextMode { From b4a6b1adbcb8fda098848a985931f4d5481484f5 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 21 Jan 2016 21:59:19 +0100 Subject: [PATCH 0046/1506] feat(monk): add monk 1.0.1 definitions --- monk/monk.d.ts | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 monk/monk.d.ts diff --git a/monk/monk.d.ts b/monk/monk.d.ts new file mode 100644 index 0000000000..1a467fc6af --- /dev/null +++ b/monk/monk.d.ts @@ -0,0 +1,69 @@ +// Type definitions for Monk v1.0.1 +// Project: http://github.com/LearnBoost/monk.git +// Definitions by: Patrick Bartsch +// Definitions: https://github.com/DefinitelyTyped/Monk + +declare module "monk" { + function m(database: string): m.Monk; + module m { + export interface promise { + type:string + on(eventName:string, fn:Function):void; + error(fn:Function):promise; + success(fn:Function):promise; + } + + export interface Collection { + id(hexstring:string):string // returns ObjectId + id(obj:Object):string // returns ObjectId + id():string // returns new generated ObjectId + + /* + * All commands accept the simple data[, …], options and a callback. + * You can pass fields to select as an array: data[, …], ['field', …], fn + * You can pass fields as a string delimited by spaces: data[, …], 'field1 field2', fn + * To exclude a field, prefix the field name with '-': data[, …], '-field1', fn + */ + cast(obj?:Object):Object; + + count(needle:Object, fn?:Function):promise; + + distinct(field:string, options?:Object, fn?:Function):promise; + + drop(fn?:Function):promise; + + insert(data:Object, options?:Object, fn?:Function):promise; + + find(needle:Object, options?:Object, fn?:Function):promise; + findOne(needle:Object, options?:Object, fn?:Function):promise; + /** + * findAndModify + * + * @param {Object} search query, or { query, update } object + * @param {Object} optional, update object + * @param {Object|String|Array} optional, options or fields + * @param {Function} callback + * @return {Promise} + * @api public + */ + findAndModify(needle:Object, update?:Object, filter?:string[], options?:Object, fn?:Function):promise; + findById(id:string, options?:Object, fn?:Function):promise; + + update(needle:Object, update:Object, filter?:string[], options?:Object, fn?:Function):promise; + updateById(id:string, update:Object, filter?:string[], options?:Object, fn?:Function):promise; + + remove(needle:Object, options?:Object, fn?:Function):promise; + removeById(id:string, options?:Object, fn?:Function):promise; + + } + + export interface Monk { + (database: string): void; + close():void; + + get(collection:string):Collection; + } + } + + export = m; +} From d95cc8609acf50dac01261316fa3e82a47113679 Mon Sep 17 00:00:00 2001 From: Dan Chao Date: Sun, 24 Jan 2016 09:33:08 -0800 Subject: [PATCH 0047/1506] add `on` func for Editor --- ace/ace.d.ts | 2 ++ ace/tests/ace-default-tests.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ace/ace.d.ts b/ace/ace.d.ts index 8fed295f20..f1b4b69e1d 100644 --- a/ace/ace.d.ts +++ b/ace/ace.d.ts @@ -1037,6 +1037,8 @@ declare module AceAjax { **/ export interface Editor { + on(ev: string, callback: (e: any) => any): void; + addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any): void; addEventListener(ev: string, callback: Function): void; diff --git a/ace/tests/ace-default-tests.ts b/ace/tests/ace-default-tests.ts index f8a280c1a2..798550dec9 100644 --- a/ace/tests/ace-default-tests.ts +++ b/ace/tests/ace-default-tests.ts @@ -5,6 +5,9 @@ var editor = ace.edit("editor"); editor.setTheme("ace/theme/monokai"); editor.getSession().setMode("ace/mode/javascript"); +editor.on("blur", (e) => e); +editor.on("change", (e) => e); + editor.setTheme("ace/theme/twilight"); editor.getSession().setMode("ace/mode/javascript"); From d5faebe532cac24ff670443999777f14c29587d7 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 3 Feb 2016 09:32:36 +0100 Subject: [PATCH 0048/1506] React slick definition type --- react-slick/react-slick-test.tsx | 31 ++++++++++++++++++++++ react-slick/react-slick.d.ts | 45 ++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 react-slick/react-slick-test.tsx create mode 100644 react-slick/react-slick.d.ts diff --git a/react-slick/react-slick-test.tsx b/react-slick/react-slick-test.tsx new file mode 100644 index 0000000000..c351419401 --- /dev/null +++ b/react-slick/react-slick-test.tsx @@ -0,0 +1,31 @@ +/// +/// +/// + +import * as React from "react" +import * as ReactDOM from "react-dom" +import * as Slider from "react-slick" + +class SliderTest extends React.Component, {}> { + + render() { + let settings = { + speed: 500, + slidesToShow: 8, + slidesToScroll: 1, + draggable: false, + infinite: false + }; + + return ( +
+ +

Slide1

+

Slide2

+
+
+ ) + } +} + +ReactDOM.render(, document.body); diff --git a/react-slick/react-slick.d.ts b/react-slick/react-slick.d.ts new file mode 100644 index 0000000000..222089b537 --- /dev/null +++ b/react-slick/react-slick.d.ts @@ -0,0 +1,45 @@ +/// + +declare module 'react-slick' { + interface __config { + className?: string + adaptiveHeight?: boolean + arrows?: boolean + autoplay?: boolean + autoplaySpeed?: number // integer + centerMode?: boolean + centerPadding?: string | any + cssEase?: string | any + dots?: boolean + dotsClass?: string + draggable?: boolean + easing?: string + fade?: boolean + focusOnSelect?: boolean + infinite?: boolean // should the gallery wrap around it's contents + initialSlide?: number // int + lazyLoad?: boolean + rtl?: boolean + slide?: string + slidesToShow?: number // int + slidesToScroll?: number // int + speed?: number //int + swipe?: boolean + swipeToSlide?: boolean + touchMove?: boolean + touchThreshold?: number // int + variableWidth?: boolean + useCSS?: boolean + vertical?: boolean + afterChange?: (() => void) + beforeChange?: (() => void) + slickGoTo?: number // int + } + + interface Slider extends __config { + responsive?: { breakpoint: number; settings: __config}[] + } + + var Slider: __React.ClassicComponentClass; + export = Slider; +} From 65ed470927fc807ffcfd29d726dfda6f4f79b549 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 3 Feb 2016 09:47:43 +0100 Subject: [PATCH 0049/1506] React slick definition type --- react-slick/react-slick.d.ts | 78 ++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/react-slick/react-slick.d.ts b/react-slick/react-slick.d.ts index 222089b537..090037bc52 100644 --- a/react-slick/react-slick.d.ts +++ b/react-slick/react-slick.d.ts @@ -1,45 +1,45 @@ -/// +/// -declare module 'react-slick' { - interface __config { - className?: string - adaptiveHeight?: boolean - arrows?: boolean - autoplay?: boolean - autoplaySpeed?: number // integer - centerMode?: boolean - centerPadding?: string | any - cssEase?: string | any - dots?: boolean - dotsClass?: string - draggable?: boolean - easing?: string - fade?: boolean - focusOnSelect?: boolean - infinite?: boolean // should the gallery wrap around it's contents - initialSlide?: number // int - lazyLoad?: boolean - rtl?: boolean - slide?: string - slidesToShow?: number // int - slidesToScroll?: number // int - speed?: number //int - swipe?: boolean - swipeToSlide?: boolean - touchMove?: boolean - touchThreshold?: number // int - variableWidth?: boolean - useCSS?: boolean - vertical?: boolean - afterChange?: (() => void) - beforeChange?: (() => void) - slickGoTo?: number // int - } +interface __config { + className?: string + adaptiveHeight?: boolean + arrows?: boolean + autoplay?: boolean + autoplaySpeed?: number // integer + centerMode?: boolean + centerPadding?: string | any + cssEase?: string | any + dots?: boolean + dotsClass?: string + draggable?: boolean + easing?: string + fade?: boolean + focusOnSelect?: boolean + infinite?: boolean // should the gallery wrap around it's contents + initialSlide?: number // int + lazyLoad?: boolean + rtl?: boolean + slide?: string + slidesToShow?: number // int + slidesToScroll?: number // int + speed?: number //int + swipe?: boolean + swipeToSlide?: boolean + touchMove?: boolean + touchThreshold?: number // int + variableWidth?: boolean + useCSS?: boolean + vertical?: boolean + afterChange?: (() => void) + beforeChange?: (() => void) + slickGoTo?: number // int +} - interface Slider extends __config { - responsive?: { breakpoint: number; settings: __config}[] - } +interface Slider extends __config { + responsive?: { breakpoint: number; settings: __config}[] +} +declare module "react-slick" { var Slider: __React.ClassicComponentClass; export = Slider; } From 04faa1e002ed6996f20ebf9cb319d35f7f45de1e Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 3 Feb 2016 10:01:59 +0100 Subject: [PATCH 0050/1506] React slick definition type --- react-slick/react-slick.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/react-slick/react-slick.d.ts b/react-slick/react-slick.d.ts index 090037bc52..2dfadcf133 100644 --- a/react-slick/react-slick.d.ts +++ b/react-slick/react-slick.d.ts @@ -1,3 +1,8 @@ +// Type definitions for [react-slick] +// Project: [https://github.com/akiran/react-slick] +// Definitions by: [Andrey Balokha] <[https://github.com/andrewBalekha]> +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + /// interface __config { From 85ae5b9531449b4c878ec30aaea122f6572d6784 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 3 Feb 2016 10:05:04 +0100 Subject: [PATCH 0051/1506] React slick definition type --- react-slick/react-slick.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react-slick/react-slick.d.ts b/react-slick/react-slick.d.ts index 2dfadcf133..43c9cdcf69 100644 --- a/react-slick/react-slick.d.ts +++ b/react-slick/react-slick.d.ts @@ -1,6 +1,6 @@ -// Type definitions for [react-slick] -// Project: [https://github.com/akiran/react-slick] -// Definitions by: [Andrey Balokha] <[https://github.com/andrewBalekha]> +// Type definitions for react-slick +// Project: https://github.com/akiran/react-slick +// Definitions by: Andrey Balokha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From 4674eac751cb6820363959532a60f1c420c6a159 Mon Sep 17 00:00:00 2001 From: "jeff.noble" Date: Wed, 3 Feb 2016 10:40:14 -0500 Subject: [PATCH 0052/1506] The casing for the bodyType is different than what comes back from getTypeAsync(). --- office-js/office-js.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/office-js/office-js.d.ts b/office-js/office-js.d.ts index e82e78fb3f..41acf23619 100644 --- a/office-js/office-js.d.ts +++ b/office-js/office-js.d.ts @@ -4689,7 +4689,7 @@ declare module Office.MailboxEnums { /** * The body is in HTML format */ - HTML, + Html, /** * The body is in text format */ From 824761509fb46114aa55036829452941f135a543 Mon Sep 17 00:00:00 2001 From: Damiano Date: Fri, 12 Feb 2016 23:27:38 +0100 Subject: [PATCH 0053/1506] Missing "require" property on IComponentOptions Added missing require property on IComponentOptions --- angularjs/angular.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 67b3eb488d..59645137d7 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1706,6 +1706,10 @@ declare module angular { * $attrs - Current attributes object for the element */ templateUrl?: string | Function; + /** + * Define object mapping to other directive or component required controllers. + */ + require?: any; /** * Define DOM attribute binding to component properties. Component properties are always bound to the component * controller and not to the scope. From f9d6506b938c33ab9cb2b9618ab41c4fa8f7b694 Mon Sep 17 00:00:00 2001 From: "Andrew V. Sparrow" Date: Sat, 13 Feb 2016 11:07:50 +0600 Subject: [PATCH 0054/1506] Sockjs should extends WebSocket --- sockjs/sockjs.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sockjs/sockjs.d.ts b/sockjs/sockjs.d.ts index e9569ba22c..ae6819f520 100644 --- a/sockjs/sockjs.d.ts +++ b/sockjs/sockjs.d.ts @@ -8,19 +8,19 @@ interface SockJSSimpleEvent { toString(): string; } -interface SJSOpenEvent extends SockJSSimpleEvent {} +interface SJSOpenEvent extends SockJSSimpleEvent, Event {} -interface SJSCloseEvent extends SockJSSimpleEvent { +interface SJSCloseEvent extends SockJSSimpleEvent, CloseEvent { code: number; reason: string; wasClean: boolean; } -interface SJSMessageEvent extends SockJSSimpleEvent { +interface SJSMessageEvent extends SockJSSimpleEvent, MessageEvent { data: string; } -interface SockJS extends EventTarget { +interface SockJS extends WebSocket { protocol: string; readyState: number; onopen: (ev: SJSOpenEvent) => any; @@ -49,4 +49,4 @@ declare var SockJS: { null_origin?: boolean; }; }): SockJS; -}; \ No newline at end of file +}; From 0a45f056612592dd1e09ecaaa553f633720db351 Mon Sep 17 00:00:00 2001 From: Ryan Schmukler Date: Sat, 9 Jan 2016 16:53:47 -0500 Subject: [PATCH 0055/1506] expand googlemaps definitions --- googlemaps/google.maps.d.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 82a13d9122..bca09b3f39 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -1517,7 +1517,7 @@ declare module google.maps { addressControl?: boolean; addressControlOptions?: StreetViewAddressControlOptions; clickToGo?: boolean; - disableDefaultUi?: boolean; + disableDefaultUI?: boolean; disableDoubleClickZoom?: boolean; enableCloseButton?: boolean; imageDateControl?: boolean; @@ -1530,6 +1530,7 @@ declare module google.maps { pov?: StreetViewPov; scrollwheel?: boolean; visible?: boolean; + zoom?: number; zoomControl?: boolean; zoomControlOptions?: ZoomControlOptions; } @@ -1571,7 +1572,29 @@ declare module google.maps { worldSize?: Size; } + export enum StreetViewPreference { + BEST, + NEAREST + } + + export enum StreetViewSource { + DEFAULT, + OUTDOOR + } + + export interface StreetViewLocationRequest { + location: LatLng|LatLngLiteral; + preference?: StreetViewPreference; + radius?: number; + source?: StreetViewSource; + } + + export interface StreetViewPanoRequest { + pano: string; + } + export class StreetViewService { + getPanorama(request: StreetViewLocationRequest|StreetViewPanoRequest, cb: (data: StreetViewPanoramaData, status: StreetViewStatus) => void): void; getPanoramaById(pano: string, callback: (streetViewPanoramaData: StreetViewPanoramaData, streetViewStatus: StreetViewStatus) => void): void; getPanoramaByLocation(latlng: LatLng|LatLngLiteral, radius: number, callback: (streetViewPanoramaData: StreetViewPanoramaData, streetViewStatus: StreetViewStatus) => void ): void; } From 74a8ca9e7e9e86b4368996da45d740dcf1386a46 Mon Sep 17 00:00:00 2001 From: MizunagiKB Date: Sat, 20 Feb 2016 14:11:16 +0900 Subject: [PATCH 0056/1506] Collection.remove: Argument type is missing. It is different arguments in the add function and remove function. (add - Backbone.Collection.add, remove - Backbone.Collection.remove) Those that can be used in argument, a Model instance, id string or a JS object http://backbonejs.org/#Collection-remove --- backbone/backbone-global.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts index c16e1a59e3..1962bb08ef 100644 --- a/backbone/backbone-global.d.ts +++ b/backbone/backbone-global.d.ts @@ -206,8 +206,8 @@ declare module Backbone { pluck(attribute: string): any[]; push(model: TModel, options?: AddOptions): TModel; pop(options?: Silenceable): TModel; - remove(model: TModel, options?: Silenceable): TModel; - remove(models: TModel[], options?: Silenceable): TModel[]; + remove(model: {}|TModel, options?: Silenceable): TModel; + remove(models: ({}|TModel)[], options?: Silenceable): TModel[]; reset(models?: TModel[], options?: Silenceable): TModel[]; set(models?: TModel[], options?: Silenceable): TModel[]; shift(options?: Silenceable): TModel; From b7973616d40f9f67fbb09cbd5fc7f3aa8817fb4b Mon Sep 17 00:00:00 2001 From: YUDIEL CURBELO Date: Sat, 20 Feb 2016 00:57:52 -0500 Subject: [PATCH 0057/1506] path function to allow (string | number)[] It is totally legal to have something like this: paper.path(['M' + (startX), (startY), 'L' + (startX), (startY)]); --- raphael/raphael.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raphael/raphael.d.ts b/raphael/raphael.d.ts index 80419302ad..38d6c53654 100644 --- a/raphael/raphael.d.ts +++ b/raphael/raphael.d.ts @@ -210,7 +210,7 @@ interface RaphaelPaper { getFont(family: string, weight?: number, style?: string, stretch?: string): RaphaelFont; height: number; image(src: string, x: number, y: number, width: number, height: number): RaphaelElement; - path(pathString?: string): RaphaelPath; + path(pathString?: string | (string | number)[]): RaphaelPath; print(x: number, y: number, str: string, font: RaphaelFont, size?: number, origin?: string, letter_spacing?: number): RaphaelPath; rect(x: number, y: number, width: number, height: number, r?: number): RaphaelElement; remove(): void; From a6f84522683e0abd14258ffeb0162b9e4c3d1cff Mon Sep 17 00:00:00 2001 From: Laszlo Pandy Date: Thu, 25 Feb 2016 14:19:57 +0100 Subject: [PATCH 0058/1506] Whitespace only: remove tabs in foogaloop.d.ts --- vimeo/froogaloop.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vimeo/froogaloop.d.ts b/vimeo/froogaloop.d.ts index 61f58e284f..077e79cbce 100644 --- a/vimeo/froogaloop.d.ts +++ b/vimeo/froogaloop.d.ts @@ -4,15 +4,17 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped interface VimeoParams { - name:string; - value:any; + name:string; + value:any; } + interface VimeoPlayerAPI { (method: string): any; (method: string, callback: (value: any, player_id: any) =>void ): any; - (method: string, value: any): any; - (method: string, value: VimeoParams[]): any; + (method: string, value: any): any; + (method: string, value: VimeoParams[]): any; } + interface VimeoPlayer { api: VimeoPlayerAPI; addEvent(eventName: string, callback: (e: any) =>void ): any; @@ -25,4 +27,4 @@ interface VimeoPlayer { getDomainFromUrl(url: string): string; } -declare var $f: VimeoPlayerAPI; \ No newline at end of file +declare var $f: VimeoPlayerAPI; From cca549d09caf1a66fcdb2a259e8b03a2983a89d3 Mon Sep 17 00:00:00 2001 From: Laszlo Pandy Date: Thu, 25 Feb 2016 14:21:23 +0100 Subject: [PATCH 0059/1506] Fix vimeo/froogaloop.d.ts --- vimeo/froogaloop.d.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vimeo/froogaloop.d.ts b/vimeo/froogaloop.d.ts index 077e79cbce..d0e54e3199 100644 --- a/vimeo/froogaloop.d.ts +++ b/vimeo/froogaloop.d.ts @@ -19,12 +19,7 @@ interface VimeoPlayer { api: VimeoPlayerAPI; addEvent(eventName: string, callback: (e: any) =>void ): any; removeEvent(eventName: string): void; - postMessage(method: string, params:VimeoParams[], target): void; - onMessagReceived(event); - storeCallback(eventName: string, callback, target_id: string); - getCallback(eventName: string, target_id: string); - removeCallback(eventName: string, target_id: string); - getDomainFromUrl(url: string): string; } declare var $f: VimeoPlayerAPI; +declare var Froogaloop: VimeoPlayerAPI; From cbf669a7a0cb7e236ef1ee252cc836344a4a9417 Mon Sep 17 00:00:00 2001 From: Laszlo Pandy Date: Thu, 25 Feb 2016 14:22:36 +0100 Subject: [PATCH 0060/1506] Whitespace only. --- vimeo/froogaloop.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vimeo/froogaloop.d.ts b/vimeo/froogaloop.d.ts index d0e54e3199..b4af11258a 100644 --- a/vimeo/froogaloop.d.ts +++ b/vimeo/froogaloop.d.ts @@ -10,14 +10,14 @@ interface VimeoParams { interface VimeoPlayerAPI { (method: string): any; - (method: string, callback: (value: any, player_id: any) =>void ): any; + (method: string, callback: (value: any, player_id: any) => void): any; (method: string, value: any): any; (method: string, value: VimeoParams[]): any; } interface VimeoPlayer { api: VimeoPlayerAPI; - addEvent(eventName: string, callback: (e: any) =>void ): any; + addEvent(eventName: string, callback: (e: any) => void): any; removeEvent(eventName: string): void; } From 4db61597fa28a9f8bbb19f410f6f38f80271d203 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Tue, 1 Mar 2016 15:13:50 +0100 Subject: [PATCH 0061/1506] Create connect-redis definitions --- connect-redis/connect-redis-tests.ts | 4 +++ connect-redis/connect-redis.d.ts | 38 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 connect-redis/connect-redis-tests.ts create mode 100644 connect-redis/connect-redis.d.ts diff --git a/connect-redis/connect-redis-tests.ts b/connect-redis/connect-redis-tests.ts new file mode 100644 index 0000000000..3c50074117 --- /dev/null +++ b/connect-redis/connect-redis-tests.ts @@ -0,0 +1,4 @@ +import * as connectRedis from "connect-redis"; +import * as session from "express-session"; + +let RedisStore = connectRedis(session); diff --git a/connect-redis/connect-redis.d.ts b/connect-redis/connect-redis.d.ts new file mode 100644 index 0000000000..4ba0490fe1 --- /dev/null +++ b/connect-redis/connect-redis.d.ts @@ -0,0 +1,38 @@ +// Type definitions for connect-redis +// Project: https://npmjs.com/package/connect-redis +// Definitions by: Xavier Stouder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "connect-redis" { + import * as express from "express"; + import * as session from "express-session"; + import * as redis from "redis"; + + function s(options: (options?: session.SessionOptions) => express.RequestHandler): s.RedisStore; + + namespace s { + interface RedisStore extends session.Store { + new (options: RedisStoreOptions): session.Store; + } + interface RedisStoreOptions { + client?: redis.RedisClient; + host?: string; + port?: number; + socket?: string; + url?: string; + ttl?: number; + disableTTL?: boolean; + db?: number; + pass?: string; + prefix?: string; + unref?: boolean; + serializer?: Serializer | JSON; + } + interface Serializer { + stringify: Function; + parse: Function; + } + } + + export = s; +} From 6b080a6bbf559cc352345f191b8e1aee555d1cf6 Mon Sep 17 00:00:00 2001 From: eloekset Date: Tue, 1 Mar 2016 15:21:45 +0100 Subject: [PATCH 0062/1506] Globalize definition for NuGet package v0.1.3. --- globalize/globalize-0.1.3.d.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 globalize/globalize-0.1.3.d.ts diff --git a/globalize/globalize-0.1.3.d.ts b/globalize/globalize-0.1.3.d.ts new file mode 100644 index 0000000000..8fbd4934b1 --- /dev/null +++ b/globalize/globalize-0.1.3.d.ts @@ -0,0 +1,25 @@ +// Type definitions for Globalize v?.? NuGet package v0.1.3 +// Project: https://github.com/jquery/globalize +// Definitions by: Aram Taieb +// Definitions: https://github.com/afromogli/DefinitelyTyped + +interface GlobalizeStatic { + addCultureInfo(cultureName: string, baseCultureName: string, info: any): void; + findClosestCulture(name: string): any; + format(value: any, format: string): string; + format(value: any, format: string, cultureSelector: string): string; + localize(key: string): string; + localize(key: string, cultureSelector: string): string; + parseDate(value: any): Date; + parseDate(value: any, formats: any): Date; + parseDate(value: any, formats: any, culture: string): Date; + parseInt(value: any): number; + parseInt(value: any, radix: number): number; + parseInt(value: any, radix: number, cultureSelector: string): number; + parseFloat(value: any): number; + parseFloat(value: any, radix: number): number; + parseFloat(value: any, radix: number, cultureSelector: string): number; + culture(cultureSelector: string): any; +} + +declare var Globalize: GlobalizeStatic; From 1ea67ceea476ea5b226130ced5f2cef247eedaab Mon Sep 17 00:00:00 2001 From: abraaoalves Date: Tue, 1 Mar 2016 19:01:41 -0300 Subject: [PATCH 0063/1506] ad files --- .../jquery-truncate-html-tests.ts | 5 +++++ .../jquery-truncate-html.d.ts | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 jquery-truncate-html/jquery-truncate-html-tests.ts create mode 100644 jquery-truncate-html/jquery-truncate-html.d.ts diff --git a/jquery-truncate-html/jquery-truncate-html-tests.ts b/jquery-truncate-html/jquery-truncate-html-tests.ts new file mode 100644 index 0000000000..fe043601b0 --- /dev/null +++ b/jquery-truncate-html/jquery-truncate-html-tests.ts @@ -0,0 +1,5 @@ +/// + +jQuery('

Stuff and Nonsense

').truncate({ + length: 13 +}).html(); diff --git a/jquery-truncate-html/jquery-truncate-html.d.ts b/jquery-truncate-html/jquery-truncate-html.d.ts new file mode 100644 index 0000000000..d7f4abaa3b --- /dev/null +++ b/jquery-truncate-html/jquery-truncate-html.d.ts @@ -0,0 +1,22 @@ +// Type definitions for jQuery-truncate-html.js +// Project: https://github.com/kbwood/timeentry +// Definitions by: Abraão Alves +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface ITruncateOptions{ + length?: number; + stripTags?: boolean; + words?: boolean; + noBreaks?: boolean; + ellipsis?: string; +} + +interface jQuery{ + truncate(options: ITruncateOptions) : jQuery; +} + +interface JQueryStatic { + truncate(html: string, options: ITruncateOptions) : string; +} From 13d212dfb3ef4672039019036bf2d08acbe728eb Mon Sep 17 00:00:00 2001 From: abraaoalves Date: Tue, 1 Mar 2016 21:40:34 -0300 Subject: [PATCH 0064/1506] make tests --- .../jquery-truncate-html-tests.ts | 15 ++++++++++++--- jquery-truncate-html/jquery-truncate-html.d.ts | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/jquery-truncate-html/jquery-truncate-html-tests.ts b/jquery-truncate-html/jquery-truncate-html-tests.ts index fe043601b0..e20f9c22ee 100644 --- a/jquery-truncate-html/jquery-truncate-html-tests.ts +++ b/jquery-truncate-html/jquery-truncate-html-tests.ts @@ -1,5 +1,14 @@ /// -jQuery('

Stuff and Nonsense

').truncate({ - length: 13 -}).html(); + +function truncateHtmlString(): string { + return $.truncate('

Stuff and Nonsense

', { + length: 13 + }); +} + +function truncateVirtualElement (): JQuery { + return $('

Stuff and Nonsense

').truncate({ + length: 13 + }); +} diff --git a/jquery-truncate-html/jquery-truncate-html.d.ts b/jquery-truncate-html/jquery-truncate-html.d.ts index d7f4abaa3b..3a22eaffdb 100644 --- a/jquery-truncate-html/jquery-truncate-html.d.ts +++ b/jquery-truncate-html/jquery-truncate-html.d.ts @@ -13,8 +13,8 @@ interface ITruncateOptions{ ellipsis?: string; } -interface jQuery{ - truncate(options: ITruncateOptions) : jQuery; +interface JQuery{ + truncate(options: ITruncateOptions) : JQuery; } interface JQueryStatic { From 876883d0fd58dc1e24d3f3c147b5f33dfbfb56df Mon Sep 17 00:00:00 2001 From: eloekset Date: Wed, 2 Mar 2016 16:39:17 +0100 Subject: [PATCH 0065/1506] Created test file for the 0.1.3 definition. --- globalize/globalize-0.1.3-tests.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 globalize/globalize-0.1.3-tests.ts diff --git a/globalize/globalize-0.1.3-tests.ts b/globalize/globalize-0.1.3-tests.ts new file mode 100644 index 0000000000..4e3e9056ed --- /dev/null +++ b/globalize/globalize-0.1.3-tests.ts @@ -0,0 +1,11 @@ +/// +module Tests { + Globalize.culture('en-US'); + Globalize.addCultureInfo('nb-NO', 'no', { messages: {Test: "Test"} }); + var cult = Globalize.findClosestCulture('nb-NO'); + var numberString = Globalize.format(1.245, 'n2'); + var testString = Globalize.localize('Test'); + var dateParsed = Globalize.parseDate('2016-02-03'); + var intParsed = Globalize.parseInt('123'); + var floatParsed = Globalize.parseFloat('12.3'); +} \ No newline at end of file From d9e6d03e769ee7013bee70e4f73c8e59d932d91d Mon Sep 17 00:00:00 2001 From: eloekset Date: Wed, 2 Mar 2016 16:40:20 +0100 Subject: [PATCH 0066/1506] Set NuGet version 0.1.3 as Globalize version. --- globalize/globalize-0.1.3.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/globalize/globalize-0.1.3.d.ts b/globalize/globalize-0.1.3.d.ts index 8fbd4934b1..b31a1cc092 100644 --- a/globalize/globalize-0.1.3.d.ts +++ b/globalize/globalize-0.1.3.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Globalize v?.? NuGet package v0.1.3 +// Type definitions for Globalize v0.1.3 (NuGet package version) // Project: https://github.com/jquery/globalize // Definitions by: Aram Taieb // Definitions: https://github.com/afromogli/DefinitelyTyped From 41d21c491c0bb1eff11d98265e30a290d4410ce2 Mon Sep 17 00:00:00 2001 From: rgvassar Date: Wed, 2 Mar 2016 10:25:09 -0800 Subject: [PATCH 0067/1506] angular-animate Added the on, off, and pin methods to the IAnimateService interface. --- angularjs/angular-animate.d.ts | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/angularjs/angular-animate.d.ts b/angularjs/angular-animate.d.ts index be83611e07..c29fd1857e 100644 --- a/angularjs/angular-animate.d.ts +++ b/angularjs/angular-animate.d.ts @@ -27,6 +27,42 @@ declare module angular.animate { * see http://docs.angularjs.org/api/ngAnimate/service/$animate */ interface IAnimateService { + /** + * Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) has fired + * on the given element or among any of its children. Once the listener is fired, the provided callback + * is fired with the following params: + * + * @event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...) + * @container the container element that will capture each of the animation events that are fired on itself as well as among its children + * @callback the callback function that will be fired when the listener is triggered + * The arguments present in the callback function are: + * element - The captured DOM element that the animation was fired on. + * phase - The phase of the animation. The two possible phases are start (when the animation starts) and close (when it ends). + */ + on(event: string, container: JQuery, callback: (element?: JQuery, phase?: string) => any): void; + + /** + * Deregisters an event listener based on the event which has been associated with the provided element. + * This method can be used in three different ways depending on the arguments. + * + * @event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...) + * @container the container element the event listener was placed on. + * @callback the callback function that was registered as the listener + */ + off(event: string, container?: JQuery, callback?: (element?: JQuery, phase?: string) => any): void; + + /** + * Associates the provided element with a host parent element to allow the element to be animated even if + * it exists outside of the DOM structure of the Angular application. By doing so, any animation triggered + * via $animate can be issued on the element despite being outside the realm of the application or within + * another application. Say for example if the application was bootstrapped on an element that is somewhere + * inside of the tag, but we wanted to allow for an element to be situated as a direct child of document.body, + * then this can be achieved by pinning the element via $animate.pin(element). Keep in mind that calling + * $animate.pin(element, parentElement) will not actually insert into the DOM anywhere; it will just create the association. + * Note that this feature is only active when the ngAnimate module is used. + */ + pin(element: JQuery, parentElement: JQuery): void; + /** * Globally enables / disables animations. * From 90ecfb5cab21366189c700d34c76f6fe13a1bd3f Mon Sep 17 00:00:00 2001 From: artem Date: Fri, 4 Mar 2016 12:10:52 +0200 Subject: [PATCH 0068/1506] Update restangular.d.ts --- restangular/restangular.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/restangular/restangular.d.ts b/restangular/restangular.d.ts index db17e51cf8..68e1144dc0 100644 --- a/restangular/restangular.d.ts +++ b/restangular/restangular.d.ts @@ -93,6 +93,7 @@ declare module restangular { service(route: string, parent?: any): IService; stripRestangular(element: any): any; extendModel(route: string, extender: (model: IElement) => any): void; + extendCollection(route: string, extender: (collection: ICollection) => any): void; } interface IElement extends IService { From 4064f5b0d8945fc38b3568b5bb6a3b24d9e410fc Mon Sep 17 00:00:00 2001 From: AbraaoAlves Date: Sat, 5 Mar 2016 11:26:59 -0300 Subject: [PATCH 0069/1506] Remove "I" prefix --- jquery-truncate-html/jquery-truncate-html.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery-truncate-html/jquery-truncate-html.d.ts b/jquery-truncate-html/jquery-truncate-html.d.ts index 3a22eaffdb..e410716b0a 100644 --- a/jquery-truncate-html/jquery-truncate-html.d.ts +++ b/jquery-truncate-html/jquery-truncate-html.d.ts @@ -5,7 +5,7 @@ /// -interface ITruncateOptions{ +interface TruncateOptions{ length?: number; stripTags?: boolean; words?: boolean; @@ -14,9 +14,9 @@ interface ITruncateOptions{ } interface JQuery{ - truncate(options: ITruncateOptions) : JQuery; + truncate(options: TruncateOptions) : JQuery; } interface JQueryStatic { - truncate(html: string, options: ITruncateOptions) : string; + truncate(html: string, options: TruncateOptions) : string; } From b906a40b8e52d904daeb69d145de75e0084d5896 Mon Sep 17 00:00:00 2001 From: wagich Date: Sat, 5 Mar 2016 17:25:14 +0100 Subject: [PATCH 0070/1506] corrects naming of `setGallerySize` member in FlickityOptions --- flickity/flickity.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flickity/flickity.d.ts b/flickity/flickity.d.ts index bf4541e5ff..febb09b525 100644 --- a/flickity/flickity.d.ts +++ b/flickity/flickity.d.ts @@ -269,7 +269,7 @@ interface FlickityOptions { * * default: true */ - useSetGallerySize?: boolean; + setGallerySize?: boolean; /** * Adjusts sizes and positions when window is resized. From ec13362958058efcaff223167f987f16a809e668 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Sat, 5 Mar 2016 17:56:49 +0100 Subject: [PATCH 0071/1506] Fix references path --- connect-redis/connect-redis.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connect-redis/connect-redis.d.ts b/connect-redis/connect-redis.d.ts index 4ba0490fe1..21af697f38 100644 --- a/connect-redis/connect-redis.d.ts +++ b/connect-redis/connect-redis.d.ts @@ -4,9 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "connect-redis" { - import * as express from "express"; - import * as session from "express-session"; - import * as redis from "redis"; + /// + /// + /// function s(options: (options?: session.SessionOptions) => express.RequestHandler): s.RedisStore; From 252bd4bb4e881da01b0324cc40f7277098c6aead Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Sat, 5 Mar 2016 17:58:29 +0100 Subject: [PATCH 0072/1506] Fix path --- connect-redis/connect-redis.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connect-redis/connect-redis.d.ts b/connect-redis/connect-redis.d.ts index 21af697f38..078b99073c 100644 --- a/connect-redis/connect-redis.d.ts +++ b/connect-redis/connect-redis.d.ts @@ -4,9 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "connect-redis" { - /// - /// - /// + /// + /// + /// function s(options: (options?: session.SessionOptions) => express.RequestHandler): s.RedisStore; From 6513e0853e3522c0e06d346e048d815cb0331809 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Sat, 5 Mar 2016 18:01:14 +0100 Subject: [PATCH 0073/1506] References & imports --- connect-redis/connect-redis.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/connect-redis/connect-redis.d.ts b/connect-redis/connect-redis.d.ts index 078b99073c..b3a1529569 100644 --- a/connect-redis/connect-redis.d.ts +++ b/connect-redis/connect-redis.d.ts @@ -3,10 +3,15 @@ // Definitions by: Xavier Stouder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// +/// +/// + declare module "connect-redis" { - /// - /// - /// + import * as express from "express"; + import * as session from "express-session"; + import * as redis from "redis"; + function s(options: (options?: session.SessionOptions) => express.RequestHandler): s.RedisStore; From e88d574f91aef319947931009d40477dc501a36e Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Sat, 5 Mar 2016 18:03:42 +0100 Subject: [PATCH 0074/1506] Fix tests references --- connect-redis/connect-redis-tests.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connect-redis/connect-redis-tests.ts b/connect-redis/connect-redis-tests.ts index 3c50074117..fa61b7304c 100644 --- a/connect-redis/connect-redis-tests.ts +++ b/connect-redis/connect-redis-tests.ts @@ -1,3 +1,6 @@ +/// +/// + import * as connectRedis from "connect-redis"; import * as session from "express-session"; From 91d48d1b2823289abec4aabd30dbc6d9899da206 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Sat, 5 Mar 2016 18:05:51 +0100 Subject: [PATCH 0075/1506] Fix name --- connect-redis/connect-redis-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connect-redis/connect-redis-tests.ts b/connect-redis/connect-redis-tests.ts index fa61b7304c..2ad4d53bd5 100644 --- a/connect-redis/connect-redis-tests.ts +++ b/connect-redis/connect-redis-tests.ts @@ -1,4 +1,4 @@ -/// +/// /// import * as connectRedis from "connect-redis"; From 01c976de75d8564675ed4eba811be31cbf6d82ad Mon Sep 17 00:00:00 2001 From: Strato Date: Thu, 10 Mar 2016 11:56:31 +0100 Subject: [PATCH 0076/1506] Added some missing properties 'getSignalBars()' seems to always return null anyway... Whole Windows.Data.Pdf namespace is still missing. Lots of class of Windows.ApplicationModel.Contacts are missing as well. --- winrt/winrt.d.ts | 166 +++++++++++++++++++++++++---------------------- 1 file changed, 90 insertions(+), 76 deletions(-) diff --git a/winrt/winrt.d.ts b/winrt/winrt.d.ts index 687d7f83d4..5ce721b082 100644 --- a/winrt/winrt.d.ts +++ b/winrt/winrt.d.ts @@ -8201,6 +8201,7 @@ declare module Windows { getDataPlanStatus(): Windows.Networking.Connectivity.DataPlanStatus; getLocalUsage(StartTime: Date, EndTime: Date): Windows.Networking.Connectivity.DataUsage; getLocalUsage(StartTime: Date, EndTime: Date, States: Windows.Networking.Connectivity.RoamingStates): Windows.Networking.Connectivity.DataUsage; + getSignalBars(): Windows.Foundation.IReference; } export class ConnectionCost implements Windows.Networking.Connectivity.IConnectionCost { approachingDataLimit: boolean; @@ -8267,6 +8268,7 @@ declare module Windows { getDataPlanStatus(): Windows.Networking.Connectivity.DataPlanStatus; getLocalUsage(StartTime: Date, EndTime: Date): Windows.Networking.Connectivity.DataUsage; getLocalUsage(StartTime: Date, EndTime: Date, States: Windows.Networking.Connectivity.RoamingStates): Windows.Networking.Connectivity.DataUsage; + getSignalBars(): Windows.Foundation.IReference; } export class LanIdentifier implements Windows.Networking.Connectivity.ILanIdentifier { infrastructureId: Windows.Networking.Connectivity.LanIdentifierData; @@ -11340,15 +11342,18 @@ declare module Windows { } export interface ILauncherOptions { contentType: string; + desiredRemainingView: Windows.UI.ViewManagement.ViewSizePreference; displayApplicationPicker: boolean; fallbackUri: Windows.Foundation.Uri; preferredApplicationDisplayName: string; preferredApplicationPackageFamilyName: string; treatAsUntrusted: boolean; - uI: Windows.System.LauncherUIOptions; + UI: Windows.System.LauncherUIOptions; + } export class LauncherOptions implements Windows.System.ILauncherOptions { contentType: string; + desiredRemainingView: Windows.UI.ViewManagement.ViewSizePreference; displayApplicationPicker: boolean; fallbackUri: Windows.Foundation.Uri; preferredApplicationDisplayName: string; @@ -11590,87 +11595,96 @@ declare module Windows { } declare module Windows { export module UI { - export module ViewManagement { - export enum ApplicationViewState { - fullScreenLandscape, - filled, - snapped, - fullScreenPortrait, - } + export module ViewManagement { + export enum ViewSizePreference { + default = 0, + useLess = 1, + useHalf = 2, + useMore = 3, + useMinimum = 4, + useNone = 5 + } + + export enum ApplicationViewState { + fullScreenLandscape, + filled, + snapped, + fullScreenPortrait, + } + + /** + * Defines an instance of a window (app view) and the information that describes it. + **/ + export class ApplicationView { + /** + * Gets the window (app view) for the current app. + **/ + static getForCurrentView(): ApplicationView; /** - * Defines an instance of a window (app view) and the information that describes it. + * Attempts to unsnap a previously snapped app. This call will only succeed when the app is running in the foreground. **/ - export class ApplicationView { - /** - * Gets the window (app view) for the current app. - **/ - static getForCurrentView(): ApplicationView; - - /** - * Attempts to unsnap a previously snapped app. This call will only succeed when the app is running in the foreground. - **/ - static tryUnsnap(): boolean; - - /** - * Gets the state of the current app view. - **/ - static value: Windows.UI.ViewManagement.ApplicationViewState; - - /** - * Indicates whether the app terminates when the last window is closed. - **/ - static terminateAppOnFinalViewClose: boolean; - - /** - * Gets the current orientation of the window (app view) with respect to the display. - **/ - orientation: ApplicationViewOrientation; - - /** - * Gets or sets the displayed title of the window. - **/ - title: string; - - /** - * Gets or sets whether screen capture is enabled for the window (app view). - **/ - isScreenCaptureEnabled: boolean; - - /** - * Gets whether the window (app view) is on the Windows lock screen. - **/ - isOnLockScreen: boolean; - - /** - * Gets whether the window(app view) is full screen or not. - **/ - isFullScreen: boolean; - - /** - * Gets the current ID of the window (app view) . - **/ - id: number; - - /** - * Gets whether the current window (app view) is adjacent to the right edge of the screen. - **/ - adjacentToRightDisplayEdge: boolean; - - /** - * Gets whether the current window (app view) is adjacent to the left edge of the screen. - **/ - adjacentToLeftDisplayEdge: number; - - /** - * Gets the title bar of the app. - **/ - titleBar: ApplicationViewTitleBar; - } + static tryUnsnap(): boolean; /** - * Defines the set of display orientation modes for a window (app view). + * Gets the state of the current app view. **/ + static value: Windows.UI.ViewManagement.ApplicationViewState; + + /** + * Indicates whether the app terminates when the last window is closed. + **/ + static terminateAppOnFinalViewClose: boolean; + + /** + * Gets the current orientation of the window (app view) with respect to the display. + **/ + orientation: ApplicationViewOrientation; + + /** + * Gets or sets the displayed title of the window. + **/ + title: string; + + /** + * Gets or sets whether screen capture is enabled for the window (app view). + **/ + isScreenCaptureEnabled: boolean; + + /** + * Gets whether the window (app view) is on the Windows lock screen. + **/ + isOnLockScreen: boolean; + + /** + * Gets whether the window(app view) is full screen or not. + **/ + isFullScreen: boolean; + + /** + * Gets the current ID of the window (app view) . + **/ + id: number; + + /** + * Gets whether the current window (app view) is adjacent to the right edge of the screen. + **/ + adjacentToRightDisplayEdge: boolean; + + /** + * Gets whether the current window (app view) is adjacent to the left edge of the screen. + **/ + adjacentToLeftDisplayEdge: number; + + /** + * Gets the title bar of the app. + **/ + titleBar: ApplicationViewTitleBar; + } + + /** + * Defines the set of display orientation modes for a window (app view). + **/ export enum ApplicationViewOrientation { landscape, portrait From 7f6c9bdbce542f3531022bb16a5753ef9331e58f Mon Sep 17 00:00:00 2001 From: Riron Date: Thu, 10 Mar 2016 16:54:23 +0100 Subject: [PATCH 0077/1506] Add createInstance() method Adds the missing createInstance() method: You can create multiple instances of localForage that point to different stores using createInstance. All the configuration options used by config are supported. ``` var store = localforage.createInstance({ name: "nameHere" }); var otherStore = localforage.createInstance({ name: "otherName" }); // Setting the key on one of these doesn't affect the other. store.setItem("key", "value"); otherStore.setItem("key", "value2"); ``` --- localForage/localForage.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/localForage/localForage.d.ts b/localForage/localForage.d.ts index d42012e5f2..be1803b308 100644 --- a/localForage/localForage.d.ts +++ b/localForage/localForage.d.ts @@ -86,6 +86,13 @@ interface LocalForage { iterate(iteratee: (value: any, key: string, iterationNumber: number) => any): Promise; iterate(iteratee: (value: any, key: string, iterationNumber: number) => any, callback: (err: any, result: any) => void): void; + + /** + * Create a new instance of localForage to point to a different store. + * All the configuration options used by config are supported. + * @param {LocalForageOptions} options + */ + createInstance(options: LocalForageOptions): LocalForage; } declare module "localforage" { From c2a803dacae48642c117fe358d8c1d929f4d1a0f Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Thu, 10 Mar 2016 17:19:16 +0100 Subject: [PATCH 0078/1506] Update connect-redis-tests.ts --- connect-redis/connect-redis-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connect-redis/connect-redis-tests.ts b/connect-redis/connect-redis-tests.ts index 2ad4d53bd5..abc14977ee 100644 --- a/connect-redis/connect-redis-tests.ts +++ b/connect-redis/connect-redis-tests.ts @@ -1,4 +1,4 @@ -/// +/// /// import * as connectRedis from "connect-redis"; From 5597d81a2dfa7a555e8af3d5bfd57357e902b916 Mon Sep 17 00:00:00 2001 From: RVassar Date: Sat, 12 Mar 2016 20:21:20 -0800 Subject: [PATCH 0079/1506] Not sure what the changes are here. Different line endings or something. --- angular-load/angular-load.d.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/angular-load/angular-load.d.ts b/angular-load/angular-load.d.ts index a35d1c59d8..65d5bc388a 100644 --- a/angular-load/angular-load.d.ts +++ b/angular-load/angular-load.d.ts @@ -1,15 +1,15 @@ -// Type definitions for angular-load v0.4.1 -// Project: https://github.com/urish/angular-load -// Definitions by: david-gang -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module angular.load { - - interface IAngularLoadService { - loadScript(url:string): ng.IPromise; - loadCss(url:string): ng.IPromise; - } - -} +// Type definitions for angular-load v0.4.1 +// Project: https://github.com/urish/angular-load +// Definitions by: david-gang +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.load { + + interface IAngularLoadService { + loadScript(url:string): ng.IPromise; + loadCss(url:string): ng.IPromise; + } + +} From 74f4692670283fd9a547469557079da38bb10084 Mon Sep 17 00:00:00 2001 From: Strato Date: Mon, 14 Mar 2016 00:27:55 +0100 Subject: [PATCH 0080/1506] Fixed what seems to be the problem with travis --- winrt/winrt.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winrt/winrt.d.ts b/winrt/winrt.d.ts index 5ce721b082..3d25a6469f 100644 --- a/winrt/winrt.d.ts +++ b/winrt/winrt.d.ts @@ -11348,7 +11348,7 @@ declare module Windows { preferredApplicationDisplayName: string; preferredApplicationPackageFamilyName: string; treatAsUntrusted: boolean; - UI: Windows.System.LauncherUIOptions; + uI: Windows.System.LauncherUIOptions; } export class LauncherOptions implements Windows.System.ILauncherOptions { From ff98d72f5ad685208b16dfa79cd063319fc1397e Mon Sep 17 00:00:00 2001 From: gael Magnan Date: Wed, 16 Mar 2016 13:58:12 +0100 Subject: [PATCH 0081/1506] Added new version of jwt-simple, now supports v 0.5.0 --- jwt-simple/jwt-simple-0.2.0-tests.ts | 12 ++++++++++++ jwt-simple/jwt-simple-0.2.0.d.ts | 22 ++++++++++++++++++++++ jwt-simple/jwt-simple.d.ts | 10 ++++++---- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 jwt-simple/jwt-simple-0.2.0-tests.ts create mode 100644 jwt-simple/jwt-simple-0.2.0.d.ts diff --git a/jwt-simple/jwt-simple-0.2.0-tests.ts b/jwt-simple/jwt-simple-0.2.0-tests.ts new file mode 100644 index 0000000000..8a0cc59c52 --- /dev/null +++ b/jwt-simple/jwt-simple-0.2.0-tests.ts @@ -0,0 +1,12 @@ +/// + +import jwt = require('jwt-simple'); +var payload = { foo: 'bar' }; +var secret:string = 'xxx'; + +// encode +var token = jwt.encode(payload, secret); + +// decode +var decoded = jwt.decode(token, secret); +console.log(decoded); //=> { foo: 'bar' } \ No newline at end of file diff --git a/jwt-simple/jwt-simple-0.2.0.d.ts b/jwt-simple/jwt-simple-0.2.0.d.ts new file mode 100644 index 0000000000..0ee3cc6799 --- /dev/null +++ b/jwt-simple/jwt-simple-0.2.0.d.ts @@ -0,0 +1,22 @@ +// Type definitions for jwt-simple v0.2.0 +// Project: https://github.com/hokaccha/node-jwt-simple +// Definitions by: Ken Fukuyama +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module "jwt-simple" { + /** + * Decode jwt + * @param token + * @param key + * @param noVerify + * @api public + */ + export function decode(token:any, key:string, noVerify?:boolean):any; + /** + * Encode jwt + * @param payload + * @param key + * @param algorithm default is HS256 + * @api public + */ + export function encode(payload:any, key:string, algorithm?:string):string; +} diff --git a/jwt-simple/jwt-simple.d.ts b/jwt-simple/jwt-simple.d.ts index 0ee3cc6799..4640f25e33 100644 --- a/jwt-simple/jwt-simple.d.ts +++ b/jwt-simple/jwt-simple.d.ts @@ -1,6 +1,6 @@ -// Type definitions for jwt-simple v0.2.0 +// Type definitions for jwt-simple v0.5.0 // Project: https://github.com/hokaccha/node-jwt-simple -// Definitions by: Ken Fukuyama +// Definitions by: Gael Magnan // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module "jwt-simple" { /** @@ -8,15 +8,17 @@ declare module "jwt-simple" { * @param token * @param key * @param noVerify + * @param algorithm default is HS256 * @api public */ - export function decode(token:any, key:string, noVerify?:boolean):any; + export function decode(token:any, key:string, noVerify?:boolean, algorithm?:string):any; /** * Encode jwt * @param payload * @param key * @param algorithm default is HS256 + * @param options * @api public */ - export function encode(payload:any, key:string, algorithm?:string):string; + export function encode(payload:any, key:string, algorithm?:string, options?:any):string; } From 8afd4a79f7a0c233817d479141c310ed0d8a7540 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 16 Mar 2016 12:56:54 -0700 Subject: [PATCH 0082/1506] Updated Fuse.js definition to 2.2.0 (partially) --- fuse/fuse.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fuse/fuse.d.ts b/fuse/fuse.d.ts index bf175bff6c..e180c652e0 100644 --- a/fuse/fuse.d.ts +++ b/fuse/fuse.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Fuse.js 1.1.5 +// Type definitions for Fuse.js 2.2.0 // Project: https://github.com/krisk/Fuse // Definitions by: Greg Smith // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -11,12 +11,13 @@ declare class Fuse { declare module fuse { interface IFuseOptions extends ISearchOptions { caseSensitive?: boolean; - includeScore?: boolean; + include?: string[]; shouldSort?: boolean; searchFn?: any; sortFn?: (a: {score: number}, b: {score: number}) => number; getFn?: (obj: any, path: string) => any; - keys?: string[]; + keys?: string[] | { name:string; weight:number} []; + verbose?:boolean; } interface ISearchOptions { From 96ea748284dd67f821642362216c6d336d173207 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Fri, 18 Mar 2016 12:56:29 +0100 Subject: [PATCH 0083/1506] HammerJS: Creating an instance of Hammer returns an object, which is not a function. So calling "new" on it doesn't make sense. --- hammerjs/hammerjs.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/hammerjs/hammerjs.d.ts b/hammerjs/hammerjs.d.ts index e2d4a8c528..4125987d64 100644 --- a/hammerjs/hammerjs.d.ts +++ b/hammerjs/hammerjs.d.ts @@ -97,8 +97,6 @@ interface HammerOptions extends HammerDefaults interface HammerManager { - new( element:HTMLElement, options?:any ):HammerManager; - add( recogniser:Recognizer ):Recognizer; add( recogniser:Recognizer ):HammerManager; add( recogniser:Recognizer[] ):Recognizer; From 60ddc18a594f87b9c8d36860c3ff239836211ed6 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Fri, 18 Mar 2016 14:01:19 +0100 Subject: [PATCH 0084/1506] HammerJS: Added the HammerManagerConstructor interface, and used it where it should. --- hammerjs/hammerjs.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hammerjs/hammerjs.d.ts b/hammerjs/hammerjs.d.ts index 4125987d64..d4ea189dd8 100644 --- a/hammerjs/hammerjs.d.ts +++ b/hammerjs/hammerjs.d.ts @@ -39,7 +39,7 @@ interface HammerStatic DIRECTION_VERTICAL: number; DIRECTION_ALL: number; - Manager: HammerManager; + Manager: HammerManagerConstructor; Input: HammerInput; TouchAction: TouchAction; @@ -95,6 +95,10 @@ interface HammerOptions extends HammerDefaults } +interface HammerManagerConstructor { + new( element:HTMLElement, options?:any ):HammerManager; +} + interface HammerManager { add( recogniser:Recognizer ):Recognizer; From 03f28267c52a54f285d3d2a0ee8d7d6e6cb57e1a Mon Sep 17 00:00:00 2001 From: James Moey Date: Tue, 22 Mar 2016 13:58:57 +1100 Subject: [PATCH 0085/1506] Update rabbit.js definition. --- rabbit.js/rabbit.js.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rabbit.js/rabbit.js.d.ts b/rabbit.js/rabbit.js.d.ts index 7e09cfe14a..a6ac4e5c7f 100644 --- a/rabbit.js/rabbit.js.d.ts +++ b/rabbit.js/rabbit.js.d.ts @@ -22,6 +22,7 @@ declare module "rabbit.js" { persistent?: any; topic?: any; task?: any; + routing?: any; } export interface Socket { @@ -43,6 +44,7 @@ declare module "rabbit.js" { export class SubSocket extends stream.Readable implements Socket { constructor(channel: string, opts: SocketOptions); connect(source: string, callback?: Function): any; + connect(source: string, topic?: string, callback?: Function): any; setsockopt(opt: string, value: string): any; close(): any; } From dd12757cc7b16ff579f43ba3cb0e8858977d771f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20P=C3=A9rez?= Date: Tue, 22 Mar 2016 19:21:22 +0100 Subject: [PATCH 0086/1506] missing elementValue(Element) method, meant to return the value in which to apply the constraints out of the Element --- jquery.validation/jquery.validation.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jquery.validation/jquery.validation.d.ts b/jquery.validation/jquery.validation.d.ts index 7527652e80..1225db783d 100644 --- a/jquery.validation/jquery.validation.d.ts +++ b/jquery.validation/jquery.validation.d.ts @@ -213,6 +213,8 @@ declare namespace JQueryValidation * Validates the form, returns true if it is valid, false otherwise. */ form(): boolean; + + elementValue(element: Element): any; invalidElements(): HTMLElement[]; From d59d5bdea31295ff74ce32929da80246a5749580 Mon Sep 17 00:00:00 2001 From: Lou Godmer Date: Wed, 23 Mar 2016 14:23:07 -0700 Subject: [PATCH 0087/1506] update trackRequestSync api that is added in applicationinsights version 0.15.13 --- applicationinsights/applicationinsights.d.ts | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/applicationinsights/applicationinsights.d.ts b/applicationinsights/applicationinsights.d.ts index 17ca4a479f..96d5773fa5 100644 --- a/applicationinsights/applicationinsights.d.ts +++ b/applicationinsights/applicationinsights.d.ts @@ -341,9 +341,31 @@ interface Client { trackMetric(name: string, value: number, count?:number, min?: number, max?: number, stdDev?: number, properties?: { [key: string]: string; }): void; + + /** + * Log an incoming http request to your server. The request data will be tracked during the response "finish" event if it is successful or the request "error" + * event if it fails. The request duration is automatically calculated as the timespan between when the trackRequest method was called, and when the response "finish" + * or request "error" events were fired. + * @param request The http.ServerRequest object to track + * @param response The http.ServerResponse object for this request + * @param properties map[string, string] - additional data used to filter requests in the portal. Defaults to empty. + */ trackRequest(request: any /* http.ServerRequest */, response: any /* http.ServerResponse */, properties?: { [key: string]: string; }): void; + + /** + * Log an incoming http request to your server. The request data is tracked synchronously rather than waiting for the response "finish"" or request "error"" events. + * Use this if you need your request telemetry to respect custom app insights operation and user context (for example if you set any appInsights.client.context.tags). + * @param request The http.ServerRequest object to track + * @param response The http.ServerResponse object for this request + * @param ellapsedMilliseconds The duration for this request. Defaults to 0. + * @param properties map[string, string] - additional data used to filter requests in the portal. Defaults to empty. + * @param error An error that was returned for this request if it was unsuccessful. Defaults to null. + */ + trackRequestSync(request: any /*http.ServerRequest */, response: any /*http.ServerResponse */, ellapsedMilliseconds?: number, properties?: { + [key: string]: string;}, error?: any) : void; + /** * Log information about a dependency of your app. Typically used to track the time database calls or outgoing http requests take from your server. * @param name The name of the dependency (i.e. "myDatabse") From c9ad975e6cc4d5ff7911eafde95365097cc12e55 Mon Sep 17 00:00:00 2001 From: aaronbeall Date: Thu, 24 Mar 2016 11:13:39 -0400 Subject: [PATCH 0088/1506] BaseEvent extend DOM Event to support addEventListener --- sockjs-client/sockjs-client.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sockjs-client/sockjs-client.d.ts b/sockjs-client/sockjs-client.d.ts index 322f821393..0bc7bed08a 100644 --- a/sockjs-client/sockjs-client.d.ts +++ b/sockjs-client/sockjs-client.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped declare namespace __SockJSClient { - interface BaseEvent { + interface BaseEvent extends Event { type: string; } From 3a4bdab25ba029be91c671276e1661512cb37b65 Mon Sep 17 00:00:00 2001 From: Eugen Podaru Date: Fri, 25 Mar 2016 13:45:32 +0100 Subject: [PATCH 0089/1506] support AMD require / ES6 import --- text-encoding/text-encoding.d.ts | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/text-encoding/text-encoding.d.ts b/text-encoding/text-encoding.d.ts index 1442ef2a30..08536c5981 100644 --- a/text-encoding/text-encoding.d.ts +++ b/text-encoding/text-encoding.d.ts @@ -32,14 +32,29 @@ declare namespace TextEncoding { interface TextEncodeOptions { stream?: boolean; } + + interface TextEncoderStatic { + (utfLabel?: string, options?: TextEncoderOptions): TextEncoder; + new (utfLabel?: string, options?: TextEncoderOptions): TextEncoder; + } + + interface TextDecoderStatic { + (label?: string, options?: TextDecoderOptions): TextDecoder; + new (label?: string, options?: TextDecoderOptions): TextDecoder; + } + + interface TextEncodingStatic { + TextEncoder: TextEncoderStatic; + TextDecoder: TextDecoderStatic; + } } -declare var TextDecoder: { - (label?: string, options?: TextEncoding.TextDecoderOptions): TextEncoding.TextDecoder; - new (label?: string, options?: TextEncoding.TextDecoderOptions): TextEncoding.TextDecoder; -}; +declare var TextDecoder: TextEncoding.TextDecoderStatic; -declare var TextEncoder: { - (utfLabel?: string, options?: TextEncoding.TextEncoderOptions): TextEncoding.TextEncoder; - new (utfLabel?: string, options?: TextEncoding.TextEncoderOptions): TextEncoding.TextEncoder; -}; +declare var TextEncoder: TextEncoding.TextEncoderStatic; + +declare var TextEncoding: TextEncoding.TextEncodingStatic; + +declare module "text-encoding" { + export = TextEncoding; +} From 7c5dbff213cb8a7f27200b1fa03af82b2c649c23 Mon Sep 17 00:00:00 2001 From: Justin Bay Date: Mon, 28 Mar 2016 13:55:13 -0400 Subject: [PATCH 0090/1506] TransitionGroup spreads HTMLAttribute props onto its component --- react/react-addons-transition-group.d.ts | 2 +- react/react-tests.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/react/react-addons-transition-group.d.ts b/react/react-addons-transition-group.d.ts index ca7bb4c31e..b31d7a5d2d 100644 --- a/react/react-addons-transition-group.d.ts +++ b/react/react-addons-transition-group.d.ts @@ -7,7 +7,7 @@ declare namespace __React { - interface TransitionGroupProps { + interface TransitionGroupProps extends HTMLAttributes { component?: ReactType; childFactory?: (child: ReactElement) => ReactElement; } diff --git a/react/react-tests.ts b/react/react-tests.ts index e0d9bb7be7..ca289ebda5 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -480,7 +480,9 @@ React.createFactory(CSSTransitionGroup)({ transitionName: "transition", transitionAppear: false, transitionEnter: true, - transitionLeave: true + transitionLeave: true, + id: "some-id", + className: "some-class" }); React.createFactory(CSSTransitionGroup)({ From 81f194ff4468b34b2795e89fcf2a4fe9ad570e0a Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Wed, 30 Mar 2016 18:04:01 +1100 Subject: [PATCH 0091/1506] Update comments to suite revalidator versions. --- revalidator/revalidator.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index aaf38ba78f..b41e7cd03e 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -1,7 +1,7 @@ -// Type definitions for axios 0.5.2 +// Type definitions for revalidator 0.3.1 // Definitions by: Jason Turner -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Revalidator { interface RevalidatorStatic { From eee669cc9cca1e1fc0f51c70bc17926610fc551e Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:25:48 +0900 Subject: [PATCH 0092/1506] Correct return values --- stacktrace-js/stacktrace-js.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index aebd6ddf80..045cf70104 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -49,18 +49,20 @@ declare namespace StackTrace { * * @param {Function} fn to be instrumented * @param {Function} callback function to call with a stack trace on invocation - * @param {Function} errorCallback optional function to call with error if unable to get stack trace. + * @param {Function} errback optional function to call with error if unable to get stack trace. * @param {Object} thisArg optional context object (e.g. window) + * @return {Function} instrumented function */ - export function instrument(fn:() => void, callback:(stackFrames:StackFrame[]) => void, errorCallback:(error:Error) => void, thisArg?:any): void; + export function instrument(fn: TFunc, callback: (stackFrames:StackFrame[]) => void, errback?: (error: Error) => void, thisArg?: any): TFunc; /** * Given a function that has been instrumented, * revert the function to it's original (non-instrumented) state. * * @param fn {Function} + * @return {Function} original function */ - export function deinstrument(fn:() => void): void; + export function deinstrument(fn: TFunc): TFunc; /** * Given an Array of StackFrames, serialize and POST to given URL. From ee10fc38b1acd26ec5f9f484ab11fe2eac1ebc61 Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:28:23 +0900 Subject: [PATCH 0093/1506] Correct return values --- stacktrace-js/stacktrace-js.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index 045cf70104..1bb55aa5a7 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -69,7 +69,7 @@ declare namespace StackTrace { * * @param stackframes - Array[StackFrame] * @param url - URL as String - * @return Promise + * @return Promise */ - export function report(stackframes: StackFrame[], url: string): Promise; + export function report(stackframes: StackFrame[], url: string): Promise; } From 371b6dfbf352740dd931d4b5ff95a24886074db5 Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:28:44 +0900 Subject: [PATCH 0094/1506] Define stacktrace-js module --- stacktrace-js/stacktrace-js.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index 1bb55aa5a7..c4ed865400 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -73,3 +73,7 @@ declare namespace StackTrace { */ export function report(stackframes: StackFrame[], url: string): Promise; } + +declare module "stacktrace-js" { + export = StackTrace; +} From e42a58381c705d7670176dbc0fac7728c5b3a681 Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:31:00 +0900 Subject: [PATCH 0095/1506] Correct definition for options --- stacktrace-js/stacktrace-js.d.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index c4ed865400..7bf7570fec 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -4,10 +4,21 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace StackTrace { + + export interface SourceCache { + [key: string]: string | Promise; + } + + /** + * Options for StackTrace + * @param filter Function(StackFrame => Boolean) - Only include stack entries matching for which filter returns true + * @param sourceCache Object (String URL => String Source) - Pre-populate source cache to avoid network requests + * @param offline Boolean (default: false) - Set to true to prevent all network requests + */ export interface StackTraceOptions { - filter?: (stackFrame:StackFrame) => boolean; - sourceCache?: { URL:string }; - offline?: boolean; + filter?: (stackFrame: StackFrame) => boolean; + sourceCache?: SourceCache; + offline?: boolean; } export interface StackFrame { From 48f9ebd33917a18720ce81cc2a90938b313e5f8f Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:31:23 +0900 Subject: [PATCH 0096/1506] Add methods for StackFrame --- stacktrace-js/stacktrace-js.d.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index 7bf7570fec..a682189c09 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -22,14 +22,17 @@ declare namespace StackTrace { } export interface StackFrame { - constructor(functionName:string, args:any, fileName:string, lineNumber:number, columnNumber:number): StackFrame; + constructor(functionName: string, args: any, fileName: string, lineNumber: number, columnNumber: number): StackFrame; - functionName?:string; - args?:any; - fileName?:string; - lineNumber?:number; - columnNumber?:number; - toString():string; + functionName: string; + args: any; + fileName: string; + lineNumber: number; + columnNumber: number; + source: string; + isEval: boolean; + isNative: boolean; + toString(): string; } /** From 6d023860d1253397311d708bce3df48d11b4ab2f Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:31:36 +0900 Subject: [PATCH 0097/1506] Fix typo --- stacktrace-js/stacktrace-js.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index a682189c09..bc9571eb5a 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -48,7 +48,7 @@ declare namespace StackTrace { * @param options Object for options * @return Array[StackFrame] */ - export function fromError(error:Error, options?:StackTraceOptions): Promise; + export function fromError(error: Error, options?: StackTraceOptions): Promise; /** * Use StackGenerator to generate a backtrace. From b4542d0d5fc8bd5e8595084cacb08c651b7e8d9a Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:32:18 +0900 Subject: [PATCH 0098/1506] Add further tests --- stacktrace-js/stacktrace-js-tests.ts | 36 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/stacktrace-js/stacktrace-js-tests.ts b/stacktrace-js/stacktrace-js-tests.ts index c4c9bcf879..04f92f7d2d 100644 --- a/stacktrace-js/stacktrace-js-tests.ts +++ b/stacktrace-js/stacktrace-js-tests.ts @@ -1,24 +1,36 @@ /// -function interestingFn() { +function interestingFn(): string { return 'https://github.com/exceptionless/Exceptionless'; } -var callback = function(stackframes:StackTrace.StackFrame[]) { - var stringifiedStack = stackframes.map(function(sf:StackTrace.StackFrame) { +const callback = (stackframes: StackTrace.StackFrame[]) => { + const stringifiedStack = stackframes.map((sf: StackTrace.StackFrame): string => { + console.log(sf.functionName); + console.log(sf.args); + console.log(sf.fileName); + console.log(sf.lineNumber); + console.log(sf.columnNumber); + console.log(sf.source); + console.log(sf.isEval); + console.log(sf.isNative); return sf.toString(); }).join('\n'); console.log(stringifiedStack); }; -var errorCallback = function(err:Error) { console.log(err.message); }; +const errorCallback = (err: Error) => console.log(err.message); +const logger = (stackframes: StackTrace.StackFrame[]) => console.log(stackframes); +const options: StackTrace.StackTraceOptions = { + filter: (stackframe: StackTrace.StackFrame) => true, + sourceCache: {}, + offline: false +}; +const error = new Error('BOOM!'); -StackTrace.get(); +StackTrace.get(options).then(logger); +StackTrace.fromError(error, options).then(logger); +StackTrace.generateArtificially(options).then(logger); -// Somewhere else... -var error = new Error('BOOM!'); -StackTrace.fromError(error); -StackTrace.generateArtificially(); - -StackTrace.instrument(interestingFn, callback, errorCallback); -StackTrace.deinstrument(interestingFn); +const instrumented: () => string = StackTrace.instrument(interestingFn, callback, errorCallback); +const original: () => string = StackTrace.deinstrument(interestingFn); From f9104f1e24c58134b99e03f3e28d71d1ca50fce4 Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:40:48 +0900 Subject: [PATCH 0099/1506] Fix typo --- stacktrace-js/stacktrace-js.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index bc9571eb5a..4f0bac1635 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -67,7 +67,7 @@ declare namespace StackTrace { * @param {Object} thisArg optional context object (e.g. window) * @return {Function} instrumented function */ - export function instrument(fn: TFunc, callback: (stackFrames:StackFrame[]) => void, errback?: (error: Error) => void, thisArg?: any): TFunc; + export function instrument(fn: TFunc, callback: (stackFrames: StackFrame[]) => void, errback?: (error: Error) => void, thisArg?: any): TFunc; /** * Given a function that has been instrumented, From 6324ded3309992b0205fe585f73eaac38eb97b07 Mon Sep 17 00:00:00 2001 From: Gael Magnan de bornier Date: Fri, 1 Apr 2016 11:52:15 +0200 Subject: [PATCH 0100/1506] Update jwt-simple.d.ts --- jwt-simple/jwt-simple.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwt-simple/jwt-simple.d.ts b/jwt-simple/jwt-simple.d.ts index 54e41c360e..ea78b13e88 100644 --- a/jwt-simple/jwt-simple.d.ts +++ b/jwt-simple/jwt-simple.d.ts @@ -1,6 +1,6 @@ // Type definitions for jwt-simple v0.5.0 // Project: https://github.com/hokaccha/node-jwt-simple -// Definitions by: Gael Magnan +// Definitions by: Ken Fukuyama , Gael Magnan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "jwt-simple" { /** From a9a77535de002706e1f1106391f1c3df15896dac Mon Sep 17 00:00:00 2001 From: CheCoxshall Date: Fri, 1 Apr 2016 21:41:56 +0100 Subject: [PATCH 0101/1506] Added type definitions for bootstrap-fileinput --- bootstrap-fileinput/bootstrap-fileinput.d.ts | 1029 ++++++++++++++++++ 1 file changed, 1029 insertions(+) create mode 100644 bootstrap-fileinput/bootstrap-fileinput.d.ts diff --git a/bootstrap-fileinput/bootstrap-fileinput.d.ts b/bootstrap-fileinput/bootstrap-fileinput.d.ts new file mode 100644 index 0000000000..e517ae8d75 --- /dev/null +++ b/bootstrap-fileinput/bootstrap-fileinput.d.ts @@ -0,0 +1,1029 @@ +interface JQuery { + fileinput: (options?: FileInputOptions) => JQuery; +} + +interface FileInputOptions { + /** + Language configuration for the plugin to enable the plugin to display messages for your locale (you must set the ISO code for the language). + You can have multiple language widgets on the same page. + The locale JS file for the language code must be defined as mentioned in the translations section: http://plugins.krajee.com/file-input#translations + */ + language?: string; + /** + Whether to display the file caption. + Defaults to true. + */ + showCaption?: boolean; + /** + Whether to display the file preview. + Defaults to true. + */ + showPreview?: boolean; + /** + Whether to display the file remove/clear button. + Defaults to true. + */ + showRemove?: boolean; + /** + Whether to display the file upload button. + Defaults to true. + This will default to a form submit button, unless the uploadUrl is specified. + */ + showUpload?: boolean; + /** + Whether to display the file upload cancel button. + Defaults to true. + This will be only enabled and displayed when an AJAX upload is in process. + */ + showCancel?: boolean; + /** + Whether to display the close icon in the preview. + Defaults to true. + This will be only parsed when showPreview is true or when you are using the {close} tag in your preview templates. + */ + showClose?: boolean; + /** + Whether to persist display of the uploaded file thumbnails in the preview window (for ajax uploads) until the remove/clear button is pressed. + Defaults to true. + When set to false, a next batch of files selected for upload will clear these thumbnails from preview. + */ + showUploadedThumbs?: boolean; + /** + Whether to automatically replace the files in the preview after the maxFileCount limit is reached and a new set of file(s) is/are selected. + This will only work if a valid maxFileCount is set. + Defaults to false. + */ + autoReplace?: boolean; + /** + Any additional CSS class to append to the caption container. + */ + captionClass?: string; + /** + Any additional CSS class to append to the preview container. + */ + previewClass?: string; + /** + Any additional CSS class to append to the main plugin container. + */ + mainClass?: string; + /** + The initial preview content to be displayed. + You can pass the minimal HTML markup for displaying your image, text, or file. + If set as a string, this will display a single file in the initial preview if there is no delimiter. You can set a delimiter (as defined in initialDelimiter) to show multiple files in initial preview. + If set as an array, it will display all files in the array as an initial preview (useful for multiple file upload scenarios). + The following CSS classes will need to be added for displaying each file type as per the plugin style theme: + image files: Include CSS class file-preview-image + text files: Include CSS class file-preview-text + other files: Include CSS class file-preview-other + */ + initialPreview?: string | any[]; + /** + the count of initial preview items that will be added to the count of files selected in preview. This is applicable when displaying the right caption, when overwriteInitial is set to false. + */ + initialPreviewCount?: number; + /** + the delimiter to be used for splitting the initial preview content as individual file thumbnails (applicable only if initialPreview is passed as a string instead of array). Defaults to *$$*. + */ + initialPreviewDelimiter?: string; + /** + the configuration for setting up important properties for each initialPreview item (that is setup as part of initialPreview). + */ + initialPreviewConfig?: IFileUploadPreviewConfig[]; + /** + whether the delete button will be displayed for each thumbnail that has been created with initialPreview. + */ + initialPreviewShowDelete?: boolean; + /** + whether the file thumbnail should be removed from preview on error. Defaults to false. + */ + removeFromPreviewOnError?: boolean; + /** + this will be a list of tags used in thumbnail templates that will be replaced dynamically within the thumbnail markup, when the thumbnail is rendered. + */ + previewThumbTags?: { [key: string]: string; } + /** + this is an extension of previewThumbTags specifically for initial preview content - but will be configured as an array of objects corresponding to each initial preview thumbnail. The initial preview thumbnails set via initialPreview will read this configuration for replacing tags. + */ + initialPreviewThumbTags?: { [key: string]: string; } + /** + the extra data that will be passed as data to the initial preview delete url/AJAX server call via POST. + This will be overridden by the initialPreviewConfig['extra'] property. + This property is only applicable for ajax deletions in initial preview and when you have set a value for initialPreviewConfig['url'] or deleteUrl. + This can be setup either as an object (associative array of keys and values) or as a function callback. + Note + The ajax delete action will send the following data to server via POST: + key: the key setting as setup in initialPreviewConfig['key'] + any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. + */ + deleteExtraData?: {} | { (): {} }; + /** + the URL for deleting the image/content in the initial preview via AJAX post response. This will be overridden by the initialPreviewConfig['url'] property. + Note + The ajax delete action will send the following data to server via POST: + key: the key setting as setup in initialPreviewConfig['key'] + any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. + */ + deleteUrl?: string; + /** + the initial preview caption text to be displayed. + If you do not set a value here and initialPreview is set to true this will default to "{preview-file-count} files selected", where {preview-file-count} is the count of the files passed in initialPreview. + */ + initialCaption?: string; + /** + whether you wish to overwrite the initial preview content and caption setup. + This defaults to true, whereby, any initialPreview content set will be overwritten, when new file is uploaded or when files are cleared. + Setting it to false will help displaying a saved image or file from database always - useful especially when using the multiple file upload feature. + */ + overwriteInitial?: boolean; + /** + the templates configuration for rendering each part of the layout. + */ + layoutTemplates?: IFileUploadLayoutTemplates; + /** + the templates configuration for rendering each preview file type. + */ + previewTemplates?: IFileUploadPreviewTemplates; + /** + the list of allowed file types for upload. + This by default is set to null which means the plugin supports all file types for upload. + If an invalid file type is found, then a validation error message as set in msgInvalidFileType will be raised. + Note: + You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). + */ + allowedFileTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; + /** + the list of allowed file extensions for upload. + This by default is set to null which means the plugin supports all file extensions for upload. + If an invalid file extension is found, then a validation error message as set in msgInvalidFileExtension will be raised. + Note: + You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). + */ + allowedFileExtensions?: string[]; + /** + the list of allowed preview types for your widget. + This by default supports all file types for preview. + The plugin by default treats each file as an object if it does not match any of the previous types. + To disable this behavior, you can remove object from the list of allowedPreviewTypes OR fine tune it through allowedPreviewMimeTypes. + To disable content preview for all file-types and show the previewIcon instead as a thumbnail, set this to null, empty, or false. + */ + allowedPreviewTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; + /** + the list of allowed mime types for preview. + This is set to null by default which means all possible mime types are allowed. + This setting works in combination with allowedPreviewTypes to filter only the needed file types allowed for preview. + */ + allowedPreviewMimeTypes?: string[]; + /** + the default content / markup to show by default in the preview window whenever the files are cleared or the input is cleared. + This can be useful for use cases like showing the default user profile picture or profile image before upload to overwrite. + This is a bit different from initialPreview in the sense, that the initialPreview content will always be displayed unless it is deleted or overwritten based on overwriteInitial. + The defaultPreviewContent on the other hand will only be shown ONLY on initialization OR whenever you clear the preview. + At other times when files have been selected this will be overwritten temporarily until file(s) selected is/are cleared. + This property can be useful to display for example a default user profile picture (or saved picture) in the preview window unless the user selects a picture. + */ + defaultPreviewContent?: string; + /** + the list of additional custom tags that will be replaced in the layout templates. + */ + customLayoutTags?: {}; + /** + the list of additional custom tags that will be replaced in the preview templates. + */ + customPreviewTags?: {}; + /** + the format settings (width and height) for rendering each preview file type. + */ + previewSettings?: IFileUploadPreviewSettings; + /** + the settings to validate and identify each file type when a file is selected for upload. + This is a list of callbacks, which accepts the file mime type and file name as a parameter. + */ + fileTypeSettings?: IFileUploadFileTypeSettings; + /** + the icon to be shown in each preview file thumbnail when an unreadable file type for preview is detected. Defaults to  . + */ + previewFileIcon?: string; + /** + the CSS class to be applied to the preview file icon container. Defaults to file-icon-4x. + */ + previewFileIconClass?: string; + /** + the preview icon markup settings for each file extension (type). + You need to set this as key: value pairs, where the key corresponds to a file extension (e.g. doc, docx, xls etc.), and the value corresponds to the markup of the icon to be rendered. + If this is not set OR a file extension is not set here, the preview will default to previewFileIcon. + Note that displaying the icons instead of file content is controlled via allowedPreviewTypes and allowedPreviewMimeTypes + */ + previewFileIconSettings?: IFileUploadPreviewFileIconSettings; + /** + the extensions to be auto derived for each file extension (type). + This is useful if you want to set the same icon for multiple file extension types. + You need to set this as `key: value` pairs, where the key corresponds to a file extension as set in previewFileIconSettings (e.g. doc, docx, xls etc.). + The value will be a function callback that accepts the following parameter: + ext: string, the file extension (without the . [dot]) of the file currently selected in the preview. + You can configure the callback to match the set of file extensions (via regex or similar) for each `key` and return a boolean output if the file extension matches. + */ + previewFileExtSettings?: IFileUploadPreviewFileExtSettings; + /** + the CSS class for the each of the button labels for browse, remove, upload, and cancel. + Defaults to hidden-xs, which automatically hides the button labels for small screen devices and renders as smaller iconic buttons to fit to the screen. + */ + buttonLabelClass?: string; + /** + the label to display for the file picker/browse button. Defaults to Browse …. + */ + browseLabel?: string; + /** + the icon to display before the label for the file picker/browse button. Defaults to  . + */ + browseIcon?: string; + /** + the CSS class for the file picker/browse button. Defaults to btn btn-primary. + */ + browseClass?: string; + /** + the label to display for the file remove button. Defaults to Remove. + */ + removeLabel?: string; + /** + the icon to display before the label for the file picker/remove button. Defaults to  . + */ + removeIcon?: string; + /** + the CSS class for the file remove button. Defaults to btn btn-default. + */ + removeClass?: string; + /** + the title to display on hover for the file remove button. Defaults to Clear selected files. + */ + removeTitle?: string; + /** + the label to display for the file upload button. Defaults to Upload. + */ + uploadLabel?: string; + /** + the icon to display before the label for the file upload button. Defaults to  . + */ + uploadIcon?: string; + /** + the CSS class for the file upload button. Defaults to btn btn-default. + */ + uploadClass?: string; + /** + the title to display on hover for the file remove button. + Defaults to Upload selected files. + */ + uploadTitle?: string; + /** + the URL for the upload processing action (typically for ajax based processing). + Defaults to null. + If this is not set or null, then the upload button action will default to form submission. + NOTE: + This is MANDATORY if you want to use advanced features like drag & drop, append/remove files, selectively upload files via ajax etc. + The plugin automatically send $_FILES data to the server with the input `name` attribute as the key if provided. + If input name is not set, the key defaults to file-data. + */ + uploadUrl?: string; + /** + whether the batch upload of multiple files will be asynchronous/in parallel. + Defaults to true. + */ + uploadAsync?: boolean; + /** + the extra data that will be passed as data to the url/AJAX server call via POST. + This property is only applicable for ajax uploads and when you have set a value for uploadUrl. + This can be setup either as an object (associative array of keys and values) or as a function callback. + As an object, it can be set for example as: + { id: 100, value: '100 Details' } + Note that for uploading individual file via thumbnail, the function callback can also receive the thumbnail previewId and index as parameters. These are described below: + previewId: the identifier for the preview file container (only available when uploading each thumbnail file) + index: the zero-based sequential index of the loaded file in the preview list (only available when uploading each thumbnail file) + */ + uploadExtraData?: {} | ((previewId?: string, index?: number) => {}); + /** + the minimum allowed image height in px if you are uploading image files. + Defaults to null which means no limit on image height. + */ + minImageHeight?: number; + /** + the maximum allowed image width in px if you are uploading image files. + Defaults to null which means no limit on image width. + Note that if you set resizeImage property to true, then the entire image will be resized within this width (depending on resizePreference). + */ + maxImageWidth?: number; + /** + the maximum allowed image height in px if you are uploading image files. + Defaults to null which means no limit on image height. + Note that if you set resizeImage property to true, then the entire image will be resized within this height (depending on resizePreference). + */ + maxImageHeight?: number; + /** + whether to add ability to resize uploaded images. Defaults to false. + Note that resizing images requires HTML5 canvas support which is supported on most modern browsers. + In addition, you must include the JavaScript-Canvas-to-Blob plugin by blueimp by including canvas-to-blob.js in your application. + This JS file must be loaded before fileinput.js on the page. + The JavaScript-Canvas-to-Blob source files are available in js/plugins folder of bootstrap-fileinput project page. + The canvas-to-blob.js plugin is a polyfill for canvas.toBlob method and is needed for allowing the resized image files via HTML5 canvas to be returned as a blob + */ + resizeImage?: boolean; + /** + preference to resize the image based on width or height. + Defaults to width. + This property is parsed only when resizeImage is true. + If set to width, the maxImageWidth property is first tested and if image size is greater than this, then the image is resized to maxImageWidth. + The image height is resized and adjusted in the same ratio as width. + In case, the image width is already less than maxImageWidth then the maxImageHeight property is used to resize and width is adjusted in same ratio. + This will behave conversely, when resizePreference is set to height - the maxImageHeight will be first tested against image height and then the rest of steps will be similarly parsed with preference given to height instead of width as before. + */ + resizePreference?: "width" | "height"; + /** + the quality of the resized image. This must be a decimal number between 0.00 to 1.00. + Defaults to 0.92. + */ + resizeImageQuality?: number; + /** + the default image mime type of the converted image after resize. + Defaults to image/jpeg. + */ + resizeDefaultImageType?: string; + /** + the maximum file size for upload in KB. + If set to 0, it means size allowed is unlimited. + Defaults to 0. + */ + maxFileSize?: number; + /** + the minimum number of files allowed for each multiple upload. + If set to 0, it means number of files are optional. + Defaults to 0. + */ + minFileCount?: number; + /** + the maximum number of files allowed for each multiple upload. + If set to 0, it means number of files allowed is unlimited. + Defaults to 0. + */ + maxFileCount?: number; + /** + whether to include initial preview file count (server uploaded files) in validating minFileCount and maxFileCount. + Defaults to false. + */ + validateInitialCount?: boolean; + /** + the message that will be displayed when ZERO files are found. + Defaults to No. + */ + msgNo?: string; + /** + the message that will be displayed within the progress bar when file upload is aborted or cancelled. + Defaults to Cancelled. + */ + msgCancelled?: string; + /** + the title displayed (before the file name) on hover of the zoom button for zooming the file content in a modal window. + This is currently applicable only for text file previews. + Defaults to View details. + */ + msgZoomTitle?: string; + /** + the heading of the modal dialog that displays the zoomed file content. + This is currently applicable only for text file previews. + Defaults to Detailed Preview. + */ + msgZoomModalHeading?: string; + /** + the message to be displayed when the file size exceeds maximum size. + Defaults to: + File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB. Please retry your upload! + where: + {name}: will be replaced by the file name being uploaded + {size}: will be replaced by the uploaded file size + {maxSize}: will be replaced by the maxFileSize parameter. + */ + msgSizeTooLarge?: string; + /** + message to be displayed when the file count is less than the minimum count as set in minFileCount. + Defaults to: + You must select at least {n} {files} to upload. Please retry your upload! + where: + {n}: will be replaced by the allowed minimum files as set in minFileCount. + {files}: will be replaced with fileSingle or filePlural properties in locale file depending on the minFileCount. + */ + msgFilesTooLess?: string; + /** + the message to be displayed when the file count exceeds maximum count as set in maxFileCount. + Defaults to: + Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}. Please retry your upload! + where: + {n}: will be replaced by number of files selected for upload + {m}: will be replaced by the allowed maximum files as set in maxFileCount + */ + msgFilesTooMany?: string; + /** + the exception message to be displayed when the file selected is not found by the FileReader. + Defaults to: + File "{name}" not found! + where: + {name}: will be replaced by the file name being uploaded + */ + msgFileNotFound?: string; + /** + the exception message to be displayed when the file selected is not allowed to be accessed due to a security exception. + Defaults to: + Security restrictions prevent reading the file "{name}". + where: + {name}: will be replaced by the file name being uploaded + */ + msgFileSecured?: string; + /** + the exception message to be displayed when the file selected is not readable by the FileReader API. + Defaults to: + File "{name}" is not readable. + where: + {name}: will be replaced by the file name being uploaded + */ + msgFileNotReadable?: string; + /** + the exception message to be displayed when the file preview upload is aborted. + Defaults to: + File preview aborted for "{name}". + where: + {name}: will be replaced by the file name being uploaded + */ + msgFilePreviewAborted?: string; + /** + the exception message to be displayed for any other error when previewing the file. + Defaults to: + An error occurred while reading the file "{name}". + where: + {name}: will be replaced by the file name being uploaded + */ + msgFilePreviewError?: string; + /** + the message to be displayed when the file type is not in one of the file types set in allowedFileTypes. + Defaults to: + Invalid type for file "{name}". Only "{types}" files are supported. + where: + {name}: will be replaced by the file name being uploaded + {types}: will be replaced by the comma separated list of types defined in allowedFileTypes. + */ + msgInvalidFileType?: string; + /** + the message to be displayed when the file type is not in one of the file extensions set in allowedFileExtensions. + Defaults to: + Invalid extension for file "{name}". Only "{extensions}" files are supported. + where: + {name}: will be replaced by the file name being uploaded + {extensions}: will be replaced by the comma separated list of extensions defined in allowedFileExtensions. + */ + msgInvalidFileExtension?: string; + /** + the message to be displayed when an ongoing ajax file upload is aborted by pressing the Cancel button. + Defaults to The file upload was aborted. + If this is set to null or empty, the internal ajax error message will be displayed - Defaults to File Upload Error. + */ + msgUploadAborted?: string; + /** + the exception message to be displayed within the caption container (instead of msgFilesSelected), when a validation error is encountered. + Defaults to File Upload Error. + */ + msgValidationError?: string; + /** + the css class for the validation error message displayed in the caption container. + Defaults to text-danger. + */ + msgValidationErrorClass?: string; + /** + the icon to be displayed before the validation error in the caption container. + Defaults to + */ + msgValidationErrorIcon?: string; + /** + the css class for the error message to be displayed in the preview window when the file size exceeds maxSize. + Defaults to file-error-message. + */ + msgErrorClass?: string; + /** + the message displayed when the files are getting read and loaded for preview. + Defaults to + Loading file {index} of {files} … + The following special variables will be replaced: + {index}: the sequence number of the current file being loaded. + {files}: the total number of files selected for upload. + */ + msgLoading?: string; + /** + the progress message displayed as each file is loaded for preview. + Defaults to: + Loading file {index} of {files} - {name} - {percent}% completed. + The following variables will be replaced: + {index}: the sequence number of the current file being loaded. + {files}: the total number of files selected for upload. + {percent}: the percentage of file read and loaded. + {name}: the name of the current file being loaded. + */ + msgProgress?: string; + /** + the progress message displayed in caption window when multiple (more than one) files are selected. + Defaults to: + {n} files selected. + The following variables will be replaced: + {n}: the number of files selected. + */ + msgSelected?: string; + /** + the message displayed when a folder has been dragged to the drop zone. + Defaults to: + Drag & drop files only! {n} folder(s) dropped were skipped. + The following variables will be replaced: + {n}: the number of folders dropped. + */ + msgFoldersNotAllowed?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its width is less than the minImageWidth setting. + Defaults to: + Width of image file "{name}" must be at least {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the minImageWidth setting. + */ + msgImageWidthSmall?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its height is less than the minImageHeight setting. + Defaults to: + Height of image file "{name}" must be at least {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the minImageHeight setting. + */ + msgImageHeightSmall?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its width exceeds the maxImageWidth setting. + Defaults to: + Width of image file "{name}" cannot exceed {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the maxImageWidth setting. + */ + msgImageWidthLarge?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its height exceeds the maxImageHeight setting. + Defaults to: + Height of image file "{name}" cannot exceed {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the maxImageHeight setting. + */ + msgImageHeightLarge?: string; + /** + the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). + Defaults to progress-bar progress-bar-success progress-bar-striped active. + */ + progressClass?: string; + /** + the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). + Defaults to progress-bar progress-bar-success progress-bar-striped active. + */ + progressCompleteClass?: string; + /** + the upload progress bar CSS class to be applied when AJAX upload is cancelled or aborted. + Defaults to progress-bar progress-bar-danger. + */ + progressErrorClass?: string; + /** + the type of files that are to be displayed in the preview window. + Defaults to image. + Can be one of the following: + image: Only image type files will be shown in preview. + text: Only text type files will be shown in preview. + any: Both image and text files content will be shown in preview. + Files other than image or text will be displayed as a thumbnail with the filename in the preview window. + */ + previewFileType?: "image" | "text" | "any"; + /** + the icon for zooming the file content in a new modal dialog. + This is currently applicable only for text file previews. + Defaults to + */ + zoomIndicator?: string; + /** + the identifier for the container element displaying the error (e.g. '#id'). + If not set, will default to the container with CSS class kv-fileinput-error inside the preview container (identified by elPreviewContainer). + The msgErrorClass will be automatically appended to this container before displaying the error. + */ + elErrorContainer?: string; + /** + the identifier for the container element containing the caption (e.g. '#id'). + If not set, will default to the container with CSS class file-caption inside the main plugin container. + */ + elCaptionContainer?: string; + /** + the identifier for the container element containing the caption text (e.g. '#id'). + If not set, will default to the container with CSS class file-caption-name inside the main plugin container. + */ + elCaptionText?: string; + /** + the identifier for the container element containing the preview (e.g. '#id'). + If not set, will default to the container with CSS class file-preview inside the main plugin container. + */ + elPreviewContainer?: string; + /** + the identifier for the element containing the preview image thumbnails (e.g. '#id'). + If not set, will default to the container with CSS class file-preview-thumbnails inside the main plugin container. + */ + elPreviewImage?: string; + /** + the identifier for the element containing the preview progress status (e.g. '#id'). + If not set, will default to the container with CSS class file-preview-status inside the main plugin container. + */ + elPreviewStatus?: string; + /** + a callback to convert the filename as a slug string eliminating special characters. + If not set, it will use the plugin's own internal slugDefault method. + This callback function includes the filename as parameter and must return a converted filename string. + */ + slugCallback?: (filename: string) => string; + /** + whether to enable a drag and drop zone for dragging and dropping files to. + This is available only for ajax based uploads. + Defaults to true. + */ + dropZoneEnabled?: boolean; + /** + title to be displayed in the drag and drop zone. + This is available only for ajax based uploads. + Defaults to: + Drag & drop files here …. + */ + dropZoneTitle?: string; + /** + CSS class for the drag & drop zone title. + Defaults to file-drop-zone-title. + */ + dropZoneTitleClass?: string; + /** + configuration for setting up file actions for newly selected file thumbnails in the preview window. + */ + fileActionsettings?: IFileUploadFileActionSettings; + /** + markup for additional action buttons to display within the initial preview thumbnails (for example displaying an image edit button). + The following tag can be used in the markup and will be automatically replaced: + {dataKey}: Will be replaced with the key set within initialPreviewConfig. + */ + otherActionButtons?: string; + /** + the encoding to be used while reading a text file. + Applicable only for previewing text files. + Defaults to UTF-8. + */ + textEncoding?: string; + /** + additional ajax settings to pass to the plugin before submitting the ajax request for upload. + Applicable only for ajax uploads. + This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. + Refer the jQuery ajax documentation for the various settings you can configure. + */ + ajaxSettings?: JQueryAjaxSettings; + /** + additional ajax settings to pass to the plugin before submitting the delete ajax request in each initial preview thumbnail. + Applicable only for ajax uploads. + This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. + Refer the jQuery ajax documentation for the various settings you can configure. + */ + ajaxDeleteSettings?: JQueryAjaxSettings; + /** + whether to show details of the error stack from the server log when an error is encountered via ajax response. + Defaults to true. + */ + showAjaxErrorDetails?: boolean; +} + +interface IFileUploadPreviewConfig { + /** + the caption or filename to display for each initial preview item content. + */ + caption: string; + /** + the CSS width of the image/ content displayed. + */ + width: string; + /** + the URL for deleting the image/ content in the initial preview via AJAX post response.This will default to deleteUrl if not set. + */ + url: string; + /** + the key that will be passed as data to the url via AJAX POST. + */ + key: string | {}; + /** + the additional frame css class to set for the file's thumbnail frame. + */ + frameClass: string; + /** + the HTML attribute settings (set as key:value pairs) for the thumbnail frame. + */ + frameAttr: {}; + /** + the extra data that will be passed as data to the initial preview delete url / AJAX server call via POST.This will default to deleteExtraData if not set. + */ + extra: {} | Function; +} + +interface IFileUploadLayoutTemplates { + /** + the template for rendering the widget with caption. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the mainClass property. + {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. + {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. + {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. + {remove}: the file remove/clear button and will be displayed only if showRemove is true. + {upload}: the file upload button and will be displayed only if showUpload is true. + {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. + {browse}: the main file browse button to select your files for input. + */ + main1?: string; + /** + the template for rendering the widget without caption. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the mainClass property. + {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. + {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. + {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. + {remove}: the file remove/clear button and will be displayed only if showRemove is true. + {upload}: the file upload button and will be displayed only if showUpload is true. + {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. + {browse}: the main file browse button to select your files for input. + */ + main2?: string; + /** + the template for rendering the preview. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the previewClass property. + */ + preview?: string; + /** + the icon to render before the caption text. + */ + icon?: string; + /** + the template for rendering the caption. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the captionClass property. + */ + caption?: string; + /** + the template for rendering the modal (for text file preview zooming). + */ + modal?: string; + /** + the template for the progress bar when upload is in progress (for batch/mass uploads and within each preview thumbnail for async/single uploads). + The upload progress bar when displayed within each thumbnail will be wrapped inside a container having a CSS class of `file-thumb-progress`. + The following tags will be parsed and replaced automatically: + {percent}: will be replaced with the upload progress percentage. + */ + progress?: string; + /** + the template for the footer section of each file preview thumbnail. + The following tags will be parsed and replaced automatically: + {actions}: will be replaced with the output of the actions template. + {class}: the CSS class as set in the progressClass or progressCompleteClass property (depending on the progress percentage). + */ + footer?: string; + /** + the template for the file action buttons to be displayed within the thumbnail footer. + The following tags will be parsed and replaced automatically: + {upload}: will be replaced with the output of the actionUpload template. + {delete}: will be replaced with the output of the actionDelete template. + */ + actions?: string; + /** + the template for the file delete action button within the thumbnail footer. + The following tags will be parsed and replaced automatically: + {removeClass}: the css class for the remove button. Will be replaced with the removeClass set within fileActionSettings. + {removeIcon}: the icon for the remove button. Will be replaced with the removeIcon set within fileActionSettings. + {removeTitle}: the title to display on hover for the remove button. Will be replaced with the removeTitle set within fileActionSettings. + {dataUrl}: the URL for deleting the file thumbnail for initialPreview content only. Will be replaced with the url set within initialPreviewConfig. + {dataKey}: the key (additional data) that will be passed to the URL above via POST to the AJAX call. Will be replaced with the key set within initialPreviewConfig. + */ + actionDelete?: string; + /** + the template for the file upload action button within the thumbnail footer. + The following tags will be parsed and replaced automatically: + {uploadClass}: the css class for the upload button. Will be replaced with the uploadClass set within fileActionSettings. + {uploadIcon}: the icon for the upload button. Will be replaced with the uploadIcon set within fileActionSettings. + {uploadTitle}: the title to display on hover for the upload button. Will be replaced with the uploadTitle set within fileActionSettings. + */ + actionUpload?: string; + /** + The template for upload, remove, and cancel buttons. + The following tags will be parsed and replaced automatically: + {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + {title}: the title to display on button hover. + {css}: the CSS class for the button. This is derived from settings for uploadClass or removeClass or cancelClass. + {status}: the disabled status for the button if available (else will be blank). + {icon}: the button icon as identified by uploadIcon or removeIcon or cancelIcon. + {label}: the button label as identified by uploadLabel or removeLabel or cancelLabel. + */ + btnDefault?: string; + /** + The template for upload button when used with ajax (i.e. when uploadUrl is set). + The following tags will be parsed and replaced automatically: + {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + {title}: the title to display on button hover. + {css}: the CSS class for the button. This is derived from settings for uploadClass. + {status}: the disabled status for the button if available (else will be blank). + {icon}: the button icon as identified by uploadIcon. + {label}: the button label as identified by uploadLabel. + {href}: applicable only for Upload button for ajax uploads and will be replaced with the uploadUrl property. + */ + btnLink?: string; + /** + The template for the browse button. + {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + {title}: the title to display on button hover. + {css}: the CSS class for the button. This is derived from settings for browseClass. + {status}: the disabled status for the button if available (else will be blank). + {icon}: the button icon as identified by browseIcon. + {label}: the button label as identified by browseLabel. + */ + btnBrowse?: string; +} + +interface IFileUploadPreviewTemplates { + /** + the preview template for image files. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + image?: string; + /** + the preview template for text files. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + {dialog}: Will be replaced with the JS code to launch the modal dialog. + {zoomTitle}: This will be replaced with the msgZoomTitle property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). + {zoomInd}: This will be replaced with the zoomIndicator property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). + {heading}: This represents the modal dialog heading title. This will be replaced with the msgZoomModalHeading property. + */ + text?: string; + /** + the preview template for html files. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + html?: string; + /** + the preview template for video files (supported by HTML 5 video tag). + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + video?: string; + /** + the preview template for audio files (supported by HTML 5 audio tag). + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + audio?: string; + /** + the preview template for flash files (supported currently on webkit browsers). + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + flash?: string; + /** + the preview template for all other files - by default treated as object. To disable this behavior, configure the allowedPreviewTypes property. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + object?: string; + /** + this template is used ONLY for rendering the initialPreview markup content passed directly as a raw format. + The following tags will be parsed and replaced automatically: + {content}: will be replaced with the raw HTML markup as set in initialPreview.. + */ + generic?: string; +} + +interface IFileUploadPreviewSettings { + image?: { width?: string; height?: string; }; + html?: { width?: string; height?: string; }; + text?: { width?: string; height?: string; }; + video?: { width?: string; height?: string; }; + audio?: { width?: string; height?: string; }; + flash?: { width?: string; height?: string; }; + object?: { width?: string; height?: string; }; + other?: { width?: string; height?: string; }; +} + +interface IFileUploadFileTypeSettings { + image: (vType: string, vName: string) => boolean; + html: (vType: string, vName: string) => boolean; + text: (vType: string, vName: string) => boolean; + video: (vType: string, vName: string) => boolean; + audio: (vType: string, vName: string) => boolean; + flash: (vType: string, vName: string) => boolean; + object: (vType: string, vName: string) => boolean; + other: (vType: string, vName: string) => boolean; +} + +interface IFileUploadPreviewFileIconSettings { + [key: string]: string; +} + +interface IFileUploadPreviewFileExtSettings { + [key: string]: (ext: string) => boolean; +} + +interface IFileUploadFileActionSettings { + /** + icon for remove button to be displayed in each file thumbnail. + */ + removeIcon: string; + /** + CSS class for the remove button in each file thumbnail. + */ + removeClass: string; + /** + title for remove button in each file thumbnail. + */ + removeTitle: string; + /** + icon for upload button to be displayed in each file thumbnail. + */ + uploadIcon: string; + /** + CSS class for the remove button in each file thumbnail. + */ + uploadClass: string; + /** + title for remove button in each file thumbnail. + */ + uploadTitle: string; + /** + an indicator (HTML markup) for new pending upload displayed in each file thumbnail. + */ + indicatorNew: string; + /** + an indicator (HTML markup) for successful upload displayed in each file thumbnail. + */ + indicatorSuccess: string; + /** + an indicator (HTML markup) for error in upload displayed in each file thumbnail. + */ + indicatorError: string; + /** + an indicator (HTML markup) for ongoing upload displayed in each file thumbnail. + */ + indicatorLoading: string; + /** + title to display on hover of indicator for new pending upload in each file thumbnail. + */ + indicatorNewTitle: string; + /** + title to display on hover of indicator for successful in each file thumbnail. + */ + indicatorSuccessTitle: string; + /** + title to display on hover of indicator for error in upload in each file thumbnail. + */ + indicatorErrorTitle: string; + /** + title to display on hover of indicator for ongoing upload in each file thumbnail. + */ + indicatorLoadingTitle: string; +} \ No newline at end of file From 325de0ff3bdd5dcad22f77a563ebbe533283478e Mon Sep 17 00:00:00 2001 From: CheCoxshall Date: Fri, 1 Apr 2016 22:27:19 +0100 Subject: [PATCH 0102/1506] Fixed header and Namespacing Also improved interface names. --- bootstrap-fileinput/bootstrap-fileinput.d.ts | 2044 +++++++++--------- 1 file changed, 1026 insertions(+), 1018 deletions(-) diff --git a/bootstrap-fileinput/bootstrap-fileinput.d.ts b/bootstrap-fileinput/bootstrap-fileinput.d.ts index e517ae8d75..e9d6f0e0d3 100644 --- a/bootstrap-fileinput/bootstrap-fileinput.d.ts +++ b/bootstrap-fileinput/bootstrap-fileinput.d.ts @@ -1,1029 +1,1037 @@ -interface JQuery { - fileinput: (options?: FileInputOptions) => JQuery; +// Type definitions for bootstrap-fileinput +// Project: https://github.com/kartik-v/bootstrap-fileinput +// Definitions by: Ché Coxshall +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface JQuery { + fileinput: (options?: BootstrapFileInput.FileInputOptions) => JQuery; } -interface FileInputOptions { - /** - Language configuration for the plugin to enable the plugin to display messages for your locale (you must set the ISO code for the language). - You can have multiple language widgets on the same page. - The locale JS file for the language code must be defined as mentioned in the translations section: http://plugins.krajee.com/file-input#translations - */ - language?: string; - /** - Whether to display the file caption. - Defaults to true. - */ - showCaption?: boolean; - /** - Whether to display the file preview. - Defaults to true. - */ - showPreview?: boolean; - /** - Whether to display the file remove/clear button. - Defaults to true. - */ - showRemove?: boolean; - /** - Whether to display the file upload button. - Defaults to true. - This will default to a form submit button, unless the uploadUrl is specified. - */ - showUpload?: boolean; - /** - Whether to display the file upload cancel button. - Defaults to true. - This will be only enabled and displayed when an AJAX upload is in process. - */ - showCancel?: boolean; - /** - Whether to display the close icon in the preview. - Defaults to true. - This will be only parsed when showPreview is true or when you are using the {close} tag in your preview templates. - */ - showClose?: boolean; - /** - Whether to persist display of the uploaded file thumbnails in the preview window (for ajax uploads) until the remove/clear button is pressed. - Defaults to true. - When set to false, a next batch of files selected for upload will clear these thumbnails from preview. - */ - showUploadedThumbs?: boolean; - /** - Whether to automatically replace the files in the preview after the maxFileCount limit is reached and a new set of file(s) is/are selected. - This will only work if a valid maxFileCount is set. - Defaults to false. - */ - autoReplace?: boolean; - /** - Any additional CSS class to append to the caption container. - */ - captionClass?: string; - /** - Any additional CSS class to append to the preview container. - */ - previewClass?: string; - /** - Any additional CSS class to append to the main plugin container. - */ - mainClass?: string; - /** - The initial preview content to be displayed. - You can pass the minimal HTML markup for displaying your image, text, or file. - If set as a string, this will display a single file in the initial preview if there is no delimiter. You can set a delimiter (as defined in initialDelimiter) to show multiple files in initial preview. - If set as an array, it will display all files in the array as an initial preview (useful for multiple file upload scenarios). - The following CSS classes will need to be added for displaying each file type as per the plugin style theme: - image files: Include CSS class file-preview-image - text files: Include CSS class file-preview-text - other files: Include CSS class file-preview-other - */ - initialPreview?: string | any[]; - /** - the count of initial preview items that will be added to the count of files selected in preview. This is applicable when displaying the right caption, when overwriteInitial is set to false. - */ - initialPreviewCount?: number; - /** - the delimiter to be used for splitting the initial preview content as individual file thumbnails (applicable only if initialPreview is passed as a string instead of array). Defaults to *$$*. - */ - initialPreviewDelimiter?: string; - /** - the configuration for setting up important properties for each initialPreview item (that is setup as part of initialPreview). - */ - initialPreviewConfig?: IFileUploadPreviewConfig[]; - /** - whether the delete button will be displayed for each thumbnail that has been created with initialPreview. - */ - initialPreviewShowDelete?: boolean; - /** - whether the file thumbnail should be removed from preview on error. Defaults to false. - */ - removeFromPreviewOnError?: boolean; - /** - this will be a list of tags used in thumbnail templates that will be replaced dynamically within the thumbnail markup, when the thumbnail is rendered. - */ - previewThumbTags?: { [key: string]: string; } - /** - this is an extension of previewThumbTags specifically for initial preview content - but will be configured as an array of objects corresponding to each initial preview thumbnail. The initial preview thumbnails set via initialPreview will read this configuration for replacing tags. - */ - initialPreviewThumbTags?: { [key: string]: string; } - /** - the extra data that will be passed as data to the initial preview delete url/AJAX server call via POST. - This will be overridden by the initialPreviewConfig['extra'] property. - This property is only applicable for ajax deletions in initial preview and when you have set a value for initialPreviewConfig['url'] or deleteUrl. - This can be setup either as an object (associative array of keys and values) or as a function callback. - Note - The ajax delete action will send the following data to server via POST: - key: the key setting as setup in initialPreviewConfig['key'] - any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. - */ - deleteExtraData?: {} | { (): {} }; - /** - the URL for deleting the image/content in the initial preview via AJAX post response. This will be overridden by the initialPreviewConfig['url'] property. - Note - The ajax delete action will send the following data to server via POST: - key: the key setting as setup in initialPreviewConfig['key'] - any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. - */ - deleteUrl?: string; - /** - the initial preview caption text to be displayed. - If you do not set a value here and initialPreview is set to true this will default to "{preview-file-count} files selected", where {preview-file-count} is the count of the files passed in initialPreview. - */ - initialCaption?: string; - /** - whether you wish to overwrite the initial preview content and caption setup. - This defaults to true, whereby, any initialPreview content set will be overwritten, when new file is uploaded or when files are cleared. - Setting it to false will help displaying a saved image or file from database always - useful especially when using the multiple file upload feature. - */ - overwriteInitial?: boolean; - /** - the templates configuration for rendering each part of the layout. - */ - layoutTemplates?: IFileUploadLayoutTemplates; - /** - the templates configuration for rendering each preview file type. - */ - previewTemplates?: IFileUploadPreviewTemplates; - /** - the list of allowed file types for upload. - This by default is set to null which means the plugin supports all file types for upload. - If an invalid file type is found, then a validation error message as set in msgInvalidFileType will be raised. - Note: - You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). - */ - allowedFileTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; - /** - the list of allowed file extensions for upload. - This by default is set to null which means the plugin supports all file extensions for upload. - If an invalid file extension is found, then a validation error message as set in msgInvalidFileExtension will be raised. - Note: - You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). - */ - allowedFileExtensions?: string[]; - /** - the list of allowed preview types for your widget. - This by default supports all file types for preview. - The plugin by default treats each file as an object if it does not match any of the previous types. - To disable this behavior, you can remove object from the list of allowedPreviewTypes OR fine tune it through allowedPreviewMimeTypes. - To disable content preview for all file-types and show the previewIcon instead as a thumbnail, set this to null, empty, or false. - */ - allowedPreviewTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; - /** - the list of allowed mime types for preview. - This is set to null by default which means all possible mime types are allowed. - This setting works in combination with allowedPreviewTypes to filter only the needed file types allowed for preview. - */ - allowedPreviewMimeTypes?: string[]; - /** - the default content / markup to show by default in the preview window whenever the files are cleared or the input is cleared. - This can be useful for use cases like showing the default user profile picture or profile image before upload to overwrite. - This is a bit different from initialPreview in the sense, that the initialPreview content will always be displayed unless it is deleted or overwritten based on overwriteInitial. - The defaultPreviewContent on the other hand will only be shown ONLY on initialization OR whenever you clear the preview. - At other times when files have been selected this will be overwritten temporarily until file(s) selected is/are cleared. - This property can be useful to display for example a default user profile picture (or saved picture) in the preview window unless the user selects a picture. - */ - defaultPreviewContent?: string; - /** - the list of additional custom tags that will be replaced in the layout templates. - */ - customLayoutTags?: {}; - /** - the list of additional custom tags that will be replaced in the preview templates. - */ - customPreviewTags?: {}; - /** - the format settings (width and height) for rendering each preview file type. - */ - previewSettings?: IFileUploadPreviewSettings; - /** - the settings to validate and identify each file type when a file is selected for upload. - This is a list of callbacks, which accepts the file mime type and file name as a parameter. - */ - fileTypeSettings?: IFileUploadFileTypeSettings; - /** - the icon to be shown in each preview file thumbnail when an unreadable file type for preview is detected. Defaults to  . - */ - previewFileIcon?: string; - /** - the CSS class to be applied to the preview file icon container. Defaults to file-icon-4x. - */ - previewFileIconClass?: string; - /** - the preview icon markup settings for each file extension (type). - You need to set this as key: value pairs, where the key corresponds to a file extension (e.g. doc, docx, xls etc.), and the value corresponds to the markup of the icon to be rendered. - If this is not set OR a file extension is not set here, the preview will default to previewFileIcon. - Note that displaying the icons instead of file content is controlled via allowedPreviewTypes and allowedPreviewMimeTypes - */ - previewFileIconSettings?: IFileUploadPreviewFileIconSettings; - /** - the extensions to be auto derived for each file extension (type). - This is useful if you want to set the same icon for multiple file extension types. - You need to set this as `key: value` pairs, where the key corresponds to a file extension as set in previewFileIconSettings (e.g. doc, docx, xls etc.). - The value will be a function callback that accepts the following parameter: - ext: string, the file extension (without the . [dot]) of the file currently selected in the preview. - You can configure the callback to match the set of file extensions (via regex or similar) for each `key` and return a boolean output if the file extension matches. - */ - previewFileExtSettings?: IFileUploadPreviewFileExtSettings; - /** - the CSS class for the each of the button labels for browse, remove, upload, and cancel. - Defaults to hidden-xs, which automatically hides the button labels for small screen devices and renders as smaller iconic buttons to fit to the screen. - */ - buttonLabelClass?: string; - /** - the label to display for the file picker/browse button. Defaults to Browse …. - */ - browseLabel?: string; - /** - the icon to display before the label for the file picker/browse button. Defaults to  . - */ - browseIcon?: string; - /** - the CSS class for the file picker/browse button. Defaults to btn btn-primary. - */ - browseClass?: string; - /** - the label to display for the file remove button. Defaults to Remove. - */ - removeLabel?: string; - /** - the icon to display before the label for the file picker/remove button. Defaults to  . - */ - removeIcon?: string; - /** - the CSS class for the file remove button. Defaults to btn btn-default. - */ - removeClass?: string; - /** - the title to display on hover for the file remove button. Defaults to Clear selected files. - */ - removeTitle?: string; - /** - the label to display for the file upload button. Defaults to Upload. - */ - uploadLabel?: string; - /** - the icon to display before the label for the file upload button. Defaults to  . - */ - uploadIcon?: string; - /** - the CSS class for the file upload button. Defaults to btn btn-default. - */ - uploadClass?: string; - /** - the title to display on hover for the file remove button. - Defaults to Upload selected files. - */ - uploadTitle?: string; - /** - the URL for the upload processing action (typically for ajax based processing). - Defaults to null. - If this is not set or null, then the upload button action will default to form submission. - NOTE: - This is MANDATORY if you want to use advanced features like drag & drop, append/remove files, selectively upload files via ajax etc. - The plugin automatically send $_FILES data to the server with the input `name` attribute as the key if provided. - If input name is not set, the key defaults to file-data. - */ - uploadUrl?: string; - /** - whether the batch upload of multiple files will be asynchronous/in parallel. - Defaults to true. - */ - uploadAsync?: boolean; - /** - the extra data that will be passed as data to the url/AJAX server call via POST. - This property is only applicable for ajax uploads and when you have set a value for uploadUrl. - This can be setup either as an object (associative array of keys and values) or as a function callback. - As an object, it can be set for example as: - { id: 100, value: '100 Details' } - Note that for uploading individual file via thumbnail, the function callback can also receive the thumbnail previewId and index as parameters. These are described below: - previewId: the identifier for the preview file container (only available when uploading each thumbnail file) - index: the zero-based sequential index of the loaded file in the preview list (only available when uploading each thumbnail file) - */ - uploadExtraData?: {} | ((previewId?: string, index?: number) => {}); - /** - the minimum allowed image height in px if you are uploading image files. - Defaults to null which means no limit on image height. - */ - minImageHeight?: number; - /** - the maximum allowed image width in px if you are uploading image files. - Defaults to null which means no limit on image width. - Note that if you set resizeImage property to true, then the entire image will be resized within this width (depending on resizePreference). - */ - maxImageWidth?: number; - /** - the maximum allowed image height in px if you are uploading image files. - Defaults to null which means no limit on image height. - Note that if you set resizeImage property to true, then the entire image will be resized within this height (depending on resizePreference). - */ - maxImageHeight?: number; - /** - whether to add ability to resize uploaded images. Defaults to false. - Note that resizing images requires HTML5 canvas support which is supported on most modern browsers. - In addition, you must include the JavaScript-Canvas-to-Blob plugin by blueimp by including canvas-to-blob.js in your application. - This JS file must be loaded before fileinput.js on the page. - The JavaScript-Canvas-to-Blob source files are available in js/plugins folder of bootstrap-fileinput project page. - The canvas-to-blob.js plugin is a polyfill for canvas.toBlob method and is needed for allowing the resized image files via HTML5 canvas to be returned as a blob - */ - resizeImage?: boolean; - /** - preference to resize the image based on width or height. - Defaults to width. - This property is parsed only when resizeImage is true. - If set to width, the maxImageWidth property is first tested and if image size is greater than this, then the image is resized to maxImageWidth. - The image height is resized and adjusted in the same ratio as width. - In case, the image width is already less than maxImageWidth then the maxImageHeight property is used to resize and width is adjusted in same ratio. - This will behave conversely, when resizePreference is set to height - the maxImageHeight will be first tested against image height and then the rest of steps will be similarly parsed with preference given to height instead of width as before. - */ - resizePreference?: "width" | "height"; - /** - the quality of the resized image. This must be a decimal number between 0.00 to 1.00. - Defaults to 0.92. - */ - resizeImageQuality?: number; - /** - the default image mime type of the converted image after resize. - Defaults to image/jpeg. - */ - resizeDefaultImageType?: string; - /** - the maximum file size for upload in KB. - If set to 0, it means size allowed is unlimited. - Defaults to 0. - */ - maxFileSize?: number; - /** - the minimum number of files allowed for each multiple upload. - If set to 0, it means number of files are optional. - Defaults to 0. - */ - minFileCount?: number; - /** - the maximum number of files allowed for each multiple upload. - If set to 0, it means number of files allowed is unlimited. - Defaults to 0. - */ - maxFileCount?: number; - /** - whether to include initial preview file count (server uploaded files) in validating minFileCount and maxFileCount. - Defaults to false. - */ - validateInitialCount?: boolean; - /** - the message that will be displayed when ZERO files are found. - Defaults to No. - */ - msgNo?: string; - /** - the message that will be displayed within the progress bar when file upload is aborted or cancelled. - Defaults to Cancelled. - */ - msgCancelled?: string; - /** - the title displayed (before the file name) on hover of the zoom button for zooming the file content in a modal window. - This is currently applicable only for text file previews. - Defaults to View details. - */ - msgZoomTitle?: string; - /** - the heading of the modal dialog that displays the zoomed file content. - This is currently applicable only for text file previews. - Defaults to Detailed Preview. - */ - msgZoomModalHeading?: string; - /** - the message to be displayed when the file size exceeds maximum size. - Defaults to: - File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB. Please retry your upload! - where: - {name}: will be replaced by the file name being uploaded - {size}: will be replaced by the uploaded file size - {maxSize}: will be replaced by the maxFileSize parameter. - */ - msgSizeTooLarge?: string; - /** - message to be displayed when the file count is less than the minimum count as set in minFileCount. - Defaults to: - You must select at least {n} {files} to upload. Please retry your upload! - where: - {n}: will be replaced by the allowed minimum files as set in minFileCount. - {files}: will be replaced with fileSingle or filePlural properties in locale file depending on the minFileCount. - */ - msgFilesTooLess?: string; - /** - the message to be displayed when the file count exceeds maximum count as set in maxFileCount. - Defaults to: - Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}. Please retry your upload! - where: - {n}: will be replaced by number of files selected for upload - {m}: will be replaced by the allowed maximum files as set in maxFileCount - */ - msgFilesTooMany?: string; - /** - the exception message to be displayed when the file selected is not found by the FileReader. - Defaults to: - File "{name}" not found! - where: - {name}: will be replaced by the file name being uploaded - */ - msgFileNotFound?: string; - /** - the exception message to be displayed when the file selected is not allowed to be accessed due to a security exception. - Defaults to: - Security restrictions prevent reading the file "{name}". - where: - {name}: will be replaced by the file name being uploaded - */ - msgFileSecured?: string; - /** - the exception message to be displayed when the file selected is not readable by the FileReader API. - Defaults to: - File "{name}" is not readable. - where: - {name}: will be replaced by the file name being uploaded - */ - msgFileNotReadable?: string; - /** - the exception message to be displayed when the file preview upload is aborted. - Defaults to: - File preview aborted for "{name}". - where: - {name}: will be replaced by the file name being uploaded - */ - msgFilePreviewAborted?: string; - /** - the exception message to be displayed for any other error when previewing the file. - Defaults to: - An error occurred while reading the file "{name}". - where: - {name}: will be replaced by the file name being uploaded - */ - msgFilePreviewError?: string; - /** - the message to be displayed when the file type is not in one of the file types set in allowedFileTypes. - Defaults to: - Invalid type for file "{name}". Only "{types}" files are supported. - where: - {name}: will be replaced by the file name being uploaded - {types}: will be replaced by the comma separated list of types defined in allowedFileTypes. - */ - msgInvalidFileType?: string; - /** - the message to be displayed when the file type is not in one of the file extensions set in allowedFileExtensions. - Defaults to: - Invalid extension for file "{name}". Only "{extensions}" files are supported. - where: - {name}: will be replaced by the file name being uploaded - {extensions}: will be replaced by the comma separated list of extensions defined in allowedFileExtensions. - */ - msgInvalidFileExtension?: string; - /** - the message to be displayed when an ongoing ajax file upload is aborted by pressing the Cancel button. - Defaults to The file upload was aborted. - If this is set to null or empty, the internal ajax error message will be displayed - Defaults to File Upload Error. - */ - msgUploadAborted?: string; - /** - the exception message to be displayed within the caption container (instead of msgFilesSelected), when a validation error is encountered. - Defaults to File Upload Error. - */ - msgValidationError?: string; - /** - the css class for the validation error message displayed in the caption container. - Defaults to text-danger. - */ - msgValidationErrorClass?: string; - /** - the icon to be displayed before the validation error in the caption container. - Defaults to - */ - msgValidationErrorIcon?: string; - /** - the css class for the error message to be displayed in the preview window when the file size exceeds maxSize. - Defaults to file-error-message. - */ - msgErrorClass?: string; - /** - the message displayed when the files are getting read and loaded for preview. - Defaults to - Loading file {index} of {files} … - The following special variables will be replaced: - {index}: the sequence number of the current file being loaded. - {files}: the total number of files selected for upload. - */ - msgLoading?: string; - /** - the progress message displayed as each file is loaded for preview. - Defaults to: - Loading file {index} of {files} - {name} - {percent}% completed. - The following variables will be replaced: - {index}: the sequence number of the current file being loaded. - {files}: the total number of files selected for upload. - {percent}: the percentage of file read and loaded. - {name}: the name of the current file being loaded. - */ - msgProgress?: string; - /** - the progress message displayed in caption window when multiple (more than one) files are selected. - Defaults to: - {n} files selected. - The following variables will be replaced: - {n}: the number of files selected. - */ - msgSelected?: string; - /** - the message displayed when a folder has been dragged to the drop zone. - Defaults to: - Drag & drop files only! {n} folder(s) dropped were skipped. - The following variables will be replaced: - {n}: the number of folders dropped. - */ - msgFoldersNotAllowed?: string; - /** - the exception message to be displayed when the file selected for preview is an image and its width is less than the minImageWidth setting. - Defaults to: - Width of image file "{name}" must be at least {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the minImageWidth setting. - */ - msgImageWidthSmall?: string; - /** - the exception message to be displayed when the file selected for preview is an image and its height is less than the minImageHeight setting. - Defaults to: - Height of image file "{name}" must be at least {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the minImageHeight setting. - */ - msgImageHeightSmall?: string; - /** - the exception message to be displayed when the file selected for preview is an image and its width exceeds the maxImageWidth setting. - Defaults to: - Width of image file "{name}" cannot exceed {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the maxImageWidth setting. - */ - msgImageWidthLarge?: string; - /** - the exception message to be displayed when the file selected for preview is an image and its height exceeds the maxImageHeight setting. - Defaults to: - Height of image file "{name}" cannot exceed {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the maxImageHeight setting. - */ - msgImageHeightLarge?: string; - /** - the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). - Defaults to progress-bar progress-bar-success progress-bar-striped active. - */ - progressClass?: string; - /** - the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). - Defaults to progress-bar progress-bar-success progress-bar-striped active. - */ - progressCompleteClass?: string; - /** - the upload progress bar CSS class to be applied when AJAX upload is cancelled or aborted. - Defaults to progress-bar progress-bar-danger. - */ - progressErrorClass?: string; - /** - the type of files that are to be displayed in the preview window. - Defaults to image. - Can be one of the following: - image: Only image type files will be shown in preview. - text: Only text type files will be shown in preview. - any: Both image and text files content will be shown in preview. - Files other than image or text will be displayed as a thumbnail with the filename in the preview window. - */ - previewFileType?: "image" | "text" | "any"; - /** - the icon for zooming the file content in a new modal dialog. - This is currently applicable only for text file previews. - Defaults to - */ - zoomIndicator?: string; - /** - the identifier for the container element displaying the error (e.g. '#id'). - If not set, will default to the container with CSS class kv-fileinput-error inside the preview container (identified by elPreviewContainer). - The msgErrorClass will be automatically appended to this container before displaying the error. - */ - elErrorContainer?: string; - /** - the identifier for the container element containing the caption (e.g. '#id'). - If not set, will default to the container with CSS class file-caption inside the main plugin container. - */ - elCaptionContainer?: string; - /** - the identifier for the container element containing the caption text (e.g. '#id'). - If not set, will default to the container with CSS class file-caption-name inside the main plugin container. - */ - elCaptionText?: string; - /** - the identifier for the container element containing the preview (e.g. '#id'). - If not set, will default to the container with CSS class file-preview inside the main plugin container. - */ - elPreviewContainer?: string; - /** - the identifier for the element containing the preview image thumbnails (e.g. '#id'). - If not set, will default to the container with CSS class file-preview-thumbnails inside the main plugin container. - */ - elPreviewImage?: string; - /** - the identifier for the element containing the preview progress status (e.g. '#id'). - If not set, will default to the container with CSS class file-preview-status inside the main plugin container. - */ - elPreviewStatus?: string; - /** - a callback to convert the filename as a slug string eliminating special characters. - If not set, it will use the plugin's own internal slugDefault method. - This callback function includes the filename as parameter and must return a converted filename string. - */ - slugCallback?: (filename: string) => string; - /** - whether to enable a drag and drop zone for dragging and dropping files to. - This is available only for ajax based uploads. - Defaults to true. - */ - dropZoneEnabled?: boolean; - /** - title to be displayed in the drag and drop zone. - This is available only for ajax based uploads. - Defaults to: - Drag & drop files here …. - */ - dropZoneTitle?: string; - /** - CSS class for the drag & drop zone title. - Defaults to file-drop-zone-title. - */ - dropZoneTitleClass?: string; - /** - configuration for setting up file actions for newly selected file thumbnails in the preview window. - */ - fileActionsettings?: IFileUploadFileActionSettings; - /** - markup for additional action buttons to display within the initial preview thumbnails (for example displaying an image edit button). - The following tag can be used in the markup and will be automatically replaced: - {dataKey}: Will be replaced with the key set within initialPreviewConfig. - */ - otherActionButtons?: string; - /** - the encoding to be used while reading a text file. - Applicable only for previewing text files. - Defaults to UTF-8. - */ - textEncoding?: string; - /** - additional ajax settings to pass to the plugin before submitting the ajax request for upload. - Applicable only for ajax uploads. - This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. - Refer the jQuery ajax documentation for the various settings you can configure. - */ - ajaxSettings?: JQueryAjaxSettings; - /** - additional ajax settings to pass to the plugin before submitting the delete ajax request in each initial preview thumbnail. - Applicable only for ajax uploads. - This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. - Refer the jQuery ajax documentation for the various settings you can configure. - */ - ajaxDeleteSettings?: JQueryAjaxSettings; - /** - whether to show details of the error stack from the server log when an error is encountered via ajax response. - Defaults to true. - */ - showAjaxErrorDetails?: boolean; -} -interface IFileUploadPreviewConfig { - /** - the caption or filename to display for each initial preview item content. - */ - caption: string; - /** - the CSS width of the image/ content displayed. - */ - width: string; - /** - the URL for deleting the image/ content in the initial preview via AJAX post response.This will default to deleteUrl if not set. - */ - url: string; - /** - the key that will be passed as data to the url via AJAX POST. - */ - key: string | {}; - /** - the additional frame css class to set for the file's thumbnail frame. - */ - frameClass: string; - /** - the HTML attribute settings (set as key:value pairs) for the thumbnail frame. - */ - frameAttr: {}; - /** - the extra data that will be passed as data to the initial preview delete url / AJAX server call via POST.This will default to deleteExtraData if not set. - */ - extra: {} | Function; -} +declare module BootstrapFileInput { + interface FileInputOptions { + /** + Language configuration for the plugin to enable the plugin to display messages for your locale (you must set the ISO code for the language). + You can have multiple language widgets on the same page. + The locale JS file for the language code must be defined as mentioned in the translations section: http://plugins.krajee.com/file-input#translations + */ + language?: string; + /** + Whether to display the file caption. + Defaults to true. + */ + showCaption?: boolean; + /** + Whether to display the file preview. + Defaults to true. + */ + showPreview?: boolean; + /** + Whether to display the file remove/clear button. + Defaults to true. + */ + showRemove?: boolean; + /** + Whether to display the file upload button. + Defaults to true. + This will default to a form submit button, unless the uploadUrl is specified. + */ + showUpload?: boolean; + /** + Whether to display the file upload cancel button. + Defaults to true. + This will be only enabled and displayed when an AJAX upload is in process. + */ + showCancel?: boolean; + /** + Whether to display the close icon in the preview. + Defaults to true. + This will be only parsed when showPreview is true or when you are using the {close} tag in your preview templates. + */ + showClose?: boolean; + /** + Whether to persist display of the uploaded file thumbnails in the preview window (for ajax uploads) until the remove/clear button is pressed. + Defaults to true. + When set to false, a next batch of files selected for upload will clear these thumbnails from preview. + */ + showUploadedThumbs?: boolean; + /** + Whether to automatically replace the files in the preview after the maxFileCount limit is reached and a new set of file(s) is/are selected. + This will only work if a valid maxFileCount is set. + Defaults to false. + */ + autoReplace?: boolean; + /** + Any additional CSS class to append to the caption container. + */ + captionClass?: string; + /** + Any additional CSS class to append to the preview container. + */ + previewClass?: string; + /** + Any additional CSS class to append to the main plugin container. + */ + mainClass?: string; + /** + The initial preview content to be displayed. + You can pass the minimal HTML markup for displaying your image, text, or file. + If set as a string, this will display a single file in the initial preview if there is no delimiter. You can set a delimiter (as defined in initialDelimiter) to show multiple files in initial preview. + If set as an array, it will display all files in the array as an initial preview (useful for multiple file upload scenarios). + The following CSS classes will need to be added for displaying each file type as per the plugin style theme: + image files: Include CSS class file-preview-image + text files: Include CSS class file-preview-text + other files: Include CSS class file-preview-other + */ + initialPreview?: string | any[]; + /** + the count of initial preview items that will be added to the count of files selected in preview. This is applicable when displaying the right caption, when overwriteInitial is set to false. + */ + initialPreviewCount?: number; + /** + the delimiter to be used for splitting the initial preview content as individual file thumbnails (applicable only if initialPreview is passed as a string instead of array). Defaults to *$$*. + */ + initialPreviewDelimiter?: string; + /** + the configuration for setting up important properties for each initialPreview item (that is setup as part of initialPreview). + */ + initialPreviewConfig?: PreviewConfig[]; + /** + whether the delete button will be displayed for each thumbnail that has been created with initialPreview. + */ + initialPreviewShowDelete?: boolean; + /** + whether the file thumbnail should be removed from preview on error. Defaults to false. + */ + removeFromPreviewOnError?: boolean; + /** + this will be a list of tags used in thumbnail templates that will be replaced dynamically within the thumbnail markup, when the thumbnail is rendered. + */ + previewThumbTags?: { [key: string]: string; } + /** + this is an extension of previewThumbTags specifically for initial preview content - but will be configured as an array of objects corresponding to each initial preview thumbnail. The initial preview thumbnails set via initialPreview will read this configuration for replacing tags. + */ + initialPreviewThumbTags?: { [key: string]: string; } + /** + the extra data that will be passed as data to the initial preview delete url/AJAX server call via POST. + This will be overridden by the initialPreviewConfig['extra'] property. + This property is only applicable for ajax deletions in initial preview and when you have set a value for initialPreviewConfig['url'] or deleteUrl. + This can be setup either as an object (associative array of keys and values) or as a function callback. + Note + The ajax delete action will send the following data to server via POST: + key: the key setting as setup in initialPreviewConfig['key'] + any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. + */ + deleteExtraData?: {} | { (): {} }; + /** + the URL for deleting the image/content in the initial preview via AJAX post response. This will be overridden by the initialPreviewConfig['url'] property. + Note + The ajax delete action will send the following data to server via POST: + key: the key setting as setup in initialPreviewConfig['key'] + any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. + */ + deleteUrl?: string; + /** + the initial preview caption text to be displayed. + If you do not set a value here and initialPreview is set to true this will default to "{preview-file-count} files selected", where {preview-file-count} is the count of the files passed in initialPreview. + */ + initialCaption?: string; + /** + whether you wish to overwrite the initial preview content and caption setup. + This defaults to true, whereby, any initialPreview content set will be overwritten, when new file is uploaded or when files are cleared. + Setting it to false will help displaying a saved image or file from database always - useful especially when using the multiple file upload feature. + */ + overwriteInitial?: boolean; + /** + the templates configuration for rendering each part of the layout. + */ + layoutTemplates?: LayoutTemplates; + /** + the templates configuration for rendering each preview file type. + */ + previewTemplates?: PreviewTemplates; + /** + the list of allowed file types for upload. + This by default is set to null which means the plugin supports all file types for upload. + If an invalid file type is found, then a validation error message as set in msgInvalidFileType will be raised. + Note: + You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). + */ + allowedFileTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; + /** + the list of allowed file extensions for upload. + This by default is set to null which means the plugin supports all file extensions for upload. + If an invalid file extension is found, then a validation error message as set in msgInvalidFileExtension will be raised. + Note: + You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). + */ + allowedFileExtensions?: string[]; + /** + the list of allowed preview types for your widget. + This by default supports all file types for preview. + The plugin by default treats each file as an object if it does not match any of the previous types. + To disable this behavior, you can remove object from the list of allowedPreviewTypes OR fine tune it through allowedPreviewMimeTypes. + To disable content preview for all file-types and show the previewIcon instead as a thumbnail, set this to null, empty, or false. + */ + allowedPreviewTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; + /** + the list of allowed mime types for preview. + This is set to null by default which means all possible mime types are allowed. + This setting works in combination with allowedPreviewTypes to filter only the needed file types allowed for preview. + */ + allowedPreviewMimeTypes?: string[]; + /** + the default content / markup to show by default in the preview window whenever the files are cleared or the input is cleared. + This can be useful for use cases like showing the default user profile picture or profile image before upload to overwrite. + This is a bit different from initialPreview in the sense, that the initialPreview content will always be displayed unless it is deleted or overwritten based on overwriteInitial. + The defaultPreviewContent on the other hand will only be shown ONLY on initialization OR whenever you clear the preview. + At other times when files have been selected this will be overwritten temporarily until file(s) selected is/are cleared. + This property can be useful to display for example a default user profile picture (or saved picture) in the preview window unless the user selects a picture. + */ + defaultPreviewContent?: string; + /** + the list of additional custom tags that will be replaced in the layout templates. + */ + customLayoutTags?: {}; + /** + the list of additional custom tags that will be replaced in the preview templates. + */ + customPreviewTags?: {}; + /** + the format settings (width and height) for rendering each preview file type. + */ + previewSettings?: PreviewSettings; + /** + the settings to validate and identify each file type when a file is selected for upload. + This is a list of callbacks, which accepts the file mime type and file name as a parameter. + */ + fileTypeSettings?: FileTypeSettings; + /** + the icon to be shown in each preview file thumbnail when an unreadable file type for preview is detected. Defaults to  . + */ + previewFileIcon?: string; + /** + the CSS class to be applied to the preview file icon container. Defaults to file-icon-4x. + */ + previewFileIconClass?: string; + /** + the preview icon markup settings for each file extension (type). + You need to set this as key: value pairs, where the key corresponds to a file extension (e.g. doc, docx, xls etc.), and the value corresponds to the markup of the icon to be rendered. + If this is not set OR a file extension is not set here, the preview will default to previewFileIcon. + Note that displaying the icons instead of file content is controlled via allowedPreviewTypes and allowedPreviewMimeTypes + */ + previewFileIconSettings?: PreviewFileIconSettings; + /** + the extensions to be auto derived for each file extension (type). + This is useful if you want to set the same icon for multiple file extension types. + You need to set this as `key: value` pairs, where the key corresponds to a file extension as set in previewFileIconSettings (e.g. doc, docx, xls etc.). + The value will be a function callback that accepts the following parameter: + ext: string, the file extension (without the . [dot]) of the file currently selected in the preview. + You can configure the callback to match the set of file extensions (via regex or similar) for each `key` and return a boolean output if the file extension matches. + */ + previewFileExtSettings?: PreviewFileExtSettings; + /** + the CSS class for the each of the button labels for browse, remove, upload, and cancel. + Defaults to hidden-xs, which automatically hides the button labels for small screen devices and renders as smaller iconic buttons to fit to the screen. + */ + buttonLabelClass?: string; + /** + the label to display for the file picker/browse button. Defaults to Browse …. + */ + browseLabel?: string; + /** + the icon to display before the label for the file picker/browse button. Defaults to  . + */ + browseIcon?: string; + /** + the CSS class for the file picker/browse button. Defaults to btn btn-primary. + */ + browseClass?: string; + /** + the label to display for the file remove button. Defaults to Remove. + */ + removeLabel?: string; + /** + the icon to display before the label for the file picker/remove button. Defaults to  . + */ + removeIcon?: string; + /** + the CSS class for the file remove button. Defaults to btn btn-default. + */ + removeClass?: string; + /** + the title to display on hover for the file remove button. Defaults to Clear selected files. + */ + removeTitle?: string; + /** + the label to display for the file upload button. Defaults to Upload. + */ + uploadLabel?: string; + /** + the icon to display before the label for the file upload button. Defaults to  . + */ + uploadIcon?: string; + /** + the CSS class for the file upload button. Defaults to btn btn-default. + */ + uploadClass?: string; + /** + the title to display on hover for the file remove button. + Defaults to Upload selected files. + */ + uploadTitle?: string; + /** + the URL for the upload processing action (typically for ajax based processing). + Defaults to null. + If this is not set or null, then the upload button action will default to form submission. + NOTE: + This is MANDATORY if you want to use advanced features like drag & drop, append/remove files, selectively upload files via ajax etc. + The plugin automatically send $_FILES data to the server with the input `name` attribute as the key if provided. + If input name is not set, the key defaults to file-data. + */ + uploadUrl?: string; + /** + whether the batch upload of multiple files will be asynchronous/in parallel. + Defaults to true. + */ + uploadAsync?: boolean; + /** + the extra data that will be passed as data to the url/AJAX server call via POST. + This property is only applicable for ajax uploads and when you have set a value for uploadUrl. + This can be setup either as an object (associative array of keys and values) or as a function callback. + As an object, it can be set for example as: + { id: 100, value: '100 Details' } + Note that for uploading individual file via thumbnail, the function callback can also receive the thumbnail previewId and index as parameters. These are described below: + previewId: the identifier for the preview file container (only available when uploading each thumbnail file) + index: the zero-based sequential index of the loaded file in the preview list (only available when uploading each thumbnail file) + */ + uploadExtraData?: {} | ((previewId?: string, index?: number) => {}); + /** + the minimum allowed image height in px if you are uploading image files. + Defaults to null which means no limit on image height. + */ + minImageHeight?: number; + /** + the maximum allowed image width in px if you are uploading image files. + Defaults to null which means no limit on image width. + Note that if you set resizeImage property to true, then the entire image will be resized within this width (depending on resizePreference). + */ + maxImageWidth?: number; + /** + the maximum allowed image height in px if you are uploading image files. + Defaults to null which means no limit on image height. + Note that if you set resizeImage property to true, then the entire image will be resized within this height (depending on resizePreference). + */ + maxImageHeight?: number; + /** + whether to add ability to resize uploaded images. Defaults to false. + Note that resizing images requires HTML5 canvas support which is supported on most modern browsers. + In addition, you must include the JavaScript-Canvas-to-Blob plugin by blueimp by including canvas-to-blob.js in your application. + This JS file must be loaded before fileinput.js on the page. + The JavaScript-Canvas-to-Blob source files are available in js/plugins folder of bootstrap-fileinput project page. + The canvas-to-blob.js plugin is a polyfill for canvas.toBlob method and is needed for allowing the resized image files via HTML5 canvas to be returned as a blob + */ + resizeImage?: boolean; + /** + preference to resize the image based on width or height. + Defaults to width. + This property is parsed only when resizeImage is true. + If set to width, the maxImageWidth property is first tested and if image size is greater than this, then the image is resized to maxImageWidth. + The image height is resized and adjusted in the same ratio as width. + In case, the image width is already less than maxImageWidth then the maxImageHeight property is used to resize and width is adjusted in same ratio. + This will behave conversely, when resizePreference is set to height - the maxImageHeight will be first tested against image height and then the rest of steps will be similarly parsed with preference given to height instead of width as before. + */ + resizePreference?: "width" | "height"; + /** + the quality of the resized image. This must be a decimal number between 0.00 to 1.00. + Defaults to 0.92. + */ + resizeImageQuality?: number; + /** + the default image mime type of the converted image after resize. + Defaults to image/jpeg. + */ + resizeDefaultImageType?: string; + /** + the maximum file size for upload in KB. + If set to 0, it means size allowed is unlimited. + Defaults to 0. + */ + maxFileSize?: number; + /** + the minimum number of files allowed for each multiple upload. + If set to 0, it means number of files are optional. + Defaults to 0. + */ + minFileCount?: number; + /** + the maximum number of files allowed for each multiple upload. + If set to 0, it means number of files allowed is unlimited. + Defaults to 0. + */ + maxFileCount?: number; + /** + whether to include initial preview file count (server uploaded files) in validating minFileCount and maxFileCount. + Defaults to false. + */ + validateInitialCount?: boolean; + /** + the message that will be displayed when ZERO files are found. + Defaults to No. + */ + msgNo?: string; + /** + the message that will be displayed within the progress bar when file upload is aborted or cancelled. + Defaults to Cancelled. + */ + msgCancelled?: string; + /** + the title displayed (before the file name) on hover of the zoom button for zooming the file content in a modal window. + This is currently applicable only for text file previews. + Defaults to View details. + */ + msgZoomTitle?: string; + /** + the heading of the modal dialog that displays the zoomed file content. + This is currently applicable only for text file previews. + Defaults to Detailed Preview. + */ + msgZoomModalHeading?: string; + /** + the message to be displayed when the file size exceeds maximum size. + Defaults to: + File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB. Please retry your upload! + where: + {name}: will be replaced by the file name being uploaded + {size}: will be replaced by the uploaded file size + {maxSize}: will be replaced by the maxFileSize parameter. + */ + msgSizeTooLarge?: string; + /** + message to be displayed when the file count is less than the minimum count as set in minFileCount. + Defaults to: + You must select at least {n} {files} to upload. Please retry your upload! + where: + {n}: will be replaced by the allowed minimum files as set in minFileCount. + {files}: will be replaced with fileSingle or filePlural properties in locale file depending on the minFileCount. + */ + msgFilesTooLess?: string; + /** + the message to be displayed when the file count exceeds maximum count as set in maxFileCount. + Defaults to: + Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}. Please retry your upload! + where: + {n}: will be replaced by number of files selected for upload + {m}: will be replaced by the allowed maximum files as set in maxFileCount + */ + msgFilesTooMany?: string; + /** + the exception message to be displayed when the file selected is not found by the FileReader. + Defaults to: + File "{name}" not found! + where: + {name}: will be replaced by the file name being uploaded + */ + msgFileNotFound?: string; + /** + the exception message to be displayed when the file selected is not allowed to be accessed due to a security exception. + Defaults to: + Security restrictions prevent reading the file "{name}". + where: + {name}: will be replaced by the file name being uploaded + */ + msgFileSecured?: string; + /** + the exception message to be displayed when the file selected is not readable by the FileReader API. + Defaults to: + File "{name}" is not readable. + where: + {name}: will be replaced by the file name being uploaded + */ + msgFileNotReadable?: string; + /** + the exception message to be displayed when the file preview upload is aborted. + Defaults to: + File preview aborted for "{name}". + where: + {name}: will be replaced by the file name being uploaded + */ + msgFilePreviewAborted?: string; + /** + the exception message to be displayed for any other error when previewing the file. + Defaults to: + An error occurred while reading the file "{name}". + where: + {name}: will be replaced by the file name being uploaded + */ + msgFilePreviewError?: string; + /** + the message to be displayed when the file type is not in one of the file types set in allowedFileTypes. + Defaults to: + Invalid type for file "{name}". Only "{types}" files are supported. + where: + {name}: will be replaced by the file name being uploaded + {types}: will be replaced by the comma separated list of types defined in allowedFileTypes. + */ + msgInvalidFileType?: string; + /** + the message to be displayed when the file type is not in one of the file extensions set in allowedFileExtensions. + Defaults to: + Invalid extension for file "{name}". Only "{extensions}" files are supported. + where: + {name}: will be replaced by the file name being uploaded + {extensions}: will be replaced by the comma separated list of extensions defined in allowedFileExtensions. + */ + msgInvalidFileExtension?: string; + /** + the message to be displayed when an ongoing ajax file upload is aborted by pressing the Cancel button. + Defaults to The file upload was aborted. + If this is set to null or empty, the internal ajax error message will be displayed - Defaults to File Upload Error. + */ + msgUploadAborted?: string; + /** + the exception message to be displayed within the caption container (instead of msgFilesSelected), when a validation error is encountered. + Defaults to File Upload Error. + */ + msgValidationError?: string; + /** + the css class for the validation error message displayed in the caption container. + Defaults to text-danger. + */ + msgValidationErrorClass?: string; + /** + the icon to be displayed before the validation error in the caption container. + Defaults to + */ + msgValidationErrorIcon?: string; + /** + the css class for the error message to be displayed in the preview window when the file size exceeds maxSize. + Defaults to file-error-message. + */ + msgErrorClass?: string; + /** + the message displayed when the files are getting read and loaded for preview. + Defaults to + Loading file {index} of {files} … + The following special variables will be replaced: + {index}: the sequence number of the current file being loaded. + {files}: the total number of files selected for upload. + */ + msgLoading?: string; + /** + the progress message displayed as each file is loaded for preview. + Defaults to: + Loading file {index} of {files} - {name} - {percent}% completed. + The following variables will be replaced: + {index}: the sequence number of the current file being loaded. + {files}: the total number of files selected for upload. + {percent}: the percentage of file read and loaded. + {name}: the name of the current file being loaded. + */ + msgProgress?: string; + /** + the progress message displayed in caption window when multiple (more than one) files are selected. + Defaults to: + {n} files selected. + The following variables will be replaced: + {n}: the number of files selected. + */ + msgSelected?: string; + /** + the message displayed when a folder has been dragged to the drop zone. + Defaults to: + Drag & drop files only! {n} folder(s) dropped were skipped. + The following variables will be replaced: + {n}: the number of folders dropped. + */ + msgFoldersNotAllowed?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its width is less than the minImageWidth setting. + Defaults to: + Width of image file "{name}" must be at least {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the minImageWidth setting. + */ + msgImageWidthSmall?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its height is less than the minImageHeight setting. + Defaults to: + Height of image file "{name}" must be at least {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the minImageHeight setting. + */ + msgImageHeightSmall?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its width exceeds the maxImageWidth setting. + Defaults to: + Width of image file "{name}" cannot exceed {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the maxImageWidth setting. + */ + msgImageWidthLarge?: string; + /** + the exception message to be displayed when the file selected for preview is an image and its height exceeds the maxImageHeight setting. + Defaults to: + Height of image file "{name}" cannot exceed {size} px. + where: + {name}: will be replaced by the file name being uploaded. + {size}: will be replaced by the maxImageHeight setting. + */ + msgImageHeightLarge?: string; + /** + the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). + Defaults to progress-bar progress-bar-success progress-bar-striped active. + */ + progressClass?: string; + /** + the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). + Defaults to progress-bar progress-bar-success progress-bar-striped active. + */ + progressCompleteClass?: string; + /** + the upload progress bar CSS class to be applied when AJAX upload is cancelled or aborted. + Defaults to progress-bar progress-bar-danger. + */ + progressErrorClass?: string; + /** + the type of files that are to be displayed in the preview window. + Defaults to image. + Can be one of the following: + image: Only image type files will be shown in preview. + text: Only text type files will be shown in preview. + any: Both image and text files content will be shown in preview. + Files other than image or text will be displayed as a thumbnail with the filename in the preview window. + */ + previewFileType?: "image" | "text" | "any"; + /** + the icon for zooming the file content in a new modal dialog. + This is currently applicable only for text file previews. + Defaults to + */ + zoomIndicator?: string; + /** + the identifier for the container element displaying the error (e.g. '#id'). + If not set, will default to the container with CSS class kv-fileinput-error inside the preview container (identified by elPreviewContainer). + The msgErrorClass will be automatically appended to this container before displaying the error. + */ + elErrorContainer?: string; + /** + the identifier for the container element containing the caption (e.g. '#id'). + If not set, will default to the container with CSS class file-caption inside the main plugin container. + */ + elCaptionContainer?: string; + /** + the identifier for the container element containing the caption text (e.g. '#id'). + If not set, will default to the container with CSS class file-caption-name inside the main plugin container. + */ + elCaptionText?: string; + /** + the identifier for the container element containing the preview (e.g. '#id'). + If not set, will default to the container with CSS class file-preview inside the main plugin container. + */ + elPreviewContainer?: string; + /** + the identifier for the element containing the preview image thumbnails (e.g. '#id'). + If not set, will default to the container with CSS class file-preview-thumbnails inside the main plugin container. + */ + elPreviewImage?: string; + /** + the identifier for the element containing the preview progress status (e.g. '#id'). + If not set, will default to the container with CSS class file-preview-status inside the main plugin container. + */ + elPreviewStatus?: string; + /** + a callback to convert the filename as a slug string eliminating special characters. + If not set, it will use the plugin's own internal slugDefault method. + This callback function includes the filename as parameter and must return a converted filename string. + */ + slugCallback?: (filename: string) => string; + /** + whether to enable a drag and drop zone for dragging and dropping files to. + This is available only for ajax based uploads. + Defaults to true. + */ + dropZoneEnabled?: boolean; + /** + title to be displayed in the drag and drop zone. + This is available only for ajax based uploads. + Defaults to: + Drag & drop files here …. + */ + dropZoneTitle?: string; + /** + CSS class for the drag & drop zone title. + Defaults to file-drop-zone-title. + */ + dropZoneTitleClass?: string; + /** + configuration for setting up file actions for newly selected file thumbnails in the preview window. + */ + fileActionsettings?: FileActionSettings; + /** + markup for additional action buttons to display within the initial preview thumbnails (for example displaying an image edit button). + The following tag can be used in the markup and will be automatically replaced: + {dataKey}: Will be replaced with the key set within initialPreviewConfig. + */ + otherActionButtons?: string; + /** + the encoding to be used while reading a text file. + Applicable only for previewing text files. + Defaults to UTF-8. + */ + textEncoding?: string; + /** + additional ajax settings to pass to the plugin before submitting the ajax request for upload. + Applicable only for ajax uploads. + This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. + Refer the jQuery ajax documentation for the various settings you can configure. + */ + ajaxSettings?: JQueryAjaxSettings; + /** + additional ajax settings to pass to the plugin before submitting the delete ajax request in each initial preview thumbnail. + Applicable only for ajax uploads. + This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. + Refer the jQuery ajax documentation for the various settings you can configure. + */ + ajaxDeleteSettings?: JQueryAjaxSettings; + /** + whether to show details of the error stack from the server log when an error is encountered via ajax response. + Defaults to true. + */ + showAjaxErrorDetails?: boolean; + } -interface IFileUploadLayoutTemplates { - /** - the template for rendering the widget with caption. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the mainClass property. - {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. - {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. - {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. - {remove}: the file remove/clear button and will be displayed only if showRemove is true. - {upload}: the file upload button and will be displayed only if showUpload is true. - {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. - {browse}: the main file browse button to select your files for input. - */ - main1?: string; - /** - the template for rendering the widget without caption. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the mainClass property. - {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. - {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. - {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. - {remove}: the file remove/clear button and will be displayed only if showRemove is true. - {upload}: the file upload button and will be displayed only if showUpload is true. - {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. - {browse}: the main file browse button to select your files for input. - */ - main2?: string; - /** - the template for rendering the preview. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the previewClass property. - */ - preview?: string; - /** - the icon to render before the caption text. - */ - icon?: string; - /** - the template for rendering the caption. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the captionClass property. - */ - caption?: string; - /** - the template for rendering the modal (for text file preview zooming). - */ - modal?: string; - /** - the template for the progress bar when upload is in progress (for batch/mass uploads and within each preview thumbnail for async/single uploads). - The upload progress bar when displayed within each thumbnail will be wrapped inside a container having a CSS class of `file-thumb-progress`. - The following tags will be parsed and replaced automatically: - {percent}: will be replaced with the upload progress percentage. - */ - progress?: string; - /** - the template for the footer section of each file preview thumbnail. - The following tags will be parsed and replaced automatically: - {actions}: will be replaced with the output of the actions template. - {class}: the CSS class as set in the progressClass or progressCompleteClass property (depending on the progress percentage). - */ - footer?: string; - /** - the template for the file action buttons to be displayed within the thumbnail footer. - The following tags will be parsed and replaced automatically: - {upload}: will be replaced with the output of the actionUpload template. - {delete}: will be replaced with the output of the actionDelete template. - */ - actions?: string; - /** - the template for the file delete action button within the thumbnail footer. - The following tags will be parsed and replaced automatically: - {removeClass}: the css class for the remove button. Will be replaced with the removeClass set within fileActionSettings. - {removeIcon}: the icon for the remove button. Will be replaced with the removeIcon set within fileActionSettings. - {removeTitle}: the title to display on hover for the remove button. Will be replaced with the removeTitle set within fileActionSettings. - {dataUrl}: the URL for deleting the file thumbnail for initialPreview content only. Will be replaced with the url set within initialPreviewConfig. - {dataKey}: the key (additional data) that will be passed to the URL above via POST to the AJAX call. Will be replaced with the key set within initialPreviewConfig. - */ - actionDelete?: string; - /** - the template for the file upload action button within the thumbnail footer. - The following tags will be parsed and replaced automatically: - {uploadClass}: the css class for the upload button. Will be replaced with the uploadClass set within fileActionSettings. - {uploadIcon}: the icon for the upload button. Will be replaced with the uploadIcon set within fileActionSettings. - {uploadTitle}: the title to display on hover for the upload button. Will be replaced with the uploadTitle set within fileActionSettings. - */ - actionUpload?: string; - /** - The template for upload, remove, and cancel buttons. - The following tags will be parsed and replaced automatically: - {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. - {title}: the title to display on button hover. - {css}: the CSS class for the button. This is derived from settings for uploadClass or removeClass or cancelClass. - {status}: the disabled status for the button if available (else will be blank). - {icon}: the button icon as identified by uploadIcon or removeIcon or cancelIcon. - {label}: the button label as identified by uploadLabel or removeLabel or cancelLabel. - */ - btnDefault?: string; - /** - The template for upload button when used with ajax (i.e. when uploadUrl is set). - The following tags will be parsed and replaced automatically: - {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. - {title}: the title to display on button hover. - {css}: the CSS class for the button. This is derived from settings for uploadClass. - {status}: the disabled status for the button if available (else will be blank). - {icon}: the button icon as identified by uploadIcon. - {label}: the button label as identified by uploadLabel. - {href}: applicable only for Upload button for ajax uploads and will be replaced with the uploadUrl property. - */ - btnLink?: string; - /** - The template for the browse button. - {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. - {title}: the title to display on button hover. - {css}: the CSS class for the button. This is derived from settings for browseClass. - {status}: the disabled status for the button if available (else will be blank). - {icon}: the button icon as identified by browseIcon. - {label}: the button label as identified by browseLabel. - */ - btnBrowse?: string; -} + interface PreviewConfig { + /** + the caption or filename to display for each initial preview item content. + */ + caption: string; + /** + the CSS width of the image/ content displayed. + */ + width: string; + /** + the URL for deleting the image/ content in the initial preview via AJAX post response.This will default to deleteUrl if not set. + */ + url: string; + /** + the key that will be passed as data to the url via AJAX POST. + */ + key: string | {}; + /** + the additional frame css class to set for the file's thumbnail frame. + */ + frameClass: string; + /** + the HTML attribute settings (set as key:value pairs) for the thumbnail frame. + */ + frameAttr: {}; + /** + the extra data that will be passed as data to the initial preview delete url / AJAX server call via POST.This will default to deleteExtraData if not set. + */ + extra: {} | Function; + } -interface IFileUploadPreviewTemplates { - /** - the preview template for image files. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ - image?: string; - /** - the preview template for text files. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - {dialog}: Will be replaced with the JS code to launch the modal dialog. - {zoomTitle}: This will be replaced with the msgZoomTitle property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). - {zoomInd}: This will be replaced with the zoomIndicator property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). - {heading}: This represents the modal dialog heading title. This will be replaced with the msgZoomModalHeading property. - */ - text?: string; - /** - the preview template for html files. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ - html?: string; - /** - the preview template for video files (supported by HTML 5 video tag). - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ - video?: string; - /** - the preview template for audio files (supported by HTML 5 audio tag). - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ - audio?: string; - /** - the preview template for flash files (supported currently on webkit browsers). - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ - flash?: string; - /** - the preview template for all other files - by default treated as object. To disable this behavior, configure the allowedPreviewTypes property. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ - object?: string; - /** - this template is used ONLY for rendering the initialPreview markup content passed directly as a raw format. - The following tags will be parsed and replaced automatically: - {content}: will be replaced with the raw HTML markup as set in initialPreview.. - */ - generic?: string; -} + interface LayoutTemplates { + /** + the template for rendering the widget with caption. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the mainClass property. + {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. + {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. + {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. + {remove}: the file remove/clear button and will be displayed only if showRemove is true. + {upload}: the file upload button and will be displayed only if showUpload is true. + {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. + {browse}: the main file browse button to select your files for input. + */ + main1?: string; + /** + the template for rendering the widget without caption. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the mainClass property. + {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. + {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. + {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. + {remove}: the file remove/clear button and will be displayed only if showRemove is true. + {upload}: the file upload button and will be displayed only if showUpload is true. + {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. + {browse}: the main file browse button to select your files for input. + */ + main2?: string; + /** + the template for rendering the preview. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the previewClass property. + */ + preview?: string; + /** + the icon to render before the caption text. + */ + icon?: string; + /** + the template for rendering the caption. + The following tags will be parsed and replaced automatically: + {class}: the CSS class as set in the captionClass property. + */ + caption?: string; + /** + the template for rendering the modal (for text file preview zooming). + */ + modal?: string; + /** + the template for the progress bar when upload is in progress (for batch/mass uploads and within each preview thumbnail for async/single uploads). + The upload progress bar when displayed within each thumbnail will be wrapped inside a container having a CSS class of `file-thumb-progress`. + The following tags will be parsed and replaced automatically: + {percent}: will be replaced with the upload progress percentage. + */ + progress?: string; + /** + the template for the footer section of each file preview thumbnail. + The following tags will be parsed and replaced automatically: + {actions}: will be replaced with the output of the actions template. + {class}: the CSS class as set in the progressClass or progressCompleteClass property (depending on the progress percentage). + */ + footer?: string; + /** + the template for the file action buttons to be displayed within the thumbnail footer. + The following tags will be parsed and replaced automatically: + {upload}: will be replaced with the output of the actionUpload template. + {delete}: will be replaced with the output of the actionDelete template. + */ + actions?: string; + /** + the template for the file delete action button within the thumbnail footer. + The following tags will be parsed and replaced automatically: + {removeClass}: the css class for the remove button. Will be replaced with the removeClass set within fileActionSettings. + {removeIcon}: the icon for the remove button. Will be replaced with the removeIcon set within fileActionSettings. + {removeTitle}: the title to display on hover for the remove button. Will be replaced with the removeTitle set within fileActionSettings. + {dataUrl}: the URL for deleting the file thumbnail for initialPreview content only. Will be replaced with the url set within initialPreviewConfig. + {dataKey}: the key (additional data) that will be passed to the URL above via POST to the AJAX call. Will be replaced with the key set within initialPreviewConfig. + */ + actionDelete?: string; + /** + the template for the file upload action button within the thumbnail footer. + The following tags will be parsed and replaced automatically: + {uploadClass}: the css class for the upload button. Will be replaced with the uploadClass set within fileActionSettings. + {uploadIcon}: the icon for the upload button. Will be replaced with the uploadIcon set within fileActionSettings. + {uploadTitle}: the title to display on hover for the upload button. Will be replaced with the uploadTitle set within fileActionSettings. + */ + actionUpload?: string; + /** + The template for upload, remove, and cancel buttons. + The following tags will be parsed and replaced automatically: + {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + {title}: the title to display on button hover. + {css}: the CSS class for the button. This is derived from settings for uploadClass or removeClass or cancelClass. + {status}: the disabled status for the button if available (else will be blank). + {icon}: the button icon as identified by uploadIcon or removeIcon or cancelIcon. + {label}: the button label as identified by uploadLabel or removeLabel or cancelLabel. + */ + btnDefault?: string; + /** + The template for upload button when used with ajax (i.e. when uploadUrl is set). + The following tags will be parsed and replaced automatically: + {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + {title}: the title to display on button hover. + {css}: the CSS class for the button. This is derived from settings for uploadClass. + {status}: the disabled status for the button if available (else will be blank). + {icon}: the button icon as identified by uploadIcon. + {label}: the button label as identified by uploadLabel. + {href}: applicable only for Upload button for ajax uploads and will be replaced with the uploadUrl property. + */ + btnLink?: string; + /** + The template for the browse button. + {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + {title}: the title to display on button hover. + {css}: the CSS class for the button. This is derived from settings for browseClass. + {status}: the disabled status for the button if available (else will be blank). + {icon}: the button icon as identified by browseIcon. + {label}: the button label as identified by browseLabel. + */ + btnBrowse?: string; + } -interface IFileUploadPreviewSettings { - image?: { width?: string; height?: string; }; - html?: { width?: string; height?: string; }; - text?: { width?: string; height?: string; }; - video?: { width?: string; height?: string; }; - audio?: { width?: string; height?: string; }; - flash?: { width?: string; height?: string; }; - object?: { width?: string; height?: string; }; - other?: { width?: string; height?: string; }; -} + interface PreviewTemplates { + /** + the preview template for image files. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + image?: string; + /** + the preview template for text files. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + {dialog}: Will be replaced with the JS code to launch the modal dialog. + {zoomTitle}: This will be replaced with the msgZoomTitle property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). + {zoomInd}: This will be replaced with the zoomIndicator property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). + {heading}: This represents the modal dialog heading title. This will be replaced with the msgZoomModalHeading property. + */ + text?: string; + /** + the preview template for html files. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + html?: string; + /** + the preview template for video files (supported by HTML 5 video tag). + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + video?: string; + /** + the preview template for audio files (supported by HTML 5 audio tag). + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + audio?: string; + /** + the preview template for flash files (supported currently on webkit browsers). + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + flash?: string; + /** + the preview template for all other files - by default treated as object. To disable this behavior, configure the allowedPreviewTypes property. + The following tags will be parsed and replaced automatically: + {previewId}: will be replaced with the generated identifier for the preview frame container. + {data}: will be replaced with the data source for each preview type. + {width}: will be replaced with the width for the file type as set in previewSettings. + {height}: will be replaced with the height for the file type as set in previewSettings. + {caption}: will be replaced with the file name. + {type}: will be replaced with the file type. + */ + object?: string; + /** + this template is used ONLY for rendering the initialPreview markup content passed directly as a raw format. + The following tags will be parsed and replaced automatically: + {content}: will be replaced with the raw HTML markup as set in initialPreview.. + */ + generic?: string; + } -interface IFileUploadFileTypeSettings { - image: (vType: string, vName: string) => boolean; - html: (vType: string, vName: string) => boolean; - text: (vType: string, vName: string) => boolean; - video: (vType: string, vName: string) => boolean; - audio: (vType: string, vName: string) => boolean; - flash: (vType: string, vName: string) => boolean; - object: (vType: string, vName: string) => boolean; - other: (vType: string, vName: string) => boolean; -} + interface PreviewSettings { + image?: { width?: string; height?: string; }; + html?: { width?: string; height?: string; }; + text?: { width?: string; height?: string; }; + video?: { width?: string; height?: string; }; + audio?: { width?: string; height?: string; }; + flash?: { width?: string; height?: string; }; + object?: { width?: string; height?: string; }; + other?: { width?: string; height?: string; }; + } -interface IFileUploadPreviewFileIconSettings { - [key: string]: string; -} + interface FileTypeSettings { + image: (vType: string, vName: string) => boolean; + html: (vType: string, vName: string) => boolean; + text: (vType: string, vName: string) => boolean; + video: (vType: string, vName: string) => boolean; + audio: (vType: string, vName: string) => boolean; + flash: (vType: string, vName: string) => boolean; + object: (vType: string, vName: string) => boolean; + other: (vType: string, vName: string) => boolean; + } -interface IFileUploadPreviewFileExtSettings { - [key: string]: (ext: string) => boolean; -} + interface PreviewFileIconSettings { + [key: string]: string; + } -interface IFileUploadFileActionSettings { - /** - icon for remove button to be displayed in each file thumbnail. - */ - removeIcon: string; - /** - CSS class for the remove button in each file thumbnail. - */ - removeClass: string; - /** - title for remove button in each file thumbnail. - */ - removeTitle: string; - /** - icon for upload button to be displayed in each file thumbnail. - */ - uploadIcon: string; - /** - CSS class for the remove button in each file thumbnail. - */ - uploadClass: string; - /** - title for remove button in each file thumbnail. - */ - uploadTitle: string; - /** - an indicator (HTML markup) for new pending upload displayed in each file thumbnail. - */ - indicatorNew: string; - /** - an indicator (HTML markup) for successful upload displayed in each file thumbnail. - */ - indicatorSuccess: string; - /** - an indicator (HTML markup) for error in upload displayed in each file thumbnail. - */ - indicatorError: string; - /** - an indicator (HTML markup) for ongoing upload displayed in each file thumbnail. - */ - indicatorLoading: string; - /** - title to display on hover of indicator for new pending upload in each file thumbnail. - */ - indicatorNewTitle: string; - /** - title to display on hover of indicator for successful in each file thumbnail. - */ - indicatorSuccessTitle: string; - /** - title to display on hover of indicator for error in upload in each file thumbnail. - */ - indicatorErrorTitle: string; - /** - title to display on hover of indicator for ongoing upload in each file thumbnail. - */ - indicatorLoadingTitle: string; + interface PreviewFileExtSettings { + [key: string]: (ext: string) => boolean; + } + + interface FileActionSettings { + /** + icon for remove button to be displayed in each file thumbnail. + */ + removeIcon: string; + /** + CSS class for the remove button in each file thumbnail. + */ + removeClass: string; + /** + title for remove button in each file thumbnail. + */ + removeTitle: string; + /** + icon for upload button to be displayed in each file thumbnail. + */ + uploadIcon: string; + /** + CSS class for the remove button in each file thumbnail. + */ + uploadClass: string; + /** + title for remove button in each file thumbnail. + */ + uploadTitle: string; + /** + an indicator (HTML markup) for new pending upload displayed in each file thumbnail. + */ + indicatorNew: string; + /** + an indicator (HTML markup) for successful upload displayed in each file thumbnail. + */ + indicatorSuccess: string; + /** + an indicator (HTML markup) for error in upload displayed in each file thumbnail. + */ + indicatorError: string; + /** + an indicator (HTML markup) for ongoing upload displayed in each file thumbnail. + */ + indicatorLoading: string; + /** + title to display on hover of indicator for new pending upload in each file thumbnail. + */ + indicatorNewTitle: string; + /** + title to display on hover of indicator for successful in each file thumbnail. + */ + indicatorSuccessTitle: string; + /** + title to display on hover of indicator for error in upload in each file thumbnail. + */ + indicatorErrorTitle: string; + /** + title to display on hover of indicator for ongoing upload in each file thumbnail. + */ + indicatorLoadingTitle: string; + } } \ No newline at end of file From a1a15346625f2f8d009d6e468d3025b2813ddedd Mon Sep 17 00:00:00 2001 From: CheCoxshall Date: Fri, 1 Apr 2016 22:31:39 +0100 Subject: [PATCH 0103/1506] Added JQuery Reference --- bootstrap-fileinput/bootstrap-fileinput.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-fileinput/bootstrap-fileinput.d.ts b/bootstrap-fileinput/bootstrap-fileinput.d.ts index e9d6f0e0d3..fadfadd612 100644 --- a/bootstrap-fileinput/bootstrap-fileinput.d.ts +++ b/bootstrap-fileinput/bootstrap-fileinput.d.ts @@ -3,6 +3,8 @@ // Definitions by: Ché Coxshall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + interface JQuery { fileinput: (options?: BootstrapFileInput.FileInputOptions) => JQuery; } From ff0f1a4bd30f6070676e76a7b9c9adbc7bab57f9 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 12:34:53 +1000 Subject: [PATCH 0104/1506] added basic test file. --- revalidator/revalidator-test.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 revalidator/revalidator-test.ts diff --git a/revalidator/revalidator-test.ts b/revalidator/revalidator-test.ts new file mode 100644 index 0000000000..3ad56947dc --- /dev/null +++ b/revalidator/revalidator-test.ts @@ -0,0 +1,4 @@ + +import * as revalidator from 'revalidator'; + +// revalidator.revalidate(values, this.state.validationSchema, null) \ No newline at end of file From adcaa9534f785587096c787f98a990cb1bbb1072 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 12:35:41 +1000 Subject: [PATCH 0105/1506] Name update. --- revalidator/{revalidator-test.ts => revalidator-tests.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename revalidator/{revalidator-test.ts => revalidator-tests.ts} (100%) diff --git a/revalidator/revalidator-test.ts b/revalidator/revalidator-tests.ts similarity index 100% rename from revalidator/revalidator-test.ts rename to revalidator/revalidator-tests.ts From e1b48ff99402b979d316472d1daeb2ce51061731 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 12:43:53 +1000 Subject: [PATCH 0106/1506] Update documentation spec. Update test to include ES5 typescript import. --- revalidator/revalidator-tests.ts | 3 +-- revalidator/revalidator.d.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/revalidator/revalidator-tests.ts b/revalidator/revalidator-tests.ts index 3ad56947dc..cc04ed882e 100644 --- a/revalidator/revalidator-tests.ts +++ b/revalidator/revalidator-tests.ts @@ -1,4 +1,3 @@ - -import * as revalidator from 'revalidator'; +/// // revalidator.revalidate(values, this.state.validationSchema, null) \ No newline at end of file diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index b41e7cd03e..3d011f2f99 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -1,5 +1,5 @@ // Type definitions for revalidator 0.3.1 - +// Project: https://github.com/flatiron/revalidator // Definitions by: Jason Turner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 177e37a21b894e7b84e480b1602e403de535b808 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 12:46:43 +1000 Subject: [PATCH 0107/1506] Removed white space in name. --- revalidator/revalidator.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index 3d011f2f99..93d2e105a5 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -1,6 +1,6 @@ // Type definitions for revalidator 0.3.1 // Project: https://github.com/flatiron/revalidator -// Definitions by: Jason Turner +// Definitions by: Jason Turner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Revalidator { From b171677b5a1d9090d6b39c602dcaf8ed5f44f4c4 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 12:49:00 +1000 Subject: [PATCH 0108/1506] whitespace fixup --- revalidator/revalidator.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index 93d2e105a5..4b6511f959 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -1,6 +1,6 @@ // Type definitions for revalidator 0.3.1 // Project: https://github.com/flatiron/revalidator -// Definitions by: Jason Turner +// Definitions by: Jason Turner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Revalidator { From 518321e8e56797447adcdae5942db0f3c3699030 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 12:59:02 +1000 Subject: [PATCH 0109/1506] Added basic schema information. --- revalidator/revalidator.d.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index 4b6511f959..b06bf7cce9 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -5,7 +5,34 @@ declare module Revalidator { interface RevalidatorStatic { - validate(object: any, schema: any, options: any): any; + validate(object: any, schema: ISchema, options: any): IReturnMessage; + } + + interface IReturnMessage { + valid: boolean; + errors: string[]; + } + + interface ISchema { + required?: boolean; + type: string; + pattern?: any; + maxLength?: number; + minLength?: number; + minimum?: number; + maximum?: number; + allowEmpty: boolean; + exclusiveMinimum: number; + exclusiveMaximum?: number; + divisibleBy?: number; + minItems?: number; + maxItems?: number; + uniqueItems?: boolean; + enum?: any; + format?: string; + conform?: (data) => boolean; + depdendencies?: string; + } } From 2a6fd2e66684be68a5d0998829431c55e16a8c77 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 13:03:54 +1000 Subject: [PATCH 0110/1506] updated based on feedback. --- revalidator/revalidator-tests.ts | 2 +- revalidator/revalidator.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/revalidator/revalidator-tests.ts b/revalidator/revalidator-tests.ts index cc04ed882e..b65c9f971b 100644 --- a/revalidator/revalidator-tests.ts +++ b/revalidator/revalidator-tests.ts @@ -1,3 +1,3 @@ /// -// revalidator.revalidate(values, this.state.validationSchema, null) \ No newline at end of file +revalidator.validate(null, null, null); \ No newline at end of file diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index b06bf7cce9..c1e03207b4 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -30,7 +30,7 @@ declare module Revalidator { uniqueItems?: boolean; enum?: any; format?: string; - conform?: (data) => boolean; + conform?: (data:any) => boolean; depdendencies?: string; } From 9a474d26f5dbed29d3ad93d80207356db090504a Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 4 Apr 2016 14:41:09 +1000 Subject: [PATCH 0111/1506] Updated error interface from simple strings. --- revalidator/revalidator.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/revalidator/revalidator.d.ts b/revalidator/revalidator.d.ts index c1e03207b4..63f492e9c3 100644 --- a/revalidator/revalidator.d.ts +++ b/revalidator/revalidator.d.ts @@ -8,9 +8,14 @@ declare module Revalidator { validate(object: any, schema: ISchema, options: any): IReturnMessage; } + interface IErrrorProperty { + property: string; + message: string; + } + interface IReturnMessage { valid: boolean; - errors: string[]; + errors: IErrrorProperty[]; } interface ISchema { @@ -40,4 +45,4 @@ declare var revalidator: Revalidator.RevalidatorStatic; declare module "revalidator" { export = revalidator; -} +} \ No newline at end of file From 13be4bad06dacc4c4243a50ad383c2a9e68b6e50 Mon Sep 17 00:00:00 2001 From: Stefan Loikkanen Date: Tue, 5 Apr 2016 11:44:35 +0200 Subject: [PATCH 0112/1506] Added optional callback for close function --- ws/ws.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ws/ws.d.ts b/ws/ws.d.ts index 83ba9dec92..d9a1338d21 100644 --- a/ws/ws.d.ts +++ b/ws/ws.d.ts @@ -110,7 +110,7 @@ declare module "ws" { constructor(options?: IServerOptions, callback?: Function); - close(): void; + close(cb?: () => {}): void; handleUpgrade(request: http.ServerRequest, socket: net.Socket, upgradeHead: Buffer, callback: (client: WebSocket) => void): void; From 62e1efd40289dc0e43e48a8da3f7f67081aba509 Mon Sep 17 00:00:00 2001 From: hellopao Date: Wed, 6 Apr 2016 10:31:21 +0800 Subject: [PATCH 0113/1506] add definitions for koa-favicon --- koa-favicon/koa-favicon-tests.ts | 11 ++++++++++ koa-favicon/koa-favicon.d.ts | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 koa-favicon/koa-favicon-tests.ts create mode 100644 koa-favicon/koa-favicon.d.ts diff --git a/koa-favicon/koa-favicon-tests.ts b/koa-favicon/koa-favicon-tests.ts new file mode 100644 index 0000000000..5f2e0ac3f0 --- /dev/null +++ b/koa-favicon/koa-favicon-tests.ts @@ -0,0 +1,11 @@ +/// +/// + +import * as Koa from "koa"; +import favicon = require("koa-favicon"); + +const app = new Koa(); + +app.use(favicon(__dirname + "/public/favicon.ico")); + +app.listen(80) \ No newline at end of file diff --git a/koa-favicon/koa-favicon.d.ts b/koa-favicon/koa-favicon.d.ts new file mode 100644 index 0000000000..618683fc76 --- /dev/null +++ b/koa-favicon/koa-favicon.d.ts @@ -0,0 +1,35 @@ +// Type definitions for koa-favicon v2.x +// Project: https://github.com/koajs/favicon +// Definitions by: Jerry Chin +// Definitions: https://github.com/hellopao/DefinitelyTyped + +/* =================== USAGE =================== + + import favicon = require("koa-favicon"); + var Koa = require('koa'); + + var app = new Koa(); + app.use(favicon(__dirname + '/public/favicon.ico')); + + =============================================== */ + +/// + +declare module "koa-favicon" { + + import * as Koa from "koa"; + + /** + * Returns a middleware serving the favicon found on the given path. + */ + function favicon(path: string, options?: { + + /** + * cache-control max-age directive in ms, defaulting to 1 day. + */ + maxage?: number; + + }): { (ctx: Koa.Context, next?: () => any): any }; + + export = favicon; +} From e0f099ceb4832670df7cb31305d80aaa87f7ad5b Mon Sep 17 00:00:00 2001 From: hellopao Date: Thu, 7 Apr 2016 10:25:53 +0800 Subject: [PATCH 0114/1506] add difinitions for koa-compress --- koa-compress/koa-compress-tests.ts | 16 ++++++++++++ koa-compress/koa-compress.d.ts | 41 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 koa-compress/koa-compress-tests.ts create mode 100644 koa-compress/koa-compress.d.ts diff --git a/koa-compress/koa-compress-tests.ts b/koa-compress/koa-compress-tests.ts new file mode 100644 index 0000000000..564fd53e2c --- /dev/null +++ b/koa-compress/koa-compress-tests.ts @@ -0,0 +1,16 @@ +/// +/// + +import * as Koa from "koa"; +import compress = require("koa-compress"); + +const app = new Koa(); + +app.use(compress({ + filter: (ctype) => { + return /text/i.test(ctype) + }, + threshold: 2048 +})); + +app.listen(80) \ No newline at end of file diff --git a/koa-compress/koa-compress.d.ts b/koa-compress/koa-compress.d.ts new file mode 100644 index 0000000000..3a6b7e09e1 --- /dev/null +++ b/koa-compress/koa-compress.d.ts @@ -0,0 +1,41 @@ +// Type definitions for koa-compress v2.x +// Project: https://github.com/koajs/compress +// Definitions by: Jerry Chin +// Definitions: https://github.com/hellopao/DefinitelyTyped + +/* =================== USAGE =================== + + import compress = require("koa-compress"); + var Koa = require('koa'); + + var app = new Koa(); + app.use(compress()); + + =============================================== */ +/// +/// + +declare module "koa-compress" { + + import * as Koa from "koa"; + import * as zlib from "zlib"; + + interface ICompressOptions extends zlib.ZlibOptions { + /** + * An optional function that checks the response content type to decide whether to compress. By default, it uses compressible. + */ + filter?: (content_type: string) => boolean; + + /** + * Minimum response size in bytes to compress. Default 1024 bytes or 1kb. + */ + threshold?: number + } + + /** + * Compress middleware for Koa + */ + function compress(options?: ICompressOptions): { (ctx: Koa.Context, next?: () => any): any }; + + export = compress; +} From 00e8cf6e000aa1d70fb21bd1da6456c62136e231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Z=C3=BCger?= Date: Fri, 8 Apr 2016 10:59:34 +0200 Subject: [PATCH 0115/1506] added svgRendering property to Html2CanvasOptions interface --- html2canvas/html2canvas.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html2canvas/html2canvas.d.ts b/html2canvas/html2canvas.d.ts index 101815ec47..1d5fd82fe7 100644 --- a/html2canvas/html2canvas.d.ts +++ b/html2canvas/html2canvas.d.ts @@ -36,6 +36,9 @@ declare namespace Html2Canvas { /** Whether to attempt to load cross-origin images as CORS served, before reverting back to proxy. */ useCORS?: boolean; + + /** Use svg powered rendering where available (FF11+). */ + svgRendering?: boolean; /** Callback providing the rendered canvas element after rendering */ onrendered?(canvas: HTMLCanvasElement): void; From 4aed26de3226553d767d1a5ff65296f3e89c2077 Mon Sep 17 00:00:00 2001 From: Xie Jingyang <136419808@qq.com> Date: Sat, 9 Apr 2016 22:30:11 +0800 Subject: [PATCH 0116/1506] Create echarts.d.ts some properties not complete --- echarts/echarts.d.ts | 111 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 echarts/echarts.d.ts diff --git a/echarts/echarts.d.ts b/echarts/echarts.d.ts new file mode 100644 index 0000000000..09f04ca6ef --- /dev/null +++ b/echarts/echarts.d.ts @@ -0,0 +1,111 @@ +// Type definitions for echarts +// Project: http://echarts.baidu.com/ +// Definitions by: Xie Jingyang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace ECharts { + function init(dom:HTMLDivElement|HTMLCanvasElement, theme?:Object|string, opts?:{ + devicePixelRatio?: number + renderer?: string + }): ECharts; + function connect(group:string|Array); + function disConnect(group:string); + function dispose(target: ECharts|HTMLDivElement|HTMLCanvasElement); + function getInstanceByDom(target: HTMLDivElement|HTMLCanvasElement); + function registerMap(mapName: string, geoJson: Object, specialAreas?: Object); + function registerTheme(themeName: string, theme: Object); + + class ECharts { + group:string; + setOption(option: EChartOption, notMerge?: boolean, notRefreshImmediately?: boolean) + getWidth(): number + getHeight(): number + getDom(): HTMLCanvasElement|HTMLDivElement + getOption(): Object + resize() + dispatchAction(payload: Object) + on(eventName: string, handler: Function, context?: Object) + off(eventName: string, handler?: Function) + showLoading(type?: string, opts?: Object) + hideLoading() + getDataURL(opts: { + // 导出的格式,可选 png, jpeg + type?: string, + // 导出的图片分辨率比例,默认为 1。 + pixelRatio?: number, + // 导出的图片背景色,默认使用 option 里的 backgroundColor + backgroundColor?: string + }):string + getConnectedDataURL(opts: { + // 导出的格式,可选 png, jpeg + type: string, + // 导出的图片分辨率比例,默认为 1。 + pixelRatio: number, + // 导出的图片背景色,默认使用 option 里的 backgroundColor + backgroundColor: string + }): string + clear() + isDisposed(): boolean + dispose() + } + + interface EChartOption { + title?: EChartTitleOption + legend?: Object, + grid?: Object, + xAxis?: Object, + yAxis?: Object, + polar?: Object, + radiusAxis?: Object, + angleAxis?: Object, + radar?: Object, + dataZoom?: Array, + visualMap?: Array, + tooltip?: Object, + toolbox?: Object, + geo?: Object, + parallel?: Object, + parallelAxis?: Object, + timeline?: Object, + series?: Array, + color?: Array, + backgroundColor?: string, + textStyle?: Object, + animation?: boolean, + animationDuration?: number, + animationEasing?: string, + animationDurationUpdate?: number, + animationEasingUpdate?: string + } + + interface EChartTitleOption { + show?: boolean; + text?: string; + link?: string, + target?: string, + textStyle?: Object, + subtext?: string, + sublink?: string, + subtarget?: string, + subtextStyle?: Object, + padding?: number, + itemGap?: number, + zlevel?: number, + z?: number, + left?: string, + top?: string, + right?: string, + bottom?: string, + backgroundColor?: string, + borderColor?: string, + borderWidth?: number, + shadowBlur?: number, + shadowColor?: number, + shadowOffsetX?: number, + shadowOffsetY?: number, + } +} + +declare module "echarts" { + export = ECharts; +} From 3305eb6f74a2de17d208dfaaa20d69cfb912f871 Mon Sep 17 00:00:00 2001 From: Xie Jingyang <136419808@qq.com> Date: Sat, 9 Apr 2016 22:44:19 +0800 Subject: [PATCH 0117/1506] Update echarts.d.ts --- echarts/echarts.d.ts | 70 +++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/echarts/echarts.d.ts b/echarts/echarts.d.ts index 09f04ca6ef..f460a9eaca 100644 --- a/echarts/echarts.d.ts +++ b/echarts/echarts.d.ts @@ -7,28 +7,46 @@ declare namespace ECharts { function init(dom:HTMLDivElement|HTMLCanvasElement, theme?:Object|string, opts?:{ devicePixelRatio?: number renderer?: string - }): ECharts; - function connect(group:string|Array); - function disConnect(group:string); - function dispose(target: ECharts|HTMLDivElement|HTMLCanvasElement); - function getInstanceByDom(target: HTMLDivElement|HTMLCanvasElement); - function registerMap(mapName: string, geoJson: Object, specialAreas?: Object); - function registerTheme(themeName: string, theme: Object); + }):ECharts; + + function connect(group:string|Array):void; + + function disConnect(group:string):void; + + function dispose(target:ECharts|HTMLDivElement|HTMLCanvasElement):void; + + function getInstanceByDom(target:HTMLDivElement|HTMLCanvasElement):void; + + function registerMap(mapName:string, geoJson:Object, specialAreas?:Object):void; + + function registerTheme(themeName:string, theme:Object):void; class ECharts { group:string; - setOption(option: EChartOption, notMerge?: boolean, notRefreshImmediately?: boolean) - getWidth(): number - getHeight(): number - getDom(): HTMLCanvasElement|HTMLDivElement - getOption(): Object - resize() - dispatchAction(payload: Object) - on(eventName: string, handler: Function, context?: Object) - off(eventName: string, handler?: Function) - showLoading(type?: string, opts?: Object) - hideLoading() - getDataURL(opts: { + + setOption(option:EChartOption, notMerge?:boolean, notRefreshImmediately?:boolean):void + + getWidth():number + + getHeight():number + + getDom():HTMLCanvasElement|HTMLDivElement + + getOption():Object + + resize():void + + dispatchAction(payload:Object):void + + on(eventName:string, handler:Function, context?:Object):void + + off(eventName:string, handler?:Function):void + + showLoading(type?:string, opts?:Object):void + + hideLoading():void + + getDataURL(opts:{ // 导出的格式,可选 png, jpeg type?: string, // 导出的图片分辨率比例,默认为 1。 @@ -36,17 +54,21 @@ declare namespace ECharts { // 导出的图片背景色,默认使用 option 里的 backgroundColor backgroundColor?: string }):string - getConnectedDataURL(opts: { + + getConnectedDataURL(opts:{ // 导出的格式,可选 png, jpeg type: string, // 导出的图片分辨率比例,默认为 1。 pixelRatio: number, // 导出的图片背景色,默认使用 option 里的 backgroundColor backgroundColor: string - }): string - clear() - isDisposed(): boolean - dispose() + }):string + + clear():void + + isDisposed():boolean + + dispose():void } interface EChartOption { From 8a9ea7db630d55ebfb3733b390baa498b0998f0e Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 12 Apr 2016 13:47:35 +0200 Subject: [PATCH 0118/1506] Backbone: Make doesn't exists anymore. See changelog from for version 0.9.10 (View#make has been removed. You'll need to use $ directly to construct DOM elements now.) --- backbone/backbone-global.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts index be849cee04..4c8cf514ba 100644 --- a/backbone/backbone-global.d.ts +++ b/backbone/backbone-global.d.ts @@ -368,7 +368,6 @@ declare namespace Backbone { $(selector: any): JQuery; render(): View; remove(): View; - make(tagName: any, attributes?: any, content?: any): any; delegateEvents(events?: EventsHash): any; delegate(eventName: string, selector: string, listener: Function): View; undelegateEvents(): any; From 03022b7d8f0edbc86a9bbb1948c5df780e715ed8 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 12 Apr 2016 14:06:44 +0200 Subject: [PATCH 0119/1506] Backbone: Model#change doesn't exist either #8951 --- backbone/backbone-global.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts index 4c8cf514ba..704d4ada83 100644 --- a/backbone/backbone-global.d.ts +++ b/backbone/backbone-global.d.ts @@ -146,7 +146,6 @@ declare namespace Backbone { /*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model; set(obj: any, options?: ModelSetOptions): Model; - change(): any; changedAttributes(attributes?: any): any[]; clear(options?: Silenceable): any; clone(): Model; From 90c84c80e0211af88700d122c54f526a63800f2c Mon Sep 17 00:00:00 2001 From: Seteh Date: Tue, 12 Apr 2016 15:42:20 +0300 Subject: [PATCH 0120/1506] Update to 15.2.9 --- devextreme/devextreme-15.2.7.d.ts | 7429 +++++++++++++++++++++++++++++ devextreme/devextreme.d.ts | 68 +- 2 files changed, 7470 insertions(+), 27 deletions(-) create mode 100644 devextreme/devextreme-15.2.7.d.ts diff --git a/devextreme/devextreme-15.2.7.d.ts b/devextreme/devextreme-15.2.7.d.ts new file mode 100644 index 0000000000..df967b19f3 --- /dev/null +++ b/devextreme/devextreme-15.2.7.d.ts @@ -0,0 +1,7429 @@ +// Type definitions for DevExtreme 15.2.7 +// Project: http://js.devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace DevExpress { + /** A mixin that provides a capability to fire and subscribe to events. */ + export interface EventsMixin { + /** Subscribes to a specified event. */ + on(eventName: string, eventHandler: Function): T; + /** Subscribes to the specified events. */ + on(events: { [eventName: string]: Function; }): T; + /** Detaches all event handlers from the specified event. */ + off(eventName: string): Object; + /** Detaches a particular event handler from the specified event. */ + off(eventName: string, eventHandler: Function): T; + } + /** An object that serves as a namespace for the methods required to perform validation. */ + export module validationEngine { + export interface IValidator { + validate(): ValidatorValidationResult; + reset(): void; + } + export interface ValidatorValidationResult { + isValid: boolean; + name?: string; + value: any; + brokenRule: any; + validationRules: any[]; + } + export interface ValidationGroupValidationResult { + isValid: boolean; + brokenRules: any[]; + validators: IValidator[]; + } + export interface GroupConfig extends EventsMixin { + group: any; + validators: IValidator[]; + validate(): ValidationGroupValidationResult; + reset(): void; + } + /** Provides access to the object that represents the specified validation group. */ + export function getGroupConfig(group: any): GroupConfig + /** Provides access to the object that represents the default validation group. */ + export function getGroupConfig(): GroupConfig + /** Validates rules of the validators that belong to the specified validation group. */ + export function validateGroup(group: any): ValidationGroupValidationResult; + /** Validates rules of the validators that belong to the default validation group. */ + export function validateGroup(): ValidationGroupValidationResult; + /** Resets the values and validation result of the editors that belong to the specified validation group. */ + export function resetGroup(group: any): void; + /** Resets the values and validation result of the editors that belong to the default validation group. */ + export function resetGroup(): void; + /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ + export function validateModel(model: Object): ValidationGroupValidationResult; + /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ + export function registerModelForValidation(model: Object) : void; + } + export var hardwareBackButton: JQueryCallback; + /** Processes the hardware back button click. */ + export function processHardwareBackButton(): void; + /** Hides the last displayed overlay widget. */ + export function hideTopOverlay(): boolean; + /** Specifies whether or not the entire application/site supports right-to-left representation. */ + export var rtlEnabled: boolean; + /** Registers a new component in the DevExpress.ui namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, componentClass: Object): void; + /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, namespace: Object, componentClass: Object): void; + export function requestAnimationFrame(callback: Function): number; + export function cancelAnimationFrame(requestID: number): void; + /** Custom Knockout binding that links an HTML element with a specific action. */ + export class Action { } + /** Used to get URLs that vary in a locally running application and the application running on production. */ + export class EndpointSelector { + constructor(options: { + [key: string]: { + local?: string; + production?: string; + } + }); + /** Returns a local or a productional URL depending on how the application is currently running. */ + urlFor(key: string): string; + } + /** An object that serves as a namespace for the methods that are used to animate UI elements. */ + export module fx { + /** Defines animation options. */ + export interface AnimationOptions { + /** A function called after animation is completed. */ + complete?: (element: JQuery, config: AnimationOptions) => void; + /** A number specifying wait time before animation execution. */ + delay?: number; + /** A number specifying the time period to wait before the animation of the next stagger item starts. */ + staggerDelay?: number; + /** A number specifying the time in milliseconds spent on animation. */ + duration?: number; + /** A string specifying the type of an easing function used for animation. */ + easing?: string; + /** Specifies the initial animation state. */ + from?: any; + /** A function called before animation is started. */ + start?: (element: JQuery, config: AnimationOptions) => void; + /** Specifies a final animation state. */ + to?: any; + /** A string value specifying the animation type. */ + type?: string; + /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ + direction?: string; + } + /** Animates the specified element. */ + export function animate(element: HTMLElement, config: AnimationOptions): Object; + /** Returns a value indicating whether the specified element is being animated. */ + export function isAnimating(element: HTMLElement): boolean; + /** Stops the animation. */ + export function stop(element: HTMLElement, jumpToEnd: boolean): void; + } + /** The manager that performs several specified animations at a time. */ + export class TransitionExecutor { + /** Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods. */ + reset(): void; + /** Registers a set of elements that should be animated as "entering" using the specified animation configuration. */ + enter(elements: JQuery, animation: any): void; + /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ + leave(elements: JQuery, animation: any): void; + /** Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand. */ + start(config: Object): JQueryPromise; + /** Stops all started animations. */ + stop(): void; + } + export class AnimationPresetCollection { + /** Resets all the changes made in the animation repository. */ + resetToDefaults(): void; + /** Deletes the specified animation or clears all the animation repository, if an animation name is not passed. */ + clear(name: string): void; + /** Adds the specified animation preset to the animation repository by the specified name. */ + registerPreset(name: string, config: any): void; + /** Applies the changes made in the animation repository. */ + applyChanges(): void; + /** Returns the configuration of the animation found in the animation repository by the specified name for the current device. */ + getPreset(name: string): void; + /** Registers predefined animations in the animation repository. */ + registerDefaultPresets(): void; + } + /** A repository of animations. */ + export var animationPresets: AnimationPresetCollection; + /** The device object defines the device on which the application is running. */ + export interface Device { + /** Indicates whether or not the device platform is Android. */ + android?: boolean; + /** Specifies the type of the device on which the application is running. */ + deviceType?: string; + /** Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme. */ + generic?: boolean; + /** Indicates whether or not the device platform is iOS. */ + ios?: boolean; + /** Indicates whether or not the device type is 'phone'. */ + phone?: boolean; + /** Specifies the platform of the device on which the application is running. */ + platform?: string; + /** Indicates whether or not the device type is 'tablet'. */ + tablet?: boolean; + /** Specifies an array with the major and minor versions of the device platform. */ + version?: Array; + /** Indicates whether or not the device platform is Windows. */ + win?: boolean; + /** Specifies a performance grade of the current device. */ + grade?: string; + } + export class Devices implements EventsMixin { + constructor(options: { window: Window }); + /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ + current(deviceName: any): void; + /** Returns information about the current device. */ + current(): Device; + orientationChanged: JQueryCallback; + /** Returns the current device orientation. */ + orientation(): string; + /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ + real(): Device; + on(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + on(eventName: string, eventHandler: Function): Devices; + on(events: { [eventName: string]: Function; }): Devices; + off(eventName: "orientationChanged"): Devices; + off(eventName: string): Devices; + off(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + off(eventName: string, eventHandler: Function): Devices; + } + /** An object that serves as a namespace for the methods and events specifying information on the current device. */ + export var devices: Devices; + /** The position object specifies the widget positioning options. */ + export interface PositionOptions { + /** The target element position that the widget is positioned against. */ + at?: string; + /** The element within which the widget is positioned. */ + boundary?: Element; + /** A string value holding horizontal and vertical offset from the window's boundaries. */ + boundaryOffset?: string; + /** Specifies how to move the widget if it overflows the screen. */ + collision?: any; + /** The position of the widget to align against the target element. */ + my?: string; + /** The target element that the widget is positioned against. */ + of?: HTMLElement; + /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ + offset?: string; + } + export interface ComponentOptions { + /** A handler for the initialized event. */ + onInitialized?: Function; + /** A handler for the optionChanged event. */ + onOptionChanged?: Function; + /** A handler for the disposing event. */ + onDisposing?: Function; + } + /** A base class for all components and widgets. */ + export class Component { + constructor(options?: ComponentOptions) + /** Prevents the component from refreshing until the endUpdate method is called. */ + beginUpdate(): void; + /** Enables the component to refresh after the beginUpdate method call. */ + endUpdate(): void; + /** Returns an instance of this component class. */ + instance(): Component; + /** Returns the configuration options of this component. */ + option(): { + [optionKey: string]: any; + }; + /** Sets one or more options of this component. */ + option(options: { + [optionKey: string]: any; + }): void; + /** Gets the value of the specified configuration option of this component. */ + option(optionName: string): any; + /** Sets a value to the specified configuration option of this component. */ + option(optionName: string, optionValue: any): void; + } + export interface DOMComponentOptions extends ComponentOptions { + /** Specifies whether or not the current component supports a right-to-left representation. */ + rtlEnabled?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A base class for all components. */ + export class DOMComponent extends Component { + constructor(element: JQuery, options?: DOMComponentOptions); + constructor(element: HTMLElement, options?: DOMComponentOptions); + /** Returns the root HTML element of the widget. */ + element(): JQuery; + /** Specifies the device-dependent default configuration options for this component. */ + static defaultOptions(rule: { + device?: any; + options?: any; + }): void; + } + export module data { + export interface ODataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface StoreOptions { + /** A handler for the modified event. */ + onModified?: () => void; + /** A handler for the modifying event. */ + onModifying?: () => void; + /** A handler for the removed event. */ + onRemoved?: (key: any) => void; + /** A handler for the removing event. */ + onRemoving?: (key: any) => void; + /** A handler for the updated event. */ + onUpdated?: (key: any, values: Object) => void; + /** A handler for the updating event. */ + onUpdating?: (key: any, values: Object) => void; + /** A handler for the loaded event. */ + onLoaded?: (result: Array) => void; + /** A handler for the loading event. */ + onLoading?: (loadOptions: LoadOptions) => void; + /** A handler for the inserted event. */ + onInserted?: (values: Object, key: any) => void; + /** A handler for the inserting event. */ + onInserting?: (values: Object) => void; + /** Specifies the function called when the Store causes an error. */ + errorHandler?: (e: Error) => void; + /** Specifies the key properties within the data associated with the Store. */ + key?: any; + } + export interface LoadOptions { + filter?: Object; + sort?: Object; + select?: Object; + expand?: Object; + group?: Object; + skip?: number; + take?: number; + userData?: Object; + requireTotalCount?: boolean; + } + /** The base class for all Stores. */ + export class Store implements EventsMixin { + constructor(options?: StoreOptions); + /** Returns the data item specified by the key. */ + byKey(key: any): JQueryPromise; + /** Adds an item to the data associated with this Store. */ + insert(values: Object): JQueryPromise; + /** Returns the key expression specified via the key configuration option. */ + key(): any; + /** Returns the key of the Store item that matches the specified object. */ + keyOf(obj: Object): any; + /** Starts loading data. */ + load(obj?: LoadOptions): JQueryPromise; + /** Removes the data item specified by the key. */ + remove(key: any): JQueryPromise; + /** Obtains the total count of items that will be returned by the load() function. */ + totalCount(options?: { + filter?: Object; + group?: Object; + }): JQueryPromise; + /** Updates the data item specified by the key. */ + update(key: any, values: Object): JQueryPromise; + on(eventName: "removing", eventHandler: (key: any) => void): Store; + on(eventName: "removed", eventHandler: (key: any) => void): Store; + on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "inserting", eventHandler: (values: Object) => void): Store; + on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + on(eventName: "modifying", eventHandler: () => void): Store; + on(eventName: "modified", eventHandler: () => void): Store; + on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + on(eventName: "loaded", eventHandler: (result: Array) => void): Store; + on(eventName: string, eventHandler: Function): Store; + on(events: { [eventName: string]: Function; }): Store; + off(eventName: "removing"): Store; + off(eventName: "removed"): Store; + off(eventName: "updating"): Store; + off(eventName: "updated"): Store; + off(eventName: "inserting"): Store; + off(eventName: "inserted"): Store; + off(eventName: "modifying"): Store; + off(eventName: "modified"): Store; + off(eventName: "loading"): Store; + off(eventName: "loaded"): Store; + off(eventName: string): Store; + off(eventName: "removing", eventHandler: (key: any) => void): Store; + off(eventName: "removed", eventHandler: (key: any) => void): Store; + off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "inserting", eventHandler: (values: Object) => void): Store; + off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + off(eventName: "modifying", eventHandler: () => void): Store; + off(eventName: "modified", eventHandler: () => void): Store; + off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + off(eventName: "loaded", eventHandler: (result: Array) => void): Store; + off(eventName: string, eventHandler: Function): Store; + } + export interface ArrayStoreOptions extends StoreOptions { + /** Specifies the array associated with this Store. */ + data?: Array; + } + /** A Store accessing an in-memory array. */ + export class ArrayStore extends Store { + constructor(options?: ArrayStoreOptions); + /** Clears all data associated with the current ArrayStore. */ + clear(): void; + /** Creates the Query object for the underlying array. */ + createQuery(): Query; + } + interface Promise { + then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; + } + export interface CustomStoreOptions extends StoreOptions { + /** The user implementation of the byKey(key, extraOptions) method. */ + byKey?: (key: any) => Promise; + /** The user implementation of the insert(values) method. */ + insert?: (values: Object) => Promise; + /** The user implementation of the load(options) method. */ + load?: (options?: LoadOptions) => Promise; + /** The user implementation of the remove(key) method. */ + remove?: (key: any) => Promise; + /** The user implementation of the totalCount(options) method. */ + totalCount?: (options?: { + filter?: Object; + group?: Object; + }) => Promise; + /** The user implementation of the update(key, values) method. */ + update?: (key: any, values: Object) => Promise; + } + /** A Store object that enables you to implement your own data access logic. */ + export class CustomStore extends Store { + constructor(options: CustomStoreOptions); + } + export interface DataSourceOptions { + /** Specifies data filtering conditions. */ + filter?: Object; + /** Specifies data grouping conditions. */ + group?: Object; + /** The item mapping function. */ + map?: (record: any) => any; + /** Specifies the maximum number of items the page can contain. */ + pageSize?: number; + /** Specifies whether a DataSource loads data by pages, or all items at once. */ + paginate?: boolean; + /** The data post processing function. */ + postProcess?: (data: any[]) => any[]; + /** Specifies a value by which the required items are searched. */ + searchExpr?: Object; + /** Specifies the comparison operation used to search for the required items. */ + searchOperation?: string; + /** Specifies the value to which the search expression is compared. */ + searchValue?: Object; + /** Specifies the initial select option value. */ + select?: Object; + /** An array of the strings that represent the names of the navigation properties to be loaded simultaneously with the OData store's entity. */ + expand?: Object; + /** Specifies whether or not the DataSource instance requests the total count of items available in the storage. */ + requireTotalCount?: boolean; + /** Specifies the initial sort option value. */ + sort?: Object; + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Error) => void; + } + /** An object that provides access to a data web service or local data storage for collection container widgets. */ + export class DataSource implements EventsMixin { + constructor(url: string); + constructor(data: Array); + constructor(options: CustomStoreOptions); + constructor(options: DataSourceOptions); + /** Disposes all resources associated with this DataSource. */ + dispose(): void; + /** Returns the current filter option value. */ + filter(): Object; + /** Sets the filter option value. */ + filter(filterExpr: Object): void; + /** Returns the current group option value. */ + group(): Object; + /** Sets the group option value. */ + group(groupExpr: Object): void; + /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ + isLastPage(): boolean; + /** Indicates whether or not at least one load() method execution has successfully finished. */ + isLoaded(): boolean; + /** Indicates whether or not the DataSource is currently being loaded. */ + isLoading(): boolean; + /** Returns the array of items currently operated by the DataSource. */ + items(): Array; + /** Returns the key expression. */ + key(): any; + /** Starts loading data. */ + load(): JQueryPromise>; + /** Clears currently loaded DataSource items and calls the load() method. */ + reload(): JQueryPromise>; + /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ + loadOptions(): Object; + /** Returns the current pageSize option value. */ + pageSize(): number; + /** Sets the pageSize option value. */ + pageSize(value: number): void; + /** Specifies the index of the currently loaded page. */ + pageIndex(): number; + /** Specifies the index of the page to be loaded during the next load() method execution. */ + pageIndex(newIndex: number): void; + /** Returns the current paginate option value. */ + paginate(): boolean; + /** Sets the paginate option value. */ + paginate(value: boolean): void; + /** Returns the searchExpr option value. */ + searchExpr(): Object; + /** Sets the searchExpr option value. */ + searchExpr(expr: Object): void; + /** Returns the currently specified search operation. */ + searchOperation(): string; + /** Sets the current search operation. */ + searchOperation(op: string): void; + /** Returns the searchValue option value. */ + searchValue(): Object; + /** Sets the searchValue option value. */ + searchValue(value: Object): void; + /** Returns the current select option value. */ + select(): Object; + /** Sets the select option value. */ + select(expr: Object): void; + /** Returns the current requireTotalCount option value. */ + requireTotalCount(): boolean; + /** Sets the requireTotalCount option value. */ + requireTotalCount(value: boolean): void; + /** Returns the current sort option value. */ + sort(): Object; + /** Sets the sort option value. */ + sort(sortExpr: Object): void; + /** Returns the underlying Store instance. */ + store(): Store; + /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ + totalCount(): number; + on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + on(eventName: "changed", eventHandler: () => void): DataSource; + on(eventName: string, eventHandler: Function): DataSource; + on(events: { [eventName: string]: Function; }): DataSource; + off(eventName: "loadingChanged"): DataSource; + off(eventName: "loadError"): DataSource; + off(eventName: "changed"): DataSource; + off(eventName: string): DataSource; + off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + off(eventName: "changed", eventHandler: () => void): DataSource; + off(eventName: string, eventHandler: Function): DataSource; + } + /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ + export class EdmLiteral { + /** Creates an EdmLiteral instance and assigns the specified value to it. */ + constructor(value: string); + /** Returns a string representation of the value associated with this EdmLiteral object. */ + valueOf(): string; + } + /** An object used to generate and hold the GUID. */ + export class Guid { + /** Creates a new Guid instance that holds the specified GUID. */ + constructor(value: string); + /** Creates a new Guid instance holding the generated GUID. */ + constructor(); + /** Returns a string representation of the Guid instance. */ + toString(): string; + /** Returns a string representation of the Guid instance. */ + valueOf(): string; + } + export interface LocalStoreOptions extends ArrayStoreOptions { + /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ + flushInterval?: number; + /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ + immediate?: boolean; + /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ + name?: string; + } + /** A Store providing access to the HTML5 Web Storage. */ + export class LocalStore extends ArrayStore { + constructor(options?: LocalStoreOptions); + /** Removes all data associated with this Store. */ + clear(): void; + } + export interface ODataContextOptions extends ODataStoreOptions { + /** Specifies the list of entities to be accessed via the ODataContext. */ + entities?: Object; + /** Specifies the function called if the ODataContext causes an error. */ + errorHandler?: (e: Error) => void; + } + /** Provides access to the entire OData service. */ + export class ODataContext { + constructor(options?: ODataContextOptions); + /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ + get(operationName: string, params: Object): JQueryPromise; + /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ + invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; + /** Return a special proxy object to describe the entity link. */ + objectLink(entityAlias: string, key: any): Object; + } + export interface ODataStoreOptions extends StoreOptions { + /** A function used to customize a web request before it is sent. */ + beforeSend?: (request: { + url: string; + async: boolean; + method: string; + timeout: number; + params: Object; + payload: Object; + headers: Object; + }) => void; + /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ + jsonp?: boolean; + /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ + keyType?: any; + /** Specifies whether or not dates found in the response are deserialized. */ + deserializeDates?: boolean; + /** Specifies the URL of the data service being accessed via the current ODataContext. */ + url?: string; + /** Specifies the version of the OData protocol used to interact with the data service. */ + version?: number; + /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ + withCredentials?: boolean; + } + /** A Store providing access to a separate OData web service entity. */ + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + /** Creates the Query object for the OData endpoint. */ + createQuery(loadOptions: Object): Object; + /** Returns the data item specified by the key. */ + byKey(key: any, extraOptions?: { expand?: Object }): JQueryPromise; + } + /** An universal chainable data query interface object. */ + export interface Query { + /** Calculates a custom summary for the items in the current Query. */ + aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; + /** Calculates a custom summary for the items in the current Query. */ + aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; + /** Calculates the average item value for the current Query. */ + avg(getter: Object): JQueryPromise; + /** Finds the item with the maximum getter value. */ + max(getter: Object): JQueryPromise; + /** Finds the item with the maximum value in the Query. */ + max(): JQueryPromise; + /** Finds the item with the minimum value in the Query. */ + min(): JQueryPromise; + /** Finds the item with the minimum getter value. */ + min(getter: Object): JQueryPromise; + /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ + avg(): JQueryPromise; + /** Returns the total count of items in the current Query. */ + count(): JQueryPromise; + /** Executes the Query. */ + enumerate(): JQueryPromise; + /** Filters the current Query data. */ + filter(criteria: Array): Query; + /** Filters the current Query data. */ + filter(predicate: (item: any) => boolean): Query; + /** Groups the current Query data. */ + groupBy(getter: Object): Query; + /** Applies the specified transformation to each item. */ + select(getter: Object): Query; + /** Limits the data item count. */ + slice(skip: number, take?: number): Query; + /** Sorts current Query data. */ + sortBy(getter: Object, desc: boolean): Query; + /** Sorts current Query data. */ + sortBy(getter: Object): Query; + /** Calculates the sum of item getter values in the current Query. */ + sum(getter: Object): JQueryPromise; + /** Calculates the sum of item values in the current Query. */ + sum(): JQueryPromise; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object): Query; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object, desc: boolean): Query; + /** Returns the array of current Query items. */ + toArray(): Array; + } + /** The global data layer error handler. */ + export var errorHandler: (e: Error) => void; + /** Encodes the specified string or array of bytes to base64 encoding. */ + export function base64_encode(input: any): string; + /** Creates a Query instance. */ + export function query(array: Array): Query; + /** Creates a Query instance for accessing the remote service specified by a URL. */ + export function query(url: string, queryOptions: Object): Query; + /** This section describes the utility objects provided by the DevExtreme data layer. */ + export var utils: { + /** Compiles a getter function from the getter expression. */ + compileGetter(expr: any): Function; + /** Compiles a setter function from the setter expression. */ + compileSetter(expr: any): Function; + odata: { + /** Holds key value converters for OData. */ + keyConverters: { + String(value: any): string; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + Guid(value: any): Guid; + Boolean(value: any): boolean; + Single(value: any): EdmLiteral; + Decimal(value: any): EdmLiteral; + }; + } + } + } + /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ + export module ui { + export interface WidgetOptions extends DOMComponentOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** Specifies whether or not the widget can be focused. */ + focusStateEnabled?: boolean; + /** Specifies a shortcut key that sets focus on the widget element. */ + accessKey?: string; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** Specifies the widget tab index. */ + tabIndex?: number; + /** Specifies the text of the hint displayed for the widget. */ + hint?: string; + } + /** The base class for widgets. */ + export class Widget extends DOMComponent { + constructor(options?: WidgetOptions); + /** Redraws the widget. */ + repaint(): void; + /** Sets focus on the widget. */ + focus(): void; + /** Registers a handler when a specified key is pressed. */ + registerKeyHandler(key: string, handler: Function): void; + } + export interface CollectionWidgetOptions extends WidgetOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** The time period in milliseconds before the onItemHold event is raised. */ + itemHoldTimeout?: number; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + loopItemFocus?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + onContentReady?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemContextMenu event. */ + onItemContextMenu?: Function; + /** A handler for the itemHold event. */ + onItemHold?: Function; + /** A handler for the itemRendered event. */ + onItemRendered?: Function; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** The index of the currently selected widget item. */ + selectedIndex?: number; + /** The selected item object. */ + selectedItem?: Object; + /** An array of currently selected item objects. */ + selectedItems?: Array; + /** A handler for the itemDeleting event. */ + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + } + /** The base class for widgets containing an item collection. */ + export class CollectionWidget extends Widget { + constructor(element: JQuery, options?: CollectionWidgetOptions); + constructor(element: HTMLElement, options?: CollectionWidgetOptions); + selectItem(itemElement: any): void; + unselectItem(itemElement: any): void; + deleteItem(itemElement: any): JQueryPromise; + isItemSelected(itemElement: any): boolean; + reorderItem(itemElement: any, toItemElement: any): JQueryPromise; + } + export interface DataExpressionMixinOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of a data source item field whose value is held in the value configuration option. */ + valueExpr?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** The currently selected value in the widget. */ + value?: Object; + } + export interface EditorOptions extends WidgetOptions { + /** The currently specified value. */ + value?: Object; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** A Boolean value specifying whether or not the widget is read-only. */ + readOnly?: boolean; + /** Holds the object that defines the error that occurred during validation. */ + validationError?: Object; + /** Specifies whether the editor's value is valid. */ + isValid?: boolean; + /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ + validationMessageMode?: string; + } + /** A base class for editors. */ + export class Editor extends Widget { + /** Resets the editor's value to undefined. */ + reset(): void; + } + /** An object that serves as a namespace for methods displaying a message in an application/site. */ + export var dialog: { + /** Creates an alert dialog message containing a single "OK" button. */ + alert(message: string, title: string): JQueryPromise; + /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ + confirm(message: string, title: string): JQueryPromise; + /** Creates a custom dialog using the options specified by the passed configuration object. */ + custom(options: { title?: string; message?: string; buttons?: Array; }): { + show(): JQueryPromise; + hide(): void; + hide(value: any): void; + }; + }; + /** Creates a toast message. */ + export function notify(message: any, type: string, displayTime: number): void; + /** Creates a toast message. */ + export function notify(options: Object): void; + /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ + export var themes: { + /** Returns the name of the currently applied theme. */ + current(): string; + /** Changes the current theme to the specified one. */ + current(themeName: string): void; + }; + /** Sets a specified template engine. */ + export function setTemplateEngine(name: string): void; + /** Sets a custom template engine defined via custom compile and render functions. */ + export function setTemplateEngine(options: Object): void; + } + /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ + export var utils: { + /** Sets parameters for the viewport meta tag. */ + initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + /** Requests that the browser call a specified function to update animation before the next repaint. */ + requestAnimationFrame(callback: Function): number; + /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ + cancelAnimationFrame(requestID: number): void; + }; + /** An object that serves as a namespace for DevExtreme Data Visualization Widgets. */ + export module viz { + /** Applies a theme for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(theme: string): void; + /** Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(platform: string, colorScheme: string): void; + /** Registers a new theme based on the existing one. */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** Applies a predefined or registered custom palette to all visualization widgets at once. */ + export function currentPalette(paletteName: string): void; + /** Obtains the color sets of a predefined or registered palette. */ + export function getPalette(paletteName: string): Object; + /** Registers a new palette. */ + export function registerPalette(paletteName: string, palette: Object): void; + } +} +declare namespace DevExpress.ui { + export interface dxValidatorOptions extends DOMComponentOptions { + /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ + validationRules?: Array; + /** Specifies the editor name to be used in the validation default messages. */ + name?: string; + /** An object that specifies what and when to validate and how to apply the validation result. */ + adapter?: Object; + /** Specifies the validation group the editor will be related to. */ + validationGroup?: string; + /** A handler for the validated event. */ + onValidated?: (params: validationEngine.ValidatorValidationResult) => void; + } + /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ + export class dxValidator extends DOMComponent implements validationEngine.IValidator { + constructor(element: JQuery, options?: dxValidatorOptions); + constructor(element: Element, options?: dxValidatorOptions); + /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ + validate(): validationEngine.ValidatorValidationResult; + /** Resets the value and validation result of the editor associated with the current dxValidator object. */ + reset(): void; + } + /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ + export class dxValidationGroup extends DOMComponent { + constructor(element: JQuery); + constructor(element: Element); + /** Validates rules of the validators that belong to the current validation group. */ + validate(): validationEngine.ValidationGroupValidationResult; + /** Resets the value and validation result of the editors that are included to the current validation group. */ + reset(): void; + } + export interface dxValidationSummaryOptions extends CollectionWidgetOptions { + /** Specifies the validation group for which summary should be generated. */ + validationGroup?: string; + } + /** A widget for displaying the result of checking validation rules for editors. */ + export class dxValidationSummary extends CollectionWidget { + constructor(element: JQuery, options?: dxValidationSummaryOptions); + constructor(element: Element, options?: dxValidationSummaryOptions); + } + export interface dxResizableOptions extends DOMComponentOptions { + /** Specifies which borders of the widget element are used as a handle. */ + handles?: string; + /** Specifies the lower width boundary for resizing. */ + minWidth?: number; + /** Specifies the upper width boundary for resizing. */ + maxWidth?: number; + /** Specifies the lower height boundary for resizing. */ + minHeight?: number; + /** Specifies the upper height boundary for resizing. */ + maxHeight?: number; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + } + /** A widget that displays required content in a resizable element. */ + export class dxResizable extends DOMComponent { + constructor(element: JQuery, options?: dxResizableOptions); + constructor(element: Element, options?: dxResizableOptions); + } + export interface dxTooltipOptions extends dxPopoverOptions { + } + /** A tooltip widget. */ + export class dxTooltip extends dxPopover { + constructor(element: JQuery, options?: dxTooltipOptions); + constructor(element: Element, options?: dxTooltipOptions); + } + export interface dxDropDownListOptions extends dxDropDownEditorOptions, DataExpressionMixinOptions { + /** Returns the value currently displayed by the widget. */ + displayValue?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies whether or not the widget displays unfiltered values until a user types a number of characters exceeding the minSearchLength option value. */ + showDataBeforeSearch?: boolean; + /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ + searchExpr?: Object; + /** Specifies the binary operation used to filter data. */ + searchMode?: string; + /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ + searchTimeout?: number; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget supports searching. */ + searchEnabled?: boolean; + /** + * Specifies whether or not the widget displays items by pages. + * @deprecated dataSource.paginate.md + */ + pagingEnabled?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** A handler for the itemClick event. */ + onItemClick?: Function; + onContentReady?: Function; + } + /** A base class for drop-down list widgets. */ + export class dxDropDownList extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDropDownListOptions); + constructor(element: Element, options?: dxDropDownListOptions); + } + export interface dxToolbarOptions extends CollectionWidgetOptions { + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** Informs the widget about its location in a view HTML markup. */ + renderAs?: string; + } + /** A toolbar widget. */ + export class dxToolbar extends CollectionWidget { + constructor(element: JQuery, options?: dxToolbarOptions); + constructor(element: Element, options?: dxToolbarOptions); + } + export interface dxToastOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** The time span in milliseconds during which the dxToast widget is visible. */ + displayTime?: number; + height?: any; + /** The dxToast message text. */ + message?: string; + position?: PositionOptions; + shading?: boolean; + /** Specifies the dxToast widget type. */ + type?: string; + width?: any; + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the toast is closed if a user swipes it out of the screen boundaries. */ + closeOnSwipe?: boolean; + /** A Boolean value specifying whether or not the toast is closed if a user clicks it. */ + closeOnClick?: boolean; + } + /** The toast message widget. */ + export class dxToast extends dxOverlay { + constructor(element: JQuery, options?: dxToastOptions); + constructor(element: Element, options?: dxToastOptions); + } + export interface dxTextEditorOptions extends EditorOptions { + /** A handler for the change event. */ + onChange?: Function; + /** A handler for the copy event. */ + onCopy?: Function; + /** A handler for the cut event. */ + onCut?: Function; + /** A handler for the enterKey event. */ + onEnterKey?: Function; + /** A handler for the focusIn event. */ + onFocusIn?: Function; + /** A handler for the focusOut event. */ + onFocusOut?: Function; + /** A handler for the input event. */ + onInput?: Function; + /** A handler for the keyDown event. */ + onKeyDown?: Function; + /** A handler for the keyPress event. */ + onKeyPress?: Function; + /** A handler for the keyUp event. */ + onKeyUp?: Function; + /** A handler for the paste event. */ + onPaste?: Function; + /** The text displayed by the widget when the widget value is empty. */ + placeholder?: string; + /** Specifies whether to display the Clear button in the widget. */ + showClearButton?: boolean; + /** Specifies the current value displayed by the widget. */ + value?: any; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + /** Specifies HTML attributes applied to the inner input element of the widget. */ + attr?: Object; + /** The read-only option that holds the text displayed by the widget input element. */ + text?: string; + focusStateEnabled?: boolean; + hoverStateEnabled?: boolean; + /** The editor mask that specifies the format of the entered string. */ + mask?: string; + /** Specifies a mask placeholder character. */ + maskChar?: string; + /** Specifies custom mask rules. */ + maskRules?: Object; + /** A message displayed when the entered text does not match the specified pattern. */ + maskInvalidMessage?: string; + /** Specifies whether the value option holds only characters entered by a user or prompt characters as well. */ + useMaskedValue?: boolean; + } + /** A base class for text editing widgets. */ + export class dxTextEditor extends Editor { + constructor(element: JQuery, options?: dxTextEditorOptions); + constructor(element: Element, options?: dxTextEditorOptions); + /** Removes focus from the input element. */ + blur(): void; + /** Sets focus to the input element representing the widget. */ + focus(): void; + } + export interface dxTextBoxOptions extends dxTextEditorOptions { + /** Specifies the maximum number of characters you can enter into the textbox. */ + maxLength?: any; + /** The "mode" attribute value of the actual HTML input element representing the text box. */ + mode?: string; + } + /** A single-line text box widget. */ + export class dxTextBox extends dxTextEditor { + constructor(element: JQuery, options?: dxTextBoxOptions); + constructor(element: Element, options?: dxTextBoxOptions); + } + export interface dxTextAreaOptions extends dxTextBoxOptions { + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + } + /** A widget used to display and edit multi-line text. */ + export class dxTextArea extends dxTextBox { + constructor(element: JQuery, options?: dxTextAreaOptions); + constructor(element: Element, options?: dxTextAreaOptions); + } + export interface dxTabsOptions extends CollectionWidgetOptions { + /** Specifies whether the widget enables an end-user to select only a single item or multiple items. */ + selectionMode?: string; + /** Specifies whether or not an end-user can scroll tabs by swiping. */ + scrollByContent?: boolean; + /** Specifies whether or not an end-user can scroll tabs. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A tab strip used to switch between pages. */ + export class dxTabs extends CollectionWidget { + constructor(element: JQuery, options?: dxTabsOptions); + constructor(element: Element, options?: dxTabsOptions); + } + export interface dxTabPanelOptions extends dxMultiViewOptions { + /** A handler for the titleClick event. */ + onTitleClick?: any; + /** A handler for the titleHold event. */ + onTitleHold?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying whether to enable or disable scrolling. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ + export class dxTabPanel extends dxMultiView { + constructor(element: JQuery, options?: dxTabPanelOptions); + constructor(element: Element, options?: dxTabPanelOptions); + } + export interface dxSelectBoxOptions extends dxDropDownListOptions { + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** The template to be used for rendering the widget text field. */ + fieldTemplate?: any; + /** The text that is provided as a hint in the select box editor. */ + placeholder?: string; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + } + /** A widget that allows you to select an item in a dropdown list. */ + export class dxSelectBox extends dxDropDownList { + constructor(element: JQuery, options?: dxSelectBoxOptions); + constructor(element: Element, options?: dxSelectBoxOptions); + } + export interface dxTagBoxOptions extends dxSelectBoxOptions { + /** Holds the list of selected values. */ + values?: Array; + /** A read-only option that holds the last selected value. */ + value?: Object; + } + /** A widget that allows you to select multiple items from a dropdown list. */ + export class dxTagBox extends dxSelectBox { + constructor(element: JQuery, options?: dxTagBoxOptions); + constructor(element: Element, options?: dxTagBoxOptions); + } + export interface dxScrollViewOptions extends dxScrollableOptions { + /** A handler for the pullDown event. */ + onPullDown?: Function; + /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the reachBottom event. */ + onReachBottom?: Function; + /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ + reachBottomText?: string; + /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ + refreshingText?: string; + /** Returns a value indicating if the scrollView content is larger then the widget container. */ + isFull(): boolean; + /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ + refresh(): void; + /** Notifies the scroll view that data loading is finished. */ + release(preventScrollBottom: boolean): JQueryPromise; + /** Toggles the loading state of the widget. */ + toggleLoading(showOrHide: boolean): void; + } + /** A widget used to display scrollable content. */ + export class dxScrollView extends dxScrollable { + constructor(element: JQuery, options?: dxScrollViewOptions); + constructor(element: Element, options?: dxScrollViewOptions); + } + export interface dxScrollableLocation { + top?: number; + left?: number; + } + export interface dxScrollableOptions extends DOMComponentOptions { + /** A string value specifying the available scrolling directions. */ + direction?: string; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A handler for the scroll event. */ + onScroll?: Function; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** A handler for the update event. */ + onUpdated?: Function; + /** Indicates whether to use native or simulated scrolling. */ + useNative?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. */ + scrollByContent?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. */ + scrollByThumb?: boolean; + } + /** A widget used to display scrollable content. */ + export class dxScrollable extends DOMComponent { + constructor(element: JQuery, options?: dxScrollableOptions); + constructor(element: Element, options?: dxScrollableOptions); + /** Returns the height of the scrollable widget in pixels. */ + clientHeight(): number; + /** Returns the width of the scrollable widget in pixels. */ + clientWidth(): number; + /** Returns an HTML element of the widget. */ + content(): JQuery; + /** Scrolls the widget content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ + scrollBy(distanceObject: dxScrollableLocation): void; + /** Returns the height of the scrollable content in pixels. */ + scrollHeight(): number; + /** Returns the current scroll position against the leftmost position. */ + scrollLeft(): number; + /** Returns how far the scrollable content is scrolled from the top and from the left. */ + scrollOffset(): dxScrollableLocation; + /** Scrolls widget content to the specified position. */ + scrollTo(targetLocation: number): void; + /** Scrolls widget content to a specified position. */ + scrollTo(targetLocation: dxScrollableLocation): void; + /** Scrolls widget content to the specified element. */ + scrollToElement(element: Element): void; + /** Returns the current scroll position against the topmost position. */ + scrollTop(): number; + /** Returns the width of the scrollable content in pixels. */ + scrollWidth(): number; + /** Updates the dimensions of the scrollable contents. */ + update(): void; + } + export interface dxRadioGroupOptions extends EditorOptions, DataExpressionMixinOptions { + activeStateEnabled?: boolean; + /** Specifies the radio group layout. */ + layout?: string; + } + /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ + export class dxRadioGroup extends CollectionWidget { + constructor(element: JQuery, options?: dxRadioGroupOptions); + constructor(element: Element, options?: dxRadioGroupOptions); + } + export interface dxPopupOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** Specifies whether or not to allow a user to drag the popup window. */ + dragEnabled?: boolean; + /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ + fullScreen?: boolean; + position?: PositionOptions; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showTitle?: boolean; + /** The title in the overlay window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + width?: any; + /** Specifies items displayed on the top or bottom toolbar of the popup window. */ + buttons?: Array; + /** Specifies whether or not the widget displays the Close button. */ + showCloseButton?: boolean; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + } + /** A widget that displays required content in a popup window. */ + export class dxPopup extends dxOverlay { + constructor(element: JQuery, options?: dxPopupOptions); + constructor(element: Element, options?: dxPopupOptions); + } + export interface dxPopoverOptions extends dxPopupOptions { + /** An object defining animation options of the widget. */ + animation?: fx.AnimationOptions; + /** Specifies the height of the widget. */ + height?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + shading?: boolean; + /** A Boolean value specifying whether or not to display the title in the overlay window. */ + showTitle?: boolean; + /** The target element associated with a popover. */ + target?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A widget that displays the required content in a popup window. */ + export class dxPopover extends dxPopup { + constructor(element: JQuery, options?: dxPopoverOptions); + constructor(element: Element, options?: dxPopoverOptions); + /** Displays the widget for the specified target element. */ + show(target?: any): JQueryPromise; + } + export interface dxOverlayOptions extends WidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ + closeOnOutsideClick?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + /** Specifies whether or not an end-user can drag the widget. */ + dragEnabled?: boolean; + /** Specifies whether or not an end user can resize the widget. */ + resizeEnabled?: boolean; + /** The height of the widget in pixels. */ + height?: any; + /** Specifies the maximum height the widget can reach while resizing. */ + maxHeight?: any; + /** Specifies the maximum width the widget can reach while resizing. */ + maxWidth?: any; + /** Specifies the minimum height the widget can reach while resizing. */ + minHeight?: any; + /** Specifies the minimum width the widget can reach while resizing. */ + minWidth?: any; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ + shading?: boolean; + /** Specifies the shading color. */ + shadingColor?: string; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + onContentReady?: Function; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** The widget width in pixels. */ + width?: any; + } + /** A widget displaying the required content in an overlay window. */ + export class dxOverlay extends Widget { + constructor(element: JQuery, options?: dxOverlayOptions); + constructor(element: Element, options?: dxOverlayOptions); + /** An HTML element of the widget. */ + content(): JQuery; + /** Hides the widget. */ + hide(): JQueryPromise; + /** Recalculates the overlay's size and position. */ + repaint(): void; + /** Shows the widget. */ + show(): JQueryPromise; + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** A static method that specifies the base z-index for all overlay widgets. */ + static baseZIndex(zIndex: number): void; + } + export interface dxNumberBoxOptions extends dxTextEditorOptions { + /** The maximum value accepted by the number box. */ + max?: number; + /** The minimum value accepted by the number box. */ + min?: number; + /** Specifies whether or not to show spin buttons. */ + showSpinButtons?: boolean; + useTouchSpinButtons?: boolean; + /** Specifies by which value the widget value changes when a spin button is clicked. */ + step?: number; + /** The current number box value. */ + value?: number; + /** The "mode" attribute value of the actual HTML input element representing the widget. */ + mode?: string; + } + /** A textbox widget that enables a user to enter numeric values. */ + export class dxNumberBox extends dxTextEditor { + constructor(element: JQuery, options?: dxNumberBoxOptions); + constructor(element: Element, options?: dxNumberBoxOptions); + } + export interface dxNavBarOptions extends dxTabsOptions { + scrollingEnabled?: boolean; + } + /** A widget that contains items used to navigate through application views. */ + export class dxNavBar extends dxTabs { + constructor(element: JQuery, options?: dxNavBarOptions); + constructor(element: Element, options?: dxNavBarOptions); + } + export interface dxMultiViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently displayed item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A widget used to display a view and to switch between several views. */ + export class dxMultiView extends CollectionWidget { + constructor(element: JQuery, options?: dxMultiViewOptions); + constructor(element: Element, options?: dxMultiViewOptions); + } + export interface dxMapOptions extends WidgetOptions { + /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route or when creating a widget if it initially contains markers or routes. */ + autoAdjust?: boolean; + center?: { + /** The latitude location displayed in the center of the widget. */ + lat?: number; + /** The longitude location displayed in the center of the widget. */ + lng?: number; + }; + /** A handler for the click event. */ + onClick?: any; + /** Specifies whether or not map widget controls are available. */ + controls?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** A key used to authenticate the application within the required map provider. */ + key?: { + /** A key used to authenticate the application within the "Bing" map provider. */ + bing?: string; + /** A key used to authenticate the application within the "Google" map provider. */ + google?: string; + /** A key used to authenticate the application within the "Google Static" map provider. */ + googleStatic?: string; + } + /** A handler for the markerAdded event. */ + onMarkerAdded?: Function; + /** A URL pointing to the custom icon to be used for map markers. */ + markerIconSrc?: string; + /** A handler for the markerRemoved event. */ + onMarkerRemoved?: Function; + /** An array of markers displayed on a map. */ + markers?: Array; + /** The name of the current map data provider. */ + provider?: string; + /** A handler for the ready event. */ + onReady?: Function; + /** A handler for the routeAdded event. */ + onRouteAdded?: Function; + /** A handler for the routeRemoved event. */ + onRouteRemoved?: Function; + /** An array of routes shown on the map. */ + routes?: Array; + /** The type of a map to display. */ + type?: string; + /** Specifies the width of the widget. */ + width?: any; + /** The zoom level of the map. */ + zoom?: number; + } + /** An interactive map widget. */ + export class dxMap extends Widget { + constructor(element: JQuery, options?: dxMapOptions); + constructor(element: Element, options?: dxMapOptions); + /** Adds a marker to the map. */ + addMarker(markerOptions: Object): JQueryPromise; + /** Adds a route to the map. */ + addRoute(routeOptions: Object): JQueryPromise; + /** Removes a marker from the map. */ + removeMarker(marker: Object): JQueryPromise; + /** Removes a route from the map. */ + removeRoute(route: any): JQueryPromise; + } + export interface dxLookupOptions extends dxDropDownListOptions { + /** An object defining widget animation options. */ + animation?: fx.AnimationOptions; + /** The text displayed on the Cancel button. */ + cancelButtonText?: string; + /** The text displayed on the Clear button. */ + clearButtonText?: string; + /** Specifies whether or not the widget cleans the search box when the popup window is displayed. */ + cleanSearchOnOpening?: boolean; + /** A Boolean value specifying whether or not a widget is closed if a user clicks outside of the overlaying window. */ + closeOnOutsideClick?: any; + /** The text displayed on the Apply button. */ + applyButtonText?: string; + /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ + fullScreen?: boolean; + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not to group widget items. */ + grouped?: boolean; + /** The name of the template used to display a group header. */ + groupTemplate?: any; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ + pageLoadingText?: string; + /** The text displayed by the widget when nothing is selected. */ + placeholder?: string; + /** The height of the widget popup element. */ + popupHeight?: any; + /** The width of the widget popup element. */ + popupWidth?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + /** A Boolean value specifying whether or not the search bar is visible. */ + searchEnabled?: boolean; + /** The text that is provided as a hint in the lookup's search bar. */ + searchPlaceholder?: string; + /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ + shading?: boolean; + /** Specifies whether to display the Cancel button in the lookup window. */ + showCancelButton?: boolean; + /** + * A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. + * @deprecated pageLoadMode.md + */ + showNextButton?: boolean; + /** The title of the lookup window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** Specifies whether or not to show lookup contents in a dxPopover widget. */ + usePopover?: boolean; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showPopupTitle?: boolean; + /** The template to be used for rendering the widget text field. */ + fieldTemplate?: any; + } + /** A widget that allows a user to select predefined values from a lookup window. */ + export class dxLookup extends dxDropDownList { + constructor(element: JQuery, options?: dxLookupOptions); + constructor(element: Element, options?: dxLookupOptions); + /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ + } + export interface dxLoadPanelOptions extends dxOverlayOptions { + /** An object defining the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** The delay in milliseconds after which the load panel is displayed. */ + delay?: number; + /** The height of the widget. */ + height?: number; + /** A URL pointing to an image to be used as a load indicator. */ + indicatorSrc?: string; + /** The text displayed in the load panel. */ + message?: string; + /** A Boolean value specifying whether or not to show a load indicator. */ + showIndicator?: boolean; + /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ + showPane?: boolean; + /** The width of the widget. */ + width?: number; + } + /** A widget used to indicate whether or not an element is loading. */ + export class dxLoadPanel extends dxOverlay { + constructor(element: JQuery, options?: dxLoadPanelOptions); + constructor(element: Element, options?: dxLoadPanelOptions); + } + export interface dxLoadIndicatorOptions extends WidgetOptions { + /** Specifies the path to an image used as the indicator. */ + indicatorSrc?: string; + } + /** The widget used to indicate the loading process. */ + export class dxLoadIndicator extends Widget { + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + constructor(element: Element, options?: dxLoadIndicatorOptions); + } + export interface dxListOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not to display a grouped list. */ + grouped?: boolean; + /** The template to be used for rendering item groups. */ + groupTemplate?: any; + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the groupRendered event. */ + onGroupRendered?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemSwipe event. */ + onItemSwipe?: Function; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ + pageLoadingText?: string; + /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + /** A Boolean value specifying whether to enable or disable list scrolling. */ + scrollingEnabled?: boolean; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying if the list is scrolled using the scrollbar. */ + scrollByThumb?: boolean; + onItemContextMenu?: Function; + onItemHold?: Function; + /** Specifies whether or not an end-user can collapse groups. */ + collapsibleGroups?: boolean; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies whether or not to display controls used to select list items. */ + showSelectionControls?: boolean; + /** Specifies item selection mode. */ + selectionMode?: string; + selectAllText?: string; + onSelectAllChanged?: Function; + /** Specifies the array of items for a context menu called for a list item. */ + menuItems?: Array; + /** Specifies whether an item context menu is shown when a user holds or swipes an item. */ + menuMode?: string; + /** Specifies whether or not an end user can delete list items. */ + allowItemDeleting?: boolean; + /** Specifies the way a user can delete items from the list. */ + itemDeleteMode?: string; + /** Specifies whether or not an end user can reorder list items. */ + allowItemReordering?: boolean; + /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ + indicateLoading?: boolean; + activeStateEnabled?: boolean; + } + /** A list widget. */ + export class dxList extends CollectionWidget { + constructor(element: JQuery, options?: dxListOptions); + constructor(element: Element, options?: dxListOptions); + /** Returns the height of the widget in pixels. */ + clientHeight(): number; + /** Removes the specified item from the list. */ + deleteItem(itemIndex: any): JQueryPromise; + /** Removes the specified item from the list. */ + deleteItem(itemElement: Element): JQueryPromise; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemIndex: any): boolean; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemElement: Element): boolean; + /** Reloads list data. */ + reload(): void; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; + /** Scrolls the list content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Returns the height of the list content in pixels. */ + scrollHeight(): number; + /** Scrolls list content to the specified position. */ + scrollTo(location: number): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemElement: Element): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemIndex: any): void; + /** Returns how far the list content is scrolled from the top. */ + scrollTop(): number; + /** Selects the specified item from the list. */ + selectItem(itemElement: Element): void; + /** Selects the specified item from the list. */ + selectItem(itemIndex: any): void; + /** Deselects the specified item from the list. */ + unselectItem(itemElement: Element): void; + /** Unselects the specified item from the list. */ + unselectItem(itemIndex: any): void; + /** Updates the widget scrollbar according to widget content size. */ + updateDimensions(): JQueryPromise; + /** Expands the specified group. */ + expandGroup(groupIndex: number): JQueryPromise; + /** Collapses the specified group. */ + collapseGroup(groupIndex: number): JQueryPromise; + } + export interface dxGalleryOptions extends CollectionWidgetOptions { + /** The time, in milliseconds, spent on slide animation. */ + animationDuration?: number; + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ + indicatorEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently active gallery item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ + showIndicator?: boolean; + /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ + showNavButtons?: boolean; + /** The time interval in milliseconds, after which the gallery switches to the next item. */ + slideshowDelay?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether or not to display parts of previous and next images along the sides of the current image. */ + wrapAround?: boolean; + /** Specifies if the widget stretches images to fit the total gallery width. */ + stretchImages?: boolean; + /** Specifies the width of an area used to display a single image. */ + initialItemWidth?: number; + } + /** An image gallery widget. */ + export class dxGallery extends CollectionWidget { + constructor(element: JQuery, options?: dxGalleryOptions); + constructor(element: Element, options?: dxGalleryOptions); + /** Shows the specified gallery item. */ + goToItem(itemIndex: number, animation: boolean): JQueryPromise; + /** Shows the next gallery item. */ + nextItem(animation: boolean): JQueryPromise; + /** Shows the previous gallery item. */ + prevItem(animation: boolean): JQueryPromise; + } + export interface dxDropDownEditorOptions extends dxTextBoxOptions { + /** Specifies the current value displayed by the widget. */ + value?: Object; + /** A handler for the closed event. */ + onClosed?: Function; + /** A handler for the opened event. */ + onOpened?: Function; + /** Specifies whether or not the drop-down editor is displayed. */ + opened?: boolean; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + /** Specifies the way an end-user applies the selected value. */ + applyValueMode?: string; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + activeStateEnabled?: boolean; + } + /** A drop-down editor widget. */ + export class dxDropDownEditor extends dxTextBox { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** Closes the drop-down editor. */ + close(): void; + /** Opens the drop-down editor. */ + open(): void; + /** Resets the widget's value to null. */ + reset(): void; + /** Returns an <input> element of the widget. */ + field(): JQuery; + /** Returns an HTML element of the popup window content. */ + content(): JQuery; + } + export interface dxDateBoxOptions extends dxTextEditorOptions { + /** A format used to display date/time information. */ + format?: string; + /** A Globalize format string specifying the date display format. */ + formatString?: string; + /** The last date that can be selected within the widget. */ + max?: any; + /** The minimum date that can be selected within the widget. */ + min?: any; + /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ + placeholder?: string; + /** + * Specifies whether or not a user can pick out a date using the drop-down calendar. + * @deprecated Use 'pickerType' option instead. + */ + useCalendar?: boolean; + /** An object or a value, specifying the date and time currently selected using the date box. */ + value?: any; + /** + * Specifies whether or not the widget uses the native HTML input element. + * @deprecated Use 'pickerType' option instead. + */ + useNative?: boolean; + /** Specifies the interval between neighboring values in the popup list in minutes. */ + interval?: number; + /** Specifies the maximum zoom level of a calendar, which is used to pick the date. */ + maxZoomLevel?: string; + /** Specifies the minimal zoom level of a calendar, which is used to pick the date. */ + minZoomLevel?: string; + /** Specifies the type of date/time picker. */ + pickerType?: string; + /** Specifies the message displayed if the typed value is not a valid date or time. */ + invalidDateMessage?: string; + /** Specifies the message displayed if the specified date is later than the max value or earlier than the min value. */ + dateOutOfRangeMessage?: string; + /** The text displayed on the Apply button. */ + applyButtonText?: string; + /** The text displayed on the Cancel button. */ + cancelButtonText?: string; + } + /** A date box widget. */ + export class dxDateBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDateBoxOptions); + constructor(element: Element, options?: dxDateBoxOptions); + } + export interface dxCheckBoxOptions extends EditorOptions { + activeStateEnabled?: boolean; + /** Specifies the widget state. */ + value?: boolean; + /** Specifies the text displayed by the check box. */ + text?: string; + } + /** A check box widget. */ + export class dxCheckBox extends Editor { + constructor(element: JQuery, options?: dxCheckBoxOptions); + constructor(element: Element, options?: dxCheckBoxOptions); + } + export interface dxCalendarOptions extends EditorOptions { + activeStateEnabled?: boolean; + /** Specifies a date displayed on the current calendar page. */ + currentDate?: Date; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The latest date the widget allows to select. */ + max?: Date; + /** The earliest date the widget allows to select. */ + min?: Date; + /** Specifies whether or not the widget displays a button that selects the current date. */ + showTodayButton?: boolean; + /** Specifies the current calendar zoom level. */ + zoomLevel?: string; + /** Specifies the maximum zoom level of the calendar. */ + maxZoomLevel?: string; + /** Specifies the minimum zoom level of the calendar. */ + minZoomLevel?: string; + /** The template to be used for rendering calendar cells. */ + cellTemplate?: any; + } + /** A calendar widget. */ + export class dxCalendar extends Editor { + constructor(element: JQuery, options?: dxCalendarOptions); + constructor(element: Element, options?: dxCalendarOptions); + } + export interface dxButtonOptions extends WidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A handler for the click event. */ + onClick?: any; + /** Specifies the icon to be displayed on the button. */ + icon?: string; + iconSrc?: string; + /** A template to be used for rendering the dxButton widget. */ + template?: any; + /** The text displayed on the button. */ + text?: string; + /** Specifies the button type. */ + type?: string; + /** Specifies the name of the validation group to be accessed in the click event handler. */ + validationGroup?: string; + } + /** A button widget. */ + export class dxButton extends Widget { + constructor(element: JQuery, options?: dxButtonOptions); + constructor(element: Element, options?: dxButtonOptions); + } + export interface dxBoxOptions extends CollectionWidget { + /** Specifies how widget items are aligned along the main direction. */ + align?: string; + /** Specifies the direction of item positioning in the widget. */ + direction?: string; + /** Specifies how widget items are aligned cross-wise. */ + crossAlign?: string; + } + /** A container widget used to arrange inner elements. */ + export class dxBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { + /** Specifies the collection of rows for the grid used to position layout elements. */ + rows?: Array; + /** Specifies the collection of columns for the grid used to position layout elements. */ + cols?: Array; + /** Specifies the function returning the screen factor depending on the screen width. */ + screenByWidth?: (width: number) => string; + /** Specifies the screen factor with which all elements are located in a single column. */ + singleColumnScreen?: string; + } + /** A widget used to build an adaptive markup that is dependent on screen resolution. */ + export class dxResponsiveBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxAutocompleteOptions extends dxDropDownListOptions { + /** Specifies the current value displayed by the widget. */ + value?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the maximum count of items displayed by the widget. */ + maxItemCount?: number; + /** Gets the currently selected item. */ + selectedItem?: Object; + } + /** A textbox widget that supports autocompletion. */ + export class dxAutocomplete extends dxDropDownList { + constructor(element: JQuery, options?: dxAutocompleteOptions); + constructor(element: Element, options?: dxAutocompleteOptions); + /** Opens the drop-down editor. */ + open(): void; + /** Closes the drop-down editor. */ + close(): void; + } + export interface dxAccordionOptions extends CollectionWidgetOptions { + /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ + animationDuration?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ + collapsible?: boolean; + /** Specifies whether the widget can expand several items or only a single item at once. */ + multiple?: boolean; + /** The template to be used for rendering dxAccordion items. */ + itemTemplate?: any; + /** A handler for the itemTitleClick event. */ + onItemTitleClick?: any; + /** A handler for the itemTitleHold event. */ + onItemTitleHold?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** The index number of the currently selected item. */ + selectedIndex?: number; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + } + /** A widget that displays data source items on collapsible panels. */ + export class dxAccordion extends CollectionWidget { + constructor(element: JQuery, options?: dxAccordionOptions); + constructor(element: Element, options?: dxAccordionOptions); + /** Collapses the specified item. */ + collapseItem(index: number): JQueryPromise; + /** Expands the specified item. */ + expandItem(index: number): JQueryPromise; + /** Updates the dimensions of the widget contents. */ + updateDimensions(): JQueryPromise; + } + export interface dxFileUploaderOptions extends EditorOptions { + /** A read-only option that holds a File instance representing the selected file. */ + value?: File; + /** Holds the File instances representing files selected in the widget. */ + values?: Array; + buttonText?: string; + /** The text displayed on the button that opens the file browser. */ + selectButtonText?: string; + /** The text displayed on the button that starts uploading. */ + uploadButtonText?: string; + /** Specifies the text displayed on the area to which an end-user can drop a file. */ + labelText?: string; + /** Specifies the value passed to the name attribute of the underlying input element. */ + name?: string; + /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ + multiple?: boolean; + /** Specifies a file type or several types accepted by the widget. */ + accept?: string; + /** Specifies a target Url for the upload request. */ + uploadUrl?: string; + /** Specifies if an end user can remove a file from the selection and interrupt uploading. */ + allowCanceling?: boolean; + /** Specifies whether or not the widget displays the list of selected files. */ + showFileList?: boolean; + /** Gets the current progress in percentages. */ + progress?: number; + /** The message displayed by the widget when it is ready to upload the specified files. */ + readyToUploadMessage?: string; + /** The message displayed by the widget when uploading is finished. */ + uploadedMessage?: string; + /** The message displayed by the widget on uploading failure. */ + uploadFailedMessage?: string; + /** Specifies how the widget uploads files. */ + uploadMode?: string; + /** A handler for the uploaded event. */ + onUploaded?: Function; + /** A handler for the uploaded event. */ + onProgress?: Function; + /** A handler for the uploadError event. */ + onUploadError?: Function; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + } + /** A widget used to select and upload a file or multiple files. */ + export class dxFileUploader extends Editor { + constructor(element: JQuery, options?: dxFileUploaderOptions); + constructor(element: Element, options?: dxFileUploaderOptions); + } + export interface dxTrackBarOptions extends EditorOptions { + /** The minimum value the widget can accept. */ + min?: number; + /** The maximum value the widget can accept. */ + max?: number; + /** The current widget value. */ + value?: number; + } + /** A base class for track bar widgets. */ + export class dxTrackBar extends Editor { + constructor(element: JQuery, options?: dxTrackBarOptions); + constructor(element: Element, options?: dxTrackBarOptions); + } + export interface dxProgressBarOptions extends dxTrackBarOptions { + /** Specifies a format for the progress status. */ + statusFormat?: any; + /** Specifies whether or not the widget displays a progress status. */ + showStatus?: boolean; + /** A handler for the complete event. */ + onComplete?: Function; + } + /** A widget used to indicate progress. */ + export class dxProgressBar extends dxTrackBar { + constructor(element: JQuery, options?: dxProgressBarOptions); + constructor(element: Element, options?: dxProgressBarOptions); + } + export interface dxSliderOptions extends dxTrackBarOptions { + activeStateEnabled?: boolean; + /** The slider step size. */ + step?: number; + /** The current slider value. */ + value?: number; + /** Specifies whether or not to highlight a range selected within the widget. */ + showRange?: boolean; + /** Specifies the size of a step by which a slider handle is moved when a user uses the Page up or Page down keyboard shortcuts. */ + keyStep?: number; + /** Specifies options for the slider tooltip. */ + tooltip?: { + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies format for the tooltip. */ + format?: any; + /** Specifies whether the tooltip is located over or under the slider. */ + position?: string; + /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ + showMode?: string; + }; + /** Specifies options for labels displayed at the min and max values. */ + label?: { + /** Specifies whether or not slider labels are visible. */ + visible?: boolean; + /** Specifies whether labels are located over or under the scale. */ + position?: string; + /** Specifies a format for labels. */ + format?: any; + }; + } + /** A widget that allows a user to select a numeric value within a given range. */ + export class dxSlider extends dxTrackBar { + constructor(element: JQuery, options?: dxSliderOptions); + constructor(element: Element, options?: dxSliderOptions); + } + export interface dxRangeSliderOptions extends dxSliderOptions { + /** The left edge of the interval currently selected using the range slider. */ + start?: number; + /** The right edge of the interval currently selected using the range slider. */ + end?: number; + } + /** A widget that enables a user to select a range of numeric values. */ + export class dxRangeSlider extends dxSlider { + constructor(element: JQuery, options?: dxRangeSliderOptions); + constructor(element: Element, options?: dxRangeSliderOptions); + } + export interface dxFormItemLabel { + /** Specifies the label text. */ + text?: string; + /** Specifies whether or not the label is visible. */ + visible?: boolean; + /** Specifies whether or not a colon is displayed at the end of the current label. */ + showColon?: boolean; + /** Specifies the location of a label against the editor. */ + location?: string; + /** Specifies the label horizontal alignment. */ + alignment?: string; + } + export interface dxFormItem { + /** Specifies the type of the current item. */ + itemType?: string; + /** Specifies whether or not the current form item is visible. */ + visible?: boolean; + /** Specifies the sequence number of the item in a form, group or tab. */ + visibleIndex?: number; + /** Specifies a CSS class to be applied to the form item. */ + cssClass?: string; + /** Specifies the number of columns spanned by the item. */ + colSpan?: number; + } + export interface dxFormEmptyItem extends dxFormItem { + /** Specifies the form item name. */ + name?: string; + } + export interface dxFormSimpleItem extends dxFormItem { + /** Specifies the path to the formData object field bound to the current form item. */ + dataField?: string; + /** Specifies the form item name. */ + name?: string; + /** Specifies which editor widget is used to display and edit the form item value. */ + editorType?: string; + /** Specifies configuration options for the editor widget of the current form item. */ + editorOptions?: Object; + /** A template to be used for rendering the form item. */ + template?: any; + /** Specifies the help text displayed for the current form item. */ + helpText?: string; + /** Specifies whether the current form item is required. */ + isRequired?: boolean; + /** Specifies options for the form item label. */ + label?: dxFormItemLabel; + /** An array of validation rules to be checked for the form item editor. */ + validationRules?: Array; + } + export interface dxFormGroupItem extends dxFormItem { + /** Specifies the group caption. */ + caption?: string; + /** A template to be used for rendering the group item. */ + template?: any; + /** The count of columns in the group layout. */ + colCount?: number; + /** Specifies whether or not all group item labels are aligned. */ + alignItemLabels?: boolean; + /** Holds an array of form items displayed within the group. */ + items?: Array; + } + export interface dxFormTab { + /** Specifies the tab title. */ + title?: string; + /** The count of columns in the tab layout. */ + colCount?: number; + /** Specifies whether or not labels of items displayed within the current tab are aligned. */ + alignItemLabels?: boolean; + /** Holds an array of form items displayed within the tab. */ + items?: Array; + /** Specifies a badge text for the tab. */ + badge?: string; + /** A Boolean value specifying whether or not the tab can respond to user interaction. */ + disabled?: boolean; + /** Specifies the icon to be displayed on the tab. */ + icon?: string; + /** The template to be used for rendering the tab. */ + tabTemplate?: any; + /** The template to be used for rendering the tab content. */ + template?: any; + } + export interface dxFormTabbedItem extends dxFormItem { + /** Holds a configuration object for the dxTabPanel widget used to display the current form item. */ + tabPanelOptions?: Object; + /** An array of tab configuration objects. */ + tabs?: Array; + } + export interface dxFormOptions extends WidgetOptions { + /** An object providing data for the form. */ + formData?: Object; + /** The count of columns in the form layout. */ + colCount?: any; + /** Specifies the location of a label against the editor. */ + labelLocation?: string; + /** Specifies whether or not all editors on the form are read-only. */ + readOnly?: boolean; + /** A handler for the fieldDataChanged event. */ + onFieldDataChanged?: (e: Object) => void; + /** A handler for the editorEnterKey event. */ + onEditorEnterKey?: (e: Object) => void; + /** Specifies a function that customizes a form item after it has been created. */ + customizeItem?: Function; + /** The minimum column width used for calculating column count in the form layout. */ + minColWidth?: number; + /** Specifies whether or not all root item labels are aligned. */ + alignItemLabels?: boolean; + /** Specifies whether or not item labels in all groups are aligned. */ + alignItemLabelsInAllGroups?: boolean; + /** Specifies whether or not a colon is displayed at the end of form labels. */ + showColonAfterLabel?: boolean; + /** Specifies whether or not the required mark is displayed for required fields. */ + showRequiredMark?: boolean; + /** Specifies whether or not the optional mark is displayed for optional fields. */ + showOptionalMark?: boolean; + /** The text displayed for required fields. */ + requiredMark?: string; + /** The text displayed for optional fields. */ + optionalMark?: string; + /** Specifies the message that is shown for end-users a required field value is not specified. */ + requiredMessage?: string; + /** Specifies whether or not the total validation summary is displayed on the form. */ + showValidationSummary?: boolean; + /** Holds an array of form items. */ + items?: Array; + /** A Boolean value specifying whether to enable or disable form scrolling. */ + scrollingEnabled?: boolean; + onContentReady?: Function; + } + /** A form widget used to display and edit values of object fields. */ + export class dxForm extends Widget { + constructor(element: JQuery, options?: dxFormOptions); + constructor(element: Element, options?: dxFormOptions); + /** Updates the specified field of the formData object and the corresponding editor on the form. */ + updateData(dataField: string, value: any): void; + /** Updates the specified fields of the formData object and the corresponding editors on the form. */ + updateData(data: Object): void; + /** Updates the value of a form item option. */ + itemOption(field: string, option: string, value: any): void; + /** Updates the values of form item options. */ + itemOption(field: string, options: Object): void; + /** Returns an editor instance associated with the specified formData field. */ + getEditor(field: string): Object; + /** Updates the dimensions of the widget contents. */ + updateDimensions(): JQueryPromise; + /** Validates the values of all editors on the form against the list of the validation rules specified for each form item. */ + validate(): Object; + } +} +interface JQuery { + dxProgressBar(): JQuery; + dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; + dxProgressBar(options: string): any; + dxProgressBar(options: string, ...params: any[]): any; + dxProgressBar(options: DevExpress.ui.dxProgressBarOptions): JQuery; + dxSlider(): JQuery; + dxSlider(options: "instance"): DevExpress.ui.dxSlider; + dxSlider(options: string): any; + dxSlider(options: string, ...params: any[]): any; + dxSlider(options: DevExpress.ui.dxSliderOptions): JQuery; + dxRangeSlider(): JQuery; + dxRangeSlider(options: "instance"): DevExpress.ui.dxRangeSlider; + dxRangeSlider(options: string): any; + dxRangeSlider(options: string, ...params: any[]): any; + dxRangeSlider(options: DevExpress.ui.dxRangeSliderOptions): JQuery; + dxFileUploader(): JQuery; + dxFileUploader(options: "instance"): DevExpress.ui.dxFileUploader; + dxFileUploader(options: string): any; + dxFileUploader(options: string, ...params: any[]): any; + dxFileUploader(options: DevExpress.ui.dxFileUploaderOptions): JQuery; + dxValidator(): JQuery; + dxValidator(options: "instance"): DevExpress.ui.dxValidator; + dxValidator(options: string): any; + dxValidator(options: string, ...params: any[]): any; + dxValidator(options: DevExpress.ui.dxValidatorOptions): JQuery; + dxValidationGroup(): JQuery; + dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; + dxValidationGroup(options: string): any; + dxValidationGroup(options: string, ...params: any[]): any; + dxValidationSummary(): JQuery; + dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; + dxValidationSummary(options: string): any; + dxValidationSummary(options: string, ...params: any[]): any; + dxValidationSummary(options: DevExpress.ui.dxValidationSummaryOptions): JQuery; + dxTooltip(): JQuery; + dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; + dxTooltip(options: string): any; + dxTooltip(options: string, ...params: any[]): any; + dxTooltip(options: DevExpress.ui.dxTooltipOptions): JQuery; + dxResizable(): JQuery; + dxResizable(options: "instance"): DevExpress.ui.dxResizable; + dxResizable(options: string): any; + dxResizable(options: string, ...params: any[]): any; + dxResizable(options: DevExpress.ui.dxResizableOptions): JQuery; + dxDropDownList(): JQuery; + dxDropDownList(options: "instance"): DevExpress.ui.dxDropDownList; + dxDropDownList(options: string): any; + dxDropDownList(options: string, ...params: any[]): any; + dxDropDownList(options: DevExpress.ui.dxDropDownListOptions): JQuery; + dxToolbar(): JQuery; + dxToolbar(options: "instance"): DevExpress.ui.dxToolbar; + dxToolbar(options: string): any; + dxToolbar(options: string, ...params: any[]): any; + dxToolbar(options: DevExpress.ui.dxToolbarOptions): JQuery; + dxToast(): JQuery; + dxToast(options: "instance"): DevExpress.ui.dxToast; + dxToast(options: string): any; + dxToast(options: string, ...params: any[]): any; + dxToast(options: DevExpress.ui.dxToastOptions): JQuery; + dxTextEditor(): JQuery; + dxTextEditor(options: "instance"): DevExpress.ui.dxTextEditor; + dxTextEditor(options: string): any; + dxTextEditor(options: string, ...params: any[]): any; + dxTextEditor(options: DevExpress.ui.dxTextEditorOptions): JQuery; + dxTextBox(): JQuery; + dxTextBox(options: "instance"): DevExpress.ui.dxTextBox; + dxTextBox(options: string): any; + dxTextBox(options: string, ...params: any[]): any; + dxTextBox(options: DevExpress.ui.dxTextBoxOptions): JQuery; + dxTextArea(): JQuery; + dxTextArea(options: "instance"): DevExpress.ui.dxTextArea; + dxTextArea(options: string): any; + dxTextArea(options: string, ...params: any[]): any; + dxTextArea(options: DevExpress.ui.dxTextAreaOptions): JQuery; + dxTabs(): JQuery; + dxTabs(options: "instance"): DevExpress.ui.dxTabs; + dxTabs(options: string): any; + dxTabs(options: string, ...params: any[]): any; + dxTabs(options: DevExpress.ui.dxTabsOptions): JQuery; + dxTabPanel(): JQuery; + dxTabPanel(options: "instance"): DevExpress.ui.dxTabPanel; + dxTabPanel(options: string): any; + dxTabPanel(options: string, ...params: any[]): any; + dxTabPanel(options: DevExpress.ui.dxTabPanelOptions): JQuery; + dxSelectBox(): JQuery; + dxSelectBox(options: "instance"): DevExpress.ui.dxSelectBox; + dxSelectBox(options: string): any; + dxSelectBox(options: string, ...params: any[]): any; + dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery; + dxTagBox(): JQuery; + dxTagBox(options: "instance"): DevExpress.ui.dxTagBox; + dxTagBox(options: string): any; + dxTagBox(options: string, ...params: any[]): any; + dxTagBox(options: DevExpress.ui.dxTagBoxOptions): JQuery; + dxScrollView(): JQuery; + dxScrollView(options: "instance"): DevExpress.ui.dxScrollView; + dxScrollView(options: string): any; + dxScrollView(options: string, ...params: any[]): any; + dxScrollView(options: DevExpress.ui.dxScrollViewOptions): JQuery; + dxScrollable(): JQuery; + dxScrollable(options: "instance"): DevExpress.ui.dxScrollable; + dxScrollable(options: string): any; + dxScrollable(options: string, ...params: any[]): any; + dxScrollable(options: DevExpress.ui.dxScrollableOptions): JQuery; + dxRadioGroup(): JQuery; + dxRadioGroup(options: "instance"): DevExpress.ui.dxRadioGroup; + dxRadioGroup(options: string): any; + dxRadioGroup(options: string, ...params: any[]): any; + dxRadioGroup(options: DevExpress.ui.dxRadioGroupOptions): JQuery; + dxPopup(): JQuery; + dxPopup(options: "instance"): DevExpress.ui.dxPopup; + dxPopup(options: string): any; + dxPopup(options: string, ...params: any[]): any; + dxPopup(options: DevExpress.ui.dxPopupOptions): JQuery; + dxPopover(): JQuery; + dxPopover(options: "instance"): DevExpress.ui.dxPopover; + dxPopover(options: string): any; + dxPopover(options: string, ...params: any[]): any; + dxPopover(options: DevExpress.ui.dxPopoverOptions): JQuery; + dxOverlay(): JQuery; + dxOverlay(options: "instance"): DevExpress.ui.dxOverlay; + dxOverlay(options: string): any; + dxOverlay(options: string, ...params: any[]): any; + dxOverlay(options: DevExpress.ui.dxOverlayOptions): JQuery; + dxNumberBox(): JQuery; + dxNumberBox(options: "instance"): DevExpress.ui.dxNumberBox; + dxNumberBox(options: string): any; + dxNumberBox(options: string, ...params: any[]): any; + dxNumberBox(options: DevExpress.ui.dxNumberBoxOptions): JQuery; + dxNavBar(): JQuery; + dxNavBar(options: "instance"): DevExpress.ui.dxNavBar; + dxNavBar(options: string): any; + dxNavBar(options: string, ...params: any[]): any; + dxNavBar(options: DevExpress.ui.dxNavBarOptions): JQuery; + dxMultiView(): JQuery; + dxMultiView(options: "instance"): DevExpress.ui.dxMultiView; + dxMultiView(options: string): any; + dxMultiView(options: string, ...params: any[]): any; + dxMultiView(options: DevExpress.ui.dxMultiViewOptions): JQuery; + dxMap(): JQuery; + dxMap(options: "instance"): DevExpress.ui.dxMap; + dxMap(options: string): any; + dxMap(options: string, ...params: any[]): any; + dxMap(options: DevExpress.ui.dxMapOptions): JQuery; + dxLookup(): JQuery; + dxLookup(options: "instance"): DevExpress.ui.dxLookup; + dxLookup(options: string): any; + dxLookup(options: string, ...params: any[]): any; + dxLookup(options: DevExpress.ui.dxLookupOptions): JQuery; + dxLoadPanel(): JQuery; + dxLoadPanel(options: "instance"): DevExpress.ui.dxLoadPanel; + dxLoadPanel(options: string): any; + dxLoadPanel(options: string, ...params: any[]): any; + dxLoadPanel(options: DevExpress.ui.dxLoadPanelOptions): JQuery; + dxLoadIndicator(): JQuery; + dxLoadIndicator(options: "instance"): DevExpress.ui.dxLoadIndicator; + dxLoadIndicator(options: string): any; + dxLoadIndicator(options: string, ...params: any[]): any; + dxLoadIndicator(options: DevExpress.ui.dxLoadIndicatorOptions): JQuery; + dxList(): JQuery; + dxList(options: "instance"): DevExpress.ui.dxList; + dxList(options: string): any; + dxList(options: string, ...params: any[]): any; + dxList(options: DevExpress.ui.dxListOptions): JQuery; + dxGallery(): JQuery; + dxGallery(options: "instance"): DevExpress.ui.dxGallery; + dxGallery(options: string): any; + dxGallery(options: string, ...params: any[]): any; + dxGallery(options: DevExpress.ui.dxGalleryOptions): JQuery; + dxDropDownEditor(): JQuery; + dxDropDownEditor(options: "instance"): DevExpress.ui.dxDropDownEditor; + dxDropDownEditor(options: string): any; + dxDropDownEditor(options: string, ...params: any[]): any; + dxDropDownEditor(options: DevExpress.ui.dxDropDownEditorOptions): JQuery; + dxDateBox(): JQuery; + dxDateBox(options: "instance"): DevExpress.ui.dxDateBox; + dxDateBox(options: string): any; + dxDateBox(options: string, ...params: any[]): any; + dxDateBox(options: DevExpress.ui.dxDateBoxOptions): JQuery; + dxCheckBox(): JQuery; + dxCheckBox(options: "instance"): DevExpress.ui.dxCheckBox; + dxCheckBox(options: string): any; + dxCheckBox(options: string, ...params: any[]): any; + dxCheckBox(options: DevExpress.ui.dxCheckBoxOptions): JQuery; + dxBox(): JQuery; + dxBox(options: "instance"): DevExpress.ui.dxBox; + dxBox(options: string): any; + dxBox(options: string, ...params: any[]): any; + dxBox(options: DevExpress.ui.dxBoxOptions): JQuery; + dxButton(): JQuery; + dxButton(options: "instance"): DevExpress.ui.dxButton; + dxButton(options: string): any; + dxButton(options: string, ...params: any[]): any; + dxButton(options: DevExpress.ui.dxButtonOptions): JQuery; + dxCalendar(): JQuery; + dxCalendar(options: "instance"): DevExpress.ui.dxCalendar; + dxCalendar(options: string): any; + dxCalendar(options: string, ...params: any[]): any; + dxCalendar(options: DevExpress.ui.dxCalendarOptions): JQuery; + dxAccordion(): JQuery; + dxAccordion(options: "instance"): DevExpress.ui.dxAccordion; + dxAccordion(options: string): any; + dxAccordion(options: string, ...params: any[]): any; + dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; + dxResponsiveBox(): JQuery; + dxResponsiveBox(options: "instance"): DevExpress.ui.dxResponsiveBox; + dxResponsiveBox(options: string): any; + dxResponsiveBox(options: string, ...params: any[]): any; + dxResponsiveBox(options: DevExpress.ui.dxResponsiveBoxOptions): JQuery; + dxAutocomplete(): JQuery; + dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; + dxAutocomplete(options: string): any; + dxAutocomplete(options: string, ...params: any[]): any; + dxAutocomplete(options: DevExpress.ui.dxAutocompleteOptions): JQuery; + dxForm(): JQuery; + dxForm(options: "instance"): DevExpress.ui.dxForm; + dxForm(options: string): any; + dxForm(options: string, ...params: any[]): any; + dxForm(options: DevExpress.ui.dxForm): JQuery; +} + +declare namespace DevExpress.ui { + export interface dxTileViewOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the height of the base tile view item. */ + baseItemHeight?: number; + /** Specifies the width of the base tile view item. */ + baseItemWidth?: number; + /** Specifies whether tiles are placed horizontally or vertically. */ + direction?: string; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the distance in pixels between adjacent tiles. */ + itemMargin?: number; + /** A Boolean value specifying whether or not to display a scrollbar. */ + showScrollbar?: boolean; + } + /** A widget displaying several blocks of data as tiles. */ + export class dxTileView extends CollectionWidget { + constructor(element: JQuery, options?: dxTileViewOptions); + constructor(element: Element, options?: dxTileViewOptions); + /** Returns the current scroll position of the widget content. */ + scrollPosition(): number; + } + export interface dxSwitchOptions extends EditorOptions { + activeStateEnabled?: boolean; + /** Text displayed when the widget is in a disabled state. */ + offText?: string; + /** Text displayed when the widget is in an enabled state. */ + onText?: string; + /** A Boolean value specifying whether the current switch state is "On" or "Off". */ + value?: boolean; + } + /** A switch widget. */ + export class dxSwitch extends Editor { + constructor(element: JQuery, options?: dxSwitchOptions); + constructor(element: Element, options?: dxSwitchOptions); + } + export interface dxSlideOutViewOptions extends WidgetOptions { + /** Specifies the current menu position. */ + menuPosition?: string; + /** Specifies whether or not the menu panel is visible. */ + menuVisible?: boolean; + /** Specifies whether or not the menu is shown when a user swipes the widget content. */ + swipeEnabled?: boolean; + /** A template to be used for rendering menu panel content. */ + menuTemplate?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal a custom menu. */ + export class dxSlideOutView extends Widget { + constructor(element: JQuery, options?: dxSlideOutViewOptions); + constructor(element: Element, options?: dxSlideOutViewOptions); + /** Returns an HTML element of the widget menu block. */ + menuContent(): JQuery; + /** Returns an HTML element of the widget content block. */ + content(): JQuery; + /** Displays the widget's menu block. */ + showMenu(): JQueryPromise; + /** Hides the widget's menu block. */ + hideMenu(): JQueryPromise; + /** Toggles the visibility of the widget's menu block. */ + toggleMenuVisibility(): JQueryPromise; + } + export interface dxSlideOutOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not to display a grouped menu. */ + menuGrouped?: boolean; + /** Specifies the current menu position. */ + menuPosition?: string; + /** The name of the template used to display a group header. */ + menuGroupTemplate?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** A handler for the menuGroupRendered event. */ + onMenuGroupRendered?: Function; + /** A handler for the menuItemRendered event. */ + onMenuItemRendered?: Function; + /** Specifies whether or not the slide-out menu is displayed. */ + menuVisible?: boolean; + /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal an item list. */ + export class dxSlideOut extends CollectionWidget { + constructor(element: JQuery, options?: dxSlideOutOptions); + constructor(element: Element, options?: dxSlideOutOptions); + /** Hides the widget's slide-out menu. */ + hideMenu(): JQueryPromise; + /** Displays the widget's slide-out menu. */ + showMenu(): JQueryPromise; + /** Toggles the visibility of the widget's slide-out menu. */ + toggleMenuVisibility(showing: boolean): JQueryPromise; + } + export interface dxPivotOptions extends CollectionWidgetOptions { + /** The index of the currently active pivot item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + } + /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ + export class dxPivot extends CollectionWidget { + constructor(element: JQuery, options?: dxPivotOptions); + constructor(element: Element, options?: dxPivotOptions); + } + export interface dxPanoramaOptions extends CollectionWidgetOptions { + /** An object exposing options for setting a background image for the panorama. */ + backgroundImage?: { + /** Specifies the height of the panorama's background image. */ + height?: number; + /** Specifies the URL of the image that is used as the panorama's background image. */ + url?: string; + /** Specifies the width of the panorama's background image. */ + width?: number; + }; + /** The index of the currently active panorama item. */ + selectedIndex?: number; + /** Specifies the widget content title. */ + title?: string; + } + /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ + export class dxPanorama extends CollectionWidget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + } + export interface dxDropDownMenuOptions extends WidgetOptions { + /** A handler for the buttonClick event. */ + onButtonClick?: any; + /** The name of the icon to be displayed by the DropDownMenu button. */ + buttonIcon?: string; + /** The text displayed in the DropDownMenu button. */ + buttonText?: string; + buttonIconSrc?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ + usePopover?: boolean; + /** The width of the menu popup in pixels. */ + popupWidth?: any; + /** The height of the menu popup in pixels. */ + popupHeight?: any; + /** Specifies whether or not the drop-down menu is displayed. */ + opened?: boolean; + hoverStateEnabled?: boolean; + activeStateEnabled?: boolean; + } + /** A drop-down menu widget. */ + export class dxDropDownMenu extends Widget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** This section lists the data source fields that are used in a default template for drop-down menu items. */ + /** Opens the drop-down menu. */ + open(): void; + /** Closes the drop-down menu. */ + close(): void; + } + export interface dxActionSheetOptions extends CollectionWidgetOptions { + /** A handler for the cancelClick event. */ + onCancelClick?: any; + /** The text displayed in the button that closes the action sheet. */ + cancelText?: string; + /** Specifies whether or not to display the Cancel button in action sheet. */ + showCancelButton?: boolean; + /** A Boolean value specifying whether or not the title of the action sheet is visible. */ + showTitle?: boolean; + /** Specifies the element the action sheet popover points at. */ + target?: any; + /** The title of the action sheet. */ + title?: string; + /** Specifies whether or not to show the action sheet within a dxPopover widget. */ + usePopover?: boolean; + /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ + visible?: boolean; + } + /** A widget consisting of a set of choices related to a certain task. */ + export class dxActionSheet extends CollectionWidget { + constructor(element: JQuery, options?: dxActionSheetOptions); + constructor(element: Element, options?: dxActionSheetOptions); + /** Hides the widget. */ + hide(): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ + toggle(showing: boolean): JQueryPromise; + } +} +interface JQuery { + dxTileView(): JQuery; + dxTileView(options: "instance"): DevExpress.ui.dxTileView; + dxTileView(options: string): any; + dxTileView(options: string, ...params: any[]): any; + dxTileView(options: DevExpress.ui.dxTileViewOptions): JQuery; + dxSwitch(): JQuery; + dxSwitch(options: "instance"): DevExpress.ui.dxSwitch; + dxSwitch(options: string): any; + dxSwitch(options: string, ...params: any[]): any; + dxSwitch(options: DevExpress.ui.dxSwitchOptions): JQuery; + dxSlideOut(): JQuery; + dxSlideOut(options: "instance"): DevExpress.ui.dxSlideOut; + dxSlideOut(options: string): any; + dxSlideOut(options: string, ...params: any[]): any; + dxSlideOut(options: DevExpress.ui.dxSlideOutOptions): JQuery; + dxPivot(): JQuery; + dxPivot(options: "instance"): DevExpress.ui.dxPivot; + dxPivot(options: string): any; + dxPivot(options: string, ...params: any[]): any; + dxPivot(options: DevExpress.ui.dxPivotOptions): JQuery; + dxPanorama(): JQuery; + dxPanorama(options: "instance"): DevExpress.ui.dxPanorama; + dxPanorama(options: string): any; + dxPanorama(options: string, ...params: any[]): any; + dxPanorama(options: DevExpress.ui.dxPanoramaOptions): JQuery; + dxActionSheet(): JQuery; + dxActionSheet(options: "instance"): DevExpress.ui.dxActionSheet; + dxActionSheet(options: string): any; + dxActionSheet(options: string, ...params: any[]): any; + dxActionSheet(options: DevExpress.ui.dxActionSheetOptions): JQuery; + dxDropDownMenu(): JQuery; + dxDropDownMenu(options: "instance"): DevExpress.ui.dxDropDownMenu; + dxDropDownMenu(options: string): any; + dxDropDownMenu(options: string, ...params: any[]): any; + dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; +} +declare namespace DevExpress.data { + export interface XmlaStoreOptions { + /** The HTTP address to an XMLA OLAP server. */ + url?: string; + /** The name of the database associated with the Store. */ + catalog?: string; + /** The cube name. */ + cube?: string; + /** A function used to customize a web request before it is sent. */ + beforeSend?: (request: Object) => void; + } + /** A Store that provides access to an OLAP cube using the XMLA standard. */ + export class XmlaStore { + constructor(options: XmlaStoreOptions); + } + export interface PivotGridField { + index?: number; + /** A boolean value specifying whether or not the field is visible in the pivot grid and the Field Chooser. */ + visible?: boolean; + /** Name of the data source field containing data for the pivot grid field. */ + dataField?: string; + /** A caption that will be displayed in the pivot grid's field chooser to identify the field. */ + caption?: string; + /** Specifies a type of field values. */ + dataType?: string; + /** Specifies how the values of the current field are combined into groups. Cannot be used for the XmlaStore store type. */ + groupInterval?: any; + /** Specifies how to aggregate field data. Cannot be used for the XmlaStore store type. */ + summaryType?: string; + /** Allows you to use a custom aggregate function to calculate the summary values. Cannot be used for the XmlaStore store type. */ + calculateCustomSummary?: (options: { + summaryProcess?: string; + value?: any; + totalValue?: any; + }) => void; + /** Specifies the function that determines how to split data from the data source into ranges for header items. Cannot be used for the XmlaStore store type. */ + selector?: (data: Object) => any; + /** Type of the area where the field is located. */ + area?: string; + /** Index among the other fields displayed within the same area. */ + areaIndex?: number; + /** The name of the folder in which the field is located. */ + displayFolder?: string; + /** The name of the group to which the field belongs. */ + groupName?: string; + /** The index of the field within a group. */ + groupIndex?: number; + /** Specifies the initial sort order of field values. */ + sortOrder?: string; + /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ + sortBy?: string; + /** Specifies the data field against which the header items of this field should be sorted. */ + sortBySummaryField?: string; + /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ + sortBySummaryPath?: Array; + /** The filter values for the current field. */ + filterValues?: Array; + /** The filter type for the current field. */ + filterType?: string; + /** Indicates whether all header items of the field's header level are expanded. */ + expanded?: boolean; + /** Specifies whether the field should be treated as a Data Field. */ + isMeasure?: boolean; + /** Specifies a display format for field values. */ + format?: string; + /** Specifies a callback function that returns the text to be displayed in the cells of a field. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies a precision for formatted field values. */ + precision?: number; + /** Specifies how to sort the header items. */ + sortingMethod?: (a: Object, b: Object) => number; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies the absolute width of the field in the pivot grid. */ + width?: number; + /** Specifies the summary post-processing algorithm. */ + summaryDisplayMode?: string; + /** Specifies whether to summarize each next summary value with the previous one by rows or columns. */ + runningTotal?: string; + /** Specifies whether to allow the predefined summary post-processing functions ('absoluteVariation' and 'percentVariation') and runningTotal to take values of different groups into account. */ + allowCrossGroupCalculation?: boolean; + /** Specifies a callback function that allows you to modify summary values after they are calculated. */ + calculateSummaryValue?: (e: Object) => number; + /** Specifies whether or not to display Total values for the field. */ + showTotals?: boolean; + /** Specifies whether or not to display Grand Total values for the field. */ + showGrandTotals?: boolean; + } + export class SummaryCell { + /** Gets the parent cell in a specified direction. */ + parent(direction: string): SummaryCell; + /** Gets all children cells in a specified direction. */ + children(direction: string): Array; + /** Gets a partial Grand Total cell of a row or column. */ + grandTotal(direction: string): SummaryCell; + /** Gets the Grand Total of the entire pivot grid. */ + grandTotal(): SummaryCell; + /** Gets the cell next to the current one in a specified direction. */ + next(direction: string): SummaryCell; + /** Gets the cell next to current in a specified direction. */ + next(direction: string, allowCrossGroup: boolean): SummaryCell; + /** Gets the cell prior to the current one in a specified direction. */ + prev(direction: string): SummaryCell; + /** Gets the cell previous to current in a specified direction. */ + prev(direction: string, allowCrossGroup: boolean): SummaryCell; + /** Gets the child cell in a specified direction. */ + child(direction: string, fieldValue: any): SummaryCell; + /** Gets the cell located by the path of the source cell with one field value changed. */ + slice(field: PivotGridField, value: any): SummaryCell; + /** Gets the header cell of a row or column field to which the current cell belongs. */ + field(area: string): PivotGridField; + /** Gets the value of the current cell. */ + value(): any; + /** Gets the value of the current cell. */ + value(isCalculatedValue: boolean): any; + /** Gets the value of any field linked with the current cell. */ + value(field: PivotGridField): any; + /** Gets the value of any field linked with the current cell. */ + value(field: PivotGridField, isCalculatedValue: boolean): any; + } + export interface PivotGridDataSourceOptions { + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** Indicates whether or not the automatic field generation from data in the Store is enabled. */ + retrieveFields?: boolean; + /** Specifies data filtering conditions. Cannot be used for the XmlaStore store type. */ + filter?: Object; + /** An array of pivot grid fields. */ + fields?: Array; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Object) => void; + /** A handler for the fieldsPrepared event. */ + onFieldsPrepared?: (e?: Array) => void; + } + /** An object that provides access to data for the dxPivotGrid widget. */ + export class PivotGridDataSource implements EventsMixin { + constructor(options?: PivotGridDataSource); + /** Starts reloading data from any store and updating the data source. */ + reload(): JQueryPromise; + /** Starts updating the data source. Reloads data from the XMLA store only. */ + load(): JQueryPromise; + /** Indicates whether or not the PivotGridDataSource is currently being loaded. */ + isLoading(): boolean; + /** Gets data displayed in a PivotGrid. */ + getData(): Object; + /** Gets all fields within a specified area. */ + getAreaFields(area: string, collectGroups: boolean): Array; + /** Gets all fields from the data source. */ + fields(): Array; + /** Sets the fields option. */ + fields(fields: Array): void; + /** Gets current options of a specified field. */ + field(id: any): PivotGridField; + /** Sets one or more options of a specified field. */ + field(id: any, field: PivotGridField): void; + /** Collapses a specified header item. */ + collapseHeaderItem(area: string, path: Array): void; + /** Expands a specified header item. */ + expandHeaderItem(area: string, path: Array): void; + /** Expands all header items of a field. */ + expandAll(id: any): void; + /** Collapses all header items of a field. */ + collapseAll(id: any): void; + /** Disposes of all resources associated with this PivotGridDataSource. */ + dispose(): void; + /** Gets the current filter expression. Cannot be used for the XmlaStore store type. */ + filter(): Object; + /** Applies a new filter expression. Cannot be used for the XmlaStore store type. */ + filter(filterExpr: Object): void; + /** Provides access to a list of records (facts) that were used to calculate a specific summary. */ + createDrillDownDataSource(options: { + columnPath?: Array; + rowPath?: Array; + dataIndex?: number; + maxRowCount?: number; + customColumns?: Array; + }): DevExpress.data.DataSource; + /** Gets the current PivotGridDataSource state (fields configuration, sorting, filters, expanded headers, etc.) */ + state(): Object; + /** Sets the PivotGridDataSource state. */ + state(state: Object): void; + on(eventName: string, eventHandler: Function): PivotGridDataSource; + on(events: { [eventName: string]: Function; }): PivotGridDataSource; + off(eventName: string): PivotGridDataSource; + off(eventName: string, eventHandler: Function): PivotGridDataSource; + } +} +declare namespace DevExpress.ui { + export interface dxSchedulerOptions extends WidgetOptions { + /** Specifies a date displayed on the current scheduler view by default. */ + currentDate?: Date; + /** The earliest date the widget allows you to select. */ + min?: Date; + /** The latest date the widget allows you to select. */ + max?: Date; + /** Specifies the view used in the scheduler by default. */ + currentView?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The template to be used for rendering appointments. */ + appointmentTemplate?: any; + /** The template to be used for rendering an appointment tooltip. */ + appointmentTooltipTemplate?: any; + /** Lists the views to be available within the scheduler's View Selector. */ + views?: Array; + /** Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable. */ + groups?: Array; + /** Specifies a start hour in the scheduler view's time interval. */ + startDayHour?: number; + /** Specifies an end hour in the scheduler view's time interval. */ + endDayHour?: number; + /** Specifies whether or not the "All-day" panel is visible. */ + showAllDayPanel?: boolean; + /** Specifies cell duration in minutes. */ + cellDuration?: number; + /** Specifies the edit mode for recurrent appointments. */ + recurrenceEditMode?: string; + /** Specifies which editing operations an end-user can perform on appointments. */ + editing?: { + /** Specifies whether or not an end-user can add appointments. */ + allowAdding?: boolean; + /** Specifies whether or not an end-user can change appointment options. */ + allowUpdating?: boolean; + /** Specifies whether or not an end-user can delete appointments. */ + allowDeleting?: boolean; + /** Specifies whether or not an end-user can change an appointment duration. */ + allowResizing?: boolean; + /** Specifies whether or not an end-user can drag appointments. */ + allowDragging?: boolean; + } + /** Specifies an array of resources available in the scheduler. */ + resources?: Array<{ + /** Indicates whether or not several resources of this kind can be assigned to an appointment. */ + allowMultiple?: boolean; + /** + * Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. + * @deprecated Use the 'useColorAsDefault' property instead + */ + mainColor?: boolean; + /** Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. */ + useColorAsDefault?: boolean; + /** A data source used to fetch resources to be available in the scheduler. */ + dataSource?: any; + /** Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window. */ + displayExpr?: any; + /** Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window. */ + valueExpr?: any; + /** The name of the appointment object field that specifies a resource of this kind. */ + field?: string; + /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ + label?: string; + }>; + /** A handler for the AppointmentAdding event. */ + onAppointmentAdding?: Function; + /** A handler for the appointmentAdded event. */ + onAppointmentAdded?: Function; + /** A handler for the AppointmentUpdating event. */ + onAppointmentUpdating?: Function; + /** A handler for the appointmentUpdated event. */ + onAppointmentUpdated?: Function; + /** A handler for the AppointmentDeleting event. */ + onAppointmentDeleting?: Function; + /** A handler for the appointmentDeleted event. */ + onAppointmentDeleted?: Function; + /** A handler for the appointmentRendered event. */ + onAppointmentRendered?: Function; + /** A handler for the appointmentClick event. */ + onAppointmentClick?: any; + /** A handler for the appointmentDblClick event. */ + onAppointmentDblClick?: any; + /** A handler for the cellClick event. */ + onCellClick?: any; + /** A handler for the appointmentFormCreated event. */ + onAppointmentFormCreated?: Function; + /** Specifies whether or not an end-user can scroll the view horizontally. */ + horizontalScrollingEnabled?: boolean; + /** Specifies whether a user can switch views using tabs or a drop-down menu. */ + useDropDownViewSwitcher?: boolean; + /** Specifies the name of the data source item field that defines the start of an appointment. */ + startDateExpr?: string; + /** Specifies the name of the data source item field that defines the ending of an appointment. */ + endDateExpr?: string; + /** Specifies the name of the data source item field that holds the subject of an appointment. */ + textExpr?: string; + /** Specifies the name of the data source item field whose value holds the description of the corresponding appointment. */ + descriptionExpr?: string; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding appointment is an all-day appointment. */ + allDayExpr?: string; + /** Specifies the name of the data source item field that defines a recurrence rule for generating recurring appointments. */ + recurrenceRuleExpr?: string; + /** Specifies the name of the data source item field that defines exceptions for the current recurring appointment. */ + recurrenceExceptionExpr?: string; + /** Specifies whether filtering is performed on the server or client side. */ + remoteFiltering?: boolean; + } + /** A widget that displays scheduled data using different views and provides the capability to load, add and edit appointments. */ + export class dxScheduler extends Widget { + constructor(element: JQuery, options?: dxSchedulerOptions); + constructor(element: Element, options?: dxSchedulerOptions); + /** Add the appointment defined by the object passed as a parameter to the data associated with the widget. */ + addAppointment(appointment: Object): void; + /** Updates the appointment specified by the first method parameter by the appointment object specified by the second method parameter in the the data associated with the widget. */ + updateAppointment(target: Object, appointment: Object): void; + /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ + deleteAppointment(appointment: Object): void; + /** Scrolls the scheduler work space to the specified time. */ + scrollToTime(hours: number, minutes: number): void; + /** Displays the Appointment Details popup. */ + showAppointmentPopup(appointmentData: Object, createNewAppointment?: boolean): void; + } + export interface dxColorBoxOptions extends dxDropDownEditorOptions { + /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ + applyButtonText?: string; + applyValueMode?: string; + /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ + cancelButtonText?: string; + /** Specifies whether or not the widget value includes the alpha channel component. */ + editAlphaChannel?: boolean; + /** Specifies the size of a step by which a handle is moved using a keyboard shortcut. */ + keyStep?: number; + } + /** A widget used to specify a color value. */ + export class dxColorBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxColorBoxOptions); + constructor(element: Element, options?: dxColorBoxOptions); + } + export interface HierarchicalCollectionWidgetOptions extends CollectionWidgetOptions { + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of the data source item field used as a key. */ + keyExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is selected. */ + selectedExpr?: any; + /** Specifies the name of the data source item field that contains an array of nested items. */ + itemsExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget item is disabled. */ + disabledExpr?: any; + /** Specifies the name of the data source item field that holds the key of the parent item. */ + parentIdExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is expanded. */ + expandedExpr?: any; + hoverStateEnabled?: boolean; + focusStateEnabled?: boolean; + } + export class HierarchicalCollectionWidget extends CollectionWidget { + } + export interface dxTreeViewOptions extends HierarchicalCollectionWidgetOptions { + /** Specifies whether or not to animate item collapsing and expanding. */ + animationEnabled?: boolean; + /** Specifies whether a nested or plain array is used as a data source. */ + dataStructure?: string; + /** Specifies whether or not a user can expand all tree view items by the "*" hot key. */ + expandAllEnabled?: boolean; + /** + * Specifies whether or not a check box is displayed at each tree view item. + * @deprecated Use the showCheckBoxesMode option instead. + */ + showCheckBoxes?: boolean; + /** Specifies the current check boxes display mode. */ + showCheckBoxesMode?: string; + /** Specifies whether or not to select nodes recursively. */ + selectNodesRecursive?: boolean; + /** Specifies whether or not all parent nodes of an initially expanded node are displayed expanded. */ + expandNodesRecursive?: boolean; + /** + * Specifies whether the "Select All" check box is displayed over the tree view. + * @deprecated Use the showCheckBoxesMode option instead. + */ + selectAllEnabled?: boolean; + /** Specifies the text displayed at the "Select All" check box. */ + selectAllText?: string; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ + hasItemsExpr?: any; + /** Specifies if the virtual mode is enabled. */ + virtualModeEnabled?: boolean; + /** Specifies the parent ID value of the root item. */ + rootValue?: any; + /** Specifies the current value used to filter tree view items. */ + searchValue?: string; + /** A string value specifying available scrolling directions. */ + scrollDirection?: string; + /** A handler for the itemSelected event. */ + onItemSelected?: Function; + /** A handler for the itemExpanded event. */ + onItemExpanded?: Function; + /** A handler for the itemCollapsed event. */ + onItemCollapsed?: Function; + onItemClick?: Function; + onItemContextMenu?: Function; + onItemRendered?: Function; + onItemHold?: Function; + } + /** A widget displaying specified data items as a tree. */ + export class dxTreeView extends HierarchicalCollectionWidget { + constructor(element: JQuery, options?: dxTreeViewOptions); + constructor(element: Element, options?: dxTreeViewOptions); + /** Updates the tree view scrollbars according to the current size of the widget content. */ + updateDimensions(): JQueryPromise; + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + /** Expands the specified item. */ + expandItem(itemElement: any): void; + /** Collapses the specified item. */ + collapseItem(itemElement: any): void; + /** Returns all nodes of the tree view. */ + getNodes(): Array; + /** Selects all widget items. */ + selectAll(): void; + /** Unselects all widget items. */ + unselectAll(): void; + } + export interface dxMenuBaseOptions extends HierarchicalCollectionWidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the name of the CSS class associated with the menu. */ + cssClass?: string; + /** Holds an array of menu items. */ + items?: Array; + /** Specifies whether or not an item becomes selected if an end-user clicks it. */ + selectionByClick?: boolean; + /** Specifies the selection mode supported by the menu. */ + selectionMode?: string; + /** Specifies options of submenu showing and hiding. */ + showSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu show and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + } + export class dxMenuBase extends HierarchicalCollectionWidget { + constructor(element: JQuery, options?: dxMenuBaseOptions); + constructor(element: Element, options?: dxMenuBaseOptions); + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + } + export interface dxMenuOptions extends dxMenuBaseOptions { + /** Specifies whether or not the submenu is hidden when the mouse pointer leaves it. */ + hideSubmenuOnMouseLeave?: boolean; + /** Specifies whether the menu has horizontal or vertical orientation. */ + orientation?: string; + /** Specifies options for showing and hiding the first level submenu. */ + showFirstSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay in submenu showing and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + /** Specifies the direction at which the submenus are displayed. */ + submenuDirection?: string; + /** A handler for the submenuHidden event. */ + onSubmenuHidden?: Function; + /** A handler for the submenuHiding event. */ + onSubmenuHiding?: Function; + /** A handler for the submenuShowing event. */ + onSubmenuShowing?: Function; + /** A handler for the submenuShown event. */ + onSubmenuShown?: Function; + } + /** A menu widget. */ + export class dxMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxMenuOptions); + constructor(element: Element, options?: dxMenuOptions); + } + export interface dxContextMenuOptions extends dxMenuBaseOptions { + /** Holds an object that specifies options of alternative menu invocation. */ + alternativeInvocationMode?: { + /** Specifies whether or not the standard context menu invocation (on a right mouse click or on a long tap) is disabled. */ + enabled?: Boolean; + /** Specifies the element used to invoke the context menu. */ + invokingElement?: any; + }; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** A handler for the positioning event. */ + onPositioning?: Function; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the direction at which submenus are displayed. */ + submenuDirection?: string; + /** The target element associated with a popover. */ + target?: any; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + } + /** A context menu widget. */ + export class dxContextMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxContextMenuOptions); + constructor(element: Element, options?: dxContextMenuOptions); + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Hides the widget. */ + hide(): JQueryPromise; + } + export interface dxRemoteOperations { + /** Specifies whether or not filtering must be performed on the server side. */ + filtering?: boolean; + /** Specifies whether or not paging must be performed on the server side. */ + paging?: boolean; + /** Specifies whether or not sorting must be performed on the server side. */ + sorting?: boolean; + /** Specifies whether or not grouping must be performed on the server side. */ + grouping?: boolean; + /** Specifies whether or not summaries calculation must be performed on the server side. */ + summary?: boolean; + } + export interface dxDataGridRow { + /** The data object represented by the row. */ + data: Object; + /** The key of the data object represented by the row. */ + key: any; + /** The visible index of the row. */ + rowIndex: number; + /** The type of the row. */ + rowType: string; + } + export interface dxDataGridColumn { + /** Specifies the content alignment within column cells. */ + alignment?: string; + /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ + allowEditing?: boolean; + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ + allowFiltering?: boolean; + /** Specifies whether or not to allow filtering by this column using its header. */ + allowHeaderFiltering?: boolean; + /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ + allowFixing?: boolean; + /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ + allowSearch?: boolean; + /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ + allowGrouping?: boolean; + /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ + allowHiding?: boolean; + /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ + allowReordering?: boolean; + /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ + allowResizing?: boolean; + /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ + allowSorting?: boolean; + /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ + autoExpandGroup?: boolean; + /** Specifies a callback function that returns a value to be displayed in a column cell. */ + calculateCellValue?: (rowData: Object) => string; + /** Specifies a callback function to be invoked after the cell value is edited by an end-user and before the new value is saved to the data source. */ + setCellValue?: (rowData: Object, value: any) => void; + /** Specifies a callback function that defines filters for customary calculated grid cells. */ + calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string, target: string) => Array; + /** Specifies a caption for a column. */ + caption?: string; + /** Specifies a custom template for grid column cells. */ + cellTemplate?: any; + /** Specifies a CSS class to be applied to a column. */ + cssClass?: string; + /** Specifies how to get a value to be displayed in a cell when it is not in an editing state. */ + calculateDisplayValue?: any; + /** Specifies a field name or a function that returns a field name or a value to be used for grouping column cells. */ + calculateGroupValue?: any; + /** Specifies a field name or a function that returns a field name or a value to be used for sorting column cells. */ + calculateSortValue?: any; + /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies the field of a data source that provides data for a column. */ + dataField?: string; + /** Specifies the required type of column values. */ + dataType?: string; + /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ + editCellTemplate?: any; + /** Specifies configuration options for the editor widget of the current column. */ + editorOptions?: Object; + /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ + encodeHtml?: boolean; + /** In a boolean column, replaces all false items with a specified text. */ + falseText?: string; + /** Specifies the set of available filter operations. */ + filterOperations?: Array; + /** Specifies a filter value for a column. */ + filterValue?: any; + /** Specifies initial filter values for the column's header filter. */ + filterValues?: Array; + /** Specifies whether to include or exclude the records with the values selected in the column's header filter. */ + filterType?: string; + /** Indicates whether the column takes part in horizontal grid scrolling or is anchored to a grid edge. */ + fixed?: boolean; + /** Specifies the grid edge to which the column is anchored. */ + fixedPosition?: string; + /** Specifies a format for the values displayed in a column. */ + format?: string; + /** Specifies a custom template for the group cell of a grid column. */ + groupCellTemplate?: any; + /** Specifies the index of a column when grid records are grouped by the values of this column. */ + groupIndex?: number; + /** Specifies a custom template for the header of a grid column. */ + headerCellTemplate?: any; + /** Specifies options of a lookup column. */ + lookup?: { + /** Specifies whether or not a user can nullify values of a lookup column. */ + allowClearing?: boolean; + /** Specifies the data source providing data for a lookup column. */ + dataSource?: any; + /** Specifies the expression defining the data source field whose values must be displayed. */ + displayExpr?: any; + /** Specifies the expression defining the data source field whose values must be replaced. */ + valueExpr?: string; + }; + /** Specifies column-level options for filtering using a column header filter. */ + headerFilter?: { + /** Specifies the data source to be used for the header filter. */ + dataSource?: any; + /** Specifies how header filter values should be combined into groups. */ + groupInterval?: any; + }; + /** Specifies a precision for formatted values displayed in a column. */ + precision?: number; + /** Specifies a filter operation applied to a column. */ + selectedFilterOperation?: string; + /** Specifies whether or not the column displays its values by using editors. */ + showEditorAlways?: boolean; + /** Specifies whether or not to display the column when grid records are grouped by it. */ + showWhenGrouped?: boolean; + /** Specifies the index of a column when grid records are sorted by the values of this column. */ + sortIndex?: number; + /** Specifies the initial sort order of column values. */ + sortOrder?: string; + /** In a boolean column, replaces all true items with a specified text. */ + trueText?: string; + /** Specifies whether a column is visible or not. */ + visible?: boolean; + /** Specifies the sequence number of the column in the grid. */ + visibleIndex?: number; + /** Specifies a column width in pixels or percentages. */ + width?: any; + /** Specifies an array of validation rules to be checked when updating column cell values. */ + validationRules?: Array; + /** Specifies whether or not to display the header of a hidden column in the column chooser. */ + showInColumnChooser?: boolean; + /** Specifies the identifier of the column. */ + name?: string; + /** The form item configuration object. Used only when the editing mode is "form". */ + formItem?: DevExpress.ui.dxFormItem; + } + export interface dxDataGridOptions extends WidgetOptions { + /** Specifies whether the outer borders of the grid are visible or not. */ + showBorders?: boolean; + /** Indicates whether to show the error row for the grid. */ + errorRowEnabled?: boolean; + /** A handler for the rowValidating event. */ + onRowValidating?: (e: Object) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + /** A handler for the initNewRow event. */ + onInitNewRow?: (e: { data: Object }) => void; + /** A handler for the rowInserted event. */ + onRowInserted?: (e: { data: Object; key: any }) => void; + /** A handler for the rowInserting event. */ + onRowInserting?: (e: { data: Object; cancel: any }) => void; + /** A handler for the rowRemoved event. */ + onRowRemoved?: (e: { data: Object; key: any }) => void; + /** A handler for the rowRemoving event. */ + onRowRemoving?: (e: { data: Object; key: any; cancel: any }) => void; + /** A handler for the rowUpdated event. */ + onRowUpdated?: (e: { data: Object; key: any }) => void; + /** A handler for the rowUpdating event. */ + onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: any }) => void; + /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ + cellHintEnabled?: boolean; + /** Specifies whether or not grid columns can be reordered by a user. */ + allowColumnReordering?: boolean; + /** Specifies whether or not grid columns can be resized by a user. */ + allowColumnResizing?: boolean; + /** A handler for the cellClick event. */ + onCellClick?: any; + /** A handler for the cellHoverChanged event. */ + onCellHoverChanged?: (e: Object) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: Object) => void; + /** Specifies whether or not the width of grid columns depends on column content. */ + columnAutoWidth?: boolean; + /** Specifies the options of a column chooser. */ + columnChooser?: { + /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether a user can invoke the column chooser or not. */ + enabled?: boolean; + /** Specifies the height of the column chooser panel. */ + height?: number; + /** Specifies text displayed in the title of the column chooser panel. */ + title?: string; + /** Specifies the width of the column chooser panel. */ + width?: number; + }; + /** Specifies options for column fixing. */ + columnFixing?: { + /** Indicates if column fixing is enabled. */ + enabled?: boolean; + /** Contains options that specify texts for column-fixing related commands in the column header's context menu. */ + texts?: { + /** Specifies text for a context menu item that fixes the column for which the context menu is invoked. */ + fix?: string; + /** Specifies text for a context menu item that unfixes the column for which the context menu is invoked. */ + unfix?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the left grid edge. */ + leftPosition?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the right grid edge. */ + rightPosition?: string; + }; + }; + /** Specifies options for filtering using a column header filter. */ + headerFilter?: { + /** Indicates whether or not the column header filter button is visible. */ + visible?: boolean; + /** Specifies the height of the dropdown menu invoked when using a column header filter. */ + height?: number; + /** Specifies the width of the dropdown menu invoked when using a column header filter. */ + width?: number; + /** Contains options that specify texts for the dropdown menu invoked when you use a column header filter. */ + texts?: { + /** Specifies text for the item specifying an empty value in the column header filter's dropdown menu. */ + emptyValue?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu and applies specified filtering. */ + ok?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu without applying performed selection. */ + cancel?: string; + } + }; + /** An array of grid columns. */ + columns?: Array; + onContentReady?: Function; + /** Specifies a function that customizes grid columns after they are created. */ + customizeColumns?: (columns: Array) => void; + /** Specifies a data source for the grid. */ + dataSource?: any; + /** Specifies whether or not to enable data caching. */ + cacheEnabled?: boolean; + /** A handler for the editingStart event. */ + onEditingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + /** A handler for the editorPrepared event. */ + onEditorPrepared?: (e: Object) => void; + /** A handler for the editorPreparing event. */ + onEditorPreparing?: (e: Object) => void; + /** Contains options that specify how grid content can be changed. */ + editing?: { + editMode?: string; + editEnabled?: boolean; + insertEnabled?: boolean; + removeEnabled?: boolean; + /** Specifies how grid values can be edited manually. */ + mode?: string; + /** Specifies whether or not grid records can be edited at runtime. */ + allowUpdating?: boolean; + /** Specifies whether or not new grid records can be added at runtime. */ + allowAdding?: boolean; + /** Specifies whether or not grid records can be deleted at runtime. */ + allowDeleting?: boolean; + /** The form configuration object. Used only when the editing mode is "form". */ + form?: DevExpress.ui.dxFormOptions; + /** Contains options that specify texts for editing-related grid controls. */ + texts?: { + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ + saveAllChanges?: string; + /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ + cancelRowChanges?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ + cancelAllChanges?: string; + /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteMessage?: string; + /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteTitle?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Cancel changes" button. Setting this option makes sense only when the editMode option is set to cell and the validation capabilities are enabled. */ + validationCancelChanges?: string; + /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the allowDeleting option is set to true. */ + deleteRow?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the allowAdding option is true. */ + addRow?: string; + /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ + editRow?: string; + /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the allowUpdating option is set to true. */ + saveRowChanges?: string; + /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the allowDeleting option is set to true. */ + undeleteRow?: string; + }; + }; + /** Specifies filter row options. */ + filterRow?: { + /** Specifies when to apply a filter. */ + applyFilter?: string; + /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ + applyFilterText?: string; + /** Specifies descriptions for filter operations. */ + operationDescriptions?: { + "=": string; + "<>": string; + "<": string; + "<=": string; + ">": string; + ">=": string; + "startswith": string; + "contains": string; + "notcontains": string; + "endswith": string; + }; + /** Specifies text for the reset operation in a filter list. */ + resetOperationText?: string; + /** Specifies text for the operation of clearing the applied filter when a select box is used. */ + showAllText?: string; + /** Specifies text for the range start in the 'between' filter type. */ + betweenStartText?: string; + /** Specifies text for the range end in the 'between' filter type. */ + betweenEndText?: string; + /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ + showOperationChooser?: boolean; + /** Specifies whether the filter row is visible or not. */ + visible?: boolean; + }; + /** Specifies the behavior of grouped grid records. */ + grouping?: { + /** Specifies whether the user can collapse grouped records in a grid or not. */ + allowCollapsing?: boolean; + /** Specifies whether groups appear expanded or not. */ + autoExpandAll?: boolean; + /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ + groupContinuedMessage?: string; + /** Specifies the message displayed in a group row when the corresponding group continues on the next page. */ + groupContinuesMessage?: string; + }; + /** Specifies options that configure the group panel. */ + groupPanel?: { + /** Specifies whether columns can be dragged onto or from the group panel. */ + allowColumnDragging?: boolean; + /** Specifies text displayed by the group panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether the group panel is visible or not. */ + visible?: boolean; + }; + /** Specifies options configuring the load panel. */ + loadPanel?: { + /** Specifies whether to show the load panel or not. */ + enabled?: boolean; + /** Specifies the height of the load panel in pixels. */ + height?: number; + /** Specifies a URL pointing to an image to be used as a loading indicator. */ + indicatorSrc?: string; + /** Specifies whether or not a loading indicator must be displayed on the load panel. */ + showIndicator?: boolean; + /** Specifies whether or not the pane of the load panel must be displayed. */ + showPane?: boolean; + /** Specifies text displayed by the load panel. */ + text?: string; + /** Specifies the width of the load panel in pixels. */ + width?: number; + }; + /** Specifies text displayed when a grid does not contain any records. */ + noDataText?: string; + /** Specifies the options of a grid pager. */ + pager?: { + /** Specifies the page sizes that can be selected at runtime. */ + allowedPageSizes?: any; + /** Specifies whether to show the page size selector or not. */ + showPageSizeSelector?: boolean; + /** Specifies whether to show the pager or not. */ + visible?: any; + /** Specifies the text accompanying the page navigator. */ + infoText?: string; + /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ + showInfo?: boolean; + /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ + showNavigationButtons?: boolean; + }; + /** Specifies paging options. */ + paging?: { + /** Specifies whether dxDataGrid loads data page by page or all at once. */ + enabled?: boolean; + /** Specifies the grid page that should be displayed by default. */ + pageIndex?: number; + /** Specifies the size of grid pages. */ + pageSize?: number; + }; + /** Specifies whether or not grid rows must be shaded in a different way. */ + rowAlternationEnabled?: boolean; + /** Specifies whether to enable two-way data binding. */ + twoWayBindingEnabled?: boolean; + /** A handler for the rowClick event. */ + onRowClick?: any; + /** A handler for the rowPrepared event. */ + onRowPrepared?: (e: Object) => void; + /** Specifies a custom template for grid rows. */ + rowTemplate?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ + preloadEnabled?: boolean; + /** Specifies whether or not the widget uses native scrolling. */ + useNative?: any; + /** Specifies the scrollbar display policy. */ + showScrollbar?: string; + /** Specifies whether or not the scrolling by content is enabled. */ + scrollByContent?: boolean; + /** Specifies whether or not the scrollbar thumb scrolling enabled. */ + scrollByThumb?: boolean; + }; + /** Specifies options of the search panel. */ + searchPanel?: { + /** Specifies whether or not search strings in the located grid records should be highlighted. */ + highlightSearchText?: boolean; + /** Specifies text displayed by the search panel when no search string was typed. */ + placeholder?: string; + /** Specifies whether the search panel is visible or not. */ + visible?: boolean; + /** Specifies the width of the search panel in pixels. */ + width?: number; + /** Sets a search string for the search panel. */ + text?: string; + }; + /** Specifies the operations that must be performed on the server side. */ + remoteOperations?: any; + /** Allows you to sort groups according to the values of group summary items. */ + sortByGroupSummaryInfo?: Array<{ + /** Specifies the group summary item whose values must be used to sort groups. */ + summaryItem?: string; + /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ + groupColumn?: string; + /** Specifies the sort order of group summary item values. */ + sortOrder?: string; + }>; + /** Allows you to build a master-detail interface in the grid. */ + masterDetail?: { + /** Enables an end-user to expand/collapse detail sections. */ + enabled?: boolean; + /** Specifies whether detail sections appear expanded or collapsed. */ + autoExpandAll?: boolean; + /** Specifies the template for detail sections. */ + template?: any; + }; + /** Specifies options for exporting grid data. */ + export?: { + /** Indicates if the export feature is enabled in the grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file. */ + excelFilterEnabled?: boolean; + /** Specifies whether to enable word wrapping for the exported data in the resulting XLSX file. */ + excelWrapTextEnabled?: boolean; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + /** Indicates whether to allow end users to export not only the data displayed in the grid, but the selected rows only. */ + allowExportSelectedData?: boolean; + /** Contains options that specify texts for the export-related commands and hints. */ + texts?: { + /** Specifies text for the Export button when this button invokes a dropdown menu so you can choose the required export format. */ + exportTo?: string; + /** Specifies text for the Export button's hint when this button exports to the XSLX format without invoking the drop-down menu. */ + exportToExcel?: string; + /** Specifies text for the item in the Export dropdown menu that exports grid data to Excel. */ + excelFormat?: string; + /** Specifies text for the option in the Export dropdown menu that allows you to choose whether to export all the grid data or the selected rows only. */ + selectedRows?: string; + } + }; + /** Specifies the keys of the records that must appear selected initially. */ + selectedRowKeys?: Array; + /** Specifies options of runtime selection. */ + selection?: { + /** Specifies the checkbox row display policy in the multiple mode. */ + showCheckBoxesMode?: string; + /** Specifies whether the user can select all grid records at once. */ + allowSelectAll?: boolean; + /** Specifies the selection mode. */ + mode?: string; + }; + /** A handler for the dataErrorOccured event. */ + onDataErrorOccurred?: (e: { error: Error }) => void; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + cancel: boolean; + }) => void; + /** A handler for the fileSaving event. */ + onFileSaving?: (e: { + fileName: string; + format: string; + data: any; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A handler for the keyDown event. */ + onKeyDown?: (e: Object) => void; + /** A handler for the rowExpanding event. */ + onRowExpanding?: (e: Object) => void; + /** A handler for the rowExpanded event. */ + onRowExpanded?: (e: Object) => void; + /** A handler for the rowCollapsing event. */ + onRowCollapsing?: (e: Object) => void; + /** A handler for the rowCollapsed event. */ + onRowCollapsed?: (e: Object) => void; + /** Specifies whether column headers are visible or not. */ + showColumnHeaders?: boolean; + /** Specifies whether or not vertical lines separating one grid column from another are visible. */ + showColumnLines?: boolean; + /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ + showRowLines?: boolean; + /** Specifies options of runtime sorting. */ + sorting?: { + /** Specifies text for the context menu item that sets an ascending sort order in a column. */ + ascendingText?: string; + /** Specifies text for the context menu item that resets sorting settings for a column. */ + clearText?: string; + /** Specifies text for the context menu item that sets a descending sort order in a column. */ + descendingText?: string; + /** Specifies the runtime sorting mode. */ + mode?: string; + }; + /** Specifies options of state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (state: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + /** Specifies the options of the grid summary. */ + summary?: { + /** Contains options that specify text patterns for summary items. */ + texts?: { + /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ + sum?: string; + /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ + sumOtherColumn?: string; + /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ + min?: string; + /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ + minOtherColumn?: string; + /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ + max?: string; + /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ + maxOtherColumn?: string; + /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ + avg?: string; + /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ + avgOtherColumn?: string; + /** Specifies a pattern for the 'count' summary items. */ + count?: string; + }; + /** Specifies items of the group summary. */ + groupItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the column that provides data for a group summary item. */ + column?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies whether or not a summary item must be displayed in the group footer. */ + showInGroupFooter?: boolean; + /** Indicates whether to display group summary items in parentheses after the group row header or to align them by the corresponding columns within the group row. */ + alignByColumn?: boolean; + /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Specifies items of the total summary. */ + totalItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the alignment of a summary item. */ + alignment?: string; + /** Specifies the column that provides data for a summary item. */ + column?: string; + /** Specifies a CSS class to be applied to a summary item. */ + cssClass?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies the column that must hold the summary item. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ + calculateCustomSummary?: (options: { + component: dxDataGrid; + name?: string; + value: any; + totalValue: any; + summaryProcess: string + }) => void; + }; + /** Specifies whether text that does not fit into a column should be wrapped. */ + wordWrapEnabled?: boolean; + } + /** A data grid widget. */ + export class dxDataGrid extends Widget { + constructor(element: JQuery, options?: dxDataGridOptions); + constructor(element: Element, options?: dxDataGridOptions); + /** Ungroups grid records. */ + clearGrouping(): void; + /** Clears sorting settings of all grid columns at once. */ + clearSorting(): void; + /** Allows you to obtain a cell by its row index and the data field of its column. */ + getCellElement(rowIndex: number, dataField: string): any; + /** Allows you to obtain a cell by its row index and the visible index of its column. */ + getCellElement(rowIndex: number, visibleColumnIndex: number): any; + /** Returns the current state of the grid. */ + state(): Object; + /** Sets the grid state. */ + state(state: Object): void; + /** Allows you to obtain the row index by a data key. */ + getRowIndexByKey(key: any): number; + /** Allows you to obtain the data key by a row index. */ + getKeyByRowIndex(rowIndex: number): any; + /** Adds a new column to a grid. */ + addColumn(columnOptions: dxDataGridColumn): void; + /** Removes the column from the grid. */ + deleteColumn(id: any): void; + /** Displays the load panel. */ + beginCustomLoading(messageText: string): void; + /** Discards changes made in a grid. */ + cancelEditData(): void; + /** Checks whether or not the grid contains unsaved changes. */ + hasEditData(): boolean; + /** Clears all the filters of a specific type applied to grid records. */ + clearFilter(): void; + /** Deselects all grid records. */ + clearSelection(): void; + /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ + closeEditCell(): void; + /** Collapses groups or master rows in a grid. */ + collapseAll(groupIndex?: number): void; + /** Returns the number of data columns in a grid. */ + columnCount(): number; + /** Returns the value of a specific column option. */ + columnOption(id: any, optionName: string): any; + /** Sets an option of a specific column. */ + columnOption(id: any, optionName: string, optionValue: any): void; + /** Returns the options of a column by an identifier. */ + columnOption(id: any): Object; + /** Sets several options of a column at once. */ + columnOption(id: any, options: Object): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, visibleColumnIndex: number): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, dataField: string): void; + /** Sets a specific row into the editing state. */ + editRow(rowIndex: number): void; + /** Gets the cell value. */ + cellValue(rowIndex: number, dataField: string): any; + /** Gets the cell value. */ + cellValue(rowIndex: number, visibleColumnIndex: number): any; + /** Sets the cell value. */ + cellValue(rowIndex: number, dataField: string, value: any): void; + /** Sets the cell value. */ + cellValue(rowIndex: number, visibleColumnIndex: number, value: any): void; + /** Hides the load panel. */ + endCustomLoading(): void; + /** Expands groups or master rows in a grid. */ + expandAll(groupIndex: number): void; + /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ + isRowExpanded(key: any): boolean; + /** Allows you to expand a specific group or master row by its key. */ + expandRow(key: any): void; + /** Allows you to collapse a specific group or master row by its key. */ + collapseRow(key: any): void; + /** Applies a filter to the grid's data source. */ + filter(filterExpr?: any): void; + /** Returns a filter expression applied to the grid's data source using the filter(filterExpr) method. */ + filter(): any; + /** Returns a filter expression applied to the grid using all possible scenarious. */ + getCombinedFilter(): any; + /** Gets the keys of currently selected grid records. */ + getSelectedRowKeys(): Array; + /** Gets the data objects of currently selected grid records. */ + getSelectedRowsData(): Array; + /** Hides the column chooser panel. */ + hideColumnChooser(): void; + /** Adds a new data row to a grid. */ + addRow(): void; + /** + * Adds a new data row to a grid. + * @deprecated Use the addRow() method instead. + */ + insertRow(): void; + /** Returns the key corresponding to the passed data object. */ + keyOf(obj: Object): any; + /** Switches a grid to a specified page. */ + pageIndex(newIndex: number): void; + /** Gets the index of the current page. */ + pageIndex(): number; + /** Sets the page size. */ + pageSize(value: number): void; + /** Gets the current page size. */ + pageSize(): number; + /** Refreshes grid data. */ + refresh(): void; + /** Removes a specific row from a grid. */ + deleteRow(rowIndex: number): void; + /** + * Removes a specific row from a grid. + * @deprecated Use the deleteRow() method instead. + */ + removeRow(rowIndex: number): void; + /** Saves changes made in a grid. */ + saveEditData(): void; + /** Searches grid records by a search string. */ + searchByText(text: string): void; + /** Selects all grid records. */ + selectAll(): void; + /** Deselects the rows that are currently selected within the applied filter. */ + deselectAll(): void; + /** Selects specific grid records. */ + selectRows(keys: Array, preserve: boolean): void; + /** Deselects specific grid records. */ + deselectRows(keys: Array): void; + /** Selects grid rows by indexes. */ + selectRowsByIndexes(indexes: Array): void; + /** Allows you to find out whether a row is selected or not. */ + isRowSelected(key: any): boolean; + /** Invokes the column chooser panel. */ + showColumnChooser(): void; + startSelectionWithCheckboxes(): boolean; + /** Returns the number of records currently held by a grid. */ + totalCount(): number; + /** Recovers a row deleted in the batch edit mode. */ + undeleteRow(rowIndex: number): void; + /** Allows you to obtain a data object by its key. */ + byKey(key: any): JQueryPromise; + /** Gets the value of a total summary item. */ + getTotalSummaryValue(summaryItemName: string): any; + /** Exports grid data to Excel. */ + exportToExcel(selectionOnly: boolean): void; + /** Updates the grid to the size of its content. */ + updateDimensions(): void; + /** Focuses the specified cell element in the grid. */ + focus(element?: JQuery): void; + } + export interface dxPivotGridOptions extends WidgetOptions { + onContentReady?: Function; + /** Specifies a data source for the pivot grid. */ + dataSource?: any; + useNativeScrolling?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not the widget uses native scrolling. */ + useNative?: any; + }; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies whether to display the Total rows. */ + showRowTotals?: boolean; + /** Specifies whether to display the Grand Total row. */ + showRowGrandTotals?: boolean; + /** Specifies whether to display the Total columns. */ + showColumnTotals?: boolean; + /** Specifies whether to display the Grand Total column. */ + showColumnGrandTotals?: boolean; + /** Specifies whether or not to hide rows and columns with no data. */ + hideEmptySummaryCells?: boolean; + /** Specifies where to show the total rows or columns. */ + showTotalsPrior?: string; + /** Specifies whether the outer borders of the grid are visible or not. */ + showBorders?: boolean; + /** The Field Chooser configuration options. */ + fieldChooser?: { + /** Enables or disables the field chooser. */ + enabled?: boolean; + /** Specifies the field chooser layout. */ + layout?: number; + /** Specifies the text to display as a title of the field chooser popup window. */ + title?: string; + /** Specifies the field chooser width. */ + width?: number; + /** Specifies the field chooser height. */ + height?: number; + /** Strings that can be changed or localized in the pivot grid's integrated Field Chooser. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** Strings that can be changed or localized in the dxPivotGrid widget. */ + texts?: { + /** The string to display as a header of the Grand Total row and column. */ + grandTotal?: string; + /** The string to display as a header of the Total row and column. */ + total?: string; + /** Specifies the text displayed when a pivot grid does not contain any fields. */ + noData?: string; + /** The string to display as a Show Field Chooser context menu item. */ + showFieldChooser?: string; + /** The string to display as an Expand All context menu item. */ + expandAll?: string; + /** The string to display as a Collapse All context menu item. */ + collapseAll?: string; + /** The string to display as a Sort Column by Summary Value context menu item. */ + sortColumnBySummary?: string; + /** The string to display as a Sort Row by Summary Value context menu item. */ + sortRowBySummary?: string; + /** The string to display as a Remove All Sorting context menu item. */ + removeAllSorting?: string; + /** The string to display as an Export to Excel file context menu item. */ + exportToExcel?: string; + }; + /** The Load panel configuration options. */ + loadPanel?: { + /** Enables or disables the load panel. */ + enabled?: boolean; + /** Specifies the height of the load panel. */ + height?: number; + /** Specifies the URL pointing to an image that will be used as a load indicator. */ + indicatorSrc?: string; + /** Specifies whether or not to show a load indicator. */ + showIndicator?: boolean; + /** Specifies whether or not to show load panel background. */ + showPane?: boolean; + /** Specifies the text to display inside a load panel. */ + text?: string; + /** Specifies the width of the load panel. */ + width?: number; + }; + /** A handler for the cellClick event. */ + onCellClick?: (e: any) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: any) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + /** Specifies options for exporting pivot grid data. */ + export?: { + /** Indicates whether the export feature is enabled for the pivot grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + }; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + cancel: boolean; + }) => void; + /** A handler for the fileSaving event. */ + onFileSaving?: (e: { + fileName: string; + format: string; + data: any; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A configuration object specifying options related to state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (gridState: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + } + /** A data summarization widget for multi-dimensional data analysis and data mining. */ + export class dxPivotGrid extends Widget { + constructor(element: JQuery, options?: dxPivotGridOptions); + constructor(element: Element, options?: dxPivotGridOptions); + /** Gets the PivotGridDataSource instance. */ + getDataSource(): DevExpress.data.PivotGridDataSource; + /** Gets the dxPopup instance of the field chooser window. */ + getFieldChooserPopup(): DevExpress.ui.dxPopup; + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + /** Exports pivot grid data to the Excel file. */ + exportToExcel(): void; + } + export interface dxPivotGridFieldChooserOptions extends WidgetOptions { + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the field chooser layout. */ + layout?: number; + /** The data source of a dxPivotGrid widget. */ + dataSource?: DevExpress.data.PivotGridDataSource; + onContentReady?: Function; + /** Strings that can be changed or localized in the dxPivotGridFieldChooser widget. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** A complementary widget for dxPivotGrid that allows you to manage data displayed in the dxPivotGrid. */ + export class dxPivotGridFieldChooser extends Widget { + constructor(element: JQuery, options?: dxPivotGridFieldChooserOptions); + constructor(element: Element, options?: dxPivotGridFieldChooserOptions); + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } +} +interface JQuery { + dxTreeView(): JQuery; + dxTreeView(options: "instance"): DevExpress.ui.dxTreeView; + dxTreeView(options: string): any; + dxTreeView(options: string, ...params: any[]): any; + dxTreeView(options: DevExpress.ui.dxTreeViewOptions): JQuery; + dxMenuBase(): JQuery; + dxMenuBase(options: "instance"): DevExpress.ui.dxMenuBase; + dxMenuBase(options: string): any; + dxMenuBase(options: string, ...params: any[]): any; + dxMenuBase(options: DevExpress.ui.dxMenuBaseOptions): JQuery; + dxMenu(): JQuery; + dxMenu(options: "instance"): DevExpress.ui.dxMenu; + dxMenu(options: string): any; + dxMenu(options: string, ...params: any[]): any; + dxMenu(options: DevExpress.ui.dxMenuOptions): JQuery; + dxContextMenu(): JQuery; + dxContextMenu(options: "instance"): DevExpress.ui.dxContextMenu; + dxContextMenu(options: string): any; + dxContextMenu(options: string, ...params: any[]): any; + dxContextMenu(options: DevExpress.ui.dxContextMenuOptions): JQuery; + dxColorBox(): JQuery; + dxColorBox(options: "instance"): DevExpress.ui.dxColorBox; + dxColorBox(options: string): any; + dxColorBox(options: string, ...params: any[]): any; + dxColorBox(options: DevExpress.ui.dxColorBoxOptions): JQuery; + dxDataGrid(): JQuery; + dxDataGrid(options: "instance"): DevExpress.ui.dxDataGrid; + dxDataGrid(options: string): any; + dxDataGrid(options: string, ...params: any[]): any; + dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; + dxPivotGrid(): JQuery; + dxPivotGrid(options: "instance"): DevExpress.ui.dxPivotGrid; + dxPivotGrid(options: string): any; + dxPivotGrid(options: string, ...params: any[]): any; + dxPivotGrid(options: DevExpress.ui.dxPivotGridOptions): JQuery; + dxPivotGridFieldChooser(): JQuery; + dxPivotGridFieldChooser(options: "instance"): DevExpress.ui.dxPivotGridFieldChooser; + dxPivotGridFieldChooser(options: string): any; + dxPivotGridFieldChooser(options: string, ...params: any[]): any; + dxPivotGridFieldChooser(options: DevExpress.ui.dxPivotGridFieldChooserOptions): JQuery; + dxScheduler(): JQuery; + dxScheduler(options: "instance"): DevExpress.ui.dxScheduler; + dxScheduler(options: string): any; + dxScheduler(options: string, ...params: any[]): any; + dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; +} +declare namespace DevExpress.framework { + /** An object used to store information on the views displayed in an application. */ + export class ViewCache { + viewRemoved: JQueryCallback; + /** Removes all the viewInfo objects from the cache. */ + clear(): void; + /** Obtains a viewInfo object from the cache by the specified key. */ + getView(key: string): Object; + /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ + hasView(key: string): boolean; + /** Removes a viewInfo object from the cache by the specified key. */ + removeView(key: string): Object; + /** Adds the specified viewInfo object to the cache under the specified key. */ + setView(key: string, viewInfo: Object): void; + } + export interface dxCommandOptions extends DOMComponentOptions { + /** Specifies an action performed when the execute() method of the command is called. */ + onExecute?: any; + /** Indicates whether or not the widget that displays this command is disabled. */ + disabled?: boolean; + /** Specifies whether the current command is rendered when a view is being rendered or after a view is shown. */ + renderStage?: string; + /** Specifies the name of the icon shown inside the widget associated with this command. */ + icon?: string; + iconSrc?: string; + /** The identifier of the command. */ + id?: string; + /** Specifies the title of the widget associated with this command. */ + title?: string; + /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ + type?: string; + /** A Boolean value specifying whether or not the widget associated with this command is visible. */ + visible?: boolean; + } + /** A markup component used to define markup options for a command. */ + export class dxCommand extends DOMComponent { + constructor(element: JQuery, options: dxCommandOptions); + constructor(options: dxCommandOptions); + /** Executes the action associated with this command. */ + execute(): void; + } + /** An object responsible for routing. */ + export class Router { + /** Adds a routing rule to the list of registered rules. */ + register(pattern: string, defaults?: Object, constraints?: Object): void; + /** Decodes the specified URI to an object using the registered routing rules. */ + parse(uri: string): Object; + /** Formats an object to a URI. */ + format(obj: Object): string; + } + export interface StateManagerOptions { + /** A storage to which the state manager saves the application state. */ + storage?: Object; + } + /** An object used to store the current application state. */ + export class StateManager { + constructor(options?: StateManagerOptions); + /** Adds an object that implements an interface of a state source to the state manager's collection of state sources. */ + addStateSource(stateSource: Object): void; + /** Removes a specified state source from the state manager's collection of state sources. */ + removeStateSource(stateSource: Object): void; + /** Saves the current application state. */ + saveState(): void; + /** Restores the application state that has been saved by the saveState() method to the state storage. */ + restoreState(): void; + /** Removes the application state that has been saved by the saveState() method to the state storage. */ + clearState(): void; + } + export module html { + export var layoutSets: Array; + export var animationSets: { [animationSetName: string]: AnimationSet }; + export interface AnimationSet { + [animationName: string]: any + } + export interface HtmlApplicationOptions { + /** Specifies where the commands that are defined in the application's views must be displayed. */ + commandMapping?: Object; + /** Specifies whether or not view caching is disabled. */ + disableViewCache?: boolean; + /** An array of layout controllers that should be used to show application views in the current navigation context. */ + layoutSet?: any; + /** Specifies the animation presets that are used to animate different UI elements in the current application. */ + animationSet?: AnimationSet; + /** Specifies whether the current application must behave as a mobile or web application. */ + mode?: string; + /** Specifies the object that represents a root namespace of the application. */ + namespace?: Object; + /** Specifies application behavior when the user navigates to a root view. */ + navigateToRootViewMode?: string; + /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ + navigation?: Array; + /** A state manager to be used in the application. */ + stateManager?: StateManager; + /** Specifies the storage to be used by the application's state manager to store the application state. */ + stateStorage?: Object; + /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ + useViewTitleAsBackText?: boolean; + /** A custom view cache to be used in the application. */ + viewCache?: Object; + /** Specifies a limit for the views that can be cached. */ + viewCacheSize?: number; + /** Specifies the current version of application templates. */ + templatesVersion?: string; + /** Specifies options for the viewport meta tag of a mobile browser. */ + viewPort?: JQuery; + /** A custom router to be used in the application. */ + router?: Router; + } + /** An object used to manage views, as well as control the application life cycle. */ + export class HtmlApplication implements EventsMixin { + constructor(options: HtmlApplicationOptions); + afterViewSetup: JQueryCallback; + beforeViewSetup: JQueryCallback; + initialized: JQueryCallback; + navigating: JQueryCallback; + navigatingBack: JQueryCallback; + resolveLayoutController: JQueryCallback; + resolveViewCacheKey: JQueryCallback; + viewDisposed: JQueryCallback; + viewDisposing: JQueryCallback; + viewHidden: JQueryCallback; + viewRendered: JQueryCallback; + viewShowing: JQueryCallback; + viewShown: JQueryCallback; + /** Provides access to the ViewCache object. */ + viewCache: ViewCache; + /** An array of dxCommand components that are created based on the application's navigation option value. */ + navigation: Array; + /** Provides access to the StateManager object. */ + stateManager: StateManager; + /** Provides access to the Router object. */ + router: Router; + /** Navigates to the URI preceding the current one in the navigation history. */ + back(): void; + /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ + canBack(): boolean; + /** Calls the clearState() method of the application's StateManager object. */ + clearState(): void; + /** Creates global navigation commands. */ + createNavigation(navigationConfig: Array): void; + /** Returns an HTML template of the specified view. */ + getViewTemplate(viewName: string): JQuery; + /** Returns a configuration object used to create a dxView component for a specified view. */ + getViewTemplateInfo(viewName: string): Object; + /** Adds a specified HTML template to a collection of view or layout templates. */ + loadTemplates(source: any): JQueryPromise; + /** Navigates to the specified URI. */ + navigate(uri?: any, options?: Object): void; + /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ + renderNavigation(): void; + /** Calls the restoreState() method of the application's StateManager object. */ + restoreState(): void; + /** Calls the saveState method of the application's StateManager object. */ + saveState(): void; + /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ + templateContext(): Object; + on(eventName: "initialized", eventHandler: () => void): HtmlApplication; + on(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + on(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + on(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + on(eventName: "resolveViewCacheKey", eventHandler: (e: { + key: string; + navigationItem: Object; + routeData: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: string, eventHandler: Function): HtmlApplication; + on(events: { [eventName: string]: Function; }): HtmlApplication; + off(eventName: "initialized"): HtmlApplication; + off(eventName: "afterViewSetup"): HtmlApplication; + off(eventName: "beforeViewSetup"): HtmlApplication; + off(eventName: "navigating"): HtmlApplication; + off(eventName: "navigatingBack"): HtmlApplication; + off(eventName: "resolveLayoutController"): HtmlApplication; + off(eventName: "resolveViewCacheKey"): HtmlApplication; + off(eventName: "viewDisposed"): HtmlApplication; + off(eventName: "viewDisposing"): HtmlApplication; + off(eventName: "viewHidden"): HtmlApplication; + off(eventName: "viewRendered"): HtmlApplication; + off(eventName: "viewShowing"): HtmlApplication; + off(eventName: "viewShown"): HtmlApplication; + off(eventName: string): HtmlApplication; + off(eventName: "initialized", eventHandler: () => void): HtmlApplication; + off(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + off(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + off(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + off(eventName: "resolveViewCacheKey", eventHandler: (e: { + key: string; + navigationItem: Object; + routeData: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: string, eventHandler: Function): HtmlApplication; + } + } +} +declare namespace DevExpress.viz.core { + /** + * Applies a theme for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(theme) method instead. + */ + export function currentTheme(theme: string): void; + /** + * Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(platform, colorScheme) method instead. + */ + export function currentTheme(platform: string, colorScheme: string): void; + /** + * Registers a new theme based on the existing one. + * @deprecated Use the DevExpress.viz.registerTheme(customTheme, baseTheme) method instead. + */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** + * Applies a predefined or registered custom palette to all visualization widgets at once. + * @deprecated Use the DevExpress.viz.currentPalette(paletteName) method instead. + */ + export function currentPalette(paletteName: string): void; + /** + * Obtains the color sets of a predefined or registered palette. + * @deprecated Use the DevExpress.viz.getPalette(paletteName) method instead. + */ + export function getPalette(paletteName: string): Object; + /** + * Registers a new palette. + * @deprecated Use the DevExpress.viz.registerPalette(paletteName, palette) method instead. + */ + export function registerPalette(paletteName: string, palette: Object): void; + export interface Border { + /** Sets a border color for a selected series. */ + color?: string; + /** Sets border visibility for a selected series. */ + visible?: boolean; + /** Sets a border width for a selected series. */ + width?: number; + } + export interface DashedBorder extends Border { + /** Specifies a dash style for the border of a selected series point. */ + dashStyle?: string; + } + export interface DashedBorderWithOpacity extends DashedBorder { + /** Specifies the opacity of the tooltip's border. */ + opacity?: number; + } + export interface Font { + /** Specifies the font color for a strip label. */ + color?: string; + /** Specifies the font family for a strip label. */ + family?: string; + /** Specifies the font opacity for a strip label. */ + opacity?: number; + /** Specifies the font size for a strip label. */ + size?: any; + /** Specifies the font weight for the text displayed in strips. */ + weight?: number; + } + export interface Hatching { + direction?: string; + /** Specifies the opacity of hatching lines. */ + opacity?: number; + /** Specifies the distance between hatching lines in pixels. */ + step?: number; + /** Specifies the width of hatching lines in pixels. */ + width?: number; + } + export interface Margins { + /** Specifies the distance in pixels between the bottom side of the title and the surrounding widget elements. */ + bottom?: number; + /** Specifies the distance in pixels between the left side of the title and the surrounding widget elements. */ + left?: number; + /** Specifies the distance between the right side of the title and surrounding widget elements in pixels. */ + right?: number; + /** Specifies the distance between the top side of the title and surrounding widget elements in pixels. */ + top?: number; + } + export interface Size { + /** Specifies the width of the widget. */ + width?: number; + /** Specifies the height of the widget. */ + height?: number; + } + export interface Title { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies the widget title's horizontal position. */ + horizontalAlignment?: string; + /** Specifies the widget title's position in the vertical direction. */ + verticalAlignment?: string; + /** Specifies the distance between the title and surrounding widget elements in pixels. */ + margin?: viz.core.Margins; + /** Specifies the height of the space reserved for the title. */ + placeholderSize?: number; + /** Specifies text for the title. */ + text?: string; + /** Specifies a subtitle for the widget. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies text for the subtitle. */ + text?: string; + } + } + export interface Tooltip { + /** Specifies the length of the tooltip's arrow in pixels. */ + arrowLength?: number; + /** Specifies the appearance of the tooltip's border. */ + border?: viz.core.DashedBorderWithOpacity; + /** Specifies a color for the tooltip. */ + color?: string; + /** Specifies the z-index for tooltips. */ + zIndex?: number; + /** Specifies the container to draw tooltips inside of it. */ + container?: any; + /** Specifies text and appearance of a set of tooltips. */ + customizeTooltip?: (arg: Object) => { color?: string; text?: string }; + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies font options for the text displayed by the tooltip. */ + font?: Font; + /** Specifies a format for the text displayed by the tooltip. */ + format?: string; + /** Specifies the opacity of a tooltip. */ + opacity?: number; + /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ + paddingLeftRight?: number; + /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ + paddingTopBottom?: number; + /** Specifies a precision for formatted values displayed by the tooltip. */ + precision?: number; + /** Specifies options of the tooltip's shadow. */ + shadow?: { + /** Specifies the blur distance of the tooltip's shadow. */ + blur?: number; + /** Specifies the color of the tooltip's shadow. */ + color?: string; + /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetX?: number; + /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetY?: number; + /** Specifies the opacity of the tooltip's shadow. */ + opacity?: number; + }; + } + export interface Animation { + /** Determines how long animation runs. */ + duration?: number; + /** Specifies the animation easing mode. */ + easing?: string; + /** Indicates whether or not animation is enabled. */ + enabled?: boolean; + } + export interface LoadingIndicator { + /** Specifies a color for the loading indicator background. */ + backgroundColor?: string; + /** Specifies font options for the loading indicator text. */ + font?: viz.core.Font; + /** Specifies whether to show the loading indicator or not. */ + show?: boolean; + /** Specifies a text to be displayed by the loading indicator. */ + text?: string; + } + export interface LegendBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies a radius for the corners of the legend border. */ + cornerRadius?: number; + } + export interface BaseLegend { + /** Specifies the color of the legend's background. */ + backgroundColor?: string; + /** Specifies legend border settings. */ + border?: viz.core.LegendBorder; + /** Specifies how many columns must be taken to arrange legend items. */ + columnCount?: number; + /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ + columnItemSpacing?: number; + /** Specifies font options for legend items. */ + font?: viz.core.Font; + /** Specifies the legend's position on the map. */ + horizontalAlignment?: string; + /** Specifies the alignment of legend items. */ + itemsAlignment?: string; + /** Specifies the position of text relative to the item marker. */ + itemTextPosition?: string; + /** Specifies the distance between the legend and the container borders in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of item markers in the legend in pixels. */ + markerSize?: number; + /** Specifies whether to arrange legend items horizontally or vertically. */ + orientation?: string; + /** Specifies the spacing between the legend left/right border and legend items in pixels. */ + paddingLeftRight?: number; + /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ + paddingTopBottom?: number; + /** Specifies how many rows must be taken to arrange legend items. */ + rowCount?: number; + /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ + rowItemSpacing?: number; + /** Specifies the legend's position on the map. */ + verticalAlignment?: string; + /** Specifies whether or not the legend is visible on the map. */ + visible?: boolean; + } + export interface BaseWidgetOptions extends DOMComponentOptions { + /** A handler for the drawn event. */ + onDrawn?: (e: { + component: BaseWidget; + element: Element; + }) => void; + /** A handler for the incidentOccurred event. */ + onIncidentOccurred?: ( + component: BaseWidget, + element: Element, + target: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + } + ) => void; + /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ + pathModified?: boolean; + /** Specifies whether or not the widget supports right-to-left representation. */ + rtlEnabled?: boolean; + /** Sets the name of the theme to be used in the widget. */ + theme?: string; + } + /** This section describes options and methods that are common to all widgets. */ + export class BaseWidget extends DOMComponent { + /** Returns the widget's SVG markup. */ + svg(): string; + } +} +declare namespace DevExpress.viz.charts { + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface BaseSeries { + /** Provides information about the state of the series object. */ + fullState: number; + /** Returns the type of the series. */ + type: string; + /** Unselects all the selected points of the series. The points are displayed in an initial style. */ + clearSelection(): void; + /** Gets the color of a particular series. */ + getColor(): string; + /** Gets points from the series point collection based on the specified argument. */ + getPointsByArg(pointArg: any): Array; + /** Gets a point from the series point collection based on the specified point position. */ + getPointByPos(positionIndex: number): Object; + /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ + select(): void; + /** Selects the specified point. The point is displayed in a 'selected' style. */ + selectPoint(point: BasePoint): void; + /** Deselects the specified point. The point is displayed in an initial style. */ + deselectPoint(point: BasePoint): void; + /** Returns an array of all points in the series. */ + getAllPoints(): Array; + /** Returns visible series points. */ + getVisiblePoints(): Array; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): boolean; + /** Provides information about the selection state of a series. */ + isSelected(): boolean; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface BasePoint { + /** Provides information about the state of the point object. */ + fullState: number; + /** Returns the point's argument value that was set in the data source. */ + originalArgument: any; + /** Returns the point's value that was set in the data source. */ + originalValue: any; + /** Returns the tag of the point. */ + tag: string; + /** Deselects the point. */ + clearSelection(): void; + /** Gets the color of a particular point. */ + getColor(): string; + /** Hides the tooltip of the point. */ + hideTooltip(): void; + /** Provides information about the hover state of a point. */ + isHovered(): boolean; + /** Provides information about the selection state of a point. */ + isSelected(): boolean; + /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ + select(): void; + /** Shows the tooltip of the point. */ + showTooltip(): void; + /** Allows you to obtain the label of a series point. */ + getLabel(): any; + /** Returns the series object to which the point belongs. */ + series: BaseSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface ChartSeries extends BaseSeries { + /** Returns the name of the series pane. */ + pane: string; + /** Returns the name of the value axis of the series. */ + axis: string; + selectPoint(point: ChartPoint): void; + deselectPoint(point: ChartPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface ChartPoint extends BasePoint { + /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalCloseValue: any; + /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalHighValue: any; + /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalLowValue: any; + /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ + originalMinValue: any; + /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalOpenValue: any; + /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ + size: any; + /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + series: ChartSeries; + } + /** This section describes the methods that can be used in code to manipulate the Label object. */ + export interface Label { + /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + /** Hides the point label. */ + hide(): void; + /** Shows the point label. */ + show(): void; + } + export interface PieSeries extends BaseSeries { + selectPoint(point: PiePoint): void; + deselectPoint(point: PiePoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PiePoint extends BasePoint { + /** Gets the percentage value of the specific point. */ + percent: any; + /** Provides information about the visibility state of a point. */ + isVisible(): boolean; + /** Makes a specific point visible. */ + show(): void; + /** Hides a specific point. */ + hide(): void; + series: PieSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface PolarSeries extends BaseSeries { + /** Returns the name of the value axis of the series. */ + axis: string; + selectPoint(point: PolarPoint): void; + deselectPoint(point: PolarPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PolarPoint extends BasePoint { + series: PolarSeries; + } + export interface Strip { + /** Specifies a color for a strip. */ + color?: string; + /** An object that defines the label configuration options of a strip. */ + label?: { + /** Specifies the text displayed in a strip. */ + text?: string; + }; + /** Specifies a start value for a strip. */ + startValue?: any; + /** Specifies an end value for a strip. */ + endValue?: any; + } + export interface BaseSeriesConfigLabel { + /** Specifies a format for arguments displayed by point labels. */ + argumentFormat?: string; + /** Specifies a precision for formatted point arguments displayed in point labels. */ + argumentPrecision?: number; + /** Specifies a background color for point labels. */ + backgroundColor?: string; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies connector options for series point labels. */ + connector?: { + /** Specifies the color of label connectors. */ + color?: string; + /** Indicates whether or not label connectors are visible. */ + visible?: boolean; + /** Specifies the width of label connectors. */ + width?: number; + }; + /** Specifies a callback function that returns the text to be displayed by point labels. */ + customizeText?: (pointInfo: Object) => string; + /** Specifies font options for the text displayed in point labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed by point labels. */ + format?: string; + position?: string; + /** Specifies a precision for formatted point values displayed in point labels. */ + precision?: number; + /** Specifies the angle used to rotate point labels from their initial position. */ + rotationAngle?: number; + /** Specifies the visibility of point labels. */ + visible?: boolean; + } + export interface SeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies whether or not to show a label when the point has a zero value. */ + showForZeroValues?: boolean; + } + export interface ChartSeriesConfigLabel extends SeriesConfigLabel { + /** Specifies how to align point labels relative to the corresponding data points that they represent. */ + alignment?: string; + /** Specifies how to shift point labels horizontally from their initial positions. */ + horizontalOffset?: number; + /** Specifies how to shift point labels vertically from their initial positions. */ + verticalOffset?: number; + /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ + percentPrecision?: number; + } + export interface BaseCommonSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + axis?: string; + /** An object defining the label configuration options for a series in the dxChart widget. */ + label?: ChartSeriesConfigLabel; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the dash style of the series' line. */ + dashStyle?: string; + hoverMode?: string; + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /**

Sets a color for a series when it is hovered over.

*/ + color?: string; + /** Specifies the dash style for the line in a hovered series. */ + dashStyle?: string; + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a hovered series. */ + width?: number; + }; + /** Specifies whether a chart ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies the minimal length of a displayed bar in pixels. */ + minBarSize?: number; + /** Specifies opacity for a series. */ + opacity?: number; + /** Specifies the series elements to highlight when the series is selected. */ + selectionMode?: string; + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the dash style for the line in a selected series. */ + dashStyle?: string; + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a selected series. */ + width?: number; + }; + /** Specifies whether or not to show the series in the chart's legend. */ + showInLegend?: boolean; + /** Specifies the name of the stack where the values of the _stackedBar_ series must be located. */ + stack?: string; + /** Specifies the name of the data source field that provides data about a point. */ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + /** Specifies the visibility of a series. */ + visible?: boolean; + /** Specifies a line width. */ + width?: number; + /** Configures error bars. */ + valueErrorBar?: { + /** Specifies whether error bars must be displayed in full or partially. */ + displayMode?: string; + /** Specifies the data field that provides data for low error values. */ + lowValueField?: string; + /** Specifies the data field that provides data for high error values. */ + highValueField?: string; + /** Specifies how error bar values must be calculated. */ + type?: string; + /** Specifies the value to be used for generating error bars. */ + value?: number; + /** Specifies the color of error bars. */ + color?: string; + /** Specifies the opacity of error bars. */ + opacity?: number; + /** Specifies the length of the lines that indicate the error bar edges. */ + edgeLength?: number; + /** Specifies the width of the error bar line. */ + lineWidth?: number; + }; + } + export interface CommonPointOptions { + /** Specifies border options for points in the line and area series. */ + border?: viz.core.Border; + /** Specifies the points color. */ + color?: string; + /** Specifies what series points to highlight when a point is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered point. */ + hoverStyle?: { + /** An object defining the border options for a hovered point. */ + border?: viz.core.Border; + /** Sets a color for a point when it is hovered over. */ + color?: string; + /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies what series points to highlight when a point is selected. */ + selectionMode?: string; + /** An object defining configuration options for a selected point. */ + selectionStyle?: { + /** An object defining the border options for a selected point. */ + border?: viz.core.Border; + /**

Sets a color for a point when it is selected.

*/ + color?: string; + /** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */ + size?: number; + /** Specifies a symbol for presenting points of the line and area series. */ + symbol?: string; + visible?: boolean; + } + export interface ChartCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: any; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: any; + /** Specifies the width of an image that is used as a point marker. */ + width?: any; + }; + } + export interface PolarCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: number; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: string; + /** Specifies the width of an image that is used as a point marker. */ + width?: number; + }; + } + /** An object that defines configuration options for chart series. */ + export interface CommonSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ + closeValueField?: string; + /** Specifies a radius for bar corners. */ + cornerRadius?: number; + /** Specifies the data source field that provides a 'high' value for a _candleStick_ or _stock_ series. */ + highValueField?: string; + /** Specifies the color for the body (rectangle) of a _candleStick_ series. */ + innerColor?: string; + /** Specifies the data source field that provides a 'low' value for a _candleStick_ or _stock_ series. */ + lowValueField?: string; + /** Specifies the data source field that provides an 'open' value for a _candleStick_ or _stock_ series. */ + openValueField?: string; + /** Specifies the pane that will be used to display a series. */ + pane?: string; + /** An object defining configuration options for points in line-, scatter- and area-like series. */ + point?: ChartCommonPointOptions; + /** Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property. */ + rangeValue1Field?: string; + /** Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property. */ + rangeValue2Field?: string; + /** Specifies reduction options for the stock or candleStick series. */ + reduction?: { + /** Specifies a color for the points whose reduction level price is lower in comparison to the value in the previous point. */ + color?: string; + /** Specifies for which price level (open, high, low or close) to enable reduction options in the series. */ + level?: string; + }; + /** Specifies the data source field that defines the size of bubbles. */ + sizeField?: string; + } + export interface CommonSeriesSettings extends CommonSeriesConfig { + /**

An object that specifies configuration options for all series of the area type in the chart.

*/ + area?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the bubble type in the chart. */ + bubble?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _candleStick_ type in the chart. */ + candlestick?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedArea_ type in the chart. */ + fullstackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline Area type in the chart. */ + fullstackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedBar_ type in the chart. */ + fullstackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedLine_ type in the chart. */ + fullstackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline type in the chart. */ + fullstackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeArea_ type in the chart. */ + rangearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeBar_ type in the chart. */ + rangebar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _spline_ type in the chart. */ + spline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _splineArea_ type in the chart. */ + splinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedArea_ type in the chart. */ + stackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline Area type in the chart. */ + stackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedLine_ type in the chart. */ + stackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline type in the chart. */ + stackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepArea_ type in the chart. */ + steparea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepLine_ type in the chart. */ + stepline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stock_ type in the chart. */ + stock?: CommonSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface SeriesConfig extends CommonSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + /** An object that defines configuration options for polar chart series. */ + export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies whether or not to close the chart by joining the end point with the first point. */ + closed?: boolean; + label?: SeriesConfigLabel; + point?: PolarCommonPointOptions; + } + export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { + /** An object that specifies configuration options for all series of the area type in the chart. */ + area?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonPolarSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface PolarSeriesConfig extends CommonPolarSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + export interface PieSeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies how to shift labels from their initial position in a radial direction in pixels. */ + radialOffset?: number; + /** Specifies a precision for the percentage values displayed in labels. */ + percentPrecision?: number; + } + /** An object that defines configuration options for chart series. */ + export interface CommonPieSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + /** Specifies the required type for series arguments. */ + argumentType?: string; + /** An object defining the series border configuration options. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the chart elements to highlight when a series is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered series. */ + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /** Sets a color for the series when it is hovered over. */ + color?: string; + /** Specifies the hatching options to be applied when a point is hovered over. */ + hatching?: viz.core.Hatching; + }; + /** + * Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. + * @deprecated use the 'innerRadius' option instead + */ + innerRadius?: number; + /** An object defining the label configuration options. */ + label?: PieSeriesConfigLabel; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies a minimal size of a displayed pie segment. */ + minSegmentSize?: number; + /** + * Specifies the direction in which the dxPieChart series points are located. + * @deprecated use the 'segmentsDirection' option instead + */ + segmentsDirection?: string; + /**

Specifies the chart elements to highlight when the series is selected.

*/ + selectionMode?: string; + /** An object defining configuration options for the series when it is selected. */ + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the hatching options to be applied when a point is selected. */ + hatching?: viz.core.Hatching; + }; + /** Specifies chart segment grouping options. */ + smallValuesGrouping?: { + /** Specifies the name of the grouped chart segment. This name represents the segment in the chart legend. */ + groupName?: string; + /** Specifies the segment grouping mode. */ + mode?: string; + /** Specifies a threshold for segment values. */ + threshold?: number; + /** Specifies how many segments must not be grouped. */ + topCount?: number; + }; + /** + * Specifies a start angle for a pie chart in arc degrees. + * @deprecated use the 'startAngle' option instead + */ + startAngle?: number; + /**

Specifies the name of the data source field that provides data about a point.

*/ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + } + export interface CommonPieSeriesSettings extends CommonPieSeriesConfig { + /** + * Specifies the type of the pie chart series. + * @deprecated use the 'type' option instead + */ + type?: string; + } + export interface PieSeriesConfig extends CommonPieSeriesConfig { + /** + * Sets the series type. + * @deprecated use the 'type' option instead + */ + type?: string; + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + } + export interface SeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => SeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface PolarSeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => PolarSeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface ChartCommonConstantLineLabel { + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + /** Specifies the position of the constant line label relative to the chart plot. */ + position?: string; + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + } + export interface PolarCommonConstantLineLabel { + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + } + export interface ConstantLineStyle { + /** Specifies a color for a constant line. */ + color?: string; + /** Specifies a dash style for a constant line. */ + dashStyle?: string; + /** Specifies a constant line width in pixels. */ + width?: number; + } + export interface ChartCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartCommonConstantLineLabel; + /** Specifies the space between the constant line label and the left/right side of the constant line. */ + paddingLeftRight?: number; + /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ + paddingTopBottom?: number; + } + export interface PolarCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarCommonConstantLineLabel; + } + export interface CommonAxisLabel { + /** Specifies font options for axis labels. */ + font?: viz.core.Font; + /** Specifies the spacing between an axis and its labels in pixels. */ + indentFromAxis?: number; + /** Indicates whether or not axis labels are visible. */ + visible?: boolean; + } + export interface ChartCommonAxisLabel extends CommonAxisLabel { + /** Specifies the label's position relative to the tick (grid line). */ + alignment?: string; + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: { + /** Specifies how to arrange axis labels. */ + mode?: string; + /** Specifies the angle used to rotate axis labels. */ + rotationAngle?: number; + /** Specifies the spacing that must be set between staggered rows when the 'stagger' algorithm is applied. */ + staggeringSpacing?: number; + }; + } + export interface PolarCommonAxisLabel extends CommonAxisLabel { + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: string; + } + export interface CommonAxisTitle { + /** Specifies font options for an axis title. */ + font?: viz.core.Font; + /** Specifies a margin for an axis title in pixels. */ + margin?: number; + } + export interface BaseCommonAxisSettings { + /** Specifies the color of the line that represents an axis. */ + color?: string; + /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ + discreteAxisDivisionMode?: string; + /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ + grid?: { + /** Specifies a color for grid lines. */ + color?: string; + /** Specifies an opacity for grid lines. */ + opacity?: number; + /** Indicates whether or not the grid lines of an axis are visible. */ + visible?: boolean; + /** Specifies the width of grid lines. */ + width?: number; + }; + /** Specifies the options of the minor grid. */ + minorGrid?: { + /** Specifies a color for the lines of the minor grid. */ + color?: string; + /** Specifies an opacity for the lines of the minor grid. */ + opacity?: number; + /** Indicates whether the minor grid is visible or not. */ + visible?: boolean; + /** Specifies a width for the lines of the minor grid. */ + width?: number; + }; + /** Indicates whether or not an axis is inverted. */ + inverted?: boolean; + /** Specifies the opacity of the line that represents an axis. */ + opacity?: number; + /** Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** An object defining the configuration options for axis ticks. */ + tick?: { + /** Specifies ticks color. */ + color?: string; + /** Specifies tick opacity. */ + opacity?: number; + /** Indicates whether or not ticks are visible on an axis. */ + visible?: boolean; + /** Specifies tick width. */ + width?: number; + /** Specifies tick length. */ + length?: number; + }; + /** Specifies the options of the minor ticks. */ + minorTick?: { + /** Specifies a color for the minor ticks. */ + color?: string; + /** Specifies an opacity for the minor ticks. */ + opacity?: number; + /** Indicates whether or not the minor ticks are displayed on an axis. */ + visible?: boolean; + /** Specifies minor tick width. */ + width?: number; + /** Specifies minor tick length. */ + length?: number; + }; + /** Indicates whether or not the line that represents an axis in a chart is visible. */ + visible?: boolean; + /** Specifies the width of the line that represents an axis in the chart. */ + width?: number; + } + export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ + label?: ChartCommonAxisLabel; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + /** Specifies, in pixels, the space reserved for an axis. */ + placeholderSize?: number; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + /** Specifies the label's position on a strip. */ + horizontalAlignment?: string; + /** Specifies a label's position on a strip. */ + verticalAlignment?: string; + }; + /** Specifies the spacing, in pixels, between the left/right strip border and the strip label. */ + paddingLeftRight?: number; + /** Specifies the spacing, in pixels, between the top/bottom strip borders and the strip label. */ + paddingTopBottom?: number; + }; + /** An object defining the title configuration options that are common for all axes in the dxChart widget. */ + title?: CommonAxisTitle; + /** Indicates whether or not to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + } + export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: PolarCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ + label?: PolarCommonAxisLabel; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + }; + }; + } + export interface ChartConstantLineLabel extends ChartCommonConstantLineLabel { + /** Specifies the horizontal alignment of a constant line label. */ + horizontalAlignment?: string; + /** Specifies the vertical alignment of a constant line label. */ + verticalAlignment?: string; + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface AxisLabel { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ + customizeHint?: (argument: { value: any; valueText: string }) => string; + /** Specifies a callback function that returns the text to be displayed in value axis labels. */ + customizeText?: (argument: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed by axis labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the axis labels. */ + precision?: number; + } + export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { } + export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { } + export interface AxisTitle extends CommonAxisTitle { + /** Specifies the text for the value axis title. */ + text?: string; + } + export interface ChartConstantLineStyle extends ChartCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + } + export interface ChartConstantLine extends ChartConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface PolarConstantLine extends PolarCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface Axis { + /** Specifies a coefficient for dividing the value axis. */ + axisDivisionFactor?: number; + /** Specifies the order in which discrete values are arranged on the value axis. */ + categories?: Array; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic axis. */ + logarithmBase?: number; + /** Specifies an interval between axis ticks/grid lines. */ + tickInterval?: any; + /** Specifies the interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the number of minor ticks between two neighboring major ticks. */ + minorTickCount?: number; + /** Specifies the required type of the value axis. */ + type?: string; + /** Specifies the pane on which the current value axis will be displayed. */ + pane?: string; + /** Specifies options for value axis strips. */ + strips?: Array; + } + export interface ChartAxis extends ChartCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies the appearance options for the constant lines of the value axis. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** Specifies options for value axis labels. */ + label?: ChartAxisLabel; + /** Specifies the maximum value on the value axis. */ + max?: any; + /** Specifies the minimum value on the value axis. */ + min?: any; + /** Specifies the position of the value axis on a chart. */ + position?: string; + /** Specifies the title for a value axis. */ + title?: AxisTitle; + } + export interface PolarAxis extends PolarCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies options for value axis labels. */ + label?: PolarAxisLabel; + } + export interface ArgumentAxis { + /** Specifies the desired type of axis values. */ + argumentType?: string; + /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ + hoverMode?: string; + } + export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } + export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { + /** Specifies the angle in arc degrees to which the argument axis should be rotated. The positive values rotate the axis clockwise. */ + startAngle?: number; + /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ + firstPointOnStartAngle?: boolean; + /** Specifies the value to be used as the origin for the argument axis. */ + originValue?: number; + /** Specifies the period of the argument values in the data source. */ + period?: number; + } + export interface ValueAxis { + /** Specifies the name of the value axis. */ + name?: string; + /** Specifies whether or not to indicate a zero value on the value axis. */ + showZero?: boolean; + /** Specifies the desired type of axis values. */ + valueType?: string; + } + export interface ChartValueAxis extends ChartAxis, ValueAxis { + /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ + multipleAxesSpacing?: number; + /** Specifies the value by which the chart's value axes are synchronized. */ + synchronizedValue?: number; + } + export interface PolarValueAxis extends PolarAxis, ValueAxis { + /** Indicates whether to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + tick?: { + visible?: boolean; + } + } + export interface CommonPane { + /** Specifies a background color in a pane. */ + backgroundColor?: string; + /** Specifies the border options of a chart's pane. */ + border?: PaneBorder; + } + export interface Pane extends CommonPane { + /** Specifies the name of a pane. */ + name?: string; + } + export interface PaneBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies the bottom border's visibility state in a pane. */ + bottom?: boolean; + /** Specifies the left border's visibility state in a pane. */ + left?: boolean; + /** Specifies the right border's visibility state in a pane. */ + right?: boolean; + /** Specifies the top border's visibility state in a pane. */ + top?: boolean; + } + export interface ChartAnimation extends viz.core.Animation { + /** Specifies the maximum series point count in the chart that the animation supports. */ + maxPointCountSupported?: number; + } + export interface BaseChartTooltip extends viz.core.Tooltip { + /** Specifies a format for arguments of the chart's series points. */ + argumentFormat?: string; + /** Specifies a precision for formatted arguments displayed in tooltips. */ + argumentPrecision?: number; + /** Specifies a precision for a percent value displayed in tooltips for stacked series and dxPieChart series. */ + percentPrecision?: number; + } + export interface BaseChartOptions extends viz.core.BaseWidgetOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies the width of the widget that is small enough for the layout to begin adapting. */ + width?: number; + /** Specifies the height of the widget that is small enough for the layout to begin adapting. */ + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies animation options. */ + animation?: ChartAnimation; + /** Specifies a callback function that returns an object with options for a specific point label. */ + customizeLabel?: (labelInfo: Object) => Object; + /** Specifies a callback function that returns an object with options for a specific point. */ + customizePoint?: (pointInfo: Object) => Object; + /** Specifies a data source for the chart. */ + dataSource?: any; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies options of a dxChart's (dxPieChart's) legend. */ + legend?: core.BaseLegend; + /** Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels. */ + margin?: viz.core.Margins; + /** Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** A handler for the done event. */ + onDone?: (e: { + component: BaseChart; + element: Element; + }) => void; + /** A handler for the pointClick event. */ + onPointClick?: any; + /** A handler for the pointHoverChanged event. */ + onPointHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + /** A handler for the pointSelectionChanged event. */ + onPointSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + /** Specifies whether a single point or multiple points can be selected in the chart. */ + pointSelectionMode?: string; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options for the dxChart and dxPieChart widget series. */ + series?: any; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a title for the chart. */ + title?: viz.core.Title; + /** Specifies tooltip options. */ + tooltip?: BaseChartTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + } + /** A base class for all chart widgets included in the ChartJS library. */ + export class BaseChart extends viz.core.BaseWidget { + /** Deselects the chart's selected series. The series is displayed in an initial style. */ + clearSelection(): void; + /** Gets the current size of the widget. */ + getSize(): { width: number; height: number }; + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): BaseSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): BaseSeries; + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Hides all widget tooltips. */ + hideTooltip(): void; + /** Redraws a widget. */ + render(renderOptions?: { + force?: boolean; + animate?: boolean; + asyncSeriesRendering?: boolean; + }): void; + } + export interface AdvancedLegend extends core.BaseLegend { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /**

Specifies a callback function that returns the text to be displayed by legend items.

*/ + customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + } + export interface AdvancedOptions extends BaseChartOptions { + /** A handler for the argumentAxisClick event. */ + onArgumentAxisClick?: any; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate the values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort the series points. */ + sortingMethod?: any; + }; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** A handler for the seriesClick event. */ + onSeriesClick?: any; + /** A handler for the seriesHoverChanged event. */ + onSeriesHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** A handler for the seriesSelectionChanged event. */ + onSeriesSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** Specifies whether a single series or multiple series can be selected in the chart. */ + seriesSelectionMode?: string; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + /** Specifies whether or not all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies a common bar width as a percentage from 0 to 1. */ + barWidth?: number; + } + export interface Legend extends AdvancedLegend { + /** Specifies whether the legend is located outside or inside the chart's plot. */ + position?: string; + } + export interface ChartTooltip extends BaseChartTooltip { + /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies to the Bar and Bubble series. */ + location?: string; + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxChartOptions extends AdvancedOptions { + adaptiveLayout?: { + keepLabels?: boolean; + }; + /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ + synchronizeMultiAxes?: boolean; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ + adjustOnZoom?: boolean; + /** Specifies argument axis options for the dxChart widget. */ + argumentAxis?: ChartArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxChart widget. */ + commonAxisSettings?: ChartCommonAxisSettings; + /** An object defining the configuration options that are common for all panes in the dxChart widget. */ + commonPaneSettings?: CommonPane; + /** An object defining the configuration options that are common for all series of the dxChart widget. */ + commonSeriesSettings?: CommonSeriesSettings; + /** An object that specifies the appearance options of the chart crosshair. */ + crosshair?: { + /** Specifies a color for the crosshair lines. */ + color?: string; + /** Specifies a dash style for the crosshair lines. */ + dashStyle?: string; + /** Specifies whether to enable the crosshair or not. */ + enabled?: boolean; + /** Specifies the opacity of the crosshair lines. */ + opacity?: number; + /** Specifies the width of the crosshair lines. */ + width?: number; + /** Specifies the appearance of the horizontal crosshair line. */ + horizontalLine?: CrosshaierWithLabel; + /** Specifies the appearance of the vertical crosshair line. */ + verticalLine?: CrosshaierWithLabel; + /** Specifies the options of the crosshair labels. */ + label?: { + /** Specifies a color for the background of the crosshair labels. */ + backgroundColor?: string; + /** Specifies whether the crosshair labels are visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the crosshair labels. */ + font?: viz.core.Font; + /** Specifies the format of the values displayed by crosshair labels. */ + format?: string; + /** Specifies a precision for formatted values. */ + precision?: number; + /** Customizes the text displayed by the crosshair labels. */ + customizeText?: (info: { value: any; valueText: string; point: ChartPoint; }) => string; + } + }; + /** Specifies a default pane for the chart's series. */ + defaultPane?: string; + /** Specifies a coefficient determining the diameter of the largest bubble. */ + maxBubbleSize?: number; + /** Specifies the diameter of the smallest bubble measured in pixels. */ + minBubbleSize?: number; + /** Defines the dxChart widget's pane(s). */ + panes?: Array; + /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ + rotated?: boolean; + /** Specifies the options of a chart's legend. */ + legend?: Legend; + /** Specifies options for dxChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: SeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: ChartTooltip; + /** Specifies value axis options for the dxChart widget. */ + valueAxis?: Array; + /** Enables scrolling in your chart. */ + scrollingMode?: string; + /** Enables zooming in your chart. */ + zoomingMode?: string; + /** Specifies the settings of the scroll bar. */ + scrollBar?: { + /** Specifies whether the scroll bar is visible or not. */ + visible?: boolean; + /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ + offset?: number; + /** Specifies the color of the scroll bar. */ + color?: string; + /** Specifies the width of the scroll bar in pixels. */ + width?: number; + /** Specifies the opacity of the scroll bar. */ + opacity?: number; + /** Specifies the position of the scroll bar in the chart. */ + position?: string; + }; + } + /** A widget used to embed charts into HTML JS applications. */ + export class dxChart extends BaseChart { + constructor(element: JQuery, options?: dxChartOptions); + constructor(element: Element, options?: dxChartOptions); + /** Sets the specified start and end values for the chart's argument axis. */ + zoomArgument(startValue: any, endValue: any): void; + } + interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { + /** Configures the label that belongs to the horizontal crosshair line. */ + label?: { + /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ + backgroundColor?: string; + /** Specifies whether the label of the horizontal crosshair line is visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ + font?: viz.core.Font; + /** Specifies the format of the values displayed by crosshair labels. */ + format?: string; + /** Specifies a precision for formatted values. */ + precision?: number; + /** Customizes the text displayed by the crosshair label that accompany the horizontal line. */ + customizeText?: (info: { value: any; valueText: string; point: ChartPoint; }) => string; + } + } + export interface PolarChartTooltip extends BaseChartTooltip { + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxPolarChartOptions extends AdvancedOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + width?: number; + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Indicates whether or not to display a "spider web". */ + useSpiderWeb?: boolean; + /** Specifies argument axis options for the dxPolarChart widget. */ + argumentAxis?: PolarArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ + commonAxisSettings?: PolarCommonAxisSettings; + /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ + commonSeriesSettings?: CommonPolarSeriesSettings; + /** Specifies the options of a chart's legend. */ + legend?: AdvancedLegend; + /** Specifies options for dxPolarChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: PolarSeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: PolarChartTooltip; + /** Specifies value axis options for the dxPolarChart widget. */ + valueAxis?: PolarValueAxis; + } + /** A chart widget displaying data in a polar coordinate system. */ + export class dxPolarChart extends BaseChart { + constructor(element: JQuery, options?: dxPolarChartOptions); + constructor(element: Element, options?: dxPolarChartOptions); + } + export interface PieLegend extends core.BaseLegend { + /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + /** Specifies a callback function that returns the text to be displayed by a legend item. */ + customizeText?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + } + export interface dxPieChartOptions extends BaseChartOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies dxPieChart legend options. */ + legend?: PieLegend; + /** Specifies options for the series of the dxPieChart widget. */ + series?: Array; + /** Specifies the diameter of the pie. */ + diameter?: number; + /** Specifies the direction that the pie chart segments will occupy. */ + segmentsDirection?: string; + /** Specifies the angle in arc degrees from which the first segment of a pie chart should start. */ + startAngle?: number; + /** Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. The value should be between 0 and 1. */ + innerRadius?: number; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** Specifies how a chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + /** An object defining the configuration options that are common for all series of the dxPieChart widget. */ + commonSeriesSettings?: CommonPieSeriesSettings; + /** Specifies the type of the pie chart series. */ + type?: string; + } + /** A circular chart widget for HTML JS applications. */ + export class dxPieChart extends BaseChart { + constructor(element: JQuery, options?: dxPieChartOptions); + constructor(element: Element, options?: dxPieChartOptions); + /** + * Provides access to the dxPieChart series. + * @deprecated ..\..\BaseChart\3 Methods\getAllSeries().md + */ + getSeries(): PieSeries; + } +} +interface JQuery { + dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; + dxChart(methodName: string, ...params: any[]): any; + dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; + dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; + dxPieChart(methodName: string, ...params: any[]): any; + dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; + dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; + dxPolarChart(methodName: string, ...params: any[]): any; + dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; +} +declare namespace DevExpress.viz.gauges { + export interface BaseRangeContainer { + /** Specifies a range container's background color. */ + backgroundColor?: string; + /** Specifies the offset of the range container from an invisible scale line in pixels. */ + offset?: number; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: any; + /** An array of objects representing ranges contained in the range container. */ + ranges?: Array<{ startValue: number; endValue: number; color: string }>; + /** Specifies a color of a range. */ + color?: string; + /** Specifies an end value of a range. */ + endValue?: number; + /** Specifies a start value of a range. */ + startValue?: number; + } + export interface ScaleTick { + /** Specifies the color of the scale's minor ticks. */ + color?: string; + /** + * Specifies an array of custom minor ticks. + * @deprecated ..\customMinorTicks.md + */ + customTickValues?: Array; + /** Specifies the length of the scale's minor ticks. */ + length?: number; + /** + * Indicates whether automatically calculated minor ticks are visible or not. + * @deprecated This functionality in not more available + */ + showCalculatedTicks?: boolean; + /** + * Specifies an interval between minor ticks. + * @deprecated ..\minorTickInterval.md + */ + tickInterval?: number; + /** Indicates whether scale minor ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's minor ticks. */ + width?: number; + } + export interface ScaleMajorTick extends ScaleTick { + /** + * Specifies whether or not to expand the current major tick interval if labels overlap each other. + * @deprecated ..\label\overlappingBehavior\useAutoArrangement.md + */ + useTicksAutoArrangement?: boolean; + } + export interface ScaleMinorTick extends ScaleTick { + /** Specifies the opacity of the scale's minor ticks. */ + opacity?: number; + } + export interface BaseScaleLabel { + /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ + useRangeColors?: boolean; + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: number; valueText: string }) => string; + /** Specifies the overlap resolving options to be applied to scale labels. */ + overlappingBehavior?: { + /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ + useAutoArrangement?: boolean; + /** Specifies what label to hide in case of overlapping. */ + hideFirstOrLast?: string; + }; + /** Specifies font options for the text displayed in the scale labels of the gauge. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies whether or not scale labels are visible on the gauge. */ + visible?: boolean; + } + export interface BaseScale { + /** Specifies the end value for the scale of the gauge. */ + endValue?: number; + /** + * Specifies whether or not to hide the first scale label. + * @deprecated This functionality in not more available + */ + hideFirstLabel?: boolean; + /** + * Specifies whether or not to hide the first major tick on the scale. + * @deprecated This functionality in not more available + */ + hideFirstTick?: boolean; + /** + * Specifies whether or not to hide the last scale label. + * @deprecated This functionality in not more available + */ + hideLastLabel?: boolean; + /** + * Specifies whether or not to hide the last major tick on the scale. + * @deprecated This functionality in not more available + */ + hideLastTick?: boolean; + /** Specifies an interval between major ticks. */ + tickInterval?: number; + /** Specifies an interval between minor ticks. */ + minorTickInterval?: number; + /** Specifies an array of custom major ticks. */ + customTicks?: Array; + /** Specifies an array of custom minor ticks. */ + customMinorTicks?: Array; + /** Specifies common options for scale labels. */ + label?: BaseScaleLabel; + /** + * Specifies options of the gauge's major ticks. + * @deprecated ..\tick\tick.md + */ + majorTick?: ScaleMajorTick; + /** Specifies options of the gauge's major ticks. */ + tick?: { + /** Specifies the color of the scale's major ticks. */ + color?: string; + /** Specifies the length of the scale's major ticks. */ + length?: number; + /** Indicates whether scale major ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's major ticks. */ + width?: number; + /** Specifies the opacity of the scale's major ticks. */ + opacity?: number; + }; + /** Specifies options of the gauge's minor ticks. */ + minorTick?: ScaleMinorTick; + /** Specifies the start value for the scale of the gauge. */ + startValue?: number; + } + export interface BaseValueIndicator { + /** Specifies the type of subvalue indicators. */ + type?: string; + /** Specifies the background color for the indicator of the rangeBar type. */ + backgroundColor?: string; + /** Specifies the base value for the indicator of the rangeBar type. */ + baseValue?: number; + /** Specifies a color of the indicator. */ + color?: string; + /** Specifies the range bar size for an indicator of the rangeBar type. */ + size?: number; + text?: { + /** Specifies a callback function that returns the text to be displayed in an indicator. */ + customizeText?: (indicatedValue: { value: number; valueText: string }) => string; + font?: viz.core.Font; + /** Specifies a format for the text displayed in an indicator. */ + format?: string; + /** Specifies the range bar's label indent in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by an indicator. */ + precision?: number; + }; + offset?: number; + length?: number; + width?: number; + /** Specifies the length of an arrow for the indicator of the textCloud type in pixels. */ + arrowLength?: number; + /** Sets the array of colors to be used for coloring subvalue indicators. */ + palette?: Array; + /** Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type. */ + indentFromCenter?: number; + /** Specifies the second color for the indicator of the twoColorNeedle type. */ + secondColor?: string; + /** Specifies the length of a twoNeedleColor type indicator tip as a percentage. */ + secondFraction?: number; + /** Specifies the spindle's diameter in pixels for the indicator of a needle-like type. */ + spindleSize?: number; + /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ + spindleGapSize?: number; + /** Specifies the orientation of the rangeBar indicator on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of the rangeBar indicator on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface SharedGaugeOptions { + /** Specifies animation options. */ + animation?: viz.core.Animation; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** + * Specifies a subtitle for the widget. + * @deprecated ..\..\..\BaseGauge\1 Configuration\title\subtitle\subtitle.md + */ + subtitle?: { + /** + * Specifies font options for the subtitle. + * @deprecated ..\..\title\subtitle\font\font.md + */ + font?: viz.core.Font; + /** + * Specifies a text for the subtitle. + * @deprecated ..\title\subtitle\text.md + */ + text?: string; + }; + /** Specifies a title for a gauge. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** + * Specifies a title's position on the gauge. + * @deprecated basegaugeoptions_title_verticalAlignment and basegaugeoptions_title_horizontalAlignment + */ + position?: string; + /** Specifies the distance between the title and surrounding gauge elements in pixels. */ + margin?: viz.core.Margins; + /** Specifies the height of the space reserved for the title. */ + placeholderSize?: number; + /** Specifies the gauge title's position in the vertical direction. */ + verticalAlignment?: string; + /** Specifies the gauge title's horizontal position. */ + horizontalAlignment?: string; + /** Specifies text for the title. */ + text?: string; + /** Specifies a subtitle for the widget. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies text for the subtitle. */ + text?: string; + } + }; + /** Specifies options for gauge tooltips. */ + tooltip?: viz.core.Tooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + } + export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ + margin?: viz.core.Margins; + /** Specifies options of the gauge's range container. */ + rangeContainer?: BaseRangeContainer; + /** Specifies a gauge's scale options. */ + scale?: BaseScale; + /** Specifies the appearance options of subvalue indicators. */ + subvalueIndicator?: BaseValueIndicator; + /** Specifies a set of subvalues to be designated by the subvalue indicators. */ + subvalues?: Array; + /** Specifies the main value on a gauge. */ + value?: number; + /** Specifies the appearance options of the value indicator. */ + valueIndicator?: BaseValueIndicator; + } + /** A gauge widget. */ + export class dxBaseGauge extends viz.core.BaseWidget { + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Returns the main gauge value. */ + value(): number; + /** Updates a gauge value. */ + value(value: number): void; + /** Returns an array of gauge subvalues. */ + subvalues(): Array; + /** Updates gauge subvalues. */ + subvalues(subvalues: Array): void; + } + export interface LinearRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ + width?: any; + /** Specifies an end width of a range container. */ + end?: number; + /** Specifies a start width of a range container. */ + start?: number; + } + export interface LinearScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface LinearScale extends BaseScale { + /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + label?: LinearScaleLabel; + /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface dxLinearGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ + geometry?: { + /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ + orientation?: string; + }; + /** Specifies gauge range container options. */ + rangeContainer?: LinearRangeContainer; + scale?: LinearScale; + } + /** A widget that represents a gauge with a linear scale. */ + export class dxLinearGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxLinearGaugeOptions); + constructor(element: Element, options?: dxLinearGaugeOptions); + } + export interface CircularRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container in the dxCircularGauge widget. */ + orientation?: string; + /** Specifies the range container's width in pixels. */ + width?: number; + } + export interface CircularScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface CircularScale extends BaseScale { + label?: CircularScaleLabel; + /** Specifies the orientation of scale ticks. */ + orientation?: string; + } + export interface dxCircularGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ + geometry?: { + /** Specifies the end angle of the circular gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the circular gauge's arc. */ + startAngle?: number; + }; + /** Specifies gauge range container options. */ + rangeContainer?: CircularRangeContainer; + scale?: CircularScale; + } + /** A widget that represents a gauge with a circular scale. */ + export class dxCircularGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxCircularGaugeOptions); + constructor(element: Element, options?: dxCircularGaugeOptions); + } + export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies a color for the remaining segment of the bar's track. */ + backgroundColor?: string; + /** Specifies a distance between bars in pixels. */ + barSpacing?: number; + /** Specifies a base value for bars. */ + baseValue?: number; + /** Specifies an end value for the gauge's invisible scale. */ + endValue?: number; + /** Defines the shape of the gauge's arc. */ + geometry?: { + /** Specifies the end angle of the bar gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the bar gauge's arc. */ + startAngle?: number; + }; + /** Specifies the options of the labels that accompany gauge bars. */ + label?: { + /** Specifies a color for the label connector text. */ + connectorColor?: string; + /** Specifies the width of the label connector in pixels. */ + connectorWidth?: number; + /** Specifies a callback function that returns a text for labels. */ + customizeText?: (barValue: { value: number; valueText: string }) => string; + /** Specifies font options for bar labels. */ + font?: viz.core.Font; + /** Specifies a format for bar labels. */ + format?: string; + /** Specifies the distance between the upper bar and bar labels in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by labels. */ + precision?: number; + /** Specifies whether bar labels appear on a gauge or not. */ + visible?: boolean; + }; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: string; + /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ + relativeInnerRadius?: number; + /** Specifies a start value for the gauge's invisible scale. */ + startValue?: number; + /** Specifies the array of values to be indicated on a bar gauge. */ + values?: Array; + } + /** A circular bar widget. */ + export class dxBarGauge extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxBarGaugeOptions); + constructor(element: Element, options?: dxBarGaugeOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws the widget. */ + render(): void; + /** Returns an array of gauge values. */ + values(): Array; + /** Updates the values displayed by a gauge. */ + values(values: Array): void; + } +} +interface JQuery { + dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; + dxLinearGauge(methodName: string, ...params: any[]): any; + dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; + dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; + dxCircularGauge(methodName: string, ...params: any[]): any; + dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; + dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; + dxBarGauge(methodName: string, ...params: any[]): any; + dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; +} +declare namespace DevExpress.viz.rangeSelector { + export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { + /** Specifies the options for the range selector's background. */ + background?: { + /** Specifies the background color for the dxRangeSelector. */ + color?: string; + /** Specifies image options. */ + image?: { + /** Specifies a location for the image in the background of a range selector. */ + location?: string; + /** Specifies the image's URL. */ + url?: string; + }; + /** Indicates whether or not the background (background color and/or image) is visible. */ + visible?: boolean; + }; + /** Specifies a title for the range selector. */ + title?: viz.core.Title; + /** Specifies the dxRangeSelector's behavior options. */ + behavior?: { + /** Indicates whether or not you can swap sliders. */ + allowSlidersSwap?: boolean; + /** Indicates whether or not animation is enabled. */ + animationEnabled?: boolean; + /** Specifies when to call the onSelectedRangeChanged function. */ + callSelectedRangeChanged?: string; + /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ + manualRangeSelectionEnabled?: boolean; + /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ + moveSelectedRangeByClick?: boolean; + /** Indicates whether to snap a slider to ticks. */ + snapToTicks?: boolean; + }; + /** Specifies the options required to display a chart as the range selector's background. */ + chart?: { + /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ + bottomIndent?: number; + /** An object defining the common configuration options for the chart’s series. */ + commonSeriesSettings?: viz.charts.CommonSeriesSettings; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort series points. */ + sortingMethod?: any; + }; + /** Specifies whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies a common bar width as a percentage from 0 to 1. */ + barWidth?: number; + /** Sets the name of the palette to be used in the range selector's chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** An object defining the chart’s series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: viz.charts.SeriesTemplate; + /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ + topIndent?: number; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Specifies options for the chart's value axis. */ + valueAxis?: { + /** Indicates whether or not the chart's value axis must be inverted. */ + inverted?: boolean; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ + logarithmBase?: number; + /** Specifies the maximum value of the chart's value axis. */ + max?: number; + /** Specifies the minimum value of the chart's value axis. */ + min?: number; + /** Specifies the type of the value axis. */ + type?: string; + /** Specifies the desired type of axis values. */ + valueType?: string; + }; + }; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies a data source for the scale values and for the chart at the background. */ + dataSource?: any; + /** Specifies the data source field that provides data for the scale. */ + dataSourceField?: string; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ + margin?: viz.core.Margins; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options of the range selector's scale. */ + scale?: { + /** Specifies the scale's end value. */ + endValue?: any; + /** Specifies common options for scale labels. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: any; valueText: string; }) => string; + /** Specifies font options for the text displayed in the range selector's scale labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies a spacing between scale labels and the background bottom edge. */ + topIndent?: number; + /** Specifies whether or not the scale's labels are visible. */ + visible?: boolean; + }; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ + logarithmBase?: number; + /** + * Specifies an interval between major ticks. + * @deprecated ..\tickInterval\tickInterval.md + */ + majorTickInterval?: any; + /** Specifies an interval between axis ticks. */ + tickInterval?: any; + /** Specifies options for the date-time scale's markers. */ + marker?: { + /** Defines the options that can be set for the text that is displayed by the scale markers. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale markers. */ + customizeText?: (markerValue: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed in scale markers. */ + format?: string; + }; + /** Specifies the height of the marker's separator. */ + separatorHeight?: number; + /** Specifies the space between the marker label and the marker separator. */ + textLeftIndent?: number; + /** Specifies the space between the marker's label and the top edge of the marker's separator. */ + textTopIndent?: number; + /** Specified the indent between the marker and the scale lables. */ + topIndent?: number; + /** Indicates whether scale markers are visible. */ + visible?: boolean; + }; + /** Specifies the maximum range that can be selected. */ + maxRange?: any; + /** Specifies the number of minor ticks between neighboring major ticks. */ + minorTickCount?: number; + /** Specifies an interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the minimum range that can be selected. */ + minRange?: any; + /** Specifies the height of the space reserved for the scale in pixels. */ + placeholderHeight?: number; + /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ + showCustomBoundaryTicks?: boolean; + /** + * Indicates whether or not to show minor ticks on the scale. + * @deprecated minorTick\visible.md + */ + showMinorTicks?: boolean; + /** Specifies the scale's start value. */ + startValue?: any; + /** Specifies options defining the appearance of scale ticks. */ + tick?: { + /** Specifies the color of scale ticks (both major and minor ticks). */ + color?: string; + /** Specifies the opacity of scale ticks (both major and minor ticks). */ + opacity?: number; + /** Specifies the width of the scale's ticks (both major and minor ticks). */ + width?: number; + }; + /** Specifies options of the range selector's minor ticks. */ + minorTick?: { + /** Specifies the color of the scale's minor ticks. */ + color?: string; + /** Specifies the opacity of the scale's minor ticks. */ + opacity?: number; + /** Specifies the width of the scale's minor ticks. */ + width?: number; + /** Indicates whether scale minor ticks are visible or not. */ + visible?: boolean; + }; + /** Specifies the type of the scale. */ + type?: string; + /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + /** Specifies the type of values on the scale. */ + valueType?: string; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; + }; + /** Specifies the range to be selected when displaying the dxRangeSelector. */ + selectedRange?: { + /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + startValue?: any; + /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + endValue?: any; + }; + /** Specifies the color of the selected range. */ + selectedRangeColor?: string; + /** Range selector's indent options. */ + indent?: { + /** Specifies range selector's left indent. */ + left?: number; + /** Specifies range selector's right indent. */ + right?: number; + }; + /** A handler for the selectedRangeChanged event. */ + onSelectedRangeChanged?: (e: { + startValue: any; + endValue: any; + component: dxRangeSelector; + element: Element; + }) => void; + /** Specifies range selector shutter options. */ + shutter?: { + /** Specifies shutter color. */ + color?: string; + /** Specifies the opacity of the color of shutters. */ + opacity?: number; + }; + /** Specifies in pixels the size of the dxRangeSelector widget. */ + size?: viz.core.Size; + /** Specifies the appearance of the range selector's slider handles. */ + sliderHandle?: { + /** Specifies the color of the slider handles. */ + color?: string; + /** Specifies the opacity of the slider handles. */ + opacity?: number; + /** Specifies the width of the slider handles. */ + width?: number; + }; + /** Defines the options of the range selector slider markers. */ + sliderMarker?: { + /** Specifies the color of the slider markers. */ + color?: string; + /** Specifies a callback function that returns the text to be displayed by slider markers. */ + customizeText?: (scaleValue: { value: any; valueText: any; }) => string; + /** Specifies font options for the text displayed by the range selector slider markers. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in slider markers. */ + format?: string; + /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ + invalidRangeColor?: string; + /** + * Specifies the empty space between the marker's border and the marker’s text. + * @deprecated Use the 'paddingTopBottom' and 'paddingLeftRight' options instead + */ + padding?: number; + /** Specifies the empty space between the marker's top and bottom borders and the marker's text. */ + paddingTopBottom?: number; + /** Specifies the empty space between the marker's left and right borders and the marker's text. */ + paddingLeftRight?: number; + /** Specifies the placeholder height of the slider marker. */ + placeholderHeight?: number; + /** + * Specifies in pixels the height and width of the space reserved for the range selector slider markers. + * @deprecated Use the 'placeholderHeight' and 'indent' options instead + */ + placeholderSize?: { + /** Specifies the height of the placeholder for the left and right slider markers. */ + height?: number; + /** Specifies the width of the placeholder for the left and right slider markers. */ + width?: { + /** Specifies the width of the left slider marker's placeholder. */ + left?: number; + /** Specifies the width of the right slider marker's placeholder. */ + right?: number; + }; + }; + /** Specifies a precision for the formatted value displayed in slider markers. */ + precision?: number; + /** Indicates whether or not the slider markers are visible. */ + visible?: boolean; + }; + } + /** A widget that allows end users to select a range of values on a scale. */ + export class dxRangeSelector extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxRangeSelectorOptions); + constructor(element: Element, options?: dxRangeSelectorOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(skipChartAnimation?: boolean): void; + /** Returns the currently selected range. */ + getSelectedRange(): { startValue: any; endValue: any; }; + /** Sets a specified range. */ + setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; + } +} +interface JQuery { + dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; + dxRangeSelector(methodName: string, ...params: any[]): any; + dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; +} +declare namespace DevExpress.viz.map { + /** This section describes the fields and methods that can be used in code to manipulate the Layer object. */ + export interface MapLayer { + /** The name of the layer. */ + name: string; + /** The layer index in the layers array. */ + index: number; + /** The layer type. Can be "area", "line" or "marker". */ + type: string; + /** The type of the layer elements. */ + elementType: string; + /** Gets all layer elements. */ + getElements(): Array; + /** Deselects all layer elements. */ + clearSelection(): void; + } + /** This section describes the fields and methods that can be used in code to manipulate the Layer Element object. */ + export interface MapLayerElement { + /** The parent layer of the layer element. */ + layer: MapLayer; + /** Gets the layer element coordinates. */ + coordinates(): Object; + /** Sets the value of an attribute. */ + attribute(name: string, value: any): void; + /** Gets the value of an attribute. */ + attribute(name: string): any; + /** Gets the selection state of the layer element. */ + selected(): boolean; + /** Sets the selection state of the layer element. */ + selected(state: boolean): void; + /** Applies the layer element settings and updates element appearance. */ + applySettings(settings: any): void; + } + /** + * This section describes the fields and methods that can be used in code to manipulate the Area object. + * @deprecated Use the "Layer Element" instead + */ + export interface Area { + /** + * Contains the element type. + * @deprecated ..\..\Layer\2 Fields\type.md + */ + type: string; + /** + * Return the value of an attribute. + * @deprecated ..\..\Layer Element\3 Methods\attribute(name_value).md + */ + attribute(name: string): any; + /** + * Provides information about the selection state of an area. + * @deprecated Use the "selected()" method of the Layer Element + */ + selected(): boolean; + /** + * Sets a new selection state for an area. + * @deprecated Use the "selected(state)" method of the Layer Element + */ + selected(state: boolean): void; + /** + * Applies the area settings specified as a parameter and updates the area appearance. + * @deprecated ..\..\Layer Element\3 Methods\applySettings(settings).md + */ + applySettings(settings: any): void; + } + /** + * This section describes the fields and methods that can be used in code to manipulate the Markers object. + * @deprecated Use the "Layer Element" instead + */ + export interface Marker { + /** + * Contains the descriptive text accompanying the map marker. + * @deprecated Get the text with the "attribute" method (using the "layers.label.dataField" value) + */ + text: string; + /** + * Contains the type of the element. + * @deprecated ..\..\Layer\2 Fields\type.md + */ + type: string; + /** + * Contains the URL of an image map marker. + * @deprecated Get the url with the "attribute" method (using the "layers.dataField" value) + */ + url: string; + /** + * Contains the value of a bubble map marker. + * @deprecated Get the value with the "attribute" method (using the "layers.dataField" value) + */ + value: number; + /** + * Contains the values of a pie map marker. + * @deprecated Get the values with the "attribute" method (using the "layers.dataField" value) + */ + values: Array; + /** + * Returns the value of an attribute. + * @deprecated ..\..\Layer Element\3 Methods\attribute(name_value).md + */ + attribute(name: string): any; + /** + * Returns the coordinates of a specific marker. + * @deprecated ..\..\Layer Element\3 Methods\coordinates().md + */ + coordinates(): Array; + /** + * Provides information about the selection state of a marker. + * @deprecated Use the "selected()" method of the Layer Element + */ + selected(): boolean; + /** + * Sets a new selection state for a marker. + * @deprecated Use the "selected(state)" method of the Layer Element + */ + selected(state: boolean): void; + /** + * Applies the marker settings specified as a parameter and updates marker appearance. + * @deprecated ..\..\Layer Element\3 Methods\applySettings(settings).md + */ + applySettings(settings: any): void; + } + export interface MapLayerSettings { + /** Specifies the layer name. */ + name?: string; + /** Specifies layer type. */ + type?: string; + /** Specifies the type of a marker element. Setting this option makes sense only if the layer type is "marker". */ + elementType?: string; + /** Specifies a data source for the layer. */ + data?: any; + /** Specifies the line width (for layers of a line type) or width of the layer elements border in pixels. */ + borderWidth?: number; + /** Specifies a color for the border of the layer elements. */ + borderColor?: string; + /** Specifies a color for layer elements. */ + color?: string; + /** Specifies a color for the border of the layer element when it is hovered over. */ + hoveredBorderColor?: string; + /** Specifies the pixel-measured line width (for layers of a line type) or width for the border of the layer element when it is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for a layer element when it is hovered over. */ + hoveredColor?: string; + /** Specifies a pixel-measured line width (for layers of a line type) or width for the border of the layer element when it is selected. */ + selectedBorderWidth?: number; + /** Specifies a color for the border of the layer element when it is selected. */ + selectedBorderColor?: string; + /** Specifies a color for the layer element when it is selected. */ + selectedColor?: string; + /** Specifies the layer opacity (from 0 to 1). */ + opacity?: number; + /** Specifies the size of markers. Setting this option makes sense only if the layer type is "marker" and the elementType is "dot", "pie" or "image". */ + size?: number; + /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if the layer type is "marker". */ + minSize?: number; + /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if the layer type is "marker". */ + maxSize?: number; + /** Specifies whether or not to change the appearance of a layer element when it is hovered over. */ + hoverEnabled?: boolean; + /** Specifies whether single or multiple map elements can be selected on a vector map. */ + selectionMode?: string; + /** Specifies the name of the palette or a custom range of colors to be used for coloring a layer. */ + palette?: any; + /** Specifies the number of colors in a palette. */ + paletteSize?: number; + /** Allows you to paint layer elements with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring of layer elements. */ + colorGroupingField?: string; + /** Allows you to display bubbles with similar attributes in the same size. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble". */ + sizeGroups?: Array; + /** Specifies the field that provides data to be used for sizing bubble markers. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble". */ + sizeGroupingField?: string; + /** Specifies the name of the attribute containing marker data. Setting this option makes sense only if the layer type is "marker" and the elementType is "bubble", "pie" or "image". */ + dataField?: string; + /** Specifies the function that customizes each layer element individually. */ + customize?: (eleemnts: Array) => void; + /** Specifies marker label options. */ + label?: { + /** The name of the data attribute containing marker texts. */ + dataField?: string; + /** Enables marker labels. */ + enabled?: boolean; + /** Specifies font options for marker labels. */ + font?: viz.core.Font; + }; + } + export interface AreaSettings { + /** + * Specifies the width of the area border in pixels. + * @deprecated ..\layers\borderWidth.md + */ + borderWidth?: number; + /** + * Specifies a color for the area border. + * @deprecated ..\layers\borderColor.md + */ + borderColor?: string; + /** + * Specifies a color for an area. + * @deprecated ..\layers\color.md + */ + color?: string; + /** + * Specifies the function that customizes each area individually. + * @deprecated ..\layers\customize.md + */ + customize?: (areaInfo: Area) => AreaSettings; + /** + * Specifies a color for the area border when the area is hovered over. + * @deprecated ..\layers\hoveredBorderColor.md + */ + hoveredBorderColor?: string; + /** + * Specifies the pixel-measured width of the area border when the area is hovered over. + * @deprecated ..\layers\hoveredBorderWidth.md + */ + hoveredBorderWidth?: number; + /** + * Specifies a color for an area when this area is hovered over. + * @deprecated ..\layers\hoveredColor.md + */ + hoveredColor?: string; + /** + * Specifies whether or not to change the appearance of an area when it is hovered over. + * @deprecated ..\layers\hoverEnabled.md + */ + hoverEnabled?: boolean; + /** + * Configures area labels. + * @deprecated ..\..\layers\label\label.md + */ + label?: { + /** + * Specifies the data field that provides data for area labels. + * @deprecated ..\..\layers\label\dataField.md + */ + dataField?: string; + /** + * Enables area labels. + * @deprecated ..\..\layers\label\enabled.md + */ + enabled?: boolean; + /** + * Specifies font options for area labels. + * @deprecated ..\..\..\layers\label\font\font.md + */ + font?: viz.core.Font; + }; + /** + * Specifies the name of the palette or a custom range of colors to be used for coloring a map. + * @deprecated ..\layers\palette.md + */ + palette?: any; + /** + * Specifies the number of colors in a palette. + * @deprecated ..\layers\paletteSize.md + */ + paletteSize?: number; + /** + * Allows you to paint areas with similar attributes in the same color. + * @deprecated ..\layers\colorGroups.md + */ + colorGroups?: Array; + /** + * Specifies the field that provides data to be used for coloring areas. + * @deprecated ..\layers\colorGroupingField.md + */ + colorGroupingField?: string; + /** + * Specifies a color for the area border when the area is selected. + * @deprecated ..\layers\selectedBorderColor.md + */ + selectedBorderColor?: string; + /** + * Specifies a color for an area when this area is selected. + * @deprecated ..\layers\selectedColor.md + */ + selectedColor?: string; + /** + * Specifies the pixel-measured width of the area border when the area is selected. + * @deprecated ..\layers\selectedBorderWidth.md + */ + selectedBorderWidth?: number; + /** + * Specifies whether single or multiple areas can be selected on a vector map. + * @deprecated ..\layers\selectionMode.md + */ + selectionMode?: string; + } + export interface MarkerSettings { + /** + * Specifies a color for the marker border. + * @deprecated ..\layers\borderColor.md + */ + borderColor?: string; + /** + * Specifies the width of the marker border in pixels. + * @deprecated ..\layers\borderWidth.md + */ + borderWidth?: number; + /** + * Specifies a color for a marker of the dot or bubble type. + * @deprecated ..\layers\color.md + */ + color?: string; + /** + * Specifies the function that customizes each marker individually. + * @deprecated ..\layers\customize.md + */ + customize?: (markerInfo: Marker) => MarkerSettings; + /** + * Specifies the pixel-measured width of the marker border when the marker is hovered over. + * @deprecated ..\layers\hoveredBorderWidth.md + */ + hoveredBorderWidth?: number; + /** + * Specifies a color for the marker border when the marker is hovered over. + * @deprecated ..\layers\hoveredBorderColor.md + */ + hoveredBorderColor?: string; + /** + * Specifies a color for a marker of the dot or bubble type when this marker is hovered over. + * @deprecated ..\layers\hoveredColor.md + */ + hoveredColor?: string; + /** + * Specifies whether or not to change the appearance of a marker when it is hovered over. + * @deprecated ..\layers\hoverEnabled.md + */ + hoverEnabled?: boolean; + /** + * Specifies marker label options. + * @deprecated ..\..\layers\label\label.md + */ + label?: { + /** + * Enables marker labels. + * @deprecated ..\..\layers\label\enabled.md + */ + enabled?: boolean; + /** + * Specifies font options for marker labels. + * @deprecated ..\..\..\layers\label\font\font.md + */ + font?: viz.core.Font; + }; + /** + * Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. + * @deprecated ..\layers\maxSize.md + */ + maxSize?: number; + /** + * Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. + * @deprecated ..\layers\minSize.md + */ + minSize?: number; + /** + * Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. + * @deprecated ..\layers\opacity.md + */ + opacity?: number; + /** + * Specifies the pixel-measured width of the marker border when the marker is selected. + * @deprecated ..\layers\selectedBorderWidth.md + */ + selectedBorderWidth?: number; + /** + * Specifies a color for the marker border when the marker is selected. + * @deprecated ..\layers\selectedBorderColor.md + */ + selectedBorderColor?: string; + /** + * Specifies a color for a marker of the dot or bubble type when this marker is selected. + * @deprecated ..\layers\selectedColor.md + */ + selectedColor?: string; + /** + * Specifies whether a single or multiple markers can be selected on a vector map. + * @deprecated ..\layers\selectionMode.md + */ + selectionMode?: string; + /** + * Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. + * @deprecated ..\layers\size.md + */ + size?: number; + /** + * Specifies the type of markers to be used on the map. + * @deprecated ..\layers\elementType.md + */ + type?: string; + /** + * Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. + * @deprecated ..\layers\palette.md + */ + palette?: any; + /** + * Allows you to paint markers with similar attributes in the same color. + * @deprecated ..\layers\colorGroups.md + */ + colorGroups?: Array; + /** + * Specifies the field that provides data to be used for coloring markers. + * @deprecated ..\layers\colorGroupingField.md + */ + colorGroupingField?: string; + /** + * Allows you to display bubbles with similar attributes in the same size. + * @deprecated ..\layers\sizeGroups.md + */ + sizeGroups?: Array; + /** + * Specifies the field that provides data to be used for sizing bubble markers. + * @deprecated ..\layers\sizeGroupingField.md + */ + sizeGroupingField?: string; + } + export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { + /** + * An object specifying options for the map areas. + * @deprecated Use the 'layers' option instead + */ + areaSettings?: AreaSettings; + /** Specifies the options for the map background. */ + background?: { + /** Specifies a color for the background border. */ + borderColor?: string; + /** Specifies a color for the background. */ + color?: string; + }; + /** Specifies options for dxVectorMap widget layers. */ + layers?: Array; + /** Specifies the map projection. */ + projection?: Object; + /** Specifies the positioning of a map in geographical coordinates. */ + bounds?: Array; + /** Specifies the options of the control bar. */ + controlBar?: { + /** Specifies a color for the outline of the control bar elements. */ + borderColor?: string; + /** Specifies a color for the inner area of the control bar elements. */ + color?: string; + /** Specifies whether or not to display the control bar. */ + enabled?: boolean; + /** Specifies the margin of the control bar in pixels. */ + margin?: number; + /** Specifies the position of the control bar. */ + horizontalAlignment?: string; + /** Specifies the position of the control bar. */ + verticalAlignment?: string; + /** Specifies the opacity of the Control_Bar. */ + opacity?: number; + }; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** + * Specifies a data source for the map area. + * @deprecated Use the 'layers.data' option instead + */ + mapData?: any; + /** + * Specifies a data source for the map markers. + * @deprecated Use the 'layers.data' option instead + */ + markers?: any; + /** + * An object specifying options for the map markers. + * @deprecated Use the 'layers' option instead + */ + markerSettings?: MarkerSettings; + /** Specifies the size of the dxVectorMap widget. */ + size?: viz.core.Size; + /** Specifies a title for the vector map. */ + title?: viz.core.Title; + /** Specifies tooltip options. */ + tooltip?: viz.core.Tooltip; + /** Configures map legends. */ + legends?: Array; + /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ + wheelEnabled?: boolean; + /** Specifies whether the map should respond to touch gestures. */ + touchEnabled?: boolean; + /** Disables the zooming capability. */ + zoomingEnabled?: boolean; + /** Specifies the geographical coordinates of the center for a map. */ + center?: Array; + /** A handler for the centerChanged event. */ + onCenterChanged?: (e: { + center: Array; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** Specifies a number that is used to zoom a map initially. */ + zoomFactor?: number; + /** Specifies a map's maximum zoom factor. */ + maxZoomFactor?: number; + /** A handler for the zoomFactorChanged event. */ + onZoomFactorChanged?: (e: { + component: dxVectorMap; + element: Element; + zoomFactor: number; + }) => void; + /** A handler for the click event. */ + onClick?: any; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + component: dxVectorMap; + element: Element; + target: MapLayerElement; + }) => void; + /** + * A handler for the areaClick event. + * @deprecated Use the 'onClick' option instead + */ + onAreaClick?: any; + /** + * A handler for the areaSelectionChanged event. + * @deprecated Use the 'onSelectionChanged' option instead + */ + onAreaSelectionChanged?: (e: { + target: Area; + component: dxVectorMap; + element: Element; + }) => void; + /** + * A handler for the markerClick event. + * @deprecated Use the 'onClick' option instead + */ + onMarkerClick?: any; + /** + * A handler for the markerSelectionChanged event. + * @deprecated Use the 'onSelecitonChanged' option instead + */ + onMarkerSelectionChanged?: (e: { + target: Marker; + component: dxVectorMap; + element: Element; + }) => void; + /** Disables the panning capability. */ + panningEnabled?: boolean; + } + export interface Legend extends viz.core.BaseLegend { + /** Specifies the color of item markers in the legend. The specified color applied only when the legend uses 'size' source. */ + markerColor?: string; + /** Specifies text for legend items. */ + customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ + customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; + /** Specifies the source of data for the legend. */ + source?: { + /** Specifies a layer to which the legend belongs. */ + layer?: string; + /** Specifies the type of the legend grouping. */ + grouping?: string; + } + } + /** A vector map widget. */ + export class dxVectorMap extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxVectorMapOptions); + constructor(element: Element, options?: dxVectorMapOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Gets the current coordinates of the map center. */ + center(): Array; + /** Sets the coordinates of the map center. */ + center(centerCoordinates: Array): void; + /** + * Deselects all the selected areas on a map. The areas are displayed in their initial style after. + * @deprecated Use the 'clearSelection' method on a layer instead + */ + clearAreaSelection(): void; + /** + * Deselects all the selected markers on a map. The markers are displayed in their initial style after. + * @deprecated Use the 'clearSelection' method on a layer instead + */ + clearMarkerSelection(): void; + /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ + clearSelection(): void; + /** Converts client area coordinates into map coordinates. */ + convertCoordinates(x: number, y: number): Array; + /** Gets all map layers. */ + getLayers(): Array; + /** Gets the layer by its index. */ + getLayerByIndex(index: number): MapLayer; + /** Gets the layer by its name. */ + getLayerByName(name: string): MapLayer; + /** + * Returns an array with all the map areas. + * @deprecated Use the 'getElements' method on a layer instead + */ + getAreas(): Array; + /** + * Returns an array with all the map markers. + * @deprecated Use the 'getElements' method on a layer instead + */ + getMarkers(): Array; + /** Gets the current coordinates of the map viewport. */ + viewport(): Array; + /** Sets the coordinates of the map viewport. */ + viewport(viewportCoordinates: Array): void; + /** Gets the current value of the map zoom factor. */ + zoomFactor(): number; + /** Sets the value of the map zoom factor. */ + zoomFactor(zoomFactor: number): void; + } + export var projection: ProjectionCreator; + export interface ProjectionCreator { + /** Creates a new projection. */ + (data: { + to?: (coordinates: Array) => Array; + from?: (coordinates: Array) => Array; + aspectRatio?: number; + }): Object; + /** Gets the default or custom projection from the projection storage. */ + get(name: string): Object; + /** Adds a new projection to the internal projections storage. */ + add(name: string, projection: Object): void; + } +} +interface JQuery { + dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; + dxVectorMap(methodName: string, ...params: any[]): any; + dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; +} +declare namespace DevExpress.viz.sparklines { + export interface SparklineTooltip extends viz.core.Tooltip { + /** + * Specifies how a tooltip is horizontally aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + horizontalAlignment?: string; + /** + * Specifies how a tooltip is vertically aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + verticalAlignment?: string; + } + export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { + /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of the widget. */ + size?: viz.core.Size; + /** Specifies tooltip options. */ + tooltip?: SparklineTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + } + /** Overridden by descriptions for particular widgets. */ + export class BaseSparkline extends viz.core.BaseWidget { + /** Redraws a widget. */ + render(): void; + } + export interface dxBulletOptions extends BaseSparkline { + /** Specifies a color for the bullet bar. */ + color?: string; + /** Specifies an end value for the invisible scale. */ + endScaleValue?: number; + /** Specifies whether or not to show the target line. */ + showTarget?: boolean; + /** Specifies whether or not to show the line indicating zero on the invisible scale. */ + showZeroLevel?: boolean; + /** Specifies a start value for the invisible scale. */ + startScaleValue?: number; + /** Specifies the value indicated by the target line. */ + target?: number; + /** Specifies a color for both the target and zero level lines. */ + targetColor?: string; + /** Specifies the width of the target line. */ + targetWidth?: number; + /** Specifies the primary value indicated by the bullet bar. */ + value?: number; + } + /** A bullet graph widget. */ + export class dxBullet extends BaseSparkline { + constructor(element: JQuery, options?: dxBulletOptions); + constructor(element: Element, options?: dxBulletOptions); + } + export interface dxSparklineOptions extends BaseSparklineOptions { + /** Specifies the data source field that provides arguments for a sparkline. */ + argumentField?: string; + /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ + barNegativeColor?: string; + /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ + barPositiveColor?: string; + /** Specifies a data source for the sparkline. */ + dataSource?: Array; + /** Sets a color for the boundary of both the first and last points on a sparkline. */ + firstLastColor?: string; + /** Specifies whether a sparkline ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineColor?: string; + /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineWidth?: number; + /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ + lossColor?: string; + /** Sets a color for the boundary of the maximum point on a sparkline. */ + maxColor?: string; + /** Sets a color for the boundary of the minimum point on a sparkline. */ + minColor?: string; + /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointColor?: string; + /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ + pointSize?: number; + /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointSymbol?: string; + /** Specifies whether or not to indicate both the first and last values on a sparkline. */ + showFirstLast?: boolean; + /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ + showMinMax?: boolean; + /** Determines the type of a sparkline. */ + type?: string; + /** Specifies the data source field that provides values for a sparkline. */ + valueField?: string; + /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ + winColor?: string; + /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ + winlossThreshold?: number; + /** Specifies the minimum value of the sparkline value axis. */ + minValue?: number; + /** Specifies the maximum value of the sparkline's value axis. */ + maxValue?: number; + } + /** A sparkline widget. */ + export class dxSparkline extends BaseSparkline { + constructor(element: JQuery, options?: dxSparklineOptions); + constructor(element: Element, options?: dxSparklineOptions); + } +} +interface JQuery { + dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; + dxBullet(methodName: string, ...params: any[]): any; + dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; + dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; + dxSparkline(methodName: string, ...params: any[]): any; + dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; +} diff --git a/devextreme/devextreme.d.ts b/devextreme/devextreme.d.ts index df967b19f3..3a7d42e05a 100644 --- a/devextreme/devextreme.d.ts +++ b/devextreme/devextreme.d.ts @@ -1,11 +1,11 @@ -// Type definitions for DevExtreme 15.2.7 +// Type definitions for DevExtreme 15.2.9 // Project: http://js.devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare namespace DevExpress { +declare module DevExpress { /** A mixin that provides a capability to fire and subscribe to events. */ export interface EventsMixin { /** Subscribes to a specified event. */ @@ -427,6 +427,9 @@ declare namespace DevExpress { /** A handler for the loadError event. */ onLoadError?: (e?: Error) => void; } + export interface OperationPromise extends JQueryPromise { + operationId: number; + } /** An object that provides access to a data web service or local data storage for collection container widgets. */ export class DataSource implements EventsMixin { constructor(url: string); @@ -454,9 +457,9 @@ declare namespace DevExpress { /** Returns the key expression. */ key(): any; /** Starts loading data. */ - load(): JQueryPromise>; + load(): OperationPromise>; /** Clears currently loaded DataSource items and calls the load() method. */ - reload(): JQueryPromise>; + reload(): OperationPromise>; /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ loadOptions(): Object; /** Returns the current pageSize option value. */ @@ -499,6 +502,7 @@ declare namespace DevExpress { store(): Store; /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ totalCount(): number; + cancel(operationId: number): boolean; on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; on(eventName: "changed", eventHandler: () => void): DataSource; @@ -831,7 +835,7 @@ declare namespace DevExpress { export function registerPalette(paletteName: string, palette: Object): void; } } -declare namespace DevExpress.ui { +declare module DevExpress.ui { export interface dxValidatorOptions extends DOMComponentOptions { /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ validationRules?: Array; @@ -1369,7 +1373,7 @@ declare namespace DevExpress.ui { constructor(element: Element, options?: dxMultiViewOptions); } export interface dxMapOptions extends WidgetOptions { - /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route or when creating a widget if it initially contains markers or routes. */ + /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route, or when creating a widget if it initially contains markers or routes. */ autoAdjust?: boolean; center?: { /** The latitude location displayed in the center of the widget. */ @@ -2157,7 +2161,7 @@ declare namespace DevExpress.ui { requiredMark?: string; /** The text displayed for optional fields. */ optionalMark?: string; - /** Specifies the message that is shown for end-users a required field value is not specified. */ + /** Specifies the message that is shown for end-users if a required field value is not specified. */ requiredMessage?: string; /** Specifies whether or not the total validation summary is displayed on the form. */ showValidationSummary?: boolean; @@ -2406,10 +2410,10 @@ interface JQuery { dxForm(options: "instance"): DevExpress.ui.dxForm; dxForm(options: string): any; dxForm(options: string, ...params: any[]): any; - dxForm(options: DevExpress.ui.dxForm): JQuery; + dxForm(options: DevExpress.ui.dxFormOptions): JQuery; } -declare namespace DevExpress.ui { +declare module DevExpress.ui { export interface dxTileViewOptions extends CollectionWidgetOptions { /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ activeStateEnabled?: boolean; @@ -2646,7 +2650,7 @@ interface JQuery { dxDropDownMenu(options: string, ...params: any[]): any; dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; } -declare namespace DevExpress.data { +declare module DevExpress.data { export interface XmlaStoreOptions { /** The HTTP address to an XMLA OLAP server. */ url?: string; @@ -2693,11 +2697,11 @@ declare namespace DevExpress.data { groupName?: string; /** The index of the field within a group. */ groupIndex?: number; - /** Specifies the initial sort order of field values. */ + /** Specifies the sort order of field values. */ sortOrder?: string; /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ sortBy?: string; - /** Specifies the data field against which the header items of this field should be sorted. */ + /** Sorts the header items of this field by the summary values of another field. */ sortBySummaryField?: string; /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ sortBySummaryPath?: Array; @@ -2843,7 +2847,7 @@ declare namespace DevExpress.data { off(eventName: string, eventHandler: Function): PivotGridDataSource; } } -declare namespace DevExpress.ui { +declare module DevExpress.ui { export interface dxSchedulerOptions extends WidgetOptions { /** Specifies a date displayed on the current scheduler view by default. */ currentDate?: Date; @@ -2873,7 +2877,7 @@ declare namespace DevExpress.ui { showAllDayPanel?: boolean; /** Specifies cell duration in minutes. */ cellDuration?: number; - /** Specifies the edit mode for recurrent appointments. */ + /** Specifies the edit mode for recurring appointments. */ recurrenceEditMode?: string; /** Specifies which editing operations an end-user can perform on appointments. */ editing?: { @@ -2963,10 +2967,10 @@ declare namespace DevExpress.ui { updateAppointment(target: Object, appointment: Object): void; /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ deleteAppointment(appointment: Object): void; - /** Scrolls the scheduler work space to the specified time. */ - scrollToTime(hours: number, minutes: number): void; - /** Displays the Appointment Details popup. */ - showAppointmentPopup(appointmentData: Object, createNewAppointment?: boolean): void; + /** Scrolls the scheduler work space to the specified time of the specified day. */ + scrollToTime(hours: number, minutes: number, date: Date): void; + /** Displayes the Appointment Details popup. */ + showAppointmentPopup(appointmentData: Object, createNewAppointment?: boolean, currentAppointmentData?: Object): void; } export interface dxColorBoxOptions extends dxDropDownEditorOptions { /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ @@ -3771,6 +3775,8 @@ declare namespace DevExpress.ui { summaryType?: string; /** Specifies a format for the summary item value. */ valueFormat?: string; + /** Specifies whether or not to skip empty strings, null and undefined values when calculating a summary. */ + skipEmptyValues?: boolean; }>; /** Specifies items of the total summary. */ totalItems?: Array<{ @@ -3797,7 +3803,11 @@ declare namespace DevExpress.ui { summaryType?: string; /** Specifies a format for the summary item value. */ valueFormat?: string; + /** Specifies whether or not to skip empty strings, null and undefined values when calculating a summary. */ + skipEmptyValues?: boolean; }>; + /** Specifies whether or not to skip empty strings, null and undefined values when calculating a summary. */ + skipEmptyValues?: boolean; /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ calculateCustomSummary?: (options: { component: dxDataGrid; @@ -4037,7 +4047,7 @@ declare namespace DevExpress.ui { /** The string to display as an Export to Excel file context menu item. */ exportToExcel?: string; }; - /** The Load panel configuration options. */ + /** Specifies options configuring the load panel. */ loadPanel?: { /** Enables or disables the load panel. */ enabled?: boolean; @@ -4189,7 +4199,7 @@ interface JQuery { dxScheduler(options: string, ...params: any[]): any; dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; } -declare namespace DevExpress.framework { +declare module DevExpress.framework { /** An object used to store information on the views displayed in an application. */ export class ViewCache { viewRemoved: JQueryCallback; @@ -4471,7 +4481,7 @@ declare namespace DevExpress.framework { } } } -declare namespace DevExpress.viz.core { +declare module DevExpress.viz.core { /** * Applies a theme for the entire page with several DevExtreme visualization widgets. * @deprecated Use the DevExpress.viz.currentTheme(theme) method instead. @@ -4707,7 +4717,7 @@ declare namespace DevExpress.viz.core { svg(): string; } } -declare namespace DevExpress.viz.charts { +declare module DevExpress.viz.charts { /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ export interface BaseSeries { /** Provides information about the state of the series object. */ @@ -5738,6 +5748,8 @@ declare namespace DevExpress.viz.charts { equalBarWidth?: boolean; /** Specifies a common bar width as a percentage from 0 to 1. */ barWidth?: number; + /** Forces the widget to treat negative values as zeroes. Applies to stacked-like series only. */ + negativesAsZeroes?: boolean; } export interface Legend extends AdvancedLegend { /** Specifies whether the legend is located outside or inside the chart's plot. */ @@ -5799,7 +5811,7 @@ declare namespace DevExpress.viz.charts { customizeText?: (info: { value: any; valueText: string; point: ChartPoint; }) => string; } }; - /** Specifies a default pane for the chart's series. */ + /** Specifies a default pane for the chart series. */ defaultPane?: string; /** Specifies a coefficient determining the diameter of the largest bubble. */ maxBubbleSize?: number; @@ -5956,7 +5968,7 @@ interface JQuery { dxPolarChart(methodName: string, ...params: any[]): any; dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; } -declare namespace DevExpress.viz.gauges { +declare module DevExpress.viz.gauges { export interface BaseRangeContainer { /** Specifies a range container's background color. */ backgroundColor?: string; @@ -6373,7 +6385,7 @@ interface JQuery { dxBarGauge(methodName: string, ...params: any[]): any; dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; } -declare namespace DevExpress.viz.rangeSelector { +declare module DevExpress.viz.rangeSelector { export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { /** Specifies the options for the range selector's background. */ background?: { @@ -6425,6 +6437,8 @@ declare namespace DevExpress.viz.rangeSelector { equalBarWidth?: boolean; /** Specifies a common bar width as a percentage from 0 to 1. */ barWidth?: number; + /** Forces the widget to treat negative values as zeroes. Applies to stacked-like series only. */ + negativesAsZeroes?: boolean; /** Sets the name of the palette to be used in the range selector's chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ palette?: any; /** An object defining the chart’s series. */ @@ -6667,7 +6681,7 @@ interface JQuery { dxRangeSelector(methodName: string, ...params: any[]): any; dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; } -declare namespace DevExpress.viz.map { +declare module DevExpress.viz.map { /** This section describes the fields and methods that can be used in code to manipulate the Layer object. */ export interface MapLayer { /** The name of the layer. */ @@ -7306,7 +7320,7 @@ interface JQuery { dxVectorMap(methodName: string, ...params: any[]): any; dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; } -declare namespace DevExpress.viz.sparklines { +declare module DevExpress.viz.sparklines { export interface SparklineTooltip extends viz.core.Tooltip { /** * Specifies how a tooltip is horizontally aligned relative to the graph. From bf0242c3095537ecd471e22004688bcd97292bad Mon Sep 17 00:00:00 2001 From: hellopao Date: Wed, 13 Apr 2016 09:34:38 +0800 Subject: [PATCH 0121/1506] Update koa-compress.d.ts rename the interface --- koa-compress/koa-compress.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koa-compress/koa-compress.d.ts b/koa-compress/koa-compress.d.ts index 3a6b7e09e1..c4cd2af582 100644 --- a/koa-compress/koa-compress.d.ts +++ b/koa-compress/koa-compress.d.ts @@ -20,7 +20,7 @@ declare module "koa-compress" { import * as Koa from "koa"; import * as zlib from "zlib"; - interface ICompressOptions extends zlib.ZlibOptions { + interface CompressOptions extends zlib.ZlibOptions { /** * An optional function that checks the response content type to decide whether to compress. By default, it uses compressible. */ @@ -35,7 +35,7 @@ declare module "koa-compress" { /** * Compress middleware for Koa */ - function compress(options?: ICompressOptions): { (ctx: Koa.Context, next?: () => any): any }; + function compress(options?: CompressOptions): { (ctx: Koa.Context, next?: () => any): any }; export = compress; } From d0d3a04eadb51b6c725d4163c0e51c7dfa9e5d11 Mon Sep 17 00:00:00 2001 From: cw882 Date: Wed, 13 Apr 2016 16:17:34 +0100 Subject: [PATCH 0122/1506] Update pathjs.d.ts Typo. Changed rescure to rescue --- pathjs/pathjs.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pathjs/pathjs.d.ts b/pathjs/pathjs.d.ts index dd81115df7..6b6193b222 100644 --- a/pathjs/pathjs.d.ts +++ b/pathjs/pathjs.d.ts @@ -35,7 +35,7 @@ interface IPath { root(path: string): void; - rescure(fn: Function): void; + rescue(fn: Function): void; history: IPathHistory; @@ -50,4 +50,4 @@ interface IPath { routes: IPathRoutes } -declare var Path: IPath; \ No newline at end of file +declare var Path: IPath; From 65349c521af7101550c1cfa4b00f242d56300c9c Mon Sep 17 00:00:00 2001 From: fernandocanocapdepon Date: Thu, 14 Apr 2016 08:11:41 +0200 Subject: [PATCH 0123/1506] Object like parameter in Bitmap contructor --- easeljs/easeljs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easeljs/easeljs.d.ts b/easeljs/easeljs.d.ts index a76e72b350..3ddeabdef9 100644 --- a/easeljs/easeljs.d.ts +++ b/easeljs/easeljs.d.ts @@ -43,7 +43,7 @@ declare namespace createjs { export class Bitmap extends DisplayObject { - constructor(imageOrUrl: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | string); + constructor(imageOrUrl: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | Object | string); // properties image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement; From 953909b32fd3f372845d719f6cfa1979f7757566 Mon Sep 17 00:00:00 2001 From: "Remo H. Jansen" Date: Fri, 15 Apr 2016 02:00:20 +0100 Subject: [PATCH 0124/1506] Fixed issue in type definitions --- redux-immutable/redux-immutable.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/redux-immutable/redux-immutable.d.ts b/redux-immutable/redux-immutable.d.ts index 21c9096846..df0f3745af 100644 --- a/redux-immutable/redux-immutable.d.ts +++ b/redux-immutable/redux-immutable.d.ts @@ -3,6 +3,8 @@ // Definitions by: Pedro Pereira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + declare module "redux-immutable" { - export function combineReducers(reducers : Object): Object; -} \ No newline at end of file + export function combineReducers(reducers : Object): Redux.Reducer; +} From 7879e9ca3fef01d7169590126b080cfd5f940c04 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Sun, 17 Apr 2016 18:14:51 +0300 Subject: [PATCH 0125/1506] Create grid.d.ts --- gijgo/grid.d.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 gijgo/grid.d.ts diff --git a/gijgo/grid.d.ts b/gijgo/grid.d.ts new file mode 100644 index 0000000000..5a5faf4840 --- /dev/null +++ b/gijgo/grid.d.ts @@ -0,0 +1,4 @@ +// Type definitions for Gijgo v0.6.2 +// Project: http://gijgo.com +// Definitions by: Atanas Atanasov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 2fa4349bcc080ff6e8ca2ad6fbe022244839b46a Mon Sep 17 00:00:00 2001 From: gcroteau Date: Wed, 20 Apr 2016 16:11:22 -0400 Subject: [PATCH 0126/1506] Changed declare namespace turf to declare module turf --- turf/turf.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turf/turf.d.ts b/turf/turf.d.ts index 6ed1d617a3..00ad1dbeb5 100644 --- a/turf/turf.d.ts +++ b/turf/turf.d.ts @@ -5,7 +5,7 @@ /// -declare namespace turf { +declare module turf { ////////////////////////////////////////////////////// // Aggregation ////////////////////////////////////////////////////// From 53cb2ca2928aaa65c25734b8a974c9c336bfdfa6 Mon Sep 17 00:00:00 2001 From: Luke Venn Date: Thu, 21 Apr 2016 10:39:10 +0100 Subject: [PATCH 0127/1506] Added RegExp typing to 'path' argument descriptions --- nock/nock.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nock/nock.d.ts b/nock/nock.d.ts index 208aac9b31..3319456a5e 100644 --- a/nock/nock.d.ts +++ b/nock/nock.d.ts @@ -22,28 +22,45 @@ declare module "nock" { export interface Scope { get(path: string, data?: string): Scope; + get(path: RegExp, data?: string): Scope; post(path: string, data?: string): Scope; post(path: string, data?: Object): Scope; post(path: string, regex?: RegExp): Scope; + post(path: RegExp, data?: string): Scope; + post(path: RegExp, data?: Object): Scope; + post(path: RegExp, regex?: RegExp): Scope; patch(path: string, data?: string): Scope; patch(path: string, data?: Object): Scope; patch(path: string, regex?: RegExp): Scope; + patch(path: RegExp, data?: string): Scope; + patch(path: RegExp, data?: Object): Scope; + patch(path: RegExp, regex?: RegExp): Scope; put(path: string, data?: string): Scope; put(path: string, data?: Object): Scope; put(path: string, regex?: RegExp): Scope; + put(path: RegExp, data?: string): Scope; + put(path: RegExp, data?: Object): Scope; + put(path: RegExp, regex?: RegExp): Scope; head(path: string): Scope; + head(path: RegExp): Scope; delete(path: string, data?: string): Scope; delete(path: string, data?: Object): Scope; delete(path: string, regex?: RegExp): Scope; + delete(path: RegExp, data?: string): Scope; + delete(path: RegExp, data?: Object): Scope; + delete(path: RegExp, regex?: RegExp): Scope; merge(path: string, data?: string): Scope; merge(path: string, data?: Object): Scope; merge(path: string, regex?: RegExp): Scope; + merge(path: RegExp, data?: string): Scope; + merge(path: RegExp, data?: Object): Scope; + merge(path: RegExp, regex?: RegExp): Scope; query(params: any): Scope; query(acceptAnyParams: boolean): Scope; @@ -51,6 +68,9 @@ declare module "nock" { intercept(path: string, verb: string, body?: string, options?: any): Scope; intercept(path: string, verb: string, body?: Object, options?: any): Scope; intercept(path: string, verb: string, body?: RegExp, options?: any): Scope; + intercept(path: RegExp, verb: string, body?: string, options?: any): Scope; + intercept(path: RegExp, verb: string, body?: Object, options?: any): Scope; + intercept(path: RegExp, verb: string, body?: RegExp, options?: any): Scope; reply(responseCode: number, body?: string, headers?: Object): Scope; reply(responseCode: number, body?: Object, headers?: Object): Scope; From 883efbaf351963ee373edd7cfeb55b7864eea688 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 22 Apr 2016 23:33:16 +0930 Subject: [PATCH 0128/1506] added material-design-lite definition and tests --- .../material-design-lite-tests.ts | 38 ++++++ .../material-design-lite.d.ts | 128 ++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 material-design-lite/material-design-lite-tests.ts create mode 100644 material-design-lite/material-design-lite.d.ts diff --git a/material-design-lite/material-design-lite-tests.ts b/material-design-lite/material-design-lite-tests.ts new file mode 100644 index 0000000000..afbf5faf15 --- /dev/null +++ b/material-design-lite/material-design-lite-tests.ts @@ -0,0 +1,38 @@ +// Test file for Google Maps JavaScript API Definition file +/// + +componentHandler.upgradeDom(); +componentHandler.upgradeDom('MaterialButton'); +componentHandler.upgradeDom('MaterialButton', 'mdl-button'); + +componentHandler.upgradeElement(document.createElement('div')); +componentHandler.upgradeElement(document.getElementById('id')); +componentHandler.upgradeElement(document.getElementsByTagName('button')[0], 'MaterialButton'); + +componentHandler.upgradeElements(document.getElementsByTagName('div')); +componentHandler.upgradeElements([document.createElement('div')]); +componentHandler.upgradeElements(document.querySelectorAll('div.mdl-button')); + +componentHandler.upgradeAllRegistered(); + +componentHandler.registerUpgradedCallback('MaterialButton', function(element : HTMLElement) {}); + +componentHandler.register({ + constructor: function(element: HTMLElement) {}, + classAsString: 'MaterialCheese', + cssClass: 'mdl-cheese' +}); +componentHandler.register({ + constructor: function(element: HTMLElement) {}, + classAsString: 'MaterialFoo', + cssClass: 'mdl-foo', + widget: true +}); +componentHandler.register({ + constructor: function(element: HTMLElement) {}, + classAsString: 'MaterialFoo', + cssClass: 'mdl-foo', + widget: 'FooBar' +}); + +componentHandler.downgradeElements(document.querySelectorAll('div')); diff --git a/material-design-lite/material-design-lite.d.ts b/material-design-lite/material-design-lite.d.ts new file mode 100644 index 0000000000..11b93ea792 --- /dev/null +++ b/material-design-lite/material-design-lite.d.ts @@ -0,0 +1,128 @@ +// Type definitions for material-design-lite v1.1.3 +// Project: https://getmdl.io +// Definitions by: Brad Zacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module MaterialDesignLite { + interface ComponentHandler { + /** + * Searches existing DOM for elements of our component type and upgrades them + * if they have not already been upgraded. + */ + upgradeDom() : void; + /** + * Searches existing DOM for elements of our component type and upgrades them + * if they have not already been upgraded. + * + * @param {string} jsClass the programatic name of the element class we + * need to create a new instance of. + */ + upgradeDom(jsClass : string) : void; + /** + * Searches existing DOM for elements of our component type and upgrades them + * if they have not already been upgraded. + * + * @param {string} jsClass the programatic name of the element class we + * need to create a new instance of. + * @param {string} cssClass the name of the CSS class elements of this + * type will have. + */ + upgradeDom(jsClass : string, cssClass : string) : void; + + /** + * Upgrades a specific element rather than all in the DOM. + * + * @param {!Element} element The element we wish to upgrade. + */ + upgradeElement(element : HTMLElement) : void; + /** + * Upgrades a specific element rather than all in the DOM. + * + * @param {!Element} element The element we wish to upgrade. + * @param {string} jsClass Optional name of the class we want to upgrade + * the element to. + */ + upgradeElement(element : HTMLElement, jsClass : string) : void; + + /** + * Upgrades a specific list of elements rather than all in the DOM. + * + * @param {!Element} elements + * The elements we wish to upgrade. + */ + upgradeElements(elements : HTMLElement) : void; + /** + * Upgrades a specific list of elements rather than all in the DOM. + * + * @param {!Array} elements + * The elements we wish to upgrade. + */ + upgradeElements(elements : Array) : void; + /** + * Upgrades a specific list of elements rather than all in the DOM. + * + * @param {!NodeList} elements + * The elements we wish to upgrade. + */ + upgradeElements(elements : NodeList) : void; + /** + * Upgrades a specific list of elements rather than all in the DOM. + * + * @param {!HTMLCollection} elements + * The elements we wish to upgrade. + */ + upgradeElements(elements : HTMLCollection) : void; + + /** + * Upgrades all registered components found in the current DOM. This is + * automatically called on window load. + */ + upgradeAllRegistered() : void; + + /** + * Allows user to be alerted to any upgrades that are performed for a given + * component type + * + * @param {string} jsClass The class name of the MDL component we wish + * to hook into for any upgrades performed. + * @param {function(!HTMLElement)} callback The function to call upon an + * upgrade. This function should expect 1 parameter - the HTMLElement which + * got upgraded. + */ + registerUpgradedCallback(jsClass : string, callback : (element : HTMLElement) => any) : void; + + /** + * Registers a class for future use and attempts to upgrade existing DOM. + * + * @param {componentHandler.ComponentConfigPublic} config the registration configuration + */ + register(config : ComponentConfigPublic) : void; + + /** + * Downgrade either a given node, an array of nodes, or a NodeList. + * + * @param {!Node} nodes The list of nodes. + */ + downgradeElements(nodes : Node) : void; + /** + * Downgrade either a given node, an array of nodes, or a NodeList. + * + * @param {!Array} nodes The list of nodes. + */ + downgradeElements(nodes : Array) : void; + /** + * Downgrade either a given node, an array of nodes, or a NodeList. + * + * @param {!NodeList} nodes The list of nodes. + */ + downgradeElements(nodes : NodeList) : void; + } + interface ComponentConfigPublic { + constructor(element : HTMLElement) : void; + classAsString : string; + cssClass : string; + widget? : string | boolean; + } +} + +declare var componentHandler : MaterialDesignLite.ComponentHandler; \ No newline at end of file From fc60df8e926bc640727dd347de64360debda5417 Mon Sep 17 00:00:00 2001 From: yihuax Date: Fri, 22 Apr 2016 14:10:53 -0700 Subject: [PATCH 0129/1506] Updated Word APIs with correct version numbers and V1.3 Beta APIs --- office-js/office-js.d.ts | 2477 ++++++++++++++++++++++++++++++++++---- 1 file changed, 2223 insertions(+), 254 deletions(-) diff --git a/office-js/office-js.d.ts b/office-js/office-js.d.ts index 6761ab646c..e855776380 100644 --- a/office-js/office-js.d.ts +++ b/office-js/office-js.d.ts @@ -8596,13 +8596,12 @@ declare namespace Excel { function run(batch: (context: Excel.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; } - declare namespace Word { /** * * The Application object. * - * [Api set: WordApi ] + * [Api set: WordApiDesktop 1.3 Beta] */ class Application extends OfficeExtension.ClientObject { /** @@ -8611,9 +8610,13 @@ declare namespace Word { * * @param base64File Optional. The base64 encoded .docx file. The default value is null. * - * [Api set: WordApi ] + * [Api set: WordApiDesktop 1.3 Beta] */ - createDoc(base64File?: string): Word.Document; + createDocument(base64File?: string): Word.Document; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Create a new instance of Word.Application object */ @@ -8623,85 +8626,124 @@ declare namespace Word { * * Represents the body of a document or a section. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class Body extends OfficeExtension.ClientObject { private m_contentControls; private m_font; private m_inlinePictures; + private m_lists; private m_paragraphs; + private m_parentBody; private m_parentContentControl; private m_style; + private m_tables; private m_text; + private m_type; private m__ReferenceId; /** * - * Gets the collection of rich text content control objects that are in the body. Read-only. + * Gets the collection of rich text content control objects in the body. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ contentControls: Word.ContentControlCollection; /** * - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. Read-only. + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ font: Word.Font; /** * - * Gets the collection of inlinePicture objects that are in the body. The collection does not include floating images. Read-only. + * Gets the collection of inlinePicture objects in the body. The collection does not include floating images. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ inlinePictures: Word.InlinePictureCollection; /** * - * Gets the collection of paragraph objects that are in the body. Read-only. + * Gets the collection of list objects in the body. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] + */ + lists: Word.ListCollection; + /** + * + * Gets the collection of paragraph objects in the body. Read-only. + * + * [Api set: WordApi 1.1] */ paragraphs: Word.ParagraphCollection; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentBody: Word.Body; /** * * Gets the content control that contains the body. Returns null if there isn't a parent content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; + /** + * + * Gets the collection of table objects in the body. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + tables: Word.TableCollection; /** * * Gets or sets the style used for the body. This is the name of the pre-installed or custom style. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ style: string; /** * * Gets the text of the body. Use the insertText method to insert text. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ text: string; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + type: string; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Clears the contents of the body object. The user can perform the undo operation on the cleared content. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ clear(): void; /** * * Gets the HTML representation of the body object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * * Gets the OOXML (Office Open XML) representation of the body object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** @@ -8710,7 +8752,7 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ getRange(rangeLocation?: string): Word.Range; /** @@ -8720,14 +8762,14 @@ declare namespace Word { * @param breakType Required. The break type to add to the body. * @param insertLocation Required. The value can be 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertBreak(breakType: string, insertLocation: string): void; /** * * Wraps the body object with a Rich Text content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertContentControl(): Word.ContentControl; /** @@ -8737,7 +8779,7 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; /** @@ -8747,7 +8789,7 @@ declare namespace Word { * @param html Required. The HTML to be inserted in the document. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertHtml(html: string, insertLocation: string): Word.Range; /** @@ -8757,7 +8799,7 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted in the body. * @param insertLocation Required. The value can be 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; /** @@ -8767,7 +8809,7 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertOoxml(ooxml: string, insertLocation: string): Word.Range; /** @@ -8777,9 +8819,21 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Start' or 'End'. + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Start' or 'End'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** * * Inserts text into the body at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -8787,7 +8841,7 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertText(text: string, insertLocation: string): Word.Range; /** @@ -8797,7 +8851,7 @@ declare namespace Word { * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; @@ -8815,31 +8869,25 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ select(selectionMode?: string): void; - /** - * - * Splits the body into child ranges by using delimiters. - * - * @param delimiters Required. The delimiters as an array of strings. - * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates the paragraph boundaries are also used as delimiters. - * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimWhitespace Optional. Indicates whether to trim whitespace characters (spaces, tabs and column breaks) from the start and end of the ranges returned in the range collection. Default is false which indicates that whitespace characters at the start and end of the ranges are included in the range collection. - * - * [Api set: WordApi ] + _KeepReference(): void; + /** Handle results returned from the document + * @private */ - splitTextRanges(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimWhitespace?: boolean): Word.RangeCollection; + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Body; + _initReferenceId(value: string): void; } /** * * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class ContentControl extends OfficeExtension.ClientObject { private m_appearance; @@ -8850,11 +8898,16 @@ declare namespace Word { private m_font; private m_id; private m_inlinePictures; + private m_lists; private m_paragraphs; private m_parentContentControl; + private m_parentTable; + private m_parentTableCell; private m_placeholderText; private m_removeWhenEdited; private m_style; + private m_subtype; + private m_tables; private m_tag; private m_text; private m_title; @@ -8864,126 +8917,168 @@ declare namespace Word { * * Gets the collection of content control objects in the content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ contentControls: Word.ContentControlCollection; /** * * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ font: Word.Font; /** * * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the collection of list objects in the content control. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + lists: Word.ListCollection; /** * * Get the collection of paragraph objects in the content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ paragraphs: Word.ParagraphCollection; /** * * Gets the content control that contains the content control. Returns null if there isn't a parent content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; + /** + * + * Gets the table that contains the content control. Returns null if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the table cell that contains the content control. Returns null if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTableCell: Word.TableCell; + /** + * + * Gets the collection of table objects in the content control. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + tables: Word.TableCollection; /** * * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ appearance: string; /** * * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ cannotDelete: boolean; /** * * Gets or sets a value that indicates whether the user can edit the contents of the content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ cannotEdit: boolean; /** * - * Gets or sets the color of the content control. Color is set in '#RRGGBB' format or by using the color name. + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ color: string; /** * * Gets an integer that represents the content control identifier. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ id: number; /** * * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ placeholderText: string; /** * * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ removeWhenEdited: boolean; /** * * Gets or sets the style used for the content control. This is the name of the pre-installed or custom style. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ style: string; + /** + * + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + subtype: string; /** * * Gets or sets a tag to identify a content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ tag: string; /** * * Gets the text of the content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ text: string; /** * * Gets or sets the title for a content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ title: string; /** * * Gets the content control type. Only rich text content controls are supported currently. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ type: string; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Clears the contents of the content control. The user can perform the undo operation on the cleared content. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ clear(): void; /** @@ -8992,21 +9087,21 @@ declare namespace Word { * * @param keepContent Required. Indicates whether the content should be deleted with the content control. If keepContent is set to true, the content is not deleted. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ delete(keepContent: boolean): void; /** * * Gets the HTML representation of the content control object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * * Gets the Office Open XML (OOXML) representation of the content control object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** @@ -9015,17 +9110,27 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ getRange(rangeLocation?: string): Word.Range; /** * - * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. + * Gets the text ranges in the content control by using punctuation marks and/or space character. + * + * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + * + * [Api set: WordApi 1.3 Beta] + */ + getTextRanges(punctuationMarks: Array, trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. * * @param breakType Required. Type of break. * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertBreak(breakType: string, insertLocation: string): void; /** @@ -9033,9 +9138,9 @@ declare namespace Word { * Inserts a document into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. * * @param base64File Required. The base64 encoded content of a .docx file. - * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; /** @@ -9043,9 +9148,9 @@ declare namespace Word { * Inserts HTML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. * * @param html Required. The HTML to be inserted in to the content control. - * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertHtml(html: string, insertLocation: string): Word.Range; /** @@ -9053,9 +9158,9 @@ declare namespace Word { * Inserts an inline picture into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. * * @param base64EncodedImage Required. The base64 encoded image to be inserted in the content control. - * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; /** @@ -9063,9 +9168,9 @@ declare namespace Word { * Inserts OOXML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. * * @param ooxml Required. The OOXML to be inserted in to the content control. - * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertOoxml(ooxml: string, insertLocation: string): Word.Range; /** @@ -9073,19 +9178,31 @@ declare namespace Word { * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. * * @param paragraphText Required. The paragrph text to be inserted. - * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns into, or next to, a content control. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** * * Inserts text into the content control at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. * * @param text Required. The text to be inserted in to the content control. - * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. + * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertText(text: string, insertLocation: string): Word.Range; /** @@ -9095,7 +9212,7 @@ declare namespace Word { * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; @@ -9113,7 +9230,7 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ select(selectionMode?: string): void; /** @@ -9121,36 +9238,57 @@ declare namespace Word { * Splits the content control into child ranges by using delimiters. * * @param delimiters Required. The delimiters as an array of strings. - * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates the paragraph boundaries are also used as delimiters. + * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimWhitespace Optional. Indicates whether to trim whitespace characters (spaces, tabs and column breaks) from the start and end of the ranges returned in the range collection. Default is false which indicates that whitespace characters at the start and end of the ranges are included in the range collection. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ - splitTextRanges(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimWhitespace?: boolean): Word.RangeCollection; + split(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControl; + _initReferenceId(value: string): void; } /** * * Contains a collection of ContentControl objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class ContentControlCollection extends OfficeExtension.ClientObject { + private m_first; private m__ReferenceId; private m__items; + /** + * + * Gets the first content control in this collection. Read-only. + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + first: Word.ContentControl; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Gets a content control by its identifier. * * @param id Required. A content control identifier. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getById(id: number): Word.ContentControl; /** @@ -9159,7 +9297,7 @@ declare namespace Word { * * @param tag Required. A tag set on a content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getByTag(tag: string): Word.ContentControlCollection; /** @@ -9168,28 +9306,43 @@ declare namespace Word { * * @param title Required. The title of a content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getByTitle(title: string): Word.ContentControlCollection; + /** + * + * Gets the content controls that have the specified types and/or subtypes. + * + * @param types Required. An array of content control types and/or subtypes. + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + getByTypes(types: Array): Word.ContentControlCollection; /** * * Gets a content control by its index in the collection. * * @param index The index * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getItem(index: number): Word.ContentControl; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControlCollection; + _initReferenceId(value: string): void; } /** * * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class Document extends OfficeExtension.ClientObject { private m_body; @@ -9199,63 +9352,80 @@ declare namespace Word { private m__ReferenceId; /** * - * Gets the body of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ body: Word.Body; /** * - * Gets the collection of content control objects that are in the current document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * Gets the collection of content control objects in the current document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ contentControls: Word.ContentControlCollection; /** * - * Gets the collection of section objects that are in the document. Read-only. + * Gets the collection of section objects in the document. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ sections: Word.SectionCollection; /** * * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ saved: boolean; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Gets the current selection of the document. Multiple selections are not supported. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getSelection(): Word.Range; /** * * Open the document. * - * [Api set: WordApi ] + * [Api set: WordApiDesktop 1.3 Beta] */ open(): void; /** * * Saves the document. This will use the Word default file naming convention if the document has not been saved before. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ save(): void; + _GetObjectByReferenceId(referenceId: string): OfficeExtension.ClientResult; + _GetObjectTypeNameByReferenceId(referenceId: string): OfficeExtension.ClientResult; + _KeepReference(): void; + _RemoveAllReferences(): void; + _RemoveReference(referenceId: string): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Document; + _initReferenceId(value: string): void; } /** * * Represents a font. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class Font extends OfficeExtension.ClientObject { private m_bold; @@ -9274,89 +9444,102 @@ declare namespace Word { * * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ bold: boolean; /** * * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ color: string; /** * * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. * - * [Api set: WordApi ] + * [Api set: WordApiDesktop 1.3 Beta] */ doubleStrikeThrough: boolean; /** * * Gets or sets the highlight color for the specified font. You can provide the value as either in the '#RRGGBB' format or the color name. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ highlightColor: string; /** * * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ italic: boolean; /** * * Gets or sets a value that represents the name of the font. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ name: string; /** * * Gets or sets a value that represents the font size in points. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ size: number; /** * * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ strikeThrough: boolean; /** * * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ subscript: boolean; /** * * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ superscript: boolean; /** * * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ underline: string; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Font; + _initReferenceId(value: string): void; } /** * * Represents an inline picture. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class InlinePicture extends OfficeExtension.ClientObject { private m_altTextDescription; @@ -9365,86 +9548,124 @@ declare namespace Word { private m_hyperlink; private m_imageFormat; private m_lockAspectRatio; + private m_next; private m_paragraph; private m_parentContentControl; + private m_parentTable; + private m_parentTableCell; private m_width; private m__Id; private m__ReferenceId; + /** + * + * Gets the next inline image. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + next: Word.InlinePicture; /** * * Gets the paragraph that contains the inline image. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ paragraph: Word.Paragraph; /** * * Gets the content control that contains the inline image. Returns null if there isn't a parent content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; + /** + * + * Gets the table that contains the inline image. Returns null if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the table cell that contains the inline image. Returns null if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTableCell: Word.TableCell; /** * * Gets or sets a string that represents the alternative text associated with the inline image * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ altTextDescription: string; /** * * Gets or sets a string that contains the title for the inline image. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ altTextTitle: string; /** * * Gets or sets a number that describes the height of the inline image. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ height: number; /** * * Gets or sets the hyperlink associated with the inline image. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ hyperlink: string; /** * * Gets the format of the inline image. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ imageFormat: string; /** * * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ lockAspectRatio: boolean; /** * * Gets or sets a number that describes the width of the inline image. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ width: number; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Deletes the inline picture from the document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ delete(): void; /** * * Gets the base64 encoded string representation of the inline image. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getBase64ImageSrc(): OfficeExtension.ClientResult; /** @@ -9453,7 +9674,7 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ getRange(rangeLocation?: string): Word.Range; /** @@ -9463,14 +9684,14 @@ declare namespace Word { * @param breakType Required. The break type to add. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertBreak(breakType: string, insertLocation: string): void; /** * * Wraps the inline picture with a rich text content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertContentControl(): Word.ContentControl; /** @@ -9480,7 +9701,7 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; /** @@ -9490,7 +9711,7 @@ declare namespace Word { * @param html Required. The HTML to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertHtml(html: string, insertLocation: string): Word.Range; /** @@ -9500,7 +9721,7 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; /** @@ -9510,7 +9731,7 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertOoxml(ooxml: string, insertLocation: string): Word.Range; /** @@ -9520,7 +9741,7 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; /** @@ -9530,7 +9751,7 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertText(text: string, insertLocation: string): Word.Range; /** @@ -9539,35 +9760,257 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ select(selectionMode?: string): void; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePicture; + _initReferenceId(value: string): void; } /** * * Contains a collection of [inlinePicture](inlinePicture.md) objects. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class InlinePictureCollection extends OfficeExtension.ClientObject { + private m_first; private m__ReferenceId; private m__items; + /** + * + * Gets the first inline image in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.InlinePicture; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets an inline picture object by its index in the collection. + * + * @param index A number that identifies the index location of an inline picture object. + * + * [Api set: WordApi 1.1] + */ + _GetItem(index: number): Word.InlinePicture; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePictureCollection; + _initReferenceId(value: string): void; + } + /** + * + * Contains a collection of [paragraph](paragraph.md) objects. + * + * [Api set: WordApi 1.3 Beta] + */ + class List extends OfficeExtension.ClientObject { + private m_format; + private m_id; + private m__ReferenceId; + /** + * + * An object that represents the list format. + * + * [Api set: WordApi 1.3 Beta] + */ + format: Word.ListFormat; + /** + * + * Gets the list's id. + * + * [Api set: WordApi 1.3 Beta] + */ + id: number; + _ReferenceId: string; + /** + * + * Gets the paragraphs in the list. + * + * @param topLevelOnly Optional. Indicates whether to get all paragraphs, or just the top level paragraphs. The default is false that specifies to get all paragraphs. + * + * [Api set: WordApi 1.3 Beta] + */ + getParagraphs(topLevelOnly?: boolean): Word.ParagraphCollection; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before' or 'After'. + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before' or 'After'. + * + * [Api set: WordApi 1.3 Beta] + */ + insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.List; + _initReferenceId(value: string): void; + } + /** + * + * Contains a collection of [list](list.md) objects. + * + * [Api set: WordApi 1.3 Beta] + */ + class ListCollection extends OfficeExtension.ClientObject { + private m_first; + private m__ReferenceId; + private m__items; + /** + * + * Gets the first list in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.List; + /** Gets the loaded child items in this collection. */ + items: Array; + _ReferenceId: string; + /** + * + * Gets a list by its identifier. + * + * @param id Required. A list identifier. + * + * [Api set: WordApi 1.3 Beta] + */ + getById(id: number): Word.List; + /** + * + * Gets a list object by its index in the collection. + * + * @param index A number that identifies the index location of a list object. + * + * [Api set: WordApi 1.3 Beta] + */ + _GetItem(index: number): Word.List; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListCollection; + _initReferenceId(value: string): void; + } + /** + * + * Represents a list's format. + * + * [Api set: WordApi 1.3 Beta] + */ + class ListFormat extends OfficeExtension.ClientObject { + private m_levelTypes; + private m__ReferenceId; + /** + * + * Gets all 9 level types in the list. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + levelTypes: Array; + _ReferenceId: string; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListFormat; + _initReferenceId(value: string): void; + } + /** + * + * Represents the paragraph list item format. + * + * [Api set: WordApi 1.3 Beta] + */ + class ListItem extends OfficeExtension.ClientObject { + private m_listString; + private m_siblingIndex; + private m__ReferenceId; + /** + * + * Gets the list item bullet or number as a string. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + listString: string; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + siblingIndex: number; + _ReferenceId: string; + /** + * + * Gets the list item parent, or the closest ancestor if the parent does not exist. + * + * @param parentOnly Optional. Specified only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + getAncestor(parentOnly?: boolean): Word.Paragraph; + /** + * + * Gets all descendant list items of the list item. + * + * @param directChildrenOnly Optional. Specified only the list item's direct children will be returned. The default is false that indicates to get all descendant items. + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListItem; + _initReferenceId(value: string): void; } /** * * Represents a single paragraph in a selection, range, content control, or document body. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { private m_alignment; @@ -9579,161 +10022,239 @@ declare namespace Word { private m_lineSpacing; private m_lineUnitAfter; private m_lineUnitBefore; + private m_list; + private m_listItem; private m_listLevel; + private m_next; private m_outlineLevel; + private m_parentBody; private m_parentContentControl; + private m_parentTable; + private m_parentTableCell; + private m_previous; private m_rightIndent; private m_spaceAfter; private m_spaceBefore; private m_style; + private m_tableNestingLevel; private m_text; private m__Id; private m__ReferenceId; /** * - * Gets the collection of content control objects that are in the paragraph. Read-only. + * Gets the collection of content control objects in the paragraph. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ contentControls: Word.ContentControlCollection; /** * * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ font: Word.Font; /** * - * Gets the collection of inlinePicture objects that are in the paragraph. The collection does not include floating images. Read-only. + * Gets the collection of inlinePicture objects in the paragraph. The collection does not include floating images. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the List to which this paragraph belongs. Returns null if the paragraph is not in a list. + * + * [Api set: WordApi 1.3 Beta] + */ + list: Word.List; + /** + * + * Gets the ListItem for the paragraph. Returns null if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3 Beta] + */ + listItem: Word.ListItem; + /** + * + * Gets the next paragraph. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + next: Word.Paragraph; + /** + * + * Gets the parent body of the paragraph. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentBody: Word.Body; /** * * Gets the content control that contains the paragraph. Returns null if there isn't a parent content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; + /** + * + * Gets the table that contains the paragraph. Returns null if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the table cell that contains the paragraph. Returns null if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTableCell: Word.TableCell; + /** + * + * Gets the previous paragraph. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + previous: Word.Paragraph; /** * * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ alignment: string; /** * * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ firstLineIndent: number; /** * * Gets or sets the left indent value, in points, for the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ leftIndent: number; /** * * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ lineSpacing: number; /** * * Gets or sets the amount of spacing, in grid lines. after the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ lineUnitAfter: number; /** * * Gets or sets the amount of spacing, in grid lines, before the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ lineUnitBefore: number; /** * - * Gets or sets the list level of the paragraph. + * Gets or sets the list level of the paragraph. Set to -1 to make the paragraph appear outside of a list. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ listLevel: number; /** * * Gets or sets the outline level for the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApiDesktop 1.3 Beta] */ outlineLevel: number; /** * * Gets or sets the right indent value, in points, for the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ rightIndent: number; /** * * Gets or sets the spacing, in points, after the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ spaceAfter: number; /** * * Gets or sets the spacing, in points, before the paragraph. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ spaceBefore: number; /** * * Gets or sets the style used for the paragraph. This is the name of the pre-installed or custom style. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ style: string; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + tableNestingLevel: number; /** * * Gets the text of the paragraph. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ text: string; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ clear(): void; /** * * Deletes the paragraph and its content from the document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ delete(): void; /** * * Gets the HTML representation of the paragraph object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; /** * * Gets the Office Open XML (OOXML) representation of the paragraph object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** @@ -9742,9 +10263,19 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ getRange(rangeLocation?: string): Word.Range; + /** + * + * Gets the text ranges in the paragraph by using punctuation marks and/or space character. + * + * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + * + * [Api set: WordApi 1.3 Beta] + */ + getTextRanges(punctuationMarks: Array, trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. @@ -9752,14 +10283,14 @@ declare namespace Word { * @param breakType Required. The break type to add to the document. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertBreak(breakType: string, insertLocation: string): void; /** * * Wraps the paragraph object with a rich text content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertContentControl(): Word.ContentControl; /** @@ -9769,7 +10300,7 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; /** @@ -9779,7 +10310,7 @@ declare namespace Word { * @param html Required. The HTML to be inserted in the paragraph. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertHtml(html: string, insertLocation: string): Word.Range; /** @@ -9789,7 +10320,7 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; /** @@ -9799,7 +10330,7 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted in the paragraph. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertOoxml(ooxml: string, insertLocation: string): Word.Range; /** @@ -9809,9 +10340,21 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** * * Inserts text into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start' or 'End'. @@ -9819,7 +10362,7 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertText(text: string, insertLocation: string): Word.Range; /** @@ -9829,7 +10372,7 @@ declare namespace Word { * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; @@ -9847,7 +10390,7 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ select(selectionMode?: string): void; /** @@ -9856,110 +10399,223 @@ declare namespace Word { * * @param delimiters Required. The delimiters as an array of strings. * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimWhitespace Optional. Indicates whether to trim whitespace characters (spaces, tabs and column breaks) from the start and end of the ranges returned in the range collection. Default is false which indicates that whitespace characters at the start and end of the ranges are included in the range collection. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ - splitTextRanges(delimiters: Array, trimDelimiters?: boolean, trimWhitespace?: boolean): Word.RangeCollection; + split(delimiters: Array, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Uses the paragraph to start a new list. + * + * [Api set: WordApi 1.3 Beta] + */ + startNewList(): Word.List; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Paragraph; + _initReferenceId(value: string): void; } /** * * Contains a collection of [paragraph](paragraph.md) objects. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { + private m_first; + private m_last; private m__ReferenceId; private m__items; + /** + * + * Gets the first paragraph in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.Paragraph; + /** + * + * Gets the last paragraph in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + last: Word.Paragraph; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a paragraph object by its index in the collection. + * + * @param index A number that identifies the index location of a paragraph object. + * + * [Api set: WordApi 1.1] + */ + _GetItem(index: number): Word.Paragraph; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.ParagraphCollection; + _initReferenceId(value: string): void; } /** * * Represents a contiguous area in a document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class Range extends OfficeExtension.ClientObject { private m_contentControls; private m_font; + private m_hyperlink; private m_inlinePictures; private m_isEmpty; + private m_lists; private m_paragraphs; + private m_parentBody; private m_parentContentControl; + private m_parentTable; + private m_parentTableCell; private m_style; + private m_tables; private m_text; private m__Id; private m__ReferenceId; /** * - * Gets the collection of content control objects that are in the range. Read-only. + * Gets the collection of content control objects in the range. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ contentControls: Word.ContentControlCollection; /** * * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ font: Word.Font; /** * - * Gets the collection of inline picture objects that are in the range. Read-only. + * Gets the collection of inline picture objects in the range. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ inlinePictures: Word.InlinePictureCollection; /** * - * Gets the collection of paragraph objects that are in the range. Read-only. + * Gets the collection of list objects in the range. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] + */ + lists: Word.ListCollection; + /** + * + * Gets the collection of paragraph objects in the range. Read-only. + * + * [Api set: WordApi 1.1] */ paragraphs: Word.ParagraphCollection; + /** + * + * Gets the parent body of the range. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentBody: Word.Body; /** * * Gets the content control that contains the range. Returns null if there isn't a parent content control. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ parentContentControl: Word.ContentControl; + /** + * + * Gets the table that contains the range. Returns null if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the table cell that contains the range. Returns null if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTableCell: Word.TableCell; + /** + * + * Gets the collection of table objects in the range. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + tables: Word.TableCollection; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. Existing hyperlinks in this range are deleted when you set a new hyperlink. + * + * [Api set: WordApi 1.3 Beta] + */ + hyperlink: string; /** * * Checks whether the range length is zero. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ isEmpty: boolean; /** * * Gets or sets the style used for the range. This is the name of the pre-installed or custom style. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ style: string; /** * * Gets the text of the range. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ text: string; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Clears the contents of the range object. The user can perform the undo operation on the cleared content. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ clear(): void; /** @@ -9968,14 +10624,14 @@ declare namespace Word { * * @param range Required. The range to compare with this range. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; /** * * Deletes the range and its content from the document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ delete(): void; /** @@ -9984,21 +10640,38 @@ declare namespace Word { * * @param range Required. Another range. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ expandTo(range: Word.Range): void; /** * * Gets the HTML representation of the range object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getHtml(): OfficeExtension.ClientResult; + /** + * + * Gets hyperlink child ranges within the range. + * + * [Api set: WordApi 1.3 Beta] + */ + getHyperlinkRanges(): Word.RangeCollection; + /** + * + * Gets the next text range by using punctuation marks and/or space character. + * + * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + * + * [Api set: WordApi 1.3 Beta] + */ + getNextTextRange(punctuationMarks: Array, trimSpacing?: boolean): Word.Range; /** * * Gets the OOXML representation of the range object. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getOoxml(): OfficeExtension.ClientResult; /** @@ -10007,9 +10680,19 @@ declare namespace Word { * * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ getRange(rangeLocation?: string): Word.Range; + /** + * + * Gets the text child ranges in the range by using punctuation marks and/or space character. + * + * @param punctuationMarks Required. The punctuation marks and/or space character as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + * + * [Api set: WordApi 1.3 Beta] + */ + getTextRanges(punctuationMarks: Array, trimSpacing?: boolean): Word.RangeCollection; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Replace', 'Before' or 'After'. @@ -10017,14 +10700,14 @@ declare namespace Word { * @param breakType Required. The break type to add. * @param insertLocation Required. The value can be 'Replace', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertBreak(breakType: string, insertLocation: string): void; /** * * Wraps the range object with a rich text content control. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertContentControl(): Word.ContentControl; /** @@ -10034,7 +10717,7 @@ declare namespace Word { * @param base64File Required. The base64 encoded content of a .docx file. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertFileFromBase64(base64File: string, insertLocation: string): Word.Range; /** @@ -10044,7 +10727,7 @@ declare namespace Word { * @param html Required. The HTML to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertHtml(html: string, insertLocation: string): Word.Range; /** @@ -10054,7 +10737,7 @@ declare namespace Word { * @param base64EncodedImage Required. The base64 encoded image to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.2] */ insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: string): Word.InlinePicture; /** @@ -10064,7 +10747,7 @@ declare namespace Word { * @param ooxml Required. The OOXML to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertOoxml(ooxml: string, insertLocation: string): Word.Range; /** @@ -10074,9 +10757,21 @@ declare namespace Word { * @param paragraphText Required. The paragraph text to be inserted. * @param insertLocation Required. The value can be 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; /** * * Inserts text at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before' or 'After'. @@ -10084,16 +10779,16 @@ declare namespace Word { * @param text Required. Text to be inserted. * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before' or 'After'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ insertText(text: string, insertLocation: string): Word.Range; /** * - * Shrink the range to the intersection of the range with another range. + * Shrinks the range to the intersection of the range with another range. * * @param range Required. Another range. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ intersectWith(range: Word.Range): void; /** @@ -10103,7 +10798,7 @@ declare namespace Word { * @param searchText Required. The search text. * @param searchOptions Optional. Options for the search. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ search(searchText: string, searchOptions?: Word.SearchOptions | { ignorePunct?: boolean; @@ -10121,7 +10816,7 @@ declare namespace Word { * * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ select(selectionMode?: string): void; /** @@ -10129,39 +10824,75 @@ declare namespace Word { * Splits the range into child ranges by using delimiters. * * @param delimiters Required. The delimiters as an array of strings. - * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates the paragraph boundaries are also used as delimiters. + * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimWhitespace Optional. Indicates whether to trim whitespace characters (spaces, tabs and column breaks) from the start and end of the child ranges returned in the range collection. Default is false which indicates that whitespace characters at the start and end of the child ranges are included in the range collection. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ - splitTextRanges(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimWhitespace?: boolean): Word.RangeCollection; + split(delimiters: Array, multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Range; + _initReferenceId(value: string): void; } /** * * Contains a collection of [range](range.md) objects. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ class RangeCollection extends OfficeExtension.ClientObject { + private m_first; private m__ReferenceId; private m__items; + /** + * + * Gets the first range in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.Range; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a range object by its index in the collection. + * + * @param index A number that identifies the index location of a range object. + * + * [Api set: WordApi 1.3 Beta] + */ + _GetItem(index: number): Word.Range; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.RangeCollection; + _initReferenceId(value: string): void; } /** * * Specifies the options to be included in a search operation. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class SearchOptions extends OfficeExtension.ClientObject { private m_ignorePunct; @@ -10177,58 +10908,62 @@ declare namespace Word { * * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ ignorePunct: boolean; /** * * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ ignoreSpace: boolean; /** * * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box (Edit menu). * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ matchCase: boolean; /** * * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ matchPrefix: boolean; /** * * Gets or sets a value that indicates whether to find words that sound similar to the search string. Corresponds to the Sounds like check box in the Find and Replace dialog box * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ matchSoundsLike: boolean; /** * * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ matchSuffix: boolean; /** * * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ matchWholeWord: boolean; /** * * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ matchWildcards: boolean; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ @@ -10242,42 +10977,94 @@ declare namespace Word { * * Contains a collection of [range](range.md) objects as a result of a search operation. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class SearchResultCollection extends OfficeExtension.ClientObject { + private m_first; private m__ReferenceId; private m__items; + /** + * + * Gets the first searched result in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.Range; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a range object by its index in the collection. + * + * @param index A number that identifies the index location of a range object. + * + * [Api set: WordApi 1.1] + */ + _GetItem(index: number): Word.Range; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.SearchResultCollection; + _initReferenceId(value: string): void; } /** * * Represents a section in a Word document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class Section extends OfficeExtension.ClientObject { private m_body; + private m_next; private m__Id; private m__ReferenceId; /** * - * Gets the body of the section. This does not include the header/footer and other section metadata. Read-only. + * Gets the body object of the section. This does not include the header/footer and other section metadata. Read-only. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ body: Word.Body; + /** + * + * Gets the next section. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + next: Word.Section; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; /** * * Gets one of the section's footers. * * @param type Required. The type of footer to return. This value can be: 'primary', 'firstPage' or 'evenPages'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getFooter(type: string): Word.Body; /** @@ -10286,46 +11073,1157 @@ declare namespace Word { * * @param type Required. The type of header to return. This value can be: 'primary', 'firstPage' or 'evenPages'. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ getHeader(type: string): Word.Body; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.Section; + _initReferenceId(value: string): void; } /** * * Contains the collection of the document's [section](section.md) objects. * - * [Api set: WordApi ] + * [Api set: WordApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { + private m_first; private m__ReferenceId; private m__items; + /** + * + * Gets the first section in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.Section; /** Gets the loaded child items in this collection. */ items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a section object by its index in the collection. + * + * @param index A number that identifies the index location of a section object. + * + * [Api set: WordApi 1.1] + */ + _GetItem(index: number): Word.Section; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ load(option?: string | string[] | OfficeExtension.LoadOption): Word.SectionCollection; + _initReferenceId(value: string): void; } /** * - * ContentControl types + * Represents a table in a Word document. * - * [Api set: WordApi ] + * [Api set: WordApi 1.3 Beta] */ - namespace ContentControlType { + class Table extends OfficeExtension.ClientObject { + private m_cellPaddingBottom; + private m_cellPaddingLeft; + private m_cellPaddingRight; + private m_cellPaddingTop; + private m_font; + private m_headerRowCount; + private m_height; + private m_isUniform; + private m_nestingLevel; + private m_next; + private m_paragraphAfter; + private m_paragraphBefore; + private m_parentContentControl; + private m_parentTable; + private m_parentTableCell; + private m_rowCount; + private m_rows; + private m_shadingColor; + private m_style; + private m_styleBandedColumns; + private m_styleBandedRows; + private m_styleFirstColumn; + private m_styleLastColumn; + private m_styleTotalRow; + private m_tables; + private m_values; + private m_verticalAlignment; + private m_width; + private m__Id; + private m__ReferenceId; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + font: Word.Font; + /** + * + * Gets the next table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + next: Word.Table; + /** + * + * Gets the paragraph after the table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + paragraphAfter: Word.Paragraph; + /** + * + * Gets the paragraph before the table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + paragraphBefore: Word.Paragraph; + /** + * + * Gets the content control that contains the table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentContentControl: Word.ContentControl; + /** + * + * Gets the table that contains this table. Returns null if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the table cell that contains this table. Returns null if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTableCell: Word.TableCell; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + rows: Word.TableRowCollection; + /** + * + * Gets the child tables nested one level deeper. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + tables: Word.TableCollection; + /** + * + * Gets and sets the default bottom cell padding in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingBottom: number; + /** + * + * Gets and sets the default left cell padding in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingLeft: number; + /** + * + * Gets and sets the default right cell padding in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingRight: number; + /** + * + * Gets and sets the default top cell padding in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingTop: number; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3 Beta] + */ + headerRowCount: number; + /** + * + * Gets the height of the table in points. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + height: number; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + isUniform: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + nestingLevel: number; + /** + * + * Gets the number of rows in the table. + * + * [Api set: WordApi 1.3 Beta] + */ + rowCount: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3 Beta] + */ + shadingColor: string; + /** + * + * Gets and sets the name of the table style. + * + * [Api set: WordApi 1.3 Beta] + */ + style: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3 Beta] + */ + styleBandedColumns: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3 Beta] + */ + styleBandedRows: boolean; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3 Beta] + */ + styleFirstColumn: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3 Beta] + */ + styleLastColumn: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3 Beta] + */ + styleTotalRow: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3 Beta] + */ + values: Array>; + /** + * + * Gets and sets the vertical alignment of every cell in the table. + * + * [Api set: WordApi 1.3 Beta] + */ + verticalAlignment: string; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3 Beta] + */ + width: number; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * @param insertLocation Required. It can be 'Start' or 'End', corresponding to the appropriate side of the table. + * @param columnCount Required. Number of columns to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + addColumns(insertLocation: string, columnCount: number, values?: Array>): void; + /** + * + * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. + * + * @param insertLocation Required. It can be 'Start' or 'End'. + * @param rowCount Required. Number of rows to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + addRows(insertLocation: string, rowCount: number, values?: Array>): void; + /** + * + * Autofits the table columns to the width of their contents. + * + * [Api set: WordApi 1.3 Beta] + */ + autoFitContents(): void; + /** + * + * Autofits the table columns to the width of the window. + * + * [Api set: WordApi 1.3 Beta] + */ + autoFitWindow(): void; + /** + * + * Clears the contents of the table. + * + * [Api set: WordApi 1.3 Beta] + */ + clear(): void; + /** + * + * Deletes the entire table. + * + * [Api set: WordApi 1.3 Beta] + */ + delete(): void; + /** + * + * Deletes specific columns. This is applicable to uniform tables. + * + * @param columnIndex Required. The first column to delete. + * @param columnCount Optional. The number of columns to delete. Default 1. + * + * [Api set: WordApi 1.3 Beta] + */ + deleteColumns(columnIndex: number, columnCount?: number): void; + /** + * + * Deletes specific rows. + * + * @param rowIndex Required. The first row to delete. + * @param rowCount Optional. The number of rows to delete. Default 1. + * + * [Api set: WordApi 1.3 Beta] + */ + deleteRows(rowIndex: number, rowCount?: number): void; + /** + * + * Distributes the column widths evenly. + * + * [Api set: WordApi 1.3 Beta] + */ + distributeColumns(): void; + /** + * + * Distributes the row heights evenly. + * + * [Api set: WordApi 1.3 Beta] + */ + distributeRows(): void; + /** + * + * Gets the border style for the specified border. + * + * @param borderLocation Required. The border location. + * + * [Api set: WordApi 1.3 Beta] + */ + getBorderStyle(borderLocation: string): Word.TableBorderStyle; + /** + * + * Gets the table cell at a specified row and column. + * + * @param rowIndex Required. The index of the row. + * @param cellIndex Required. The index of the cell in the row. + * + * [Api set: WordApi 1.3 Beta] + */ + getCell(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * + * Gets the range that contains this table, or the range at the start or end of the table. + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start' or 'End'. + * + * [Api set: WordApi 1.3 Beta] + */ + getRange(rangeLocation: string): Word.Range; + /** + * + * Inserts a content control on the table. + * + * [Api set: WordApi 1.3 Beta] + */ + insertContentControl(): Word.ContentControl; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3 Beta] + */ + insertParagraph(paragraphText: string, insertLocation: string): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertTable(rowCount: number, columnCount: number, insertLocation: string, values?: Array>): Word.Table; + /** + * + * Merges the cells bounded inclusively by a first and last cell. + * + * @param topRow Required. The row of the first cell + * @param firstCell Required. The index of the first cell in its row + * @param bottomRow Required. The row of the last cell + * @param lastCell Required. The index of the last cell in its row + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; + /** + * + * Performs a search with the specified searchOptions on the scope of the table object. The search results are a collection of range objects. + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + * + * [Api set: WordApi 1.3 Beta] + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSoundsLike?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.SearchResultCollection; + /** + * + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. + * + * [Api set: WordApi 1.3 Beta] + */ + select(selectionMode?: string): void; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.Table; + _initReferenceId(value: string): void; + } + /** + * + * Contains the collection of the document's Table objects. + * + * [Api set: WordApi 1.3 Beta] + */ + class TableCollection extends OfficeExtension.ClientObject { + private m_first; + private m__ReferenceId; + private m__items; + /** + * + * Gets the first table in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.Table; + /** Gets the loaded child items in this collection. */ + items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a table object by its index in the collection. + * + * @param index A number that identifies the index location of a table object. + * + * [Api set: WordApi 1.3 Beta] + */ + _GetItem(index: number): Word.Table; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCollection; + _initReferenceId(value: string): void; + } + /** + * + * Represents a row in a Word document. + * + * [Api set: WordApi 1.3 Beta] + */ + class TableRow extends OfficeExtension.ClientObject { + private m_cellCount; + private m_cellPaddingBottom; + private m_cellPaddingLeft; + private m_cellPaddingRight; + private m_cellPaddingTop; + private m_cells; + private m_font; + private m_isHeader; + private m_next; + private m_parentTable; + private m_preferredHeight; + private m_rowIndex; + private m_shadingColor; + private m_values; + private m_verticalAlignment; + private m__Id; + private m__ReferenceId; + /** + * + * Gets cells. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + cells: Word.TableCellCollection; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + font: Word.Font; + /** + * + * Gets the next row. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + next: Word.TableRow; + /** + * + * Gets parent table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + cellCount: number; + /** + * + * Gets and sets the default bottom cell padding for the row in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingBottom: number; + /** + * + * Gets and sets the default left cell padding for the row in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingLeft: number; + /** + * + * Gets and sets the default right cell padding for the row in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingRight: number; + /** + * + * Gets and sets the default top cell padding for the row in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingTop: number; + /** + * + * Gets a value that indicates whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3 Beta] + */ + isHeader: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3 Beta] + */ + preferredHeight: number; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + rowIndex: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3 Beta] + */ + shadingColor: string; + /** + * + * Gets and sets the text values in the row, as a 1D Javascript array. + * + * [Api set: WordApi 1.3 Beta] + */ + values: Array; + /** + * + * Gets and sets the vertical alignment of the cells in the row. + * + * [Api set: WordApi 1.3 Beta] + */ + verticalAlignment: string; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Clears the contents of the row. + * + * [Api set: WordApi 1.3 Beta] + */ + clear(): void; + /** + * + * Deletes the entire row. + * + * [Api set: WordApi 1.3 Beta] + */ + delete(): void; + /** + * + * Gets the border style of the cells in the row. + * + * @param borderLocation Required. The border location. + * + * [Api set: WordApi 1.3 Beta] + */ + getBorderStyle(borderLocation: string): Word.TableBorderStyle; + /** + * + * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. + * + * @param insertLocation Where the new rows should be inserted, relative to the current row. It can be 'Before' or 'After'. Required. + * @param rowCount Required. Number of rows to add + * @param values Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. Optional. + * + * [Api set: WordApi 1.3 Beta] + */ + insertRows(insertLocation: string, rowCount: number, values?: Array>): void; + /** + * + * Merges the row into one cell. + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + merge(): Word.TableCell; + /** + * + * Performs a search with the specified searchOptions on the scope of the row. The search results are a collection of range objects. + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + * + * [Api set: WordApi 1.3 Beta] + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSoundsLike?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.SearchResultCollection; + /** + * + * Selects the row and navigates the Word UI to it. + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start' or 'End'. 'Select' is the default. + * + * [Api set: WordApi 1.3 Beta] + */ + select(selectionMode?: string): void; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRow; + _initReferenceId(value: string): void; + } + /** + * + * Contains the collection of the document's TableRow objects. + * + * [Api set: WordApi 1.3 Beta] + */ + class TableRowCollection extends OfficeExtension.ClientObject { + private m_first; + private m__ReferenceId; + private m__items; + /** + * + * Gets the first row in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.TableRow; + /** Gets the loaded child items in this collection. */ + items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a table row object by its index in the collection. + * + * @param index A number that identifies the index location of a table row object. + * + * [Api set: WordApi 1.3 Beta] + */ + _GetItem(index: number): Word.TableRow; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRowCollection; + _initReferenceId(value: string): void; + } + /** + * + * Represents a table cell in a Word document. + * + * [Api set: WordApi 1.3 Beta] + */ + class TableCell extends OfficeExtension.ClientObject { + private m_body; + private m_cellIndex; + private m_cellPaddingBottom; + private m_cellPaddingLeft; + private m_cellPaddingRight; + private m_cellPaddingTop; + private m_columnWidth; + private m_next; + private m_parentRow; + private m_parentTable; + private m_rowIndex; + private m_shadingColor; + private m_value; + private m_verticalAlignment; + private m_width; + private m__Id; + private m__ReferenceId; + /** + * + * Gets the body object of the cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + body: Word.Body; + /** + * + * Gets the next cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + next: Word.TableCell; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentRow: Word.TableRow; + /** + * + * Gets the parent table of the cell. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + parentTable: Word.Table; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + cellIndex: number; + /** + * + * Gets and sets the bottom padding of the cell in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingBottom: number; + /** + * + * Gets and sets the left padding of the cell in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingLeft: number; + /** + * + * Gets and sets the right padding of the cell in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingRight: number; + /** + * + * Gets and sets the top padding of the cell in points. + * + * [Api set: WordApi 1.3 Beta] + */ + cellPaddingTop: number; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3 Beta] + */ + columnWidth: number; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + rowIndex: number; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3 Beta] + */ + shadingColor: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3 Beta] + */ + value: string; + /** + * + * Gets and sets the vertical alignment of the cell. + * + * [Api set: WordApi 1.3 Beta] + */ + verticalAlignment: string; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + width: number; + /** + * + * ID + * + * [Api set: WordApi] + */ + _Id: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Deletes the column containing this cell. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3 Beta] + */ + deleteColumn(): void; + /** + * + * Deletes the row containing this cell. + * + * [Api set: WordApi 1.3 Beta] + */ + deleteRow(): void; + /** + * + * Gets the border style for the specified border. + * + * @param borderLocation Required. The border location. + * + * [Api set: WordApi 1.3 Beta] + */ + getBorderStyle(borderLocation: string): Word.TableBorderStyle; + /** + * + * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * @param insertLocation Required. It can be 'Before' or 'After'. + * @param columnCount Required. Number of columns to add + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertColumns(insertLocation: string, columnCount: number, values?: Array>): void; + /** + * + * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. + * + * @param insertLocation Required. It can be 'Before' or 'After'. + * @param rowCount Required. Number of rows to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + * + * [Api set: WordApi 1.3 Beta] + */ + insertRows(insertLocation: string, rowCount: number, values?: Array>): void; + /** + * + * Adds columns to the left or right of the cell, using the existing column as a template. The string values, if specified, are set in the newly inserted rows. + * + * @param rowCount Required. The number of rows to split into. Must be a divisor of the number of underlying rows. + * @param columnCount Required. The number of columns to split into. + * + * [Api set: WordApiDesktop 1.3 Beta] + */ + split(rowCount: number, columnCount: number): void; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCell; + _initReferenceId(value: string): void; + } + /** + * + * Contains the collection of the document's TableCell objects. + * + * [Api set: WordApi 1.3 Beta] + */ + class TableCellCollection extends OfficeExtension.ClientObject { + private m_first; + private m__ReferenceId; + private m__items; + /** + * + * Gets the first table cell in this collection. Read-only. + * + * [Api set: WordApi 1.3 Beta] + */ + first: Word.TableCell; + /** Gets the loaded child items in this collection. */ + items: Array; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + /** + * + * Gets a table cell object by its index in the collection. + * + * @param index A number that identifies the index location of a table cell object. + * + * [Api set: WordApi 1.3 Beta] + */ + _GetItem(index: number): Word.TableCell; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCellCollection; + _initReferenceId(value: string): void; + } + /** + * + * Specifies the border style + * + * [Api set: WordApi 1.3 Beta] + */ + class TableBorderStyle extends OfficeExtension.ClientObject { + private m_color; + private m_type; + private m_width; + private m__ReferenceId; + /** + * + * Gets or sets the table border color, as a hex value or name. + * + * [Api set: WordApi 1.3 Beta] + */ + color: string; + /** + * + * Gets or sets the type of the table border style. + * + * [Api set: WordApi 1.3 Beta] + */ + type: string; + /** + * + * Gets or sets the width, in points, of the table border style. + * + * [Api set: WordApi 1.3 Beta] + */ + width: number; + /** + * + * ReferenceId + * + * [Api set: WordApi] + */ + _ReferenceId: string; + _KeepReference(): void; + /** Handle results returned from the document + * @private + */ + _handleResult(value: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableBorderStyle; + _initReferenceId(value: string): void; + } + /** + * + * Specifies supported content control types and subtypes. + * + * [Api set: WordApi] + */ + module ContentControlType { + var unknown: string; + var richTextInline: string; + var richTextParagraphs: string; + var richTextTableCell: string; + var richTextTableRow: string; + var richTextTable: string; + var plainTextInline: string; + var plainTextParagraph: string; + var picture: string; + var buildingBlockGallery: string; + var checkBox: string; + var comboBox: string; + var dropDownList: string; + var datePicker: string; + var repeatingSection: string; var richText: string; + var plainText: string; } /** * * ContentControl appearance * - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace ContentControlAppearance { + module ContentControlAppearance { var boundingBox: string; var tags: string; var hidden: string; @@ -10334,9 +12232,9 @@ declare namespace Word { * * Underline types * - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace UnderlineType { + module UnderlineType { var none: string; var single: string; var word: string; @@ -10351,9 +12249,9 @@ declare namespace Word { var wave: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace BreakType { + module BreakType { var page: string; var column: string; var next: string; @@ -10369,9 +12267,9 @@ declare namespace Word { * * The insertion location types * - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace InsertLocation { + module InsertLocation { var before: string; var after: string; var start: string; @@ -10379,9 +12277,9 @@ declare namespace Word { var replace: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace Alignment { + module Alignment { var unknown: string; var left: string; var centered: string; @@ -10389,25 +12287,36 @@ declare namespace Word { var justified: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace HeaderFooterType { + module HeaderFooterType { var primary: string; var firstPage: string; var evenPages: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace SelectionMode { + module BodyType { + var unknown: string; + var mainDoc: string; + var section: string; + var header: string; + var footer: string; + var tableCell: string; + } + /** + * [Api set: WordApi] + */ + module SelectionMode { var select: string; var start: string; var end: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace ImageFormat { + module ImageFormat { var unsupported: string; var undefined: string; var bmp: string; @@ -10423,17 +12332,17 @@ declare namespace Word { var pdf: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace RangeLocation { + module RangeLocation { var whole: string; var start: string; var end: string; } /** - * [Api set: WordApi ] + * [Api set: WordApi] */ - namespace LocationRelation { + module LocationRelation { var unrelated: string; var equal: string; var containsStart: string; @@ -10449,7 +12358,69 @@ declare namespace Word { var overlapsAfter: string; var after: string; } - namespace ErrorCodes { + /** + * [Api set: WordApi] + */ + module BorderLocation { + var top: string; + var left: string; + var bottom: string; + var right: string; + var insideHorizontal: string; + var insideVertical: string; + var inside: string; + var outside: string; + var all: string; + } + /** + * [Api set: WordApi] + */ + module BorderType { + var mixed: string; + var none: string; + var single: string; + var thick: string; + var double: string; + var hairline: string; + var dotted: string; + var dashed: string; + var dotDashed: string; + var dot2Dashed: string; + var triple: string; + var thinThickSmall: string; + var thickThinSmall: string; + var thinThickThinSmall: string; + var thinThickMed: string; + var thickThinMed: string; + var thinThickThinMed: string; + var thinThickLarge: string; + var thickThinLarge: string; + var thinThickThinLarge: string; + var wave: string; + var doubleWave: string; + var dashedSmall: string; + var dashDotStroked: string; + var threeDEmboss: string; + var threeDEngrave: string; + } + /** + * [Api set: WordApi] + */ + module VerticalAlignment { + var mixed: string; + var top: string; + var center: string; + var bottom: string; + } + /** + * [Api set: WordApi] + */ + module ListLevelType { + var bullet: string; + var number: string; + var picture: string; + } + module ErrorCodes { var accessDenied: string; var generalException: string; var invalidArgument: string; @@ -10463,10 +12434,8 @@ declare namespace Word { */ class RequestContext extends OfficeExtension.ClientRequestContext { private m_document; - private m_application; constructor(url?: string); document: Document; - application: Application; } /** * Executes a batch script that performs actions on the Word object model. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. From c2ca2ca89828b48cb979f3c6ee432f220b909b79 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 23 Apr 2016 10:48:56 +0930 Subject: [PATCH 0130/1506] adding react-mdl --- react-mdl/react-mdl-tests.tsx | 1044 +++++++++++++++++++++++++++++++++ react-mdl/react-mdl.d.ts | 606 +++++++++++++++++++ 2 files changed, 1650 insertions(+) create mode 100644 react-mdl/react-mdl-tests.tsx create mode 100644 react-mdl/react-mdl.d.ts diff --git a/react-mdl/react-mdl-tests.tsx b/react-mdl/react-mdl-tests.tsx new file mode 100644 index 0000000000..eb9981092a --- /dev/null +++ b/react-mdl/react-mdl-tests.tsx @@ -0,0 +1,1044 @@ +// Test file for react-mdl Definition file +/// + +import React = require('react'); +import {Badge, + FABButton, Button, IconButton, + Card, CardActions, CardTitle, CardText, CardMenu, CardMedia, + Checkbox, + DataTable, TableHeader, Table, + Dialog, DialogTitle, DialogContent, DialogActions, + Grid, Cell, + Icon, IconToggle, + Layout, Header, Navigation, Drawer, Content, HeaderRow, HeaderTabs, Footer, FooterDropDownSection, FooterLinkList, FooterSection, + List, ListItem, ListItemContent, ListItemAction, + Menu, MenuItem, + ProgressBar, + RadioGroup, Radio, + Slider, + Snackbar, + Spinner, + Switch, + Tabs, Tab, + Textfield, + Tooltip} from 'react-mdl'; + +// all tests are from the examples provided here: https://tleunen.github.io/react-mdl/ + +// Badge tests +React.createClass({ + render: function() { + return ( +
+ {/* Number badge on icon */} + + + + + {/* Icon badge on icon */} + + + + + {/* Number badge on text */} + Inbox + + {/* Icon badge without background on text */} + Mood +
+ ); + } +}); + +// Button tests +React.createClass({ + render: function() { + return ( +
+ {/* Colored FAB button */} + + + + + {/* Colored FAB button with ripple */} + + + + + {/* FAB button */} + + + + + {/* FAB button with ripple */} + + + + + {/* Disabled FAB button */} + + + + + {/* Mini FAB button */} + + + + + {/* Colored Mini FAB button */} + + + + + {/* Raised button */} + + + {/* Raised button with ripple */} + + + {/* Disabled Raised button */} + + + {/* Colored Raised button */} + + + {/* Accent-colored button without ripple */} + + + {/* Accent-colored button with ripple */} + + + {/* Flat button */} + + + {/* Flat button with ripple */} + + + {/* Disabled flat button */} + + + {/* Primary colored flat button */} + + + {/* Accent-colored flat button */} + + + {/* Icon button */} + + + {/* Colored Icon button */} + +
+ ); + } +}) + +// Card tests +React.createClass({ + render: function() { + return ( +
+ + Welcome + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Mauris sagittis pellentesque lacus eleifend lacinia... + + + + + + + + + + + Update + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Aenan convallis. + + + + + + + + + + + Image.jpg + + + + + + +

+ Featured event:
+ May 24, 2016
+ 7-11pm +

+
+ + +
+ +
+
+
+ ); + } +}); + +// Checkbox tests +React.createClass({ + render: function() { + return ( +
+ + + +
+ ); + } +}); + +// DataTable tests +React.createClass({ + render: function() { + return ( +
+ + Material + Quantity + `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price + + + + Material + Quantity + `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price + + + + (isAsc ? a : b).match(/\((.*)\)/)[1].localeCompare((isAsc ? b : a).match(/\((.*)\)/)[1])} + tooltip="The amazing material name" + > + Material + + + Quantity + + `\$${price.toFixed(2)}`} + tooltip="Price pet unit" + > + Price + +
+
+ ); + } +}); + +// Dialog tests +React.createClass({ + render: function() { + return ( +
+
+ + + Allow data collection? + +

Allowing us to collect data will let us get you the information you want faster.

+
+ + + + +
+
+ +
+ + + Allow this site to collect usage data to improve your experience? + +

Allowing us to collect data will let us get you the information you want faster.

+
+ + + + +
+
+ +
+ + + Allow data collection? + +

Allowing us to collect data will let us get you the information you want faster.

+
+ + + + +
+
+
+ ); + } +}); + +// Grid tests +React.createClass({ + render: function() { + return ( +
+
+ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 4 + 4 + 4 + + + 6 + 4 + 2 + + + 6 (8 tablet) + 4 (6 tablet) + 2 (4 phone) + +
+
+ ); + } +}); + +// IconToggle tests +React.createClass({ + render: function() { + return ( +
+ + + +
+ ); + } +}); + +// Layout tests +React.createClass({ + render: function() { + return ( +
+ {/* Uses a transparent header that draws on top of the layout's background */} +
+ +
+ + Link + Link + Link + Link + +
+ + + Link + Link + Link + Link + + + +
+
+ + {/* No header, and the drawer stays open on larger screens (fixed drawer). */} +
+ + + + Link + Link + Link + Link + + + + +
+ + {/* Always shows a header, even in smaller screens. */} +
+ +
Area / The Title}> + + Link + Link + Link + Link + +
+ + + Link + Link + Link + Link + + + +
+
+ + {/* The drawer is always open in large screens. The header is always shown, even in small screens. */} +
+ +
+ {}} + label="Search" + expandable + expandableIcon="search" + /> +
+ + + Link + Link + Link + Link + + + +
+
+ + {/* Uses a header that scrolls with the text, rather than staying locked at the top */} +
+ +
+ + Link + Link + Link + Link + +
+ + + Link + Link + Link + Link + + + +
+ + +
+ + {/* Uses a header that contracts as the page scrolls down. */} +
+ +
+ + {}} + label="Search" + expandable + expandableIcon="search" + /> + + + + Link + Link + Link + Link + + +
+ + + Link + Link + Link + Link + + + +
+ + +
+ + {/* Hide the top part of the header when scrolling down */} +
+ +
+ + {}} + label="Search" + expandable + expandableIcon="search" + /> + + + + Link + Link + Link + Link + + +
+ + + Link + Link + Link + Link + + + +
+ + +
+ +
+ +
+ + this.setState({ activeTab: tabId })}> + Tab1 + Tab2 + Tab3 + Tab4 + Tab5 + Tab6 + +
+ + +
Content for the tab: {this.state.activeTab}
+
+
+
+ + {/* Simple header with fixed tabs. */} +
+ +
+ + {}}> + Tab1 + Tab2 + Tab3 + +
+ + +
You can add logic to update the content of this container based on the "activeTab" receive in the `onChange` callback.
+
+
+
+ + + + +
+ ); + } +}); + +// List tests +React.createClass({ + render: function() { + return ( +
+ + Bryan Cranston + Aaron Paul + Bob Odenkirk + + + + + Bryan Cranston + + + Aaron Paul + + + Bob Odenkirk + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + +
+ ); + } +}); + +// Menu tests +React.createClass({ + render: function() { + return ( +
+ {/* Lower left */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+ + {/* Lower right */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+ + {/* Top left */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+ + {/* Top right */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+
+ ); + } +}); + +// ProgressBar tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple Progress Bar */} + + + {/* Progress Bar with Indeterminate Progress */} + + + {/* Progress Bar with Buffering */} + +
+ ); + } +}); + +// Radio tests +React.createClass({ + render: function() { + return ( +
+ + Ripple option + Other option + + + + Ripple option + Other option + +
+ ); + } +}); + +// Slider tests +React.createClass({ + render: function() { + return ( +
+ {/* Default slider */} + + + {/* Slider with initial value */} + +
+ ); + } +}); + +// Snackbar tests +React.createClass({ + render: function() { + return ( +
+
+ + Button color changed. +
+ +
+ + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius luctus quam. Fusce quis blandit libero. Donec accumsan nunc lectus, vel blandit diam bibendum ac. Integer faucibus, lorem et convallis fermentum, diam dolor imperdiet mi, nec iaculis risus mauris id elit. Vivamus vel eros dapibus, molestie ante ut, vestibulum sem. + +
+
+ ); + } +}); + +// Spinner tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple spinner */} + + + {/* Single color spinner */} + +
+ ); + } +}); + +// Switch tests +React.createClass({ + render: function() { + return ( +
+ Ripple switch + + Switch +
+ ); + } +}); + +// Tab tests +React.createClass({ + render: function() { + return ( +
+
+ this.setState({ activeTab: tabId })} ripple> + Starks + Lannisters + Targaryens + +
+
Content for the tab: {this.state.activeTab}
+
+
+
+ ); + } +}); + +// Textfield tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple textfield */} + {}} + label="Text..." + style={{width: '200px'}} + /> + + {/* Numeric textfield */} + {}} + pattern="-?[0-9]*(\.[0-9]+)?" + error="Input is not a number!" + label="Number..." + style={{width: '200px'}} + /> + + {/* Textfield with floating label */} + {}} + label="Text..." + floatingLabel + style={{width: '200px'}} + /> + + {/* Numeric Textfield with floating label */} + {}} + pattern="-?[0-9]*(\.[0-9]+)?" + error="Input is not a number!" + label="Number..." + floatingLabel + /> +
+ ); + } +}); + +// Tooltip tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple tooltip */} + + + + + {/* Large Tooltip */} + + + + + {/* Rich Tooltip */} + Upload file.zip}> + + + + {/* Multiline Tooltip */} + Share your content
via social media}> + +
+ + {/* Right Tooltip */} + + + + + {/* Left Tooltip */} + + + + + {/* Top Tooltip */} + + + + + {/* Bottom Tooltip */} + + + +
+ ); + } +}); diff --git a/react-mdl/react-mdl.d.ts b/react-mdl/react-mdl.d.ts new file mode 100644 index 0000000000..86516b75f0 --- /dev/null +++ b/react-mdl/react-mdl.d.ts @@ -0,0 +1,606 @@ +// Type definitions for react-mdl 1.5.3 +// Project: https://github.com/tleunen/react-mdl +// Definitions by: Brad Zacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace __ReactMDL { + import React = __React; + + type __MDLClassProps = React.ClassAttributes; + type __MDLOtherProps = React.HTMLProps; + class __MDLComponent

extends React.Component {} + class __MDLBasicComponent extends __MDLComponent<__MDLOtherProps> {} + + interface ShadowedComponent { + shadow ?: number; + } + interface RippleComponent { + ripple ?: boolean; + } + interface CustomRenderedComponent { + component ?: string | JSX.Element | Function; + } + + + // HTMLAttributes (minus the 'data', 'icon', 'label', 'name', 'rows', 'size', 'title', 'value' attributes) + interface MDLHTMLAttributes { + // React-specific Attributes + defaultChecked?: boolean; + defaultValue?: string | string[]; + + // Standard HTML Attributes + accept?: string; + acceptCharset?: string; + accessKey?: string; + action?: string; + allowFullScreen?: boolean; + allowTransparency?: boolean; + alt?: string; + async?: boolean; + autoComplete?: string; + autoFocus?: boolean; + autoPlay?: boolean; + capture?: boolean; + cellPadding?: number | string; + cellSpacing?: number | string; + charSet?: string; + challenge?: string; + checked?: boolean; + classID?: string; + className?: string; + cols?: number; + colSpan?: number; + content?: string; + contentEditable?: boolean; + contextMenu?: string; + controls?: boolean; + coords?: string; + crossOrigin?: string; + dateTime?: string; + default?: boolean; + defer?: boolean; + dir?: string; + disabled?: boolean; + download?: any; + draggable?: boolean; + encType?: string; + form?: string; + formAction?: string; + formEncType?: string; + formMethod?: string; + formNoValidate?: boolean; + formTarget?: string; + frameBorder?: number | string; + headers?: string; + height?: number | string; + hidden?: boolean; + high?: number; + href?: string; + hrefLang?: string; + htmlFor?: string; + httpEquiv?: string; + id?: string; + inputMode?: string; + integrity?: string; + is?: string; + keyParams?: string; + keyType?: string; + kind?: string; + lang?: string; + list?: string; + loop?: boolean; + low?: number; + manifest?: string; + marginHeight?: number; + marginWidth?: number; + max?: number | string; + maxLength?: number; + media?: string; + mediaGroup?: string; + method?: string; + min?: number | string; + minLength?: number; + multiple?: boolean; + muted?: boolean; + nonce?: string; + noValidate?: boolean; + open?: boolean; + optimum?: number; + pattern?: string; + placeholder?: string; + poster?: string; + preload?: string; + radioGroup?: string; + readOnly?: boolean; + rel?: string; + required?: boolean; + reversed?: boolean; + role?: string; + rowSpan?: number; + sandbox?: string; + scope?: string; + scoped?: boolean; + scrolling?: string; + seamless?: boolean; + selected?: boolean; + shape?: string; + sizes?: string; + span?: number; + spellCheck?: boolean; + src?: string; + srcDoc?: string; + srcLang?: string; + srcSet?: string; + start?: number; + step?: number | string; + style?: React.CSSProperties; + summary?: string; + tabIndex?: number; + target?: string; + type?: string; + useMap?: string; + width?: number | string; + wmode?: string; + wrap?: string; + + // RDFa Attributes + about?: string; + datatype?: string; + inlist?: any; + prefix?: string; + property?: string; + resource?: string; + typeof?: string; + vocab?: string; + + // Non-standard Attributes + autoCapitalize?: string; + autoCorrect?: string; + autoSave?: string; + color?: string; + itemProp?: string; + itemScope?: boolean; + itemType?: string; + itemID?: string; + itemRef?: string; + results?: number; + security?: string; + unselectable?: boolean; + + // Allows aria- and data- Attributes + [key: string]: any; + } + // DOMAttributes (minus 'onClick', 'onChange') + interface MDLDOMAttributes { + // DOMAttributes (minus onClick) + children?: React.ReactNode; + dangerouslySetInnerHTML?: { + __html: string; + }; + + // Clipboard Events + onCopy?: React.ClipboardEventHandler; + onCut?: React.ClipboardEventHandler; + onPaste?: React.ClipboardEventHandler; + + // Composition Events + onCompositionEnd?: React.CompositionEventHandler; + onCompositionStart?: React.CompositionEventHandler; + onCompositionUpdate?: React.CompositionEventHandler; + + // Focus Events + onFocus?: React.FocusEventHandler; + onBlur?: React.FocusEventHandler; + + // Form Events + onInput?: React.FormEventHandler; + onSubmit?: React.FormEventHandler; + + // Image Events + onLoad?: React.ReactEventHandler; + onError?: React.ReactEventHandler; // also a Media Event + + // Keyboard Events + onKeyDown?: React.KeyboardEventHandler; + onKeyPress?: React.KeyboardEventHandler; + onKeyUp?: React.KeyboardEventHandler; + + // Media Events + onAbort?: React.ReactEventHandler; + onCanPlay?: React.ReactEventHandler; + onCanPlayThrough?: React.ReactEventHandler; + onDurationChange?: React.ReactEventHandler; + onEmptied?: React.ReactEventHandler; + onEncrypted?: React.ReactEventHandler; + onEnded?: React.ReactEventHandler; + onLoadedData?: React.ReactEventHandler; + onLoadedMetadata?: React.ReactEventHandler; + onLoadStart?: React.ReactEventHandler; + onPause?: React.ReactEventHandler; + onPlay?: React.ReactEventHandler; + onPlaying?: React.ReactEventHandler; + onProgress?: React.ReactEventHandler; + onRateChange?: React.ReactEventHandler; + onSeeked?: React.ReactEventHandler; + onSeeking?: React.ReactEventHandler; + onStalled?: React.ReactEventHandler; + onSuspend?: React.ReactEventHandler; + onTimeUpdate?: React.ReactEventHandler; + onVolumeChange?: React.ReactEventHandler; + onWaiting?: React.ReactEventHandler; + + // MouseEvents + onContextMenu?: React.MouseEventHandler; + onDoubleClick?: React.MouseEventHandler; + onDrag?: React.DragEventHandler; + onDragEnd?: React.DragEventHandler; + onDragEnter?: React.DragEventHandler; + onDragExit?: React.DragEventHandler; + onDragLeave?: React.DragEventHandler; + onDragOver?: React.DragEventHandler; + onDragStart?: React.DragEventHandler; + onDrop?: React.DragEventHandler; + onMouseDown?: React.MouseEventHandler; + onMouseEnter?: React.MouseEventHandler; + onMouseLeave?: React.MouseEventHandler; + onMouseMove?: React.MouseEventHandler; + onMouseOut?: React.MouseEventHandler; + onMouseOver?: React.MouseEventHandler; + onMouseUp?: React.MouseEventHandler; + + // Selection Events + onSelect?: React.ReactEventHandler; + + // Touch Events + onTouchCancel?: React.TouchEventHandler; + onTouchEnd?: React.TouchEventHandler; + onTouchMove?: React.TouchEventHandler; + onTouchStart?: React.TouchEventHandler; + + // UI Events + onScroll?: React.UIEventHandler; + + // Wheel Events + onWheel?: React.WheelEventHandler; + } + + + + interface BadgeProps extends __MDLClassProps { + text: string | number; + className ?: string; + noBackground ?: boolean; + overlap ?: boolean; + } + class Badge extends __MDLComponent {} + + + interface ButtonProps extends __MDLOtherProps, RippleComponent, CustomRenderedComponent { + accent ?: boolean; + colored ?: boolean; + primary ?: boolean; + } + interface StandardButtonProps extends ButtonProps { + raised ?: boolean; + } + interface FABButtonProps extends ButtonProps { + mini ?: boolean; + } + interface IconButtonProps extends ButtonProps { + name ?: string; + raised ?: boolean; + } + class Button extends __MDLComponent {} + class FABButton extends __MDLComponent {} + class IconButton extends __MDLComponent {} + + + interface CardProps extends __MDLOtherProps, ShadowedComponent {} + interface CardActionProps extends __MDLOtherProps { + border ?: boolean; + } + interface CardTitleProps extends __MDLOtherProps { + expand ?: boolean; + } + class Card extends __MDLComponent {} + class CardActions extends __MDLComponent {} + class CardTitle extends __MDLComponent {} + class CardText extends __MDLBasicComponent {} + class CardMenu extends __MDLBasicComponent {} + class CardMedia extends __MDLBasicComponent {} + + + interface CheckboxProps extends __MDLOtherProps, RippleComponent { + checked ?: boolean; + disabled ?: boolean; + label ?: string; + } + class Checkbox extends __MDLComponent {} + + interface UndecoratedTableProps extends __MDLClassProps, MDLHTMLAttributes, React.DOMAttributes, ShadowedComponent { + rows: Array; + rowKeyColumn ?: string; + + name ?: string; + title ?: string; + } + interface TableProps extends UndecoratedTableProps { + sortable ?: boolean; + selectable ?: boolean; + onSelectionChanged ?: (row : any) => any; + } + interface TableHeaderProps extends __MDLClassProps, MDLHTMLAttributes, MDLDOMAttributes { + name : string; + title ?: string; + cellFormatter ?: (value : any, row : any, index : number) => React.ReactNode; + numeric ?: boolean; + nosort ?: boolean; + onClick ?: (e : React.MouseEvent, name : string) => any; + sortFn ?: (a : any, b : any, isAsc : boolean) => number; + tooltip ?: React.ReactNode; + } + class Table extends __MDLComponent {} + class TableHeader extends __MDLComponent {} + class UndecoratedTable extends __MDLComponent {} + class DataTable extends Table {} + + + interface DialogProps extends __MDLOtherProps { + open ?: boolean; + } + interface DialogActionsProps extends __MDLOtherProps { + fullWidth ?: boolean; + } + interface DialogTitleProps extends __MDLOtherProps, CustomRenderedComponent {} + class Dialog extends __MDLComponent {} + class DialogActions extends __MDLComponent {} + class DialogTitle extends __MDLComponent {} + class DialogContent extends __MDLBasicComponent {} + + + interface GridProps extends __MDLOtherProps, CustomRenderedComponent, ShadowedComponent { + noSpacing ?: boolean; + } + interface CellProps extends __MDLOtherProps, CustomRenderedComponent, ShadowedComponent { + col : number; + align ?: string; + phone ?: number; + tablet ?: number; + hideDesktop ?: boolean; + hidePhone ?: boolean; + hideTablet ?: boolean; + } + class Grid extends __MDLComponent {} + class Cell extends __MDLComponent {} + + + interface IconProps extends __MDLOtherProps { + name : string; + } + class Icon extends __MDLComponent {} + + + interface IconToggleProps extends __MDLOtherProps, RippleComponent { + name : string; + checked ?: boolean; + disabled ?: boolean; + } + class IconToggle extends __MDLComponent {} + + + interface ContentProps extends __MDLOtherProps, CustomRenderedComponent {} + interface DrawerProps extends __MDLOtherProps { + title ?: string; + } + interface HeaderProps extends __MDLOtherProps { + title ?: string; + scroll ?: boolean; + seamed ?: boolean; + transparent ?: boolean; + waterfall ?: boolean; + hideTop ?: boolean; + } + interface HeaderRowProps extends __MDLOtherProps { + title ?: string; + } + interface HeaderTabsProps extends __MDLOtherProps, RippleComponent { + activeTab ?: number; + onChange ?: React.FormEventHandler; + } + interface LayoutProps extends __MDLOtherProps { + fixedDrawer ?: boolean; + fixedHeader ?: boolean; + fixedTabse ?: boolean; + } + interface NavigationProps extends __MDLOtherProps {} + class Content extends __MDLComponent {} + class Drawer extends __MDLComponent {} + class Header extends __MDLComponent {} + class HeaderRow extends __MDLComponent {} + class HeaderTabs extends __MDLComponent {} + class Layout extends __MDLComponent {} + class Navigation extends __MDLComponent {} + class Spacer extends __MDLBasicComponent {} + + interface FooterProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + + title ?: string; + } + interface FooterDropDownSectionProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + title : React.ReactNode; + } + interface FooterLinkListProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + + title ?: string; + } + interface FooterSectionProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + type ?: string; + logo ?: React.ReactNode; + + title ?: string; + } + class Footer extends __MDLComponent {} + class FooterDropDownSection extends __MDLComponent {} + class FooterLinkList extends __MDLComponent {} + class FooterSection extends __MDLComponent {} + + interface ListItemProps extends __MDLOtherProps { + twoLine ?: boolean; + threeLine ?: boolean; + } + interface ListItemActionProps extends __MDLOtherProps { + info ?: string; + } + interface ListItemContentProps extends MDLHTMLAttributes, React.DOMAttributes { + avatar ?: string | JSX.Element; + icon ?: string | JSX.Element; + subtitle ?: React.ReactNode; + useBodyClass ?: boolean; + } + class List extends __MDLBasicComponent {} + class ListItem extends __MDLComponent {} + class ListItemAction extends __MDLComponent {} + class ListItemContent extends __MDLComponent {} + + + interface MenuProps extends __MDLOtherProps, RippleComponent { + target : string; + align ?: string; + valign ?: string; + } + class Menu extends __MDLComponent {} + class MenuItem extends __MDLBasicComponent {} + + + interface ProgressBarProps extends __MDLOtherProps { + buffer ?: number; + indeterminate ?: boolean; + progress ?: number; + } + class ProgressBar extends __MDLComponent {} + + + interface RadioProps extends MDLHTMLAttributes, React.DOMAttributes, RippleComponent { + value : string | number; + checked ?: boolean; + disabled ?: boolean; + name ?: string; + onChange ?: React.FormEventHandler; + label ?: string; + } + interface RadioGroupProps extends MDLHTMLAttributes, React.DOMAttributes { + name : string; + value : string | number; + childContainer ?: string; + container ?: string; + onChange ?: React.FormEventHandler; + label ?: string; + } + class Radio extends __MDLComponent {} + class RadioGroup extends __MDLComponent {} + + + interface SliderProps extends MDLHTMLAttributes, React.DOMAttributes { + max : number; + min : number; + onChange ?: React.FormEventHandler; + value ?: number; + } + class Slider extends __MDLComponent {} + + + interface SnackbarProps extends __MDLOtherProps { + active : boolean; + onTimeout : () => any; + action ?: string; + onActionClick ?: React.MouseEventHandler; + timeout ?: number; + } + class Snackbar extends __MDLComponent {} + + + interface SpinnerProps extends __MDLOtherProps { + singleColor ?: boolean; + } + class Spinner extends __MDLComponent {} + + + interface SwitchProps extends __MDLOtherProps, RippleComponent { + checked ?: boolean; + disabled ?: boolean; + onChange ?: React.FormEventHandler; + } + class Switch extends __MDLComponent {} + + + interface TabProps extends __MDLOtherProps, CustomRenderedComponent { + active ?: boolean; + cssPrefix ?: string; + onTabClick ?: (tabId : number) => any; + tabId ?: number; + } + interface TabBarProps extends MDLHTMLAttributes, MDLDOMAttributes { + cssPrefix : string; + activeTab ?: number; + onChange ?: (tabId : number) => any; + + name ?: string; + title ?: string; + onClick ?: React.MouseEventHandler; + } + interface TabsProps extends MDLHTMLAttributes, MDLDOMAttributes { + activeTab ?: number; + onChange ?: (tabId : number) => any; + tabBarProps ?: TabBarProps; + + name ?: string; + title ?: string; + onClick ?: React.MouseEventHandler; + } + class Tab extends __MDLComponent {} + class TabBar extends __MDLComponent {} + class Tabs extends __MDLComponent {} + + + interface TextfieldProps extends MDLHTMLAttributes, React.DOMAttributes { + label : string; + disabled ?: boolean; + error ?: React.ReactNode; + expandable ?: boolean; + expandableIcon ?: string; + floatingLabel ?: boolean; + id ?: string; + inputClassName ?: string; + maxRows ?: number; + onChange ?: React.FormEventHandler; + pattern ?: string; + required ?: boolean; + rows ?: number; + value ?: string | number; + + name ?: string; + title ?: string; + } + class Textfield extends __MDLComponent {} + + + interface TooltipProps extends MDLHTMLAttributes, React.DOMAttributes { + label : React.ReactNode; + large ?: boolean; + position ?: string; + + name ?: string; + title ?: string; + } + class Tooltip extends __MDLComponent {} +} + +declare module 'react-mdl' { + export = __ReactMDL; +} \ No newline at end of file From aa672a5f5f5ac5da6c6db1a4afc3235f499893e3 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Sat, 23 Apr 2016 23:00:44 +0300 Subject: [PATCH 0131/1506] Update grid.d.ts --- gijgo/grid.d.ts | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gijgo/grid.d.ts b/gijgo/grid.d.ts index 5a5faf4840..ff5802482f 100644 --- a/gijgo/grid.d.ts +++ b/gijgo/grid.d.ts @@ -2,3 +2,49 @@ // Project: http://gijgo.com // Definitions by: Atanas Atanasov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface DataGridPager { + limit: number; + sizes: Array +} + +interface DataGridColumn { + title?: any; + field?: any; + align?: string; + type?: string; + icon?: string; + tooltip?: string; + events?: any; + sortable?: boolean; + width?: number; + headerCssClass?: string; +} + +interface DataGridSettings { + title?: string; + dataSource?: any; + primaryKey?: any; + selectionType?: string; + selectionMethod?: string; + uiLibrary?: string; + autoLoad?: boolean; + pager?: DataGridPager; + params?: any; + notFoundText?: string; + minWidth?: number; + columns?: Array; + defaultColumnSettings?: DataGridColumn; +} + +interface DataGrid extends JQuery { + reload(params?: Params): void; + getById(id: number): Entity; + getAll(): Entity[]; + setSelected(id: number, value: any): void; +} + +interface JQuery { + grid(settings: DataGridSettings): DataGrid; + grid(settings: DataGridSettings): DataGrid; +} From 133be9545aa135391539aa95b428c9b59b2898ac Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sun, 24 Apr 2016 14:17:03 +0930 Subject: [PATCH 0132/1506] fixed es6 compilation by chanigng import i don't know why git is saying that every line changed... --- react-mdl/react-mdl-tests.tsx | 2087 ++++++++++++++++----------------- react-mdl/react-mdl.d.ts | 1210 +++++++++---------- 2 files changed, 1648 insertions(+), 1649 deletions(-) diff --git a/react-mdl/react-mdl-tests.tsx b/react-mdl/react-mdl-tests.tsx index eb9981092a..8efcebee52 100644 --- a/react-mdl/react-mdl-tests.tsx +++ b/react-mdl/react-mdl-tests.tsx @@ -1,1044 +1,1043 @@ -// Test file for react-mdl Definition file -/// - -import React = require('react'); -import {Badge, - FABButton, Button, IconButton, - Card, CardActions, CardTitle, CardText, CardMenu, CardMedia, - Checkbox, - DataTable, TableHeader, Table, - Dialog, DialogTitle, DialogContent, DialogActions, - Grid, Cell, - Icon, IconToggle, - Layout, Header, Navigation, Drawer, Content, HeaderRow, HeaderTabs, Footer, FooterDropDownSection, FooterLinkList, FooterSection, - List, ListItem, ListItemContent, ListItemAction, - Menu, MenuItem, - ProgressBar, - RadioGroup, Radio, - Slider, - Snackbar, - Spinner, - Switch, - Tabs, Tab, - Textfield, - Tooltip} from 'react-mdl'; - -// all tests are from the examples provided here: https://tleunen.github.io/react-mdl/ - -// Badge tests -React.createClass({ - render: function() { - return ( -

- {/* Number badge on icon */} - - - - - {/* Icon badge on icon */} - - - - - {/* Number badge on text */} - Inbox - - {/* Icon badge without background on text */} - Mood -
- ); - } -}); - -// Button tests -React.createClass({ - render: function() { - return ( -
- {/* Colored FAB button */} - - - - - {/* Colored FAB button with ripple */} - - - - - {/* FAB button */} - - - - - {/* FAB button with ripple */} - - - - - {/* Disabled FAB button */} - - - - - {/* Mini FAB button */} - - - - - {/* Colored Mini FAB button */} - - - - - {/* Raised button */} - - - {/* Raised button with ripple */} - - - {/* Disabled Raised button */} - - - {/* Colored Raised button */} - - - {/* Accent-colored button without ripple */} - - - {/* Accent-colored button with ripple */} - - - {/* Flat button */} - - - {/* Flat button with ripple */} - - - {/* Disabled flat button */} - - - {/* Primary colored flat button */} - - - {/* Accent-colored flat button */} - - - {/* Icon button */} - - - {/* Colored Icon button */} - -
- ); - } -}) - -// Card tests -React.createClass({ - render: function() { - return ( -
- - Welcome - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Mauris sagittis pellentesque lacus eleifend lacinia... - - - - - - - - - - - Update - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Aenan convallis. - - - - - - - - - - - Image.jpg - - - - - - -

- Featured event:
- May 24, 2016
- 7-11pm -

-
- - -
- -
-
-
- ); - } -}); - -// Checkbox tests -React.createClass({ - render: function() { - return ( -
- - - -
- ); - } -}); - -// DataTable tests -React.createClass({ - render: function() { - return ( -
- - Material - Quantity - `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price - - - - Material - Quantity - `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price - - - - (isAsc ? a : b).match(/\((.*)\)/)[1].localeCompare((isAsc ? b : a).match(/\((.*)\)/)[1])} - tooltip="The amazing material name" - > - Material - - - Quantity - - `\$${price.toFixed(2)}`} - tooltip="Price pet unit" - > - Price - -
-
- ); - } -}); - -// Dialog tests -React.createClass({ - render: function() { - return ( -
-
- - - Allow data collection? - -

Allowing us to collect data will let us get you the information you want faster.

-
- - - - -
-
- -
- - - Allow this site to collect usage data to improve your experience? - -

Allowing us to collect data will let us get you the information you want faster.

-
- - - - -
-
- -
- - - Allow data collection? - -

Allowing us to collect data will let us get you the information you want faster.

-
- - - - -
-
-
- ); - } -}); - -// Grid tests -React.createClass({ - render: function() { - return ( -
-
- - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - - - 4 - 4 - 4 - - - 6 - 4 - 2 - - - 6 (8 tablet) - 4 (6 tablet) - 2 (4 phone) - -
-
- ); - } -}); - -// IconToggle tests -React.createClass({ - render: function() { - return ( -
- - - -
- ); - } -}); - -// Layout tests -React.createClass({ - render: function() { - return ( -
- {/* Uses a transparent header that draws on top of the layout's background */} -
- -
- - Link - Link - Link - Link - -
- - - Link - Link - Link - Link - - - -
-
- - {/* No header, and the drawer stays open on larger screens (fixed drawer). */} -
- - - - Link - Link - Link - Link - - - - -
- - {/* Always shows a header, even in smaller screens. */} -
- -
Area / The Title}> - - Link - Link - Link - Link - -
- - - Link - Link - Link - Link - - - -
-
- - {/* The drawer is always open in large screens. The header is always shown, even in small screens. */} -
- -
- {}} - label="Search" - expandable - expandableIcon="search" - /> -
- - - Link - Link - Link - Link - - - -
-
- - {/* Uses a header that scrolls with the text, rather than staying locked at the top */} -
- -
- - Link - Link - Link - Link - -
- - - Link - Link - Link - Link - - - -
- - -
- - {/* Uses a header that contracts as the page scrolls down. */} -
- -
- - {}} - label="Search" - expandable - expandableIcon="search" - /> - - - - Link - Link - Link - Link - - -
- - - Link - Link - Link - Link - - - -
- - -
- - {/* Hide the top part of the header when scrolling down */} -
- -
- - {}} - label="Search" - expandable - expandableIcon="search" - /> - - - - Link - Link - Link - Link - - -
- - - Link - Link - Link - Link - - - -
- - -
- -
- -
- - this.setState({ activeTab: tabId })}> - Tab1 - Tab2 - Tab3 - Tab4 - Tab5 - Tab6 - -
- - -
Content for the tab: {this.state.activeTab}
-
-
-
- - {/* Simple header with fixed tabs. */} -
- -
- - {}}> - Tab1 - Tab2 - Tab3 - -
- - -
You can add logic to update the content of this container based on the "activeTab" receive in the `onChange` callback.
-
-
-
- - - - -
- ); - } -}); - -// List tests -React.createClass({ - render: function() { - return ( -
- - Bryan Cranston - Aaron Paul - Bob Odenkirk - - - - - Bryan Cranston - - - Aaron Paul - - - Bob Odenkirk - - - - - - Bryan Cranston - - - - - - Aaron Paul - - - - - - Bob Odenkirk - - - - - - - - - Bryan Cranston - - - - - - Aaron Paul - - - - - - Bob Odenkirk - - - - - - - - - Bryan Cranston - - - - - - Aaron Paul - - - - - - Bob Odenkirk - - - - - - - - - Bryan Cranston - - - - - - Aaron Paul - - - - - - Bob Odenkirk - - - - - -
- ); - } -}); - -// Menu tests -React.createClass({ - render: function() { - return ( -
- {/* Lower left */} -
- - - Some Action - Another Action - Disabled Action - Yet Another Action - -
- - {/* Lower right */} -
- - - Some Action - Another Action - Disabled Action - Yet Another Action - -
- - {/* Top left */} -
- - - Some Action - Another Action - Disabled Action - Yet Another Action - -
- - {/* Top right */} -
- - - Some Action - Another Action - Disabled Action - Yet Another Action - -
-
- ); - } -}); - -// ProgressBar tests -React.createClass({ - render: function() { - return ( -
- {/* Simple Progress Bar */} - - - {/* Progress Bar with Indeterminate Progress */} - - - {/* Progress Bar with Buffering */} - -
- ); - } -}); - -// Radio tests -React.createClass({ - render: function() { - return ( -
- - Ripple option - Other option - - - - Ripple option - Other option - -
- ); - } -}); - -// Slider tests -React.createClass({ - render: function() { - return ( -
- {/* Default slider */} - - - {/* Slider with initial value */} - -
- ); - } -}); - -// Snackbar tests -React.createClass({ - render: function() { - return ( -
-
- - Button color changed. -
- -
- - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius luctus quam. Fusce quis blandit libero. Donec accumsan nunc lectus, vel blandit diam bibendum ac. Integer faucibus, lorem et convallis fermentum, diam dolor imperdiet mi, nec iaculis risus mauris id elit. Vivamus vel eros dapibus, molestie ante ut, vestibulum sem. - -
-
- ); - } -}); - -// Spinner tests -React.createClass({ - render: function() { - return ( -
- {/* Simple spinner */} - - - {/* Single color spinner */} - -
- ); - } -}); - -// Switch tests -React.createClass({ - render: function() { - return ( -
- Ripple switch - - Switch -
- ); - } -}); - -// Tab tests -React.createClass({ - render: function() { - return ( -
-
- this.setState({ activeTab: tabId })} ripple> - Starks - Lannisters - Targaryens - -
-
Content for the tab: {this.state.activeTab}
-
-
-
- ); - } -}); - -// Textfield tests -React.createClass({ - render: function() { - return ( -
- {/* Simple textfield */} - {}} - label="Text..." - style={{width: '200px'}} - /> - - {/* Numeric textfield */} - {}} - pattern="-?[0-9]*(\.[0-9]+)?" - error="Input is not a number!" - label="Number..." - style={{width: '200px'}} - /> - - {/* Textfield with floating label */} - {}} - label="Text..." - floatingLabel - style={{width: '200px'}} - /> - - {/* Numeric Textfield with floating label */} - {}} - pattern="-?[0-9]*(\.[0-9]+)?" - error="Input is not a number!" - label="Number..." - floatingLabel - /> -
- ); - } -}); - -// Tooltip tests -React.createClass({ - render: function() { - return ( -
- {/* Simple tooltip */} - - - - - {/* Large Tooltip */} - - - - - {/* Rich Tooltip */} - Upload file.zip}> - - - - {/* Multiline Tooltip */} - Share your content
via social media}> - -
- - {/* Right Tooltip */} - - - - - {/* Left Tooltip */} - - - - - {/* Top Tooltip */} - - - - - {/* Bottom Tooltip */} - - - -
- ); - } -}); +// Test file for react-mdl Definition file +/// + +import {Badge, + FABButton, Button, IconButton, + Card, CardActions, CardTitle, CardText, CardMenu, CardMedia, + Checkbox, + DataTable, TableHeader, Table, + Dialog, DialogTitle, DialogContent, DialogActions, + Grid, Cell, + Icon, IconToggle, + Layout, Header, Navigation, Drawer, Content, HeaderRow, HeaderTabs, Footer, FooterDropDownSection, FooterLinkList, FooterSection, + List, ListItem, ListItemContent, ListItemAction, + Menu, MenuItem, + ProgressBar, + RadioGroup, Radio, + Slider, + Snackbar, + Spinner, + Switch, + Tabs, Tab, + Textfield, + Tooltip} from 'react-mdl'; + +// all tests are from the examples provided here: https://tleunen.github.io/react-mdl/ + +// Badge tests +React.createClass({ + render: function() { + return ( +
+ {/* Number badge on icon */} + + + + + {/* Icon badge on icon */} + + + + + {/* Number badge on text */} + Inbox + + {/* Icon badge without background on text */} + Mood +
+ ); + } +}); + +// Button tests +React.createClass({ + render: function() { + return ( +
+ {/* Colored FAB button */} + + + + + {/* Colored FAB button with ripple */} + + + + + {/* FAB button */} + + + + + {/* FAB button with ripple */} + + + + + {/* Disabled FAB button */} + + + + + {/* Mini FAB button */} + + + + + {/* Colored Mini FAB button */} + + + + + {/* Raised button */} + + + {/* Raised button with ripple */} + + + {/* Disabled Raised button */} + + + {/* Colored Raised button */} + + + {/* Accent-colored button without ripple */} + + + {/* Accent-colored button with ripple */} + + + {/* Flat button */} + + + {/* Flat button with ripple */} + + + {/* Disabled flat button */} + + + {/* Primary colored flat button */} + + + {/* Accent-colored flat button */} + + + {/* Icon button */} + + + {/* Colored Icon button */} + +
+ ); + } +}) + +// Card tests +React.createClass({ + render: function() { + return ( +
+ + Welcome + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Mauris sagittis pellentesque lacus eleifend lacinia... + + + + + + + + + + + Update + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Aenan convallis. + + + + + + + + + + + Image.jpg + + + + + + +

+ Featured event:
+ May 24, 2016
+ 7-11pm +

+
+ + +
+ +
+
+
+ ); + } +}); + +// Checkbox tests +React.createClass({ + render: function() { + return ( +
+ + + +
+ ); + } +}); + +// DataTable tests +React.createClass({ + render: function() { + return ( +
+ + Material + Quantity + `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price + + + + Material + Quantity + `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price + + + + (isAsc ? a : b).match(/\((.*)\)/)[1].localeCompare((isAsc ? b : a).match(/\((.*)\)/)[1])} + tooltip="The amazing material name" + > + Material + + + Quantity + + `\$${price.toFixed(2)}`} + tooltip="Price pet unit" + > + Price + +
+
+ ); + } +}); + +// Dialog tests +React.createClass({ + render: function() { + return ( +
+
+ + + Allow data collection? + +

Allowing us to collect data will let us get you the information you want faster.

+
+ + + + +
+
+ +
+ + + Allow this site to collect usage data to improve your experience? + +

Allowing us to collect data will let us get you the information you want faster.

+
+ + + + +
+
+ +
+ + + Allow data collection? + +

Allowing us to collect data will let us get you the information you want faster.

+
+ + + + +
+
+
+ ); + } +}); + +// Grid tests +React.createClass({ + render: function() { + return ( +
+
+ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 4 + 4 + 4 + + + 6 + 4 + 2 + + + 6 (8 tablet) + 4 (6 tablet) + 2 (4 phone) + +
+
+ ); + } +}); + +// IconToggle tests +React.createClass({ + render: function() { + return ( +
+ + + +
+ ); + } +}); + +// Layout tests +React.createClass({ + render: function() { + return ( +
+ {/* Uses a transparent header that draws on top of the layout's background */} +
+ +
+ + Link + Link + Link + Link + +
+ + + Link + Link + Link + Link + + + +
+
+ + {/* No header, and the drawer stays open on larger screens (fixed drawer). */} +
+ + + + Link + Link + Link + Link + + + + +
+ + {/* Always shows a header, even in smaller screens. */} +
+ +
Area / The Title}> + + Link + Link + Link + Link + +
+ + + Link + Link + Link + Link + + + +
+
+ + {/* The drawer is always open in large screens. The header is always shown, even in small screens. */} +
+ +
+ {}} + label="Search" + expandable + expandableIcon="search" + /> +
+ + + Link + Link + Link + Link + + + +
+
+ + {/* Uses a header that scrolls with the text, rather than staying locked at the top */} +
+ +
+ + Link + Link + Link + Link + +
+ + + Link + Link + Link + Link + + + +
+ + +
+ + {/* Uses a header that contracts as the page scrolls down. */} +
+ +
+ + {}} + label="Search" + expandable + expandableIcon="search" + /> + + + + Link + Link + Link + Link + + +
+ + + Link + Link + Link + Link + + + +
+ + +
+ + {/* Hide the top part of the header when scrolling down */} +
+ +
+ + {}} + label="Search" + expandable + expandableIcon="search" + /> + + + + Link + Link + Link + Link + + +
+ + + Link + Link + Link + Link + + + +
+ + +
+ +
+ +
+ + this.setState({ activeTab: tabId })}> + Tab1 + Tab2 + Tab3 + Tab4 + Tab5 + Tab6 + +
+ + +
Content for the tab: {this.state.activeTab}
+
+
+
+ + {/* Simple header with fixed tabs. */} +
+ +
+ + {}}> + Tab1 + Tab2 + Tab3 + +
+ + +
You can add logic to update the content of this container based on the "activeTab" receive in the `onChange` callback.
+
+
+
+ + + + +
+ ); + } +}); + +// List tests +React.createClass({ + render: function() { + return ( +
+ + Bryan Cranston + Aaron Paul + Bob Odenkirk + + + + + Bryan Cranston + + + Aaron Paul + + + Bob Odenkirk + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + + + + + Bryan Cranston + + + + + + Aaron Paul + + + + + + Bob Odenkirk + + + + + +
+ ); + } +}); + +// Menu tests +React.createClass({ + render: function() { + return ( +
+ {/* Lower left */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+ + {/* Lower right */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+ + {/* Top left */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+ + {/* Top right */} +
+ + + Some Action + Another Action + Disabled Action + Yet Another Action + +
+
+ ); + } +}); + +// ProgressBar tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple Progress Bar */} + + + {/* Progress Bar with Indeterminate Progress */} + + + {/* Progress Bar with Buffering */} + +
+ ); + } +}); + +// Radio tests +React.createClass({ + render: function() { + return ( +
+ + Ripple option + Other option + + + + Ripple option + Other option + +
+ ); + } +}); + +// Slider tests +React.createClass({ + render: function() { + return ( +
+ {/* Default slider */} + + + {/* Slider with initial value */} + +
+ ); + } +}); + +// Snackbar tests +React.createClass({ + render: function() { + return ( +
+
+ + Button color changed. +
+ +
+ + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius luctus quam. Fusce quis blandit libero. Donec accumsan nunc lectus, vel blandit diam bibendum ac. Integer faucibus, lorem et convallis fermentum, diam dolor imperdiet mi, nec iaculis risus mauris id elit. Vivamus vel eros dapibus, molestie ante ut, vestibulum sem. + +
+
+ ); + } +}); + +// Spinner tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple spinner */} + + + {/* Single color spinner */} + +
+ ); + } +}); + +// Switch tests +React.createClass({ + render: function() { + return ( +
+ Ripple switch + + Switch +
+ ); + } +}); + +// Tab tests +React.createClass({ + render: function() { + return ( +
+
+ this.setState({ activeTab: tabId })} ripple> + Starks + Lannisters + Targaryens + +
+
Content for the tab: {this.state.activeTab}
+
+
+
+ ); + } +}); + +// Textfield tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple textfield */} + {}} + label="Text..." + style={{width: '200px'}} + /> + + {/* Numeric textfield */} + {}} + pattern="-?[0-9]*(\.[0-9]+)?" + error="Input is not a number!" + label="Number..." + style={{width: '200px'}} + /> + + {/* Textfield with floating label */} + {}} + label="Text..." + floatingLabel + style={{width: '200px'}} + /> + + {/* Numeric Textfield with floating label */} + {}} + pattern="-?[0-9]*(\.[0-9]+)?" + error="Input is not a number!" + label="Number..." + floatingLabel + /> +
+ ); + } +}); + +// Tooltip tests +React.createClass({ + render: function() { + return ( +
+ {/* Simple tooltip */} + + + + + {/* Large Tooltip */} + + + + + {/* Rich Tooltip */} + Upload file.zip}> + + + + {/* Multiline Tooltip */} + Share your content
via social media}> + +
+ + {/* Right Tooltip */} + + + + + {/* Left Tooltip */} + + + + + {/* Top Tooltip */} + + + + + {/* Bottom Tooltip */} + + + +
+ ); + } +}); diff --git a/react-mdl/react-mdl.d.ts b/react-mdl/react-mdl.d.ts index 86516b75f0..56d688c7f4 100644 --- a/react-mdl/react-mdl.d.ts +++ b/react-mdl/react-mdl.d.ts @@ -1,606 +1,606 @@ -// Type definitions for react-mdl 1.5.3 -// Project: https://github.com/tleunen/react-mdl -// Definitions by: Brad Zacher -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace __ReactMDL { - import React = __React; - - type __MDLClassProps = React.ClassAttributes; - type __MDLOtherProps = React.HTMLProps; - class __MDLComponent

extends React.Component {} - class __MDLBasicComponent extends __MDLComponent<__MDLOtherProps> {} - - interface ShadowedComponent { - shadow ?: number; - } - interface RippleComponent { - ripple ?: boolean; - } - interface CustomRenderedComponent { - component ?: string | JSX.Element | Function; - } - - - // HTMLAttributes (minus the 'data', 'icon', 'label', 'name', 'rows', 'size', 'title', 'value' attributes) - interface MDLHTMLAttributes { - // React-specific Attributes - defaultChecked?: boolean; - defaultValue?: string | string[]; - - // Standard HTML Attributes - accept?: string; - acceptCharset?: string; - accessKey?: string; - action?: string; - allowFullScreen?: boolean; - allowTransparency?: boolean; - alt?: string; - async?: boolean; - autoComplete?: string; - autoFocus?: boolean; - autoPlay?: boolean; - capture?: boolean; - cellPadding?: number | string; - cellSpacing?: number | string; - charSet?: string; - challenge?: string; - checked?: boolean; - classID?: string; - className?: string; - cols?: number; - colSpan?: number; - content?: string; - contentEditable?: boolean; - contextMenu?: string; - controls?: boolean; - coords?: string; - crossOrigin?: string; - dateTime?: string; - default?: boolean; - defer?: boolean; - dir?: string; - disabled?: boolean; - download?: any; - draggable?: boolean; - encType?: string; - form?: string; - formAction?: string; - formEncType?: string; - formMethod?: string; - formNoValidate?: boolean; - formTarget?: string; - frameBorder?: number | string; - headers?: string; - height?: number | string; - hidden?: boolean; - high?: number; - href?: string; - hrefLang?: string; - htmlFor?: string; - httpEquiv?: string; - id?: string; - inputMode?: string; - integrity?: string; - is?: string; - keyParams?: string; - keyType?: string; - kind?: string; - lang?: string; - list?: string; - loop?: boolean; - low?: number; - manifest?: string; - marginHeight?: number; - marginWidth?: number; - max?: number | string; - maxLength?: number; - media?: string; - mediaGroup?: string; - method?: string; - min?: number | string; - minLength?: number; - multiple?: boolean; - muted?: boolean; - nonce?: string; - noValidate?: boolean; - open?: boolean; - optimum?: number; - pattern?: string; - placeholder?: string; - poster?: string; - preload?: string; - radioGroup?: string; - readOnly?: boolean; - rel?: string; - required?: boolean; - reversed?: boolean; - role?: string; - rowSpan?: number; - sandbox?: string; - scope?: string; - scoped?: boolean; - scrolling?: string; - seamless?: boolean; - selected?: boolean; - shape?: string; - sizes?: string; - span?: number; - spellCheck?: boolean; - src?: string; - srcDoc?: string; - srcLang?: string; - srcSet?: string; - start?: number; - step?: number | string; - style?: React.CSSProperties; - summary?: string; - tabIndex?: number; - target?: string; - type?: string; - useMap?: string; - width?: number | string; - wmode?: string; - wrap?: string; - - // RDFa Attributes - about?: string; - datatype?: string; - inlist?: any; - prefix?: string; - property?: string; - resource?: string; - typeof?: string; - vocab?: string; - - // Non-standard Attributes - autoCapitalize?: string; - autoCorrect?: string; - autoSave?: string; - color?: string; - itemProp?: string; - itemScope?: boolean; - itemType?: string; - itemID?: string; - itemRef?: string; - results?: number; - security?: string; - unselectable?: boolean; - - // Allows aria- and data- Attributes - [key: string]: any; - } - // DOMAttributes (minus 'onClick', 'onChange') - interface MDLDOMAttributes { - // DOMAttributes (minus onClick) - children?: React.ReactNode; - dangerouslySetInnerHTML?: { - __html: string; - }; - - // Clipboard Events - onCopy?: React.ClipboardEventHandler; - onCut?: React.ClipboardEventHandler; - onPaste?: React.ClipboardEventHandler; - - // Composition Events - onCompositionEnd?: React.CompositionEventHandler; - onCompositionStart?: React.CompositionEventHandler; - onCompositionUpdate?: React.CompositionEventHandler; - - // Focus Events - onFocus?: React.FocusEventHandler; - onBlur?: React.FocusEventHandler; - - // Form Events - onInput?: React.FormEventHandler; - onSubmit?: React.FormEventHandler; - - // Image Events - onLoad?: React.ReactEventHandler; - onError?: React.ReactEventHandler; // also a Media Event - - // Keyboard Events - onKeyDown?: React.KeyboardEventHandler; - onKeyPress?: React.KeyboardEventHandler; - onKeyUp?: React.KeyboardEventHandler; - - // Media Events - onAbort?: React.ReactEventHandler; - onCanPlay?: React.ReactEventHandler; - onCanPlayThrough?: React.ReactEventHandler; - onDurationChange?: React.ReactEventHandler; - onEmptied?: React.ReactEventHandler; - onEncrypted?: React.ReactEventHandler; - onEnded?: React.ReactEventHandler; - onLoadedData?: React.ReactEventHandler; - onLoadedMetadata?: React.ReactEventHandler; - onLoadStart?: React.ReactEventHandler; - onPause?: React.ReactEventHandler; - onPlay?: React.ReactEventHandler; - onPlaying?: React.ReactEventHandler; - onProgress?: React.ReactEventHandler; - onRateChange?: React.ReactEventHandler; - onSeeked?: React.ReactEventHandler; - onSeeking?: React.ReactEventHandler; - onStalled?: React.ReactEventHandler; - onSuspend?: React.ReactEventHandler; - onTimeUpdate?: React.ReactEventHandler; - onVolumeChange?: React.ReactEventHandler; - onWaiting?: React.ReactEventHandler; - - // MouseEvents - onContextMenu?: React.MouseEventHandler; - onDoubleClick?: React.MouseEventHandler; - onDrag?: React.DragEventHandler; - onDragEnd?: React.DragEventHandler; - onDragEnter?: React.DragEventHandler; - onDragExit?: React.DragEventHandler; - onDragLeave?: React.DragEventHandler; - onDragOver?: React.DragEventHandler; - onDragStart?: React.DragEventHandler; - onDrop?: React.DragEventHandler; - onMouseDown?: React.MouseEventHandler; - onMouseEnter?: React.MouseEventHandler; - onMouseLeave?: React.MouseEventHandler; - onMouseMove?: React.MouseEventHandler; - onMouseOut?: React.MouseEventHandler; - onMouseOver?: React.MouseEventHandler; - onMouseUp?: React.MouseEventHandler; - - // Selection Events - onSelect?: React.ReactEventHandler; - - // Touch Events - onTouchCancel?: React.TouchEventHandler; - onTouchEnd?: React.TouchEventHandler; - onTouchMove?: React.TouchEventHandler; - onTouchStart?: React.TouchEventHandler; - - // UI Events - onScroll?: React.UIEventHandler; - - // Wheel Events - onWheel?: React.WheelEventHandler; - } - - - - interface BadgeProps extends __MDLClassProps { - text: string | number; - className ?: string; - noBackground ?: boolean; - overlap ?: boolean; - } - class Badge extends __MDLComponent {} - - - interface ButtonProps extends __MDLOtherProps, RippleComponent, CustomRenderedComponent { - accent ?: boolean; - colored ?: boolean; - primary ?: boolean; - } - interface StandardButtonProps extends ButtonProps { - raised ?: boolean; - } - interface FABButtonProps extends ButtonProps { - mini ?: boolean; - } - interface IconButtonProps extends ButtonProps { - name ?: string; - raised ?: boolean; - } - class Button extends __MDLComponent {} - class FABButton extends __MDLComponent {} - class IconButton extends __MDLComponent {} - - - interface CardProps extends __MDLOtherProps, ShadowedComponent {} - interface CardActionProps extends __MDLOtherProps { - border ?: boolean; - } - interface CardTitleProps extends __MDLOtherProps { - expand ?: boolean; - } - class Card extends __MDLComponent {} - class CardActions extends __MDLComponent {} - class CardTitle extends __MDLComponent {} - class CardText extends __MDLBasicComponent {} - class CardMenu extends __MDLBasicComponent {} - class CardMedia extends __MDLBasicComponent {} - - - interface CheckboxProps extends __MDLOtherProps, RippleComponent { - checked ?: boolean; - disabled ?: boolean; - label ?: string; - } - class Checkbox extends __MDLComponent {} - - interface UndecoratedTableProps extends __MDLClassProps, MDLHTMLAttributes, React.DOMAttributes, ShadowedComponent { - rows: Array; - rowKeyColumn ?: string; - - name ?: string; - title ?: string; - } - interface TableProps extends UndecoratedTableProps { - sortable ?: boolean; - selectable ?: boolean; - onSelectionChanged ?: (row : any) => any; - } - interface TableHeaderProps extends __MDLClassProps, MDLHTMLAttributes, MDLDOMAttributes { - name : string; - title ?: string; - cellFormatter ?: (value : any, row : any, index : number) => React.ReactNode; - numeric ?: boolean; - nosort ?: boolean; - onClick ?: (e : React.MouseEvent, name : string) => any; - sortFn ?: (a : any, b : any, isAsc : boolean) => number; - tooltip ?: React.ReactNode; - } - class Table extends __MDLComponent {} - class TableHeader extends __MDLComponent {} - class UndecoratedTable extends __MDLComponent {} - class DataTable extends Table {} - - - interface DialogProps extends __MDLOtherProps { - open ?: boolean; - } - interface DialogActionsProps extends __MDLOtherProps { - fullWidth ?: boolean; - } - interface DialogTitleProps extends __MDLOtherProps, CustomRenderedComponent {} - class Dialog extends __MDLComponent {} - class DialogActions extends __MDLComponent {} - class DialogTitle extends __MDLComponent {} - class DialogContent extends __MDLBasicComponent {} - - - interface GridProps extends __MDLOtherProps, CustomRenderedComponent, ShadowedComponent { - noSpacing ?: boolean; - } - interface CellProps extends __MDLOtherProps, CustomRenderedComponent, ShadowedComponent { - col : number; - align ?: string; - phone ?: number; - tablet ?: number; - hideDesktop ?: boolean; - hidePhone ?: boolean; - hideTablet ?: boolean; - } - class Grid extends __MDLComponent {} - class Cell extends __MDLComponent {} - - - interface IconProps extends __MDLOtherProps { - name : string; - } - class Icon extends __MDLComponent {} - - - interface IconToggleProps extends __MDLOtherProps, RippleComponent { - name : string; - checked ?: boolean; - disabled ?: boolean; - } - class IconToggle extends __MDLComponent {} - - - interface ContentProps extends __MDLOtherProps, CustomRenderedComponent {} - interface DrawerProps extends __MDLOtherProps { - title ?: string; - } - interface HeaderProps extends __MDLOtherProps { - title ?: string; - scroll ?: boolean; - seamed ?: boolean; - transparent ?: boolean; - waterfall ?: boolean; - hideTop ?: boolean; - } - interface HeaderRowProps extends __MDLOtherProps { - title ?: string; - } - interface HeaderTabsProps extends __MDLOtherProps, RippleComponent { - activeTab ?: number; - onChange ?: React.FormEventHandler; - } - interface LayoutProps extends __MDLOtherProps { - fixedDrawer ?: boolean; - fixedHeader ?: boolean; - fixedTabse ?: boolean; - } - interface NavigationProps extends __MDLOtherProps {} - class Content extends __MDLComponent {} - class Drawer extends __MDLComponent {} - class Header extends __MDLComponent {} - class HeaderRow extends __MDLComponent {} - class HeaderTabs extends __MDLComponent {} - class Layout extends __MDLComponent {} - class Navigation extends __MDLComponent {} - class Spacer extends __MDLBasicComponent {} - - interface FooterProps extends MDLHTMLAttributes, React.DOMAttributes { - size ?: string; - - title ?: string; - } - interface FooterDropDownSectionProps extends MDLHTMLAttributes, React.DOMAttributes { - size ?: string; - title : React.ReactNode; - } - interface FooterLinkListProps extends MDLHTMLAttributes, React.DOMAttributes { - size ?: string; - - title ?: string; - } - interface FooterSectionProps extends MDLHTMLAttributes, React.DOMAttributes { - size ?: string; - type ?: string; - logo ?: React.ReactNode; - - title ?: string; - } - class Footer extends __MDLComponent {} - class FooterDropDownSection extends __MDLComponent {} - class FooterLinkList extends __MDLComponent {} - class FooterSection extends __MDLComponent {} - - interface ListItemProps extends __MDLOtherProps { - twoLine ?: boolean; - threeLine ?: boolean; - } - interface ListItemActionProps extends __MDLOtherProps { - info ?: string; - } - interface ListItemContentProps extends MDLHTMLAttributes, React.DOMAttributes { - avatar ?: string | JSX.Element; - icon ?: string | JSX.Element; - subtitle ?: React.ReactNode; - useBodyClass ?: boolean; - } - class List extends __MDLBasicComponent {} - class ListItem extends __MDLComponent {} - class ListItemAction extends __MDLComponent {} - class ListItemContent extends __MDLComponent {} - - - interface MenuProps extends __MDLOtherProps, RippleComponent { - target : string; - align ?: string; - valign ?: string; - } - class Menu extends __MDLComponent {} - class MenuItem extends __MDLBasicComponent {} - - - interface ProgressBarProps extends __MDLOtherProps { - buffer ?: number; - indeterminate ?: boolean; - progress ?: number; - } - class ProgressBar extends __MDLComponent {} - - - interface RadioProps extends MDLHTMLAttributes, React.DOMAttributes, RippleComponent { - value : string | number; - checked ?: boolean; - disabled ?: boolean; - name ?: string; - onChange ?: React.FormEventHandler; - label ?: string; - } - interface RadioGroupProps extends MDLHTMLAttributes, React.DOMAttributes { - name : string; - value : string | number; - childContainer ?: string; - container ?: string; - onChange ?: React.FormEventHandler; - label ?: string; - } - class Radio extends __MDLComponent {} - class RadioGroup extends __MDLComponent {} - - - interface SliderProps extends MDLHTMLAttributes, React.DOMAttributes { - max : number; - min : number; - onChange ?: React.FormEventHandler; - value ?: number; - } - class Slider extends __MDLComponent {} - - - interface SnackbarProps extends __MDLOtherProps { - active : boolean; - onTimeout : () => any; - action ?: string; - onActionClick ?: React.MouseEventHandler; - timeout ?: number; - } - class Snackbar extends __MDLComponent {} - - - interface SpinnerProps extends __MDLOtherProps { - singleColor ?: boolean; - } - class Spinner extends __MDLComponent {} - - - interface SwitchProps extends __MDLOtherProps, RippleComponent { - checked ?: boolean; - disabled ?: boolean; - onChange ?: React.FormEventHandler; - } - class Switch extends __MDLComponent {} - - - interface TabProps extends __MDLOtherProps, CustomRenderedComponent { - active ?: boolean; - cssPrefix ?: string; - onTabClick ?: (tabId : number) => any; - tabId ?: number; - } - interface TabBarProps extends MDLHTMLAttributes, MDLDOMAttributes { - cssPrefix : string; - activeTab ?: number; - onChange ?: (tabId : number) => any; - - name ?: string; - title ?: string; - onClick ?: React.MouseEventHandler; - } - interface TabsProps extends MDLHTMLAttributes, MDLDOMAttributes { - activeTab ?: number; - onChange ?: (tabId : number) => any; - tabBarProps ?: TabBarProps; - - name ?: string; - title ?: string; - onClick ?: React.MouseEventHandler; - } - class Tab extends __MDLComponent {} - class TabBar extends __MDLComponent {} - class Tabs extends __MDLComponent {} - - - interface TextfieldProps extends MDLHTMLAttributes, React.DOMAttributes { - label : string; - disabled ?: boolean; - error ?: React.ReactNode; - expandable ?: boolean; - expandableIcon ?: string; - floatingLabel ?: boolean; - id ?: string; - inputClassName ?: string; - maxRows ?: number; - onChange ?: React.FormEventHandler; - pattern ?: string; - required ?: boolean; - rows ?: number; - value ?: string | number; - - name ?: string; - title ?: string; - } - class Textfield extends __MDLComponent {} - - - interface TooltipProps extends MDLHTMLAttributes, React.DOMAttributes { - label : React.ReactNode; - large ?: boolean; - position ?: string; - - name ?: string; - title ?: string; - } - class Tooltip extends __MDLComponent {} -} - -declare module 'react-mdl' { - export = __ReactMDL; +// Type definitions for react-mdl 1.5.3 +// Project: https://github.com/tleunen/react-mdl +// Definitions by: Brad Zacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace __ReactMDL { + import React = __React; + + type __MDLClassProps = React.ClassAttributes; + type __MDLOtherProps = React.HTMLProps; + class __MDLComponent

extends React.Component {} + class __MDLBasicComponent extends __MDLComponent<__MDLOtherProps> {} + + interface ShadowedComponent { + shadow ?: number; + } + interface RippleComponent { + ripple ?: boolean; + } + interface CustomRenderedComponent { + component ?: string | JSX.Element | Function; + } + + + // HTMLAttributes (minus the 'data', 'icon', 'label', 'name', 'rows', 'size', 'title', 'value' attributes) + interface MDLHTMLAttributes { + // React-specific Attributes + defaultChecked?: boolean; + defaultValue?: string | string[]; + + // Standard HTML Attributes + accept?: string; + acceptCharset?: string; + accessKey?: string; + action?: string; + allowFullScreen?: boolean; + allowTransparency?: boolean; + alt?: string; + async?: boolean; + autoComplete?: string; + autoFocus?: boolean; + autoPlay?: boolean; + capture?: boolean; + cellPadding?: number | string; + cellSpacing?: number | string; + charSet?: string; + challenge?: string; + checked?: boolean; + classID?: string; + className?: string; + cols?: number; + colSpan?: number; + content?: string; + contentEditable?: boolean; + contextMenu?: string; + controls?: boolean; + coords?: string; + crossOrigin?: string; + dateTime?: string; + default?: boolean; + defer?: boolean; + dir?: string; + disabled?: boolean; + download?: any; + draggable?: boolean; + encType?: string; + form?: string; + formAction?: string; + formEncType?: string; + formMethod?: string; + formNoValidate?: boolean; + formTarget?: string; + frameBorder?: number | string; + headers?: string; + height?: number | string; + hidden?: boolean; + high?: number; + href?: string; + hrefLang?: string; + htmlFor?: string; + httpEquiv?: string; + id?: string; + inputMode?: string; + integrity?: string; + is?: string; + keyParams?: string; + keyType?: string; + kind?: string; + lang?: string; + list?: string; + loop?: boolean; + low?: number; + manifest?: string; + marginHeight?: number; + marginWidth?: number; + max?: number | string; + maxLength?: number; + media?: string; + mediaGroup?: string; + method?: string; + min?: number | string; + minLength?: number; + multiple?: boolean; + muted?: boolean; + nonce?: string; + noValidate?: boolean; + open?: boolean; + optimum?: number; + pattern?: string; + placeholder?: string; + poster?: string; + preload?: string; + radioGroup?: string; + readOnly?: boolean; + rel?: string; + required?: boolean; + reversed?: boolean; + role?: string; + rowSpan?: number; + sandbox?: string; + scope?: string; + scoped?: boolean; + scrolling?: string; + seamless?: boolean; + selected?: boolean; + shape?: string; + sizes?: string; + span?: number; + spellCheck?: boolean; + src?: string; + srcDoc?: string; + srcLang?: string; + srcSet?: string; + start?: number; + step?: number | string; + style?: React.CSSProperties; + summary?: string; + tabIndex?: number; + target?: string; + type?: string; + useMap?: string; + width?: number | string; + wmode?: string; + wrap?: string; + + // RDFa Attributes + about?: string; + datatype?: string; + inlist?: any; + prefix?: string; + property?: string; + resource?: string; + typeof?: string; + vocab?: string; + + // Non-standard Attributes + autoCapitalize?: string; + autoCorrect?: string; + autoSave?: string; + color?: string; + itemProp?: string; + itemScope?: boolean; + itemType?: string; + itemID?: string; + itemRef?: string; + results?: number; + security?: string; + unselectable?: boolean; + + // Allows aria- and data- Attributes + [key: string]: any; + } + // DOMAttributes (minus 'onClick', 'onChange') + interface MDLDOMAttributes { + // DOMAttributes (minus onClick) + children?: React.ReactNode; + dangerouslySetInnerHTML?: { + __html: string; + }; + + // Clipboard Events + onCopy?: React.ClipboardEventHandler; + onCut?: React.ClipboardEventHandler; + onPaste?: React.ClipboardEventHandler; + + // Composition Events + onCompositionEnd?: React.CompositionEventHandler; + onCompositionStart?: React.CompositionEventHandler; + onCompositionUpdate?: React.CompositionEventHandler; + + // Focus Events + onFocus?: React.FocusEventHandler; + onBlur?: React.FocusEventHandler; + + // Form Events + onInput?: React.FormEventHandler; + onSubmit?: React.FormEventHandler; + + // Image Events + onLoad?: React.ReactEventHandler; + onError?: React.ReactEventHandler; // also a Media Event + + // Keyboard Events + onKeyDown?: React.KeyboardEventHandler; + onKeyPress?: React.KeyboardEventHandler; + onKeyUp?: React.KeyboardEventHandler; + + // Media Events + onAbort?: React.ReactEventHandler; + onCanPlay?: React.ReactEventHandler; + onCanPlayThrough?: React.ReactEventHandler; + onDurationChange?: React.ReactEventHandler; + onEmptied?: React.ReactEventHandler; + onEncrypted?: React.ReactEventHandler; + onEnded?: React.ReactEventHandler; + onLoadedData?: React.ReactEventHandler; + onLoadedMetadata?: React.ReactEventHandler; + onLoadStart?: React.ReactEventHandler; + onPause?: React.ReactEventHandler; + onPlay?: React.ReactEventHandler; + onPlaying?: React.ReactEventHandler; + onProgress?: React.ReactEventHandler; + onRateChange?: React.ReactEventHandler; + onSeeked?: React.ReactEventHandler; + onSeeking?: React.ReactEventHandler; + onStalled?: React.ReactEventHandler; + onSuspend?: React.ReactEventHandler; + onTimeUpdate?: React.ReactEventHandler; + onVolumeChange?: React.ReactEventHandler; + onWaiting?: React.ReactEventHandler; + + // MouseEvents + onContextMenu?: React.MouseEventHandler; + onDoubleClick?: React.MouseEventHandler; + onDrag?: React.DragEventHandler; + onDragEnd?: React.DragEventHandler; + onDragEnter?: React.DragEventHandler; + onDragExit?: React.DragEventHandler; + onDragLeave?: React.DragEventHandler; + onDragOver?: React.DragEventHandler; + onDragStart?: React.DragEventHandler; + onDrop?: React.DragEventHandler; + onMouseDown?: React.MouseEventHandler; + onMouseEnter?: React.MouseEventHandler; + onMouseLeave?: React.MouseEventHandler; + onMouseMove?: React.MouseEventHandler; + onMouseOut?: React.MouseEventHandler; + onMouseOver?: React.MouseEventHandler; + onMouseUp?: React.MouseEventHandler; + + // Selection Events + onSelect?: React.ReactEventHandler; + + // Touch Events + onTouchCancel?: React.TouchEventHandler; + onTouchEnd?: React.TouchEventHandler; + onTouchMove?: React.TouchEventHandler; + onTouchStart?: React.TouchEventHandler; + + // UI Events + onScroll?: React.UIEventHandler; + + // Wheel Events + onWheel?: React.WheelEventHandler; + } + + + + interface BadgeProps extends __MDLClassProps { + text: string | number; + className ?: string; + noBackground ?: boolean; + overlap ?: boolean; + } + class Badge extends __MDLComponent {} + + + interface ButtonProps extends __MDLOtherProps, RippleComponent, CustomRenderedComponent { + accent ?: boolean; + colored ?: boolean; + primary ?: boolean; + } + interface StandardButtonProps extends ButtonProps { + raised ?: boolean; + } + interface FABButtonProps extends ButtonProps { + mini ?: boolean; + } + interface IconButtonProps extends ButtonProps { + name ?: string; + raised ?: boolean; + } + class Button extends __MDLComponent {} + class FABButton extends __MDLComponent {} + class IconButton extends __MDLComponent {} + + + interface CardProps extends __MDLOtherProps, ShadowedComponent {} + interface CardActionProps extends __MDLOtherProps { + border ?: boolean; + } + interface CardTitleProps extends __MDLOtherProps { + expand ?: boolean; + } + class Card extends __MDLComponent {} + class CardActions extends __MDLComponent {} + class CardTitle extends __MDLComponent {} + class CardText extends __MDLBasicComponent {} + class CardMenu extends __MDLBasicComponent {} + class CardMedia extends __MDLBasicComponent {} + + + interface CheckboxProps extends __MDLOtherProps, RippleComponent { + checked ?: boolean; + disabled ?: boolean; + label ?: string; + } + class Checkbox extends __MDLComponent {} + + interface UndecoratedTableProps extends __MDLClassProps, MDLHTMLAttributes, React.DOMAttributes, ShadowedComponent { + rows: Array; + rowKeyColumn ?: string; + + name ?: string; + title ?: string; + } + interface TableProps extends UndecoratedTableProps { + sortable ?: boolean; + selectable ?: boolean; + onSelectionChanged ?: (row : any) => any; + } + interface TableHeaderProps extends __MDLClassProps, MDLHTMLAttributes, MDLDOMAttributes { + name : string; + title ?: string; + cellFormatter ?: (value : any, row : any, index : number) => React.ReactNode; + numeric ?: boolean; + nosort ?: boolean; + onClick ?: (e : React.MouseEvent, name : string) => any; + sortFn ?: (a : any, b : any, isAsc : boolean) => number; + tooltip ?: React.ReactNode; + } + class Table extends __MDLComponent {} + class TableHeader extends __MDLComponent {} + class UndecoratedTable extends __MDLComponent {} + class DataTable extends Table {} + + + interface DialogProps extends __MDLOtherProps { + open ?: boolean; + } + interface DialogActionsProps extends __MDLOtherProps { + fullWidth ?: boolean; + } + interface DialogTitleProps extends __MDLOtherProps, CustomRenderedComponent {} + class Dialog extends __MDLComponent {} + class DialogActions extends __MDLComponent {} + class DialogTitle extends __MDLComponent {} + class DialogContent extends __MDLBasicComponent {} + + + interface GridProps extends __MDLOtherProps, CustomRenderedComponent, ShadowedComponent { + noSpacing ?: boolean; + } + interface CellProps extends __MDLOtherProps, CustomRenderedComponent, ShadowedComponent { + col : number; + align ?: string; + phone ?: number; + tablet ?: number; + hideDesktop ?: boolean; + hidePhone ?: boolean; + hideTablet ?: boolean; + } + class Grid extends __MDLComponent {} + class Cell extends __MDLComponent {} + + + interface IconProps extends __MDLOtherProps { + name : string; + } + class Icon extends __MDLComponent {} + + + interface IconToggleProps extends __MDLOtherProps, RippleComponent { + name : string; + checked ?: boolean; + disabled ?: boolean; + } + class IconToggle extends __MDLComponent {} + + + interface ContentProps extends __MDLOtherProps, CustomRenderedComponent {} + interface DrawerProps extends __MDLOtherProps { + title ?: string; + } + interface HeaderProps extends __MDLOtherProps { + title ?: string; + scroll ?: boolean; + seamed ?: boolean; + transparent ?: boolean; + waterfall ?: boolean; + hideTop ?: boolean; + } + interface HeaderRowProps extends __MDLOtherProps { + title ?: string; + } + interface HeaderTabsProps extends __MDLOtherProps, RippleComponent { + activeTab ?: number; + onChange ?: React.FormEventHandler; + } + interface LayoutProps extends __MDLOtherProps { + fixedDrawer ?: boolean; + fixedHeader ?: boolean; + fixedTabse ?: boolean; + } + interface NavigationProps extends __MDLOtherProps {} + class Content extends __MDLComponent {} + class Drawer extends __MDLComponent {} + class Header extends __MDLComponent {} + class HeaderRow extends __MDLComponent {} + class HeaderTabs extends __MDLComponent {} + class Layout extends __MDLComponent {} + class Navigation extends __MDLComponent {} + class Spacer extends __MDLBasicComponent {} + + interface FooterProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + + title ?: string; + } + interface FooterDropDownSectionProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + title : React.ReactNode; + } + interface FooterLinkListProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + + title ?: string; + } + interface FooterSectionProps extends MDLHTMLAttributes, React.DOMAttributes { + size ?: string; + type ?: string; + logo ?: React.ReactNode; + + title ?: string; + } + class Footer extends __MDLComponent {} + class FooterDropDownSection extends __MDLComponent {} + class FooterLinkList extends __MDLComponent {} + class FooterSection extends __MDLComponent {} + + interface ListItemProps extends __MDLOtherProps { + twoLine ?: boolean; + threeLine ?: boolean; + } + interface ListItemActionProps extends __MDLOtherProps { + info ?: string; + } + interface ListItemContentProps extends MDLHTMLAttributes, React.DOMAttributes { + avatar ?: string | JSX.Element; + icon ?: string | JSX.Element; + subtitle ?: React.ReactNode; + useBodyClass ?: boolean; + } + class List extends __MDLBasicComponent {} + class ListItem extends __MDLComponent {} + class ListItemAction extends __MDLComponent {} + class ListItemContent extends __MDLComponent {} + + + interface MenuProps extends __MDLOtherProps, RippleComponent { + target : string; + align ?: string; + valign ?: string; + } + class Menu extends __MDLComponent {} + class MenuItem extends __MDLBasicComponent {} + + + interface ProgressBarProps extends __MDLOtherProps { + buffer ?: number; + indeterminate ?: boolean; + progress ?: number; + } + class ProgressBar extends __MDLComponent {} + + + interface RadioProps extends MDLHTMLAttributes, React.DOMAttributes, RippleComponent { + value : string | number; + checked ?: boolean; + disabled ?: boolean; + name ?: string; + onChange ?: React.FormEventHandler; + label ?: string; + } + interface RadioGroupProps extends MDLHTMLAttributes, React.DOMAttributes { + name : string; + value : string | number; + childContainer ?: string; + container ?: string; + onChange ?: React.FormEventHandler; + label ?: string; + } + class Radio extends __MDLComponent {} + class RadioGroup extends __MDLComponent {} + + + interface SliderProps extends MDLHTMLAttributes, React.DOMAttributes { + max : number; + min : number; + onChange ?: React.FormEventHandler; + value ?: number; + } + class Slider extends __MDLComponent {} + + + interface SnackbarProps extends __MDLOtherProps { + active : boolean; + onTimeout : () => any; + action ?: string; + onActionClick ?: React.MouseEventHandler; + timeout ?: number; + } + class Snackbar extends __MDLComponent {} + + + interface SpinnerProps extends __MDLOtherProps { + singleColor ?: boolean; + } + class Spinner extends __MDLComponent {} + + + interface SwitchProps extends __MDLOtherProps, RippleComponent { + checked ?: boolean; + disabled ?: boolean; + onChange ?: React.FormEventHandler; + } + class Switch extends __MDLComponent {} + + + interface TabProps extends __MDLOtherProps, CustomRenderedComponent { + active ?: boolean; + cssPrefix ?: string; + onTabClick ?: (tabId : number) => any; + tabId ?: number; + } + interface TabBarProps extends MDLHTMLAttributes, MDLDOMAttributes { + cssPrefix : string; + activeTab ?: number; + onChange ?: (tabId : number) => any; + + name ?: string; + title ?: string; + onClick ?: React.MouseEventHandler; + } + interface TabsProps extends MDLHTMLAttributes, MDLDOMAttributes { + activeTab ?: number; + onChange ?: (tabId : number) => any; + tabBarProps ?: TabBarProps; + + name ?: string; + title ?: string; + onClick ?: React.MouseEventHandler; + } + class Tab extends __MDLComponent {} + class TabBar extends __MDLComponent {} + class Tabs extends __MDLComponent {} + + + interface TextfieldProps extends MDLHTMLAttributes, React.DOMAttributes { + label : string; + disabled ?: boolean; + error ?: React.ReactNode; + expandable ?: boolean; + expandableIcon ?: string; + floatingLabel ?: boolean; + id ?: string; + inputClassName ?: string; + maxRows ?: number; + onChange ?: React.FormEventHandler; + pattern ?: string; + required ?: boolean; + rows ?: number; + value ?: string | number; + + name ?: string; + title ?: string; + } + class Textfield extends __MDLComponent {} + + + interface TooltipProps extends MDLHTMLAttributes, React.DOMAttributes { + label : React.ReactNode; + large ?: boolean; + position ?: string; + + name ?: string; + title ?: string; + } + class Tooltip extends __MDLComponent {} +} + +declare module 'react-mdl' { + export = __ReactMDL; } \ No newline at end of file From 1a9ae17cbfab09dcd46bf93f5eebee650aa65f5b Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sun, 24 Apr 2016 14:17:43 +0930 Subject: [PATCH 0133/1506] fixed es6 compilation --- react-mdl/react-mdl-tests.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/react-mdl/react-mdl-tests.tsx b/react-mdl/react-mdl-tests.tsx index 8efcebee52..1e7fd19b0c 100644 --- a/react-mdl/react-mdl-tests.tsx +++ b/react-mdl/react-mdl-tests.tsx @@ -1,6 +1,7 @@ // Test file for react-mdl Definition file /// +import * as React from 'react'; import {Badge, FABButton, Button, IconButton, Card, CardActions, CardTitle, CardText, CardMenu, CardMedia, From 42a3162e0b18c74be82cbf1330197eed408e1229 Mon Sep 17 00:00:00 2001 From: spiffytech Date: Tue, 26 Apr 2016 13:00:27 -0400 Subject: [PATCH 0134/1506] Joi: support alternatives() without parameters. Fix alternatives() not returning interface with try() member. --- joi/joi-tests.ts | 3 +++ joi/joi.d.ts | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index a00543fe4e..bfb039eced 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -732,6 +732,9 @@ namespace common { // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- +schema = Joi.alternatives(); +schema = Joi.alternatives().try(schemaArr); + schema = Joi.alternatives(schemaArr); schema = Joi.alternatives(schema, anySchema, boolSchema); diff --git a/joi/joi.d.ts b/joi/joi.d.ts index d9ee7c20d1..6b9d1dbefa 100644 --- a/joi/joi.d.ts +++ b/joi/joi.d.ts @@ -747,8 +747,9 @@ declare module 'joi' { /** * Generates a type that will match one of the provided alternative schemas */ - export function alternatives(types: Schema[]): Schema; - export function alternatives(type1: Schema, type2: Schema, ...types: Schema[]): Schema; + export function alternatives(): AlternativesSchema; + export function alternatives(types: Schema[]): AlternativesSchema; + export function alternatives(type1: Schema, type2: Schema, ...types: Schema[]): AlternativesSchema; /** * Validates a value using the given schema and options. From 748690dd90f6a45dfedc875f04eb62976cffcc9d Mon Sep 17 00:00:00 2001 From: spiffytech Date: Tue, 26 Apr 2016 13:12:33 -0400 Subject: [PATCH 0135/1506] Joi: support non-array variant of alternatives().try() --- joi/joi-tests.ts | 1 + joi/joi.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index bfb039eced..f12552ead1 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -734,6 +734,7 @@ namespace common { schema = Joi.alternatives(); schema = Joi.alternatives().try(schemaArr); +schema = Joi.alternatives().try(schema, schema); schema = Joi.alternatives(schemaArr); schema = Joi.alternatives(schema, anySchema, boolSchema); diff --git a/joi/joi.d.ts b/joi/joi.d.ts index 6b9d1dbefa..8f9fa6db95 100644 --- a/joi/joi.d.ts +++ b/joi/joi.d.ts @@ -691,6 +691,7 @@ declare module 'joi' { export interface AlternativesSchema extends AnySchema { try(schemas: Schema[]): AlternativesSchema; + try(type1: Schema, type2: Schema, ...types: Schema[]): AlternativesSchema; when(ref: string, options: WhenOptions): AlternativesSchema; when(ref: Reference, options: WhenOptions): AlternativesSchema; } From 9d139b8fa6c2bbf0bb151e5a1521ebc50418a367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luiz=20dos=20Santos?= Date: Thu, 28 Apr 2016 10:28:35 -0300 Subject: [PATCH 0136/1506] Add type definitions for RxJS bindings for Node --- rx-node/rx.node-tests.ts | 52 +++++++++++++++++++++++++++ rx-node/rx.node.d.ts | 77 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 rx-node/rx.node-tests.ts create mode 100644 rx-node/rx.node.d.ts diff --git a/rx-node/rx.node-tests.ts b/rx-node/rx.node-tests.ts new file mode 100644 index 0000000000..254ef6e242 --- /dev/null +++ b/rx-node/rx.node-tests.ts @@ -0,0 +1,52 @@ +// Type definitions for RxJS bindings for Node +// Project: https://github.com/Reactive-Extensions/rx-node +// Definitions by: Andre Luiz dos Santos +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +import RxNode = require('rx-node'); + +{ + var source = Rx.Observable.return(42); + var emitter = RxNode.toEventEmitter(source, 'data'); + + emitter.on('data', function(data: number) { + console.log('Data: ' + data); + }); + + emitter.on('end', function() { + console.log('End'); + }); + + // Ensure to call publish to fire events from the observable + emitter.publish(); +} +{ + var subscription = RxNode.fromStream(process.stdin, 'end') + .subscribe(function(x) { console.log(x); }); +} +{ + var subscription = RxNode.fromReadableStream(process.stdin) + .subscribe(function(x) { console.log(x); }); +} +{ + var readline = require('readline'); + var fs = require('fs'); + + var rl = readline.createInterface({ + input: fs.createReadStream('sample.txt') + }); + + var subscription = RxNode.fromReadLineStream(rl) + .subscribe(function(x) { console.log(x); }); +} +{ + var subscription = RxNode.fromWritableStream(process.stdout) + .subscribe(function(x) { console.log(x); }); +} +{ + var source = Rx.Observable.range(0, 5); + var subscription = RxNode.writeToStream(source, process.stdout, 'utf8'); +} diff --git a/rx-node/rx.node.d.ts b/rx-node/rx.node.d.ts new file mode 100644 index 0000000000..14af714359 --- /dev/null +++ b/rx-node/rx.node.d.ts @@ -0,0 +1,77 @@ +// Type definitions for RxJS bindings for Node +// Project: https://github.com/Reactive-Extensions/rx-node +// Definitions by: Andre Luiz dos Santos +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare namespace RxNode { + + export interface PublishableEventEmitter extends NodeJS.EventEmitter { + publish(): void; + } + + /** + * Converts the given observable sequence to an event emitter with the given event name. + * The errors are handled on the 'error' event and completion on the 'end' event. + * You must call publish in order to invoke the subscription on the Observable sequence. + * @param {Observable} observable The observable sequence to convert to an EventEmitter. + * @param {String} eventName The event name to emit onNext calls. + * @returns {EventEmitter} An EventEmitter which emits the given eventName for each onNext call in addition to 'error' and 'end' events. + */ + function toEventEmitter(observable: Rx.Observable, eventName: string): RxNode.PublishableEventEmitter; + + /** + * Converts a flowing stream to an Observable sequence. + * @param {Stream} stream A stream to convert to a observable sequence. + * @param {String} [finishEventName] Event that notifies about closed stream. ("end" by default) + * @param {String} [dataEventName] Event that notifies about incoming data. ("data" by default) + * @returns {Observable} An observable sequence which fires on each 'data' event as well as handling 'error' and finish events like `end` or `finish`. + */ + function fromStream(stream: NodeJS.ReadableStream, finishEventName?: string, dataEventName?: string): Rx.Observable; + + /** + * Converts a flowing readable stream to an Observable sequence. + * @param {Stream} stream A stream to convert to a observable sequence. + * @param {String} [dataEventName] Event that notifies about incoming data. ("data" by default) + * @returns {Observable} An observable sequence which fires on each 'data' event as well as handling 'error' and 'end' events. + */ + function fromReadableStream(stream: NodeJS.ReadableStream, dataEventName?: string): Rx.Observable; + + /** + * Converts a flowing readline stream to an Observable sequence. + * @param {Stream} stream A stream to convert to a observable sequence. + * @returns {Observable} An observable sequence which fires on each 'data' event as well as handling 'error' and 'end' events. + */ + function fromReadLineStream(stream: NodeJS.ReadableStream): Rx.Observable; + + /** + * Converts a flowing writeable stream to an Observable sequence. + * @param {Stream} stream A stream to convert to a observable sequence. + * @returns {Observable} An observable sequence which fires on each 'data' event as well as handling 'error' and 'finish' events. + */ + function fromWritableStream(stream: NodeJS.WritableStream): Rx.Observable; + + /** + * Converts a flowing transform stream to an Observable sequence. + * @param {Stream} stream A stream to convert to a observable sequence. + * @param {String} [dataEventName] Event that notifies about incoming data. ("data" by default) + * @returns {Observable} An observable sequence which fires on each 'data' event as well as handling 'error' and 'finish' events. + */ + function fromTransformStream(stream: NodeJS.ReadWriteStream, dataEventName?: string): Rx.Observable; + + /** + * Writes an observable sequence to a stream + * @param {Observable} observable Observable sequence to write to a stream. + * @param {Stream} stream The stream to write to. + * @param {String} [encoding] The encoding of the item to write. + * @returns {Disposable} The subscription handle. + */ + function writeToStream(observable: Rx.Observable, stream: NodeJS.WritableStream, encoding: string): Rx.Disposable; + +} + +declare module "rx-node" { + export = RxNode; +} From ed57459c850839fefe5aad6d7b0de12b958afd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luiz=20dos=20Santos?= Date: Thu, 28 Apr 2016 12:04:03 -0300 Subject: [PATCH 0137/1506] Remove import from test file to compile with --target es6 --- rx-node/rx.node-tests.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/rx-node/rx.node-tests.ts b/rx-node/rx.node-tests.ts index 254ef6e242..b5450e9945 100644 --- a/rx-node/rx.node-tests.ts +++ b/rx-node/rx.node-tests.ts @@ -6,8 +6,6 @@ /// /// -import RxNode = require('rx-node'); - { var source = Rx.Observable.return(42); var emitter = RxNode.toEventEmitter(source, 'data'); From 864787b1648711682c97db5b003f07b79cd6d32b Mon Sep 17 00:00:00 2001 From: Matt Brooks Date: Thu, 28 Apr 2016 17:28:40 +0100 Subject: [PATCH 0138/1506] Add support for `ko.tasks` API in Knockout.js v3.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for Knockout’s microtask queue. Knockout’s microtask queue supports scheduling tasks to run as soon as possible while still being asynchronous, striving to schedule them to occur before yielding for I/O, reflow, or redrawing. --- knockout/knockout.d.ts | 23 ++++++++++++++++++++--- knockout/tests/knockout-tests.ts | 29 +++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 962a776333..6e53ac2e25 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Knockout v3.2.0 +// Type definitions for Knockout v3.4.0 // Project: http://knockoutjs.com -// Definitions by: Boris Yankov , Igor Oleinikov , Clément Bourgeois +// Definitions by: Boris Yankov , Igor Oleinikov , Clément Bourgeois , Matt Brooks // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -387,6 +387,17 @@ interface KnockoutTemplateEngine extends KnockoutNativeTemplateEngine { rewriteTemplate(template: any, rewriterCallback: Function, templateDocument: Document): void; } +////////////////////////////////// +// tasks.js +////////////////////////////////// + +interface KnockoutTasks { + scheduler: (callback: Function) => any; + schedule(task: Function): number; + cancel(handle: number): void; + runEarly(): void; +} + ///////////////////////////////// interface KnockoutStatic { @@ -544,7 +555,13 @@ interface KnockoutStatic { deferUpdates: boolean, useOnlyNativeEvents: boolean - } + }; + + ///////////////////////////////// + // tasks.js + ///////////////////////////////// + + tasks: KnockoutTasks; } interface KnockoutBindingProvider { diff --git a/knockout/tests/knockout-tests.ts b/knockout/tests/knockout-tests.ts index e9334a7534..8da6c12950 100644 --- a/knockout/tests/knockout-tests.ts +++ b/knockout/tests/knockout-tests.ts @@ -570,8 +570,8 @@ function test_misc() { $(element).datepicker("destroy"); }); - this.observableFactory = function(): KnockoutObservable{ - if (true) { + this.observableFactory = function(flag = true): KnockoutObservable{ + if (flag) { return ko.computed({ read:function(){ return 3; @@ -655,3 +655,28 @@ function testUnwrapUnion() { var num = ko.unwrap(possibleObs); } + +function test_tasks() { + // Schedule an empty task + ko.tasks.schedule(function() { + }); + + // Schedule a task with arguments and return type + let logSomethingTask = (message: string) => { + console.log("Log message"); + return true; + }; + + let taskHandle = ko.tasks.schedule(logSomethingTask); + + // Cancel a task + ko.tasks.cancel(taskHandle); + + // Process the current microtask queue on demand + ko.tasks.runEarly(); + + // Redefine or augment how Knockout schedules the event to process and flush the queue + ko.tasks.scheduler = function (callback) { + setTimeout(callback, 0); + }; +} From a1433356ad561652fa76872bd7e3ac628e8bfe87 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Sat, 30 Apr 2016 14:15:09 +0300 Subject: [PATCH 0139/1506] Update grid.d.ts --- gijgo/grid.d.ts | 137 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 105 insertions(+), 32 deletions(-) diff --git a/gijgo/grid.d.ts b/gijgo/grid.d.ts index ff5802482f..5864f2efd6 100644 --- a/gijgo/grid.d.ts +++ b/gijgo/grid.d.ts @@ -3,48 +3,121 @@ // Definitions by: Atanas Atanasov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface DataGridPager { +interface GridPager { limit: number; - sizes: Array + sizes: Array; + leftControls?: any; + rightControls?: any; } -interface DataGridColumn { - title?: any; - field?: any; +interface GridColumn { align?: string; - type?: string; - icon?: string; - tooltip?: string; + cssClass?: string; + decimalDigits?: number; + editor?: any; events?: any; - sortable?: boolean; - width?: number; + field?: string; + format?: string; headerCssClass?: string; -} - -interface DataGridSettings { - title?: string; - dataSource?: any; - primaryKey?: any; - selectionType?: string; - selectionMethod?: string; - uiLibrary?: string; - autoLoad?: boolean; - pager?: DataGridPager; - params?: any; - notFoundText?: string; + hidden?: boolean; + icon?: string; minWidth?: number; - columns?: Array; - defaultColumnSettings?: DataGridColumn; + priority?: number; + sortable?: boolean; + stopPropagation?: boolean; + title?: any; + tmpl?: string; + tooltip?: string; + type?: string; + width?: number; } -interface DataGrid extends JQuery { - reload(params?: Params): void; - getById(id: number): Entity; - getAll(): Entity[]; - setSelected(id: number, value: any): void; +interface GridDefaultParams { + direction?: string; + limit?: string; + page?: string; + sortBy?: string; +} + +interface GridMapping { + dataField?: string; + totalRecordsField?: string; +} + +interface GridSettings { + //Configuration options + autoGenerateColumns?: boolean; + autoLoad?: boolean; + columns?: Array; + dataSource?: any; + defaultColumnSettings?: GridColumn; + defaultParams?: GridDefaultParams; + detailTemplate?: string; + fontSize?: string; + mapping?: string; + minWidth?: number; + notFoundText?: string; + pager?: GridPager; + primaryKey?: string; + resizableColumns?: boolean; + resizeCheckInterval?: number; + responsive?: boolean; + selectionMethod?: string; + selectionType?: string; + showHiddenColumnsAsDetails?: boolean; + title?: string; + toolbarTemplate?: string; + uiLibrary?: string; + width?: number; + params?: any; + + //Events + beforeEmptyRowInsert(e: any, $row: JQuery); + cellDataBound(e: any, $wrapper: JQuery, id: string, column: GridColumn, record: Entity); + cellDataChanged(e: any, $cell: JQuery, column: GridColumn, record: Entity, oldValue: any, newValue: any); + columnHide(e: any, column: GridColumn); + columnShow(e: any, column: GridColumn); + dataBinding(e: any, records: Array); + dataBound(e: any, records: Array, totalRecords: number); + destroying(e: any); + detailCollapse(e: any, detailWrapper: JQuery, record: Entity); + detailExpand(e: any, detailWrapper: JQuery, record: Entity); + initialized(e: any); + pageChanging(e: any, newPage: number); + pageSizeChange(e: any, newPage: number); + resize(e: any, newWidth: number, oldWidth: number); + rowDataBound(e: any, $row: JQuery, id: string, record: Entity); + rowRemoving(e: any, $row: JQuery, id: string, record: Entity); + rowSelect(e: any, $row: JQuery, id: string, record: Entity); + rowUnselect(e: any, $row: JQuery, id: string, record: Entity); +} + +interface Grid extends JQuery { + addRow(record: Entity): Grid; + clear(showNotFoundText?: boolean): Grid; + count(): number; + destroy(keepTableTag?: boolean, keepWrapperTag?: boolean): void; + //get(position: number): Entity; //TODO: rename to getByPosition to avoid conflicts with jquery.get + getAll(): Array; + getById(id: string): Entity; + getChanges(): Array; + getSelected(): string; + getSelections(): Array; + hideColumn(field: string): Grid; + makeResponsive(): void; + reload(params?: Params): Grid; + removeRow(id: string): Grid; + render(response: any): Grid; + selectAll(): Grid; + setSelected(id: string): Grid; + showColumn(field: string): Grid; + title(text: any): any; + unSelectAll(): Grid; + updateRow(id: string, record: Entity): Grid; } interface JQuery { - grid(settings: DataGridSettings): DataGrid; - grid(settings: DataGridSettings): DataGrid; + grid(settings: GridSettings): Grid; + grid(settings: GridSettings): Grid; + grid(settings: GridSettings): Grid; } From 0c33358b1e58d84653e81e7605a951285b1a2c72 Mon Sep 17 00:00:00 2001 From: Derrick Liu Date: Sun, 1 May 2016 04:55:08 -0800 Subject: [PATCH 0140/1506] react-select: Export the Option interface (#9110) * Add an export for Option so we can use it directly * Update tests to import the newly exported Option --- react-select/react-select-tests.tsx | 8 ++++---- react-select/react-select.d.ts | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/react-select/react-select-tests.tsx b/react-select/react-select-tests.tsx index 8e573e1444..8e4571f472 100644 --- a/react-select/react-select-tests.tsx +++ b/react-select/react-select-tests.tsx @@ -5,16 +5,16 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import Select from "react-select"; +import Select, { Option } from "react-select"; class SelectTest extends React.Component, {}> { render() { - const options: ReactSelect.Option[] = [{ label: "Foo", value: "bar" }]; + const options: Option[] = [{ label: "Foo", value: "bar" }]; const onChange = (value: any) => console.log(value); const onOpen = () => { return; }; const onClose = () => { return; }; - const optionRenderer = (option: ReactSelect.Option) => {option.label} + const optionRenderer = (option: Option) => {option.label} return

tag + * when your property is invalid + */ decorateInputElement?: boolean; + /** + * If defined, the CSS class assigned to both and validation message elements + */ errorClass?: string; + /** + * The CSS class assigned to validation error elements, must have decorateInputElement set to true + */ errorElementClass?: string; + /** + * The CSS class assigned to validation error messages + */ errorMessageClass?: string; + /** + * Shows tooltips using input 'title' attribute. False hides them + */ + errorsAsTitle?: boolean; + /** + * Shows the error when hovering the input field (decorateElement must be true) + */ + errorsAsTitleOnModified?: boolean; grouping?: KnockoutValidationGroupingOptions; + /** + * If true validation will insert either a element or the template + * specified by messageTemplate after any element (e.g. ) + * that uses a KO value binding with a validated field + */ + insertMessages?: boolean; + /** + * Indicates whether validation messages are triggered only + * when properties are modified or at all times + */ + messagesOnModified?: boolean; + /** + * The id of the + * that you want to use for all your validation messages + */ + messageTemplate?: string; + /** + * Indicates whether to assign validation rules to your ViewModel + * using HTML5 validation attributes + */ + parseInputAttributes?: boolean; + /** + * Register custom validation rules defined via ko.validation.rules + */ + registerExtenders?: boolean; + validate?: KnockoutValidationValidateOptions; + /** + * Add HTML5 input validation attributes to form elements + * that ko observable's are bound to + */ + writeInputAttributes?: boolean; } interface KnockoutValidationUtils { @@ -154,7 +227,7 @@ interface KnockoutSubscribableFunctions { } declare module "knockout.validation" { - export = validation; + export = validation; } -declare var validation: KnockoutValidationStatic +declare var validation: KnockoutValidationStatic From 3a0f632200048227e6544bc8891f06bfbcc4ef1b Mon Sep 17 00:00:00 2001 From: AmirSaber Sharifi Date: Sun, 1 May 2016 11:44:30 -0400 Subject: [PATCH 0162/1506] fix bluebird refrence and add dropForeign function (#9105) --- knex/knex.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/knex/knex.d.ts b/knex/knex.d.ts index 52740662c8..5aa1a46d18 100644 --- a/knex/knex.d.ts +++ b/knex/knex.d.ts @@ -3,11 +3,11 @@ // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// +/// /// declare module "knex" { - // import Promise = require("bluebird"); + import Promise = require("bluebird"); import * as events from "events"; type Callback = Function; @@ -299,8 +299,8 @@ declare module "knex" { // Schema builder // - interface SchemaBuilder { - createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): Promise; + interface SchemaBuilder extends Promise { + createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder; renameTable(oldTableName: string, newTableName: string): Promise; dropTable(tableName: string): Promise; hasTable(tableName: string): Promise; @@ -339,6 +339,7 @@ declare module "knex" { unique(columnNames: string[], indexName?: string) : TableBuilder; foreign(column: string): ForeignConstraintBuilder; foreign(columns: string[]): MultikeyForeignConstraintBuilder; + dropForeign(columnNames: string[], foreignKeyName?: string): TableBuilder; } interface CreateTableBuilder extends TableBuilder { From 7b7b8af73b5c268392d0c06096fc67ca83ae7766 Mon Sep 17 00:00:00 2001 From: Valentin Robert Date: Sun, 1 May 2016 08:44:42 -0700 Subject: [PATCH 0163/1506] added onComplete to W2UI.W2Event (#9148) --- w2ui/w2ui.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/w2ui/w2ui.d.ts b/w2ui/w2ui.d.ts index d75777b8f0..f30c9f77b0 100644 --- a/w2ui/w2ui.d.ts +++ b/w2ui/w2ui.d.ts @@ -21,6 +21,7 @@ declare var w2ui: W2UI.W2UI declare namespace W2UI { interface W2Event { + onComplete: () => void; target: string; } From 3063f61d0e2177d804ef0157309e10c35bd99e4c Mon Sep 17 00:00:00 2001 From: Sam Verschueren Date: Sun, 1 May 2016 17:52:48 +0200 Subject: [PATCH 0164/1506] Add array-find-index (#9151) --- array-find-index/array-find-index-tests.ts | 10 ++++++++++ array-find-index/array-find-index.d.ts | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 array-find-index/array-find-index-tests.ts create mode 100644 array-find-index/array-find-index.d.ts diff --git a/array-find-index/array-find-index-tests.ts b/array-find-index/array-find-index-tests.ts new file mode 100644 index 0000000000..8c69a531e2 --- /dev/null +++ b/array-find-index/array-find-index-tests.ts @@ -0,0 +1,10 @@ +/// + +import * as arrayFindIndex from 'array-find-index'; + +arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn'); + +const ctx = {foo: 'rainbow'}; +arrayFindIndex(['rainbow', 'unicorn', 'pony'], function (x) { + return x === this.foo; +}, ctx); diff --git a/array-find-index/array-find-index.d.ts b/array-find-index/array-find-index.d.ts new file mode 100644 index 0000000000..650cac2a16 --- /dev/null +++ b/array-find-index/array-find-index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for array-find-index +// Project: https://github.com/sindresorhus/array-find-index +// Definitions by: Sam Verschueren +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "array-find-index" { + type Predicate = (element: any, index: number, array: any[]) => boolean; + + function arrayFindIndex(arr: any[], predicate: Predicate): number; + function arrayFindIndex(arr: any[], predicate: Predicate, ctx: any): number; + namespace arrayFindIndex {} + export = arrayFindIndex; +} From 28cd028ab871a770027b35e0e14bd8c7005eca21 Mon Sep 17 00:00:00 2001 From: kwiateusz Date: Sun, 1 May 2016 17:53:03 +0200 Subject: [PATCH 0165/1506] Ionic update (#9152) * update of ionic typings * ionic test update * update according suggestion of optional param --- ionic/ionic-tests.ts | 2 ++ ionic/ionic.d.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/ionic/ionic-tests.ts b/ionic/ionic-tests.ts index 1790e542f1..d8c98ae25f 100644 --- a/ionic/ionic-tests.ts +++ b/ionic/ionic-tests.ts @@ -9,6 +9,8 @@ testIonic.config(['$ionicConfigProvider', ($ionicConfigProvider: ionic.utility.I $ionicConfigProvider.views.maxCache(10); var forwardCache: boolean = $ionicConfigProvider.views.forwardCache(); $ionicConfigProvider.views.forwardCache(true); + var swipeBackEnabled: boolean = $ionicConfigProvider.views.swipeBackEnabled(); + $ionicConfigProvider.views.swipeBackEnabled(true); var jsScrolling: boolean = $ionicConfigProvider.scrolling.jsScrolling(); $ionicConfigProvider.scrolling.jsScrolling(true); diff --git a/ionic/ionic.d.ts b/ionic/ionic.d.ts index e2cbc195b7..fae9cdbf63 100644 --- a/ionic/ionic.d.ts +++ b/ionic/ionic.d.ts @@ -358,6 +358,7 @@ declare namespace ionic { transition(transition?: string): string; maxCache(maxNumber?: number): number; forwardCache(value?: boolean): boolean; + swipeBackEnabled(value?: boolean): boolean; }; scrolling: { jsScrolling(value?: boolean): boolean; From 8d4f60d532f8b6523db29eb78a7fac0a828e4ee3 Mon Sep 17 00:00:00 2001 From: cedric lombardot Date: Sun, 1 May 2016 17:53:22 +0200 Subject: [PATCH 0166/1506] [Async] Update filter signature (#9123) Filter signature do not correspond to documentation https://github.com/caolan/async#filter --- async/async.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/async/async.d.ts b/async/async.d.ts index 066685e3c7..5add0db63c 100644 --- a/async/async.d.ts +++ b/async/async.d.ts @@ -85,15 +85,15 @@ interface Async { map(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any; mapSeries(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any; mapLimit(arr: T[], limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any; - filter(arr: T[], iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - select(arr: T[], iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - filterSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - selectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - filterLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - selectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - reject(arr: T[], iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - rejectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; - rejectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (results: T[]) => any): any; + filter(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + select(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + filterSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + selectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + filterLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + selectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + reject(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + rejectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; + rejectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any; reduce(arr: T[], memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): any; inject(arr: T[], memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): any; foldl(arr: T[], memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): any; From 649cae32796337785199168f93cb6b7ece5c0802 Mon Sep 17 00:00:00 2001 From: cedric lombardot Date: Sun, 1 May 2016 17:53:44 +0200 Subject: [PATCH 0167/1506] [Async] Detect signatures callback (#9116) Fix signatures of detect callbacks to follow doc https://github.com/caolan/async#detect --- async/async.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/async/async.d.ts b/async/async.d.ts index 5add0db63c..c3d218fabc 100644 --- a/async/async.d.ts +++ b/async/async.d.ts @@ -15,7 +15,7 @@ interface AsyncIterator { (item: T, callback: ErrorCallback): void; } interface AsyncForEachOfIterator { (item: T, key: number, callback: ErrorCallback): void; } interface AsyncResultIterator { (item: T, callback: AsyncResultCallback): void; } interface AsyncMemoIterator { (memo: R, item: T, callback: AsyncResultCallback): void; } -interface AsyncBooleanIterator { (item: T, callback: (truthValue: boolean) => void): void; } +interface AsyncBooleanIterator { (item: T, callback: (err: string, truthValue: boolean) => void): void; } interface AsyncWorker { (task: T, callback: ErrorCallback): void; } interface AsyncVoidFunction { (callback: ErrorCallback): void; } @@ -99,9 +99,9 @@ interface Async { foldl(arr: T[], memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): any; reduceRight(arr: T[], memo: R, iterator: AsyncMemoIterator, callback: AsyncResultCallback): any; foldr(arr: T[], memo: R, iterator: AsyncMemoIterator, callback: AsyncResultCallback): any; - detect(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: T) => void): any; - detectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: T) => void): any; - detectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (result: T) => void): any; + detect(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): any; + detectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): any; + detectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): any; sortBy(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any; some(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: boolean) => void): any; someLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (result: boolean) => void): any; From 152fb904dffd145582da89a0c776822b26ff0e8d Mon Sep 17 00:00:00 2001 From: ascoders Date: Sun, 1 May 2016 23:55:36 +0800 Subject: [PATCH 0168/1506] update react-router.d.ts (#9066) add basename to MatchArgs --- react-router/react-router.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/react-router/react-router.d.ts b/react-router/react-router.d.ts index 07acd52b9e..80d2e4ee6d 100644 --- a/react-router/react-router.d.ts +++ b/react-router/react-router.d.ts @@ -250,6 +250,7 @@ declare namespace ReactRouter { location?: H.Location | string parseQueryString?: ParseQueryString stringifyQuery?: StringifyQuery + basename?: string } interface MatchState extends RouterState { history: History From 8cc14d55978d9eca2c374adf1c70d5b9c0abef70 Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Mon, 2 May 2016 00:56:57 +0900 Subject: [PATCH 0169/1506] update Mithril.js definition from 0.1.x to 0.2.4 (#4523) --- mithril/mithril-tests.ts | 2 +- mithril/mithril.d.ts | 879 ++++++++++++++++++++++++++++++++++----- 2 files changed, 783 insertions(+), 98 deletions(-) diff --git a/mithril/mithril-tests.ts b/mithril/mithril-tests.ts index be5832a40d..a7d065f144 100644 --- a/mithril/mithril-tests.ts +++ b/mithril/mithril-tests.ts @@ -52,4 +52,4 @@ var todo = { }; //initialize the application -m.module(document, todo); +m.mount(document, todo); diff --git a/mithril/mithril.d.ts b/mithril/mithril.d.ts index b4e9dd5a54..d1c2ba78a6 100644 --- a/mithril/mithril.d.ts +++ b/mithril/mithril.d.ts @@ -3,175 +3,860 @@ // Definitions by: Leo Horie , Chris Bowdon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -//Mithril type definitions for Typescript +// Mithril type definitions for Typescript -declare module _mithril { - interface MithrilStatic { +/** +* This is the module containing all the types/declarations/etc. for Mithril +*/ +declare namespace Mithril { + interface ChildArray extends Array {} + type Children = Child | ChildArray; + type Child = string | VirtualElement | Component; - (selector: string, attributes: MithrilAttributes, ...children: Array>): MithrilVirtualElement; - (selector: string, ...children: Array>): MithrilVirtualElement; + interface Static { + /** + * Creates a virtual element for use with m.render, m.mount, etc. + * + * @param selector A simple CSS selector. May include SVG tags. Nested + * selectors are not supported. + * @param attributes Attributes to add. Any DOM attribute may be used + * as an attribute, although innerHTML and the like may be overwritten + * silently. + * @param children Child elements, components, and text to add. + * @return A virtual element. + * + * @see m.render + * @see m.mount + * @see m.component + */ + ( + selector: string, + ...children: Children[] + ): VirtualElement; - prop(promise: MithrilPromise) : MithrilPromiseProperty; - prop(value: T): MithrilProperty; - prop(): MithrilProperty; // might be that this should be Property + /** + * Creates a virtual element for use with m.render, m.mount, etc. + * + * @param selector A simple CSS selector. May include SVG tags. Nested + * selectors are not supported. + * @param attributes Attributes to add. Any DOM attribute may be used + * as an attribute, although innerHTML and the like may be overwritten + * silently. + * @param children Child elements, components, and text to add. + * @return A virtual element. + * + * @see m.render + * @see m.mount + * @see m.component + */ + ( + selector: string, + attributes: Attributes, + ...children: Children[] + ): VirtualElement; - withAttr(property: string, callback: (value: any) => void): (e: MithrilEvent) => any; + /** + * Initializes a component for use with m.render, m.mount, etc. + * + * @param component A component. + * @param args Arguments to optionally pass to the component. + * @return A component. + * + * @see m.render + * @see m.mount + * @see m + */ + ( + component: Component, + ...args: any[] + ): Component; - module(rootElement: Node, component: MithrilComponent): T; - module(rootElement: Node): T; - mount(rootElement: Node, component: MithrilComponent): T; - mount(rootElement: Node): T; + /** + * Creates a getter-setter function that wraps a Mithril promise. Useful + * for uniform data access, m.withAttr, etc. + * + * @param promise A thennable to initialize the property with. It may + * optionally be a Mithril promise. + * @return A getter-setter function wrapping the promise. + * + * @see m.withAttr + */ + prop(promise: Thennable) : Promise; - component(component: MithrilComponent, ...args: Array): MithrilComponent - - trust(html: string): string; + /** + * Creates a getter-setter function that wraps a simple value. Useful + * for uniform data access, m.withAttr, etc. + * + * @param value A value to initialize the property with + * @return A getter-setter function wrapping the value. + * + * @see m.withAttr + */ + prop(value: T): BasicProperty; - render(rootElement: Element|HTMLDocument): void; - render(rootElement: Element|HTMLDocument, children: MithrilVirtualElement, forceRecreation?: boolean): void; - render(rootElement: Element|HTMLDocument, children: MithrilVirtualElement[], forceRecreation?: boolean): void; + /** + * Creates a getter-setter function that wraps a simple value. Useful + * for uniform data access, m.withAttr, etc. + * + * @return A getter-setter function wrapping the value. + * + * @see m.withAttr + */ + prop(): BasicProperty; + + /** + * Returns a event handler that can be bound to an element, firing with + * the specified property. + * + * @param property The property to get from the event. + * @param callback The handler to use the value from the event. + * @return A function suitable for listening to an event. + */ + withAttr( + property: string, + callback: (value: any) => any, + callbackThis?: any + ): (e: Event) => void; + + /** + * @deprecated Use m.mount instead + */ + module( + rootElement: Node, + component: Component + ): T; + + /** + * Mounts a component to a base DOM node. + * + * @param rootElement The base node. + * @param component The component to mount. + * @return An instance of the top-level component's controller + */ + mount( + rootElement: Node, + component: Component + ): T; + + /** + * Initializes a component for use with m.render, m.mount, etc. + * + * @param selector A component. + * @param args Arguments to optionally pass to the component. + * @return A component. + * + * @see m.render + * @see m.mount + * @see m + */ + component( + component: Component, + ...args: any[] + ): Component; + + /** + * Trust this string of HTML. + * + * @param html The HTML to trust + * @return A String object instance with an added internal flag to mark + * it as trusted. + */ + trust(html: string): TrustedString; + + /** + * Render a virtual DOM tree. + * + * @param rootElement The base element/node to render the tree from. + * @param children One or more child nodes to add to the tree. + * @param forceRecreation If true, overwrite the entire tree without + * diffing against it. + */ + render( + rootElement: Element, + children: VirtualElement|VirtualElement[], + forceRecreation?: boolean + ): void; redraw: { + /** + * Force a redraw the active component. It redraws asynchronously by + * default to allow for simultaneous events to run before redrawing, + * such as the event combination keypress + input frequently used for + * input. + * + * @param force If true, redraw synchronously. + */ (force?: boolean): void; - strategy: MithrilProperty; + + /** + * Gets/sets the current redraw strategy, which returns one of the + * following: + * + * "all" - recreates the DOM tree from scratch + * "diff" - recreates the DOM tree from scratch + * "none" - leaves the DOM tree intact + * + * This is useful for event handlers, which may want to cancel + * the next redraw if the event doesn't update the UI. + * + * @return The current strategy + */ + strategy: BasicProperty<"all" | "diff" | "none">; } route: { - (rootElement: HTMLDocument, defaultRoute: string, routes: MithrilRoutes): void; - (rootElement: Element, defaultRoute: string, routes: MithrilRoutes): void; + /** + * Enable routing, mounting a controller based on the route. It + * automatically mounts the components for you, starting with the one + * specified by the default route. + * + * @param rootElement The element to mount the active controller to. + * @param defaultRoute The route to start with. + * @param routes A key-value mapping of pathname to controller. + */ + ( + rootElement: Element, + defaultRoute: string, + routes: Routes + ): void; - (element: Element, isInitialized: boolean, context: Object, vdom: Object): void; + /** + * This allows m.route to be used as the `config` attribute for a + * virtual element, particularly useful for cases like this: + * + * ```ts + * // Note that the '#' is not required in `href`, thanks to the + * `config` setting. + * m("a[href='/dashboard/alicesmith']", {config: m.route}); + * ``` + */ + ( + element: Element, + isInitialized: boolean, + context?: Context, + vdom?: VirtualElement + ): void; + + /** + * Programmatically redirect to another route. + * + * @param path The route to go to. + * @param params Parameters to pass as a query string. + * @param shouldReplaceHistory Whether to replace the current history + * instead of adding a new one. + */ (path: string, params?: any, shouldReplaceHistory?: boolean): void; + + /** + * Gets the current route. + * + * @return The current route. + */ (): string; + /** + * Gets a route parameter. + * + * @param key The key to get. + * @return The value associated with the parameter key. + */ param(key: string): string; - mode: string; - buildQueryString(data: Object): String - parseQueryString(data: String): Object + + /** + * The current routing mode. This may be changed before calling + * m.route to change the part of the URL used to perform the routing. + * + * The value can be set to one of the following, defaulting to + * "hash": + * + * "search" - Uses the query string. This allows for named anchors to + * work on the page, but changes cause IE8 and lower to refresh the + * page. + * + * "hash" - Uses the hash. This is the only routing mode that does + * not cause page refreshes on any browser, but it does not support + * named anchors. + * + * "pathname" - Uses the URL pathname. This requires server-side + * setup to support bookmarking and page refreshes. It always causes + * page refreshes on IE8 and lower. Note that this requires that the + * application to be run from the root of the URL. + */ + mode: "search" | "hash" | "pathname"; + + /** + * Serialize an object into a query string. + * + * @param data The data to serialize. + * @return The serialized string. + */ + buildQueryString(data: Object): string; + + /** + * Parse a query string into an object. + * + * @param data The data to parse. + * @return The parsed object data. + */ + parseQueryString(data: string): Object; } - request(options: MithrilXHROptions): MithrilPromise; + /** + * Send an XHR request to a server. Note that the `url` option is + * required. + * + * @param options The options to use for the request. + * @return A promise to the returned data, or void if not applicable. + * + * @see XHROptions for the available options. + */ + request(options: XHROptions): Promise + + /** + * Send a JSONP request to a server. Note that the `url` option is + * required. + * + * @param options The options to use + * @return A promise to the returned data. + * + * @see JSONPOptions for the available options. + */ + request(options: JSONPOptions): Promise; deferred: { + /** + * Create a Mithril deferred object. It behaves synchronously if + * possible, an intentional deviation from Promises/A+. Note that + * deferreds are completely separate from the redrawing system, and + * never trigger a redraw on their own. + * + * @return A new Mithril deferred instance. + * + * @see m.deferred.onerror for the error callback called for Error + * subclasses + */ + (): Deferred; + + /** + * A callback for all uncaught native Error subclasses in deferreds. + * This defaults to synchronously rethrowing all errors, a deviation + * from Promises/A+, but the behavior is configurable. To restore + * Promises/A+-compatible behavior. simply set this to a no-op. + */ onerror(e: Error): void; - (): MithrilDeferred; } - sync(promises: MithrilPromise[]): MithrilPromise; + /** + * Takes a list of promises or thennables and returns a Mithril promise + * that resolves once all in the list are resolved, or rejects if any of + * them reject. + * + * @param promises A list of promises to try to resolve. + * @return A promise that resolves to all the promises if all resolve, or + * rejects with the error contained in the first rejection. + */ + sync(promises: Thennable[]): Promise; + /** + * Use this and endComputation if your views aren't redrawing after + * calls to third-party libraries. For integrating asynchronous code, + * this should be called before any asynchronous work is done. For + * synchronous code, this should be called at the beginning of the + * problematic segment. Note that these calls must be balanced, much like + * braces and parentheses. This is mostly used internally. Prefer + * m.redraw where possible, especially when making repeated calls. + * + * @see endComputation + * @see m.render + */ startComputation(): void; + + /** + * Use startComputation and this if your views aren't redrawing after + * calls to third-party libraries. For integrating asynchronous code, + * this should be called after all asynchronous work completes. For + * synchronous code, this should be called at the end of the problematic + * segment. Note that these calls must be balanced, much like braces and + * parentheses. This is mostly used internally. Prefer m.redraw where + * possible, especially when making repeated calls. + * + * @see startComputation + * @see m.render + */ endComputation(): void; - // For test suite - deps: { - (mockWindow: Window): Window; - factory: Object; - } - + /** + * This overwrites the internal version of window used by Mithril. + * It's mostly useful for testing, and is also used internally by + * Mithril to test itself. By default Mithril uses `window` for the + * dependency. + * + * @param mockWindow The mock to use for the window. + * @return The mock that was passed in. + */ + deps(mockWindow: Window): Window; } - export interface MithrilVirtualElement { - key?: number; - tag?: string; - attrs?: MithrilAttributes; - children?: any[]; + interface TrustedString extends String { + /** @private Implementation detail. Don't depend on it. */ + $trusted: boolean; } - // Configuration function for an element - interface MithrilElementConfig { - (element: Element, isInitialized: boolean, context?: any, vdom?: MithrilVirtualElement): void; + /** + * The interface for a virtual element. It's best to consider this immutable + * for most use cases. + * + * @see m + */ + interface VirtualElement { + /** + * The tag name of this element. + */ + tag: string; + + /** + * The attributes of this element. + */ + attrs: Attributes; + + /** + * The children of this element. + */ + children: Children[]; } - // Attributes on a virtual element - interface MithrilAttributes { - title?: string; + /** + * An event passed by Mithril to unload event handlers. + */ + interface Event { + /** + * Prevent the default behavior of scrolling the page and updating the + * URL on next route change. + */ + preventDefault(): void; + } + + /** + * A context object for configuration functions. + * + * @see ElementConfig + */ + interface Context { + /** + * A function to call when the node is unloaded. Useful for cleanup. + */ + onunload?(): any; + + /** + * Set true if the backing DOM node needs to be retained between route + * changes if possible. Set false if this node needs to be recreated + * every single time, regardless of how "different" it is. + */ + retain?: boolean; + } + + /** + * This represents a callback function for a virtual element's config + * attribute. It's a low-level function useful for extra cleanup after + * removal from the tree, storing instances of third-party classes that + * need to be associated with the DOM, etc. + * + * @see Attributes + * @see Context + */ + interface ElementConfig { + /** + * A callback function for a virtual element's config attribute. + * + * @param element The associated DOM element. + * @param isInitialized Whether this is the first call for the virtual + * element or not. + * @param context The associated context for this element. + * @param vdom The associated virtual element. + */ + ( + element: Element, + isInitialized: boolean, + context: Context, + vdom: VirtualElement + ): void; + } + + /** + * This represents the attributes available for configuring virtual elements, + * beyond the applicable DOM attributes. + * + * @see m + */ + interface Attributes { + /** + * The class name(s) for this virtual element, as a space-separated list. + */ className?: string; + + /** + * The class name(s) for this virtual element, as a space-separated list. + */ class?: string; - config?: MithrilElementConfig; + + /** + * A custom, low-level configuration in case this element needs special + * cleanup after removal from the tree. + * + * @see ElementConfig + */ + config?: ElementConfig; + + /** + * A key to optionally associate with this element. + */ + key?: string | number; + + /** + * Any other virtual element properties, including attributes and event + * handlers. + */ + [property: string]: any; } - // Defines the subset of Event that Mithril needs - interface MithrilEvent { - currentTarget: Element; - } - - interface MithrilController { + /** + * The basis of a Mithril controller instance. + */ + interface Controller { + /** + * An optional handler to call when the associated virtual element is + * destroyed. + * + * @param evt An associated event. + */ onunload?(evt: Event): any; } - interface MithrilControllerFunction extends MithrilController { - (): any; + /** + * This represents a controller function. + * + * @see ControllerConstructor + */ + interface ControllerFunction { + (...args: any[]): T; } - interface MithrilView { - (ctrl: T): string|MithrilVirtualElement; + /** + * This represents a controller constructor. + * + * @see ControllerFunction + */ + interface ControllerConstructor { + new (...args: any[]): T; } - interface MithrilComponent { - controller: MithrilControllerFunction|{ new(): T }; - view: MithrilView; + /** + * This represents a Mithril component. + * + * @see m + * @see m.component + */ + interface Component { + /** + * The component's controller. + * + * @see m.component + */ + controller: ControllerFunction | ControllerConstructor; + + /** + * Creates a view out of virtual elements. + * + * @see m.component + */ + view(ctrl?: T, ...args: any[]): VirtualElement; } - interface MithrilProperty { + /** + * This is the base interface for property getter-setters + * + * @see m.prop + */ + interface Property { + /** + * Gets the contained value. + * + * @return The contained value. + */ (): T; + + /** + * Sets the contained value. + * + * @param value The new value to set. + * @return The newly set value. + */ (value: T): T; + } + + /** + * This represents a non-promise getter-setter functions. + * + * @see m.prop which returns objects that implement this interface. + */ + interface BasicProperty extends Property { + /** + * Makes this serializable to JSON. + */ toJSON(): T; } - interface MithrilPromiseProperty extends MithrilPromise { - (): T; - (value: T): T; - toJSON(): T; + /** + * This represents a key-value mapping linking routes to components. + */ + interface Routes { + /** + * The key represents the route. The value represents the corresponding + * component. + */ + [key: string]: Component; } - interface MithrilRoutes { - [key: string]: MithrilComponent; - } - - - interface MithrilDeferred { + /** + * This represents a Mithril deferred object. + */ + interface Deferred { + /** + * Resolve this deferred's promise with a value. + * + * @param value The value to resolve the promise with. + */ resolve(value?: T): void; - reject(value?: any): void; - promise: MithrilPromise; + + /** + * Reject this deferred with an error. + * + * @param value The reason for rejecting the promise. + */ + reject(reason?: any): void; + + /** + * The backing promise. + * + * @see Promise + */ + promise: Promise; } - interface MithrilSuccessCallback { - (value: T): U; - (value: T): MithrilPromise; + /** + * This represents a thennable success callback. + */ + interface SuccessCallback { + (value: T): U | Thennable; } - interface MithrilErrorCallback { - (value: Error): U; - (value: string): U; + /** + * This represents a thennable error callback. + */ + interface ErrorCallback { + (value: Error): T | Thennable; } - interface MithrilPromise { - (): T; - (value: T): T; - then(success: (value: T) => U): MithrilPromise; - then(success: (value: T) => MithrilPromise): MithrilPromise; - then(success: (value: T) => U, error: (value: Error) => V): MithrilPromise|MithrilPromise; - then(success: (value: T) => MithrilPromise, error: (value: Error) => V): MithrilPromise|MithrilPromise; + /** + * This represents a thennable. + */ + interface Thennable { + then(success: SuccessCallback): Thennable; + then(success: SuccessCallback, error: ErrorCallback): Thennable; + catch?(error: ErrorCallback): Thennable; + catch?(error: ErrorCallback): Thennable; } - interface MithrilXHROptions { - method?: string; - url: string; - user?: string; - password?: string; + + /** + * This represents a Mithril promise object. + */ + interface Promise extends Thennable, Property> { + /** + * Chain this promise with a simple success callback, propogating + * rejections. + * + * @param success The callback to call when the promise is resolved. + * @return The chained promise. + */ + then(success: SuccessCallback): Promise; + + /** + * Chain this promise with a success callback and error callback, without + * propogating rejections. + * + * @param success The callback to call when the promise is resolved. + * @param error The callback to call when the promise is rejected. + * @return The chained promise. + */ + then(success: SuccessCallback, error: ErrorCallback): Promise; + + /** + * Chain this promise with a single error callback, without propogating + * rejections. + * + * @param error The callback to call when the promise is rejected. + * @return The chained promise. + */ + catch(error: ErrorCallback): Promise; + } + + /** + * These are the common options shared across normal and JSONP requests. + * + * @see m.request + */ + interface RequestOptions { + /** + * The data to be sent. It's automatically serialized in the right format + * depending on the method (with exception of HTML5 FormData), and put in + * the appropriate section of the request. + */ data?: any; + + /** + * Whether to run it in the background, i.e. true if it doesn't affect + * template rendering. + */ background?: boolean; + + /** + * Set an initial value while the request is working, to populate the + * promise getter-setter. + */ + initialValue?: any; + + /** + * An optional preprocessor function to unwrap a successful response, in + * case the response contains metadata wrapping the data. + * + * @param data The data to unwrap. + * @return The unwrapped result. + */ unwrapSuccess?(data: any): any; + + /** + * An optional preprocessor function to unwrap an unsuccessful response, + * in case the response contains metadata wrapping the data. + * + * @param data The data to unwrap. + * @return The unwrapped result. + */ unwrapError?(data: any): any; + + /** + * An optional function to serialize the data. This defaults to + * `JSON.stringify`. + * + * @param dataToSerialize The data to serialize. + * @return The serialized form as a string. + */ serialize?(dataToSerialize: any): string; + + /** + * An optional function to deserialize the data. This defaults to + * `JSON.parse`. + * + * @param dataToSerialize The data to parse. + * @return The parsed form. + */ deserialize?(dataToDeserialize: string): any; - extract?(xhr: XMLHttpRequest, options: MithrilXHROptions): string; - type?(data: Object): void; - config?(xhr: XMLHttpRequest, options: MithrilXHROptions): XMLHttpRequest; - dataType?: string; + + /** + * An optional function to extract the data from a raw XMLHttpRequest, + * useful if the relevant data is in a response header or the status + * field. + * + * @param xhr The associated XMLHttpRequest. + * @param options The options passed to this request. + * @return string The serialized format. + */ + extract?(xhr: XMLHttpRequest, options: this): string; + + /** + * The parsed data, or its children if it's an array, will be passed to + * this class constructor if it's given, to parse it into classes. + * + * @param data The data to parse. + * @return The new instance for the list. + */ + type?: new (data: any) => any; + + /** + * The URL to send the request to. + */ + url: string; + } + + /** + * This represents the available options for configuring m.request for JSONP + * requests. + * + * @see m.request + */ + interface JSONPOptions extends RequestOptions { + /** + * For JSONP requests, this must be the string "jsonp". Otherwise, it's + * ignored. + */ + dataType: "jsonp"; + + /** + * The querystring key for the JSONP request callback. This is useful for + * APIs that don't use common conventions, such as + * `www.example.com/?jsonpCallback=doSomething`. It defaults to + * `callback`. + */ + callbackKey?: string; + + /** + * The data to send with the request. This is automatically serialized + * to a querystring. + */ + data?: Object; + } + + /** + * This represents the available options for configuring m.request for + * standard AJAX requests. + * + * @see m.request + */ + interface XHROptions extends RequestOptions { + /** + * This represents the HTTP method used, defaulting to "GET". + */ + method: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "OPTIONS"; + + /** + * The username for HTTP authentication. + */ + user?: string; + + /** + * The password for HTTP authentication. + */ + password?: string; + + /** + * An optional function to run between `open` and `send`, useful for + * adding request headers or using XHR2 features such as the `upload` + * property. It is even possible to override the XHR altogether with a + * similar object, such as an XDomainRequest instance. + * + * @param xhr The associated XMLHttpRequest. + * @param options The options passed to this request. + * @return The new XMLHttpRequest, or nothing if the same one is kept. + */ + config?(xhr: XMLHttpRequest, options: this): any; + + /** + * The data to send with the request. + */ + data?: Object; } } -declare var Mithril: _mithril.MithrilStatic; -declare var m: _mithril.MithrilStatic; +declare const m: Mithril.Static; declare module "mithril" { export = m; From 15d1bacc2b3f1dffcea83ce95e92d676c8c39132 Mon Sep 17 00:00:00 2001 From: Scott Rippee Date: Sun, 1 May 2016 09:09:35 -0700 Subject: [PATCH 0170/1506] =?UTF-8?q?Adding=20type=20definition=20for=20sl?= =?UTF-8?q?ackify-html=20(https://github.com/mrq-cz/s=E2=80=A6=20(#9145)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding type definition for slackify-html (https://github.com/mrq-cz/slackify-html) * Fixed name of test file --- slackify-html/slackify-html-tests.ts | 5 +++++ slackify-html/slackify-html.d.ts | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 slackify-html/slackify-html-tests.ts create mode 100644 slackify-html/slackify-html.d.ts diff --git a/slackify-html/slackify-html-tests.ts b/slackify-html/slackify-html-tests.ts new file mode 100644 index 0000000000..075ccff3b7 --- /dev/null +++ b/slackify-html/slackify-html-tests.ts @@ -0,0 +1,5 @@ +/// + +import slackify = require("slackify-html"); + +var text = slackify('this link is important'); diff --git a/slackify-html/slackify-html.d.ts b/slackify-html/slackify-html.d.ts new file mode 100644 index 0000000000..66c0b917c3 --- /dev/null +++ b/slackify-html/slackify-html.d.ts @@ -0,0 +1,9 @@ +// Type definitions for slackify-html v1.0.1 +// Project: https://github.com/mrq-cz/slackify-html +// Definitions by: Scott Rippee +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "slackify-html" { + function slackify(html : string) : string; + export = slackify; +} From 53c91ff9a7aca751cf75cf940fc3c163e1713b99 Mon Sep 17 00:00:00 2001 From: Roger Chen Date: Sun, 1 May 2016 09:09:52 -0700 Subject: [PATCH 0171/1506] Add typings for react-split-pane (#9160) --- react-split-pane/react-split-pane-tests.tsx | 24 ++++++++++++ react-split-pane/react-split-pane.d.ts | 41 +++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 react-split-pane/react-split-pane-tests.tsx create mode 100644 react-split-pane/react-split-pane.d.ts diff --git a/react-split-pane/react-split-pane-tests.tsx b/react-split-pane/react-split-pane-tests.tsx new file mode 100644 index 0000000000..7aa6c006e6 --- /dev/null +++ b/react-split-pane/react-split-pane-tests.tsx @@ -0,0 +1,24 @@ +/// +/// + +import * as React from "react"; +import * as SplitPane from "react-split-pane"; + +class SplitPaneTest extends React.Component, {}> { + + render() { + return ( + +
+
+ + ); + } +} diff --git a/react-split-pane/react-split-pane.d.ts b/react-split-pane/react-split-pane.d.ts new file mode 100644 index 0000000000..e3d7f959de --- /dev/null +++ b/react-split-pane/react-split-pane.d.ts @@ -0,0 +1,41 @@ +// Type definitions for react-split-pane v0.1.38 +// Project: https://github.com/tomkp/react-split-pane +// Definitions by: Roger Chen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace ReactSplitPane { + interface ReactSplitPaneProps { + allowResize?: boolean; + className?: string; + /** + * Either a number (in pixels) or string (percentage) + */ + defaultSize?: number | string; + /** + * Either a number (in pixels) or string (percentage) + */ + maxSize?: number | string; + /** + * Either a number (in pixels) or string (percentage) + */ + minSize?: number | string; + onChange?: Function; + onDragFinished?: Function; + onDragStarted?: Function; + primary?: string; + /** + * Either a number (in pixels) or string (percentage) + */ + size?: number | string; + split?: string; + } + + interface ReactSplitPaneClass extends __React.ComponentClass { } +} + +declare module "react-split-pane" { + var split: ReactSplitPane.ReactSplitPaneClass; + export = split; +} From 925bf8b076867d714a75b9e9d86118287e030db2 Mon Sep 17 00:00:00 2001 From: Sergey Rubanov Date: Sun, 1 May 2016 20:16:58 +0400 Subject: [PATCH 0172/1506] add title property to TabChangeInfo (#9163) --- chrome/chrome.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 9cdf8c3a5d..cdb48b2767 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -6211,6 +6211,11 @@ declare namespace chrome.tabs { * @since Chrome 27. */ faviconUrl?: string; + /** + * The tab's new title. + * @since Chrome 48. + */ + title?: string; } interface TabMoveInfo { From 1b14446e5d6235b529c61e0554efeb9f30cf88c2 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Sun, 1 May 2016 18:17:09 +0200 Subject: [PATCH 0173/1506] Update to Electron 0.37.8 (#9161) * Update to Electron 0.37.8 * Fix exchanged interceptBufferProtocol / interceptStringProtocol + add handler types to avoid duplicates --- github-electron/github-electron-main-tests.ts | 12 ++- github-electron/github-electron.d.ts | 97 +++++++++++++------ 2 files changed, 74 insertions(+), 35 deletions(-) diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index 27d6599596..a2c40c1d68 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -19,6 +19,7 @@ import { screen, shell, session, + systemPreferences, hideInternalModules } from 'electron'; @@ -260,8 +261,8 @@ app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1'); app.commandLine.appendSwitch('v', -1); app.commandLine.appendSwitch('vmodule', 'console=0'); -// app -// https://github.com/atom/electron/blob/master/docs/api/app.md +// systemPreferences +// https://github.com/electron/electron/blob/master/docs/api/system-preferences.md var browserOptions = { width: 1000, @@ -271,7 +272,7 @@ var browserOptions = { }; // Make the window transparent only if the platform supports it. -if (process.platform !== 'win32' || app.isAeroGlassEnabled()) { +if (process.platform !== 'win32' || systemPreferences.isAeroGlassEnabled()) { browserOptions.transparent = true; browserOptions.frame = false; } @@ -288,9 +289,12 @@ if (browserOptions.transparent) { } app.on('platform-theme-changed', () => { - console.log(app.isDarkMode()); + console.log(systemPreferences.isDarkMode()); }); +// app +// https://github.com/atom/electron/blob/master/docs/api/app.md + app.on('certificate-error', function(event, webContents, url, error, certificate, callback) { if (url == "https://github.com") { // Verification logic. diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index 3d4bd89835..131a0a425a 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -149,11 +149,6 @@ declare namespace Electron { * Emitted when the gpu process crashes. */ on(event: 'gpu-process-crashed', listener: Function): this; - /** - * Emitted when the system’s Dark Mode theme is toggled. - * Note: This is only implemented on OS X. - */ - on(event: 'platform-theme-changed', listener: Function): this; on(event: string, listener: Function): this; /** * Try to close all windows. The before-quit event will first be emitted. @@ -256,10 +251,16 @@ declare namespace Electron { /** * Removes the current executable as the default handler for a protocol (aka URI scheme). * - * Note: This API is only available on Windows. + * Note: This is only implemented on Windows. * On OS X, removing the app will automatically remove the app as the default protocol handler. */ removeAsDefaultProtocolClient(protocol: string): void; + /** + * @returns Whether the current executable is the default handler for a protocol (aka URI scheme). + * + * Note: This is only implemented on OS X and Windows. + */ + isDefaultProtocolClient(protocol: string): boolean; /** * Adds tasks to the Tasks category of JumpList on Windows. * @@ -284,19 +285,6 @@ declare namespace Electron { * Changes the Application User Model ID to id. */ setAppUserModelId(id: string): void; - /** - * This method returns true if DWM composition (Aero Glass) is enabled, - * and false otherwise. You can use it to determine if you should create - * a transparent window or not (transparent windows won’t work correctly when DWM composition is disabled). - * - * Note: This is only implemented on Windows. - */ - isAeroGlassEnabled(): boolean; - /** - * @returns If the system is in Dark Mode. - * Note: This is only implemented on OS X. - */ - isDarkMode(): boolean; /** * Imports the certificate in pkcs12 format into the platform certificate store. * @param callback Called with the result of import operation, a value of 0 indicates success @@ -2268,19 +2256,19 @@ declare namespace Electron { /** * Registers a protocol of scheme that will send the file as a response. */ - registerFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: FileProtocolCallback) => void, completion?: (error: Error) => void): void; + registerFileProtocol(scheme: string, handler: FileProtocolHandler, completion?: (error: Error) => void): void; /** * Registers a protocol of scheme that will send a Buffer as a response. */ - registerBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: BufferProtocolCallback) => void, completion?: (error: Error) => void): void; + registerBufferProtocol(scheme: string, handler: BufferProtocolHandler, completion?: (error: Error) => void): void; /** * Registers a protocol of scheme that will send a String as a response. */ - registerStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: StringProtocolCallback) => void, completion?: (error: Error) => void): void; + registerStringProtocol(scheme: string, handler: StringProtocolHandler, completion?: (error: Error) => void): void; /** * Registers a protocol of scheme that will send an HTTP request as a response. */ - registerHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: HttpProtocolCallback) => void, completion?: (error: Error) => void): void; + registerHttpProtocol(scheme: string, handler: HttpProtocolHandler, completion?: (error: Error) => void): void; /** * Unregisters the custom protocol of scheme. */ @@ -2292,25 +2280,30 @@ declare namespace Electron { /** * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a file as a response. */ - interceptFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: FileProtocolCallback) => void, completion?: (error: Error) => void): void; - /** - * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a String as a response. - */ - interceptStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: BufferProtocolCallback) => void, completion?: (error: Error) => void): void; + interceptFileProtocol(scheme: string, handler: FileProtocolHandler, completion?: (error: Error) => void): void; /** * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a Buffer as a response. */ - interceptBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: StringProtocolCallback) => void, completion?: (error: Error) => void): void; + interceptBufferProtocol(scheme: string, handler: BufferProtocolHandler, completion?: (error: Error) => void): void; + /** + * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a String as a response. + */ + interceptStringProtocol(scheme: string, handler: StringProtocolHandler, completion?: (error: Error) => void): void; /** * Intercepts scheme protocol and uses handler as the protocol’s new handler which sends a new HTTP request as a response. */ - interceptHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: HttpProtocolCallback) => void, completion?: (error: Error) => void): void; + interceptHttpProtocol(scheme: string, handler: HttpProtocolHandler, completion?: (error: Error) => void): void; /** * Remove the interceptor installed for scheme and restore its original handler. */ uninterceptProtocol(scheme: string, completion?: (error: Error) => void): void; } + type FileProtocolHandler = (request: ProtocolRequest, callback: FileProtocolCallback) => void; + type BufferProtocolHandler = (request: ProtocolRequest, callback: BufferProtocolCallback) => void; + type StringProtocolHandler = (request: ProtocolRequest, callback: StringProtocolCallback) => void; + type HttpProtocolHandler = (request: ProtocolRequest, callback: HttpProtocolCallback) => void; + interface ProtocolRequest { url: string; referrer: string; @@ -2416,7 +2409,7 @@ declare namespace Electron { */ scaleFactor: number; /** - * Can be 0, 1, 2, 3, each represents screen rotation in clock-wise degrees of 0, 90, 180, 270. + * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. */ rotation: number; touchSupport: 'available' | 'unavailable' | 'unknown'; @@ -2950,6 +2943,47 @@ declare namespace Electron { beep(): void; } + // https://github.com/electron/electron/blob/master/docs/api/system-preferences.md + + /** + * Get system preferences. + */ + interface SystemPreferences { + /** + * @returns If the system is in Dark Mode. + * + * Note: This is only implemented on OS X. + */ + isDarkMode(): boolean; + /** + * Subscribes to native notifications of OS X, callback will be called when the corresponding event happens. + * The id of the subscriber is returned, which can be used to unsubscribe the event. + * + * Note: This is only implemented on OS X. + */ + subscribeNotification(event: string, callback: Function): number; + /** + * Removes the subscriber with id. + * + * Note: This is only implemented on OS X. + */ + unsubscribeNotification(id: number): void; + /** + * Get the value of key in system preferences. + * + * Note: This is only implemented on OS X. + */ + getUserDefault(key: string, type: 'string' | 'boolean' | 'integer' | 'float' | 'double' | 'url'): any; + /** + * This method returns true if DWM composition (Aero Glass) is enabled, + * and false otherwise. You can use it to determine if you should create + * a transparent window or not (transparent windows won’t work correctly when DWM composition is disabled). + * + * Note: This is only implemented on Windows. + */ + isAeroGlassEnabled(): boolean; + } + // https://github.com/electron/electron/blob/master/docs/api/tray.md /** @@ -4418,6 +4452,7 @@ declare namespace Electron { protocol: Electron.Protocol; screen: Electron.Screen; session: typeof Electron.Session; + systemPreferences: Electron.SystemPreferences; Tray: Electron.Tray; hideInternalModules(): void; } From 80327be2772c9478d2cb52d24b441055e75eb075 Mon Sep 17 00:00:00 2001 From: Joel Day Date: Sun, 1 May 2016 09:19:20 -0700 Subject: [PATCH 0174/1506] Declarations for Kik browser API library. (#9164) * Definitions for the Kik browser integration library. * Add module declaration. * Minor fixes + tests. --- kik-browser/kik-browser-tests.ts | 310 +++++++++++++++++++++++++++++++ kik-browser/kik-browser.d.ts | 135 ++++++++++++++ 2 files changed, 445 insertions(+) create mode 100644 kik-browser/kik-browser-tests.ts create mode 100644 kik-browser/kik-browser.d.ts diff --git a/kik-browser/kik-browser-tests.ts b/kik-browser/kik-browser-tests.ts new file mode 100644 index 0000000000..ebd7bed113 --- /dev/null +++ b/kik-browser/kik-browser-tests.ts @@ -0,0 +1,310 @@ +/// + +if (kik.enabled) { + // running in kik +} + +if (kik.send) { + // can send messages +} + +kik.getUser(function (user) { + if (!user) { + // user denied access to their information + } else { + typeof user.username; // "string" + typeof user.fullName; // "string" + typeof user.firstName; // "string" + typeof user.lastName; // "string" + typeof user.pic; // "string" + typeof user.thumbnail; // "string" + } +}); + +if (kik.hasPermission()) { + // your webpage has permission +} + +kik.getAnonymousUser(function (token) { + typeof token; // "string" +}); + +kik.sign("my data", function (signedData, username, host) { + if (!signedData) { + // failed to sign + // perhaps user denied permissions + } else { + // successfully signed + typeof signedData; // "string", signed data + typeof username; // "string", user who signed + typeof host; // "string", host of your webpage + // all of these fields must be passed to the + // verification service to be successful + } +}); + +kik.anonymousSign("my data", function (signedData, anonToken, host) { + if (!signedData) { + // failed to sign + } else { + // successfully signed + typeof signedData; // "string", signed data + typeof anonToken; // "string", anonymous user who signed + typeof host; // "string", host of your webpage + } +}); + +kik.send({ + title : "Message title" , + text : "Message body" , + pic : "http://mysite.com/pic" , // optional + big : true , // optional + noForward : true , // optional + data : { some : "json" } // optional +}); + +kik.send("myFriend", { + title : "Message title" , + text : "Message body" , +}); + +if (kik.message) { + // your webpage was launched from a message + // kik.message is exactly what was provided in kik.send + // in this case: { some "json" } +} + +kik.openConversation("kikteam"); + +kik.metrics.enableGoogleAnalytics("id", "mydomain.com"); +kik.metrics.enableGoogleAnalytics(); +kik.showProfile("kikteam"); + +kik.pickUsers(function (users) { + if (!users) { + // action was cancelled by user + } else { + users.forEach(function (user) { + typeof user.username; // "string" + typeof user.fullName; // "string" + typeof user.firstName; // "string" + typeof user.lastName; // "string" + typeof user.pic; // "string" + typeof user.thumbnail; // "string" + }); + } +}); + +kik.pickUsers({ + minResults : 2 , // number >= 0 + maxResults : 4 // number > 0 +}, function (users) { + // do something with data +}); + +kik.pickUsers({ + preselected : [ + { username : "foo" /*, etc */ }, + // any user object obtained from previous call to pickUsers + ] +}, function (users) { + // do something with data +}); + +kik.pickUsers({ + filterSelf: false +}, function (users) { + // do something with data +}); + +kik.photo.get(function (photos) { + if (!photos) { + // action cancelled by user + } else { + // photos is a list of data URLs + } +}); + +kik.photo.get({ + quality : 0.7 , // number between 0-1 + minResults : 2 , // number between 1-25 + maxResults : 25 , // number between 1-25 + maxHeight : 1280 , // number in pixels between 0-1280 + maxWidth : 1280 , // number in pixels between 0-1280 +}, function (photos) { + // do something with the photos +}); + +kik.photo.getFromCamera({ + onSelect : function (numPhotos) { + // called immediately after the user has selected photos + // "numPhotos" is the number of photos selected by the user + // that many "onPhoto" events will be fired after this + // "onComplete" will fire after all "onPhoto" events are done + }, + onPhoto : function (photo, index) { + // "photo" is a data URL representing a single image + // "photo" may be null if there was an error in processing + // this will be called once for each image when it is ready + // "index" is an integer relating to the order of selection + // event may not come in order so use index if you care + }, + onComplete : function (photos) { + // "photos" is list of all photos from all photo events + // this event is identical to normal callback + }, + onCancel : function () { + // the action was cancelled by the user + // no other events will be called + } +}); + +kik.photo.get({ + quality : 0.7 , // number between 0-1 + minResults : 2 , // number between 1-25 + maxResults : 25 , // number between 1-25 + maxHeight : 1280 , // number in pixels between 0-1280 + maxWidth : 1280 , // number in pixels between 0-1280 +}, function (photos) { + // do something with the photos +}); + +kik.photo.getFromCamera({ + onSelect : function (numPhotos) { + // called immediately after the user has selected photos + // 'numPhotos' is the number of photos selected by the user + // that many 'onPhoto' events will be fired after this + // 'onComplete' will fire after all 'onPhoto' events are done + }, + onPhoto : function (photo, index) { + // 'photo' is a data URL representing a single image + // 'photo' may be null if there was an error in processing + // this will be called once for each image when it is ready + // 'index' is an integer relating to the order of selection + // event may not come in order so use index if you care + }, + onComplete : function (photos) { + // 'photos' is list of all photos from all photo events + // this event is identical to normal callback + }, + onCancel : function () { + // the action was cancelled by the user + // no other events will be called + } +}); + +kik.photo.getFromGallery(function (photos) { + // do something with the photos +}); + +kik.photo.saveToGallery("url", function (status) { + if (status) { + // save succeeded + } else { + // save failed + } +}); + +kik.picker( + "http://othersite.com/", + { arbitrary : "request data" }, + function (response) { + // do something with the picked data! + } +); + +if (kik.picker.reply) { + // webpage was launched in "picker mode" + // kik.picker.url === the url of the calling webpage + // kik.picker.data === { arbitrary : "request data" } + kik.picker.reply({ arbitrary : "response data" }); +} + +kik.ready(function () { + // expensive task that should not block loading +}); + +function handleBackButton () { + // called when back button is pressed + return false; // optionally cancel default behavior +} + +kik.browser.back(handleBackButton); // handle back button +kik.browser.unbindBack(handleBackButton); // unbind from handling back button + +kik.open("http://www.google.com/"); +kik.open("https://pop.kik.com/"); +kik.open("twitter://post"); + +kik.open("http://mysite.com/", true); // opens in popup mode + +kik.open("https://thirdparty.com/auth/page/path", true); + +kik.open("http://mysite.com/#response-data"); + +kik.linkData; // "response-data" + +kik.on("linkData", function () { + kik.linkData; // "response-data" +}); + +if (kik.browser.background) { + // the webpage is in the background +} + +kik.browser.on("background", function () { + // the webpage is now in the background +}); +kik.browser.on("foreground", function () { + // the webpage has returned to the foreground +}); + +// lock the orientation in landscape mode +kik.browser.setOrientationLock("landscape"); + +// unlock the orientation +kik.browser.setOrientationLock("free"); + +kik.browser.statusBar(false); // hide status bar +kik.browser.statusBar(true); // show status bar + +kik.formHelpers.show(); // show helpers +kik.formHelpers.hide(); // hide helpers +kik.formHelpers.isEnabled(); // check if enabled + +// backlight will not turn off as long +// as your webpage is visible to the user +kik.browser.backlightTimeout(false); + +// backlight will timeout as per OS rules +kik.browser.backlightTimeout(true); + +function eventHandler () { + // do something when event occurs +} + +// bind to event +kik.on("message", eventHandler); + +// unbind from event +kik.off("message", eventHandler); + +// bind to an event once (ignoring subsequent occurrences) +kik.once("message", eventHandler); + +kik.trigger("message", { + title : "Fake message" , + // object will be passed to all event listeners +}); + +let os = kik.utils.platform.os; +typeof os.name === "string"; // "ios", "android", "osx", "windows", etc +typeof os.version === "number"; // numeric version number + +let browser = kik.utils.platform.browser; +typeof browser.name === "string"; // "chrome", "safari", "opera", etc +typeof browser.version === "number"; // numeric version number + +let version = kik.utils.platform.version; +typeof browser.name === "string"; +typeof browser.version === "number"; // numeric version number \ No newline at end of file diff --git a/kik-browser/kik-browser.d.ts b/kik-browser/kik-browser.d.ts new file mode 100644 index 0000000000..3e183b0e21 --- /dev/null +++ b/kik-browser/kik-browser.d.ts @@ -0,0 +1,135 @@ +// Type definitions for Kik Cards v2.3.6 +// Project: https://dev.kik.com +// Definitions by: Joel Day +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Kik { + enabled: boolean; + message: KikMessage; + + send(user: string, message: KikMessage): void; + send(message: KikMessage): void; + ready(callback: () => void): void; + hasPermission(): boolean; + open(url: string, popupMode?: boolean): void; + on(property: string, eventHandler: () => void): void; + off(property: string, eventHandler: () => void): void; + once(property: string, eventHandler: () => void): void; + trigger(property: string, data?: any): void; + linkData: string; + getUser(callback: (user: KikUser) => void): void; + getAnonymousUser(callback: (token: string) => void): void; + sign(data: string, callback: (signedData: string, username: string, host: string) => void): void; + anonymousSign(data: string, callback: (signedData: string, anonToken: string, host: string) => void): void; + openConversation(username: string): void; + showProfile(username: string): void; + pickUsers(options: KikPickUsersOptions, callback: (users: KikUser[]) => void): void; + pickUsers(callback: (users: KikUser[]) => void): void; + + formHelpers: { + show(): void; + hide(): void; + isEnabled(): boolean; + }; + + metrics: { + enableGoogleAnalytics(): void; + enableGoogleAnalytics(trackingId: string, domain: string, oldApi?: boolean): void; + }; + + photo: { + get(options: KikGetOptions, callback: (photos: string[]) => void): void; + getFromCamera(callbacks: KikGetFromCameraCallbacks): void; + getFromCamera(options: KikGetFromCameraOptions, callbacks: KikGetFromCameraCallbacks): void; + getFromGallery(callback: (photos: string[]) => void): void; + getFromGallery(options: KikGetOptions, callback: (photos: string[]) => void): void; + saveToGallery(url: string, callback: (status: boolean) => void): void; + get(callback: (photos: string[]) => void): void; + }; + + picker: { + (url: string, data: any, callback: (response: any) => void): void; + reply: (data: any) => void; + }; + + browser: { + background: boolean; + back(callback: () => boolean | void): void; + unbindBack(callback: () => boolean | void): void; + on(property: string, callback: () => void): void; + off(property: string, callback: () => void): void; + once(property: string, callback: () => void): void; + trigger(property: string, data?: any): void; + getOrientationLock(): string; + setOrientationLock(lock: "free" | "landscape" | "portrait"): void; + setOrientationLock(lock: string): void; + statusBar(show: boolean): void; + backlightTimeout(timeout: boolean): void; + }; + + utils: { + platform: { + os: { + name: string; + version: string; + }; + browser: { + name: string; + version: string; + }; + version: { + name: string; + version: string; + }; + }; + }; +} + +interface KikUser { + username: string; + fullName: string; + firstName: string; + lastName: string; + pic: string; + thumbnail: string; +} + +interface KikMessage { + title: string; + text: string; + pic?: string; + big?: boolean; + noForward?: boolean; + data?: any; +} + +interface KikPickUsersOptions { + minResults?: number; + maxResults?: number; + preselected?: { username: string }[]; + filtered?: string[]; + filterSelf?: boolean; +} + +interface KikGetOptions { + quality?: number; + minResults?: number; + maxResults?: number; + maxHeight?: number; + maxWidth?: number; +} + +interface KikGetFromCameraOptions { + quality?: number; + maxHeight?: number; + maxWidth?: number; +} + +interface KikGetFromCameraCallbacks { + onSelect: (numPhotos: number) => void; + onPhoto: (photo: string, index: number) => void; + onComplete: (photos: string[]) => void; + onCancel: () => void; +} + +declare const kik: Kik; \ No newline at end of file From 0dcacf4517fde4c465b0455492f47c85c2289741 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Sun, 1 May 2016 09:19:36 -0700 Subject: [PATCH 0175/1506] Update Helmet definitions for Helmet 2.0.0 (#9162) --- helmet/helmet-tests.ts | 230 ++++++++++++++++++++++++----------------- helmet/helmet.d.ts | 125 +++++++++++++--------- 2 files changed, 214 insertions(+), 141 deletions(-) diff --git a/helmet/helmet-tests.ts b/helmet/helmet-tests.ts index 0223244cc0..5d8a7515cd 100644 --- a/helmet/helmet-tests.ts +++ b/helmet/helmet-tests.ts @@ -10,22 +10,19 @@ var app = express(); */ function helmetTest() { app.use(helmet()); + app.use(helmet({})); + app.use(helmet({ frameguard: false })); + app.use(helmet({ frameguard: true })); + app.use(helmet({ + frameguard: { + action: 'deny' + } + })); } /** - * @summary Test for {@see helmet#xssFilter} function. + * @summary Test for {@see helmet#contentSecurityPolicy} function. */ -function xssFilterTest() { - app.use(helmet.xssFilter()); - app.use(helmet.xssFilter({})); - app.use(helmet.xssFilter({ setOnOldIE: false })); - app.use(helmet.xssFilter({ setOnOldIE: true })); -} - -/** - * @summary Test for {@see helmet#csp} function. - */ - function contentSecurityPolicyTest() { const emptyArray: string[] = []; const config = { @@ -63,86 +60,6 @@ function contentSecurityPolicyTest() { }, setAllHeaders: true })); - - app.use(helmet.csp()); - app.use(helmet.csp({})); - app.use(helmet.csp(config)); - app.use(helmet.csp({ - directives: { - defaultSrc: ["'self'"] - }, - setAllHeaders: true - })); -} - -/** - * @summary Test for {@see helmet#frameguard} function. - */ -function frameguardTest() { - app.use(helmet.frameguard()); - app.use(helmet.frameguard("sameorigin")); -} - -/** - * @summary Test for {@see helmet#hsts} function. - */ -function hstsTest() { - app.use(helmet.hsts()); - app.use(helmet.hsts({ maxAge: 7776000000 })); -} - -/** - * @summary Test for {@see helmet#ieNoOpen} function. - */ -function ieNoOpenTest() { - app.use(helmet.ieNoOpen()); -} - -/** - * @summary Test for {@see helmet#noSniff} function. - */ -function noSniffTest() { - app.use(helmet.noSniff()); -} - -/** - * @summary Test for {@see helmet#publicKeyPins} function. - */ -function publicKeyPinsTest() { - app.use(helmet.publicKeyPins({ - maxAge: 7776000000, - sha256s: ["AbCdEf123=", "ZyXwVu456="], - })); - - app.use(helmet.publicKeyPins({ - maxAge: 7776000000, - sha256s: ["AbCdEf123=", "ZyXwVu456="], - includeSubdomains: false - })); - - app.use(helmet.publicKeyPins({ - maxAge: 7776000000, - sha256s: ["AbCdEf123=", "ZyXwVu456="], - includeSubdomains: true - })); - - app.use(helmet.publicKeyPins({ - maxAge: 7776000000, - sha256s: ["AbCdEf123=", "ZyXwVu456="], - reportUri: "http://example.com" - })); - - app.use(helmet.publicKeyPins({ - maxAge: 7776000000, - sha256s: ["AbCdEf123=", "ZyXwVu456="], - reportOnly: true - })); - - app.use(helmet.publicKeyPins({ - maxAge: 7776000000, - sha256s: ["AbCdEf123=", "ZyXwVu456="], - setIf: function (req, res) { return true; } - })); } /** @@ -153,3 +70,132 @@ function dnsPrefetchControlTest() { app.use(helmet.dnsPrefetchControl({ allow: false })); app.use(helmet.dnsPrefetchControl({ allow: true })); } + +/** + * @summary Test for {@see helmet#frameguard} function. + */ +function frameguardTest() { + app.use(helmet.frameguard()); + app.use(helmet.frameguard({})); + app.use(helmet.frameguard({ action: 'deny' })); + app.use(helmet.frameguard({ action: 'sameorigin' })); + app.use(helmet.frameguard({ + action: 'allow-from', + domain: 'http://example.com' + })); +} + +/** + * @summary Test for {@see helmet#hidePoweredBy} function. + */ +function hidePoweredBy() { + app.use(helmet.hidePoweredBy()); + app.use(helmet.hidePoweredBy({})); + app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' })); +} + +/** + * @summary Test for {@see helmet#hpkp} function. + */ +function hpkpTest() { + app.use(helmet.hpkp({ + maxAge: 7776000000, + sha256s: ['AbCdEf123=', 'ZyXwVu456='], + })); + + app.use(helmet.hpkp({ + maxAge: 7776000000, + sha256s: ['AbCdEf123=', 'ZyXwVu456='], + includeSubdomains: false + })); + + app.use(helmet.hpkp({ + maxAge: 7776000000, + sha256s: ['AbCdEf123=', 'ZyXwVu456='], + includeSubdomains: true + })); + + app.use(helmet.hpkp({ + maxAge: 7776000000, + sha256s: ['AbCdEf123=', 'ZyXwVu456='], + reportUri: 'http://example.com' + })); + + app.use(helmet.hpkp({ + maxAge: 7776000000, + sha256s: ['AbCdEf123=', 'ZyXwVu456='], + reportOnly: true + })); + + app.use(helmet.hpkp({ + maxAge: 7776000000, + sha256s: ['AbCdEf123=', 'ZyXwVu456='], + setIf: function (req, res) { return true; } + })); +} + +/** + * @summary Test for {@see helmet#hsts} function. + */ +function hstsTest() { + app.use(helmet.hsts()); + + app.use(helmet.hsts({ maxAge: 7776000000 })); + + app.use(helmet.hsts({ + maxAge: 7776000000, + })); + + app.use(helmet.hsts({ + maxAge: 7776000000, + includeSubdomains: true + })); + + app.use(helmet.hsts({ + maxAge: 7776000000, + preload: true + })); + + app.use(helmet.hsts({ + maxAge: 7776000000, + force: true + })); + + app.use(helmet.hsts({ + maxAge: 7776000000, + setIf: function (req, res) { return true; } + })); +} + +/** + * @summary Test for {@see helmet#ieNoOpen} function. + */ +function ieNoOpenTest() { + app.use(helmet.ieNoOpen()); +} + +/** + * @summary Test for {@see helmet#noCache} function. + */ +function noCacheTest() { + app.use(helmet.noCache()); + app.use(helmet.noCache({})); + app.use(helmet.noCache({ noEtag: true })); +} + +/** + * @summary Test for {@see helmet#noSniff} function. + */ +function noSniffTest() { + app.use(helmet.noSniff()); +} + +/** + * @summary Test for {@see helmet#xssFilter} function. + */ +function xssFilterTest() { + app.use(helmet.xssFilter()); + app.use(helmet.xssFilter({})); + app.use(helmet.xssFilter({ setOnOldIE: false })); + app.use(helmet.xssFilter({ setOnOldIE: true })); +} diff --git a/helmet/helmet.d.ts b/helmet/helmet.d.ts index f32ba0a2d9..7154d0b739 100644 --- a/helmet/helmet.d.ts +++ b/helmet/helmet.d.ts @@ -5,15 +5,28 @@ /// -declare module "helmet" { - import express = require("express"); - - interface IHelmetCspDirectiveFunction { +declare module 'helmet' { + import express = require('express'); + + interface IHelmetConfiguration { + contentSecurityPolicy? : boolean | IHelmetContentSecurityPolicyConfiguration, + dnsPrefetchControl?: boolean | IHelmetDnsPrefetchControlConfiguration, + frameguard?: boolean | IHelmetFrameguardConfiguration, + hidePoweredBy?: boolean | IHelmetHidePoweredByConfiguration, + hpkp?: boolean | IHelmetHpkpConfiguration, + hsts?: boolean | IHelmetHstsConfiguration, + ieNoOpen?: boolean, + noCache?: boolean, + noSniff?: boolean, + xssFilter?: boolean | IHelmetXssFilterConfiguration + } + + interface IHelmetContentSecurityPolicyDirectiveFunction { (req: express.Request, res: express.Response): string; } - type HelmetCspDirectiveValue = string | IHelmetCspDirectiveFunction; + type HelmetCspDirectiveValue = string | IHelmetContentSecurityPolicyDirectiveFunction; - interface IHelmetCspDirectives { + interface IHelmetContentSecurityPolicyDirectives { baseUri? : HelmetCspDirectiveValue[], childSrc? : HelmetCspDirectiveValue[], connectSrc? : HelmetCspDirectiveValue[], @@ -31,36 +44,53 @@ declare module "helmet" { scriptSrc? : HelmetCspDirectiveValue[], styleSrc? : HelmetCspDirectiveValue[] } - - interface IHelmetCspConfiguration { + + interface IHelmetContentSecurityPolicyConfiguration { reportOnly? : boolean; setAllHeaders? : boolean; disableAndroid? : boolean; browserSniff?: boolean; - directives? : IHelmetCspDirectives + directives? : IHelmetContentSecurityPolicyDirectives } - interface IHelmetPublicKeyPinsSetIfFunction { + interface IHelmetDnsPrefetchControlConfiguration { + allow? : boolean; + } + + interface IHelmetFrameguardConfiguration { + action? : string, + domain? : string + } + + interface IHelmetHidePoweredByConfiguration { + setTo? : string + } + + interface IHelmetSetIfFunction { (req: express.Request, res: express.Response): boolean; } - interface IHelmetPublicKeyPinsConfiguration { + interface IHelmetHpkpConfiguration { maxAge : number; sha256s : string[]; includeSubdomains? : boolean; reportUri? : string; reportOnly? : boolean; - setIf?: IHelmetPublicKeyPinsSetIfFunction + setIf?: IHelmetSetIfFunction + } + + interface IHelmetHstsConfiguration { + maxAge: number; + includeSubdomains? : boolean; + preload? : boolean; + setIf? : IHelmetSetIfFunction, + force? : boolean; } interface IHelmetXssFilterConfiguration { setOnOldIE? : boolean; } - interface IHelmetDnsPrefetchControlConfiguration { - allow? : boolean; - } - /** * @summary Interface for helmet class. * @interface @@ -70,77 +100,74 @@ declare module "helmet" { * @summary Constructor. * @return {RequestHandler} The Request handler. */ - ():express.RequestHandler; + (options ?: IHelmetConfiguration): express.RequestHandler; + + /** + * @summary Set policy around third-party content via headers + * @param {IHelmetContentSecurityPolicyConfiguration} options The options + * @return {RequestHandler} The Request handler + */ + contentSecurityPolicy(options ?: IHelmetContentSecurityPolicyConfiguration): express.RequestHandler; /** * @summary Stop browsers from doing DNS prefetching. + * @param {IHelmetDnsPrefetchControlConfiguration} options The options + * @return {RequestHandler} The Request handler */ - dnsPrefetchControl(options ?: IHelmetDnsPrefetchControlConfiguration):express.RequestHandler; + dnsPrefetchControl(options ?: IHelmetDnsPrefetchControlConfiguration): express.RequestHandler; /** * @summary Prevent clickjacking. - * @param {string} header The header. - * @return {RequestHandler} The Request handler. + * @param {IHelmetFrameguardConfiguration} options The options + * @return {RequestHandler} The Request handler */ - frameguard(header ?: string):express.RequestHandler; + frameguard(options ?: IHelmetFrameguardConfiguration): express.RequestHandler; /** * @summary Hide "X-Powered-By" header. - * @param {Object} options The options. + * @param {IHelmetHidePoweredByConfiguration} options The options * @return {RequestHandler} The Request handler. */ - hidePoweredBy(options ?: Object):express.RequestHandler; + hidePoweredBy(options ?: IHelmetHidePoweredByConfiguration): express.RequestHandler; + + /** + * @summary Adds the "Public-Key-Pins" header. + * @param {IHelmetHpkpConfiguration} options The options + * @return {RequestHandler} The Request handler. + */ + hpkp(options ?: IHelmetHpkpConfiguration): express.RequestHandler; /** * @summary Adds the "Strict-Transport-Security" header. - * @param {Object} options The options. + * @param {IHelmetHstsConfiguration} options The options * @return {RequestHandler} The Request handler. */ - hsts(options ?: Object):express.RequestHandler; + hsts(options ?: IHelmetHstsConfiguration): express.RequestHandler; /** * @summary Add the "X-Download-Options" header. * @return {RequestHandler} The Request handler. */ - ieNoOpen():express.RequestHandler; + ieNoOpen(): express.RequestHandler; /** * @summary Add the "Cache-Control" and "Pragma" headers to stop caching. * @return {RequestHandler} The Request handler. */ - noCache(options ?: Object):express.RequestHandler; + noCache(options ?: Object): express.RequestHandler; /** * @summary Adds the "X-Content-Type-Options" header. * @return {RequestHandler} The Request handler. */ - noSniff():express.RequestHandler; - - /** - * @summary Adds the "Public-Key-Pins" header. - * @return {RequestHandler} The Request handler. - */ - publicKeyPins(options ?: IHelmetPublicKeyPinsConfiguration):express.RequestHandler; + noSniff(): express.RequestHandler; /** * @summary Mitigate cross-site scripting attacks with the "X-XSS-Protection" header. + * @param {IHelmetXssFilterConfiguration} options The options * @return {RequestHandler} The Request handler. - * @param {Object} options The options. */ - xssFilter(options ?: IHelmetXssFilterConfiguration):express.RequestHandler; - - /** - * @summary Set policy around third-party content via headers - * @return {RequestHandler} The Request handler - * @param {Object} options The options - */ - csp(options ?: IHelmetCspConfiguration): express.RequestHandler; - - /** - * @see csp - */ - contentSecurityPolicy(options ?: IHelmetCspConfiguration): express.RequestHandler; - + xssFilter(options ?: IHelmetXssFilterConfiguration): express.RequestHandler; } var helmet: Helmet; From e05e1f6f83c6ac84e9d7ff8284e8089d53a788a6 Mon Sep 17 00:00:00 2001 From: Abd ar-Rahman Hamidi Date: Sun, 1 May 2016 21:20:03 +0500 Subject: [PATCH 0176/1506] Add additional option of compression at compression.d.ts (#9165) --- compression/compression.d.ts | 44 +++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/compression/compression.d.ts b/compression/compression.d.ts index 6a444e3f49..84fa211bd0 100644 --- a/compression/compression.d.ts +++ b/compression/compression.d.ts @@ -10,8 +10,50 @@ declare module "compression" { namespace e { interface CompressionOptions { - threshold?: number; + /** + * See https://github.com/expressjs/compression#chunksize regarding the usage. + */ + chunkSize?: number; + + /** + * See https://github.com/expressjs/compression#level regarding the usage. + */ + level?: number; + + /** + * See https://github.com/expressjs/compression#memlevel regarding the usage. + */ + memLevel?: number; + + /** + * See https://github.com/expressjs/compression#strategy regarding the usage. + */ + strategy?: number; + + /** + * See https://github.com/expressjs/compression#threshold regarding the usage. + */ + threshold?: number|string; + + /** + * See https://github.com/expressjs/compression#windowbits regarding the usage. + */ + windowBits?: number; + + /** + * See https://github.com/expressjs/compression#filter regarding the usage. + */ filter?: Function; + + /** + * See https://nodejs.org/api/zlib.html#zlib_class_options regarding the usage. + */ + flush?: number; + + /** + * See https://nodejs.org/api/zlib.html#zlib_class_options regarding the usage. + */ + finishFlush?: number; } } From c7973a8d26e7863ceff71626eddd5c00ea221c31 Mon Sep 17 00:00:00 2001 From: Kai Ilbertz Date: Sun, 1 May 2016 19:24:01 +0200 Subject: [PATCH 0177/1506] Change interface names without prefix --- valdr/valdr-message-tests.ts | 4 ++-- valdr/valdr-message.d.ts | 6 +++--- valdr/valdr-tests.ts | 4 ++-- valdr/valdr.d.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/valdr/valdr-message-tests.ts b/valdr/valdr-message-tests.ts index 7bb2da6b0f..ac16992dc2 100644 --- a/valdr/valdr-message-tests.ts +++ b/valdr/valdr-message-tests.ts @@ -1,7 +1,7 @@ /// function ValdrMessageTests() { - var valdrMessage: valdr.message.IValdrMessage; + var valdrMessage: valdr.message.ValdrMessage; valdrMessage.templateUrl = 'valdrMesssageTemplate.html'; valdrMessage.translateAvailable = true; @@ -15,7 +15,7 @@ function ValdrMessageTests() { } function ValdrMessageProviderTests() { - var valdrMessageProvider: valdr.message.IValdrMessageProvider; + var valdrMessageProvider: valdr.message.ValdrMessageProvider; valdrMessageProvider.setTemplate('
{{ violation.message }}
'); valdrMessageProvider.setTemplateUrl('valdrMesssageTemplate.html'); valdrMessageProvider.addMessages({ diff --git a/valdr/valdr-message.d.ts b/valdr/valdr-message.d.ts index 2abaf99be2..b8c2a6673b 100644 --- a/valdr/valdr-message.d.ts +++ b/valdr/valdr-message.d.ts @@ -5,8 +5,8 @@ declare namespace valdr.message { - interface IValdrMessage { - /** + interface ValdrMessage { + /* * Default message template URL. */ templateUrl: string; @@ -43,7 +43,7 @@ declare namespace valdr.message { getMessage(typeName: string, fieldName: string, validatorName: string): string; } - interface IValdrMessageProvider { + interface ValdrMessageProvider { /** * Sets the default message template. * @param template the default message template (eg "
{{ violation.message }}
"). diff --git a/valdr/valdr-tests.ts b/valdr/valdr-tests.ts index e0e1860718..eb263223d3 100644 --- a/valdr/valdr-tests.ts +++ b/valdr/valdr-tests.ts @@ -1,7 +1,7 @@ /// function ValdrTests() { - var valdr: valdr.IValdr; + var valdr: valdr.Valdr; var validation = valdr.validate('person', 'lastName', 'test'); valdr.addConstraints({ 'person': { @@ -21,7 +21,7 @@ function ValdrTests() { } function ValdrProviderTests() { - var valdrProvider: valdr.IValdrProvider; + var valdrProvider: valdr.ValdrProvider; valdrProvider.addConstraints({ 'person': { 'lastName': { diff --git a/valdr/valdr.d.ts b/valdr/valdr.d.ts index 29ac2116d2..5df4d13aa0 100644 --- a/valdr/valdr.d.ts +++ b/valdr/valdr.d.ts @@ -5,7 +5,7 @@ declare namespace valdr { - interface IValdr { + interface Valdr { /** * Validates the value of the given type with the constraints for the given field name. * @param typeName the type name. @@ -40,7 +40,7 @@ declare namespace valdr { setClasses(newClasses: { valid: string, invalid: string }): void; } - interface IValdrProvider { + interface ValdrProvider { /** * Adds a new list of constraints (JSON Object). * @param newConstraints the list of constraints (JSON Object). From 1faa6f7a7e485664d3edecbf2fc294748d9b5e9f Mon Sep 17 00:00:00 2001 From: Matt Brooks Date: Tue, 3 May 2016 13:44:49 +0100 Subject: [PATCH 0178/1506] Remove `knockout.deferred.updates` plugin Acting on advice to remove the plugin, which is obsolete as of Knockout.js v3.4.0. In v3.4.0, Knockout.js includes native support for the functionality previously provided by this plugin. The plugin's API now conflicts with the official API. --- .../knockout.deferred.updates-tests.ts | 252 ------------------ ...ockout.deferred.updates-tests.ts.tscparams | 1 - .../knockout.deferred.updates.d.ts | 46 ---- .../knockout.deferred.updates.d.ts.tscparams | 1 - 4 files changed, 300 deletions(-) delete mode 100644 knockout.deferred.updates/knockout.deferred.updates-tests.ts delete mode 100644 knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams delete mode 100644 knockout.deferred.updates/knockout.deferred.updates.d.ts delete mode 100644 knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts b/knockout.deferred.updates/knockout.deferred.updates-tests.ts deleted file mode 100644 index 060ff3984a..0000000000 --- a/knockout.deferred.updates/knockout.deferred.updates-tests.ts +++ /dev/null @@ -1,252 +0,0 @@ -/// - -// Turn *off* deferred updates for computed observables and subscriptions -ko.computed.deferUpdates = false; - -var myComputed = ko.computed(() => { /* ... */ }); -// Turn *on* deferred updates for this computed observable -myComputed.deferUpdates = true; - -var myObservable = ko.observable(); -var mySubscription = myObservable.subscribe((value) => { /* ... */ }); -// Turn *on* deferred updates for this subscription -mySubscription.deferUpdates = true; - -// Turn *off* deferred updates for this computed observable -myComputed.extend({ deferred: false }); - - -// -// Examples -// - -function nestedComputedNoPlugin() { - var vm: any = { - a: ko.observable(0), - b: ko.observable(0), - c: ko.observable(0), - d: ko.observable(0), - e: ko.observable(0), - f: ko.observable(0) - }; - - var startTime = new Date().getTime(); - var updateArray = []; - - function firstUpdate() { - var updateList = document.getElementById('updates'); - while (updateList.firstChild) updateList.removeChild(updateList.firstChild); - } - - function pushUpdate(name, value, color) { - var li = document.createElement('li'); - li.appendChild(document.createTextNode(name + ' ' + value + '; ' + (new Date().getTime() - startTime) + ' ms')); - li.style.color = color; - document.getElementById('updates').appendChild(li); - } - - function lastUpdate() { - } - - var updateCounter = 0, plusminus = 1; - - vm.doUpdate = function () { - var u = updateCounter += plusminus; - startTime = new Date().getTime(); - vm.a(u); - vm.b(u); - vm.c(u); - vm.d(u); - vm.e(u); - vm.f(u); - plusminus = !u ? 1 : (u == 9) ? -1 : plusminus; - }; - - vm.setThrottle = function (value) { - vm.A.throttleEvaluation = value; - vm._B.throttleEvaluation = value; - vm.C.throttleEvaluation = value; - vm.D.throttleEvaluation = value; - vm.E.throttleEvaluation = value; - vm.F.throttleEvaluation = value; - }; - - vm.runNormal = function () { - ko.computed.deferUpdates = false; - vm.setThrottle(undefined); - vm.doUpdate(); - }; - - vm.runThrottle = function () { - ko.computed.deferUpdates = false; - vm.setThrottle(1); - vm.doUpdate(); - }; - - vm.A = ko.computed(function () { - var result = '' + vm.a(); - firstUpdate(); - pushUpdate('A', result, 'green'); - return result; - }, null, { deferEvaluation: true }); - - vm._B = ko.computed(function () { - var result = '' + vm.A() + vm.b(); - pushUpdate('B', result, 'darkturquoise'); - return result; - }, null, { deferEvaluation: true }); - - vm.C = ko.computed(function () { - var result = '' + vm._B() + vm.c(); - pushUpdate('C', result, 'royalblue'); - return result; - }, null, { deferEvaluation: true }); - - vm.D = ko.computed(function () { - var result = '' + vm.C() + vm.d(); - pushUpdate('D', result, 'indigo'); - return result; - }, null, { deferEvaluation: true }); - - vm.E = ko.computed(function () { - var result = '' + vm.D() + vm.e(); - pushUpdate('E', result, 'firebrick'); - return result; - }, null, { deferEvaluation: true }); - - vm.F = ko.computed(function () { - var f = vm.f(), result = '' + vm.E() + f; - pushUpdate('F', result, 'orangered'); - if (result === '' + f + f + f + f + f + f) lastUpdate(); - return result; - }, null, { deferEvaluation: true }); - - vm.A(); - vm._B(); - vm.C(); - vm.D(); - vm.E(); - vm.F(); - - ko.applyBindings(vm); -}; - -function nestedComputedPlugin() { - var vm: any = { - a: ko.observable(0), - b: ko.observable(0), - c: ko.observable(0), - d: ko.observable(0), - e: ko.observable(0), - f: ko.observable(0) - }; - - var startTime = new Date().getTime(); - var updateArray = []; - - function firstUpdate() { - var updateList = document.getElementById('updates'); - while (updateList.firstChild) - updateList.removeChild(updateList.firstChild); - } - - function pushUpdate(name, value, color) { - var li = document.createElement('li'); - li.appendChild(document.createTextNode(name + ' ' + value + '; ' + (new Date().getTime() - startTime) + ' ms')); - li.style.color = color; - document.getElementById('updates').appendChild(li); - } - - function lastUpdate() { - } - - var updateCounter = 0, plusminus = 1; - - vm.doUpdate = function () { - var u = updateCounter += plusminus; - startTime = new Date().getTime(); - vm.a(u); - vm.b(u); - vm.c(u); - vm.d(u); - vm.e(u); - vm.f(u); - plusminus = !u ? 1 : (u == 9) ? -1 : plusminus; - }; - - vm.setThrottle = function (value) { - vm.A.throttleEvaluation = value; - vm._B.throttleEvaluation = value; - vm.C.throttleEvaluation = value; - vm.D.throttleEvaluation = value; - vm.E.throttleEvaluation = value; - vm.F.throttleEvaluation = value; - }; - - vm.runNormal = function () { - ko.computed.deferUpdates = false; - vm.setThrottle(undefined); - vm.doUpdate(); - }; - - vm.runThrottle = function () { - ko.computed.deferUpdates = false; - vm.setThrottle(1); - vm.doUpdate(); - }; - - vm.runDefer = function () { - ko.computed.deferUpdates = true; - vm.setThrottle(undefined); - vm.doUpdate(); - }; - - vm.runWrappedDefer = ko.tasks.makeProcessedCallback(vm.runDefer); - - vm.A = ko.computed(function () { - var result = '' + vm.a(); - firstUpdate(); - pushUpdate('A', result, 'green'); - return result; - }, null, { deferEvaluation: true }); - - vm._B = ko.computed(function () { - var result = '' + vm.A() + vm.b(); - pushUpdate('B', result, 'darkturquoise'); - return result; - }, null, { deferEvaluation: true }); - - vm.C = ko.computed(function () { - var result = '' + vm._B() + vm.c(); - pushUpdate('C', result, 'royalblue'); - return result; - }, null, { deferEvaluation: true }); - - vm.D = ko.computed(function () { - var result = '' + vm.C() + vm.d(); - pushUpdate('D', result, 'indigo'); - return result; - }, null, { deferEvaluation: true }); - - vm.E = ko.computed(function () { - var result = '' + vm.D() + vm.e(); - pushUpdate('E', result, 'firebrick'); - return result; - }, null, { deferEvaluation: true }); - - vm.F = ko.computed(function () { - var f = vm.f(), result = '' + vm.E() + f; - pushUpdate('F', result, 'orangered'); - if (result === '' + f + f + f + f + f + f) lastUpdate(); - return result; - }, null, { deferEvaluation: true }); - - vm.A(); - vm._B(); - vm.C(); - vm.D(); - vm.E(); - vm.F(); - - ko.applyBindings(vm); -} diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams deleted file mode 100644 index 8b13789179..0000000000 --- a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ - diff --git a/knockout.deferred.updates/knockout.deferred.updates.d.ts b/knockout.deferred.updates/knockout.deferred.updates.d.ts deleted file mode 100644 index d3c5d7b40d..0000000000 --- a/knockout.deferred.updates/knockout.deferred.updates.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Type definitions for Knockout Deferred Updates -// Project: https://github.com/mbest/knockout-deferred-updates -// Definitions by: Sebastián Galiano -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -interface KnockoutDeferredTasks { - processImmediate(evaluator: Function, object?: any, args?: any[]): any; - processDelayed(evaluator: Function, distinct?: boolean, options?: any[]): boolean; - makeProcessedCallback(evaluator: Function): void; -} - -// Knockout global -interface KnockoutStatic { - tasks: KnockoutDeferredTasks; - processAllDeferredBindingUpdates(): void; - processAllDeferredUpdates(): void; - evaluateAsynchronously(evaluator: Function, timeout?: any): number; - ignoreDependencies(callback: Function, callbackTarget: any, callbackArgs?: any[]); -} - -// Observables -interface KnockoutSubscribableFunctions { - deferUpdates: boolean; -} - -// Computed -interface KnockoutComputedStatic { - deferUpdates: boolean; -} - -interface KnockoutSubscription { - deferUpdates: boolean; -} - -// Utils -interface KnockoutUtils { - objectForEach(obj: any, action: Function): void; - objectMap(source: any, mapping: Function): any; -} - -// Deferred extender -interface KnockoutExtenders { - deferred(target: any, value: boolean): any; -} \ No newline at end of file diff --git a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams deleted file mode 100644 index 8b13789179..0000000000 --- a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams +++ /dev/null @@ -1 +0,0 @@ - From 74c909751b2aa6741b9a8e54d11e9b5e6204e2cc Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Tue, 3 May 2016 17:24:40 +0200 Subject: [PATCH 0179/1506] Add torrent-stream definitions (#9111) * Add torrent-stream definitions * Fix * Update torrent-stream.d.ts * Update torrent-stream-tests.ts * Options needs to be optional * Fix --- torrent-stream/torrent-stream-tests.ts | 6 +++ torrent-stream/torrent-stream.d.ts | 62 ++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 torrent-stream/torrent-stream-tests.ts create mode 100644 torrent-stream/torrent-stream.d.ts diff --git a/torrent-stream/torrent-stream-tests.ts b/torrent-stream/torrent-stream-tests.ts new file mode 100644 index 0000000000..f69b7f968f --- /dev/null +++ b/torrent-stream/torrent-stream-tests.ts @@ -0,0 +1,6 @@ +/// + +import * as torrentStream from "torrent-stream"; + +let engine: TorrentStream.TorrentEngine = torrentStream("magnet"); +console.log(engine.swarm.downloaded) diff --git a/torrent-stream/torrent-stream.d.ts b/torrent-stream/torrent-stream.d.ts new file mode 100644 index 0000000000..ccb81613bf --- /dev/null +++ b/torrent-stream/torrent-stream.d.ts @@ -0,0 +1,62 @@ +// Type definitions for torrent-stream +// Project: https://npmjs.com/package/torrent-stream +// Definitions by: Xavier Stouder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace TorrentStream { + interface TorrentEngine { + files: TorrentFile[]; + destroy(callback: () => void): void; + connect(peer: string): void; + disconnect(peer: string): void; + block(peer: string): void; + remove(keepPieces: boolean, callback: () => void): void; + listen(port: number, callback: () => void): void; + swarm: Swarm; + + // Events + on(event: "ready" | "torrent" | "idle", callback: Function): void; + on(event: "download", callback: (pieceIndex: number) => void): void; + on(event: "upload", callback: (pieceIndex: number, offset: number, length: number) => void): void; + on(event: string,callback: Function): void; + } + interface TorrentEngineOptions { + connections?: number; // Max amount of peers to be connected to. + uploads?: number; // Number of upload slots. + tmp?: string; // Root folder for the files storage. Default folder under /tmp/torrent-stream/{infoHash}. + path?: string; // Path where to save the files. Overrides 'tmp'. + verify?: boolean; // Verify previously stored data before starting. + dht?: boolean; // Whether or not to use DHT to initialize the swarm. + tracker?: boolean; // Whether or not to use trackers from torrent file or magnet link. + trackers?: string[]; // Allows to declare additional custom trackers to use. + storage?: any; // Use a custom storage backend rather than the default disk-backed one. + } + interface Swarm { + downloaded: number; + } + interface TorrentFile { + name: string; + path: string; + length: number; + + select(): void; + deselect(): void; + createReadStream(options?: ReadStreamOptions): any; + } + interface ReadStreamOptions { + start: number; + end: number; + } +} + +declare module "torrent-stream" { + function s(magnet: string | Buffer, options?: TorrentStream.TorrentEngineOptions): TorrentStream.TorrentEngine; + + namespace s { + // Here + } + + export = s; +} From d659fd52710b61078776be74a7604bd98a2398fd Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Wed, 4 May 2016 12:07:27 +0930 Subject: [PATCH 0180/1506] added o.js --- o.js/o.js-tests.ts | 151 +++++++++++++++++++++++++++++++++++++++++++++ o.js/o.js.d.ts | 70 +++++++++++++++++++++ 2 files changed, 221 insertions(+) create mode 100644 o.js/o.js-tests.ts create mode 100644 o.js/o.js.d.ts diff --git a/o.js/o.js-tests.ts b/o.js/o.js-tests.ts new file mode 100644 index 0000000000..9ef2f05606 --- /dev/null +++ b/o.js/o.js-tests.ts @@ -0,0 +1,151 @@ +/// + +import o = require('o.js'); + +interface Product { + ID : number; + Name : string; + Description : string; + ReleaseDate : string; + DiscontinuedDate : Date; + Rating: number; + Price: number; +} +interface Category { + ID : number; + Name : string; +} + +// copy pasta all the examples from the readme! + +o('http://services.odata.org/V4/OData/OData.svc/Products') + .get(function(data) { + console.log(data); //returns an array of Product data + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products') + .take(5) + .skip(2) + .get(function(data) { + console.log(data); //An array of 5 products skiped by 2 + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products') + .find(':0') + .route('Product/Detail/:0/:1',function(data) { + console.log('Route Product/Detail/'+this.param[0]+'/'+this.param[1]+' triggered. Result:'); + console.log(data); + }); + + + +var oHandler = o('http://services.odata.org/V4/OData/OData.svc/Products'); +//do somehtting +oHandler.find(1); +// do some more................ +//get the data +oHandler.get(function(data) { + console.log(data); + //or the saved var also contains the data: + console.log(oHandler.data); +}); + + + +Q.all([ + o('http://services.odata.org/V4/OData/OData.svc/Products(4)').get(), + o('http://services.odata.org/V4/OData/OData.svc/Categories').take(2).get() +]).then(function(oHandlerArray) { + //The oHandler array contains the Product oHandler and the Group oHandler: + console.log(oHandlerArray[0].data); // 1 Product with id 4 + console.log(oHandlerArray[1].data.length); // 2 Categories +}); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products(2)') + .get() + .then(function(oHandler) { + console.log(oHandler.data); + }).fail(function(ex) { + console.log(ex); + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products') + .post({Name:'Example 1',Description:'a'}) + .post({Name:'Example 2',Description:'b'}) + .save(function(data) { + console.log("Two Products added"); + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products(1)') + .patch({Name:'NewName'}) + .save(function(data) { + console.log("Product Name changed"); + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products(1)') + .remove() + .save(function(data) { + console.log("Product deleted"); + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products(1)') + .ref('Categories', 2) + .save(function(data) { + console.log("Product(1) associated with Categories(2)"); + }); + + + +o('http://services.odata.org/V4/OData/OData.svc/Products') + .find(2) + .get() + .then(function(oHandler) { + oHandler.data.Name="NewName"; + return(o.save()); + }).then(function(oHandler) { + console.log(oHandler.data.Name); //NewName + }).fail(function(ex) { + console.log("error"); + }); + + + +// set an endpoint +o().config({ + endpoint:'http://services.odata.org/V4/OData/OData.svc' +}); +// after you have set an endpoint, you can shorten your queries: +o('Products').get(function(data) { + //same result like the first exmple on this page +}); + + + +//basic config +o().config({ + endpoint:null, // your odata endpoint for the service + json:true, // currently only json is supported + version:4, // oData version (currently supported version 4. However most also work with version 3.) + strictMode:true, // strict mode throws exception, non strict mode only logs them + start:null, // a function which is executed on loading + ready:null, // a function which is executed on ready + error:null, // a function which is executed on error + headers:[], // a array of additional headers e.g.: [{name:'headername',value:'headervalue'}] + username:null, // a basic auth username + password:null, // a basic auth password + isAsync:true //set this to false to make synced (a)jax calls. (dosn't work with basic auth!) +}); \ No newline at end of file diff --git a/o.js/o.js.d.ts b/o.js/o.js.d.ts new file mode 100644 index 0000000000..aebf0d3ead --- /dev/null +++ b/o.js/o.js.d.ts @@ -0,0 +1,70 @@ +// Type definitions for o.js +// Project: https://github.com/janhommes/o.js +// Definitions by: Matteo Antony Mistretta , Brad Zacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +interface Options { + endpoint : string + json ?: boolean + version ?: number + strictMode ?: boolean + start ?: () => any + ready ?: () => any + error ?: () => any + headers ?: string[] + username ?: string + password ?: string + isAsync ?: boolean +} + +interface OHandler { + inlinecount : number + data : T + + config(options ?: Options) : OHandler + + get(callback ?: (data : T) => void) : Q.Promise> + save(callback ?: (data : T) => void) : Q.Promise> + + route(path : string, callback ?: (data : T) => void) + + find(selector : string|number) : OHandler + + top(quantity : number) : OHandler + take(quantity : number) : OHandler + skip(quantity : number) : OHandler + first() : OHandler + + filter(filter : string) : OHandler + where(filter : string) : OHandler + any(filter : string, resource : string) : OHandler + search(columns : string[], term : string) : OHandler + + orderBy(column : string, direction ?: boolean) : OHandler + orderByDesc(column : string) : OHandler + + count() : OHandler + inlineCount(paramName ?: string) : OHandler + + batch(resource : string) : OHandler + expand(resource : string) : OHandler + ref(resource : string, id : string|number) : OHandler + + post(params : any) : OHandler + patch(params : any) : OHandler + put(params : any) : OHandler + + remove(params ?: any) : OHandler +} + +interface OFn extends OHandler { + (options ?: string | Options) : OHandler +} + +declare var o : OFn<{}>; + +declare module 'o.js' { + export = o +} \ No newline at end of file From e53fff78e250bbfd9d109163200ca85f5e98f979 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Wed, 4 May 2016 12:37:13 +0930 Subject: [PATCH 0181/1506] added some additional functionality found in src added version num --- o.js/o.js.d.ts | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/o.js/o.js.d.ts b/o.js/o.js.d.ts index aebf0d3ead..d92614a0c0 100644 --- a/o.js/o.js.d.ts +++ b/o.js/o.js.d.ts @@ -1,4 +1,4 @@ -// Type definitions for o.js +// Type definitions for o.js v0.2.2 // Project: https://github.com/janhommes/o.js // Definitions by: Matteo Antony Mistretta , Brad Zacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -24,11 +24,23 @@ interface OHandler { data : T config(options ?: Options) : OHandler + progress(callback : () => any) : OHandler get(callback ?: (data : T) => void) : Q.Promise> save(callback ?: (data : T) => void) : Q.Promise> + + post(params : any) : OHandler + patch(params : any) : OHandler + put(params : any) : OHandler + remove(params ?: any) : OHandler - route(path : string, callback ?: (data : T) => void) + routes(path : string, callback ?: (data : T) => void) : OHandler + route(path : string, callback ?: (data : T) => void) : OHandler + triggerRoute(hash : string) : OHandler + beforeRouting(callback : (routeParams : any) => boolean) : OHandler + + isEndpoint() : boolean + loading(startFn : () => any | boolean, endFn : () => any) : OHandler find(selector : string|number) : OHandler @@ -37,6 +49,10 @@ interface OHandler { skip(quantity : number) : OHandler first() : OHandler + include(column : string, data : string) : OHandler + exclude(column : string, data : string) : OHandler + filterByList(column : string, data : string) : OHandler + filter(filter : string) : OHandler where(filter : string) : OHandler any(filter : string, resource : string) : OHandler @@ -44,19 +60,16 @@ interface OHandler { orderBy(column : string, direction ?: boolean) : OHandler orderByDesc(column : string) : OHandler + select(selectStr : string) : OHandler count() : OHandler inlineCount(paramName ?: string) : OHandler batch(resource : string) : OHandler expand(resource : string) : OHandler - ref(resource : string, id : string|number) : OHandler - - post(params : any) : OHandler - patch(params : any) : OHandler - put(params : any) : OHandler - - remove(params ?: any) : OHandler + ref(resource : string, id : string | number) : OHandler + removeRef(resource : string, id : string | number) : OHandler + deleteRef(resource : string, id : string | number) : OHandler } interface OFn extends OHandler { From 5db72154fd1882bc3ac6c3ea24e50c49985fdcae Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 5 May 2016 20:51:36 +0900 Subject: [PATCH 0182/1506] Add methods derived from underscore.js --- backbone/backbone-global.d.ts | 102 ++++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 42 deletions(-) diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts index b42b6208ad..d87e5d33f2 100644 --- a/backbone/backbone-global.d.ts +++ b/backbone/backbone-global.d.ts @@ -172,8 +172,12 @@ declare namespace Backbone { invert(): any; pick(keys: string[]): any; pick(...keys: string[]): any; + pick(fn: (value: any, key: any, object: any) => any): any; omit(keys: string[]): any; omit(...keys: string[]): any; + omit(fn: (value: any, key: any, object: any) => any): any; + chain(): any; + isEmpty(): boolean; } class Collection extends ModelBase { @@ -222,58 +226,72 @@ declare namespace Backbone { private _removeReference(model: TModel): void; private _onModelEvent(event: string, model: TModel, collection: Collection, options: any): void; + /** + * Return a shallow copy of this collection's models, using the same options as native Array#slice. + */ + slice(min: number, max?: number): TModel[]; + // mixins from underscore - all(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - any(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - collect(iterator: (element: TModel, index: number, context?: any) => any[], context?: any): any[]; + all(iterator?: _.ListIterator, context?: any): boolean; + any(iterator?: _.ListIterator, context?: any): boolean; chain(): any; - contains(value: any): boolean; - countBy(iterator: (element: TModel, index: number) => any): _.Dictionary; - countBy(attribute: string): _.Dictionary; - detect(iterator: (item: any) => boolean, context?: any): any; // ??? - drop(): TModel; - drop(n: number): TModel[]; - each(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any; - every(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - filter(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[]; - find(iterator: (element: TModel, index: number) => boolean, context?: any): TModel; + collect(iterator: _.ListIterator, context?: any): TResult[]; + contains(value: TModel): boolean; + countBy(iterator?: _.ListIterator): _.Dictionary; + countBy(iterator: string): _.Dictionary; + detect(iterator: _.ListIterator, context?: any): TModel; + difference(others: TModel[]): TModel[]; + drop(n?: number): TModel[]; + each(iterator: _.ListIterator, context?: any): TModel[]; + every(iterator: _.ListIterator, context?: any): boolean; + filter(iterator: _.ListIterator, context?: any): TModel[]; + find(iterator: _.ListIterator, context?: any): TModel; + findIndex(predicate: _.ListIterator, context?: any): number; + findLastIndex(predicate: _.ListIterator, context?: any): number; first(): TModel; first(n: number): TModel[]; - foldl(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; - forEach(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any; - groupBy(iterator: (element: TModel, index: number) => string, context?: any): _.Dictionary; - groupBy(attribute: string, context?: any): _.Dictionary; - include(value: any): boolean; - indexOf(element: TModel, isSorted?: boolean): number; + foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + forEach(iterator: _.ListIterator, context?: any): TModel[]; + groupBy(iterator: _.ListIterator, context?: any): _.Dictionary; + groupBy(iterator: string, context?: any): _.Dictionary; + head(): TModel; + head(n: number): TModel[]; + include(value: TModel): boolean; + includes(value: TModel): boolean; + indexBy(iterator: _.ListIterator, context?: any): _.Dictionary; + indexBy(iterator: string, context?: any): _.Dictionary; + indexOf(value: TModel, isSorted?: boolean): number; initial(): TModel; initial(n: number): TModel[]; - inject(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; - isEmpty(object: any): boolean; - invoke(methodName: string, args?: any[]): any; + inject(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + invoke(methodName: string, ...args: any[]): any; + isEmpty(): boolean; last(): TModel; last(n: number): TModel[]; - lastIndexOf(element: TModel, fromIndex?: number): number; - map(iterator: (element: TModel, index: number, context?: any) => any, context?: any): any[]; - max(iterator?: (element: TModel, index: number) => any, context?: any): TModel; - min(iterator?: (element: TModel, index: number) => any, context?: any): TModel; - reduce(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; - select(iterator: any, context?: any): any[]; + lastIndexOf(value: TModel, from?: number): number; + map(iterator: _.ListIterator, context?: any): TResult[]; + max(iterator?: _.ListIterator, context?: any): TModel; + min(iterator?: _.ListIterator, context?: any): TModel; + partition(iterator: _.ListIterator): TModel[][]; + reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + reject(iterator: _.ListIterator, context?: any): TModel[]; + rest(n?: number): TModel[]; + sample(): TModel; + sample(n: number): TModel[]; + select(iterator: _.ListIterator, context?: any): TModel[]; + shuffle(): TModel[]; size(): number; - shuffle(): any[]; - slice(min: number, max?: number): TModel[]; - some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[]; - sortBy(attribute: string, context?: any): TModel[]; - sortedIndex(element: TModel, iterator?: (element: TModel, index: number) => number): number; - reduceRight(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any[]; - reject(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[]; - rest(): TModel; - rest(n: number): TModel[]; - tail(): TModel; - tail(n: number): TModel[]; - toArray(): any[]; - without(...values: any[]): TModel[]; + some(iterator?: _.ListIterator, context?: any): boolean; + sortBy(iterator?: _.ListIterator, context?: any): TModel[]; + sortBy(iterator: string, context?: any): TModel[]; + tail(n?: number): TModel[]; + take(): TModel; + take(n: number): TModel[]; + toArray(): TModel[]; + without(...values: TModel[]): TModel[]; } class Router extends Events { From c36f13d2e1fffac4f389c9b4b9c2f38994698b57 Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 5 May 2016 20:58:13 +0900 Subject: [PATCH 0183/1506] Add tests for methods derived from underscore.js --- backbone/backbone-tests.ts | 91 ++++++++++++++++++++++++++ backbone/backbone-with-lodash-tests.ts | 91 ++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) diff --git a/backbone/backbone-tests.ts b/backbone/backbone-tests.ts index 3669a6c4e1..6d4a988ded 100644 --- a/backbone/backbone-tests.ts +++ b/backbone/backbone-tests.ts @@ -90,6 +90,25 @@ function test_models() { note.set({ title: "March 20", content: "In his eyes she eclipses..." }); note.set("title", "A Scandal in Bohemia"); + + let strings: string[] + let value: any; + let values: any[]; + let bool: boolean; + + // underscore methods + strings = note.keys(); + values = note.values(); + values = note.pairs(); + values = note.invert(); + value = note.pick("foo"); + value = note.pick("foo", "bar"); + value = note.pick((value: any, key: any, object: any) => true); + value = note.omit("foo"); + value = note.omit("foo", "bar"); + value = note.omit((value: any, key: any, object: any) => true); + value = note.chain().pick().omit().value(); + bool = note.isEmpty(); } class Employee extends Backbone.Model { @@ -161,6 +180,78 @@ function test_collection() { book.get("published") === true); var alphabetical = books.sortBy((book: Book): number => null); + + let one: Book; + let models: Book[]; + let bool: boolean; + let numDict: _.Dictionary; + let modelDict: _.Dictionary; + let modelsDict: _.Dictionary; + let num: number; + + models = books.slice(1); + models = books.slice(1, 3); + + // underscore methods + bool = books.all((value: Book, index: number, list: Book[]) => true); + bool = books.any((value: Book, index: number, list: Book[]) => true); + bool = books.chain().any((value: Book, index: number, list: Book[]) => true).value(); + models = books.collect((value: Book, index: number, list: Book[]) => value); + bool = books.contains(book1); + numDict = books.countBy((value: Book, index: number, list: Book[]) => true); + numDict = books.countBy("foo"); + one = books.detect((value: Book, index: number, list: Book[]) => true); + models = books.difference([book1]); + models = books.drop(); + models = books.each((value: Book, index: number, list: Book[]) => true); + bool = books.every((value: Book, index: number, list: Book[]) => true); + models = books.filter((value: Book, index: number, list: Book[]) => true); + one = books.find((value: Book, index: number, list: Book[]) => true); + num = books.findIndex((value: Book, index: number, list: Book[]) => true); + num = books.findLastIndex((value: Book, index: number, list: Book[]) => true); + one = books.first(); + models = books.first(3); + models = books.foldl((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.foldr((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.forEach((value: Book, index: number, list: Book[]) => true); + modelsDict = books.groupBy((value: Book, index: number, list: Book[]) => true); + modelsDict = books.groupBy("foo"); + one = books.head(); + models = books.head(3); + bool = books.include(book1); + bool = books.includes(book1); + modelDict = books.indexBy((value: Book, index: number, list: Book[]) => true); + modelDict = books.indexBy("foo"); + num = books.indexOf(book1, true); + one = books.initial(); + models = books.initial(3); + models = books.inject((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + one = books.invoke("at", 3); + bool = books.isEmpty(); + one = books.last(); + models = books.last(3); + num = books.lastIndexOf(book1, 3); + models = books.map((value: Book, index: number, list: Book[]) => value); + one = books.max((value: Book, index: number, list: Book[]) => value); + one = books.min((value: Book, index: number, list: Book[]) => value); + [models] = books.partition((value: Book, index: number, list: Book[]) => true); + models = books.reduce((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.reduceRight((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.reject((value: Book, index: number, list: Book[]) => true); + models = books.rest(3); + one = books.sample(); + models = books.sample(3); + models = books.select((value: Book, index: number, list: Book[]) => true); + models = books.shuffle(); + num = books.size(); + bool = books.some((value: Book, index: number, list: Book[]) => true); + models = books.sortBy((value: Book, index: number, list: Book[]) => value); + models = books.sortBy("foo"); + models = books.tail(3); + one = books.take(); + models = books.take(3); + models = books.toArray(); + models = books.without(book1, book1); } ////////// diff --git a/backbone/backbone-with-lodash-tests.ts b/backbone/backbone-with-lodash-tests.ts index e0b04880bf..0ac4efe375 100644 --- a/backbone/backbone-with-lodash-tests.ts +++ b/backbone/backbone-with-lodash-tests.ts @@ -91,6 +91,25 @@ function test_models() { note.set({ title: "March 20", content: "In his eyes she eclipses..." }); note.set("title", "A Scandal in Bohemia"); + + let strings: string[] + let value: any; + let values: any[]; + let bool: boolean; + + // underscore methods + strings = note.keys(); + values = note.values(); + values = note.pairs(); + values = note.invert(); + value = note.pick("foo"); + value = note.pick("foo", "bar"); + value = note.pick((value: any, key: any, object: any) => true); + value = note.omit("foo"); + value = note.omit("foo", "bar"); + value = note.omit((value: any, key: any, object: any) => true); + value = note.chain().pick().omit().value(); + bool = note.isEmpty(); } class Employee extends Backbone.Model { @@ -152,6 +171,78 @@ function test_collection() { book.get("published") === true); var alphabetical = books.sortBy((book: Book): number => null); + + let one: Book; + let models: Book[]; + let bool: boolean; + let numDict: _.Dictionary; + let modelDict: _.Dictionary; + let modelsDict: _.Dictionary; + let num: number; + + models = books.slice(1); + models = books.slice(1, 3); + + // underscore methods + bool = books.all((value: Book, index: number, list: Book[]) => true); + bool = books.any((value: Book, index: number, list: Book[]) => true); + bool = books.chain().any((value: Book, index: number, list: Book[]) => true).value(); + models = books.collect((value: Book, index: number, list: Book[]) => value); + bool = books.contains(book1); + numDict = books.countBy((value: Book, index: number, list: Book[]) => true); + numDict = books.countBy("foo"); + one = books.detect((value: Book, index: number, list: Book[]) => true); + models = books.difference([book1]); + models = books.drop(); + models = books.each((value: Book, index: number, list: Book[]) => true); + bool = books.every((value: Book, index: number, list: Book[]) => true); + models = books.filter((value: Book, index: number, list: Book[]) => true); + one = books.find((value: Book, index: number, list: Book[]) => true); + num = books.findIndex((value: Book, index: number, list: Book[]) => true); + num = books.findLastIndex((value: Book, index: number, list: Book[]) => true); + one = books.first(); + models = books.first(3); + models = books.foldl((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.foldr((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.forEach((value: Book, index: number, list: Book[]) => true); + modelsDict = books.groupBy((value: Book, index: number, list: Book[]) => true); + modelsDict = books.groupBy("foo"); + one = books.head(); + models = books.head(3); + bool = books.include(book1); + bool = books.includes(book1); + modelDict = books.indexBy((value: Book, index: number, list: Book[]) => true); + modelDict = books.indexBy("foo"); + num = books.indexOf(book1, true); + one = books.initial(); + models = books.initial(3); + models = books.inject((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + one = books.invoke("at", 3); + bool = books.isEmpty(); + one = books.last(); + models = books.last(3); + num = books.lastIndexOf(book1, 3); + models = books.map((value: Book, index: number, list: Book[]) => value); + one = books.max((value: Book, index: number, list: Book[]) => value); + one = books.min((value: Book, index: number, list: Book[]) => value); + [models] = books.partition((value: Book, index: number, list: Book[]) => true); + models = books.reduce((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.reduceRight((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); + models = books.reject((value: Book, index: number, list: Book[]) => true); + models = books.rest(3); + one = books.sample(); + models = books.sample(3); + models = books.select((value: Book, index: number, list: Book[]) => true); + models = books.shuffle(); + num = books.size(); + bool = books.some((value: Book, index: number, list: Book[]) => true); + models = books.sortBy((value: Book, index: number, list: Book[]) => value); + models = books.sortBy("foo"); + models = books.tail(3); + one = books.take(); + models = books.take(3); + models = books.toArray(); + models = books.without(book1, book1); } ////////// From e843172c97072bed859b2f3027c158f5b8846bd7 Mon Sep 17 00:00:00 2001 From: hberntsen Date: Thu, 5 May 2016 18:07:52 +0200 Subject: [PATCH 0184/1506] Update stats.js typings to v0.16.0 (#9153) --- stats/stats-tests.ts | 20 ++++++++--------- stats/stats.d.ts | 27 ++++++++++++----------- threejs/tests/webgl/webgl_lines_colors.ts | 2 -- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/stats/stats-tests.ts b/stats/stats-tests.ts index 0c80fc99c9..0ff3838da1 100644 --- a/stats/stats-tests.ts +++ b/stats/stats-tests.ts @@ -1,21 +1,19 @@ /// var stats = new Stats(); -stats.setMode(1); // 0: fps, 1: ms +stats.showPanel( 1 ); // 0: fps, 1: ms, 2: mb, 3+: custom +document.body.appendChild( stats.dom ); -// Align top-left -stats.domElement.style.position = 'absolute'; -stats.domElement.style.left = '0px'; -stats.domElement.style.top = '0px'; - -document.body.appendChild( stats.domElement ); - -setInterval( function () { +function animate() { stats.begin(); - // your code goes here + // monitored code goes here stats.end(); -}, 1000 / 60 ); + requestAnimationFrame( animate ); + +} + +requestAnimationFrame( animate ); diff --git a/stats/stats.d.ts b/stats/stats.d.ts index 04bbc564f3..16f7162ecd 100644 --- a/stats/stats.d.ts +++ b/stats/stats.d.ts @@ -1,20 +1,21 @@ -// Type definitions for Stats.js r12 +// Type definitions for Stats.js 0.16.0 // Project: http://github.com/mrdoob/stats.js -// Definitions by: Gregory Dalton +// Definitions by: Gregory Dalton , Harm Berntsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Stats { + REVISION: number; + dom: HTMLDivElement; - REVISION: number; + /** + * @param value 0:fps, 1: ms, 2: mb, 3+: custom + */ + showPanel(value: number): void; + begin(): void; + end(): number; + update(): void; +} - domElement: HTMLDivElement; - - // 0: fps, 1: ms - setMode(value: number): void; - - begin(): void; - - end(): number; - - update(): void; +declare module "stats.js" { + export = Stats; } diff --git a/threejs/tests/webgl/webgl_lines_colors.ts b/threejs/tests/webgl/webgl_lines_colors.ts index 08501b53b1..adfef82a05 100644 --- a/threejs/tests/webgl/webgl_lines_colors.ts +++ b/threejs/tests/webgl/webgl_lines_colors.ts @@ -95,8 +95,6 @@ // stats = new Stats(); - stats.domElement.style.position = 'absolute'; - stats.domElement.style.top = '0px'; //container.appendChild( stats.domElement ); // From 36a1be34dbe202c665b3ddafd50824f78c09eea3 Mon Sep 17 00:00:00 2001 From: Thanabodee Charoenpiriyakij Date: Thu, 5 May 2016 23:14:46 +0700 Subject: [PATCH 0185/1506] Add returnValues() function to SpyAnd interface (#9175) --- jasmine/jasmine-tests.ts | 34 ++++++++++++++++++++++++++++++++++ jasmine/jasmine.d.ts | 2 ++ 2 files changed, 36 insertions(+) diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts index 45b2d155a6..d873d2716b 100644 --- a/jasmine/jasmine-tests.ts +++ b/jasmine/jasmine-tests.ts @@ -358,6 +358,40 @@ describe("A spy, when configured to fake a return value", function () { }); }); +describe("A spy, when configured to fake a series of return values", function() { + var foo: any, bar: any; + + beforeEach(function() { + foo = { + setBar: function(value: any) { + bar = value; + }, + getBar: function() { + return bar; + } + }; + + spyOn(foo, "getBar").and.returnValues("fetched first", "fetched second"); + + foo.setBar(123); + }); + + it("tracks that the spy was called", function() { + foo.getBar(123); + expect(foo.getBar).toHaveBeenCalled(); + }); + + it("should not affect other functions", function() { + expect(bar).toEqual(123); + }); + + it("when called multiple times returns the requested values in order", function() { + expect(foo.getBar()).toEqual("fetched first"); + expect(foo.getBar()).toEqual("fetched second"); + expect(foo.getBar()).toBeUndefined(); + }); +}); + describe("A spy, when configured with an alternate implementation", function () { var foo: any, bar: any, fetchedBar: any; diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index aa3acdfbf8..9841a74fc8 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -431,6 +431,8 @@ declare namespace jasmine { callThrough(): Spy; /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */ returnValue(val: any): Spy; + /** By chaining the spy with and.returnValues, all calls to the function will return specific values in order until it reaches the end of the return values list. */ + returnValues(...values: any[]): Spy; /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */ callFake(fn: Function): Spy; /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */ From 28b96be7ad7af72a3f1079ca9e5e71440fc112ec Mon Sep 17 00:00:00 2001 From: Syncfusion-JavaScript Date: Thu, 5 May 2016 21:53:23 +0530 Subject: [PATCH 0186/1506] Add Ej typescripts. (#8886) * Ej typescripts v14.1.0.41 added * Ej typescripts updated. * Email updated. * Ej typescripts v14.1.0.41 added. * Ej typescripts added * Mobile and web contents moved to widgets directory. --- ej.widgets.all/ej.mobile.all-tests.ts | 336 + ej.widgets.all/ej.mobile.all.d.ts | 19908 +++++++++ ej.widgets.all/ej.web.all-tests.ts | 1260 + ej.widgets.all/ej.web.all.d.ts | 47109 +++++++++++++++++++++ ej.widgets.all/ej.widgets.all-tests.ts | 1260 + ej.widgets.all/ej.widgets.all.d.ts | 49995 +++++++++++++++++++++++ 6 files changed, 119868 insertions(+) create mode 100644 ej.widgets.all/ej.mobile.all-tests.ts create mode 100644 ej.widgets.all/ej.mobile.all.d.ts create mode 100644 ej.widgets.all/ej.web.all-tests.ts create mode 100644 ej.widgets.all/ej.web.all.d.ts create mode 100644 ej.widgets.all/ej.widgets.all-tests.ts create mode 100644 ej.widgets.all/ej.widgets.all.d.ts diff --git a/ej.widgets.all/ej.mobile.all-tests.ts b/ej.widgets.all/ej.mobile.all-tests.ts new file mode 100644 index 0000000000..86381d522a --- /dev/null +++ b/ej.widgets.all/ej.mobile.all-tests.ts @@ -0,0 +1,336 @@ +/// +/// + +$(document).ready(function () { + + $("#CoreLinearGauge").ejLinearGauge({ + labelColor: "#8c8c8c", width: 500, + scales: [{ + width: 4, border: { color: "transparent",width:0 }, showBarPointers: false, showRanges: true, length: 310, + position: { x: 52, y: 50 }, markerPointers: [{ + value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } + }], + labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale:{x: -13} }], + ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], + ranges: [{ + endValue: 60, + startValue: 0, + backgroundColor: "#F6B53F", + border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 + }, { + endValue: 100, + startValue: 60, + backgroundColor: "#E94649", + border: { color: "#E94649" }, startWidth: 4, endWidth: 4 + }] + }], + init:onLinearGaugeinit, + mouseClick:onLinearGaugemouseClick + }); +}); + +function onLinearGaugeinit() +{ + console.log("init"); +} +function onLinearGaugemouseClick() +{ + console.log("mouseClick"); +} + +$(document).ready(function () { + + $("#CoreCircularGauge").ejCircularGauge({ + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7, + pointerCap: { radius: 12 } + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }], + mouseClick:onCircularMouseClick + }); + +}); + +function onCircularMouseClick() +{ + console.log("Mouse click.."); +} + +$(document).ready(function () { + + $("#DigitalCore").ejDigitalGauge({ + width: 525, + height: 305, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "123456789", + position: { x: 52, y: 52 } + }], + init:onDigitalGaugeinit, + itemRendering:onDigitalGaugeItemRendering + }); +}); + +function onDigitalGaugeinit() +{ + console.log("init"); +} +function onDigitalGaugeItemRendering() +{ + console.log("itemRendering"); +} + +$(document).ready(function () { + + $("#container").ejChart( + { + + + + //Initializing Common Properties for all the series + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : {width: 2} + }, + + + + title :{text: 'Efficiency of oil-fired power production'}, + size: { height: "600" }, + legend: { visible: true}, + create:onChartCreate + }); + +}); + +function onChartCreate() +{ + console.log("create"); +} + +$(document).ready(function () { + + $("#scrollcontent").ejRangeNavigator({ + + enableDeferredUpdate: true, + padding: "15", + allowSnapping:true, + selectedRangeSettings: { + start:"2015/5/25", end:"2016/5/25" + }, + + }) +}); + +$(document).ready(function () { + $("#BulletGraph1").ejBulletGraph({ + qualitativeRangeSize: 32, + quantitativeScaleLength: 475, tooltipSettings: {template: "Tooltip", visible: true}, orientation: ej.datavisualization.BulletGraph.Orientation.Horizontal, + flowDirection: ej.datavisualization.BulletGraph.FlowDirection.Forward, + quantitativeScaleSettings: { + location: { x: 110, y: 10 }, + minimum: 0, + maximum: 10, + interval: 1, + minorTicksPerInterval: 4, + majorTickSettings:{ size: 13, width: 1, stroke: 'gray'}, + minorTickSettings:{ size: 5, width: 1, stroke: 'gray'}, + + labelSettings: { + position: ej.datavisualization.BulletGraph.LabelPosition.Below, offset: 14, size: 10 + }, + featuredMeasureSettings: { width: 6 }, + comparativeMeasureSettings:{ + width: 5 + }, + featureMeasures: [{ value: 8, comparativeMeasureValue: 6.7, category: ""}] + }, + qualitativeRanges: [{ + rangeEnd: 4.3 + }, { + rangeEnd: 7.3 + }, { + rangeEnd: 10 + }], + captionSettings: { textAngle: 0, + location: { x: 17, y: 20 }, text: "Revenue YTD", font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1 }, //'#707070' + subTitle: { textAngle: 0, + text: "$ in Thousands", location: { x: 10, y: 35 }, font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1} //'#707070' + } + } + + + + }); + + $("#BulletGraph2").ejBulletGraph({ qualitativeRangeSize: 32, height:140, + quantitativeScaleLength: 475, orientation: ej.datavisualization.BulletGraph.Orientation.Horizontal, + flowDirection: ej.datavisualization.BulletGraph.FlowDirection.Forward, + quantitativeScaleSettings: { + location: { x: 110, y: 10 }, + minimum: -10, + maximum: 10, + interval: 2, + minorTicksPerInterval: 4, + majorTickSettings:{ size: 13, width: 1}, + minorTickSettings:{ size: 5, width: 1}, + + labelSettings: { + position: ej.datavisualization.BulletGraph.LabelPosition.Below, offset: 14, size: 10, labelSuffix: ' %' + }, + featuredMeasureSettings: { width: 6 }, + comparativeMeasureSettings:{ width: 5 }, + featureMeasures: [{ value: 8, comparativeMeasureValue: 6.7}] + }, + qualitativeRanges: [{ + rangeEnd: -4, rangeStroke: "#61a301" + }, { + rangeEnd: 3, rangeStroke: "#fcda21" + }, { + rangeEnd: 10, rangeStroke: "#d61e3f" + }], + captionSettings: { textAngle: 0, + location: { x: 60, y: 25 }, text: "Profit", font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '13px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1 }, //'#707070' + //subTitle: { textAngle: 0, + // text: "profit in %", location: { x: 35, y: 35 }, font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1} //'#707070' + //} + }, + drawLabels:onBulletDrawLabel + }); + +}); + + function onBulletDrawLabel() + { + console.log("drawLabel"); + } + + +$(document).ready(function () { + + $("#barcode").ejBarcode({ text: "HTTP://WWW.SYNCFUSION.COM", symbologyType: "qrbarcode", xDimension: 8, displayText: true, load:onBarcodeLoad }); + +}); + +function onBarcodeLoad() + { + console.log("load"); + } + + jQuery(function ($) { + $("#container").ejMap({ + mouseover:MapMouseOver, + onRenderComplete:MapOnRenderComplete, + navigationControl:{enableNavigation:true,orientation:'vertical',absolutePosition:{x:5,y:15},dockPosition: 'none'}, + background:'white', + enableAnimation: true, + layers: [ + { + layerType: "geometry", + enableSelection: false, + enableMouseHover:false, + + showMapItems: false, + markerTemplate: 'template', + shapeSettings: { + fill: "#626171", + strokeThickness: "1", + stroke: "#6F6F79", + highlightStroke:"#6F6F79", + valuePath: "name", + highlightColor: "gray" + + }, + + } + ] + + }); + }); + function MapMouseOver() { + console.log("mouseover"); + } + function MapOnRenderComplete() { + console.log("onRenderComplete"); + } + + + jQuery(function ($) { + $("#treemapContainer").ejTreeMap({ + treeMapItemSelected:onTreeMapItemSelected, + + levels: [ + { groupPath: "Continent", groupGap: 5} + ], + colorValuePath: "Growth", + rangeColorMapping: [ + { color: "#DC562D", from: "0", to: "1" }, + { color: "#FED124", from: "1", to: "1.5" }, + { color: "#487FC1", from: "1.5", to: "2" }, + { color: "#0E9F49", from: "2", to: "3" } + ], + showTooltip:true, + leafItemSettings: { labelPath: "Region" } + }); + }); + function onTreeMapItemSelected() { + console.log("TreeMapItemSelected"); + } + + \ No newline at end of file diff --git a/ej.widgets.all/ej.mobile.all.d.ts b/ej.widgets.all/ej.mobile.all.d.ts new file mode 100644 index 0000000000..cdf403f36c --- /dev/null +++ b/ej.widgets.all/ej.mobile.all.d.ts @@ -0,0 +1,19908 @@ +// Type definitions for ej.mobile.all v14.1.0.41 +// Project: http://help.syncfusion.com/js/typescript +// Definitions by: Syncfusion +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +/*! +* filename: ej.mobile.all.d.ts +* version : 14.1.0.41 +* Copyright Syncfusion Inc. 2001 - 2016. All rights reserved. +* Use of this code is subject to the terms of our license. +* A copy of the current license can be obtained at any time by e-mailing +* licensing@syncfusion.com. Any infringement will be prosecuted under +* applicable laws. +*/ +declare module ej { + + var dataUtil: dataUtil; + function isMobile(): boolean; + function isIOS(): boolean; + function isAndroid(): boolean; + function isFlat(): boolean; + function isWindows(): boolean; + function isCssCalc(): boolean; + function getCurrentPage(): JQuery; + function isLowerResolution(): boolean; + function browserInfo(): browserInfoOptions; + function isTouchDevice(): boolean; + function addPrefix(style: string): string; + function animationEndEvent(): string; + function blockDefaultActions(e: Object): void; + function buildTag(tag: string, innerHtml: string, styles: Object, attrs: Object): JQuery; + function cancelEvent(): string; + function copyObject(): string; + function createObject(nameSpace: string, value: Object, initIn: string): JQuery; + function defineClass(className: string, constructor:any, proto: Object, replace: boolean): Object; + function destroyWidgets(element: Object): void; + function endEvent(): string; + function event(type: string, data: any, eventProp: Object): Object; + function getAndroidVersion(): Object; + function getAttrVal(ele: Object, val: string, option: Object): Object; + function getBooleanVal(ele: Object, val: string, option: Object): Object; + function getClearString(): string; + function getDimension(element: Object, method: string): Object; + function getFontString(fontObj: Object): string; + function getFontStyle(style: string): string; + function getMaxZindex(): number; + function getNameSpace(className: string): string; + function getObject(nameSpace: string): Object; + function getOffset(ele: string): Object; + function getRenderMode(): string; + function getScrollableParents(element: Object): void; + function getTheme(): string; + function getZindexPartial(element: Object, popupEle: string): number; + function hasRenderMode(element: string): void; + function hasStyle(prop: string): boolean; + function hasTheme(element: string): string; + function hexFromRGB(color: string): string; + function ieClearRemover(element: string): void; + function isAndroidWebView(): string; + function isDevice(): boolean; + function isIOS7(): boolean; + function isIOSWebView(): boolean; + function isLowerAndroid(): boolean; + function isNullOrUndefined(value: Object): boolean; + function isPlainObject(): JQuery; + function isPortrait(): any; + function isTablet(): boolean; + function isWindowsWebView(): string; + function listenEvents(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function listenTouchEvent(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function logBase(val: string, base: string): number; + function measureText(text: string, maxwidth: number, font: string): string; + function moveEvent(): string; + function print(element: string): void; + function proxy(fn: Object, context: string, arg: string): boolean; + function round(value: string, div: string, up: string): any; + function sendAjaxRequest(ajaxOptions: Object): void; + function setCaretToPos(nput: string, pos1: string, pos2: string): void; + function setRenderMode(element: string): void; + function setTheme(): Object; + function startEvent(): string; + function tapEvent(): string; + function tapHoldEvent(): string; + function throwError(): Object; + function transitionEndEvent(): Object; + function userAgent(): boolean; + function widget(pluginName: string, className: string, proto: Object): Object; + function avg(json: Object, filedName: string): any; + function getGuid(prefix: string): number; + function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): Object; + function isJson(jsonData: string): string; + function max(jsonArray: any, fieldName: string, comparer: string): any; + function min(jsonArray: any, fieldName: string, comparer: string): any; + function merge(first: string, second: string): any; + function mergeshort(jsonArray: any, fieldName: string, comparer: string): any; + function parseJson(jsonText: string): string; + function parseTable(table: number, headerOption: string, headerRowIndex: string): Object; + function select(jsonArray: any, fields: string): any; + function setTransition(): boolean; + function sum(json: string, fieldName: string): string; + function swap(array: any, x: string, y: string): any; + var cssUA: string; + var serverTimezoneOffset: number; + var transform: string; + var transformOrigin: string; + var transformStyle: string; + var transition: string; + var transitionDelay: string; + var transitionDuration: string; + var transitionProperty: string; + var transitionTimingFunction: string; + export module device { + function isAndroid(): boolean; + function isIOS(): boolean; + function isFlat(): boolean; + function isIOS7(): boolean; + function isWindows(): boolean; + } + export module widget { + var autoInit: boolean; + var registeredInstances: Array; + var registeredWidgets: Array; + function register(pluginName: string, className: string, prototype: any): void; + function destroyAll(elements: Element): void; + function init(element: Element): void; + function registerInstance(element: Element, pluginName: string, className: string, prototype: any):void; + } + + interface browserInfoOptions { + name: string; + version: string; + culture: Object; + isMSPointerEnabled: boolean; + } + class WidgetBase { + destroy(): void; + element: JQuery; + setModel(options: Object, forceSet?: boolean):any; + option(prop?: Object, value?: Object, forceSet?: boolean): any; + persistState(): void; + restoreState(silent: boolean): void; + } + + class Widget extends WidgetBase { + constructor(pluginName: string, className: string, proto: any); + static fn: Widget; + static extend(widget: Widget): any; + register(pluginName: string, className: string, prototype: any): void; + destroyAll(elements: Element): void; + model: any; + } + + + interface BaseEvent { + cancel: boolean; + type: string; + } + class DataManager { + constructor(dataSource?: any, query?: ej.Query, adaptor?: any); + setDefaultQuery(query: ej.Query): void; + executeQuery(query?: ej.Query, done?: any, fail?: any, always?: any): JQueryPromise; + executeLocal(query?: ej.Query): ej.DataManager; + saveChanges(changes?: Changes, key?: string, tableName?: string): JQueryDeferred; + insert(data: Object, tableName: string): JQueryPromise; + remove(keyField: string, value: any, tableName: string): Object; + update(keyField: string, value: any, tableName: string): Object; + } + + class Query { + constructor(); + static fn: Query; + static extend(prototype: Object): Query; + key(field: string): ej.Query; + using(dataManager: ej.DataManager): ej.Query; + execute(dataManager: ej.DataManager, done: any, fail?: string, always?: string): any; + executeLocal(dataManager: ej.DataManager): ej.DataManager; + clone(): ej.Query; + from(tableName: any): ej.Query; + addParams(key: string, value: string): ej.Query; + expand(tables: any): ej.Query; + where(fieldName: string, operator: ej.FilterOperators, value: string, ignoreCase?: boolean): ej.Query; + where(predicate:ej.Predicate):ej.Query; + search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; + sortBy(fieldName: string, comparer?: ej.SortOrder, isFromGroup?: boolean): ej.Query; + sortByDesc(fieldName: string): ej.Query; + group(fieldName: string): ej.Query; + page(pageIndex: number, pageSize: number): ej.Query; + take(nos: number): ej.Query; + skip(nos: number): ej.Query; + select(fieldNames: any): ej.Query; + hierarchy(query: ej.Query, selectorFn: any): ej.Query; + foreignKey(key: string): ej.Query; + requiresCount(): ej.Query; + range(start:number, end:number): ej.Query; + } + + class Adaptor { + constructor(ds: any); + pvt: Object; + type: ej.Adaptor; + options: AdaptorOptions; + extend(overrides: any): ej.Adaptor; + processQuery(dm: ej.DataManager, query: ej.Query):any; + processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + } + + interface AdaptorOptions { + from?: string; + requestType?: string; + sortBy?: string; + select?: string; + skip?: string; + group?: string; + take?: string; + search?: string; + count?: string; + where?: string; + aggregates?: string; + } + + class UrlAdaptor extends ej.Adaptor { + constructor(); + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: Object): { + type: string; url: string; ejPvtData: Object; contentType?: string; data?: Object; + } + convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; + processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + onGroup(e: any): void; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; + beforeSend(dm: ej.DataManager, request: any, settings?:any): void; + insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: any }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; + getFiltersFrom(data: Object, query: ej.Query): ej.Predicate; + } + + class ODataAdaptor extends ej.UrlAdaptor { + constructor(); + options: UrlAdaptorOptions; + onEachWhere(filter: any, requiresCast: boolean): any; + onPredicate(pred: ej.Predicate, query: ej.Query, requiresCast: boolean): string; + onComplexPredicate(pred: ej.Predicate, requiresCast: boolean): string; + onWhere(filters: Array): string; + onEachSearch(e: Object): void; + onSearch(e: Object): string; + onEachSort(e: Object): string; + onSortBy(e: Object): string; + onGroup(e: Object): string; + onSelect(e: Object): string; + onCount(e: Object): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { + result: Object; count: number + }; + convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; + insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: Object; } + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; } + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: Object; accept: string; } + batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: Object; contentType: string; } + generateDeleteRequest(arr: Array, e: any): string; + generateInsertRequest(arr: Array, e: any): string; + generateUpdateRequest(arr: Array, e: any): string; + } + interface UrlAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class ODataV4Adaptor extends ej.ODataAdaptor { + constructor(); + options: ODataAdaptorOptions; + onCount(e: Object): string; + onEachSearch(e: Object): void; + onSearch(e: Object): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { + result: Object; count: number + }; + + } + interface ODataAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + search?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class JsonAdaptor extends ej.Adaptor { + constructor(); + processQuery(ds: Object, query: ej.Query): string; + batchRequest(dm: ej.DataManager, changes: Changes, e:any): Changes; + onWhere(ds: Object, e: any): any; + onSearch(ds: Object, e: any): any + onSortBy(ds: Object, e: any, query: ej.Query): Object; + onGroup(ds: Object, e: any, query: ej.Query): Object; + onPage(ds: Object, e: any, query: ej.Query): Object; + onRange(ds: Object, e: any): Object; + onTake(ds: Object, e: any): Object; + onSkip(ds: Object, e: any): Object; + onSelect(ds: Object, e: any): Object; + insert(dm: ej.DataManager, data: any): Object; + remove(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + update(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + } + class TableModel { + constructor(name: string, jsonArray: Array, dataManager: ej.DataManager, modelComputed: any); + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + setDataManager(dataManager: DataManager): void; + saveChanges(): void; + rejectChanges(): void; + insert(json: any): void; + update(value: any): void; + remove(key: string): void; + isDirty(): boolean; + getChanges(): Changes; + toArray(): Array; + setDirty(dirty:any, model:any): void; + get(index: number): void; + length(): number; + bindTo(element: any): void; + } + class Model { + constructor(json: any, table: string, name: string); + formElements: Array; + computes(value: any): void; + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + set(field: string, value: any): void; + get(field: string): any; + revert(suspendEvent: any): void; + save(dm: ej.DataManager, key: string): void; + markCommit(): void; + markDelete(): void; + changeState(state: boolean, args: any): void; + properties(): any; + bindTo(element: any): void; + unbind(element: any): void; + } + interface Changes { + changed?: Array; + added?: Array; + deleted?: Array; + } + class Predicate { + constructor(field: string, operator: ej.FilterOperators, value: any, ignoreCase: boolean); + and(field: string, operator: any, value:any, ignoreCase:boolean): void; + or(field: string, operator: any, value: any, ignoreCase: boolean): void; + validate(record: Object): boolean; + toJSON(): { + isComplex: boolean; + field: string; + operator: string; + value: any; + ignoreCase: boolean; + condition: string; + predicates: any; + }; + } + interface dataUtil { + swap(array: Array, x: number, y: number): void; + mergeSort(jsonArray: Array, fieldName: string, comparer:any): Array; + max(jsonArray: Array, fieldName: string, comparer: string): Array; + min(jsonArray: Array, fieldName: string, comparer: string): Array; + distinct(jsonArray: Array, fieldName: string, requiresCompleteRecord:any): Array; + sum(json:any, fieldName: string): number; + avg(json:any, fieldName: string): number; + select(jsonArray: Array, fieldName: string, fields:string): Array; + group(jsonArray: Array, field: string, /* internal */ level: number): Array; + parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): Object; + } + interface AjaxSettings { + type?: string; + cache: boolean; + data?: any; + dataType?: string; + contentType?: any; + async?: boolean; + } + enum FilterOperators { + contains, + endsWith, + equal, + greaterThan, + greaterThanOrEqual, + lessThan, + lessThanOrEqual, + notEqual, + startsWith + } + + enum MatrixDefaults { + m11, + m12, + m21, + m22, + offsetX, + offsetY, + type + } + enum MatrixTypes { + Identity, + Scaling, + Translation, + Unknown + } + + enum Orientation { + Horizontal, + Vertical + } + + enum SliderType { + Default, + MinRange, + Range + } + + enum eventType { + click, + mouseDown, + mouseLeave, + mouseMove, + mouseUp + } + enum headerOption { + row, + tHead + } + + enum filterType{ + StartsWith, + Contains, + EndsWith, + LessThan, + GreaterThan, + LessThanOrEqual , + GreaterThanOrEqual, + Equal, + NotEqual + } + enum Animation{ + Fade, + None, + Slide + } + enum Type{ + Overlay, + Slide + } + enum SortOrder + { + Ascending, + Descending + } + + var globalize:globalize; + var cultures:culture; + function addCulture(name: string, culture ?: any): void; + function preferredCulture(culture ?: string): culture; + function format(value: any, format: string, culture ?: string): string; + function parseInt(value: string, radix?: any, culture ?: string): number; + function parseFloat(value: string, radix?: any, culture ?: string): number; + function parseDate(value: string, format: string, culture ?: string): Date; + function getLocalizedConstants(controlName: string, culture ?: string): any; + +interface globalize { + addCulture(name: string, culture?: any): void; + preferredCulture(culture?: string): culture; + format(value: any, format: string, culture?: string): string; + parseInt(value: string, radix?: any, culture?: string): number; + parseFloat(value: string, radix?: any, culture?: string): number; + parseDate(value: string, format: string, culture?: string): Date; + getLocalizedConstants(controlName: string, culture?: string): any; + } + interface culture { + name?: string; + englishName?: string; + namtiveName?: string; + language?: string; + isRTL: boolean; + numberFormat?: formatSettings; + calendars?: calendarsSettings; + } + interface formatSettings { + pattern: Array; + decimals: number; + groupSizes: Array; + percent: percentSettings; + currency: currencySettings; + } + interface percentSettings { + pattern: Array; + decimals: number; + groupSizes: Array; + symbol: string; + } + interface currencySettings { + pattern: Array; + decimals: number; + groupSizes: Array; + symbol: string; + } + interface calendarsSettings { + standard: standardSettings; + } + interface standardSettings { + firstDay: number; + days: daySettings; + months: monthSettings; + AM: Array; + PM: Array; + twoDigitYearMax: number; + patterns: patternSettings; + } + interface daySettings { + names: Array; + namesAbbr: Array; + namesShort: Array; + } + interface monthSettings { + names: Array; + namesAbbr: Array; + } + interface patternSettings { + d: string; + D: string; + t: string; + T: string; + f: string; + F: string; + M: string; + Y: string; + S: string; + } +} +declare module App { + +var addMetaTags: boolean; + var allowPopState: boolean; + var allowPushState: boolean; + var activePage: JQuery; + var waitingPopUp: JQuery; + var hashMonitoring: boolean; + var pageTransition: string; + var renderEJMControlByDef: boolean; + function createPage(element: JQuery): void; + function getLoaction(): string; + function initPage(): void; + function loadView(url: string): void; + function transferPage(fromPage: Object, toPage: Object, options?: any, isFromAjax?: boolean): void; + function userAgent(): void; + + var pageHistory: { + activeHistory(): string; + add(url: string, options?: PageOption): void; + clearForward(): void; + find(url: string): number; + lastHistory(): string; + nextHistory(): string; + prevHistory(): string; + makeUrlAbsolute(hashString: string): void; + } + //Pageoption type for appview page + interface PageOption { + title?: string; + href?: string; + hash?: string; + } + var route: { + convertToRelativeUrl(): void; + hasProtocol(url: string): boolean; + setPageRenderMode(element: JQuery): void; + splitUrl(url: string): any; + } +} +declare module ej.mobile { + + //Global Interface + interface windowsOption { + renderDefault?: boolean; + } + enum RenderMode{ + Auto, + IOS7, + Android, + Windows, + Flat + } + enum Theme{ + Auto, + Dark, + Light + } +class Accordion extends ej.Widget { + static fn: Accordion; + constructor(element: JQuery, options?: AccordionOptions); + model: AccordionOptions; + validTags: Array; + defaults: AccordionOptions; + collapseAll(): void; + disableItems(itemIndexes: Array): void; + enableItems(itemIndexes: Array): void; + selectItems(activeList: Array): void; + deselectItems(activeList: Array): void; + expandAll(): void; + hide(): void; + show(): void; + destroy(): void; + getItemsCount(): number; +} +//ejmAccordion Option +interface AccordionOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + enableCache?: boolean; + allowMultipleOpen?: boolean; + collapsible?: boolean; + enabled?: boolean; + enableMultipleOpen?: boolean; + heightAdjustMode?: ej.mobile.Accordion.HeightAdjustMode; + windows?: windowsOption; + enablePersistence?: boolean; + selectedItems?: Array; + disabledItems?: Array; + showHeaderIcon?: boolean; + spinnerText?: string; + items?: Array; + active? (e: AccordionActiveEventArgs): void; + ajaxBeforeLoad? (e: AccordionAjaxBeforeLoadEventArgs): void; + ajaxError? (e: AccordionAjaxErrorEventArgs): void; + ajaxLoad? (e: AccordionAjaxLoadEventArgs): void; + ajaxSuccess? (e: AccordionAjaxSuccessEventArgs): void; + beforeActive? (e: AccordionBeforeActiveEventArgs): void; + destroy? (e: AccordionEventArgs): void; + create? (e: AccordionEventArgs): void; +} + +interface itemCollection { + ajaxUrl?: string; + logoClass?: string; +} +//ejmejmAccordionEvent Arugument +interface AccordionEventArgs { + cancel: boolean; + type: string; + model: AccordionOptions; +} +interface AccordionActiveEventArgs extends AccordionEventArgs { + items: string; + lastSelectedItemIndices: number; + selectedItemIndices: number; +} +interface AccordionAjaxBeforeLoadEventArgs extends AccordionEventArgs { + url: string; +} +interface AccordionAjaxErrorEventArgs extends AccordionEventArgs { + title: string; + data: Object; + url: string; +} +interface AccordionAjaxLoadEventArgs extends AccordionEventArgs { +} +interface AccordionAjaxSuccessEventArgs extends AccordionEventArgs { + content: Object; + data: Object; + url: string; +} +interface AccordionBeforeActiveEventArgs extends AccordionEventArgs { + activeItemIndex?: number; +} +export module Accordion { + enum HeightAdjustMode { + Content, + Auto, + Fill + } +} +class Autocomplete extends ej.Widget { + static fn: Autocomplete; + element: JQuery; + constructor(element: JQuery, options?: AutocompleteOptions); + model: AutocompleteOptions; + defaults: AutocompleteOptions; + disable(): void; + enable(): void; + destroy(): void; + clearText(): void; + getSelectedItems(): Array; + getValue(): string; + +} +interface AutocompleteOptions { + allowScrolling?: boolean; + filterType?: ej.mobile.Autocomplete.FilterType; + caseSensitiveSearch?: boolean; + cssClass?: string; + enableAutoFill?: boolean; + delimiterChar?: string; + enableMultiSelect?: boolean; + enableCheckbox?: boolean; + dataSource?: any; + filterMode?: string; + itemsCount?: string|number; + templateId?: string; + fields?: fieldOptions; + imageField?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + mapper?: string; + watermarkText?: string; + imageClass?: string; + allowSorting?: boolean; + value?: string; + sortOrder?: ej.mobile.Autocomplete.SortOrder; + emptyResultText?: string; + showEmptyResultText?: boolean; + minCharacter?: number; + enableDistinct?: boolean; + enablePersistence?: boolean; + enabled?: boolean; + mode?: ej.mobile.Autocomplete.Mode; + selectedKeys?: string; + windows?: windowsOption; + touchEnd? (e: AutocompleteTouchEndEventArgs): void; + keyPress? (e: AutocompleteKeyPressEventArgs): void; + select? (e: AutocompleteSelectEventArgs): void; + change? (e: AutocompleteChangeEventArgs): void; + focusIn? (e: AutocompleteFocusInEventArgs): void; + focusOut? (e: AutocompleteFocusOutEventArgs): void; + destroy? (e: AutocompleteEventArgs): void; + create? (e: AutocompleteEventArgs): void; +} +interface fieldOptions { + text?: string; + key?: string; +} +interface AutocompleteEventArgs { + cancel: boolean; + model: AutocompleteOptions; + type: string; +} +interface AutocompleteTouchEndEventArgs extends AutocompleteEventArgs { + text: string; + isChecked: boolean; + checkedItemsText: Object; + value: string; +} +interface AutocompleteKeyPressEventArgs extends AutocompleteEventArgs { + value: string; +} +interface AutocompleteSelectEventArgs extends AutocompleteEventArgs { + text: string; + isChecked: boolean; + checkedItemsText: Object; + value: string; +} +interface AutocompleteChangeEventArgs extends AutocompleteEventArgs { + text: string; + isChecked: boolean; + checkedItemsText: Object; + value: string; +} +interface AutocompleteFocusInEventArgs extends AutocompleteEventArgs { + value: string; +} +interface AutocompleteFocusOutEventArgs extends AutocompleteEventArgs { + value: string; +} +export module Autocomplete { + enum FilterType { + StartsWith, + Contains + } + enum Mode { + Search, + Default + } + enum SortOrder { + Ascending, + Descending + } +} +class Button extends ej.Widget { + static fn: Button; + element: JQuery; + constructor(element: JQuery, options?: ButtonOptions); + model: ButtonOptions; + validTags: Array; + defaults: ButtonOptions; + disable(): void; + enable(): void; +} +class Actionlink extends ej.Widget { + static fn: Actionlink; + element: JQuery; + constructor(element: Element, options?: ButtonOptions); + model: Object; + validTags: Array; + defaults: ButtonOptions; + disable(): void; + enable(): void; +} +interface ButtonOptions { + touchStart?(e: ButtonEventArgs): void; + touchEnd?(e: ButtonEventArgs): void; + cssClass?: string; + enabled?: (boolean | string); + inline?: (boolean | string); + renderMode?: (ej.mobile.RenderMode | string); + text?: string; + theme?: (ej.mobile.Theme | string); + imageClass?: string; + imagePosition?: (ej.mobile.Button.ImagePosition | string); + contentType?: (ej.mobile.Button.ContentType | string); + ios7?: ios7ButtonOptions; + android?: androidButtonOption; + windows?: windowsButtonOptions; + flat?: flatButtonOption; +} +interface ButtonEventArgs { + element: Object; + text: string; +} +interface ios7ButtonOptions { + style?: (ej.mobile.Button.IOS7.Style | string); + color?: (ej.mobile.Button.IOS7.Color | string); +} +interface androidButtonOption { + style?: (ej.mobile.Button.Android.Style | string); +} +interface windowsButtonOptions extends windowsOption { + style?: (ej.mobile.Button.Windows.Style | string); +} +interface flatButtonOption { + style?: (ej.mobile.Button.Flat.Style | string); +} +export module Button{ +export module IOS7{ + enum Style{ + Normal, + Back, + Header, + Dialog + } + enum Color{ + Gray, + Black, + Blue, + Green, + Red + } + } +export module Android{ + enum Style{ + Normal, + Small, + Dialog + } + +} +export module Windows{ + enum Style{ + Normal, + Back + } +} +export module Flat{ + enum Style{ + Normal, + Back, + Header + } +} + enum ImagePosition{ + Left, + Right + } + enum ContentType{ + Text, + Image, + Both + } +} +class DatePicker extends ej.Widget { + static fn: DatePicker; + static Locale:any; + element: JQuery; + constructor(element: JQuery, options?: DatePickerOptions); + model: DatePickerOptions; + defaults: DatePickerOptions; + disable(): void; + enable(): void; + hide(): void; + show(): void; + setCurrentDate(date:string): void; + getValue(): string; + destroy(): void; +} + +//ejmDatePicker Options +interface DatePickerOptions { + cssClass?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + culture?: string; + dateFormat?: string; + value?: string; + enabled?: boolean; + enablePersistence?: boolean; + ios7?: ios7Option; + windows?: windowsOption; + maxDate?: string; + minDate?: string; + load? (e: DatePickerEventArgs): void; + select? (e: DatePickerEventArgs): void; + focusIn? (e: DatePickerEventArgs): void; + focusOut? (e: DatePickerEventArgs): void; + open? (e: DatePickerEventArgs): void; + close? (e: DatePickerEventArgs): void; + change? (e: DatePickerEventArgs): void; + destroy? (e: DatePickerArgs): void; + create? (e: DatePickerArgs): void; +} + +interface DatePickerArgs { + type: string; + model: DatePickerOptions; + value: string; +} +//ejmDatePickerEvent Arugument +interface DatePickerEventArgs extends DatePickerArgs { + cancel: boolean; + +} + +interface ios7Option { + renderDefault: boolean; +} + + +//Class ejmDropDownList +class DropDownList extends ej.Widget { + static fn: DropDownList; + constructor(element: JQuery, options?: DropDownListOptions); + model: DropDownListOptions; + defaults: DropDownListOptions; + show(): void; + hide(): void; + getValue():string; + selectItemByIndex(index:(number|string)): void; + unselectItemByIndex(index:(number|string)): void; + selectItemByIndices(indices:Array): void; + unselectItemByIndices(indices: Array): void; + destroy(): void; + getSelectedItemsValue(): Array; + getSelectedItemValue(): string; +} + +//ejmDropDownList WindowsOption +interface windowsDropDownListOption extends windowsOption { + type?: ej.mobile.DropDownList.WindowsType; +} + +interface androidDropDownListOption { + popUpHeight?: number|string; +} + +interface fieldsDropDownListOption { + text?: string; + groupBy?: string; + imageClass?: string; + imageUrl?: string; + checkBy?: string; + enableTemplate?: string; + templateID?: string; + value?: string; +} + +//ejmDropDownList Option +interface DropDownListOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + readOnly?: boolean; + targetID?: string; + selectedItemIndex?: number|string; + dataSource?: any; + fields?: fieldsDropDownListOption; + query?: string; + allowVirtualScrolling?: boolean; + virtualScrollMode?: ej.mobile.DropDownList.VirtualScrollingMode; + itemRequestCount?: number|string; + enabled?: boolean; + enableMultiSelect?: boolean; + delimiterChar?: string; + enableGrouping?: boolean; + mode?: ej.mobile.DropDownList.Mode; + enableTemplate?: boolean; + enablePersistence?: boolean; + windows?: windowsDropDownListOption; + android?: androidDropDownListOption; + items?: Array; + focusIn? (e: DropDownArgs): void; + focusOut? (e: DropDownArgs): void; + select? (e: DropDownSelectArgs): void; + change? (e: DropDownSelectArgs): void; + checkChange? (e: DropDownListEventArgs): void; +} + +interface DropDownArgs { + cancel: boolean; + type: string; + model: DropDownListOptions; +} +//ejmDropDownListEvent Arugument +interface DropDownListEventArgs extends DropDownArgs { + checked: boolean; +} + +interface DropDownSelectArgs extends DropDownArgs { + selectedText: string; + value: string; + selectedItem: Object; +} + +export module DropDownList{ + enum VirtualScrollingMode{ + Continuous, + Normal + } + enum WindowsType{ + ComboBox, + List + } + enum Mode { + Normal, + Native + } +} + +class Numeric extends ej.Widget { + static fn: Numeric; + element: JQuery; + constructor(element: JQuery, options?: EditorOptions); + model: EditorOptions; + ValidTags: Array; + defaults: EditorOptions; + disable(): void; + enable(): void; + getValue(): any; + setValue(value:number): void; + +} + +interface EditorOptions { + cssClass?: string; + enableStrictMode?: boolean; + enabled?: boolean; + showBorder?: boolean; + showSpinButton?: boolean; + incrementStep?: number; + maxValue?: number; + minValue?: number; + name?: string; + enablePersistence?: boolean; + readOnly?: boolean; + renderMode?: ej.mobile.RenderMode; + decimalPlaces?: number; + theme?: ej.mobile.Theme; + value?: number; + watermarkText?: string; + windows?: windowsOption; + change? (e: EditorEventArgs): void; + focusIn? (e: EditorEventArgs): void; + focusOut? (e: EditorEventArgs): void; + destroy?(e:EditorBaseArgs):void; + create?(e:EditorBaseArgs):void; +} + +interface EditorBaseArgs{ + cancel: boolean; + type: string; + model: EditorOptions; +} + +interface EditorEventArgs extends EditorBaseArgs { + value: number; + element: Object; +} + + +class Grid extends ej.Widget { + static fn: Grid; + element: JQuery; + constructor(element: JQuery, options?: GridOptions); + model: GridOptions; + validTags: Array; + defaults: GridOptions; + disable(): void; + enable(): void; + destroy(): void; + getColumnByField(field:string): void; + getColumnByHeaderText(headerText:string): void; + getColumnByIndex(index:number): void; + getColumnFieldNames(): void; + getColumnIndexByField(field:string): void; + getColumnMemberByIndex(colIdx:number): void; + hideColumns(col:string): void; + refreshContent(requestType:string): void; + showColumns(col:string): void; +} +interface GridOptions { + cssClass?: string; + allowPaging?: boolean; + allowSorting?: boolean; + allowFiltering?: boolean; + allowScrolling?: boolean; + allowSelection?: boolean; + dataSource: any; + caption?: string; + enablePersistence?: boolean; + selectedRowIndex?: number; + showCaption?: boolean; + allowColumnSelector?: boolean; + transition?: string; + columns?: Array; + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + rowSelecting? (e: GridEventArgs): void; + rowSelected? (e: GridEventArgs): void; + actionBegin? (e: GridEventArgs): void; + actionComplete? (e: GridEventArgs): void; + actionSuccess? (e: GridEventArgs): void; + actionFailure? (e: GridEventArgs): void; + queryCellInfo? (e: GridEventArgs): void; + rowDataBound? (e: GridEventArgs): void; + modelChange? (e: GridEventArgs): void; + load? (e: GridEventArgs): void; + pageSettings?: PageSettings; + scrollSettings?: ScrollSettings; + sortSettings?: SortSettings; + filterSettings?: FilterSettings; +} + +interface PageSettings { + pageSize?: number; + currentPage?: number; + display?: ej.mobile.Grid.PagerDisplay; + type?: ej.mobile.Grid.PagerType; + totalRecordsCount?: number; +} +interface ScrollSettings { + enableColumnScrolling?: boolean; + height?: any; + width?: any; + enableRowScrolling?: boolean; + enableNativeScrolling?: boolean; +} +interface SortSettings { + allowMultiSorting?: boolean; + sortedColumns?: Array; +} +interface FilterSettings { + isCaseSensitive?: boolean; + filterBarMode?: ej.mobile.Grid.FilterBarMode; + interval?: number; + filteredColumns?: Array; +} + +//ejmGridEvent Arugument +interface GridEventArgs { + cancel: boolean; + type: string; + model: GridOptions; +} + +export module Grid +{ +enum PagerDisplay +{ +Normal, +Fixed +} + +enum PagerType +{ +Normal, +Scrollable +} + +enum FilterBarMode +{ +Immediate, +OnEnter +} +enum Actions +{ +Paging, +Sorting, +Filtering, +Refresh +} +} +class Header extends ej.Widget { + static fn: Header; + element: JQuery; + constructor(element: JQuery, options?: HeaderOptions); + model: HeaderOptions; + defaults: HeaderOptions; + getTitle(): string; + destroy(): void; +} + +interface HeaderOptions { + hideForUnSupportedDevice?: boolean; + leftButtonNavigationUrl?: string; + leftButtonImageClass: string; + leftButtonImageUrl: string; + rightButtonNavigationUrl?: string; + rightButtonImageClass?:string; + rightButtonImageUrl?:string; + cssClass?: string; + title?: string; + showTitle?: boolean; + position?: ej.mobile.Header.Position; + leftButtonCaption?: string; + rightButtonCaption?: string; + leftButtonStyle?:ej.mobile.Header.HeaderLeftButtonStyle; + rightButtonStyle?:ej.mobile.Header.HeaderRightButtonStyle; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + showLeftButton?: boolean; + showRightButton?: boolean; + enablePersistence?:boolean; + templateId?: string; + ios7?: Headerios7Options; + flat?: HeaderFlatOptions; + windows?: HeaderWindowsOptions; + android?: HeaderAndroidOptions; + leftButtonTap? (e: HeaderLeftButtonTapEventArgs): void; + rightButtonTap? (e: HeaderRightButtonTapEventArgs): void; + destroy?(e:HeaderBaseArgs):void; + create?(e:HeaderBaseArgs):void; +} +interface HeaderWindowsOptions extends windowsOption { + enableCustomText?: boolean; + renderDefault?: boolean; + rightButtonStyle?: ej.mobile.Header.Windows.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.Windows.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface HeaderAndroidOptions { + backButtonImageClass?: string; + rightButtonStyle?: ej.mobile.Header.Android.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.Android.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface Headerios7Options { + rightButtonStyle?: ej.mobile.Header.IOS7.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.IOS7.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface HeaderFlatOptions { + rightButtonStyle?: ej.mobile.Header.Flat.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.Flat.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} + +interface HeaderBaseArgs{ + cancel: boolean; + type: string; + model: FooterOptions; +} +interface HeaderLeftButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} +interface HeaderRightButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} + +export module Header +{ +enum Position +{ + Normal, + Fixed +} +enum HeaderLeftButtonStyle +{ + Back, + Header, + Normal + +} +enum HeaderRightButtonStyle +{ + Header, + Normal +} + +export module IOS7 +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Header, + Normal +} +enum HeaderRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Flat +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum HeaderRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Android +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum HeaderRightButtonStyle +{ + Auto, + Normal, + Header +} +} + +export module Windows +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum HeaderRightButtonStyle +{ + Auto, + Normal, + Header +} +} +} + + + +/* ListView - Start*/ +interface ajaxSettingsOptions { + type?: string; + cache?: boolean; + async?: boolean; + dataType?: string; + contentType?: string; + url?: string; + data?: Array; +} +//Class ejmListView +class ListView extends ej.Widget { + static fn: ListView; + constructor(element: JQuery, options?: ListViewOptions); + model: ListViewOptions; + defaults: ListViewOptions; + addItem(list?:Object, index?:number,groupid?:any): void; + checkAllItem(): void; + checkItem(index:number,childId?:any): void; + deActive(index:number,childId?:any): void; + disableItem(index:number,childId?:any): void; + enableItem(index:number,childId?:any): void; + getActiveItem(): void; + getActiveItemText(): void; + getCheckedItems(): void; + getCheckedItemsText(): void; + getItemsCount(): void; + getItemText(index:number,childId?:any): void; + hasChild(index:number,childId?:any): boolean; + hide(): void; + hideItem(index:number,childId?:any): void; + isChecked(index:number,childId?:any): boolean; + loadAjaxContent(): void; + removeCheckMark(index:number,childId?:any): void; + removeItem(index:number,childId?:any): void; + selectItem(index:number,childId?:any): void; + setActive(index:number,childId?:any): void; + show(): void; + showItem(index:number,childId?:any): void; + unCheckAllItem(): void; + unCheckItem(index: number, childId?: any): void; + clear(): void; + append(data: Object): void; + getActiveItemData(): void; + getSelectedItemValue(): void; + getSelectedItemsValue(): void; + destroy(): void; +} +//ejmListView IOS7Option +interface Ios7Option { + inline?: boolean; +} +//ejmListView IOS7Option +interface windowsListViewOption extends windowsOption { + preventSkew?: boolean; + enableHeaderCustomText?: boolean; +} + +//ejmListView Option +interface ListViewOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + enablePullToRefresh?: boolean; + refreshThreshold?: number; + pullToRefreshSettings?: pullToRefreshSettings; + mode?: ej.mobile.ListView.Mode + cssClass?: string; + ios7?: Ios7Option; + windows?: windowsListViewOption; + adjustFixedPosition?: boolean; + ajaxSettings?: ajaxSettingsOptions; + enableCache?: boolean; + allowScrolling?: boolean; + checkDOMChanges?: boolean; + dataBinding?: boolean; + dataSource?: any; + enableAjax?: boolean; + enableCheckMark?: boolean; + enableFiltering?: boolean; + showHeader?: boolean; + showHeaderBackButton?: boolean; + enableNativeScrolling?: boolean; + showScrollbars?: boolean; + fieldSettings?: fieldSettings; + enableGroupList?: boolean; + headerBackButtonText?: string; + hideHeaderForUnSupportedDevice?: boolean; + headerTitle?: string; + height?: number; + persistSelection?: boolean; + preventSelection?: boolean; + query?: string; + renderTemplate?: boolean; + selectedItemIndex?: number; + autoAdjustHeight?: boolean; + autoAdjustScrollHeight?: boolean; + templateId?: string; + transition?: string; + width?: number; + items?: Array; + enablePersistence?: boolean; + create? (e: ListViewBaseEventArgs): void; + destroy? (e: ListViewBaseEventArgs): void; + ajaxComplete? (e: ListViewEventArgs): void; + ajaxError? (e: ListViewEventArgs): void; + ajaxSuccess? (e: ListViewEventArgs): void; + headerBackButtonTap? (e: ListViewEventArgs): void; + load? (e: ListViewBaseEventArgs): void; + loadComplete? (e: ListViewBaseEventArgs): void; + touchEnd? (e: ListViewEventArgs): void; + touchStart? (e: ListViewEventArgs): void; + refreshBegin? (e: ListViewBaseEventArgs): void; + refreshSuccess? (e: ListViewEventArgs): void; + refreshError? (e: ListViewBaseEventArgs): void; + refreshComplete? (e: ListViewBaseEventArgs): void; + ajaxBeforeLoad? (e: ListViewEventArgs): void; +} +interface pullToRefreshSettings{ + pullText?:string; + releaseText?:string; + refreshText?:string; + errorText?:string; + appendData?:boolean; + appendPosition?:ej.mobile.ListView.AppendPosition; +} +interface fieldSettings{ + navigateUrl?:string; + href?:string; + enableAjax?:string; + preventSelection?:string; + persistSelection?:string; + text?:string; + enableCheckMark?:string; + checked?:string; + primaryKey?:string; + parentPrimaryKey?:string; + imageClass?:string; + imageUrl?:string; + childHeaderTitle?:string; + childId?:string; + childHeaderBackButtonText?:string; + renderTemplate?:string; + templateId?:string; + touchStart?:string; + touchEnd?:string; + attributes?:string; + groupID?:string; + id?:string; + value?: string; +} +//ejmListViewEvent Arugument +interface ListViewBaseEventArgs { + cancel: boolean; + type: string; + model: ListViewOptions; +} +interface ListViewEventArgs extends ListViewBaseEventArgs { + ajaxData?: Object; + data?: Object; + errorData?: Object; + successData?: Object; + text?: string; + element?: Object; + id?: string; + hasChild?: boolean; + currentItem?: string; + currentText?: string; + currentItemIndex?: number; + isChecked?: boolean; + checkedItems?: number; + checkedItemsText?: string; +} +export module ListView{ + enum AppendPosition{ + Bottom, + Top + } + enum Mode { + Page, + Container + } +} + +class Menu extends ej.Widget { + static fn: Menu; + element: JQuery; + constructor(element: JQuery, options?: MenuOptions); + model: MenuOptions; + defaults: MenuOptions; + addItem(menu: any, index: number): void; + disable(): void; + disableItem(index: number): void; + disableOverFlow(): void; + disableOverFlowItem(index: number): void; + enable(): void; + enableItem(index: number): void; + enableOverFlow(): void; + enableOverFlowItem(index: number): void; + hide(): void; + removeItem(index: number): void; + show(e: any, existing?: boolean): void; + destroy(): void; +} +//ejmMenu Option +interface MenuOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + allowScrolling?: boolean; + showScrollbars?: boolean; + height?: (number|string); + renderTemplate?: boolean; + showOn?: ej.mobile.Menu.ShowOn; + targetId?: string; + target?: any; + enablePersistence?: boolean; + templateId?: string; + width?: (number|string); + items?: Array; + android?: AndroidOptions; + ios7?: Ios7Options; + windows?: WindowsOptions; + hide? (e: MenuEvent): void; + load? (e: MenuEvent): void; + loadComplete? (e: MenuEvent): void; + show? (e: MenuEvent): void; + touchStart? (e: MenuTouchEventArgs): void; + touchEnd? (e: MenuTouchEventArgs): void; + create? (e: MenuEvent): void; + destroy? (e: MenuEvent): void; +} +//ejmMenu IOS7 Option +interface Ios7Options { + cancelButtonColor?: ej.mobile.Menu.IOS7.CancelButtonColor; + cancelButtonText?: string; + cancelButtonTouchEnd? (e: MenuCancelButtonTouchEndEventArgs): void; + type?: ej.mobile.Menu.IOS7.Type; + title?: string; + showTitle?: boolean; + showCancelButton?: boolean; +} + +//ejmMenu Android Option +interface AndroidOptions { + type?: ej.mobile.Menu.Android.Type; +} +interface WindowsOptions { + type?: ej.mobile.Menu.Windows.Type; + renderDefault?: boolean; +} +//ejmMenu Event Arugument +interface MenuEvent { + cancel: boolean; + type: string; + model: MenuOptions; +} +interface MenuTouchEventArgs { + item: Object; + text: string; +} +interface MenuCancelButtonTouchEndEventArgs extends MenuEvent { + item: Object; + text: string; +} + +export module Menu { + export module IOS7 { + enum Type { + Auto, + Animate, + Normal + } + enum CancelButtonColor { + Blue, + Gray, + Black, + Green, + Red + } + } + + export module Android { + enum Type { + Contextual, + Popup, + OptionsList, + OptionsMenu + } + } + export module Windows { + enum Type { + Contextual, + Popup + } + } + enum ShowOn { + Tap, + TapHold + } +} + + + +//Class ejmProgress +class Progress extends ej.Widget { + static fn: Progress; + element: JQuery; + constructor(element: JQuery, options?: ProgressOptions); + model: ProgressOptions; + defaults: ProgressOptions; + getValue(): number; + getPercentage(): number; + setCustomText(text: string): void; + destroy(): void; +} + +//ejmProgressbar Option +interface ProgressOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + enableCustomText?: boolean; + enabled?: boolean; + height?: number; + incrementStep?: number; + maxValue?: number; + minValue?: number; + orientation?: ej.mobile.Progress.Orientation; + percentage?: number; + enablePersistence?: boolean; + text?: string; + value?: number; + width?: number; + create? (e: ProgressEvent): void; + destroy? (e: ProgressEvent): void; + start? (e: ProgressStartEventArgs): void; + change? (e: ProgressChangeEvent): void; + complete? (e: ProgressCompleteEvent): void; +} +//ejmProgressbarEvent Arugument +interface ProgressEvent { + cancel: boolean; + type: string; + model: ProgressOptions; +} +interface ProgressStartEventArgs extends ProgressEvent { + value: number; + percentage: number; +} +interface ProgressChangeEvent extends ProgressEvent { + value: number; + element: Object; + text: string; + percentage: number; +} +interface ProgressCompleteEvent extends ProgressEvent { + value: number; + text: string; + percentage: number; +} +export module Progress { + enum Orientation { + Horizontal, + Vertical + } +} + +//Class ejmRadioButton +class RadioButton extends ej.Widget { + static fn: RadioButton; + element: JQuery; + constructor(element: JQuery, options?: RadioButtonOptions); + model: RadioButtonOptions; + defaults: RadioButtonOptions; + destroy(): void; + enable(): void; + disable(): void; +} + +//ejmRadioButton Options +interface RadioButtonOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + checked?: boolean; + text?: string; + enabled?: boolean; + enablePersistence?: boolean; + create? (e: RadioButtonBaseEventArgs): void; + destroy? (e: RadioButtonBaseEventArgs): void; + touchStart? (e: RadioButtonEventArgs): void; + touchEnd? (e: RadioButtonEventArgs): void; + change? (e: RadioButtonEventArgs): void; +} +//ejmRadioButtonEvent Arugument +interface RadioButtonBaseEventArgs { + model: RadioButtonOptions; + cancel: boolean; + type: string; +} +interface RadioButtonEventArgs extends RadioButtonBaseEventArgs { + value: string; + isChecked: boolean; +} + class Rating extends ej.Widget { + static fn: Rating; + element: JQuery; + constructor(element?: JQuery, options?: RatingOptions); + model: RatingOptions; + defaults: RatingOptions; + show(): void; + hide(): void; + getValue(): void + reset(): void; + enable(): void; + disable(): void; + setValue(value: number): void; + destroy(): void; + } + + interface RatingOptions { + maxValue?: number; + minValue?: number; + value?: number; + incrementStep?: number; + precision?: ej.mobile.Rating.Precision; + enabled?: boolean; + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + shape?: ej.mobile.Rating.Shape; + shapeWidth?: number; + shapeHeight?: number; + spaceBetweenShapes?: number; + orientation?: ej.mobile.Rating.Orientation; + readOnly?: boolean; + backgroundColor?: any; + selectionColor?: any; + borderColor?: any; + hoverColor?: any; + enablePersistence?: boolean; + create? (e: RatingBaseEventArgs): void; + destroy? (e: RatingBaseEventArgs): void; + tap? (e: RatingEventArgs): void; + change? (e: RatingEventArgs): void; + touchMove? (e: RatingEventArgs): void; + } + interface RatingBaseEventArgs { + cancel: boolean; + type: string; + model: RatingOptions; + } + interface RatingEventArgs extends RatingBaseEventArgs { + value: number; + } +export module Rating{ + enum Precision{ + Full, + Exact, + Half + } + enum Shape{ + Star, + Circle, + Diamond, + Heart, + Pentagon, + Square, + Triangle + } + enum Orientation{ + Horizontal, + Vertical + } + +} + class Rotator extends ej.Widget { + static fn: Rotator; + element: JQuery; + constructor(element: JQuery, options?: RotatorOptions); + model: RotatorOptions; + validTags: Array; + defaults: RotatorOptions; + renderDatasource(data: any): void; + destroy(): void; + } + interface RotatorOptions { + create? (e: RotatorBaseEventArgs): void; + destroy? (e: RotatorBaseEventArgs): void; + swipeLeft? (e: RotatorEventArgs): void; + swipeRight? (e: RotatorEventArgs): void; + swipeUp? (e: RotatorEventArgs): void; + swipeDown? (e: RotatorEventArgs): void; + change? (e: RotatorEventArgs): void; + pagerSelect? (e: RotatorEventArgs): void; + adjustFixedPosition?: boolean; + targetId?: string; + cssClass?:string; + windows?:windowsOption; + items?:Array; + renderMode?: ej.mobile.RenderMode; + targetHeight?: (number|string); + targetWidth?: (number|string); + enablePersistence?:boolean; + theme?: ej.mobile.Theme; + currentItemIndex?: number; + showPager?: boolean; + showHeader?: boolean; + headerTitle?: string; + dataBinding?: boolean; + dataSource?: any; + orientation?: ej.mobile.Rotator.Orientation; + pagerPosition?: PagerPosition; + } + interface PagerPosition { + horizontal?: ej.mobile.Rotator.PagerPositionHorizontal; + vertical?: ej.mobile.Rotator.PagerPositionVertical; + } + interface RotatorBaseEventArgs { + cancel: boolean; + model: RotatorOptions; + type: string; + } + interface RotatorEventArgs extends RotatorBaseEventArgs { + targetElement: Object; + element: number; + } +export module Rotator{ + enum Orientation{ + Horizontal, + Vertical + } + enum PagerPositionHorizontal{ + Bottom, + Top, + } + enum PagerPositionVertical{ + Right, + Left + } + +} + class Slider extends ej.Widget { + static fn: Slider; + element: JQuery; + constructor(element: JQuery, options?: SliderOptions); + model: SliderOptions; + defaults: SliderOptions; + getValue(): void; + dispose(): void; + destroy(): void; + } + //ejmSlider Option + interface SliderOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + minValue?: number; + maxValue?: number; + value?: number; + values?: Array; + orientation?: ej.mobile.Slider.Orientation; + enableRange?: boolean; + readOnly?: boolean; + incrementStep?: number; + enablePersistence?: boolean; + enabled?: boolean; + enableAnimation?: boolean; + animationSpeed?: number; + ios7?: Ios7Option; + windows?: windowsOption; + create? (e: SliderBaseEventArgs): void; + destroy? (e: SliderBaseEventArgs): void; + touchStart? (e: SliderEventArgs): void; + touchEnd? (e: SliderEventArgs): void; + load? (e: SliderEventArgs): void; + change? (e: SliderEventArgs): void; + slide? (e: SliderEventArgs): void; + } + + //ejmSlider IOS7 Option + interface Ios7Option { + thumbStyle?: ej.mobile.Slider.ThumbStyle; + } + //ejmSlider Slide Event Arugument + interface SliderBaseEventArgs { + cancel: boolean; + model: SliderOptions; + type: string; + } + interface SliderEventArgs extends SliderBaseEventArgs { + value?: number; + values?: Array; + } +export module Slider{ + enum Orientation{ + Horizontal, + Vertical + } + enum ThumbStyle{ + Normal, + Small + + } + +} +class Tab extends ej.Widget { + static fn: Tab; + constructor(element: JQuery, options?: TabOptions); + model:TabOptions; + defaults: TabOptions; + showBadge(index: (number|string)): void; + hideBadge(index: (number|string)): void; + updateBadgeValue(index: (number|string), value: (number|string)): void; + selectItem(index?: (number|string)): void; + enableItem(index?: (number|string)): void; + disableItem(index?: (number|string)): void; + enableContent(index?: (number|string)): void; + disableContent(index?: (number|string)): void; + addItem(tab: Object, index: (number|string)): void; + addOverflowItem(tab: Object, index: (number|string)): void; + removeItem(index: (number|string)): void; + removeOverflowItem(index: (number|string)): void; + getItemsCount(): number; + getOverflowItemCount(): number; + getActiveItemText(): string; + getActiveItem(): Object; + destroy(): void; +} + +interface TabOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + allowScrolling?: boolean; + enableNativeScrolling?: boolean; + showScrollbars?: boolean; + enableAjax?: boolean; + showAjaxPopup?: boolean; + badge?: badgeTabOptions; + ios7?: ios7TabOptions; + enableCache?: boolean; + selectedItemIndex?: (number|string); + enabled?: boolean; + enablePersistence?: boolean; + prefetchAjaxContent?: boolean; + items?: Array; + overflowBadge?: overflowBadgeTabOptions; + android?: androidTabOptions; + windows?: windowsTabOptions; + flat?: flatTabOptions; + ajaxSettings?: ajaxSettingsTabOptions; + prefetchContentLoaded? (e: TabPrefetchEventArgs): void; + load? (e: TabEventArgs): void; + loadComplete? (e: TabLoadCompleteEventArgs): void; + touchStart? (e: TabEventArgs): void; + touchEnd? (e: TabEventArgs): void; + ajaxSuccess? (e: TabAjaxLoadSuccessEventArgs): void; + ajaxError? (e: TabAjaxLoadErrorEventArgs): void; + ajaxComplete? (e: TabEventArgs): void; + create? (e: TabEventArgs): void; + destroy? (e: TabEventArgs): void; + ajaxBeforeLoad? (e: TabAjaxBeforeLoadEventArgs): void; +} + +interface TabItemOptions { + text?: string; + href?: string; + enableAjax?: boolean; + badge?: badgeTabOptions; + touchStart? (e: TabEventArgs): void; + touchEnd? (e: TabEventArgs): void; + ios7?: ios7TabOptions; + android?: ios7TabOptions; +} + +interface TabEventArgs { + cancel: boolean; + type: string; + model: TabOptions; +} +interface TabAjaxBeforeLoadEventArgs extends TabEventArgs { + content?: any; + item?: any; + index?: number; + text?: string; + url?: string; +} +interface TabLoadCompleteEventArgs extends TabEventArgs { + element: Object; + id: string; +} +interface TabPrefetchEventArgs extends TabEventArgs { + item: Object; + content: string; + text: string; + url: string; + index: number; +} +interface TabAjaxLoadSuccessEventArgs extends TabEventArgs { + element: Object; + currentContent: string; +} + +interface TabAjaxLoadErrorEventArgs extends TabEventArgs { + status: boolean; + error: string; +} +interface badgeTabOptions { + enabled?: boolean; + value?: (number|string); + maxValue?: (number|string); + minValue?: (number|string); +} +interface ios7TabOptions { + imageClass?: string; +} +interface overflowBadgeTabOptions { + enabled?: boolean; + value?: (number|string); + maxValue?: (number|string); + minValue?: (number|string); +} +interface androidTabOptions { + contentType?: ej.mobile.Tab.Android.ContentType; + imageClass?: string; + position?: ej.mobile.Tab.Position; +} +interface windowsTabOptions extends windowsOption { + enableCustomText?: boolean; + position?: ej.mobile.Tab.Position; + enableTouchMove?: boolean; + preventContentSwipe?: boolean; +} +interface flatTabOptions { + position?: ej.mobile.Tab.Position; +} +interface ajaxSettingsTabOptions { + type?: string; + cache?: boolean; + async?: boolean; + dataType?: string; + contentType?: string; + url?: string; + data?: {}; +} + +export module Tab{ +export module Android{ +enum ContentType{ +Text, +Image, +Both +} +} +enum Position{ +Fixed, +Normal +} +} + +class Tile extends ej.Widget { + static fn: Tile; + constructor(element: JQuery, options?: TileOptions); + model: TileOptions; + defaults: TileOptions; + updateTemplate(id: string, index: (number|string)): void; + destroy(): void; +} + +interface TileOptions { + android?: androidTileOptions; + badge?: tileBadgeOptions; + cssClass?: string; + captionTemplateId?: string; + enablePersistence?: boolean; + imageClass?: string; + imagePath?: string; + imagePosition?: ej.mobile.Tile.ImagePosition; + imageTemplateId?: string; + imageUrl?: string; + backgroundColor?: string; + ios7?: ios7TileOptions; + liveTile?: liveTileOptions; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + showText?: boolean; + text?: string; + textAlignment?: ej.mobile.Tile.TextAlignment; + tileSize?: ej.mobile.Tile.TileSize; + width?: (number|string); + height?: (number|string); + touchEnd? (e: tileTouchEventArgs): void; + touchStart? (e: tileTouchEventArgs): void; + create? (e: TileEventArgs): void; + destroy? (e: TileEventArgs): void; +} +interface TileEventArgs { + cancel?: boolean; + model?: TileOptions; + type?: string; +} +interface tileBadgeOptions { + enabled?: boolean; + value?: (number|string); + maxValue?: (number|string); + minValue?: (number|string); + text?: string; +} + +interface liveTileOptions { + enabled?: boolean; + imageClass?: string; + imageTemplateId?: string; + imageUrl?: string[]; + type?: string; + updateInterval?: number; +} + +interface ios7TileOptions { + textPosition?: ej.mobile.Tile.TextPosition; +} + +interface androidTileOptions { + textPosition?: ej.mobile.Tile.TextPosition; +} + +interface tileTouchEventArgs extends TileEventArgs { + text?: string; +} + +export module Tile +{ +enum TextPosition +{ + Inner, + Outer +} +enum TileSize +{ + Medium, + Small, + Large, + Wide +} +enum TextAlignment +{ + + Normal, + Left, + Right, + Center +} +enum ImagePosition +{ + Center, + Top, + Bottom, + Right, + Left, + TopLeft, + TopRight, + BottomRight, + BottomLeft, + Fill +} +} + + +class RadialSlider extends ej.Widget { + static fn: RadialSlider; + constructor(element: JQuery, options?: RadialSliderOptions); + constructor(element: Element, options?: RadialSliderOptions); + model:RadialSliderOptions; + defaults:RadialSliderOptions; + show(): void; + hide(): void; + destroy(): void; +} + +interface RadialSliderOptions { + radius?: number; + endAngle?: number; + startAngle?: number; + ticks?: Array; + enableRoundOff?: boolean; + value?: number|string; + strokeWidth?: number; + autoOpen?: boolean; + enableAnimation?: boolean; + cssClass?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + position?: ej.mobile.RadialSlider.Position; + labelSpace?: string|number; + innerCircleImageClass?: string; + innerCircleImageUrl?: string; + showInnerCircle?: boolean; + inline?: boolean; + stop? (e: RadialSliderStopEventArgs): void; + start? (e: RadialSliderStartEventArgs): void; + slide? (e: RadialSliderSlideEventArgs): void; + change? (e: RadialSliderChangeEventArgs): void; + mouseover? (e: RadialSliderMouseOverEventArgs): void; + create? (e: RadialSliderCreateEventArgs): void; + destroy? (e: RadialSliderCreateEventArgs): void; +} +interface RadialSliderCreateEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; +} +interface RadialSliderStopEventArgs extends RadialSliderCreateEventArgs { + value: number; +} + +interface RadialSliderStartEventArgs extends RadialSliderCreateEventArgs { + value: number; +} +interface RadialSliderSlideEventArgs extends RadialSliderCreateEventArgs { + value: number; + selectedValue: number; +} +interface RadialSliderChangeEventArgs extends RadialSliderCreateEventArgs { + value: number; + oldValue: number; +} +interface RadialSliderMouseOverEventArgs extends RadialSliderCreateEventArgs { + value: number; + selectedValue: number; +} +export module RadialSlider { + enum Position { + RightCenter, + RightTop, + RightBottom, + LeftCenter, + LeftTop, + LeftBottom, + TopLeft, + TopRight, + TopCenter, + BottomLeft, + BottomRight, + BottomCenter + } +} +class TimePicker extends ej.Widget { + static fn: TimePicker; + static Locale:any; + constructor(element: JQuery, options?: TimePickerOptions); + model: TimePickerOptions; + defaults: TimePickerOptions; + show(e?:any): void; + hide(e?:any): void; + enable(): void; + disable(): void; + getValue(): string; + setCurrentTime(time: any): void; + destroy(): void; +} +interface TimePickerOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + hourFormat?: ej.mobile.TimePicker.HourFormat; + value?: string; + culture?: string; + timeFormat?: string; + enabled?: boolean; + enablePersistence?:boolean; + ios7?: ios7TimepickerOptions; + windows?: windowsOption; + select? (e: TimepickerEventArgs): void; + load? (e: TimepickerEventArgs): void; + focusIn? (e: TimepickerEventArgs): void; + focusOut? (e: TimepickerEventArgs): void; + open? (e: TimepickerEventArgs): void; + close? (e: TimepickerEventArgs): void; + change? (e: TimepickerEventArgs): void; + create? (e: TimePickerCommonEventArgs): void; + destroy? (e: TimePickerCommonEventArgs): void; +} +interface TimePickerCommonEventArgs { + cancel: boolean; + type: string; + model: TimePickerOptions; +} +interface TimepickerEventArgs extends TimePickerCommonEventArgs { + value: string; +} +interface ios7TimepickerOptions { + renderDefault?: boolean; +} + +export module TimePicker{ +enum HourFormat{ + TwentyFour, + Twelve +} +} + +//Class ejmToggleButton +class ToggleButton extends ej.Widget { + static fn: ToggleButton; + constructor(element: JQuery, options?: ToggleButtonOptions); + model: ToggleButtonOptions; + defaults: ToggleButtonOptions; + enable(): void; + disable(): void; + destroy(): void; +} + +//ejmToggleButton Option +interface ToggleButtonOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + animate?: boolean; + toggleState?: boolean; + windows?: windowsOption; + enablePersistence?: boolean; + enabled?: boolean; + change? (e: ToggleButtonEventArgs): void; + touchStart? (e: ToggleButtonEventArgs): void; + touchEnd? (e: ToggleButtonEventArgs): void; + create? (e: ToggleButtonCommonEventArgs): void; + destroy? (e: ToggleButtonCommonEventArgs): void; +} + +interface ToggleButtonCommonEventArgs { + cancel: boolean; + type: string; + model: ToggleButtonOptions; +} +//ToggleButtonEvent Arugument +interface ToggleButtonEventArgs extends ToggleButtonCommonEventArgs { + state: boolean; +} +//Class ejmToolbar +class Toolbar extends ej.Widget { + static fn: Toolbar; + constructor(element: JQuery, options?: ToolbarOptions); + model: ToolbarOptions; + validTags: Array; + defaults: ToolbarOptions; + removeItem(index:number): void; + addItem(newitem:string): void; + showEllipsis(): void; + disableItem(disableIcon:string): void; + enableItem(enableIcon:string): void; + hideItem(iconName:string): void; + hideEllipsis(): void; + showItem(iconName:string): void; + hideMenu(): void; + showMenu(): void; + destroy(): void; +} + +//ejmToolbar Android Options +interface ToolbarAndroidOptions { + title?: string; + titleIconUrl?: string; + showBackNavigator?: boolean; + showTitleIcon?: boolean; + enableSplitView?: boolean; + showEllipsis?: boolean; + position?: ej.mobile.Toolbar.Position; + +} +//ejmToolbar IOS7 Options +interface ToolbarIOS7Options { + position?: ej.mobile.Toolbar.Position; +} +//ejmToolbar Flat Options +interface ToolbarFlatOptions { + position?: ej.mobile.Toolbar.Position; +} +//ejmToolbar Windows Options +interface ToolbarWindowsOptions { + position?: ej.mobile.Toolbar.Position; +} +//ejmToolbar Option +interface ToolbarOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + items?: Array; + enabled?: boolean; + enablePersistence?:boolean; + hide?: boolean; + position?: ej.mobile.Toolbar.Position; + android?: ToolbarAndroidOptions; + windows?: windowsOption; + ios7?: ToolbarIOS7Options; + Flat?: ToolbarFlatOptions; + templateId?: any; + titleIconUrl?: any; + touchStart? (e: ToolbarEventArgs): void; + touchEnd? (e: ToolbarEventArgs): void; + create? (e: ToolbarEventArgs): void; + destroy? (e: ToolbarEventArgs): void; + +} +interface ToolbarItems{ + iconName?: ej.mobile.Toolbar.IconName; + iconUrl?: string; +} +//ejmToolbarEvent Arugument +interface ToolbarEventArgs { + cancel: boolean; + type: string; + model: ToolbarOptions; +} + +export module Toolbar{ + enum Position{ + Normal, + Fixed + } + enum IconName{ + Add, + Back, + Bookmark, + Close, + Compose, + Copy, + Cut, + Delete, + Done, + Edit, + Mail, + Next, + Refresh, + Overflow, + Paste, + Reply, + Save, + Search, + Settings, + Share + } +} +/*Group button*/ +class GroupButton extends ej.Widget { + static fn: GroupButton; + element: JQuery; + constructor(element?: JQuery, options?: GroupButtonOptions); + model: GroupButtonOptions; + defaults: GroupButtonOptions; + destroy(): void; + //add public functions +} +interface GroupButtonOptions { + selectedItemIndex?: (number|string); + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + enablePersistence?: boolean; + items?: Array; + windows?: windowsOption; + touchStart? (e: GroupButtonEventArgs): void; + touchEnd? (e: GroupButtonEventArgs): void; + destroy? (e: GroupButtonEventArgs): void; + create? (e: GroupButtonEventArgs): void; +} +interface GroupButtonItemsOptions { + text?: string; + type?: string; + imageClass?: string; + imageUrl?: string; +} +interface GroupButtonEventArgs { + cancel: boolean; + type: string; + model: GroupButtonOptions; +} +/* SplitPane */ +class SplitPane extends ej.Widget { + static fn: SplitPane; + constructor(element: JQuery, options?: SplitPaneOptions); + model:SplitPaneOptions; + defaults: SplitPaneOptions; + loadContent(toPage: string, options?: any): void; + transferPage(toPage: any, options: any, existing: any, newPage: any): void; + refreshRightScroller(): void; + refreshLeftScroller(): void; + destroy(): void; +} +interface SplitPaneOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + allowLeftPaneScrolling?: boolean; + allowRightPaneScrolling?: boolean; + android?: SplitPaneAndroidOptions; + windows?: SplitPaneWindowsOptions; + ios7?: SplitPaneIOS7Options; + flat?: SplitPaneFlatOptions; + enablePersistence?: boolean; + enableSwipe?: boolean; + overlayLeftPane?: boolean; + overlayDirection?: ej.mobile.SplitPane.OverlayDirection; + leftPaneScrollSettings?: Object; + rightPaneScrollSettings?: Object; + leftHeaderSettings?: Object; + rightHeaderSettings?: Object; + toolbarSettings?: Object; + create? (e: SplitPaneBaseEventArgs): void; + destroy? (e: SplitPaneBaseEventArgs): void; + beforeTransfer? (e: SplitPaneEventArgs): void; + afterLoadSuccess? (e: SplitPaneEventArgs): void; +} +interface SplitPaneBaseEventArgs { + cancel: boolean; + type: string; + model: SplitPaneOptions; +} +interface SplitPaneEventArgs extends SplitPaneBaseEventArgs { + element: Object; + toPage: Object; + leftPaneheader: Object; + rightPaneheader: Object; + toolbar: Object; +} +interface SplitPaneAndroidOptions { + showToolbar?: boolean; +} +interface SplitPaneWindowsOptions { + showLeftPaneHeader?: boolean; + showRightPaneHeader?: boolean; +} +interface SplitPaneIOS7Options { + showLeftPaneHeader?: boolean; + showRightPaneHeader?: boolean; +} +interface SplitPaneFlatOptions { + showLeftPaneHeader?: boolean; + showRightPaneHeader?: boolean; +} + +export module SplitPane{ +enum OverlayDirection{ +Left, +Right +} +} + +class Dialog extends ej.Widget { + static fn: Dialog; + element: JQuery; + constructor(element: JQuery, options?: DialogOptions); + model: DialogOptions; + defaults: DialogOptions; + open(): void; + close(): void; + isOpened(): boolean; + destroy(): void; +} +interface DialogOptions { + cssClass?: string; + enableAutoOpen?: boolean; + title?: string; + beforeClose? (e: DialogBeforeClose): void; + open? (e: DialogOpen): void; + close? (e: DialogClose): void; + buttonTap? (e: DialogButtonTap): void; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + enableModal?: boolean; + showButtons?: boolean; + allowScrolling?: boolean; + enableNativeScrolling?: boolean; + mode?: ej.mobile.Dialog.Mode; + leftButtonCaption?: string; + rightButtonCaption?: string; + checkDOMChanges?: boolean; + templateId?: string; + targetHeight?: string|number; + enablePersistence?: boolean; + enableAnimation?: boolean; + windows?: windowsOption; + destroy? (e: DialogEventArgs): void; + create? (e: DialogEventArgs): void; +} +interface DialogEventArgs { + cancel: boolean; + type: string; + model: DialogOptions; +} +interface DialogBeforeClose extends DialogEventArgs{ + title: string; +} +interface DialogOpen extends DialogEventArgs { + element: Object; + title: string; +} +interface DialogClose extends DialogEventArgs { + title: string; + element: Object; +} +interface DialogButtonTap extends DialogEventArgs { + text: string; +} + +export module Dialog{ +enum Mode{ + Alert, + Confirm, + Normal, + FullView +} +} + +class TextboxCommon extends ej.Widget { + model: TextBoxOptions; + disable(): void; + enable(): void; + getStrippedValue(): string; + getUnstrippedValue(): string; + getValue(): string; + getWatermarkText(): string; + refresh(): void; + destroy(): void; +} +class TextBox extends TextboxCommon { + static fn: TextBox; + constructor(element: JQuery, options?: TextBoxOptions); + defaults: TextBoxOptions; +} +/* Password */ +class Password extends TextboxCommon { + static fn: Password; + constructor(element: JQuery, options?: TextBoxOptions); + defaults: TextBoxOptions; +} +/* MaskEdit */ +class MaskEdit extends TextboxCommon { + static fn: MaskEdit; + constructor(element: JQuery, options?: MaskEditOptions); + defaults: MaskEditOptions; + +} +/* TextArea */ +class TextArea extends TextboxCommon { + static fn: TextArea; + constructor(element: JQuery, options?: TextBoxOptions); + defaults: TextBoxOptions; + +} +interface TextBoxOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + showBorder?: boolean; + windows?: WindowsTextBoxOptions; + value?: string; + watermarkText?: string; + change? (e: TextBoxChangeEventArgs): void; + create? (e: TextBoxEventArgs): void; + destroy? (e: TextBoxEventArgs): void; + enabled?: boolean; + enablePersistence?: boolean; + readOnly?: boolean; +} +interface TextBoxEventArgs { + cancel: boolean; + type: string; + model: TextBoxOptions; +} +interface MaskEditOptions extends TextBoxOptions { + mask?: string; +} +interface WindowsTextBoxOptions extends windowsOption { + allowReset?: boolean; +} +interface TextBoxChangeEventArgs extends TextBoxEventArgs { + element: Object; + value: string; + isChecked: boolean; +} +class Footer extends ej.Widget { + static fn: Footer; + element: JQuery; + constructor(element: JQuery, options?: FooterOptions); + model: FooterOptions; + defaults: FooterOptions; + getTitle(): string; + destroy(): void; + +} + +interface FooterOptions { + hideForUnSupportedDevice?: boolean; + leftButtonNavigationUrl?: string; + rightButtonNavigationUrl?: string; + title?: string; + cssClass?: string; + showTitle?: boolean; + position?: ej.mobile.Footer.Position; + leftButtonCaption?: string; + rightButtonCaption?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + showLeftButton?: boolean; + showRightButton?: boolean; + enablePersistence?:boolean; + leftButtonStyle?:ej.mobile.Footer.FooterLeftButtonStyle; + rightButtonStyle?:ej.mobile.Footer.FooterRightButtonStyle; + ios7?: Footerios7Options; + flat?: FooterFlatOptions; + android?: FooterAndroidOptions; + templateId?: string; + windows?: FooterWindowsOptions; + leftButtonTap? (e: FooterLeftButtonTapEventArgs): void; + rightButtonTap? (e: FooterRightButtonTapEventArgs): void; + destroy?(e:FooterBaseArgs):void; + create?(e:FooterBaseArgs):void; +} + +interface FooterWindowsOptions extends windowsOption { + renderDefault?: boolean; + rightButtonStyle?: ej.mobile.Footer.Windows.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.Windows.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface Footerios7Options { + rightButtonStyle?: ej.mobile.Footer.IOS7.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.IOS7.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface FooterFlatOptions { + rightButtonStyle?: ej.mobile.Footer.Flat.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.Flat.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface FooterAndroidOptions { + rightButtonStyle?: ej.mobile.Footer.Android.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.Android.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} + +interface FooterBaseArgs{ + cancel: boolean; + type: string; + model: FooterOptions; +} + +interface FooterLeftButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} +interface FooterRightButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} + +export module Footer{ +export module IOS7 +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Header, + Normal +} +enum FooterRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Flat +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum FooterRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Android +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum FooterRightButtonStyle +{ + Auto, + Normal, + Header +} +} + +export module Windows +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum FooterRightButtonStyle +{ + Auto, + Normal, + Header +} +} +enum Position{ + Normal, + Fixed +} +enum FooterLeftButtonStyle{ +Back, +Header, +Normal +} +enum FooterRightButtonStyle{ +Header, +Normal +} +} + +class CheckBox extends ej.Widget { + static fn: CheckBox; + constructor(element: JQuery, options?: CheckBoxOptions); + model: CheckBoxOptions; + defaults: CheckBoxOptions; + isChecked(): boolean; + destroy(): void; + +} +interface CheckBoxOptions { + touchStart? (e: CheckBoxTouchStart): void; + touchEnd? (e: CheckBoxTouchEnd): void; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + preventDefault?: boolean; + theme?: ej.mobile.Theme; + enabled?: boolean; + checked?: boolean; + enableTriState?: boolean; + checkState?: ej.mobile.CheckBox.CheckState; + windows?: windowsOption; + enablePersistence?: boolean; + text?: string; + destroy? (e: checkBoxEventArgs): void; + create? (e: checkBoxEventArgs): void; +} +interface checkBoxEventArgs { + cancel: boolean; + type: string; + model: CheckBoxOptions; +} +interface CheckBoxTouchStart extends checkBoxEventArgs{ + element: Object; + value: string; + isChecked: boolean; +} +interface CheckBoxTouchEnd extends checkBoxEventArgs{ + element: Object; + value: string; + isChecked: boolean; +} +export module CheckBox{ + enum CheckState{ + Uncheck, + Check, + Indeterminate + } +} +class ScrollPanel extends ej.Widget { + static fn: ScrollPanel; + constructor(element: JQuery, target: any, options?: ScrollPanelOptions); + model: ScrollPanelOptions; + defaults: ScrollPanelOptions; + refresh(): void; + disable(): void; + enable(): void; + getComputedPosition(): void; + stop(): void; + getScrollPosition(): void; + destroy(): void; + } + interface ScrollPanelOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + enableResize?: boolean; + targetHeight?: number; + targetWidth?: number; + scrollHeight?: number; + scrollWidth?: number; + target: any; + enableFade?: boolean; + enableShrink?: (boolean|string); + autoAdjustHeight?: boolean; + isRelative?: boolean; + wheelSpeed?: number; + enableInteraction?: boolean; + enabled?: boolean; + eventPassthrough?:any; + translateZ?:string; + mode?:ej.mobile.ScrollPanel.Mode; + checkDOMChanges?: boolean; + enableHrScroll?: boolean; + enableVrScroll?: boolean; + zoomMin?: number; + zoomMax?: number; + adjustFixedPosition?: boolean; + startZoom?: number; + startX?: number; + startY?: number; + bounceEasing?:string; + enableDisplacement?:boolean; + displacementValue?:number; + displacementTime?:number; + preventDefaultException?:{tagName?:any} + deceleration?:any; + disablePointer?: boolean; + disableMouse?: boolean; + disableTouch?: boolean; + directionLockThreshold?: number; + momentum?: boolean; + enableBounce?: boolean; + bounceTime?: number; + preventDefault?: boolean; + enableTransform?: boolean; + enableTransition?: boolean; + showScrollbars?: boolean; + enableMouseWheel?: boolean; + enableKeys?: boolean; + enableZoom?: boolean; + enableNativeScrolling?: boolean; + invertWheel?: boolean; + enablePersistence?: boolean; + create? (e: ScrollPanelBaseEventArgs): void; + destroy? (e: ScrollPanelBaseEventArgs): void; + scrollStart? (e: ScrollPanelEventArgs): void; + scroll? (e: ScrollPanelEventArgs): void; + scrollEnd? (e: ScrollPanelEventArgs): void; + zoomStart? (e: ScrollPanelEventArgs): void; + zoomEnd? (e: ScrollPanelEventArgs): void; + } +interface ScrollPanelBaseEventArgs { + cancel: boolean; + type: string; + model: ScrollPanelOptions; +} +interface ScrollPanelEventArgs extends ScrollPanelBaseEventArgs { + x: number; + y: number; + object: Object; +} +export module ScrollPanel{ + enum Mode{ + Page, + Container + } +} +class NavigationDrawer extends ej.Widget { + static fn: NavigationDrawer; + element: JQuery; + constructor(element: JQuery, options?: NavigationDrawerOptions); + model: NavigationDrawerOptions; + defaults: NavigationDrawerOptions; + open(e: any): void; + close(e: any): void; + toggle(e: any): void; + destroy(): void; +} +//ejmNavigationDrawer Option +interface NavigationDrawerOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + contentId?: string; + allowScrolling?: boolean; + scrollSettings?: {}; + considerSubPage?: boolean; + direction?: ej.mobile.NavigationDrawer.Direction; + showScrollbars?: boolean; + targetId?: string; + position?: ej.mobile.NavigationDrawer.Position; + enableListView?: boolean; + listViewSettings?: {}; + type?: ej.mobile.NavigationDrawer.Type; + width?: string; + items?: Array; + swipe? (e: NavigationDrawerSwipeEventArgs): void; + open? (e: NavigationDrawerOpenBeforeCloseEventArgs): void; + beforeClose? (e: NavigationDrawerOpenBeforeCloseEventArgs): void; + create? (e: NavigationDrawerEvent): void; + destroy? (e: NavigationDrawerEvent): void; +} + +interface NavigationDrawerEvent { + type: string; + cancel: boolean; + model: NavigationDrawerOptions; +} + +//ejmNavigationDrawer Swipe Event Arugument +interface NavigationDrawerSwipeEventArgs extends NavigationDrawerEvent { + element: Object; + targetElement: Object; + direction: string; +} +//ejmNavigationDrawer Open and BeforeClose Event Arugument +interface NavigationDrawerOpenBeforeCloseEventArgs extends NavigationDrawerEvent { + element: Object; +} + +export module NavigationDrawer { + enum Direction { + Left, + Right + } + enum Position { + Normal, + Fixed + } + enum Type { + Overlay, + Slide + } +} + + +class RadialMenu extends ej.Widget { + static fn: RadialMenu; + constructor(element: JQuery, options?: RadialMenuOptions); + model: RadialMenuOptions; + defaults: RadialMenuOptions; + show(): void; + hide(): void; + menuHide(): void; + hideMenu(): void; + showMenu(): void; + enableItemByIndex(index: number): void; + enableItemsByIndices(itemIndices: Array): void; + disableItemByIndex(itemIndex: number): void; + disableItemsByIndices(itemIndices: Array): void; + updateBadgeValue(index: number, value: number): void; + showBadge(index: number): void; + hideBadge(index: number): void; +} + +interface RadialMenuOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + radius?: number; + cssClass?: string; + imageClass?: string; + backImageClass?: string; + position?: ej.mobile.RadialMenu.Position; + enableAnimation?: boolean; + windows?: windowsOption; + items?: any; + touch? (e: RadialMenuEventArgs): void; + open? (e: RadialMenuEventArgs): void; + close? (e: RadialMenuEventArgs): void; + select? (e: RadialMenuEventArgs): void; +} +interface RadialMenuEventArgs { + cancel: boolean; + model: RadialMenuOptions; + type: string; + index: number; + childIndex: number; +} +export module RadialMenu{ + enum Position{ + RightCenter, + RightTop, + RightBottom, + LeftCenter, + LeftTop, + LeftBottom + } +} + + +} +declare module ej.datavisualization { + +class LinearGauge extends ej.Widget { + static fn: LinearGauge; + constructor(element: JQuery, options?: LinearGauge.Model); + constructor(element: Element, options?: LinearGauge.Model); + model:LinearGauge.Model; + defaults:LinearGauge.Model; + + /** destroy the linear gauge all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get Bar Distance From Scale in number + * @returns {void} + */ + getBarDistanceFromScale(): void; + + /** To get Bar Pointer Value in number + * @returns {void} + */ + getBarPointerValue(): void; + + /** To get Bar Width in number + * @returns {void} + */ + getBarWidth(): void; + + /** To get CustomLabel Angle in number + * @returns {void} + */ + getCustomLabelAngle(): void; + + /** To get CustomLabel Value in string + * @returns {void} + */ + getCustomLabelValue(): void; + + /** To get Label Angle in number + * @returns {void} + */ + getLabelAngle(): void; + + /** To get LabelPlacement in number + * @returns {void} + */ + getLabelPlacement(): void; + + /** To get LabelStyle in number + * @returns {void} + */ + getLabelStyle(): void; + + /** To get Label XDistance From Scale in number + * @returns {void} + */ + getLabelXDistanceFromScale(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getLabelYDistanceFromScale(): void; + + /** To get Major Interval Value in number + * @returns {void} + */ + getMajorIntervalValue(): void; + + /** To get MarkerStyle in number + * @returns {void} + */ + getMarkerStyle(): void; + + /** To get Maximum Value in number + * @returns {void} + */ + getMaximumValue(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getMinimumValue(): void; + + /** To get Minor Interval Value in number + * @returns {void} + */ + getMinorIntervalValue(): void; + + /** To get Pointer Distance From Scale in number + * @returns {void} + */ + getPointerDistanceFromScale(): void; + + /** To get PointerHeight in number + * @returns {void} + */ + getPointerHeight(): void; + + /** To get Pointer Placement in String + * @returns {void} + */ + getPointerPlacement(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getPointerValue(): void; + + /** To get PointerWidth in number + * @returns {void} + */ + getPointerWidth(): void; + + /** To get Range Border Width in number + * @returns {void} + */ + getRangeBorderWidth(): void; + + /** To get Range Distance From Scale in number + * @returns {void} + */ + getRangeDistanceFromScale(): void; + + /** To get Range End Value in number + * @returns {void} + */ + getRangeEndValue(): void; + + /** To get Range End Width in number + * @returns {void} + */ + getRangeEndWidth(): void; + + /** To get Range Position in number + * @returns {void} + */ + getRangePosition(): void; + + /** To get Range Start Value in number + * @returns {void} + */ + getRangeStartValue(): void; + + /** To get Range Start Width in number + * @returns {void} + */ + getRangeStartWidth(): void; + + /** To get ScaleBarLength in number + * @returns {void} + */ + getScaleBarLength(): void; + + /** To get Scale Bar Size in number + * @returns {void} + */ + getScaleBarSize(): void; + + /** To get Scale Border Width in number + * @returns {void} + */ + getScaleBorderWidth(): void; + + /** To get Scale Direction in number + * @returns {void} + */ + getScaleDirection(): void; + + /** To get Scale Location in object + * @returns {void} + */ + getScaleLocation(): void; + + /** To get Scale Style in string + * @returns {void} + */ + getScaleStyle(): void; + + /** To get Tick Angle in number + * @returns {void} + */ + getTickAngle(): void; + + /** To get Tick Height in number + * @returns {void} + */ + getTickHeight(): void; + + /** To get getTickPlacement in number + * @returns {void} + */ + getTickPlacement(): void; + + /** To get Tick Style in string + * @returns {void} + */ + getTickStyle(): void; + + /** To get Tick Width in number + * @returns {void} + */ + getTickWidth(): void; + + /** To get get Tick XDistance From Scale in number + * @returns {void} + */ + getTickXDistanceFromScale(): void; + + /** To get Tick YDistance From Scale in number + * @returns {void} + */ + getTickYDistanceFromScale(): void; + + /** Specifies the scales. + * @returns {void} + */ + scales(): void; + + /** To set setBarDistanceFromScale + * @returns {void} + */ + setBarDistanceFromScale(): void; + + /** To set setBarPointerValue + * @returns {void} + */ + setBarPointerValue(): void; + + /** To set setBarWidth + * @returns {void} + */ + setBarWidth(): void; + + /** To set setCustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set setCustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set setLabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set setLabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set setLabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set setLabelXDistanceFromScale + * @returns {void} + */ + setLabelXDistanceFromScale(): void; + + /** To set setLabelYDistanceFromScale + * @returns {void} + */ + setLabelYDistanceFromScale(): void; + + /** To set setMajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set setMarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set setMaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set setMinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set setMinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set setPointerDistanceFromScale + * @returns {void} + */ + setPointerDistanceFromScale(): void; + + /** To set PointerHeight + * @returns {void} + */ + setPointerHeight(): void; + + /** To set setPointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set setRangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set setRangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set setRangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set setRangeEndWidth + * @returns {void} + */ + setRangeEndWidth(): void; + + /** To set setRangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set setRangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set setRangeStartWidth + * @returns {void} + */ + setRangeStartWidth(): void; + + /** To set setScaleBarLength + * @returns {void} + */ + setScaleBarLength(): void; + + /** To set setScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set setScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set setScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set setScaleLocation + * @returns {void} + */ + setScaleLocation(): void; + + /** To set setScaleStyle + * @returns {void} + */ + setScaleStyle(): void; + + /** To set setTickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set setTickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set setTickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set setTickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set setTickWidth + * @returns {void} + */ + setTickWidth(): void; + + /** To set setTickXDistanceFromScale + * @returns {void} + */ + setTickXDistanceFromScale(): void; + + /** To set setTickYDistanceFromScale + * @returns {void} + */ + setTickYDistanceFromScale(): void; +} +export module LinearGauge{ + +export interface Model { + + /**Specifies the animationSpeed + * @Default {500} + */ + animationSpeed?: number; + + /**Specifies the backgroundColor for Linear gauge. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor for Linear gauge. + * @Default {null} + */ + borderColor?: string; + + /**Specifies the animate state + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the animate state for marker pointer + * @Default {true} + */ + enableMarkerPointerAnimation?: boolean; + + /**Specifies the can resize state. + * @Default {false} + */ + enableResize?: boolean; + + /**Specify frame of linear gauge + * @Default {null} + */ + frame?: Frame; + + /**Specifies the height of Linear gauge. + * @Default {400} + */ + height?: number; + + /**Specifies the labelColor for Linear gauge. + * @Default {null} + */ + labelColor?: string; + + /**Specifies the maximum value of Linear gauge. + * @Default {100} + */ + maximum?: number; + + /**Specifies the minimum value of Linear gauge. + * @Default {0} + */ + minimum?: number; + + /**Specifies the orientation for Linear gauge. + * @Default {Vertical} + */ + orientation?: string; + + /**Specify labelPosition value of Linear gauge See OuterCustomLabelPosition + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.LinearGauge.OuterCustomLabelPosition|string; + + /**Specifies the pointerGradient1 for Linear gauge. + * @Default {null} + */ + pointerGradient1?: any; + + /**Specifies the pointerGradient2 for Linear gauge. + * @Default {null} + */ + pointerGradient2?: any; + + /**Specifies the read only state. + * @Default {true} + */ + readOnly?: boolean; + + /**Specifies the scales + * @Default {null} + */ + scales?: Scales; + + /**Specifies the theme for Linear gauge. See LinearGauge.Themes + * @Default {flatlight} + */ + theme?: ej.datavisualization.LinearGauge.Themes|string; + + /**Specifies the tick Color for Linear gauge. + * @Default {null} + */ + tickColor?: string; + + /**Specify tooltip options of linear gauge + * @Default {false} + */ + tooltip?: Tooltip; + + /**Specifies the value of the Gauge. + * @Default {0} + */ + value?: number; + + /**Specifies the width of Linear gauge. + * @Default {150} + */ + width?: number; + + /**Triggers while the bar pointer are being drawn on the gauge.*/ + drawBarPointers? (e: DrawBarPointersEventArgs): void; + + /**Triggers while the customLabel are being drawn on the gauge.*/ + drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + + /**Triggers while the Indicator are being drawn on the gauge.*/ + drawIndicators? (e: DrawIndicatorsEventArgs): void; + + /**Triggers while the label are being drawn on the gauge.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Triggers while the marker are being drawn on the gauge.*/ + drawMarkerPointers? (e: DrawMarkerPointersEventArgs): void; + + /**Triggers while the range are being drawn on the gauge.*/ + drawRange? (e: DrawRangeEventArgs): void; + + /**Triggers while the ticks are being drawn on the gauge.*/ + drawTicks? (e: DrawTicksEventArgs): void; + + /**Triggers when the gauge is initialized.*/ + init? (e: InitEventArgs): void; + + /**Triggers while the gauge start to Load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the left mouse button is clicked.*/ + mouseClick? (e: MouseClickEventArgs): void; + + /**Triggers when clicking and dragging the mouse pointer over the gauge pointer.*/ + mouseClickMove? (e: MouseClickMoveEventArgs): void; + + /**Triggers when the mouse click is released.*/ + mouseClickUp? (e: MouseClickUpEventArgs): void; + + /**Triggers while the rendering of the gauge completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface DrawBarPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the current Bar pointer element. + */ + barElement?: any; + + /**returns the index of the bar pointer. + */ + barPointerIndex?: number; + + /**returns the value of the bar pointer. + */ + PointerValue?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawCustomLabelEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the customLabel + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the customLabel style + */ + style?: any; + + /**returns the current customLabel element. + */ + customLabelElement?: any; + + /**returns the index of the customLabel. + */ + customLabelIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawIndicatorsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the Indicator + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the Indicator style + */ + style?: string; + + /**returns the current Indicator element. + */ + IndicatorElement?: any; + + /**returns the index of the Indicator. + */ + IndicatorIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the label + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; + + /**returns the label style + */ + style?: string; + + /**returns the angle of the label. + */ + angle?: number; + + /**returns the current label element. + */ + element?: any; + + /**returns the index of the label. + */ + index?: number; + + /**returns the label value of the label. + */ + value?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawMarkerPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the current marker pointer element. + */ + markerElement?: any; + + /**returns the index of the marker pointer. + */ + markerPointerIndex?: number; + + /**returns the value of the marker pointer. + */ + pointerValue?: number; + + /**returns the angle of the marker pointer. + */ + pointerAngle?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawRangeEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the range + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the range style + */ + style?: string; + + /**returns the current range element. + */ + rangeElement?: any; + + /**returns the index of the range. + */ + rangeIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawTicksEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the ticks + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the angle of the tick. + */ + angle?: number; + + /**returns the current tick element. + */ + element?: any; + + /**returns the index of the tick. + */ + index?: number; + + /**returns the tick value of the tick. + */ + value?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface InitEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: any; +} + +export interface MouseClickEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + markerpointerindex?: number; + + /**returns the pointer element. + */ + markerpointerelement?: any; + + /**returns the value of the pointer. + */ + markerpointervalue?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickMoveEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickUpEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + markerpointerIndex?: number; + + /**returns the pointer element. + */ + markerpointerElement?: any; + + /**returns the value of the pointer. + */ + markerpointerValue?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: any; +} + +export interface Frame { + + /**Specifies the frame background image url of linear gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the frame InnerWidth + * @Default {8} + */ + innerWidth?: number; + + /**Specifies the frame OuterWidth + * @Default {12} + */ + outerWidth?: number; +} + +export interface ScalesBarPointersBorder { + + /**Specifies the border Color of bar pointer + * @Default {null} + */ + color?: string; + + /**Specifies the border Width of bar pointer + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesBarPointers { + + /**Specifies the backgroundColor of bar pointer + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border of bar pointer + * @Default {null} + */ + border?: ScalesBarPointersBorder; + + /**Specifies the distanceFromScale of bar pointer + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the scaleBar Gradient of bar pointer + * @Default {null} + */ + gradients?: any; + + /**Specifies the opacity of bar pointer + * @Default {1} + */ + opacity?: number; + + /**Specifies the value of bar pointer + * @Default {null} + */ + value?: number; + + /**Specifies the pointer Width of bar pointer + * @Default {width=30} + */ + width?: number; +} + +export interface ScalesBorder { + + /**Specifies the border color of the Scale. + * @Default {null} + */ + color?: string; + + /**Specifies the border width of the Scale. + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesCustomLabelsFont { + + /**Specifies the fontFamily in customLabels + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle in customLabels. See FontStyle + * @Default {Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the font size in customLabels + * @Default {11px} + */ + size?: string; +} + +export interface ScalesCustomLabelsPosition { + + /**Specifies the position x in customLabels + * @Default {0} + */ + x?: number; + + /**Specifies the y in customLabels + * @Default {0} + */ + y?: number; +} + +export interface ScalesCustomLabels { + + /**Specifies the label Color in customLabels + * @Default {null} + */ + color?: number; + + /**Specifies the font in customLabels + * @Default {null} + */ + font?: ScalesCustomLabelsFont; + + /**Specifies the opacity in customLabels + * @Default {0} + */ + opacity?: string; + + /**Specifies the position in customLabels + * @Default {null} + */ + position?: ScalesCustomLabelsPosition; + + /**Specifies the positionType in customLabels.See CustomLabelPositionType + * @Default {null} + */ + positionType?: any; + + /**Specifies the textAngle in customLabels + * @Default {0} + */ + textAngle?: number; + + /**Specifies the label Value in customLabels + */ + value?: string; +} + +export interface ScalesIndicatorsBorder { + + /**Specifies the border Color in bar indicators + * @Default {null} + */ + color?: string; + + /**Specifies the border Width in bar indicators + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesIndicatorsFont { + + /**Specifies the fontFamily of font in bar indicators + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle of font in bar indicators. See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the size of font in bar indicators + * @Default {11px} + */ + size?: string; +} + +export interface ScalesIndicatorsPosition { + + /**Specifies the x position in bar indicators + * @Default {0} + */ + x?: number; + + /**Specifies the y position in bar indicators + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicatorsStateRanges { + + /**Specifies the backgroundColor in bar indicators state ranges + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor in bar indicators state ranges + * @Default {null} + */ + borderColor?: string; + + /**Specifies the endValue in bar indicators state ranges + * @Default {60} + */ + endValue?: number; + + /**Specifies the startValue in bar indicators state ranges + * @Default {50} + */ + startValue?: number; + + /**Specifies the text in bar indicators state ranges + */ + text?: string; + + /**Specifies the textColor in bar indicators state ranges + * @Default {null} + */ + textColor?: string; +} + +export interface ScalesIndicatorsTextLocation { + + /**Specifies the textLocation position in bar indicators + * @Default {0} + */ + x?: number; + + /**Specifies the Y position in bar indicators + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicators { + + /**Specifies the backgroundColor in bar indicators + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border in bar indicators + * @Default {null} + */ + border?: ScalesIndicatorsBorder; + + /**Specifies the font of bar indicators + * @Default {null} + */ + font?: ScalesIndicatorsFont; + + /**Specifies the indicator Height of bar indicators + * @Default {30} + */ + height?: number; + + /**Specifies the opacity in bar indicators + * @Default {NaN} + */ + opacity?: number; + + /**Specifies the position in bar indicators + * @Default {null} + */ + position?: ScalesIndicatorsPosition; + + /**Specifies the state ranges in bar indicators + * @Default {Array} + */ + stateRanges?: Array; + + /**Specifies the textLocation in bar indicators + * @Default {null} + */ + textLocation?: ScalesIndicatorsTextLocation; + + /**Specifies the indicator Style of font in bar indicators + * @Default {ej.datavisualization.LinearGauge.IndicatorType.Rectangle} + */ + type?: ej.datavisualization.LinearGauge.IndicatorTypes|string; + + /**Specifies the indicator Width in bar indicators + * @Default {30} + */ + width?: number; +} + +export interface ScalesLabelsDistanceFromScale { + + /**Specifies the xDistanceFromScale of labels. + * @Default {-10} + */ + x?: number; + + /**Specifies the yDistanceFromScale of labels. + * @Default {0} + */ + y?: number; +} + +export interface ScalesLabelsFont { + + /**Specifies the fontFamily of font. + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle of font.See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the size of font. + * @Default {11px} + */ + size?: string; +} + +export interface ScalesLabels { + + /**Specifies the angle of labels. + * @Default {0} + */ + angle?: number; + + /**Specifies the DistanceFromScale of labels. + * @Default {null} + */ + distanceFromScale?: ScalesLabelsDistanceFromScale; + + /**Specifies the font of labels. + * @Default {null} + */ + font?: ScalesLabelsFont; + + /**need to includeFirstValue. + * @Default {true} + */ + includeFirstValue?: boolean; + + /**Specifies the opacity of label. + * @Default {0} + */ + opacity?: number; + + /**Specifies the label Placement of label. See LabelPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the textColor of font. + * @Default {null} + */ + textColor?: string; + + /**Specifies the label Style of label. See LabelType + * @Default {ej.datavisualization.LinearGauge.LabelType.Major} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /**Specifies the unitText of label. + */ + unitText?: string; + + /**Specifies the unitText Position of label.See UnitTextPlacement + * @Default {Back} + */ + unitTextPlacement?: ej.datavisualization.LinearGauge.UnitTextPlacement|string; +} + +export interface ScalesMarkerPointersBorder { + + /**Specifies the border color of marker pointer + * @Default {null} + */ + color?: string; + + /**Specifies the border of marker pointer + * @Default {number} + */ + width?: number; +} + +export interface ScalesMarkerPointers { + + /**Specifies the backgroundColor of marker pointer + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border of marker pointer + * @Default {null} + */ + border?: ScalesMarkerPointersBorder; + + /**Specifies the distanceFromScale of marker pointer + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the pointer Gradient of marker pointer + * @Default {null} + */ + gradients?: any; + + /**Specifies the pointer Length of marker pointer + * @Default {30} + */ + length?: number; + + /**Specifies the opacity of marker pointer + * @Default {1} + */ + opacity?: number; + + /**Specifies the pointer Placement of marker pointer See PointerPlacement + * @Default {Far} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the marker Style of marker pointerSee MarkerType + * @Default {Triangle} + */ + type?: ej.datavisualization.LinearGauge.MarkerType|string; + + /**Specifies the value of marker pointer + * @Default {null} + */ + value?: number; + + /**Specifies the pointer Width of marker pointer + * @Default {30} + */ + width?: number; +} + +export interface ScalesPosition { + + /**Specifies the Horizontal position + * @Default {50} + */ + x?: number; + + /**Specifies the vertical position + * @Default {50} + */ + y?: number; +} + +export interface ScalesRangesBorder { + + /**Specifies the border color in the ranges. + * @Default {null} + */ + color?: string; + + /**Specifies the border width in the ranges. + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesRanges { + + /**Specifies the backgroundColor in the ranges. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border in the ranges. + * @Default {null} + */ + border?: ScalesRangesBorder; + + /**Specifies the distanceFromScale in the ranges. + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the endValue in the ranges. + * @Default {60} + */ + endValue?: number; + + /**Specifies the endWidth in the ranges. + * @Default {10} + */ + endWidth?: number; + + /**Specifies the range Gradient in the ranges. + * @Default {null} + */ + gradients?: any; + + /**Specifies the opacity in the ranges. + * @Default {null} + */ + opacity?: number; + + /**Specifies the range Position in the ranges. See RangePlacement + * @Default {Center} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the startValue in the ranges. + * @Default {20} + */ + startValue?: number; + + /**Specifies the startWidth in the ranges. + * @Default {10} + */ + startWidth?: number; +} + +export interface ScalesTicksDistanceFromScale { + + /**Specifies the xDistanceFromScale in the tick. + * @Default {0} + */ + x?: number; + + /**Specifies the yDistanceFromScale in the tick. + * @Default {0} + */ + y?: number; +} + +export interface ScalesTicks { + + /**Specifies the angle in the tick. + * @Default {0} + */ + angle?: number; + + /**Specifies the tick Color in the tick. + * @Default {null} + */ + color?: string; + + /**Specifies the DistanceFromScale in the tick. + * @Default {null} + */ + distanceFromScale?: ScalesTicksDistanceFromScale; + + /**Specifies the tick Height in the tick. + * @Default {10} + */ + height?: number; + + /**Specifies the opacity in the tick. + * @Default {0} + */ + opacity?: number; + + /**Specifies the tick Placement in the tick. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the tick Style in the tick. See TickType + * @Default {MajorInterval} + */ + type?: ej.datavisualization.LinearGauge.TicksType|string; + + /**Specifies the tick Width in the tick. + * @Default {3} + */ + width?: number; +} + +export interface Scales { + + /**Specifies the backgroundColor of the Scale. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the scaleBar Gradient of bar pointer + * @Default {Array} + */ + barPointers?: Array; + + /**Specifies the border of the Scale. + * @Default {null} + */ + border?: ScalesBorder; + + /**Specifies the customLabel + * @Default {Array} + */ + customLabels?: Array; + + /**Specifies the scale Direction of the Scale. See Directions + * @Default {CounterClockwise} + */ + direction?: ej.datavisualization.LinearGauge.Direction|string; + + /**Specifies the indicator + * @Default {Array} + */ + indicators?: Array; + + /**Specifies the labels. + * @Default {Array} + */ + labels?: Array; + + /**Specifies the scaleBar Length. + * @Default {290} + */ + length?: number; + + /**Specifies the majorIntervalValue of the Scale. + * @Default {10} + */ + majorIntervalValue?: number; + + /**Specifies the markerPointers + * @Default {Array} + */ + markerPointers?: Array; + + /**Specifies the maximum of the Scale. + * @Default {null} + */ + maximum?: number; + + /**Specifies the minimum of the Scale. + * @Default {null} + */ + minimum?: number; + + /**Specifies the minorIntervalValue of the Scale. + * @Default {2} + */ + minorIntervalValue?: number; + + /**Specifies the opacity of the Scale. + * @Default {NaN} + */ + opacity?: number; + + /**Specifies the position + * @Default {null} + */ + position?: ScalesPosition; + + /**Specifies the ranges in the tick. + * @Default {Array} + */ + ranges?: Array; + + /**Specifies the shadowOffset. + * @Default {0} + */ + shadowOffset?: number; + + /**Specifies the showBarPointers state. + * @Default {true} + */ + showBarPointers?: boolean; + + /**Specifies the showCustomLabels state. + * @Default {false} + */ + showCustomLabels?: boolean; + + /**Specifies the showIndicators state. + * @Default {false} + */ + showIndicators?: boolean; + + /**Specifies the showLabels state. + * @Default {true} + */ + showLabels?: boolean; + + /**Specifies the showMarkerPointers state. + * @Default {true} + */ + showMarkerPointers?: boolean; + + /**Specifies the showRanges state. + * @Default {false} + */ + showRanges?: boolean; + + /**Specifies the showTicks state. + * @Default {true} + */ + showTicks?: boolean; + + /**Specifies the ticks in the scale. + * @Default {Array} + */ + ticks?: Array; + + /**Specifies the scaleBar type .See ScaleType + * @Default {Rectangle} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /**Specifies the scaleBar width. + * @Default {30} + */ + width?: number; +} + +export interface Tooltip { + + /**Specify showCustomLabelTooltip value of linear gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /**Specify showLabelTooltip value of linear gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /**Specify templateID value of linear gauge + * @Default {false} + */ + templateID?: string; +} +} +module LinearGauge +{ +enum OuterCustomLabelPosition +{ +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +module LinearGauge +{ +enum FontStyle +{ +//string +Bold, +//string +Italic, +//string +Regular, +//string +Strikeout, +//string +Underline, +} +} +module LinearGauge +{ +enum Direction +{ +//string +Clockwise, +//string +CounterClockwise, +} +} +module LinearGauge +{ +enum IndicatorTypes +{ +//string +Rectangle, +//string +Circle, +//string +RoundedRectangle, +//string +Text, +} +} +module LinearGauge +{ +enum PointerPlacement +{ +//string +Near, +//string +Far, +//string +Center, +} +} +module LinearGauge +{ +enum ScaleType +{ +//string +Major, +//string +Minor, +} +} +module LinearGauge +{ +enum UnitTextPlacement +{ +//string +Back, +//string +From, +} +} +module LinearGauge +{ +enum MarkerType +{ +//string +Rectangle, +//string +Triangle, +//string +Ellipse, +//string +Diamond, +//string +Pentagon, +//string +Circle, +//string +Star, +//string +Slider, +//string +Pointer, +//string +Wedge, +//string +Trapezoid, +//string +RoundedRectangle, +} +} +module LinearGauge +{ +enum TicksType +{ +//string +Majorinterval, +//string +Minorinterval, +} +} +module LinearGauge +{ +enum Themes +{ +//string +FlatLight, +//string +FlatDark, +} +} + +class CircularGauge extends ej.Widget { + static fn: CircularGauge; + constructor(element: JQuery, options?: CircularGauge.Model); + constructor(element: Element, options?: CircularGauge.Model); + model:CircularGauge.Model; + defaults:CircularGauge.Model; + + /** destroy the circular gauge widget. all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get BackNeedleLength + * @returns {void} + */ + getBackNeedleLength(): void; + + /** To get CustomLabelAngle + * @returns {void} + */ + getCustomLabelAngle(): void; + + /** To get CustomLabelValue + * @returns {void} + */ + getCustomLabelValue(): void; + + /** To get LabelAngle + * @returns {void} + */ + getLabelAngle(): void; + + /** To get LabelDistanceFromScale + * @returns {void} + */ + getLabelDistanceFromScale(): void; + + /** To get LabelPlacement + * @returns {void} + */ + getLabelPlacement(): void; + + /** To get LabelStyle + * @returns {void} + */ + getLabelStyle(): void; + + /** To get MajorIntervalValue + * @returns {void} + */ + getMajorIntervalValue(): void; + + /** To get MarkerDistanceFromScale + * @returns {void} + */ + getMarkerDistanceFromScale(): void; + + /** To get MarkerStyle + * @returns {void} + */ + getMarkerStyle(): void; + + /** To get MaximumValue + * @returns {void} + */ + getMaximumValue(): void; + + /** To get MinimumValue + * @returns {void} + */ + getMinimumValue(): void; + + /** To get MinorIntervalValue + * @returns {void} + */ + getMinorIntervalValue(): void; + + /** To get NeedleStyle + * @returns {void} + */ + getNeedleStyle(): void; + + /** To get PointerCapBorderWidth + * @returns {void} + */ + getPointerCapBorderWidth(): void; + + /** To get PointerCapRadius + * @returns {void} + */ + getPointerCapRadius(): void; + + /** To get PointerLength + * @returns {void} + */ + getPointerLength(): void; + + /** To get PointerNeedleType + * @returns {void} + */ + getPointerNeedleType(): void; + + /** To get PointerPlacement + * @returns {void} + */ + getPointerPlacement(): void; + + /** To get PointerValue + * @returns {void} + */ + getPointerValue(): void; + + /** To get PointerWidth + * @returns {void} + */ + getPointerWidth(): void; + + /** To get RangeBorderWidth + * @returns {void} + */ + getRangeBorderWidth(): void; + + /** To get RangeDistanceFromScale + * @returns {void} + */ + getRangeDistanceFromScale(): void; + + /** To get RangeEndValue + * @returns {void} + */ + getRangeEndValue(): void; + + /** To get RangePosition + * @returns {void} + */ + getRangePosition(): void; + + /** To get RangeSize + * @returns {void} + */ + getRangeSize(): void; + + /** To get RangeStartValue + * @returns {void} + */ + getRangeStartValue(): void; + + /** To get ScaleBarSize + * @returns {void} + */ + getScaleBarSize(): void; + + /** To get ScaleBorderWidth + * @returns {void} + */ + getScaleBorderWidth(): void; + + /** To get ScaleDirection + * @returns {void} + */ + getScaleDirection(): void; + + /** To get ScaleRadius + * @returns {void} + */ + getScaleRadius(): void; + + /** To get StartAngle + * @returns {void} + */ + getStartAngle(): void; + + /** To get SubGaugeLocation + * @returns {void} + */ + getSubGaugeLocation(): void; + + /** To get SweepAngle + * @returns {void} + */ + getSweepAngle(): void; + + /** To get TickAngle + * @returns {void} + */ + getTickAngle(): void; + + /** To get TickDistanceFromScale + * @returns {void} + */ + getTickDistanceFromScale(): void; + + /** To get TickHeight + * @returns {void} + */ + getTickHeight(): void; + + /** To get TickPlacement + * @returns {void} + */ + getTickPlacement(): void; + + /** To get TickStyle + * @returns {void} + */ + getTickStyle(): void; + + /** To get TickWidth + * @returns {void} + */ + getTickWidth(): void; + + /** To set includeFirstValue + * @returns {void} + */ + includeFirstValue(): void; + + /** Switching the redraw option for the gauge + * @returns {void} + */ + redraw(): void; + + /** To set BackNeedleLength + * @returns {void} + */ + setBackNeedleLength(): void; + + /** To set CustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set CustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set LabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set LabelDistanceFromScale + * @returns {void} + */ + setLabelDistanceFromScale(): void; + + /** To set LabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set LabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set MajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set MarkerDistanceFromScale + * @returns {void} + */ + setMarkerDistanceFromScale(): void; + + /** To set MarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set MaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set MinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set MinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set NeedleStyle + * @returns {void} + */ + setNeedleStyle(): void; + + /** To set PointerCapBorderWidth + * @returns {void} + */ + setPointerCapBorderWidth(): void; + + /** To set PointerCapRadius + * @returns {void} + */ + setPointerCapRadius(): void; + + /** To set PointerLength + * @returns {void} + */ + setPointerLength(): void; + + /** To set PointerNeedleType + * @returns {void} + */ + setPointerNeedleType(): void; + + /** To set PointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set RangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set RangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set RangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set RangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set RangeSize + * @returns {void} + */ + setRangeSize(): void; + + /** To set RangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set ScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set ScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set ScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set ScaleRadius + * @returns {void} + */ + setScaleRadius(): void; + + /** To set StartAngle + * @returns {void} + */ + setStartAngle(): void; + + /** To set SubGaugeLocation + * @returns {void} + */ + setSubGaugeLocation(): void; + + /** To set SweepAngle + * @returns {void} + */ + setSweepAngle(): void; + + /** To set TickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set TickDistanceFromScale + * @returns {void} + */ + setTickDistanceFromScale(): void; + + /** To set TickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set TickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set TickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set TickWidth + * @returns {void} + */ + setTickWidth(): void; +} +export module CircularGauge{ + +export interface Model { + + /**Specifies animationSpeed of circular gauge + * @Default {500} + */ + animationSpeed?: number; + + /**Specifies the background color of circular gauge. + * @Default {null} + */ + backgroundColor?: string; + + /**Specify distanceFromCorner value of circular gauge + * @Default {center} + */ + distanceFromCorner?: number; + + /**Specify animate value of circular gauge + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specify enableResize value of circular gauge + * @Default {false} + */ + enableResize?: boolean; + + /**Specify the frame of circular gauge + * @Default {Object} + */ + frame?: Frame; + + /**Specify gaugePosition value of circular gauge See GaugePosition + * @Default {center} + */ + gaugePosition?: ej.datavisualization.CircularGauge.gaugePosition|string; + + /**Specifies the height of circular gauge. + * @Default {360} + */ + height?: number; + + /**Specifies the interiorGradient of circular gauge. + * @Default {null} + */ + interiorGradient?: any; + + /**Specify isRadialGradient value of circular gauge + * @Default {false} + */ + isRadialGradient?: boolean; + + /**Specifies the maximum value of circular gauge. + * @Default {100} + */ + maximum?: number; + + /**Specifies the minimum value of circular gauge. + * @Default {0} + */ + minimum?: number; + + /**Specify outerCustomLabelPosition value of circular gauge See OuterCustomLabelPosition + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.CircularGauge.CustomLabelPositionType|string; + + /**Specifies the radius of circular gauge. + * @Default {180} + */ + radius?: number; + + /**Specify readonly value of circular gauge + * @Default {true} + */ + readOnly?: boolean; + + /**Specify the pointers, ticks, labels, indicators, ranges of circular gauge + * @Default {null} + */ + scales?: Scales; + + /**Specify the theme of circular gauge. + * @Default {flatlight} + */ + theme?: string; + + /**Specify tooltip option of circular gauge + * @Default {object} + */ + tooltip?: Tooltip; + + /**Specifies the value of circular gauge. + * @Default {0} + */ + value?: number; + + /**Specifies the width of circular gauge. + * @Default {360} + */ + width?: number; + + /**Triggers while the custom labels are being drawn on the gauge.*/ + drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + + /**Triggers while the indicators are being started to drawn on the gauge.*/ + drawIndicators? (e: DrawIndicatorsEventArgs): void; + + /**Triggers while the labels are being drawn on the gauge.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Triggers while the pointer cap is being drawn on the gauge.*/ + drawPointerCap? (e: DrawPointerCapEventArgs): void; + + /**Triggers while the pointers are being drawn on the gauge.*/ + drawPointers? (e: DrawPointersEventArgs): void; + + /**Triggers when the ranges begin to be getting drawn on the gauge.*/ + drawRange? (e: DrawRangeEventArgs): void; + + /**Triggers while the ticks are being drawn on the gauge.*/ + drawTicks? (e: DrawTicksEventArgs): void; + + /**Triggers while the gauge start to Load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the left mouse button is clicked.*/ + mouseClick? (e: MouseClickEventArgs): void; + + /**Triggers when clicking and dragging the mouse pointer over the gauge pointer.*/ + mouseClickMove? (e: MouseClickMoveEventArgs): void; + + /**Triggers when the mouse click is released.*/ + mouseClickUp? (e: MouseClickUpEventArgs): void; + + /**Triggers when the rendering of the gauge is completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface DrawCustomLabelEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the custom label + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the custom label belongs. + */ + scaleIndex?: number; + + /**returns the custom label style + */ + style?: string; + + /**returns the current custom label element. + */ + customLabelElement?: any; + + /**returns the index of the custom label. + */ + customLabelIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawIndicatorsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the indicator + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the indicator belongs. + */ + scaleIndex?: number; + + /**returns the indicator style + */ + style?: string; + + /**returns the current indicator element. + */ + indicatorElement?: any; + + /**returns the index of the indicator. + */ + indicatorIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the labels + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; + + /**returns the label style + */ + style?: string; + + /**returns the angle of the labels. + */ + angle?: number; + + /**returns the current label element. + */ + element?: any; + + /**returns the index of the label. + */ + index?: number; + + /**returns the value of the label. + */ + pointerValue?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawPointerCapEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the startX and startY of the pointer cap. + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the pointer cap style + */ + style?: string; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the current pointer element. + */ + element?: any; + + /**returns the index of the pointer. + */ + index?: number; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawRangeEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the range + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the range belongs. + */ + scaleIndex?: number; + + /**returns the range style + */ + style?: string; + + /**returns the current range element. + */ + rangeElement?: any; + + /**returns the index of the range. + */ + rangeIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawTicksEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the ticks + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the angle of the tick. + */ + angle?: number; + + /**returns the current tick element. + */ + element?: any; + + /**returns the index of the tick. + */ + index?: number; + + /**returns the label value of the tick. + */ + pointerValue?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseClickEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickMoveEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickUpEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface Frame { + + /**Specify the url of the frame background image for circular gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the frameType of circular gauge. See Frame + * @Default {FullCircle} + */ + frameType?: ej.datavisualization.CircularGauge.FrameType|string; + + /**Specifies the end angle for the half circular frame. + * @Default {360} + */ + halfCircleFrameEndAngle?: number; + + /**Specifies the start angle for the half circular frame. + * @Default {180} + */ + halfCircleFrameStartAngle?: number; +} + +export interface ScalesBorder { + + /**Specify border color for scales of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify border width of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesIndicatorsPosition { + + /**Specify x-axis of position of circular gauge + * @Default {0} + */ + x?: number; + + /**Specify y-axis of position of circular gauge + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicatorsStateRanges { + + /**Specify backgroundColor for indicator of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify borderColor for indicator of circular gauge + * @Default {null} + */ + borderColor?: string; + + /**Specify end value for each specified state of circular gauge + * @Default {0} + */ + endValue?: number; + + /**Specify value of the font as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + font?: any; + + /**Specify start value for each specified state of circular gauge + * @Default {0} + */ + startValue?: number; + + /**Specify value of the text as the indicator when the indicator style is set with the value "text" of circular gauge + */ + text?: string; + + /**Specify value of the textColor as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + textColor?: string; +} + +export interface ScalesIndicators { + + /**Specify indicator height of circular gauge + * @Default {15} + */ + height?: number; + + /**Specify imageUrl of circular gauge + * @Default {null} + */ + imageUrl?: string; + + /**Specify position of circular gauge + * @Default {Object} + */ + position?: ScalesIndicatorsPosition; + + /**Specify the various states of circular gauge + * @Default {Array} + */ + stateRanges?: Array; + + /**Specify indicator style of circular gauge. See IndicatorType + * @Default {Circle} + */ + type?: ej.datavisualization.CircularGauge.IndicatorTypes|string; + + /**Specify indicator width of circular gauge + * @Default {15} + */ + width?: number; +} + +export interface ScalesLabelsFont { + + /**Specify font fontFamily for labels of circular gauge + * @Default {Arial} + */ + fontFamily?: string; + + /**Specify font Style for labels of circular gauge + * @Default {Bold} + */ + fontStyle?: string; + + /**Specify font size for labels of circular gauge + * @Default {11px} + */ + size?: string; +} + +export interface ScalesLabels { + + /**Specify the angle for the labels of circular gauge + * @Default {0} + */ + angle?: number; + + /**Specify labels autoAngle value of circular gauge + * @Default {false} + */ + autoAngle?: boolean; + + /**Specify label color of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify distanceFromScale value for labels of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify font for labels of circular gauge + * @Default {Object} + */ + font?: ScalesLabelsFont; + + /**Specify includeFirstValue of circular gauge + * @Default {true} + */ + includeFirstValue?: boolean; + + /**Specify opacity value for labels of circular gauge + * @Default {null} + */ + opacity?: number; + + /**Specify label placement of circular gauge. See LabelPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify label Style of circular gauge. See LabelType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /**Specify unitText of circular gauge + */ + unitText?: string; + + /**Specify unitTextPosition of circular gauge. See UnitTextPosition + * @Default {Back} + */ + unitTextPosition?: ej.datavisualization.CircularGauge.UnitTextPlacement|string; +} + +export interface ScalesPointerCap { + + /**Specify cap backgroundColor of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify cap borderColor of circular gauge + * @Default {null} + */ + borderColor?: string; + + /**Specify pointerCap borderWidth value of circular gauge + * @Default {3} + */ + borderWidth?: number; + + /**Specify cap interiorGradient value of circular gauge + * @Default {null} + */ + interiorGradient?: any; + + /**Specify pointerCap Radius value of circular gauge + * @Default {7} + */ + radius?: number; +} + +export interface ScalesPointersBorder { + + /**Specify border color for pointer of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify border width for pointers of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesPointersPointerValueTextFont { + + /**Specify pointer value text font family of circular gauge. + * @Default {Arial} + */ + fontFamily?: string; + + /**Specify pointer value text font style of circular gauge. + * @Default {Bold} + */ + fontStyle?: string; + + /**Specify pointer value text size of circular gauge. + * @Default {11px} + */ + size?: string; +} + +export interface ScalesPointersPointerValueText { + + /**Specify pointer text angle of circular gauge. + * @Default {0} + */ + angle?: number; + + /**Specify pointer text auto angle of circular gauge. + * @Default {false} + */ + autoAngle?: boolean; + + /**Specify pointer value text color of circular gauge. + * @Default {#8c8c8c} + */ + color?: string; + + /**Specify pointer value text distance from pointer of circular gauge. + * @Default {20} + */ + distance?: number; + + /**Specify pointer value text font option of circular gauge. + * @Default {object} + */ + font?: ScalesPointersPointerValueTextFont; + + /**Specify pointer value text opacity of circular gauge. + * @Default {1} + */ + opacity?: number; + + /**enable pointer value text visibility of circular gauge. + * @Default {false} + */ + showValue?: boolean; +} + +export interface ScalesPointers { + + /**Specify backgroundColor for the pointer of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify backNeedleLength of circular gauge + * @Default {10} + */ + backNeedleLength?: number; + + /**Specify the border for pointers of circular gauge + * @Default {Object} + */ + border?: ScalesPointersBorder; + + /**Specify distanceFromScale value for pointers of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify pointer gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /**Specify pointer image of circular gauge.It is applicable for both marker as well as needle type pointers. + * @Default {NULL} + */ + imageUrl?: string; + + /**Specify pointer length of circular gauge + * @Default {150} + */ + length?: number; + + /**Specify marker Style value of circular gauge. See MarkerType + * @Default {Rectangle} + */ + markerType?: ej.datavisualization.CircularGauge.MarkerType|string; + + /**Specify needle Style value of circular gauge. See NeedleType + * @Default {Triangle} + */ + needleType?: ej.datavisualization.CircularGauge.NeedleType|string; + + /**Specify opacity value for pointer of circular gauge + * @Default {1} + */ + opacity?: number; + + /**Specify pointer Placement value of circular gauge. See PointerPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify pointer value text of circular gauge. + * @Default {Object} + */ + pointerValueText?: ScalesPointersPointerValueText; + + /**Specify showBackNeedle value of circular gauge + * @Default {false} + */ + showBackNeedle?: boolean; + + /**Specify pointer type value of circular gauge. See PointerType + * @Default {Needle} + */ + type?: ej.datavisualization.CircularGauge.PointerType|string; + + /**Specify value of the pointer of circular gauge + * @Default {null} + */ + value?: number; + + /**Specify pointer width of circular gauge + * @Default {7} + */ + width?: number; +} + +export interface ScalesRangesBorder { + + /**Specify border color for ranges of circular gauge + * @Default {#32b3c6} + */ + color?: string; + + /**Specify border width for ranges of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesRanges { + + /**Specify backgroundColor for the ranges of circular gauge + * @Default {#32b3c6} + */ + backgroundColor?: string; + + /**Specify border for ranges of circular gauge + * @Default {Object} + */ + border?: ScalesRangesBorder; + + /**Specify distanceFromScale value for ranges of circular gauge + * @Default {25} + */ + distanceFromScale?: number; + + /**Specify endValue for ranges of circular gauge + * @Default {null} + */ + endValue?: number; + + /**Specify endWidth for ranges of circular gauge + * @Default {10} + */ + endWidth?: number; + + /**Specify range gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /**Specify opacity value for ranges of circular gauge + * @Default {null} + */ + opacity?: number; + + /**Specify placement of circular gauge. See RangePlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify size of the range value of circular gauge + * @Default {5} + */ + size?: number; + + /**Specify startValue for ranges of circular gauge + * @Default {null} + */ + startValue?: number; + + /**Specify startWidth of circular gauge + * @Default {[Array.number] scale.ranges.startWidth = 10} + */ + startWidth?: number; +} + +export interface ScalesSubGaugesPosition { + + /**Specify x-axis position for sub-gauge of circular gauge + * @Default {0} + */ + x?: number; + + /**Specify y-axis position for sub-gauge of circular gauge + * @Default {0} + */ + y?: number; +} + +export interface ScalesSubGauges { + + /**Specify subGauge Height of circular gauge + * @Default {150} + */ + height?: number; + + /**Specify position for sub-gauge of circular gauge + * @Default {Object} + */ + position?: ScalesSubGaugesPosition; + + /**Specify subGauge Width of circular gauge + * @Default {150} + */ + width?: number; +} + +export interface ScalesTicks { + + /**Specify the angle for the ticks of circular gauge + * @Default {0} + */ + angle?: number; + + /**Specify tick color of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify distanceFromScale value for ticks of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify tick height of circular gauge + * @Default {16} + */ + height?: number; + + /**Specify tick placement of circular gauge. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify tick Style of circular gauge. See TickType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /**Specify tick width of circular gauge + * @Default {3} + */ + width?: number; +} + +export interface Scales { + + /**Specify backgroundColor for the scale of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify border for scales of circular gauge + * @Default {Object} + */ + border?: ScalesBorder; + + /**Specify scale direction of circular gauge. See Directions + * @Default {Clockwise} + */ + direction?: ej.datavisualization.CircularGauge.Direction|string; + + /**Specify representing state of circular gauge + * @Default {Array} + */ + indicators?: Array; + + /**Specify the text values displayed in a meaningful manner alongside the ticks of circular gauge + * @Default {Array} + */ + labels?: Array; + + /**Specify majorIntervalValue of circular gauge + * @Default {10} + */ + majorIntervalValue?: number; + + /**Specify maximum scale value of circular gauge + * @Default {null} + */ + maximum?: number; + + /**Specify minimum scale value of circular gauge + * @Default {null} + */ + minimum?: number; + + /**Specify minorIntervalValue of circular gauge + * @Default {2} + */ + minorIntervalValue?: number; + + /**Specify opacity value of circular gauge + * @Default {1} + */ + opacity?: number; + + /**Specify pointer cap of circular gauge + * @Default {Object} + */ + pointerCap?: ScalesPointerCap; + + /**Specify pointers value of circular gauge + * @Default {Array} + */ + pointers?: Array; + + /**Specify scale radius of circular gauge + * @Default {170} + */ + radius?: number; + + /**Specify ranges value of circular gauge + * @Default {Array} + */ + ranges?: Array; + + /**Specify shadowOffset value of circular gauge + * @Default {0} + */ + shadowOffset?: number; + + /**Specify showIndicators of circular gauge + * @Default {false} + */ + showIndicators?: boolean; + + /**Specify showLabels of circular gauge + * @Default {true} + */ + showLabels?: boolean; + + /**Specify showPointers of circular gauge + * @Default {true} + */ + showPointers?: boolean; + + /**Specify showRanges of circular gauge + * @Default {false} + */ + showRanges?: boolean; + + /**Specify showScaleBar of circular gauge + * @Default {false} + */ + showScaleBar?: boolean; + + /**Specify showTicks of circular gauge + * @Default {true} + */ + showTicks?: boolean; + + /**Specify scaleBar size of circular gauge + * @Default {6} + */ + size?: number; + + /**Specify startAngle of circular gauge + * @Default {115} + */ + startAngle?: number; + + /**Specify subGauge of circular gauge + * @Default {Array} + */ + subGauges?: Array; + + /**Specify sweepAngle of circular gauge + * @Default {310} + */ + sweepAngle?: number; + + /**Specify ticks of circular gauge + * @Default {Array} + */ + ticks?: Array; +} + +export interface Tooltip { + + /**enable showCustomLabelTooltip of circular gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /**enable showLabelTooltip of circular gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /**Specify tooltip templateID of circular gauge + * @Default {false} + */ + templateID?: string; +} +} +module CircularGauge +{ +enum FrameType +{ +//string +FullCircle, +//string +HalfCircle, +} +} +module CircularGauge +{ +enum gaugePosition +{ +//string +TopLeft, +//string +TopRight, +//string +TopCenter, +//string +MiddleLeft, +//string +MiddleRight, +//string +Center, +//string +BottomLeft, +//string +BottomRight, +//string +BottomCenter, +} +} +module CircularGauge +{ +enum CustomLabelPositionType +{ +//string +Top, +//string +Bottom, +//string +Right, +//string +Left, +} +} +module CircularGauge +{ +enum Direction +{ +//string +Clockwise, +//string +CounterClockwise, +} +} +module CircularGauge +{ +enum IndicatorTypes +{ +//string +Rectangle, +//string +Circle, +//string +Text, +//string +RoundedRectangle, +//string +Image, +} +} +module CircularGauge +{ +enum Placement +{ +//string +Near, +//string +Far, +} +} +module CircularGauge +{ +enum LabelType +{ +//string +Major, +//string +Minor, +} +} +module CircularGauge +{ +enum UnitTextPlacement +{ +//string +Back, +//string +Front, +} +} +module CircularGauge +{ +enum MarkerType +{ +//string +Rectangle, +//string +Circle, +//string +Triangle, +//string +Ellipse, +//string +Diamond, +//string +Pentagon, +//string +Slider, +//string +Pointer, +//string +Wedge, +//string +Trapezoid, +//string +RoundedRectangle, +//string +Image, +} +} +module CircularGauge +{ +enum NeedleType +{ +//string +Triangle, +//string +Rectangle, +//string +Arrow, +//string +Image, +//string +Trapezoid, +} +} +module CircularGauge +{ +enum PointerType +{ +//string +Needle, +//string +Marker, +} +} + +class DigitalGauge extends ej.Widget { + static fn: DigitalGauge; + constructor(element: JQuery, options?: DigitalGauge.Model); + constructor(element: Element, options?: DigitalGauge.Model); + model:DigitalGauge.Model; + defaults:DigitalGauge.Model; + + /** To destroy the digital gauge + * @returns {void} + */ + destroy(): void; + + /** To export Digital Gauge as Image + * @param {string} fileName for the Image + * @param {string} fileType for the Image + * @returns {void} + */ + exportImage(fileName: string, fileType: string): void; + + /** Gets the location of an item that is displayed on the gauge. + * @param {number} Position value of an item that is displayed on the gauge. + * @returns {void} + */ + getPosition(itemIndex: number): void; + + /** ClientSideMethod getValue Gets the value of an item that is displayed on the gauge + * @param {number} Index value of an item that displayed on the gauge + * @returns {void} + */ + getValue(itemIndex: number): void; + + /** Refresh the digital gauge widget + * @returns {void} + */ + refresh(): void; + + /** ClientSideMethod Set Position Sets the location of an item to be displayed in the gauge + * @param {number} Index value of the digital gauge item + * @param {any} Location value of the digital gauge + * @returns {void} + */ + setPosition(itemIndex: number, value: any): void; + + /** ClientSideMethod SetValue Sets the value of an item to be displayed in the gauge. + * @param {number} Index value of the digital gauge item + * @param {string} Text value to be displayed in the gaugeS + * @returns {void} + */ + setValue(itemIndex: number, value: string): void; +} +export module DigitalGauge{ + +export interface Model { + + /**Specifies the resize option of the DigitalGauge. + * @Default {false} + */ + enableResize?: boolean; + + /**Specifies the frame of the Digital gauge. + * @Default {{backgroundImageUrl: null, innerWidth: 6, outerWidth: 10}} + */ + frame?: Frame; + + /**Specifies the height of the DigitalGauge. + * @Default {150} + */ + height?: number; + + /**Specifies the items for the DigitalGauge. + * @Default {null} + */ + items?: Items; + + /**Specifies the matrixSegmentData for the DigitalGauge. + */ + matrixSegmentData?: any; + + /**Specifies the segmentData for the DigitalGauge. + */ + segmentData?: any; + + /**Specifies the themes for the Digital gauge. See Themes + * @Default {flatlight} + */ + themes?: string; + + /**Specifies the value to the DigitalGauge. + * @Default {text} + */ + value?: string; + + /**Specifies the width for the Digital gauge. + * @Default {400} + */ + width?: number; + + /**Triggers when the gauge is initialized.*/ + init? (e: InitEventArgs): void; + + /**Triggers when the gauge item rendering.*/ + itemRendering? (e: ItemRenderingEventArgs): void; + + /**Triggers when the gauge is start to load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the gauge render is completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface InitEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemRenderingEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface Frame { + + /**Specifies the url of an image to be displayed as background of the Digital gauge. + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the inner width for the frame, when the background image has been set for the Digital gauge.. + * @Default {6} + */ + innerWidth?: number; + + /**Specifies the outer width of the frame, when the background image has been set for the Digital gauge. + * @Default {10} + */ + outerWidth?: number; +} + +export interface ItemsCharacterSettings { + + /**Specifies the CharacterCount value for the DigitalGauge. + * @Default {4} + */ + count?: number; + + /**Specifies the opacity value for the DigitalGauge. + * @Default {1} + */ + opacity?: number; + + /**Specifies the value for spacing between the characters + * @Default {2} + */ + spacing?: number; + + /**Specifies the character type for the text to be displayed. + * @Default {ej.datavisualization.DigitalGauge.CharacterType.EightCrossEightDotMatrix} + */ + type?: ej.datavisualization.DigitalGauge.CharacterType|string; +} + +export interface ItemsFont { + + /**Set the font family value + * @Default {Arial} + */ + fontFamily?: string; + + /**Set the font style for the font + * @Default {italic} + */ + fontStyle?: ej.datavisualization.DigitalGauge.FontStyle|string; + + /**Set the font size value + * @Default {11px} + */ + size?: string; +} + +export interface ItemsPosition { + + /**Set the horizontal location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + x?: number; + + /**Set the vertical location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + y?: number; +} + +export interface ItemsSegmentSettings { + + /**Set the color for the text segments. + * @Default {null} + */ + color?: string; + + /**Set the gradient for the text segments. + * @Default {null} + */ + gradient?: any; + + /**Set the length for the text segments. + * @Default {2} + */ + length?: number; + + /**Set the opacity for the text segments. + * @Default {0} + */ + opacity?: number; + + /**Set the spacing for the text segments. + * @Default {1} + */ + spacing?: number; + + /**Set the width for the text segments. + * @Default {1} + */ + width?: number; +} + +export interface Items { + + /**Specifies the Character settings for the DigitalGauge. + * @Default {null} + */ + characterSettings?: ItemsCharacterSettings; + + /**Enable/Disable the custom font to be applied to the text in the gauge. + * @Default {false} + */ + enableCustomFont?: boolean; + + /**Set the specific font for the text, when the enableCustomFont is set to true + * @Default {null} + */ + font?: ItemsFont; + + /**Set the location for the text, where it needs to be placed within the gauge. + * @Default {null} + */ + position?: ItemsPosition; + + /**Set the segment settings for the digital gauge. + * @Default {null} + */ + segmentSettings?: ItemsSegmentSettings; + + /**Set the value for enabling/disabling the blurring effect for the shadows of the text + * @Default {0} + */ + shadowBlur?: number; + + /**Specifies the color of the text shadow. + * @Default {null} + */ + shadowColor?: string; + + /**Set the x offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetX?: number; + + /**Set the y offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetY?: number; + + /**Set the alignment of the text that is displayed within the gauge.See TextAlign + * @Default {left} + */ + textAlign?: string; + + /**Specifies the color of the text. + * @Default {null} + */ + textColor?: string; + + /**Specifies the text value. + * @Default {null} + */ + value?: string; +} +} +module DigitalGauge +{ +enum CharacterType +{ +//string +SevenSegment, +//string +FourteenSegment, +//string +SixteenSegment, +//string +EightCrossEightDotMatrix, +//string +EightCrossEightSquareMatrix, +} +} +module DigitalGauge +{ +enum FontStyle +{ +//string +Normal, +//string +Bold, +//string +Italic, +//string +Underline, +//string +Strikeout, +} +} + +class Chart extends ej.Widget { + static fn: Chart; + constructor(element: JQuery, options?: Chart.Model); + constructor(element: Element, options?: Chart.Model); + model:Chart.Model; + defaults:Chart.Model; + + /** Animates the series and/or indicators in Chart. When parameter is not passed to this method, then all the series and indicators present in Chart are animated. + * @param {Array} Series and indicator objects passed in the array collection are animated.Example + * @param {any} Series or indicator object passed to this method are animated.Example, + * @returns {void} + */ + animate(options: Array, option: any): void; + + /** Exports chart as an image or to an excel file. Chart can be exported as an image only when exportCanvasRendering option is set to true. + * @param {string} Type of the export operation to be performed. Following are the two export types that are supported now,1. 'image'2. 'excel'Example + * @param {string} URL of the service, where the chart will be exported to excel.Example, + * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. This is an optional parameter. By default, it is false.Example, + * @returns {void} + */ + export(type: string, url: string, exportMultipleChart: boolean): void; + + /** Redraws the entire chart. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; +} +export module Chart{ + +export interface Model { + + /**Options for adding and customizing annotations in Chart. + */ + annotations?: Array; + + /**Url of the image to be used as chart background. + * @Default {null} + */ + backGroundImageUrl?: string; + + /**Options for customizing the color, opacity and width of the chart border. + */ + border?: Border; + + /**Controls whether Chart has to be responsive or not. + * @Default {false} + */ + canResize?: boolean; + + /**Options for configuring the border and background of the plot area. + */ + chartArea?: ChartArea; + + /**Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. + */ + columnDefinitions?: Array; + + /**Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. + */ + commonSeriesOptions?: CommonSeriesOptions; + + /**Options for displaying and customizing the crosshair. + */ + crosshair?: Crosshair; + + /**Depth of the 3D Chart from front view of series to background wall. This property is applicable only for 3D view. + * @Default {100} + */ + depth?: number; + + /**Controls whether 3D view has to be enabled or not. 3D view is supported only for column, bar. Stacking column, stacking bar, pie and doughnut series types. + * @Default {false} + */ + enable3D?: boolean; + + /**Controls whether Chart has to be rendered as Canvas or SVG. Canvas rendering supports all functionalities in SVG rendering except 3D Charts. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /**Controls whether 3D view has to be rotated on dragging. This property is applicable only for 3D view. + * @Default {false} + */ + enableRotation?: boolean; + + /**Options to customize the technical indicators. + */ + indicators?: Array; + + /**Options to customize the legend items and legend title. + */ + legend?: Legend; + + /**Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are not localized automatically. Provide localized text as value to string type properties. + * @Default {en-US} + */ + locale?: string; + + /**Palette is used to store the series fill color in array and apply the color to series collection in the order of series index. + * @Default {null} + */ + palette?: Array; + + /**Options to customize the left, right, top and bottom margins of chart area. + */ + Margin?: any; + + /**Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased.This property is applicable only when 3D view is enabled + * @Default {90} + */ + perspectiveAngle?: number; + + /**This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + */ + primaryXAxis?: PrimaryXAxis; + + /**This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + */ + primaryYAxis?: PrimaryYAxis; + + /**Rotation angle of the 3D view. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + rotation?: number; + + /**Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. + */ + rowDefinitions?: Array; + + /**Specifies the properties used for customizing the series. + */ + series?: Array; + + /**Controls whether data points has to be displayed side by side or along the depth of the axis. + * @Default {false} + */ + sideBySideSeriesPlacement?: boolean; + + /**Options to customize the Chart size. + */ + size?: Size; + + /**Specifies the theme for Chart. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Chart.Theme|string; + + /**Slope angle of 3D Chart. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + tilt?: number; + + /**Options for customizing the title and subtitle of Chart. + */ + title?: Title; + + /**Width of the wall used in 3D Chart. Wall is present only in Cartesian type 3D series and not in 3D pie or Doughnut series. This property is applicable only when 3D view is enabled. + * @Default {2} + */ + wallSize?: number; + + /**Options for enabling zooming feature of chart. + */ + zooming?: Zooming; + + /**Fires after the series animation is completed. This event will be triggered for each series when animation is enabled.*/ + animationComplete? (e: AnimationCompleteEventArgs): void; + + /**Fires before rendering the labels. This event is fired for each label in axis. You can use this event to add custom text to axis labels.*/ + axesLabelRendering? (e: AxesLabelRenderingEventArgs): void; + + /**Fires during the initialization of axis labels.*/ + axesLabelsInitialize? (e: AxesLabelsInitializeEventArgs): void; + + /**Fires during axes range calculation. This event is fired for each axis present in Chart. You can use this event to customize axis range as required.*/ + axesRangeCalculate? (e: AxesRangeCalculateEventArgs): void; + + /**Fires before rendering the axis title. This event is triggered for each axis with title. You can use this event to add custom text to axis title.*/ + axesTitleRendering? (e: AxesTitleRenderingEventArgs): void; + + /**Fires during the calculation of chart area bounds. You can use this event to customize the bounds of chart area.*/ + chartAreaBoundsCalculate? (e: ChartAreaBoundsCalculateEventArgs): void; + + /**Fires after chart is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when chart is destroyed completely.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires before rendering the data labels. This event is triggered for each data label in the series. You can use this event to add custom text in data labels.*/ + displayTextRendering? (e: DisplayTextRenderingEventArgs): void; + + /**Fires during the calculation of legend bounds. You can use this event to customize the bounds of legend.*/ + legendBoundsCalculate? (e: LegendBoundsCalculateEventArgs): void; + + /**Fires on clicking the legend item.*/ + legendItemClick? (e: LegendItemClickEventArgs): void; + + /**Fires when moving mouse over legend item. You can use this event for hit testing on legend items.*/ + legendItemMouseMove? (e: LegendItemMouseMoveEventArgs): void; + + /**Fires before rendering the legend item. This event is fired for each legend item in Chart. You can use this event to customize legend item shape or add custom text to legend item.*/ + legendItemRendering? (e: LegendItemRenderingEventArgs): void; + + /**Fires before loading the chart.*/ + load? (e: LoadEventArgs): void; + + /**Fires on clicking a point in chart. You can use this event to handle clicks made on points.*/ + pointRegionClick? (e: PointRegionClickEventArgs): void; + + /**Fires when mouse is moved over a point.*/ + pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + + /**Fires before rendering chart.*/ + preRender? (e: PreRenderEventArgs): void; + + /**Fires after selecting a series. This event is triggered after selecting a series only if selection mode is series.*/ + seriesRegionClick? (e: SeriesRegionClickEventArgs): void; + + /**Fires before rendering a series. This event is fired for each series in Chart.*/ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /**Fires before rendering the marker symbols. This event is triggered for each marker in Chart.*/ + symbolRendering? (e: SymbolRenderingEventArgs): void; + + /**Fires before rendering the Chart title. You can use this event to add custom text in Chart title.*/ + titleRendering? (e: TitleRenderingEventArgs): void; + + /**Fires before rendering the tooltip. This event is fired when tooltip is enabled and mouse is hovered on a Chart point. You can use this event to customize tooltip before rendering.*/ + toolTipInitialize? (e: ToolTipInitializeEventArgs): void; + + /**Fires before rendering crosshair tooltip in axis. This event is fired for each axis with crosshair label enabled. You can use this event to customize crosshair label before rendering*/ + trackAxisToolTip? (e: TrackAxisToolTipEventArgs): void; + + /**Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. You can use this event to customize the text displayed in trackball tooltip.*/ + trackToolTip? (e: TrackToolTipEventArgs): void; + + /**Fires, on clicking the axis label.*/ + axisLabelClick? (e: AxisLabelClickEventArgs): void; + + /**Fires on moving mouse over the axis label.*/ + axisLabelMouseMove? (e: AxisLabelMouseMoveEventArgs): void; + + /**Fires, on the clicking the chart.*/ + chartClick? (e: ChartClickEventArgs): void; + + /**Fires on moving mouse over the chart.*/ + chartMouseMove? (e: ChartMouseMoveEventArgs): void; + + /**Fires, on double clicking the chart.*/ + chartDoubleClick? (e: ChartDoubleClickEventArgs): void; + + /**Fires on clicking the annotation.*/ + annotationClick? (e: AnnotationClickEventArgs): void; + + /**Fires, after the chart is resized.*/ + afterResize? (e: AfterResizeEventArgs): void; + + /**Fires, when chart size is changing.*/ + beforeResize? (e: BeforeResizeEventArgs): void; + + /**Fires, when error bar is rendering.*/ + errorBarRendering? (e: ErrorBarRenderingEventArgs): void; +} + +export interface AnimationCompleteEventArgs { + + /**Instance of the series that completed has animation. + */ + series?: any; + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesLabelRenderingEventArgs { + + /**Instance of the corresponding axis. + */ + Axis?: any; + + /**Formatted text of the respective label. You can also add custom text to the label. + */ + LabelText?: string; + + /**Actual value of the label. + */ + LabelValue?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesLabelsInitializeEventArgs { + + /**Collection of axes in Chart + */ + dataAxes?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesRangeCalculateEventArgs { + + /**Difference between minimum and maximum value of axis range. + */ + delta?: number; + + /**Interval value of axis range. Grid lines, tick lines and axis labels are drawn based on this interval value. + */ + interval?: number; + + /**Maximum value of axis range. + */ + max?: number; + + /**Minimum value of axis range. + */ + min?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesTitleRenderingEventArgs { + + /**Instance of the axis whose title is being rendered + */ + axes?: any; + + /**X-coordinate of title location + */ + locationX?: number; + + /**Y-coordinate of title location + */ + locationY?: number; + + /**Axis title text. You can add custom text to the title. + */ + title?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface ChartAreaBoundsCalculateEventArgs { + + /**Height of the chart area. + */ + areaBoundsHeight?: number; + + /**Width of the chart area. + */ + areaBoundsWidth?: number; + + /**X-coordinate of the chart area. + */ + areaBoundsX?: number; + + /**Y-coordinate of the chart area. + */ + areaBoundsY?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface DisplayTextRenderingEventArgs { + + /**Text displayed in data label. You can add custom text to the data label + */ + text?: string; + + /**X-coordinate of data label location + */ + locationX?: number; + + /**Y-coordinate of data label location + */ + locationY?: number; + + /**Index of the series in series Collection whose data label is being rendered + */ + seriesIndex?: number; + + /**Index of the point in series whose data label is being rendered + */ + pointIndex?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface LegendBoundsCalculateEventArgs { + + /**Height of the legend. + */ + legendBoundsHeight?: number; + + /**Width of the legend. + */ + legendBoundsWidth?: number; + + /**Number of rows to display the legend items + */ + legendBoundsRows?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface LegendItemClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + LegendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + style?: any; + + /**Instance that holds information about legend bounds and legend item bounds. + */ + Bounds?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; + + /**Instance of the series object corresponding to the legend item + */ + series?: any; +} + +export interface LegendItemMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + LegendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + style?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + Bounds?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; + + /**Instance of the series object corresponding to the legend item + */ + series?: any; +} + +export interface LegendItemRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + legendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc. + */ + style?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; +} + +export interface LoadEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface PointRegionClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of point in pixel + */ + locationX?: number; + + /**Y-coordinate of point in pixel + */ + locationY?: number; + + /**Index of the point in series + */ + pointIndex?: number; + + /**Index of the series in series collection to which the point belongs + */ + seriesIndex?: number; +} + +export interface PointRegionMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of point in pixel + */ + locationX?: number; + + /**Y-coordinate of point in pixel + */ + locationY?: number; + + /**Index of the point in series + */ + pointIndex?: number; + + /**Index of the series in series collection to which the point belongs + */ + seriesIndex?: number; +} + +export interface PreRenderEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface SeriesRegionClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance of the selected series + */ + series?: any; + + /**Index of the selected series + */ + seriesIndex?: number; +} + +export interface SeriesRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance of the series which is about to get rendered + */ + series?: any; +} + +export interface SymbolRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance that holds the location of marker symbol + */ + location?: any; + + /**Options to customize the marker style such as color, border and size + */ + style?: any; +} + +export interface TitleRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Option to customize the title location in pixels + */ + location?: any; + + /**Read-only option to find the size of the title + */ + size?: any; + + /**Use this option to add custom text in title + */ + title?: string; +} + +export interface ToolTipInitializeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Text to be displayed in tooltip. Set this option to customize the text displayed in tooltip + */ + currentText?: string; + + /**Index of the point on which mouse is hovered + */ + pointIndex?: number; + + /**Index of the series in series collection whose point is hovered by mouse + */ + seriesIndex?: number; +} + +export interface TrackAxisToolTipEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Location of the crosshair label in pixels + */ + location?: any; + + /**Index of the axis for which crosshair label is displayed + */ + axisIndex?: number; + + /**Instance of the chart axis object for which cross hair label is displayed + */ + crossAxis?: number; + + /**Text to be displayed in crosshair label. Use this option to add custom text in crosshair label + */ + currentTrackText?: string; +} + +export interface TrackToolTipEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Location of the trackball tooltip in pixels + */ + location?: any; + + /**Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; + + /**Index of the series in series collection + */ + seriesIndex?: number; + + /**Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; + + /**Instance of the series object for which trackball tooltip is displayed. + */ + series?: any; +} + +export interface AxisLabelClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the labels in chart area. + */ + location?: any; + + /**Index of the label. + */ + index?: number; + + /**Instance of the corresponding axis. + */ + axis?: any; + + /**Label that is clicked. + */ + text?: string; +} + +export interface AxisLabelMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the labels in chart area. + */ + location?: any; + + /**Index of the label. + */ + index?: number; + + /**Instance of the corresponding axis. + */ + axis?: any; + + /**Label that is hovered. + */ + text?: string; +} + +export interface ChartClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface ChartMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface ChartDoubleClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface AnnotationClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the annotation in chart area. + */ + location?: any; + + /**Information about the annotation, like Coordinate unit, Region, content + */ + contentData?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface AfterResizeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Chart width, after resize + */ + width?: number; + + /**Chart height, after resize + */ + height?: number; + + /**Chart width, before resize + */ + prevWidth?: number; + + /**Chart height, before resize + */ + prevHeight?: number; + + /**Chart width, when the chart was first rendered + */ + originalWidth?: number; + + /**Chart height, when the chart was first rendered + */ + originalHeight?: number; +} + +export interface BeforeResizeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Chart width, before resize + */ + currentWidth?: number; + + /**Chart height, before resize + */ + currentHeight?: number; + + /**Chart width, after resize + */ + newWidth?: number; + + /**Chart height, after resize + */ + newHeight?: number; +} + +export interface ErrorBarRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Error bar Object + */ + errorbar?: any; +} + +export interface AnnotationsMargin { + + /**Annotation is placed at the specified value above its original position. + * @Default {0} + */ + bottom?: number; + + /**Annotation is placed at the specified value from left side of its original position. + * @Default {0} + */ + left?: number; + + /**Annotation is placed at the specified value from the right side of its original position. + * @Default {0} + */ + right?: number; + + /**Annotation is placed at the specified value under its original position. + * @Default {0} + */ + top?: number; +} + +export interface Annotations { + + /**Angle to rotate the annotation in degrees. + * @Default {'0'} + */ + angle?: number; + + /**Text content or id of a HTML element to be displayed as annotation. + */ + content?: string; + + /**Specifies how annotations have to be placed in Chart. + * @Default {none. See CoordinateUnit} + */ + coordinateUnit?: ej.datavisualization.Chart.CoordinateUnit|string; + + /**Specifies the horizontal alignment of the annotation. + * @Default {middle. See HorizontalAlignment} + */ + horizontalAlignment?: ej.datavisualization.Chart.HorizontalAlignment|string; + + /**Options to customize the margin of annotation. + */ + margin?: AnnotationsMargin; + + /**Controls the opacity of the annotation. + * @Default {1} + */ + opacity?: number; + + /**Specifies whether annotation has to be placed with respect to chart or series. + * @Default {chart. See Region} + */ + region?: ej.datavisualization.Chart.Region|string; + + /**Specifies the vertical alignment of the annotation. + * @Default {middle. See VerticalAlignment} + */ + verticalAlignment?: ej.datavisualization.Chart.VerticalAlignment|string; + + /**Controls the visibility of the annotation. + * @Default {false} + */ + visible?: boolean; + + /**Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property or primary X axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + x?: number; + + /**Name of the horizontal axis to be used for positioning the annotation. This property is applicable only when coordinateUnit is points. + */ + xAxisName?: string; + + /**Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with yAxisName property or primary Y axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + y?: number; + + /**Name of the vertical axis to be used for positioning the annotation.This property is applicable only when coordinateUnit is points. + */ + yAxisName?: string; +} + +export interface Border { + + /**Border color of the chart. + * @Default {null} + */ + color?: string; + + /**Opacity of the chart border. + * @Default {0.3} + */ + opacity?: number; + + /**Width of the Chart border. + * @Default {0} + */ + width?: number; +} + +export interface ChartAreaBorder { + + /**Border color of the plot area. + * @Default {Gray} + */ + color?: string; + + /**Opacity of the plot area border. + * @Default {0.3} + */ + opacity?: number; + + /**Border width of the plot area. + * @Default {0.5} + */ + width?: number; +} + +export interface ChartArea { + + /**Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /**Options for customizing the border of the plot area. + */ + border?: ChartAreaBorder; +} + +export interface ColumnDefinitions { + + /**Specifies the unit to measure the width of the column in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /**Width of the column in plotting area. Width is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + columnWidth?: number; + + /**Color of the line that indicates the starting point of the column in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /**Width of the line that indicates the starting point of the column in plot area. + * @Default {1} + */ + lineWidth?: number; +} + +export interface CommonSeriesOptionsBorder { + + /**Border color of all series. + * @Default {transparent} + */ + color?: string; + + /**DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; + + /**Border width of all series. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsFont { + + /**Font color of the text in all series. + * @Default {#707070} + */ + color?: string; + + /**Font Family for all the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the font Style for all the series. + * @Default {normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Specifies the font weight for all the series. + * @Default {regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity for text in all the series. + * @Default {1} + */ + opacity?: number; + + /**Font size for text in all the series. + * @Default {12px} + */ + size?: string; +} + +export interface CommonSeriesOptionsMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface CommonSeriesOptionsMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: CommonSeriesOptionsMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: CommonSeriesOptionsMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: CommonSeriesOptionsMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: CommonSeriesOptionsMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {none. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Name of a field in data source, where datalabel text is displayed. + */ + textMappingName?: string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {center} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: CommonSeriesOptionsMarkerBorder; + + /**Options for displaying and customizing data labels. + */ + dataLabel?: CommonSeriesOptionsMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: CommonSeriesOptionsMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsTooltipBorder { + + /**Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /**Border width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsTooltip { + + /**Options for customizing the border of the tooltip. + */ + border?: CommonSeriesOptionsTooltipBorder; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /**Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the animation of the tooltip when moving from one point to other. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /**Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Opacity of the tooltip. + * @Default {0.5} + */ + opacity?: number; + + /**Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /**Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsEmptyPointSettingsStyleBorder { + + /**Border color of the empty point. + */ + color?: string; + + /**Border width of the empty point. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsEmptyPointSettingsStyle { + + /**Color of the empty point. + */ + color?: string; + + /**Options for customizing border of the empty point in the series. + */ + border?: CommonSeriesOptionsEmptyPointSettingsStyleBorder; +} + +export interface CommonSeriesOptionsEmptyPointSettings { + + /**Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /**Options for customizing the color and border of the empty point in the series. + */ + style?: CommonSeriesOptionsEmptyPointSettingsStyle; +} + +export interface CommonSeriesOptionsConnectorLine { + + /**Width of the connector line. + * @Default {1} + */ + width?: number; + + /**Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /**DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /**DashArray of the connector line. + * @Default {1} + */ + opacity?: number; +} + +export interface CommonSeriesOptionsErrorBarCap { + + /**Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /**Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /**Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /**Color of the error bar cap. + * @Default {“#000000”} + */ + fill?: string; +} + +export interface CommonSeriesOptionsErrorBar { + + /**Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /**Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /**Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /**Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /**Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /**Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /**Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /**Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /**Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /**Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /**Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /**Width of the error bar. + * @Default {1} + */ + width?: number; + + /**Options for customizing the error bar cap. + */ + cap?: CommonSeriesOptionsErrorBarCap; +} + +export interface CommonSeriesOptionsTrendlines { + + /**Show/hides the trendline. + */ + visibility?: boolean; + + /**Specifies the type of the trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /**Name for the trendlines that is to be displayed in the legend text. + * @Default {trendline} + */ + name?: string; + + /**Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /**Width of the trendlines. + * @Default {1} + */ + width?: number; + + /**Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /**Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /**Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /**Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /**Specifies the order of the polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /**Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; +} + +export interface CommonSeriesOptionsHighlightSettingsBorder { + + /**Border color of the series/point on highlight. + */ + color?: string; + + /**Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; +} + +export interface CommonSeriesOptionsHighlightSettings { + + /**Enables/disables the ability to highlight the series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether the series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on highlight. + */ + color?: string; + + /**Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on highlight. + */ + border?: CommonSeriesOptionsHighlightSettingsBorder; + + /**Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on highlight. + */ + customPattern?: string; +} + +export interface CommonSeriesOptionsSelectionSettingsBorder { + + /**Border color of the series/point on selection. + */ + color?: string; + + /**Border width of the series/point on selection. + * @Default {2} + */ + width?: string; +} + +export interface CommonSeriesOptionsSelectionSettings { + + /**Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /**Specifies whether the series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on selection. + */ + color?: string; + + /**Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of the series on selection. + */ + border?: CommonSeriesOptionsSelectionSettingsBorder; + + /**Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on selection. + */ + customPattern?: string; +} + +export interface CommonSeriesOptions { + + /**Options to customize the border of all the series. + */ + border?: CommonSeriesOptionsBorder; + + /**Pattern of dashes and gaps used to stroke all the line type series. + */ + dashArray?: string; + + /**Set the dataSource for all series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Controls the size of the hole in doughnut series. Value ranges from 0 to 1 + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /**Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /**Specifies the type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: ej.datavisualization.Chart.DrawType|string; + + /**Enable/disable the animation for all the series. + * @Default {true} + */ + enableAnimation?: boolean; + + /**To avoid overlapping of data labels smartly. + * @Default {true} + */ + enableSmartLabels?: boolean; + + /**Start angle of pie/doughnut series. + * @Default {null} + */ + endAngle?: number; + + /**Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /**Explodes all the slice of pie/doughnut on render. + * @Default {false} + */ + explodeAll?: boolean; + + /**Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /**Specifies the distance of the slice from the center, when it is exploded. + * @Default {0.4} + */ + explodeOffset?: number; + + /**Fill color for all the series. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the font of all the series. + */ + font?: CommonSeriesOptionsFont; + + /**Sets the height of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /**Sets the width of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /**Gap between the slices in pyramid and funnel series. + * @Default {0} + */ + gapRatio?: number; + + /**Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /**Specifies whether to stack the column series in polar/radar charts. + * @Default {false} + */ + isStacking?: boolean; + + /**Renders the chart vertically. This is applicable only for cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /**Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Specifies the line cap of the series. + * @Default {butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /**Specifies the type of shape to be used where two lines meet. + * @Default {round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /**Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: CommonSeriesOptionsMarker; + + /**Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /**Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /**Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /**Specifies the mode of the pyramid series. + * @Default {linear. See PyramidMode} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /**Start angle from where the pie/doughnut series renders. By default it starts from 0. + * @Default {null} + */ + startAngle?: number; + + /**Options for customizing the tooltip of chart. + */ + tooltip?: CommonSeriesOptionsTooltip; + + /**Specifies the type of the series to render in chart. + * @Default {column. See Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /**Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /**Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /**Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /**Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /**Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /**Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /**Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /**Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /**Options for customizing the empty point in the series. + */ + emptyPointSettings?: CommonSeriesOptionsEmptyPointSettings; + + /**Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /**Options for customizing the waterfall connector line. + */ + connectorLine?: CommonSeriesOptionsConnectorLine; + + /**Options to customize the error bar in series. + */ + errorBar?: CommonSeriesOptionsErrorBar; + + /**Option to add the trendlines to chart. + */ + trendlines?: Array; + + /**Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: CommonSeriesOptionsHighlightSettings; + + /**Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: CommonSeriesOptionsSelectionSettings; +} + +export interface CrosshairMarkerBorder { + + /**Border width of the marker. + * @Default {3} + */ + width?: number; +} + +export interface CrosshairMarkerSize { + + /**Height of the marker. + * @Default {10} + */ + height?: number; + + /**Width of the marker. + * @Default {10} + */ + width?: number; +} + +export interface CrosshairMarker { + + /**Options for customizing the border. + */ + border?: CrosshairMarkerBorder; + + /**Opacity of the marker. + * @Default {true} + */ + opacity?: boolean; + + /**Options for customizing the size of the marker. + */ + size?: CrosshairMarkerSize; + + /**Show/hides the marker. + * @Default {true} + */ + visible?: boolean; +} + +export interface Crosshair { + + /**Options for customizing the marker in crosshair. + */ + marker?: CrosshairMarker; + + /**Specifies the type of the crosshair. It can be trackball or crosshair + * @Default {crosshair. See CrosshairType} + */ + type?: ej.datavisualization.Chart.CrosshairType|string; + + /**Show/hides the crosshair/trackball visibility. + * @Default {false} + */ + visible?: boolean; +} + +export interface IndicatorsHistogramBorder { + + /**Color of the histogram border in MACD indicator. + * @Default {#9999ff} + */ + color?: string; + + /**Controls the width of histogram border line in MACD indicator. + * @Default {1} + */ + width?: number; +} + +export interface IndicatorsHistogram { + + /**Options to customize the histogram border in MACD indicator. + */ + border?: IndicatorsHistogramBorder; + + /**Color of histogram columns in MACD indicator. + * @Default {#ccccff} + */ + fill?: string; + + /**Opacity of histogram columns in MACD indicator. + * @Default {1} + */ + opacity?: number; +} + +export interface IndicatorsLowerLine { + + /**Color of lower line. + * @Default {#008000} + */ + fill?: string; + + /**Width of the lower line. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsMacdLine { + + /**Color of MACD line. + * @Default {#ff9933} + */ + fill?: string; + + /**Width of the MACD line. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsPeriodLine { + + /**Color of period line in indicator. + * @Default {blue} + */ + fill?: string; + + /**Width of the period line in indicators. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsTooltipBorder { + + /**Border color of indicator tooltip. + * @Default {null} + */ + color?: string; + + /**Border width of indicator tooltip. + * @Default {1} + */ + width?: number; +} + +export interface IndicatorsTooltip { + + /**Option to customize the border of indicator tooltip. + */ + border?: IndicatorsTooltipBorder; + + /**Specifies the animation duration of indicator tooltip. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the tooltip animation. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Background color of indicator tooltip. + * @Default {null} + */ + fill?: string; + + /**Opacity of indicator tooltip. + * @Default {0.95} + */ + opacity?: number; + + /**Controls the visibility of indicator tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface IndicatorsUpperLine { + + /**Fill color of the upper line in indicators + * @Default {#ff9933} + */ + fill?: string; + + /**Width of the upper line in indicators. + * @Default {2} + */ + width?: number; +} + +export interface Indicators { + + /**The dPeriod value for stochastic indicator. + * @Default {3} + */ + dPeriod?: number; + + /**Enables/disables the animation. + * @Default {false} + */ + enableAnimation?: boolean; + + /**Color of the technical indicator. + * @Default {#00008B} + */ + fill?: string; + + /**Options to customize the histogram in MACD indicator. + */ + histogram?: IndicatorsHistogram; + + /**Specifies the k period in stochastic indicator. + * @Default {3} + */ + kPeriod?: number; + + /**Specifies the long period in MACD indicator. + * @Default {26} + */ + longPeriod?: number; + + /**Options to customize the lower line in indicators. + */ + lowerLine?: IndicatorsLowerLine; + + /**Options to customize the MACD line. + */ + macdLine?: IndicatorsMacdLine; + + /**Specifies the type of the MACD indicator. + * @Default {line. See MACDType} + */ + macdType?: string; + + /**Specifies period value in indicator. + * @Default {14} + */ + period?: number; + + /**Options to customize the period line in indicators. + */ + periodLine?: IndicatorsPeriodLine; + + /**Name of the series for which indicator has to be drawn. + */ + seriesName?: string; + + /**Specifies the short period in MACD indicator. + * @Default {13} + */ + shortPeriod?: number; + + /**Specifies the standard deviation value for Bollinger band indicator. + * @Default {2} + */ + standardDeviations?: number; + + /**Options to customize the tooltip. + */ + tooltip?: IndicatorsTooltip; + + /**Trigger value of MACD indicator. + * @Default {9} + */ + trigger?: number; + + /**Specifies the visibility of indicator. + * @Default {visible} + */ + visibility?: string; + + /**Specifies the type of indicator that has to be rendered. + * @Default {sma. See IndicatorsType} + */ + type?: string; + + /**Options to customize the upper line in indicators + */ + upperLine?: IndicatorsUpperLine; + + /**Width of the indicator line. + * @Default {2} + */ + width?: number; + + /**Name of the horizontal axis used for indicator. Primary X axis is used when x axis name is not specified. + */ + xAxisName?: string; + + /**Name of the vertical axis used for indicator. Primary Y axis is used when y axis name is not specified + */ + yAxisName?: string; +} + +export interface LegendBorder { + + /**Border color of the legend. + * @Default {transparent} + */ + color?: string; + + /**Border width of the legend. + * @Default {1} + */ + width?: number; +} + +export interface LegendFont { + + /**Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Font size for legend item text. + * @Default {12px} + */ + size?: string; +} + +export interface LegendItemStyleBorder { + + /**Border color of the legend items. + * @Default {transparent} + */ + color?: string; + + /**Border width of the legend items. + * @Default {1} + */ + width?: number; +} + +export interface LegendItemStyle { + + /**Options for customizing the border of legend items. + */ + border?: LegendItemStyleBorder; + + /**Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /**Width of the shape in legend items. + * @Default {10} + */ + width?: number; +} + +export interface LegendLocation { + + /**X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /**Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; +} + +export interface LegendSize { + + /**Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /**Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; +} + +export interface LegendTitleFont { + + /**Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Font size for legend title. + * @Default {12px} + */ + size?: string; +} + +export interface LegendTitle { + + /**Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /**Text to be displayed in legend title. + */ + text?: string; + + /**Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Legend { + + /**Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.Alignment|string; + + /**Background for the legend. Use this property to add a background image or background color for the legend. + */ + background?: string; + + /**Options for customizing the legend border. + */ + border?: LegendBorder; + + /**Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /**Controls whether legend has to use scrollbar or not. When enabled, scroll bar appears depending upon size and position properties of legend. + * @Default {true} + */ + enableScrollbar?: boolean; + + /**Fill color for the legend items. By using this property, it displays all legend item shapes in same color.Legend items representing invisible series is displayed in gray color. + * @Default {null} + */ + fill?: string; + + /**Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /**Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /**Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /**Options to customize the location of chart legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /**Opacity of the legend. + * @Default {1} + */ + opacity?: number; + + /**Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Chart.Position|string; + + /**Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /**Shape of the legend items. Default shape for pie and doughnut series is circle and all other series uses rectangle. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options to customize the size of the legend. + */ + size?: LegendSize; + + /**Options to customize the legend title. + */ + title?: LegendTitle; + + /**Specifies the action taken when the legend width is more than the textWidth. + * @Default {none. See textOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /**Text width for legend item. + * @Default {34} + */ + textWidth?: number; + + /**Controls the visibility of the legend. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryXAxisAlternateGridBandEven { + + /**Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryXAxisAlternateGridBandOdd { + + /**Fill color of the odd grid bands + * @Default {transparent} + */ + fill?: string; + + /**Opacity of odd grid band + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryXAxisAlternateGridBand { + + /**Options for customizing even grid band. + */ + even?: PrimaryXAxisAlternateGridBandEven; + + /**Options for customizing odd grid band. + */ + odd?: PrimaryXAxisAlternateGridBandOdd; +} + +export interface PrimaryXAxisAxisLine { + + /**Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /**Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /**Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /**Width of axis line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisCrosshairLabel { + + /**Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; +} + +export interface PrimaryXAxisFont { + + /**Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis labels. + * @Default {13px} + */ + size?: string; +} + +export interface PrimaryXAxisMajorGridLines { + + /**Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /**Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major grid lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMajorTickLines { + + /**Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major tick lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMinorGridLines { + + /**Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minorGridLines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMinorTickLines { + + /**Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minor tick line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisRange { + + /**Minimum value of the axis range. + * @Default {null} + */ + minimum?: number; + + /**Maximum value of the axis range. + * @Default {null} + */ + maximum?: number; + + /**Interval of the axis range. + * @Default {null} + */ + interval?: number; +} + +export interface PrimaryXAxisStripLineFont { + + /**Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /**Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /**Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the strip line text. + * @Default {12px} + */ + size?: string; +} + +export interface PrimaryXAxisStripLine { + + /**Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /**Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /**End value of the strip line. + * @Default {null} + */ + end?: number; + + /**Options for customizing the font of the text. + */ + font?: PrimaryXAxisStripLineFont; + + /**Start value of the strip line. + * @Default {null} + */ + start?: number; + + /**Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /**Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /**Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /**Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /**Width of the strip line. + * @Default {0} + */ + width?: number; + + /**Specifies the order where the strip line and the series have to be rendered. When zOrder is “behind”, strip line is rendered under the series and when it is “over”, it is rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; +} + +export interface PrimaryXAxisTitleFont { + + /**Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis title. + * @Default {16px} + */ + size?: string; +} + +export interface PrimaryXAxisTitle { + + /**Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the title font. + */ + font?: PrimaryXAxisTitleFont; + + /**Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {34} + */ + maximumTitleWidth?: number; + + /**Title for the axis. + */ + text?: string; + + /**Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryXAxis { + + /**Options for customizing horizontal axis alternate grid band. + */ + alternateGridBand?: PrimaryXAxisAlternateGridBand; + + /**Options for customizing the axis line. + */ + axisLine?: PrimaryXAxisAxisLine; + + /**Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. + * @Default {null} + */ + columnIndex?: number; + + /**Specifies the number of columns or plot areas an axis has to span horizontally. + * @Default {null} + */ + columnSpan?: number; + + /**Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryXAxisCrosshairLabel; + + /**With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /**Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /**Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the font of the axis Labels. + */ + font?: PrimaryXAxisFont; + + /**Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /**Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /**Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /**Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /**Specifies the position of the axis labels. + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Angle in degrees to rotate the axis labels. + * @Default {null} + */ + labelRotation?: number; + + /**Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /**Options for customizing major gird lines. + */ + majorGridLines?: PrimaryXAxisMajorGridLines; + + /**Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryXAxisMajorTickLines; + + /**Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /**Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {34} + */ + maximumLabelWidth?: number; + + /**Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryXAxisMinorGridLines; + + /**Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryXAxisMinorTickLines; + + /**Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /**Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /**Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /**Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /**Options to customize the range of the axis. + */ + range?: PrimaryXAxisRange; + + /**Specifies the padding for the axis range. + * @Default {None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /**Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /**Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: Array; + + /**Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /**Options for customizing the axis title. + */ + title?: PrimaryXAxisTitle; + + /**Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /**Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /**The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /**Position of the zoomed axis. Value ranges from 0 to 1. + * @Default {0} + */ + zoomPosition?: number; +} + +export interface PrimaryYAxisAlternateGridBandEven { + + /**Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryYAxisAlternateGridBandOdd { + + /**Fill color of the odd grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of odd grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryYAxisAlternateGridBand { + + /**Options for customizing even grid band. + */ + even?: PrimaryYAxisAlternateGridBandEven; + + /**Options for customizing odd grid band. + */ + odd?: PrimaryYAxisAlternateGridBandOdd; +} + +export interface PrimaryYAxisAxisLine { + + /**Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /**Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /**Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /**Width of axis line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisCrosshairLabel { + + /**Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; +} + +export interface PrimaryYAxisFont { + + /**Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis labels. + * @Default {13px} + */ + size?: string; +} + +export interface PrimaryYAxisMajorGridLines { + + /**Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /**Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major grid lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMajorTickLines { + + /**Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major tick lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMinorGridLines { + + /**Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minorGridLines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMinorTickLines { + + /**Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minor tick line + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisStripLineFont { + + /**Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /**Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /**Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the strip line text. + * @Default {12px} + */ + size?: string; +} + +export interface PrimaryYAxisStripLine { + + /**Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /**Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /**End value of the strip line. + * @Default {null} + */ + end?: number; + + /**Options for customizing the font of the text. + */ + font?: PrimaryYAxisStripLineFont; + + /**Start value of the strip line. + * @Default {null} + */ + start?: number; + + /**Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /**Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /**Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /**Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /**Width of the strip line. + * @Default {0} + */ + width?: number; + + /**Specifies the order in which strip line and the series have to be rendered. When zOrder is “behind”, strip line is rendered below the series and when it is “over”, it is rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; +} + +export interface PrimaryYAxisTitleFont { + + /**Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis title. + * @Default {16px} + */ + size?: string; +} + +export interface PrimaryYAxisTitle { + + /**Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {ej.datavisualization.Chart.enableTrim} + */ + enableTrim?: boolean; + + /**Options for customizing the title font. + */ + font?: PrimaryYAxisTitleFont; + + /**Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {ej.datavisualization.Chart.maximumTitleWidth.null} + */ + maximumTitleWidth?: number; + + /**Title for the axis. + */ + text?: string; + + /**Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryYAxis { + + /**Options for customizing vertical axis alternate grid band. + */ + alternateGridBand?: PrimaryYAxisAlternateGridBand; + + /**Options for customizing the axis line. + */ + axisLine?: PrimaryYAxisAxisLine; + + /**Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryYAxisCrosshairLabel; + + /**With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /**Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /**Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the font of the axis Labels. + */ + font?: PrimaryYAxisFont; + + /**Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /**Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /**Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /**Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /**Default Value + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /**Options for customizing major gird lines. + */ + majorGridLines?: PrimaryYAxisMajorGridLines; + + /**Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryYAxisMajorTickLines; + + /**Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /**Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {ej.datavisualization.Chart.maximumLabelWidth type {int}} + */ + maximumLabelWidth?: number; + + /**Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryYAxisMinorGridLines; + + /**Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryYAxisMinorTickLines; + + /**Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /**Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /**Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /**Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /**Specifies the padding for the axis range. + * @Default {ej.datavisualization.Chart.RangePadding.None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /**Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /**Specifies the index of the row to which the axis is associated, when the chart area is divided into multiple plot areas by using rowDefinitions. + * @Default {null} + */ + rowIndex?: number; + + /**Specifies the number of row or plot areas an axis has to span vertically. + * @Default {null} + */ + rowSpan?: number; + + /**Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: Array; + + /**Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /**Options for customizing the axis title. + */ + title?: PrimaryYAxisTitle; + + /**Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /**Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /**The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Values ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /**Position of the zoomed axis. Value ranges from 0 to 1 + * @Default {0} + */ + zoomPosition?: number; +} + +export interface RowDefinitions { + + /**Specifies the unit to measure the height of the row in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /**Height of the row in plotting area. Height is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + rowHeight?: number; + + /**Color of the line that indicates the starting point of the row in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /**Width of the line that indicates the starting point of the row in plot area. + * @Default {1} + */ + lineWidth?: number; +} + +export interface SeriesBorder { + + /**Border color of the series. + * @Default {transparent} + */ + color?: string; + + /**Border width of the series. + * @Default {1} + */ + width?: number; + + /**DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; +} + +export interface SeriesFont { + + /**Font color of the series text. + * @Default {#707070} + */ + color?: string; + + /**Font Family of the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font Style of the series. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the series. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of series text. + * @Default {1} + */ + opacity?: number; + + /**Size of the series text. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface SeriesMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: SeriesMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: SeriesMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Name of a field in data source where datalabel text is displayed. + */ + textMappingName?: string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /**Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /**Moves the label vertically by some offset. + * @Default {0} + */ + offset?: number; +} + +export interface SeriesMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface SeriesMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: SeriesMarkerBorder; + + /**Options for displaying and customizing data labels. + */ + dataLabel?: SeriesMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: SeriesMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesEmptyPointSettingsStyleBorder { + + /**Border color of the empty point. + */ + color?: string; + + /**Border width of the empty point. + * @Default {1} + */ + width?: number; +} + +export interface SeriesEmptyPointSettingsStyle { + + /**Color of the empty point. + */ + color?: string; + + /**Options for customizing border of the empty point in the series. + */ + border?: SeriesEmptyPointSettingsStyleBorder; +} + +export interface SeriesEmptyPointSettings { + + /**Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /**Options for customizing the color and border of the empty point in the series. + */ + style?: SeriesEmptyPointSettingsStyle; +} + +export interface SeriesConnectorLine { + + /**Width of the connector line. + * @Default {1} + */ + width?: number; + + /**Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /**DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /**DashArray of the connector line. + * @Default {1} + */ + opacity?: number; +} + +export interface SeriesErrorBarCap { + + /**Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /**Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /**Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /**Color of the error bar cap. + * @Default {#000000} + */ + fill?: string; +} + +export interface SeriesErrorBar { + + /**Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /**Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /**Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /**Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /**Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /**Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /**Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /**Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /**Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /**Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /**Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /**Width of the error bar. + * @Default {1} + */ + width?: number; + + /**Options for customizing the error bar cap. + */ + cap?: SeriesErrorBarCap; +} + +export interface SeriesPointsBorder { + + /**Border color of the point. + * @Default {null} + */ + color?: string; + + /**Border width of the point. + * @Default {null} + */ + width?: number; +} + +export interface SeriesPointsMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesPointsMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface SeriesPointsMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: SeriesPointsMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesPointsMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: SeriesPointsMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesPointsMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /**Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /**Moves the label vertically by specified offset. + * @Default {0} + */ + offset?: number; +} + +export interface SeriesPointsMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface SeriesPointsMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: SeriesPointsMarkerBorder; + + /**Options for displaying and customizing data label. + */ + dataLabel?: SeriesPointsMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: SeriesPointsMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesPoints { + + /**Options for customizing the border of a point. This is applicable only for column type series and accumulation type series. + */ + border?: SeriesPointsBorder; + + /**To show/hide the intermediate summary from the last intermediate point. + * @Default {false} + */ + showIntermediateSum?: boolean; + + /**To show/hide the total summary of the waterfall series. + * @Default {false} + */ + showTotalSum?: boolean; + + /**Close value of the point. Close value is applicable only for financial type series. + * @Default {null} + */ + close?: number; + + /**Size of a bubble in the bubble series. This is applicable only for the bubble series. + * @Default {null} + */ + size?: number; + + /**Background color of the point. This is applicable only for column type series and accumulation type series. + * @Default {null} + */ + fill?: string; + + /**High value of the point. High value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + high?: number; + + /**Low value of the point. Low value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + low?: number; + + /**Options for displaying and customizing marker for a data point. Marker contains shapes and/or data labels. + */ + marker?: SeriesPointsMarker; + + /**Open value of the point. This is applicable only for financial type series. + * @Default {null} + */ + open?: number; + + /**Datalabel text for the point. + * @Default {null} + */ + text?: string; + + /**X value of the point. + * @Default {null} + */ + x?: number; + + /**Y value of the point. + * @Default {null} + */ + y?: number; +} + +export interface SeriesTooltipBorder { + + /**Border Color of the tooltip. + * @Default {null} + */ + color?: string; + + /**Border Width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface SeriesTooltip { + + /**Options for customizing the border of the tooltip. + */ + border?: SeriesTooltipBorder; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /**Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the animation of the tooltip when moving from one point to another. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /**Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Opacity of the tooltip. + * @Default {0.95} + */ + opacity?: number; + + /**Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /**Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesTrendlines { + + /**Show/hides the trendline. + */ + visibility?: boolean; + + /**Specifies the type of trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /**Name for the trendlines that is to be displayed in legend text. + * @Default {Trendline} + */ + name?: string; + + /**Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /**Width of the trendlines. + * @Default {1} + */ + width?: number; + + /**Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /**Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /**Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /**Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /**Specifies the order of polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /**Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; +} + +export interface SeriesHighlightSettingsBorder { + + /**Border color of the series/point on highlight. + */ + color?: string; + + /**Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; +} + +export interface SeriesHighlightSettings { + + /**Enables/disables the ability to highlight series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on highlight. + */ + color?: string; + + /**Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on highlight. + */ + border?: SeriesHighlightSettingsBorder; + + /**Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on highlight. + */ + customPattern?: string; +} + +export interface SeriesSelectionSettingsBorder { + + /**Border color of the series/point on selection. + */ + color?: string; + + /**Border width of the series/point on selection. + * @Default {2} + */ + width?: string; +} + +export interface SeriesSelectionSettings { + + /**Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /**Color of the series/point on selection. + */ + color?: string; + + /**Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on selection. + */ + border?: SeriesSelectionSettingsBorder; + + /**Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on selection. + */ + customPattern?: string; +} + +export interface Series { + + /**Color of the point, where the close is up in financial chart. + * @Default {null} + */ + bearFillColor?: string; + + /**Options for customizing the border of the series. + */ + border?: SeriesBorder; + + /**Color of the point, where the close is down in financial chart. + * @Default {null} + */ + bullFillColor?: string; + + /**Pattern of dashes and gaps used to stroke the line type series. + */ + dashArray?: string; + + /**Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Controls the size of the hole in doughnut series. Value ranges from 0 to 1. + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /**Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /**Type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: boolean; + + /**Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /**To avoid overlapping of data labels smartly. + * @Default {null} + */ + enableSmartLabels?: number; + + /**End angle of pie/doughnut series. For a complete circle, it has to be 360, by default. + * @Default {null} + */ + endAngle?: number; + + /**Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /**Explodes all the slice of pie/doughnut on render. + * @Default {null} + */ + explodeAll?: boolean; + + /**Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /**Specifies the distance of the slice from the center, when it is exploded. + * @Default {25} + */ + explodeOffset?: number; + + /**Fill color of the series. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the series font. + */ + font?: SeriesFont; + + /**Specifies the height of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /**Specifies the width of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /**Gap between the slices of pyramid/funnel series. + * @Default {0} + */ + gapRatio?: number; + + /**Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /**Specifies whether to stack the column series in polar/radar charts. + * @Default {true} + */ + isStacking?: boolean; + + /**Renders the chart vertically. This is applicable only for cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /**Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Specifies the line cap of the series. + * @Default {Butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /**Specifies the type of shape to be used where two lines meet. + * @Default {Round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /**Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: SeriesMarker; + + /**Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /**Name of a field in data source where fill color for all the data points is generated. + */ + palette?: string; + + /**Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /**Options for customizing the empty point in the series. + */ + emptyPointSettings?: SeriesEmptyPointSettings; + + /**Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /**Options for customizing the waterfall connector line. + */ + connectorLine?: SeriesConnectorLine; + + /**Options to customize the error bar in series. + */ + errorBar?: SeriesErrorBar; + + /**Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. + */ + points?: Array; + + /**Specifies the mode of the pyramid series. + * @Default {linear} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /**Specifies ej.Query to select data from dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /**Start angle from where the pie/doughnut series renders. It starts from 0, by default. + * @Default {null} + */ + startAngle?: number; + + /**Options for customizing the tooltip of chart. + */ + tooltip?: SeriesTooltip; + + /**Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Controls the visibility of the series. + * @Default {visible} + */ + visibility?: string; + + /**Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /**Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /**Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /**Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /**Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /**Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /**Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /**Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /**Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /**Option to add trendlines to chart. + */ + trendlines?: Array; + + /**Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: SeriesHighlightSettings; + + /**Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: SeriesSelectionSettings; +} + +export interface Size { + + /**Height of the Chart. Height can be specified in either pixel or percentage. + * @Default {'450'} + */ + height?: string; + + /**Width of the Chart. Width can be specified in either pixel or percentage. + * @Default {'450'} + */ + width?: string; +} + +export interface TitleBorder { + + /**Width of the title border. + * @Default {1} + */ + width?: number; + + /**color of the title border. + * @Default {transparent} + */ + color?: string; + + /**opacity of the title border. + * @Default {0.8} + */ + opacity?: number; + + /**opacity of the title border. + * @Default {0.8} + */ + cornerRadius?: number; +} + +export interface TitleFont { + + /**Font family for Chart title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for Chart title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for Chart title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the Chart title. + * @Default {0.5} + */ + opacity?: number; + + /**Font size for Chart title. + * @Default {20px} + */ + size?: string; +} + +export interface TitleSubTitleFont { + + /**Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /**Font size for sub title. + * @Default {12px} + */ + size?: string; +} + +export interface TitleSubTitleBorder { + + /**Width of the subtitle border. + * @Default {1} + */ + width?: number; + + /**color of the subtitle border. + * @Default {transparent} + */ + color?: string; + + /**opacity of the subtitle border. + * @Default {0.8} + */ + opacity?: number; + + /**opacity of the subtitle border. + * @Default {0.8} + */ + cornerRadius?: number; +} + +export interface TitleSubTitle { + + /**Options for customizing the font of sub title. + */ + font?: TitleSubTitleFont; + + /**Background color for the chart subtitle. + * @Default {transparent} + */ + background?: string; + + /**Options to customize the border of the title. + */ + border?: TitleSubTitleBorder; + + /**Text to be displayed in sub title. + */ + text?: string; + + /**Alignment of sub title text. + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Title { + + /**Background color for the chart title. + * @Default {transparent} + */ + background?: string; + + /**Options to customize the border of the title. + */ + border?: TitleBorder; + + /**Options for customizing the font of Chart title. + */ + font?: TitleFont; + + /**Options to customize the sub title of Chart. + */ + subTitle?: TitleSubTitle; + + /**Text to be displayed in Chart title. + */ + text?: string; + + /**Alignment of the title text. + * @Default {Center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Zooming { + + /**Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /**Enable or disables the differed zooming. When it is enabled, chart is updated only on mouse up action while zooming and panning. + * @Default {false} + */ + enableDeferredZoom?: boolean; + + /**Enables/disables the ability to zoom the chart on moving the mouse wheel. + * @Default {false} + */ + enableMouseWheel?: boolean; + + /**Specifies whether to allow zooming the chart vertically or horizontally or in both ways. + * @Default {'x,y'} + */ + type?: string; + + /**To display user specified buttons in zooming toolbar. + * @Default {[zoomIn, zoomOut, zoom, pan, reset]} + */ + toolbarItems?: Array; +} +} +module Chart +{ +enum CoordinateUnit +{ +//string +None, +//string +Pixels, +//string +Points, +} +} +module Chart +{ +enum HorizontalAlignment +{ +//string +Left, +//string +Right, +//string +Middle, +} +} +module Chart +{ +enum Region +{ +//string +Chart, +//string +Series, +} +} +module Chart +{ +enum VerticalAlignment +{ +//string +Top, +//string +Bottom, +//string +Middle, +} +} +module Chart +{ +enum Unit +{ +//string +Percentage, +//string +Pixel, +} +} +module Chart +{ +enum DrawType +{ +//string +Line, +//string +Area, +//string +Column, +} +} +module Chart +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +} +} +module Chart +{ +enum FontWeight +{ +//string +Regular, +//string +Bold, +//string +Lighter, +} +} +module Chart +{ +enum LabelPosition +{ +//string +Inside, +//string +Outside, +//string +OutsideExtended, +} +} +module Chart +{ +enum LineCap +{ +//string +Butt, +//string +Round, +//string +Square, +} +} +module Chart +{ +enum LineJoin +{ +//string +Round, +//string +Bevel, +//string +Miter, +} +} +module Chart +{ +enum ConnectorLineType +{ +//string +Line, +//string +Bezier, +} +} +module Chart +{ +enum HorizontalTextAlignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum Shape +{ +//string +None, +//string +LeftArrow, +//string +RightArrow, +//string +Circle, +//string +Cross, +//string +HorizLine, +//string +VertLine, +//string +Diamond, +//string +Rectangle, +//string +Triangle, +//string +Hexagon, +//string +Pentagon, +//string +Star, +//string +Ellipse, +//string +Trapezoid, +//string +UpArrow, +//string +DownArrow, +//string +Image, +//string +SeriesType, +} +} +module Chart +{ +enum TextPosition +{ +//string +Top, +//string +Bottom, +//string +Middle, +} +} +module Chart +{ +enum VerticalTextAlignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum PyramidMode +{ +//string +Linear, +//string +Surface, +} +} +module Chart +{ +enum Type +{ +//string +Area, +//string +Line, +//string +Spline, +//string +Column, +//string +Scatter, +//string +Bubble, +//string +SplineArea, +//string +StepArea, +//string +StepLine, +//string +Pie, +//string +Hilo, +//string +HiloOpenClose, +//string +Candle, +//string +Bar, +//string +StackingArea, +//string +StackingArea100, +//string +RangeColumn, +//string +StackingColumn, +//string +StackingColumn100, +//string +StackingBar, +//string +StackingBar100, +//string +Pyramid, +//string +Funnel, +//string +Doughnut, +//string +Polar, +//string +Radar, +//string +RangeArea, +} +} +module Chart +{ +enum EmptyPointMode +{ +//string +Gap, +//string +Zero, +//string +Average, +} +} +module Chart +{ +enum ErrorBarType +{ +//string +FixedValue, +//string +Percentage, +//string +StandardDeviation, +//string +StandardError, +} +} +module Chart +{ +enum ErrorBarMode +{ +//string +Both, +//string +Vertical, +//string +Horizontal, +} +} +module Chart +{ +enum ErrorBarDirection +{ +//string +Both, +//string +Plus, +//string +Minus, +} +} +module Chart +{ +enum Mode +{ +//string +Series, +//string +Point, +//string +Cluster, +} +} +module Chart +{ +enum SelectionType +{ +//string +Single, +//string +Multiple, +} +} +module Chart +{ +enum CrosshairType +{ +//string +Crosshair, +//string +Trackball, +} +} +module Chart +{ +enum Alignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum Position +{ +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +module Chart +{ +enum TextOverflow +{ +//string +None, +//string +Trim, +//string +Wrap, +//string +WrapAndTrim, +} +} +module Chart +{ +enum EdgeLabelPlacement +{ +//string +None, +//string +Shift, +//string +Hide, +} +} +module Chart +{ +enum IntervalType +{ +//string +Days, +//string +Hours, +//string +Seconds, +//string +Milliseconds, +//string +Minutes, +//string +Months, +//string +Years, +} +} +module Chart +{ +enum LabelIntersectAction +{ +//string +None, +//string +Rotate90, +//string +Rotate45, +//string +Wrap, +//string +WrapByword, +//string +Trim, +//string +Hide, +//string +MultipleRows, +} +} +module Chart +{ +enum RangePadding +{ +//string +Additional, +//string +Normal, +//string +None, +//string +Round, +} +} +module Chart +{ +enum TextAlignment +{ +//string +MiddleTop, +//string +MiddleCenter, +//string +MiddleBottom, +} +} +module Chart +{ +enum ZIndex +{ +//string +Inside, +//string +Over, +} +} +module Chart +{ +enum TickLinesPosition +{ +//string +Inside, +//string +Outside, +} +} +module Chart +{ +enum ValueType +{ +//string +Double, +//string +Category, +//string +DateTime, +//string +Logarithmic, +} +} +module Chart +{ +enum Theme +{ +//string +Azure, +//string +FlatLight, +//string +FlatDark, +//string +Azuredark, +//string +Lime, +//string +LimeDark, +//string +Saffron, +//string +SaffronDark, +//string +GradientLight, +//string +GradientDark, +} +} + +class RangeNavigator extends ej.Widget { + static fn: RangeNavigator; + constructor(element: JQuery, options?: RangeNavigator.Model); + constructor(element: Element, options?: RangeNavigator.Model); + model:RangeNavigator.Model; + defaults:RangeNavigator.Model; + + /** destroy the range navigator widget + * @returns {void} + */ + _destroy (): void; +} +export module RangeNavigator{ + +export interface Model { + + /**Toggles the placement of slider exactly on the place it left or on the nearest interval. + * @Default {false} + */ + allowSnapping?: boolean; + + /**Specifies the data source for range navigator. + */ + dataSource?: any; + + /**Sets a value whether to make the range navigator responsive on resize. + * @Default {false} + */ + enableAutoResizing?: boolean; + + /**Toggles the redrawing of chart on moving the sliders. + * @Default {true} + */ + enableDeferredUpdate?: boolean; + + /**Toggles the direction of rendering the range navigator control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Options for customizing the labels colors, font, style, size, horizontalAlignment and opacity. + */ + labelSettings?: LabelSettings; + + /**This property is to specify the localization of range navigator. + * @Default {en-US} + */ + locale?: string; + + /**Options for customizing the range navigator. + */ + navigatorStyleSettings?: NavigatorStyleSettings; + + /**Padding specifies the gap between the container and the range navigator. + * @Default {0} + */ + padding?: string; + + /**If the range is not given explicitly, range will be calculated automatically. + * @Default {none} + */ + rangePadding?: ej.datavisualization.RangeNavigator.RangePadding|string; + + /**Options for customizing the starting and ending ranges. + */ + rangeSettings?: RangeSettings; + + /**selectedData is for getting the data when the "rangeChanged" event trigger from client side. + */ + selectedData?: any; + + /**Options for customizing the start and end range values. + */ + selectedRangeSettings?: SelectedRangeSettings; + + /**Contains property to customize the hight and width of range navigator. + */ + sizeSettings?: SizeSettings; + + /**By specifying this property the user can change the theme of the range navigator. + * @Default {null} + */ + theme?: string; + + /**Options for customizing the tooltip in range navigator. + */ + tooltipSettings?: TooltipSettings; + + /**Options for configuring minor grid lines, major grid lines, axis line of axis. + */ + valueAxisSettings?: ValueAxisSettings; + + /**You can plot data of type date time or numeric. This property determines the type of data that this axis will handle. + * @Default {datetime} + */ + valueType?: ej.datavisualization.RangeNavigator.ValueType|string; + + /**Specifies the xName for dataSource. This is used to take the x values from dataSource + */ + xName?: any; + + /**Specifies the yName for dataSource. This is used to take the y values from dataSource + */ + yName?: any; + + /**Fires on load of range navigator.*/ + load? (e: LoadEventArgs): void; + + /**Fires after range navigator is loaded.*/ + loaded? (e: LoadedEventArgs): void; + + /**Fires on changing the range of range navigator.*/ + rangeChanged? (e: RangeChangedEventArgs): void; +} + +export interface LoadEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RangeChangedEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LabelSettingsHigherLevelBorder { + + /**Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /**Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; +} + +export interface LabelSettingsHigherLevelGridLineStyle { + + /**Specifies the color of grid lines in higher level. + * @Default {#B5B5B5} + */ + color?: string; + + /**Specifies the dashArray of grid lines in higher level. + * @Default {20 5 0} + */ + dashArray?: string; + + /**Specifies the width of grid lines in higher level. + * @Default {#B5B5B5} + */ + width?: string; +} + +export interface LabelSettingsHigherLevelStyleFont { + + /**Specifies the label font color. Labels render with the specified font color. + * @Default {black} + */ + color?: string; + + /**Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the label font style. Labels render with the specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /**Specifies the label font weight. Labels render with the specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /**Specifies the label opacity. Labels render with the specified opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the label font size. Labels render with the specified font size. + * @Default {12px} + */ + size?: string; +} + +export interface LabelSettingsHigherLevelStyle { + + /**Options for customizing the font properties. + */ + font?: LabelSettingsHigherLevelStyleFont; + + /**Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; +} + +export interface LabelSettingsHigherLevel { + + /**Options for customizing the border of grid lines in higher level. + */ + border?: LabelSettingsHigherLevelBorder; + + /**Specifies the fill color of higher level labels. + * @Default {transparent} + */ + fill?: string; + + /**Options for customizing the grid line colors, width, dashArray, border. + */ + gridLineStyle?: LabelSettingsHigherLevelGridLineStyle; + + /**Specifies the intervalType for higher level labels. See IntervalType + * @Default {years} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /**Specifies the position of the labels to render either inside or outside of plot area + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /**Specifies the position of the labels in higher level + * @Default {top} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /**Options for customizing the style of higher level labels. + */ + style?: LabelSettingsHigherLevelStyle; + + /**Toggles the visibility of higher level labels. + * @Default {true} + */ + visible?: boolean; +} + +export interface LabelSettingsLowerLevelBorder { + + /**Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /**Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; +} + +export interface LabelSettingsLowerLevelGridLineStyle { + + /**Specifies the color of grid lines in lower level. + * @Default {#B5B5B5} + */ + color?: string; + + /**Specifies the dashArray of gridLines in lowerLevel. + * @Default {20 5 0} + */ + dashArray?: string; + + /**Specifies the width of grid lines in lower level. + * @Default {#B5B5B5} + */ + width?: string; +} + +export interface LabelSettingsLowerLevelStyleFont { + + /**Specifies the color of labels. Label text render in this specified color. + * @Default {black} + */ + color?: string; + + /**Specifies the font family of labels. Label text render in this specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the font style of labels. Label text render in this specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /**Specifies the font weight of labels. Label text render in this specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /**Specifies the opacity of labels. Label text render in this specified opacity. + * @Default {12px} + */ + opacity?: string; + + /**Specifies the size of labels. Label text render in this specified size. + * @Default {12px} + */ + size?: string; +} + +export interface LabelSettingsLowerLevelStyle { + + /**Options for customizing the font of labels. + */ + font?: LabelSettingsLowerLevelStyleFont; + + /**Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; +} + +export interface LabelSettingsLowerLevel { + + /**Options for customizing the border of grid lines in lower level. + */ + border?: LabelSettingsLowerLevelBorder; + + /**Specifies the fill color of labels in lower level. + * @Default {transparent} + */ + fill?: string; + + /**Options for customizing the grid lines in lower level. + */ + gridLineStyle?: LabelSettingsLowerLevelGridLineStyle; + + /**Specifies the intervalType of the labels in lower level.See IntervalType + * @Default {years} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /**Specifies the position of the labels to render either inside or outside of plot area. See LabelPlacement + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /**Specifies the position of the labels in lower level.See Position + * @Default {bottom} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /**Options for customizing the style of labels. + */ + style?: LabelSettingsLowerLevelStyle; + + /**Toggles the visibility of labels in lower level. + * @Default {true} + */ + visible?: boolean; +} + +export interface LabelSettingsStyleFont { + + /**Specifies the label color. This color is applied to the labels in range navigator. + * @Default {#FFFFFF} + */ + color?: string; + + /**Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /**Specifies the label font opacity. Labels render with the specified font opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the label font size. Labels render with the specified font size. + * @Default {1px} + */ + size?: string; + + /**Specifies the label font style. Labels render with the specified font style.. + * @Default {Normal} + */ + style?: ej.datavisualization.RangeNavigator.FontStyle|string; + + /**Specifies the lable font weight + * @Default {regular} + */ + weight?: ej.datavisualization.RangeNavigator.FontWeight|string; +} + +export interface LabelSettingsStyle { + + /**Options for customizing the font of labels in range navigator. + */ + font?: LabelSettingsStyleFont; + + /**Specifies the horizontalAlignment of the label in RangeNavigator + * @Default {middle} + */ + horizontalAlignment?: ej.datavisualization.RangeNavigator.HorizontalAlignment|string; +} + +export interface LabelSettings { + + /**Options for customizing the higher level labels in range navigator. + */ + higherLevel?: LabelSettingsHigherLevel; + + /**Options for customizing the labels in lower level. + */ + lowerLevel?: LabelSettingsLowerLevel; + + /**Options for customizing the style of labels in range navigator. + */ + style?: LabelSettingsStyle; +} + +export interface NavigatorStyleSettingsBorder { + + /**Specifies the border color of range navigator. + * @Default {transparent} + */ + color?: string; + + /**Specifies the dash array of range navigator. + * @Default {null} + */ + dashArray?: string; + + /**Specifies the border width of range navigator. + * @Default {0.5} + */ + width?: number; +} + +export interface NavigatorStyleSettingsMajorGridLineStyle { + + /**Specifies the color of major grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /**Toggles the visibility of major grid lines. + * @Default {true} + */ + visible?: boolean; +} + +export interface NavigatorStyleSettingsMinorGridLineStyle { + + /**Specifies the color of minor grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /**Toggles the visibility of minor grid lines. + * @Default {true} + */ + visible?: boolean; +} + +export interface NavigatorStyleSettings { + + /**Specifies the background color of range navigator. + * @Default {#dddddd} + */ + background?: string; + + /**Options for customizing the border color and width of range navigator. + */ + border?: NavigatorStyleSettingsBorder; + + /**Specifies the left side thumb template in range navigator we can give either div id or html string + * @Default {null} + */ + leftThumbTemplate?: string; + + /**Options for customizing the major grid lines. + */ + majorGridLineStyle?: NavigatorStyleSettingsMajorGridLineStyle; + + /**Options for customizing the minor grid lines. + */ + minorGridLineStyle?: NavigatorStyleSettingsMinorGridLineStyle; + + /**Specifies the opacity of RangeNavigator. + * @Default {1} + */ + opacity?: number; + + /**Specifies the right side thumb template in range navigator we can give either div id or html string + * @Default {null} + */ + rightThumbTemplate?: string; + + /**Specifies the color of the selected region in range navigator. + * @Default {#EFEFEF} + */ + selectedRegionColor?: string; + + /**Specifies the opacity of Selected Region. + * @Default {0} + */ + selectedRegionOpacity?: number; + + /**Specifies the color of the thumb in range navigator. + * @Default {#2382C3} + */ + thumbColor?: string; + + /**Specifies the radius of the thumb in range navigator. + * @Default {10} + */ + thumbRadius?: number; + + /**Specifies the stroke color of the thumb in range navigator. + * @Default {#303030} + */ + thumbStroke?: string; + + /**Specifies the color of the unselected region in range navigator. + * @Default {#5EABDE} + */ + unselectedRegionColor?: string; + + /**Specifies the opacity of Unselected Region. + * @Default {0.3} + */ + unselectedRegionOpacity?: number; +} + +export interface RangeSettings { + + /**Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /**Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; +} + +export interface SelectedRangeSettings { + + /**Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /**Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; +} + +export interface SizeSettings { + + /**Specifies height of the range navigator. + * @Default {null} + */ + height?: string; + + /**Specifies width of the range navigator. + * @Default {null} + */ + width?: string; +} + +export interface TooltipSettingsFont { + + /**Specifies the color of text in tooltip. Tooltip text render in the specified color. + * @Default {#FFFFFF} + */ + color?: string; + + /**Specifies the font family of text in tooltip. Tooltip text render in the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /**Specifies the font style of text in tooltip. Tooltip text render in the specified font style. + * @Default {ej.datavisualization.RangeNavigator.fontStyle.Normal} + */ + fontStyle?: string; + + /**Specifies the opacity of text in tooltip. Tooltip text render in the specified opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of text in tooltip. Tooltip text render in the specified size. + * @Default {10px} + */ + size?: string; + + /**Specifies the weight of text in tooltip. Tooltip text render in the specified weight. + * @Default {ej.datavisualization.RangeNavigator.weight.Regular} + */ + weight?: string; +} + +export interface TooltipSettings { + + /**Specifies the background color of tooltip. + * @Default {#303030} + */ + backgroundColor?: string; + + /**Options for customizing the font in tooltip. + */ + font?: TooltipSettingsFont; + + /**Specifies the format of text to be displayed in tooltip. + * @Default {MM/dd/yyyy} + */ + labelFormat?: string; + + /**Specifies the mode of displaying the tooltip. Neither to display the tooltip always nor on demand. + * @Default {null} + */ + tooltipDisplayMode?: string; + + /**Toggles the visibility of tooltip. + * @Default {true} + */ + visible?: boolean; +} + +export interface ValueAxisSettingsAxisLine { + + /**Toggles the visibility of axis line. + * @Default {none} + */ + visible?: string; +} + +export interface ValueAxisSettingsFont { + + /**Text in axis render with the specified size. + * @Default {0px} + */ + size?: string; +} + +export interface ValueAxisSettingsMajorGridLines { + + /**Toggles the visibility of major grid lines. + * @Default {false} + */ + visible?: boolean; +} + +export interface ValueAxisSettingsMajorTickLines { + + /**Specifies the size of the majorTickLines in range navigator + * @Default {0} + */ + size?: number; + + /**Toggles the visibility of major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Specifies width of the major tick lines. + * @Default {0} + */ + width?: number; +} + +export interface ValueAxisSettings { + + /**Options for customizing the axis line. + */ + axisLine?: ValueAxisSettingsAxisLine; + + /**Options for customizing the font of the axis. + */ + font?: ValueAxisSettingsFont; + + /**Options for customizing the major grid lines. + */ + majorGridLines?: ValueAxisSettingsMajorGridLines; + + /**Options for customizing the major tick lines in axis. + */ + majorTickLines?: ValueAxisSettingsMajorTickLines; + + /**If the range is not given explicitly, range will be calculated automatically. You can customize the automatic range calculation using rangePadding. + * @Default {none} + */ + rangePadding?: string; + + /**Toggles the visibility of axis in range navigator. + * @Default {false} + */ + visible?: boolean; +} +} +module RangeNavigator +{ +enum IntervalType +{ +//string +Years, +//string +Quarters, +//string +Months, +//string +Weeks, +//string +Days, +//string +Hours, +} +} +module RangeNavigator +{ +enum LabelPlacement +{ +//string +Inside, +//string +Outside, +} +} +module RangeNavigator +{ +enum Position +{ +//string +Top, +//string +Bottom, +} +} +module RangeNavigator +{ +enum FontStyle +{ +//string +Normal, +//string +Bold, +//string +Italic, +} +} +module RangeNavigator +{ +enum FontWeight +{ +//string +Regular, +//string +Lighter, +} +} +module RangeNavigator +{ +enum HorizontalAlignment +{ +//string +Middle, +//string +Left, +//string +Right, +} +} +module RangeNavigator +{ +enum RangePadding +{ +//string +Additional, +//string +Normal, +//string +None, +//string +Round, +} +} +module RangeNavigator +{ +enum ValueType +{ +//string +Numeric, +//string +DateTime, +} +} + +class BulletGraph extends ej.Widget { + static fn: BulletGraph; + constructor(element: JQuery, options?: BulletGraph.Model); + constructor(element: Element, options?: BulletGraph.Model); + model:BulletGraph.Model; + defaults:BulletGraph.Model; + + /** To destroy the bullet graph + * @returns {void} + */ + destroy (): void; + + /** To redraw the bulet graph + * @returns {void} + */ + redraw(): void; + + /** To set the value for comparative measure in bullet graph. + * @returns {void} + */ + setComparativeMeasureSymbol(): void; + + /** To set the value for feature measure bar. + * @returns {void} + */ + setFeatureMeasureBarValue(): void; +} +export module BulletGraph{ + +export interface Model { + + /**Toggles the visibility of the range stroke color of the labels. + * @Default {false} + */ + applyRangeStrokeToLabels?: boolean; + + /**Toggles the visibility of the range stroke color of the ticks. + * @Default {false} + */ + applyRangeStrokeToTicks?: boolean; + + /**Contains property to customize the caption in bullet graph. + */ + captionSettings?: CaptionSettings; + + /**Comparative measure bar in bullet graph render till the specified value. + * @Default {0} + */ + comparativeMeasureValue?: number; + + /**Toggles the animation of bullet graph. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Sets a value whether to make the bullet graph responsive on resize. + * @Default {true} + */ + enableResizing?: boolean; + + /**Specifies the direction of flow in bullet graph. Neither it may be backward nor forward. + * @Default {forward} + */ + flowDirection?: ej.datavisualization.BulletGraph.FlowDirection|string; + + /**Specifies the height of the bullet graph. + * @Default {90} + */ + height?: number; + + /**Bullet graph will render in the specified orientation. + * @Default {horizontal} + */ + orientation?: ej.datavisualization.BulletGraph.Orientation|string; + + /**Contains property to customize the qualitative ranges. + */ + qualitativeRanges?: Array; + + /**Size of the qualitative range depends up on the specified value. + * @Default {32} + */ + qualitativeRangeSize?: number; + + /**Length of the quantitative range depends up on the specified value. + * @Default {475} + */ + quantitativeScaleLength?: number; + + /**Contains all the properties to customize quantitative scale. + */ + quantitativeScaleSettings?: QuantitativeScaleSettings; + + /**By specifying this property the user can change the theme of the bullet graph. + * @Default {flatlight} + */ + theme?: string; + + /**Contains all the properties to customize tooltip. + */ + tooltipSettings?: TooltipSettings; + + /**Feature measure bar in bullet graph render till the specified value. + * @Default {0} + */ + value?: number; + + /**Specifies the width of the bullet graph. + * @Default {595} + */ + width?: number; + + /**Fires on rendering the caption of bullet graph.*/ + drawCaption? (e: DrawCaptionEventArgs): void; + + /**Fires on rendering the category.*/ + drawCategory? (e: DrawCategoryEventArgs): void; + + /**Fires on rendering the comparative measure symbol.*/ + drawComparativeMeasureSymbol? (e: DrawComparativeMeasureSymbolEventArgs): void; + + /**Fires on rednering the feature measure bar.*/ + drawFeatureMeasureBar? (e: DrawFeatureMeasureBarEventArgs): void; + + /**Fires on rendering the indicator of bullet graph.*/ + drawIndicator? (e: DrawIndicatorEventArgs): void; + + /**Fires on rendering the labels.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Fires on rendering the qualitative ranges.*/ + drawQualitativeRanges? (e: DrawQualitativeRangesEventArgs): void; + + /**Fires on loading bullet graph.*/ + load? (e: LoadEventArgs): void; +} + +export interface DrawCaptionEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the current captionSettings element. + */ + captionElement?: HTMLElement; + + /**returns the type of the captionSettings. + */ + captionType?: string; +} + +export interface DrawCategoryEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of category element. + */ + categoryElement?: HTMLElement; + + /**returns the text value of the category that is drawn. + */ + Value?: string; +} + +export interface DrawComparativeMeasureSymbolEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of comparative measure element. + */ + targetElement?: HTMLElement; + + /**returns the value of the comparative measure symbol. + */ + Value?: number; +} + +export interface DrawFeatureMeasureBarEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of feature measure element. + */ + currentElement?: HTMLElement; + + /**returns the value of the feature measure bar. + */ + Value?: number; +} + +export interface DrawIndicatorEventArgs { + + /**returns an object to customize bullet graph indicator text and symbol before rendering it. + */ + indicatorSettings?: any; + + /**returns the object of bullet graph. + */ + model?: any; + + /**returns the type of event. + */ + type?: string; + + /**for cancelling the event. + */ + cancel?: boolean; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the current label element. + */ + tickElement?: HTMLElement; + + /**returns the label type. + */ + labelType?: string; +} + +export interface DrawQualitativeRangesEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the index of current range. + */ + rangeIndex?: number; + + /**returns the settings for current range. + */ + rangeOptions?: any; + + /**returns the end value of current range. + */ + rangeEndValue?: number; +} + +export interface LoadEventArgs { +} + +export interface CaptionSettingsFont { + + /**Specifies the color of the text in caption. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of caption. Caption text render with this fontFamily + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of caption + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of caption + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of caption. Caption text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of caption. Caption text render with this size + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsIndicatorFont { + + /**Specifies the color of the indicator's text. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of indicator. Indicator text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of indicator. Indicator text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of indicator. Indicator text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of indicator text. Indicator text render with this Opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of indicator. Indicator text render with this size. + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsIndicatorLocation { + + /**Specifies the horizontal position of the indicator. + * @Default {10} + */ + x?: number; + + /**Specifies the vertical position of the indicator. + * @Default {60} + */ + y?: number; +} + +export interface CaptionSettingsIndicatorSymbolBorder { + + /**Specifies the border color of indicator symbol. + * @Default {null} + */ + color?: string; + + /**Specifies the border width of indicator symbol. + * @Default {1} + */ + width?: number; +} + +export interface CaptionSettingsIndicatorSymbolSize { + + /**Specifies the height of indicator symbol. + * @Default {10} + */ + height?: number; + + /**Specifies the width of indicator symbol. + * @Default {10} + */ + width?: number; +} + +export interface CaptionSettingsIndicatorSymbol { + + /**Contains property to customize the border of indicator symbol. + */ + border?: CaptionSettingsIndicatorSymbolBorder; + + /**Specifies the color of indicator symbol. + * @Default {null} + */ + color?: string; + + /**Specifies the url of image that represents indicator symbol. + */ + imageURL?: string; + + /**Specifies the opacity of indicator symbol. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of indicator symbol. + */ + shape?: string; + + /**Contains property to customize the size of indicator symbol. + */ + size?: CaptionSettingsIndicatorSymbolSize; +} + +export interface CaptionSettingsIndicator { + + /**Contains property to customize the font of indicator. + */ + font?: CaptionSettingsIndicatorFont; + + /**Contains property to customize the location of indicator. + */ + location?: CaptionSettingsIndicatorLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {2} + */ + padding?: number; + + /**Contains property to customize the symbol of indicator. + */ + symbol?: CaptionSettingsIndicatorSymbol; + + /**Specifies the text to be displayed as indicator text. By default difference between current value and target will be displayed + */ + text?: string; + + /**Specifies the alignement of indicator with respect to scale based on text position + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**indicator text render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /**Specifies where indicator should be placed + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; + + /**Specifies the space between indicator symbol and text. + * @Default {3} + */ + textSpacing?: number; + + /**Specifies whether indicator will be visible or not. + * @Default {false} + */ + visibile?: boolean; +} + +export interface CaptionSettingsLocation { + + /**Specifies the position in horizontal direction + * @Default {17} + */ + x?: number; + + /**Specifies the position in horizontal direction + * @Default {30} + */ + y?: number; +} + +export interface CaptionSettingsSubTitleFont { + + /**Specifies the color of the subtitle's text. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of subtitle. Subtitle text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of subtitle. Subtitle text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of subtitle. Subtitle text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of subtitle. Subtitle text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of subtitle. Subtitle text render with this size. + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsSubTitleLocation { + + /**Specifies the horizontal position of the subtitle. + * @Default {10} + */ + x?: number; + + /**Specifies the vertical position of the subtitle. + * @Default {45} + */ + y?: number; +} + +export interface CaptionSettingsSubTitle { + + /**Contains property to customize the font of subtitle. + */ + font?: CaptionSettingsSubTitleFont; + + /**Contains property to customize the location of subtitle. + */ + location?: CaptionSettingsSubTitleLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /**Specifies the text to be displayed as subtitle. + */ + text?: string; + + /**Specifies the alignment of sub title text with respect to scale. Alignment will not be applied in float position. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**Subtitle render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /**Specifies where sub title text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; +} + +export interface CaptionSettings { + + /**Specifies whether trim the labels will be true or false. + * @Default {true} + */ + enableTrim?: boolean; + + /**Contains property to customize the font of caption. + */ + font?: CaptionSettingsFont; + + /**Contains property to customize the indicator. + */ + indicator?: CaptionSettingsIndicator; + + /**Contains property to customize the location. + */ + location?: CaptionSettingsLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /**Contains property to customize the subtitle. + */ + subTitle?: CaptionSettingsSubTitle; + + /**Specifies the text to be displayed on bullet graph. + */ + text?: string; + + /**Specifies the alignment of caption text with respect to scale. This property will not be applied when text position is float. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies caption text anchoring when caption text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**Specifies the angel in which the caption is rendered. + * @Default {0} + */ + textAngle?: number; + + /**Specifies how caption text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; +} + +export interface QualitativeRanges { + + /**Specifies the ending range to which the qualitative ranges will render. + * @Default {3} + */ + rangeEnd?: number; + + /**Specifies the opacity for the qualitative ranges. + * @Default {1} + */ + rangeOpacity?: number; + + /**Specifies the stroke for the qualitative ranges. + * @Default {null} + */ + rangeStroke?: string; +} + +export interface QuantitativeScaleSettingsComparativeMeasureSettings { + + /**Specifies the stroke of the comparative measure. + * @Default {null} + */ + stroke?: number; + + /**Specifies the width of the comparative measure. + * @Default {5} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsFeaturedMeasureSettings { + + /**Specifies the Stroke of the featured measure in bullet graph. + * @Default {null} + */ + stroke?: number; + + /**Specifies the width of the featured measure in bullet graph. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsFeatureMeasures { + + /**Specifies the category of feature measure. + * @Default {null} + */ + category?: string; + + /**Comparative measure render till the specified value. + * @Default {null} + */ + comparativeMeasureValue?: number; + + /**Feature measure render till the specified value. + * @Default {null} + */ + value?: number; +} + +export interface QuantitativeScaleSettingsFields { + + /**Specifies the category of the bullet graph. + * @Default {null} + */ + category?: string; + + /**Comparative measure render based on the values in the specified field. + * @Default {null} + */ + comparativeMeasure?: string; + + /**Specifies the dataSource for the bullet graph. + * @Default {null} + */ + dataSource?: any; + + /**Feature measure render based on the values in the specified field. + * @Default {null} + */ + featureMeasures?: string; + + /**Specifies the query for fetching the values form data source to render the bullet graph. + * @Default {null} + */ + query?: string; + + /**Specifies the name of the table. + * @Default {null} + */ + tableName?: string; +} + +export interface QuantitativeScaleSettingsLabelSettingsFont { + + /**Specifies the fontFamily of labels in bullet graph. Labels render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of labels in bullet graph. Labels render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of labels in bullet graph. Labels render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of labels in bullet graph. Labels render with this opacity + * @Default {1} + */ + opacity?: number; +} + +export interface QuantitativeScaleSettingsLabelSettings { + + /**Contains property to customize the font of the labels in bullet graph. + */ + font?: QuantitativeScaleSettingsLabelSettingsFont; + + /**Specifies the placement of labels in bullet graph scale. + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.BulletGraph.LabelPlacement|string; + + /**Specifies the prefix to be added with labels in bullet graph. + * @Default {Empty string} + */ + labelPrefix?: string; + + /**Specifies the suffix to be added after labels in bullet graph. + * @Default {Empty string} + */ + labelSuffix?: string; + + /**Specifies the horizontal/vertical padding of labels. + * @Default {15} + */ + offset?: number; + + /**Specifies the position of the labels to render either above or below the graph. See Position + * @Default {below} + */ + position?: ej.datavisualization.BulletGraph.LabelPosition|string; + + /**Specifies the Size of the labels. + * @Default {12} + */ + size?: number; + + /**Specifies the stroke color of the labels in bullet graph. + * @Default {null} + */ + stroke?: string; +} + +export interface QuantitativeScaleSettingsLocation { + + /**This property specifies the x position for rendering quantitative scale. + * @Default {10} + */ + x?: number; + + /**This property specifies the y position for rendering quantitative scale. + * @Default {10} + */ + y?: number; +} + +export interface QuantitativeScaleSettingsMajorTickSettings { + + /**Specifies the size of the major ticks. + * @Default {13} + */ + size?: number; + + /**Specifies the stroke color of the major tick lines. + * @Default {null} + */ + stroke?: string; + + /**Specifies the width of the major tick lines. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsMinorTickSettings { + + /**Specifies the size of minor ticks. + * @Default {7} + */ + size?: number; + + /**Specifies the stroke color of minor ticks in bullet graph. + * @Default {null} + */ + stroke?: string; + + /**Specifies the width of the minor ticks in bullet graph. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettings { + + /**Contains property to customize the comparative measure. + */ + comparativeMeasureSettings?: QuantitativeScaleSettingsComparativeMeasureSettings; + + /**Contains property to customize the featured measure. + */ + featuredMeasureSettings?: QuantitativeScaleSettingsFeaturedMeasureSettings; + + /**Contains property to customize the featured measure. + */ + featureMeasures?: Array; + + /**Contains property to customize the fields. + */ + fields?: QuantitativeScaleSettingsFields; + + /**Specifies the interval for the Graph. + * @Default {1} + */ + interval?: number; + + /**Contains property to customize the labels. + */ + labelSettings?: QuantitativeScaleSettingsLabelSettings; + + /**Contains property to customize the position of the quantitative scale + */ + location?: QuantitativeScaleSettingsLocation; + + /**Contains property to customize the major tick lines. + */ + majorTickSettings?: QuantitativeScaleSettingsMajorTickSettings; + + /**Specifies the maximum value of the Graph. + * @Default {10} + */ + maximum?: number; + + /**Specifies the minimum value of the Graph. + * @Default {0} + */ + minimum?: number; + + /**Contains property to customize the minor ticks. + */ + minorTickSettings?: QuantitativeScaleSettingsMinorTickSettings; + + /**The specified number of minor ticks will be rendered per interval. + * @Default {4} + */ + minorTicksPerInterval?: number; + + /**Specifies the placement of ticks to render either inside or outside the scale. + * @Default {ej.datavisualization.BulletGraph.TickPlacement.Outside} + */ + tickPlacement?: ej.datavisualization.BulletGraph.TickPlacement|string; + + /**Specifies the position of the ticks to render either above,below or inside + * @Default {ej.datavisualization.BulletGraph.TickPosition.Far} + */ + tickPosition?: ej.datavisualization.BulletGraph.TickPosition|string; +} + +export interface TooltipSettings { + + /**Specifies template for caption tooltip + * @Default {null} + */ + captionTemplate?: string; + + /**Toggles the visibility of caption tooltip + * @Default {false} + */ + enableCaptionTooltip?: boolean; + + /**Specifies the ID of a div, which is to be displayed as tooltip. + * @Default {null} + */ + template?: string; + + /**Toggles the visibility of tooltip + * @Default {true} + */ + visible?: boolean; +} +} +module BulletGraph +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +//string +Oblique, +} +} +module BulletGraph +{ +enum FontWeight +{ +//string +Normal, +//string +Bold, +//string +Bolder, +//string +Lighter, +} +} +module BulletGraph +{ +enum TextAlignment +{ +//string +Near, +//string +Far, +//string +Center, +} +} +module BulletGraph +{ +enum TextAnchor +{ +//string +Start, +//string +Middle, +//string +End, +} +} +module BulletGraph +{ +enum TextPosition +{ +//string +Top, +//string +Right, +//string +Left, +//string +Bottom, +//string +Float, +} +} +module BulletGraph +{ +enum FlowDirection +{ +//string +Forward, +//string +Backward, +} +} +module BulletGraph +{ +enum Orientation +{ +//string +Horizontal, +//string +Vertical, +} +} +module BulletGraph +{ +enum LabelPlacement +{ +//string +Inside, +//string +Outside, +} +} +module BulletGraph +{ +enum LabelPosition +{ +//string +Above, +//string +Below, +} +} +module BulletGraph +{ +enum TickPlacement +{ +//string +Inside, +//string +Outside, +} +} +module BulletGraph +{ +enum TickPosition +{ +//string +Below, +//string +Above, +//string +Cross, +} +} + +class Barcode extends ej.Widget { + static fn: Barcode; + constructor(element: JQuery, options?: Barcode.Model); + constructor(element: Element, options?: Barcode.Model); + model:Barcode.Model; + defaults:Barcode.Model; + + /** To disable the barcode + * @returns {void} + */ + disable(): void; + + /** To enable the barcode + * @returns {void} + */ + enable(): void; +} +export module Barcode{ + +export interface Model { + + /**Specifies the distance between the barcode and text below it. + */ + barcodeToTextGapHeight?: number; + + /**Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. Please refer to xDimension for two dimensional barcode height customization. + */ + barHeight?: number; + + /**Specifies the dark bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + darkBarColor?: any; + + /**Specifies whether the text below the barcode is visible or hidden. + */ + displayText?: boolean; + + /**Specifies whether the control is enabled. + */ + enabled?: boolean; + + /**Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. These symbols are optional and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. + */ + encodeStartStopSymbol?: number; + + /**Specifies the light bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + lightBarColor?: any; + + /**Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on the provided input which can be specified during initialization. + */ + narrowBarWidth?: number; + + /**Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and stops. The purpose of a quiet zone is to prevent the reader from picking up unrelated information. + */ + quietZone?: QuietZone; + + /**Specifies the type of the Barcode. See SymbologyType + */ + symbologyType?: ej.datavisualization.Barcode.SymbologyType|string; + + /**Specifies the text to be encoded in the barcode. + */ + text?: string; + + /**Specifies the color of the text/data at the bottom of the barcode. + */ + textColor?: any; + + /**Specifies the width of the wide bars in the barcode. One dimensional barcode usually contains random narrow and wide bars based on the provided which can be customized during initialization. + */ + wideBarWidth?: number; + + /**Specifies the width of the narrowest element(bar or space) in a barcode. The greater the x dimension, the more easily a barcode reader will scan. + */ + xDimension?: number; + + /**Fires after Barcode control is loaded.*/ + load? (e: LoadEventArgs): void; +} + +export interface LoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the barcode model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**return the barcode state + */ + status?: boolean; +} + +export interface QuietZone { + + /**Specifies the quiet zone around the Barcode. + */ + all?: number; + + /**Specifies the bottom quiet zone of the Barcode. + */ + bottom?: number; + + /**Specifies the left quiet zone of the Barcode. + */ + left?: number; + + /**Specifies the right quiet zone of the Barcode. + */ + right?: number; + + /**Specifies the top quiet zone of the Barcode. + */ + top?: number; +} +} +module Barcode +{ +enum SymbologyType +{ +//Represents the QR code +QRBarcode, +//Represents the Data Matrix barcode +DataMatrix, +//Represents the Code 39 barcode +Code39, +//Represents the Code 39 Extended barcode +Code39Extended, +//Represents the Code 11 barcode +Code11, +//Represents the Codabar barcode +Codabar, +//Represents the Code 32 barcode +Code32, +//Represents the Code 93 barcode +Code93, +//Represents the Code 93 Extended barcode +Code93Extended, +//Represents the Code 128 A barcode +Code128A, +//Represents the Code 128 B barcode +Code128B, +//Represents the Code 128 C barcode +Code128C, +} +} + +class Map extends ej.Widget { + static fn: Map; + constructor(element: JQuery, options?: Map.Model); + constructor(element: Element, options?: Map.Model); + model:Map.Model; + defaults:Map.Model; + + /** Method for navigating to specific shape based on latitude, longitude and zoomlevel. + * @param {number} Pass the latitude value for map + * @param {number} Pass the longitude value for map + * @param {number} Pass the zoom level for map + * @returns {void} + */ + navigateTo(latitude: number, longitude: number, level: number): void; + + /** Method to perform map panning + * @param {string} Pass the direction in which map should be panned + * @returns {void} + */ + pan(direction: string): void; + + /** Method to reload the map. + * @returns {void} + */ + refresh(): void; + + /** Method to reload the shapeLayers with updated values + * @returns {void} + */ + refreshLayers(): void; + + /** Method to reload the navigation control with updated values. + * @param {any} Pass the navigation control instance + * @returns {void} + */ + refreshNavigationControl(navigation: any): void; + + /** Method to perform map zooming. + * @param {number} Pass the zoom level for map to be zoomed + * @param {boolean} Pass the boolean value to enable or disable animation while zooming + * @returns {void} + */ + zoom(level: number, isAnimate: boolean): void; +} +export module Map{ + +export interface Model { + + /**Specifies the background color for map + * @Default {white} + */ + background?: string; + + /**Specifies the base map-index of the map to determine the shapelayer to be displayed + * @Default {0} + */ + baseMapIndex?: number; + + /**Specify the center position where map should be displayed + * @Default {[0,0]} + */ + centerPosition?: any; + + /**Enables or Disables the map animation + * @Default {false} + */ + enableAnimation?: boolean; + + /**Enables or Disables the animation for layer change in map + * @Default {false} + */ + enableLayerChangeAnimation?: boolean; + + /**Enables or Disables the map panning + * @Default {true} + */ + enablePan?: boolean; + + /**Determines whether map need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /**Enables or Disables the zooming of map + * @Default {true} + */ + enableZoom?: boolean; + + /**Enables or Disables the zoom on selecting the map shape + * @Default {false} + */ + enableZoomOnSelection?: boolean; + + /**Specifies the zoom factor for map zoom value. + * @Default {1} + */ + factor?: number; + + /**Hold the shapelayers to be displayed in map + * @Default {[]} + */ + layers?: Array; + + /**Specifies the zoom level value for which map to be zoomed + * @Default {1} + */ + level?: number; + + /**Specifies the maximum zoom level of the map + * @Default {100} + */ + maxValue?: number; + + /**Specifies the minimum zoomSettings level of the map + * @Default {1} + */ + minValue?: number; + + /**Enables or Disables the navigation control for map to perform zooming and panning on map shapes. + */ + navigationControl?: any; + + /**Layer for holding the map shapes + */ + shapeLayer?: ShapeLayer; + + /**Enables or Disables the Zooming for map. + */ + zoomSettings?: any; + + /**Triggered on selecting the map markers.*/ + markerSelected? (e: MarkerSelectedEventArgs): void; + + /**Triggers while leaving the hovered map shape*/ + mouseleave? (e: MouseleaveEventArgs): void; + + /**Triggers while hovering the map shape.*/ + mouseover? (e: MouseoverEventArgs): void; + + /**Triggers once map render completed.*/ + onRenderComplete? (e: OnRenderCompleteEventArgs): void; + + /**Triggers when map panning ends.*/ + panned? (e: PannedEventArgs): void; + + /**Triggered on selecting the map shapes.*/ + shapeSelected? (e: ShapeSelectedEventArgs): void; + + /**Triggered when map is zoomed-in.*/ + zoomedIn? (e: ZoomedInEventArgs): void; + + /**Triggers when map is zoomed out.*/ + zoomedOut? (e: ZoomedOutEventArgs): void; +} + +export interface MarkerSelectedEventArgs { + + /**Returns marker object. + */ + originalEvent?: any; +} + +export interface MouseleaveEventArgs { + + /**Returns hovered map shape object. + */ + originalEvent?: any; +} + +export interface MouseoverEventArgs { + + /**Returns hovered map shape object. + */ + originalEvent?: any; +} + +export interface OnRenderCompleteEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; +} + +export interface PannedEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; +} + +export interface ShapeSelectedEventArgs { + + /**Returns selected shape object. + */ + originalEvent?: any; +} + +export interface ZoomedInEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; + + /**Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; +} + +export interface ZoomedOutEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; + + /**Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; +} + +export interface ShapeLayerBubbleSettings { + + /**Specifies the bubble Opacity value of bubbles for shape layer in map + * @Default {0.9} + */ + bubbleOpacity?: number; + + /**Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + color?: string; + + /**Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: any; + + /**Specifies the bubble color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /**Specifies the maximum size value of bubbles for shape layer in map + * @Default {20} + */ + maxValue?: number; + + /**Specifies the minimum size value of bubbles for shape layer in map + * @Default {10} + */ + minValue?: number; + + /**Specifies the showBubble visibility status map + * @Default {true} + */ + showBubble?: boolean; + + /**Specifies the tooltip visibility status of the shape layer in map + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the bubble tooltip template of the shape layer in map + * @Default {null} + */ + tooltipTemplate?: string; + + /**Specifies the bubble valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; +} + +export interface ShapeLayerLabelSettings { + + /**enable or disable the enableSmartLabel property + * @Default {false} + */ + enableSmartLabel?: boolean; + + /**set the labelLength property + * @Default {'2'} + */ + labelLength?: number; + + /**set the labelPath property + * @Default {null} + */ + labelPath?: string; + + /**enable or disable the showlabel property + * @Default {false} + */ + showLabels?: boolean; + + /**set the smartLabelSize property + * @Default {fixed} + */ + smartLabelSize?: ej.datavisualization.Map.LabelSize|string; +} + +export interface ShapeLayerLegendSettings { + + /**Determines whether the legend should be placed outside or inside the map bounds + * @Default {false} + */ + dockOnMap?: boolean; + + /**Determines the legend placement and it is valid only when dockOnMap is true + * @Default {top} + */ + dockPosition?: ej.datavisualization.Map.DockPosition|string; + + /**height value for legend setting + * @Default {0} + */ + height?: number; + + /**to get icon value for legend setting + * @Default {rectangle} + */ + icon?: ej.datavisualization.Map.LegendIcons|string; + + /**icon height value for legend setting + * @Default {20} + */ + iconHeight?: number; + + /**icon Width value for legend setting + * @Default {20} + */ + iconWidth?: number; + + /**set the orientation of legend labels + * @Default {vertical} + */ + labelOrientation?: ej.datavisualization.Map.LabelOrientation|string; + + /**to get leftLabel value for legend setting + * @Default {null} + */ + leftLabel?: string; + + /**to get mode of legend setting + * @Default {default} + */ + mode?: ej.datavisualization.Map.LegendMode|string; + + /**set the position of legend settings + * @Default {topleft} + */ + position?: ej.datavisualization.Map.Position|string; + + /**x position value for legend setting + * @Default {0} + */ + positionX?: number; + + /**y position value for legend setting + * @Default {0} + */ + positionY?: number; + + /**to get rightLabel value for legend setting + * @Default {null} + */ + rightLabel?: string; + + /**Enables or Disables the showLabels + * @Default {false} + */ + showLabels?: boolean; + + /**Enables or Disables the showLegend + * @Default {false} + */ + showLegend?: boolean; + + /**to get title of legend setting + * @Default {null} + */ + title?: string; + + /**to get type of legend setting + * @Default {layers} + */ + type?: ej.datavisualization.Map.LegendType|string; + + /**width value for legend setting + * @Default {0} + */ + width?: number; +} + +export interface ShapeLayerShapeSettings { + + /**Enables or Disables the auto fill colors for shape layer in map. When this property value set to true, shapes will be filled with palette colors. + * @Default {false} + */ + autoFill?: boolean; + + /**Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: any; + + /**Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. + * @Default {palette1} + */ + colorPalette?: string; + + /**Specifies the shape color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /**Enables or Disables the gradient colors for map shapes. + * @Default {false} + */ + enableGradient?: boolean; + + /**Specifies the shape fill color of the shape layer in map + * @Default {#E5E5E5} + */ + fill?: string; + + /**Specifies the mouse over width of the shape layer in map + * @Default {1} + */ + highlightBorderWidth?: number; + + /**Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + highlightColor?: string; + + /**Specifies the mouse over stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + highlightStroke?: string; + + /**Specifies the shape selection color of the shape layer in map + * @Default {gray} + */ + selectionColor?: string; + + /**Specifies the shape selection stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + selectionStroke?: string; + + /**Specifies the shape selection stroke width of the shape layer in map + * @Default {1} + */ + selectionStrokeWidth?: number; + + /**Specifies the shape stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + stroke?: string; + + /**Specifies the shape stroke thickness value of the shape layer in map + * @Default {0.2} + */ + strokeThickness?: number; + + /**Specifies the shape valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; +} + +export interface ShapeLayer { + + /**to get the type of bing map. + * @Default {aerial} + */ + bingMapType?: ej.datavisualization.Map.BingMapType|string; + + /**Specifies the bubble settings for map + */ + bubbleSettings?: ShapeLayerBubbleSettings; + + /**Specifies the datasource for the shape layer + */ + dataSource?: any; + + /**Enables or disables the animation + * @Default {false} + */ + enableAnimation?: boolean; + + /**Enables or disables the shape mouse hover + * @Default {false} + */ + enableMouseHover?: boolean; + + /**Enables or disables the shape selection + * @Default {true} + */ + enableSelection?: boolean; + + /**to get the key of bing map + * @Default {null} + */ + key?: string; + + /**Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., + */ + labelSettings?: ShapeLayerLabelSettings; + + /**Specifies the map type. + * @Default {'geometry'} + */ + layerType?: ej.datavisualization.Map.LayerType|string; + + /**Options for enabling and configuring legendSettings position, height, width, mode, type etc., + */ + legendSettings?: ShapeLayerLegendSettings; + + /**Specifies the map items template for shapes. + */ + mapItemsTemplate?: string; + + /**Specify markers for shape layer. + * @Default {[]} + */ + markers?: Array; + + /**Specifies the map marker template for map layer. + * @Default {null} + */ + markerTemplate?: string; + + /**Specify selectedMapShapes for shape layer + * @Default {[]} + */ + selectedMapShapes?: Array; + + /**Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.Map.SelectionMode|string; + + /**Specifies the shape data for the shape layer + */ + shapeDataobject?: any; + + /**Specifies the shape settings of map layer + */ + shapeSettings?: ShapeLayerShapeSettings; + + /**Shows or hides the map items. + * @Default {false} + */ + showMapItems?: boolean; + + /**Shows or hides the tooltip for shapes + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the sub shape layers + * @Default {[]} + */ + subLayers?: Array; + + /**Specifies the tooltip template for shapes. + */ + tooltipTemplate?: string; + + /**Specifies the url template for the OSM type map. + * @Default {'http://a.tile.openstreetmap.org/level/tileX/tileY.png'} + */ + urlTemplate?: string; +} +} +module Map +{ +enum Position +{ +//specifies the none position +None, +//specifies the topleft position +Topleft, +//specifies the topcenter position +Topcenter, +//specifies the topright position +Topright, +//specifies the centerleft position +Centerleft, +//specifies the center position +Center, +//specifies the centerright position +Centerright, +//specifies the bottomleft position +Bottomleft, +//specifies the bottomcenter position +Bottomcenter, +//specifies the bottomright position +Bottomright, +} +} +module Map +{ +enum Orientation +{ +//specifies the horizontal position +Horizontal, +//specifies the vertical position +Vertical, +} +} +module Map +{ +enum BingMapType +{ +//specifies the aerial type +Aerial, +//specifies the aerialwithlabel type +Aerialwithlabel, +//specifies the road type +Road, +} +} +module Map +{ +enum LabelSize +{ +//specifies the fixed size +Fixed, +//specifies the default size +Default, +} +} +module Map +{ +enum LayerType +{ +//specifies the geometry type +Geometry, +//specifies the osm type +Osm, +//specifies the bing type +Bing, +} +} +module Map +{ +enum DockPosition +{ +//specifies the top position +Top, +//specifies the bottom position +Bottom, +//specifies the bottom position +Right, +//specifies the left position +Left, +} +} +module Map +{ +enum LegendIcons +{ +//specifies the rectangle position +Rectangle, +//specifies the circle position +Circle, +} +} +module Map +{ +enum LabelOrientation +{ +//specifies the horizontal position +Horizontal, +//specifies the vertical position +Vertical, +} +} +module Map +{ +enum LegendMode +{ +//specifies the default mode +Default, +//specifies the interactive mode +Interactive, +} +} +module Map +{ +enum LegendType +{ +//specifies the layers type +Layers, +//specifies the bubbles type +Bubbles, +} +} +module Map +{ +enum SelectionMode +{ +//specifies the default position +Default, +//specifies the multiple position +Multiple, +} +} + +class TreeMap extends ej.Widget { + static fn: TreeMap; + constructor(element: JQuery, options?: TreeMap.Model); + constructor(element: Element, options?: TreeMap.Model); + model:TreeMap.Model; + defaults:TreeMap.Model; + + /** Method to reload treemap with updated values. + * @returns {void} + */ + refresh(): void; +} +export module TreeMap{ + +export interface Model { + + /**Specifies the border brush color of the treemap + * @Default {white} + */ + borderBrush?: string; + + /**Specifies the border thickness of the treemap + * @Default {1} + */ + borderThickness?: number; + + /**Specifies the colors of the paletteColorMapping + * @Default {[]} + */ + colors?: Array; + + /**Specifies the color valuepath of the treemap + * @Default {null} + */ + colorValuePath?: string; + + /**Specifies the datasource of the treemap + * @Default {null} + */ + dataSource?: any; + + /**Specifies the desaturationColorMapping settings of the treemap + */ + desaturationColorMapping?: any; + + /**Specifies the dockPosition for legend + * @Default {top} + */ + dockPosition?: ej.datavisualization.TreeMap.DockPosition|string; + + /**specifies the drillDown header color + * @Default {'null'} + */ + drillDownHeaderColor?: string; + + /**specifies the drillDown selection color + * @Default {'#000000'} + */ + drillDownSelectionColor?: string; + + /**Enable/Disable the drillDown for treemap + * @Default {false} + */ + enableDrillDown?: boolean; + + /**Specifies whether treemap need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /**Specifies the from value for desaturation color mapping + * @Default {0} + */ + from?: number; + + /**Specifies the group color mapping of the treemap + * @Default {[]} + */ + groupColorMapping?: Array; + + /**Specifies the height for legend + * @Default {30} + */ + height?: number; + + /**Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightBorderBrush?: string; + + /**Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightBorderThickness?: number; + + /**Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightGroupBorderBrush?: string; + + /**Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightGroupBorderThickness?: number; + + /**Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightGroupOnSelection?: boolean; + + /**Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightOnSelection?: boolean; + + /**Specifies the iconHeight for legend + * @Default {15} + */ + iconHeight?: number; + + /**Specifies the iconWidth for legend + * @Default {15} + */ + iconWidth?: number; + + /**Specifies the items layout mode of the treemap. Accepted itemsLayoutMode values are Squarified, SliceAndDiceHorizontal, SliceAndDiceVertical and SliceAndDiceAuto + * @Default {Squarified} + */ + itemsLayoutMode?: ej.datavisualization.TreeMap.ItemsLayoutMode|string; + + /**Specifies the leaf settings of the treemap + */ + leafItemSettings?: LeafItemSettings; + + /**Specifies the legend settings of the treemap + */ + legendSettings?: any; + + /**Specify levels of treemap for grouped visualization of datas + * @Default {[]} + */ + levels?: Array; + + /**Specifies the paletteColorMapping of the treemap + */ + paletteColorMapping?: any; + + /**Specifies the rangeColorMapping settings of the treemap + */ + rangeColorMapping?: Array; + + /**Specifies the rangeMaximum value for desaturation color mapping + * @Default {0} + */ + rangeMaximum?: number; + + /**Specifies the rangeMinimum value for desaturation color mapping + * @Default {0} + */ + rangeMinimum?: number; + + /**Specifies the legend visibility status of the treemap + * @Default {false} + */ + showLegend?: boolean; + + /**Specifies whether treemap tooltip need to be visible + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the template for legendSettings + * @Default {null} + */ + template?: string; + + /**Specifies the to value for desaturation color mapping + * @Default {0} + */ + to?: number; + + /**Specifies the tooltip template of the treemap + * @Default {null} + */ + tooltipTemplate?: string; + + /**Hold the treeMapItems to be displayed in treemap + * @Default {[]} + */ + treeMapItems?: Array; + + /**Hold the Level settings of TreeMap + */ + treeMapLevel?: TreeMapLevel; + + /**Specifies the uniColorMapping settings of the treemap + */ + uniColorMapping?: any; + + /**Specifies the weight valuepath of the treemap + * @Default {null} + */ + weightValuePath?: string; + + /**Specifies the width for legend + * @Default {100} + */ + width?: number; + + /**Triggers on treemap item selected.*/ + treeMapItemSelected? (e: TreeMapItemSelectedEventArgs): void; +} + +export interface TreeMapItemSelectedEventArgs { + + /**Returns selected treeMapItem object. + */ + originalEvent?: any; +} + +export interface LeafItemSettings { + + /**Specifies the border bruch color of the leaf item. + * @Default {white} + */ + borderBrush?: string; + + /**Specifies the border thickness of the leaf item. + * @Default {1} + */ + borderThickness?: number; + + /**Specifies the label template of the leaf item. + * @Default {null} + */ + itemTemplate?: string; + + /**Specifies the label path of the leaf item. + * @Default {null} + */ + labelPath?: string; + + /**Specifies the position of the leaf labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /**Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Shows or hides the label of the leaf item. + * @Default {false} + */ + showLabels?: boolean; +} + +export interface TreeMapLevel { + + /**specifies the group background + * @Default {null} + */ + groupBackground?: string; + + /**Specifies the group border color for tree map level. + * @Default {null} + */ + groupBorderColor?: string; + + /**Specifies the group border thickness for tree map level. + * @Default {1} + */ + groupBorderThickness?: number; + + /**Specifies the group gap for tree map level. + * @Default {1} + */ + groupGap?: number; + + /**Specifies the group padding for tree map level. + * @Default {4} + */ + groupPadding?: number; + + /**Specifies the group path for tree map level. + */ + groupPath?: string; + + /**Specifies the header height for tree map level. + * @Default {0} + */ + headerHeight?: number; + + /**Specifies the header template for tree map level. + * @Default {null} + */ + headerTemplate?: string; + + /**Specifies the mode of header visibility + * @Default {visible} + */ + headerVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Specifies the position of the labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /**Specifies the label template for tree map level. + * @Default {null} + */ + labelTemplate?: string; + + /**Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Shows or hides the header for tree map level. + * @Default {false} + */ + showHeader?: boolean; + + /**Shows or hides the labels for tree map level. + * @Default {false} + */ + showLabels?: boolean; +} +} +module TreeMap +{ +enum DockPosition +{ +//specifies the top position +Top, +//specifies the bottom position +Bottom, +//specifies the bottom position +Right, +//specifies the left position +Left, +} +} +module TreeMap +{ +enum ItemsLayoutMode +{ +//specifies the squarified as layout type position +Squarified, +//specifies the sliceanddicehorizontal as layout type position +Sliceanddicehorizontal, +//specifies the sliceanddicevertical as layout type position +Sliceanddicevertical, +//specifies the sliceanddiceauto as layout type position +Sliceanddiceauto, +} +} +module TreeMap +{ +enum Position +{ +//specifies the none position +None, +//specifies the topleft position +Topleft, +//specifies the topcenter position +Topcenter, +//specifies the topright position +Topright, +//specifies the centerleft position +Centerleft, +//specifies the center position +Center, +//specifies the centerright position +Centerright, +//specifies the bottomleft position +Bottomleft, +//specifies the bottomcenter position +Bottomcenter, +//specifies the bottomright position +Bottomright, +} +} +module TreeMap +{ +enum VisibilityMode +{ +//specifies the visible mode +Top, +//specifies the hideonexceededlength mode +Hideonexceededlength, +} +} +module TreeMap +{ +enum groupSelectionMode +{ +//specifies the default mode +Default, +//specifies the multiple mode +Multiple, +} +} + +class Diagram extends ej.Widget { + static fn: Diagram; + constructor(element: JQuery, options?: Diagram.Model); + constructor(element: Element, options?: Diagram.Model); + model:Diagram.Model; + defaults:Diagram.Model; + + /** Add nodes and connectors to diagram at runtime + * @param {any} a JSON to define a node/connector or an array of nodes and connector + * @returns {void} + */ + add(node: any): void; + + /** Add a label to a node at runtime + * @param {string} name of the node to which label will be added + * @param {any} JSON for the new label to be added + * @returns {void} + */ + addLabel(nodeName: string, newLabel: any): void; + + /** Add a phase to a swimlane at runtime + * @param {string} name of the swimlane to which the phase will be added + * @param {any} JSON object to define the phase to be added + * @returns {void} + */ + addPhase(name: string, options: any): void; + + /** Add a collection of ports to the node specified by name + * @param {string} name of the node to which the ports have to be added + * @param {Array} a collection of ports to be added to the specified node + * @returns {void} + */ + addPorts(name: string, ports: Array): void; + + /** Add the specified node to selection list + * @param {any} the node to be selected + * @param {boolean} to define whether to clear the existing selection or not + * @returns {void} + */ + addSelection(node: any, clearSelection: boolean): void; + + /** Align the selected objects based on the reference object and direction + * @param {string} to specify the direction towards which the selected objects are to be aligned("left","right",top","bottom") + * @returns {void} + */ + align(direction: string): void; + + /** Bring the specified portion of the diagram content to the diagram viewport + * @param {any} the rectangular region that is to be brought into diagram viewport + * @returns {void} + */ + bringIntoView(rect: any): void; + + /** Bring the specified portion of the diagram content to the center of the diagram viewport + * @param {any} the rectangular region that is to be brought to the center of diagram viewport + * @returns {void} + */ + bringToCenter(rect: any): void; + + /** Visually move the selected object over all other intersected objects + * @returns {void} + */ + bringToFront(): void; + + /** Remove all the elements from diagram + * @returns {void} + */ + clear(): void; + + /** Remove the current selection in diagram + * @returns {void} + */ + clearSelection(): void; + + /** Copy the selected object to internal clipboard and get the copied object + * @returns {any} + */ + copy(): any; + + /** Cut the selected object from diagram to diagram internal clipboard + * @returns {void} + */ + cut(): void; + + /** Export the diagram as downloadable files or as data + * @param {Diagram.Options} options to export the desired region of diagram to the desired formats.NameTypeDescriptionfileNamestringname of the file to be downloaded.formatstringformat of the exported file/data. See [File Formats](/js/api/global#fileformats).modestringto set whether to export diagram as a file or as raw data. See [Export Modes](/js/api/global#exportmodes).regionstringto set the region of the diagram to be exported. See [Region](/js/api/global#region).boundsobjectto export any custom region of diagram.marginobjectto set margin to the exported data. + * @returns {string} + */ + exportDiagram(options: Diagram.Options): string; + + /** Read a node/connector object by its name + * @param {string} name of the node/connector that is to be identified + * @returns {any} + */ + findNode(name: string): any; + + /** Fit the diagram content into diagram viewport + * @param {string} to set the mode of fit to command. See [Fit Mode](/js/api/global#fitmode) + * @param {string} to set whether the region to be fit will be based on diagram elements or page settings [Region](/js/api/global#region) + * @param {any} to set the required margin + * @returns {void} + */ + fitToPage(mode: string, region: string, margin: any): void; + + /** Group the selected nodes and connectors + * @returns {void} + */ + group(): void; + + /** Insert a label into a node's label collection at runtime + * @param {string} name of the node to which the label has to be inserted + * @param {any} JSON to define the new label + * @param {number} index to insert the label into the node + * @returns {void} + */ + insertLabel(name: string, label: any, index: number): void; + + /** Refresh the diagram with the specified layout + * @returns {void} + */ + layout(): void; + + /** Load the diagram + * @param {any} JSON data to load the diagram + * @returns {void} + */ + load(data: any): void; + + /** Visually move the selected object over its closest intersected object + * @returns {void} + */ + moveForward(): void; + + /** Move the selected objects by either one pixel or by the pixels specified through argument + * @param {string} specifies the direction to move the selected objects ("left","right",top","bottom") + * @param {number} specifies the number of pixels by which the selected objects have to be moved + * @returns {void} + */ + nudge(direction: string, delta: number): void; + + /** Paste the selected object from internal clipboard to diagram + * @param {any} object to be added to diagram + * @param {boolean} to define whether the specified object is to be renamed or not + * @returns {void} + */ + paste(object: any, rename: boolean): void; + + /** Print the diagram as image + * @returns {void} + */ + print(): void; + + /** Restore the last action that was reverted + * @returns {void} + */ + redo(): void; + + /** Refresh the diagram at runtime + * @returns {void} + */ + refresh(): void; + + /** Remove either the given node/connector or the selected element from diagram + * @param {any} the node/connector to be removed from diagram + * @returns {void} + */ + remove(node: any): void; + + /** Remove a particular object from selection list + * @param {any} the node/connector to be removed from selection list + * @returns {void} + */ + removeSelection(node: any): void; + + /** Scale the selected objects to the height of the first selected object + * @returns {void} + */ + sameHeight(): void; + + /** Scale the selected objects to the size of the first selected object + * @returns {void} + */ + sameSize(): void; + + /** Scale the selected objects to the width of the first selected object + * @returns {void} + */ + sameWidth(): void; + + /** Returns the diagram as serialized JSON + * @returns {any} + */ + save(): any; + + /** Bring the node into view + * @param {any} the node/connector to be brought into view + * @returns {void} + */ + scrollToNode(node: any): void; + + /** Select all nodes and connector in diagram + * @returns {void} + */ + selectAll(): void; + + /** Visually move the selected object behind its closest intersected object + * @returns {void} + */ + sendBackward(): void; + + /** Visually move the selected object behind all other intersected objects + * @returns {void} + */ + sendToBack(): void; + + /** Update the horizontal space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceAcross(): void; + + /** Update the vertical space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceDown(): void; + + /** Move the specified label to edit mode + * @param {any} node/connector that contains the label to be edited + * @param {any} to be edited + * @returns {void} + */ + startLabelEdit(node: any, label: any): void; + + /** Reverse the last action that was performed + * @returns {void} + */ + undo(): void; + + /** Ungroup the selected group + * @returns {void} + */ + ungroup(): void; + + /** Update diagram at runtime + * @param {any} JSON to specify the diagram properties that have to be modified + * @returns {void} + */ + update(options: any): void; + + /** Update Connectors at runtime + * @param {string} name of the connector to be updated + * @param {any} JSON to specify the connector properties that have to be updated + * @returns {void} + */ + updateConnector(name: string, options: any): void; + + /** Update the given label at runtime + * @param {string} the name of node/connector which contains the label to be updated + * @param {any} the label to be modified + * @param {any} JSON to specify the label properties that have to be updated + * @returns {any} + */ + updateLabel(nodeName: string, label: any, options: any): any; + + /** Update nodes at runtime + * @param {string} name of the node that is to be updated + * @param {any} JSON to specify the properties of node that have to be updated + * @returns {void} + */ + updateNode(name: string, options: any): void; + + /** Update a port with its modified properties at runtime + * @param {string} the name of node which contains the port to be updated + * @param {any} the port to be updated + * @param {any} JSON to specify the properties of the port that have to be updated + * @returns {void} + */ + updatePort(nodeName: string, port: any, options: any): void; + + /** Update the specified node as selected object + * @param {string} name of the node to be updated as selected object + * @returns {void} + */ + updateSelectedObject(name: string): void; + + /** Update the selection at runtime + * @param {boolean} to specify whether to show the user handles or not + * @returns {void} + */ + updateSelection(showUserHandles: boolean): void; + + /** Update userhandles with respect to the given node + * @param {any} node/connector with respect to which, the user handles have to be updated + * @returns {void} + */ + updateUserHandles(node: any): void; + + /** Update the diagram viewport at runtime + * @returns {void} + */ + updateViewPort(): void; + + /** Upgrade the diagram from old version + * @param {any} to be upgraded + * @returns {void} + */ + upgrade(data: any): void; + + /** Used to zoomIn/zoomOut diagram + * @param {any} options to zoom the diagram(zoom factor, zoomIn/zoomOut) + * @returns {void} + */ + zoomTo(zoom: any): void; +} +export module Diagram{ + +export interface Options { + + /**name of the file to be downloaded. + */ + fileName?: string; + + /**format of the exported file/data. See [File Formats](/js/api/global#fileformats). + */ + format?: string; + + /**to set whether to export diagram as a file or as raw data. See [Export Modes](/js/api/global#exportmodes). + */ + mode?: string; + + /**to set the region of the diagram to be exported. See [Region](/js/api/global#region). + */ + region?: string; + + /**to export any custom region of diagram. + */ + bounds?: any; + + /**to set margin to the exported data. + */ + margin?: any; +} + +export interface Model { + + /**Defines the background color of diagram elements + * @Default {transparent} + */ + backgroundColor?: string; + + /**Defines the path of the background image of diagram elements + * @Default {null} + */ + backgroundImage?: string; + + /**Sets the direction of line bridges. + * @Default {ej.datavisualization.Diagram.BridgeDirection.Top} + */ + bridgeDirection?: ej.datavisualization.Diagram.BridgeDirection|string; + + /**Defines a set of custom commands and binds them with a set of desired key gestures. + */ + commandManager?: CommandManager; + + /**A collection of JSON objects where each object represents a connector + * @Default {[]} + */ + connectors?: Array; + + /**Binds the custom JSON data with connector properties + * @Default {null} + */ + connectorTemplate?: any; + + /**Enables/Disables the default behaviors of the diagram. + * @Default {ej.datavisualization.Diagram.DiagramConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.DiagramConstraints|string; + + /**An object to customize the context menu of diagram + */ + contextMenu?: ContextMenu; + + /**Configures the data source that is to be bound with diagram + */ + dataSourceSettings?: DataSourceSettings; + + /**Initializes the default values for nodes and connectors + * @Default {{}} + */ + defaultSettings?: DefaultSettings; + + /**Sets the type of Json object to be drawn through drawing tool + * @Default {{}} + */ + drawType?: any; + + /**Enables or disables auto scroll in diagram + * @Default {true} + */ + enableAutoScroll?: boolean; + + /**Enables or disables diagram context menu + * @Default {true} + */ + enableContextMenu?: boolean; + + /**Specifies the height of the diagram + * @Default {null} + */ + height?: string; + + /**Customizes the undo redo functionality + */ + historyManager?: HistoryManager; + + /**Automatically arranges the nodes and connectors in a predefined manner + */ + layout?: Layout; + + /**Defines the current culture of diagram + * @Default {en-US} + */ + locale?: string; + + /**Array of JSON objects where each object represents a node + * @Default {[]} + */ + nodes?: Array; + + /**Binds the custom JSON data with node properties + * @Default {null} + */ + nodeTemplate?: any; + + /**Defines the size and appearance of diagram page + */ + pageSettings?: PageSettings; + + /**Defines the zoom value, zoom factor, scroll status and view port size of the diagram + */ + scrollSettings?: ScrollSettings; + + /**Defines the size and position of selected items and defines the appearance of selector + */ + selectedItems?: SelectedItems; + + /**Enables or disables tooltip of diagram + * @Default {true} + */ + showTooltip?: boolean; + + /**Defines the gridlines and defines how and when the objects have to be snapped + */ + snapSettings?: SnapSettings; + + /**Enables/Disables the interactive behaviors of diagram. + * @Default {ej.datavisualization.Diagram.Tool.All} + */ + tool?: ej.datavisualization.Diagram.Tool|string; + + /**An object that defines the description, appearance and alignments of tooltips + * @Default {null} + */ + tooltip?: Tooltip; + + /**Specifies the width of the diagram + * @Default {null} + */ + width?: string; + + /**Sets the factor by which we can zoom in or zoom out + * @Default {0.2} + */ + zoomFactor?: number; + + /**Triggers When auto scroll is changed*/ + autoScrollChange? (e: AutoScrollChangeEventArgs): void; + + /**Triggers when a node, connector or diagram is clicked*/ + click? (e: ClickEventArgs): void; + + /**Triggers when the connection is changed*/ + connectionChange? (e: ConnectionChangeEventArgs): void; + + /**Triggers when the connector collection is changed*/ + connectorCollectionChange? (e: ConnectorCollectionChangeEventArgs): void; + + /**Triggers when the connectors' source point is changed*/ + connectorSourceChange? (e: ConnectorSourceChangeEventArgs): void; + + /**Triggers when the connectors' target point is changed*/ + connectorTargetChange? (e: ConnectorTargetChangeEventArgs): void; + + /**Triggers before opening the context menu*/ + contextMenuBeforeOpen? (e: ContextMenuBeforeOpenEventArgs): void; + + /**Triggers when a context menu item is clicked*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Triggers when a node, connector or diagram model is clicked twice*/ + doubleClick? (e: DoubleClickEventArgs): void; + + /**Triggers while dragging the elements in diagram*/ + drag? (e: DragEventArgs): void; + + /**Triggers when a symbol is dragged into diagram from symbol palette*/ + dragEnter? (e: DragEnterEventArgs): void; + + /**Triggers when a symbol is dragged outside of the diagram.*/ + dragLeave? (e: DragLeaveEventArgs): void; + + /**Triggers when a symbol is dragged over diagram*/ + dragOver? (e: DragOverEventArgs): void; + + /**Triggers when a symbol is dragged and dropped from symbol palette to drawing area*/ + drop? (e: DropEventArgs): void; + + /**Triggers when a child is added to or removed from a group*/ + groupChange? (e: GroupChangeEventArgs): void; + + /**Triggers when a diagram element is clicked*/ + itemClick? (e: ItemClickEventArgs): void; + + /**Triggers when mouse enters a node/connector*/ + mouseEnter? (e: MouseEnterEventArgs): void; + + /**Triggers when mouse leaves node/connector*/ + mouseLeave? (e: MouseLeaveEventArgs): void; + + /**Triggers when mouse hovers over a node/connector*/ + mouseOver? (e: MouseOverEventArgs): void; + + /**Triggers when node collection is changed*/ + nodeCollectionChange? (e: NodeCollectionChangeEventArgs): void; + + /**Triggers when the node properties(x, y,width and height alone) are changed using nudge commands or updateNode API.*/ + propertyChange? (e: PropertyChangeEventArgs): void; + + /**Triggers when the diagram elements are rotated*/ + rotationChange? (e: RotationChangeEventArgs): void; + + /**Triggers when the diagram is zoomed or panned*/ + scrollChange? (e: ScrollChangeEventArgs): void; + + /**Triggers when a connector segment is edited*/ + segmentChange? (e: SegmentChangeEventArgs): void; + + /**Triggers when the selection is changed in diagram*/ + selectionChange? (e: SelectionChangeEventArgs): void; + + /**Triggers when a node is resized*/ + sizeChange? (e: SizeChangeEventArgs): void; + + /**Triggers when label editing is ended*/ + textChange? (e: TextChangeEventArgs): void; +} + +export interface AutoScrollChangeEventArgs { + + /**Returns the delay between subsequent auto scrolls + */ + delay?: string; +} + +export interface ClickEventArgs { + + /**parameter returns the clicked node, connector or diagram + */ + element?: any; + + /**parameter returns the object that is actually clicked + */ + actualObject?: number; + + /**parameter returns the horizontal coordinate of the mouse pointer, relative to the diagram + */ + offsetX?: number; + + /**parameter returns the vertical coordinate of the mouse pointer, relative to the diagram + */ + offsetY?: number; + + /**parameter returns the count of how many times the mouse button is pressed + */ + count?: number; + + /**parameter returns the actual click event arguments that explains which button is clicked + */ + event?: any; +} + +export interface ConnectionChangeEventArgs { + + /**parameter returns the connection that is changed between nodes, ports or points + */ + element?: any; + + /**parameter returns the new source node or target node of the connector + */ + connection?: string; + + /**parameter returns the new source port or target port of the connector + */ + port?: any; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ConnectorCollectionChangeEventArgs { + + /**parameter returns whether the connector is inserted or removed + */ + changeType?: string; + + /**parameter returns the connector that is to be added or deleted + */ + element?: any; + + /**parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; +} + +export interface ConnectorSourceChangeEventArgs { + + /**returns the connector, the source point of which is being dragged + */ + element?: any; + + /**returns the source node of the element + */ + node?: any; + + /**returns the source point of the element + */ + point?: any; + + /**returns the source port of the element + */ + port?: any; + + /**returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ConnectorTargetChangeEventArgs { + + /**parameter returns the connector, the target point of which is being dragged + */ + element?: any; + + /**returns the target node of the element + */ + node?: any; + + /**returns the target point of the element + */ + point?: any; + + /**returns the target port of the element + */ + port?: any; + + /**returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ContextMenuBeforeOpenEventArgs { + + /**parameter returns the diagram object + */ + diagram?: any; + + /**parameter returns the actual arguments from context menu + */ + contextmenu?: any; + + /**parameter returns the object that was clicked + */ + target?: any; +} + +export interface ContextMenuClickEventArgs { + + /**parameter returns the id of the selected context menu item + */ + id?: string; + + /**parameter returns the text of the selected context menu item + */ + text?: string; + + /**parameter returns the parent id of the selected context menu item + */ + parentId?: string; + + /**parameter returns the parent text of the selected context menu item + */ + parentText?: string; + + /**parameter returns the object that was clicked + */ + target?: any; + + /**parameter defines whether to execute the click event or not + */ + canExecute?: boolean; +} + +export interface DoubleClickEventArgs { + + /**parameter returns the object that is actually clicked + */ + actualObject?: any; + + /**parameter returns the selected object + */ + element?: any; +} + +export interface DragEventArgs { + + /**parameter returns the node or connector that is being dragged + */ + element?: any; + + /**parameter returns the previous position of the node/connector + */ + oldValue?: any; + + /**parameter returns the new position of the node/connector + */ + newValue?: any; + + /**parameter returns the state of drag event (Starting, dragging, completed) + */ + dragState?: string; + + /**parameter returns whether or not to cancel the drag event + */ + cancel?: boolean; +} + +export interface DragEnterEventArgs { + + /**parameter returns the node or connector that is dragged into diagram + */ + element?: any; + + /**parameter returns whether to add or remove the symbol from diagram + */ + cancel?: boolean; +} + +export interface DragLeaveEventArgs { + + /**parameter returns the node or connector that is dragged outside of the diagram + */ + element?: any; +} + +export interface DragOverEventArgs { + + /**parameter returns the node or connector that is dragged over diagram + */ + element?: any; + + /**parameter defines whether the symbol can be dropped at the current mouse position + */ + allowDrop?: boolean; + + /**parameter returns the node/connector over which the symbol is dragged + */ + target?: any; + + /**parameter returns the previous position of the node/connector + */ + oldValue?: any; + + /**parameter returns the new position of the node/connector + */ + newValue?: any; + + /**parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; +} + +export interface DropEventArgs { + + /**parameter returns node or connector that is being dropped + */ + element?: any; + + /**parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; + + /**parameter returns the object from where the element is dragged + */ + source?: any; + + /**parameter returns the object over which the object will be dropped + */ + target?: any; + + /**parameter returns the enum which defines the type of the source + */ + sourceType?: string; +} + +export interface GroupChangeEventArgs { + + /**parameter returns the object that is added to/removed from a group + */ + element?: any; + + /**parameter returns the old parent group(if any) of the object + */ + oldParent?: any; + + /**parameter returns the new parent group(if any) of the object + */ + newParent?: any; + + /**parameter returns the cause of group change("group", unGroup") + */ + cause?: string; +} + +export interface ItemClickEventArgs { + + /**parameter returns the object that was actually clicked + */ + actualObject?: any; + + /**parameter returns the object that is selected + */ + selectedObject?: any; + + /**parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; + + /**parameter returns the actual click event arguments that explains which button is clicked + */ + event?: any; +} + +export interface MouseEnterEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the selected object is dragged + */ + source?: any; + + /**parameter returns the target object over which the selected object is dragged + */ + target?: any; +} + +export interface MouseLeaveEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the selected object is dragged + */ + source?: any; + + /**parameter returns the target object over which the selected object is dragged + */ + target?: any; +} + +export interface MouseOverEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the element is dragged + */ + source?: any; + + /**parameter returns the object over which the element is being dragged. + */ + target?: any; +} + +export interface NodeCollectionChangeEventArgs { + + /**parameter returns whether the node is to be added or removed + */ + changeType?: string; + + /**parameter returns the node which needs to be added or deleted + */ + element?: any; + + /**parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; +} + +export interface PropertyChangeEventArgs { + + /**parameter returns the selected element + */ + element?: any; + + /**parameter returns the action is nudge or not + */ + cause?: string; + + /**parameter returns the new value of the node property that is being changed + */ + newValue?: any; + + /**parameter returns the old value of the property that is being changed + */ + oldValue?: any; + + /**parameter returns the name of the property that is changed + */ + propertyName?: string; +} + +export interface RotationChangeEventArgs { + + /**parameter returns the node that is rotated + */ + element?: any; + + /**parameter returns the previous rotation angle + */ + oldValue?: any; + + /**parameter returns the new rotation angle + */ + newValue?: any; + + /**parameter to specify whether or not to cancel the event + */ + cancel?: boolean; +} + +export interface ScrollChangeEventArgs { + + /**Parameter returns the new zoom value, horizontal and vertical scroll offsets. + */ + newValues?: any; + + /**parameter returns the previous zoom value, horizontal and vertical scroll offsets. + */ + oldValues?: any; +} + +export interface SegmentChangeEventArgs { + + /**Parameter returns the connector that is being edited + */ + element?: any; + + /**parameter returns the state of editing (starting, dragging, completed) + */ + dragState?: string; + + /**parameter returns the current mouse position + */ + point?: any; + + /**parameter to specify whether or not to cancel the event + */ + cancel?: boolean; +} + +export interface SelectionChangeEventArgs { + + /**parameter returns whether the item is selected or removed selection + */ + changeType?: string; + + /**parameter returns the item which is selected or to be selected + */ + element?: any; + + /**parameter returns the collection of nodes and connectors that have to be removed from selection list + */ + oldItems?: Array; + + /**parameter returns the collection of nodes and connectors that have to be added to selection list + */ + newItems?: Array; + + /**parameter returns the collection of nodes and connectors that will be selected after selection change + */ + selectedItems?: Array; + + /**parameter to specify whether or not to cancel the selection change event + */ + cancel?: boolean; +} + +export interface SizeChangeEventArgs { + + /**parameter returns node that was resized + */ + element?: any; + + /**parameter to cancel the size change + */ + cancel?: boolean; + + /**parameter returns the new width, height, offsetX and offsetY values of the element that is being resized + */ + newValue?: any; + + /**parameter returns the previous width,height,offsetX and offsetY values of the element that is being resized + */ + oldValue?: any; + + /**parameter returns the state of resizing(starting,resizing,completed) + */ + resizeState?: string; + + /**parameter returns the difference between new and old value + */ + offset?: any; +} + +export interface TextChangeEventArgs { + + /**parameter returns the node that contains the text being edited + */ + element?: any; + + /**parameter returns the new text + */ + value?: string; + + /**parameter returns the keyCode of the key entered + */ + keyCode?: string; +} + +export interface CommandManagerCommandsGesture { + + /**Sets the key value, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.Keys.None} + */ + key?: ej.datavisualization.Diagram.Keys|string; + + /**Sets a combination of key modifiers, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.KeyModifiers.None} + */ + keyModifiers?: ej.datavisualization.Diagram.KeyModifiers|string; +} + +export interface CommandManagerCommands { + + /**A method that defines whether the command is executable at the moment or not. + */ + canExecute?: Function; + + /**A method that defines what to be executed when the key combination is recognized. + */ + execute?: Function; + + /**Defines a combination of keys and key modifiers, on recognition of which the command will be executed + */ + gesture?: CommandManagerCommandsGesture; + + /**Defines any additional parameters that are required at runtime + * @Default {null} + */ + parameter?: any; +} + +export interface CommandManager { + + /**An object that maps a set of command names with the corresponding command objects + * @Default {{}} + */ + commands?: CommandManagerCommands; +} + +export interface ConnectorsSegments { + + /**Sets the direction of orthogonal segment + */ + direction?: string; + + /**Describes the length of orthogonal segment + * @Default {undefined} + */ + length?: number; + + /**Describes the end point of bezier/straight segment + * @Default {Diagram.Point()} + */ + point?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Defines the first control point of the bezier segment + * @Default {null} + */ + point1?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Defines the second control point of bezier segment + * @Default {null} + */ + point2?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Sets the type of the segment. + * @Default {ej.datavisualization.Diagram.Segments.Straight} + */ + type?: ej.datavisualization.Diagram.Segments|string; + + /**Describes the length and angle between the first control point and the start point of bezier segment + * @Default {null} + */ + vector1?: any; + + /**Describes the length and angle between the second control point and end point of bezier segment + * @Default {null} + */ + vector2?: any; +} + +export interface ConnectorsSourceDecorator { + + /**Sets the border color of the source decorator + * @Default {black} + */ + borderColor?: string; + + /**Sets the border width of the decorator + * @Default {1} + */ + borderWidth?: number; + + /**Sets the fill color of the source decorator + * @Default {black} + */ + fillColor?: string; + + /**Sets the height of the source decorator + * @Default {8} + */ + height?: number; + + /**Defines the custom shape of the source decorator + */ + pathData?: string; + + /**Defines the shape of the source decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /**Defines the width of the source decorator + * @Default {8} + */ + width?: number; +} + +export interface ConnectorsSourcePoint { + + /**Defines the x-coordinate of a position + * @Default {0} + */ + x?: number; + + /**Defines the y-coordinate of a position + * @Default {0} + */ + y?: number; +} + +export interface ConnectorsTargetDecorator { + + /**Sets the border color of the decorator + * @Default {black} + */ + borderColor?: string; + + /**Sets the color with which the decorator will be filled + * @Default {black} + */ + fillColor?: string; + + /**Defines the height of the target decorator + * @Default {8} + */ + height?: number; + + /**Defines the custom shape of the target decorator + */ + pathData?: string; + + /**Defines the shape of the target decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /**Defines the width of the target decorator + * @Default {8} + */ + width?: number; +} + +export interface Connectors { + + /**To maintain additional information about connectors + * @Default {null} + */ + addInfo?: any; + + /**Defines the width of the line bridges + * @Default {10} + */ + bridgeSpace?: number; + + /**Enables or disables the behaviors of connectors. + * @Default {ej.datavisualization.Diagram.ConnectorConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.ConnectorConstraints|string; + + /**Defines the radius of the rounded corner + * @Default {0} + */ + cornerRadius?: number; + + /**Configures the styles of shapes + */ + cssClass?: string; + + /**Sets the horizontal alignment of the connector. Applicable, if the parent of the connector is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**A collection of JSON objects where each object represents a label. For label properties, refer Labels + * @Default {[]} + */ + labels?: Array; + + /**Sets the stroke color of the connector + * @Default {black} + */ + lineColor?: string; + + /**Sets the pattern of dashes and gaps used to stroke the path of the connector + */ + lineDashArray?: string; + + /**Defines the padding value to ease the interaction with connectors + * @Default {10} + */ + lineHitPadding?: number; + + /**Sets the width of the line + * @Default {1} + */ + lineWidth?: number; + + /**Defines the minimum space to be left between the bottom of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /**Defines the minimum space to be left between the left of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /**Defines the minimum space to be left between the right of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /**Defines the minimum space to be left between the top of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /**Sets a unique name for the connector + */ + name?: string; + + /**Defines the transparency of the connector + * @Default {1} + */ + opacity?: number; + + /**Defines the size and preview size of the node to add that to symbol palette. To explore palette item, refer Palette Item + * @Default {null} + */ + paletteItem?: any; + + /**Sets the parent name of the connector. + */ + parent?: string; + + /**An array of JSON objects where each object represents a segment + * @Default {[ { type:straight } ]} + */ + segments?: Array; + + /**Defines the source decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + sourceDecorator?: ConnectorsSourceDecorator; + + /**Sets the source node of the connector + */ + sourceNode?: string; + + /**Defines the space to be left between the source node and the source point of a connector + * @Default {0} + */ + sourcePadding?: number; + + /**Describes the start point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + sourcePoint?: ConnectorsSourcePoint; + + /**Sets the source port of the connector + */ + sourcePort?: string; + + /**Defines the target decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + targetDecorator?: ConnectorsTargetDecorator; + + /**Sets the target node of the connector + */ + targetNode?: string; + + /**Defines the space to be left between the target node and the target point of the connector + * @Default {0} + */ + targetPadding?: number; + + /**Describes the end point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + targetPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Sets the targetPort of the connector + */ + targetPort?: string; + + /**Defines the tooltip that should be shown when the mouse hovers over connector. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /**To set the vertical alignment of connector (Applicable,if the parent is group). + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Enables or disables the visibility of connector + * @Default {true} + */ + visible?: boolean; + + /**Sets the z-index of the connector + * @Default {0} + */ + zOrder?: number; +} + +export interface ContextMenu { + + /**Defines the collection of context menu items + * @Default {[]} + */ + items?: Array; + + /**To set whether to display the default context menu items or not + * @Default {false} + */ + showCustomMenuItemsOnly?: boolean; +} + +export interface DataSourceSettings { + + /**Defines the data source either as a collection of objects or as an instance of ej.DataManager + * @Default {null} + */ + dataSource?: any; + + /**Sets the unique id of the data source items + */ + id?: string; + + /**Defines the parent id of the data source item + * @Default {''} + */ + parent?: string; + + /**Describes query to retrieve a set of data from the specified datasource + * @Default {null} + */ + query?: string; + + /**Sets the unique id of the root data source item + */ + root?: string; + + /**Describes the name of the table on which the specified query has to be executed + * @Default {null} + */ + tableName?: string; +} + +export interface DefaultSettings { + + /**Initializes the default connector properties + * @Default {null} + */ + connector?: any; + + /**Initializes the default properties of groups + * @Default {null} + */ + group?: any; + + /**Initializes the default properties for nodes + * @Default {null} + */ + node?: any; +} + +export interface HistoryManager { + + /**A method that takes a history entry as argument and returns whether the specific entry can be popped or not + */ + canPop?: Function; + + /**A method that ends grouping the changes + */ + closeGroupAction?: Function; + + /**A method that removes the history of a recent change made in diagram + */ + pop?: Function; + + /**A method that allows to track the custom changes made in diagram + */ + push?: Function; + + /**Defines what should be happened while trying to restore a custom change + * @Default {null} + */ + redo?: Function; + + /**A method that starts to group the changes to revert/restore them in a single undo or redo + */ + startGroupAction?: Function; + + /**Defines what should be happened while trying to revert a custom change + */ + undo?: Function; +} + +export interface Layout { + + /**Defines the fixed node with reference to which, the layout will be arranged and fixed node will not be repositioned + */ + fixedNode?: string; + + /**Customizes the orientation of trees/sub trees. For orientations, see Chart Orientations. For chart types, see Chart Types + * @Default {null} + */ + getLayoutInfo?: any; + + /**Sets the space to be horizontally left between nodes + * @Default {30} + */ + horizontalSpacing?: number; + + /**Sets the margin value to be horizontally left between the layout and diagram + * @Default {0} + */ + marginX?: number; + + /**Sets the margin value to be vertically left between layout and diagram + * @Default {0} + */ + marginY?: number; + + /**Sets the orientation/direction to arrange the diagram elements. + * @Default {ej.datavisualization.Diagram.LayoutOrientations.TopToBottom} + */ + orientation?: ej.datavisualization.Diagram.LayoutOrientations|string; + + /**Sets the type of the layout based on which the elements will be arranged. + * @Default {ej.datavisualization.Diagram.LayoutTypes.None} + */ + type?: ej.datavisualization.Diagram.LayoutTypes|string; + + /**Sets the space to be vertically left between nodes + * @Default {30} + */ + verticalSpacing?: number; +} + +export interface NodesContainer { + + /**Defines the orientation of the container. Applicable, if the group is a container. + * @Default {vertical} + */ + orientation?: string; + + /**Sets the type of the container. Applicable if the group is a container. + * @Default {ej.datavisualization.Diagram.ContainerType.Canvas} + */ + type?: ej.datavisualization.Diagram.ContainerType|string; +} + +export interface NodesGradientLinearGradient { + + /**Defines the different colors and the region of color transitions + * @Default {[]} + */ + stops?: Array; + + /**Defines the left most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x1?: number; + + /**Defines the right most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x2?: number; + + /**Defines the top most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y1?: number; + + /**Defines the bottom most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y2?: number; +} + +export interface NodesGradientRadialGradient { + + /**Defines the position of the outermost circle + * @Default {0} + */ + cx?: number; + + /**Defines the outer most circle of the radial gradient + * @Default {0} + */ + cy?: number; + + /**Defines the innermost circle of the radial gradient + * @Default {0} + */ + fx?: number; + + /**Defines the innermost circle of the radial gradient + * @Default {0} + */ + fy?: number; + + /**Defines the different colors and the region of color transitions. + * @Default {[]} + */ + stops?: Array; +} + +export interface NodesGradientStop { + + /**Sets the color to be filled over the specified region + */ + color?: string; + + /**Sets the position where the previous color transition ends and a new color transition starts + * @Default {0} + */ + offset?: number; + + /**Describes the transparency level of the region + * @Default {1} + */ + opacity?: number; +} + +export interface NodesGradient { + + /**Paints the node with linear color transitions + */ + LinearGradient?: NodesGradientLinearGradient; + + /**Paints the node with radial color transitions. A focal point defines the beginning of the gradient, and a circle defines the end point of the gradient. + */ + RadialGradient?: NodesGradientRadialGradient; + + /**Defines the color and a position where the previous color transition ends and a new color transition starts + */ + Stop?: NodesGradientStop; +} + +export interface NodesLabels { + + /**Enables/disables the bold style + * @Default {false} + */ + bold?: boolean; + + /**Sets the border color of the label + * @Default {transparent} + */ + borderColor?: string; + + /**Sets the border width of the label + * @Default {0} + */ + borderWidth?: number; + + /**Sets the fill color of the text area + * @Default {transparent} + */ + fillColor?: string; + + /**Sets the font color of the text + * @Default {black} + */ + fontColor?: string; + + /**Sets the font family of the text + * @Default {Arial} + */ + fontFamily?: string; + + /**Defines the font size of the text + * @Default {12} + */ + fontSize?: number; + + /**Sets the horizontal alignment of the label. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**Enables/disables the italic style + * @Default {false} + */ + italic?: boolean; + + /**To set the margin of the label + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /**Gets whether the label is currently being edited or not. + * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} + */ + mode?: ej.datavisualization.Diagram.LabelEditMode|string; + + /**Sets the unique identifier of the label + */ + name?: string; + + /**Sets the fraction/ratio(relative to node) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + offset?: any; + + /**Defines whether the label is editable or not + * @Default {false} + */ + readOnly?: boolean; + + /**Defines the angle to which the label needs to be rotated + * @Default {0} + */ + rotateAngle?: number; + + /**Defines the label text + */ + text?: string; + + /**Defines how to align the text inside the label. + * @Default {ej.datavisualization.Diagram.TextAlign.Center} + */ + textAlign?: ej.datavisualization.Diagram.TextAlign|string; + + /**Sets how to decorate the label text. + * @Default {ej.datavisualization.Diagram.TextDecorations.None} + */ + textDecoration?: ej.datavisualization.Diagram.TextDecorations|string; + + /**Sets the vertical alignment of the label. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Enables or disables the visibility of the label + * @Default {true} + */ + visible?: boolean; + + /**Sets the width of the label(the maximum value of label width and the node width will be considered as label width) + * @Default {50} + */ + width?: number; + + /**Defines how the label text needs to be wrapped. + * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} + */ + wrapping?: ej.datavisualization.Diagram.TextWrapping|string; +} + +export interface NodesLanes { + + /**Allows to maintain additional information about lane + * @Default {{}} + */ + addInfo?: any; + + /**An array of objects where each object represents a child node of the lane + * @Default {[]} + */ + children?: Array; + + /**Defines the fill color of the lane + * @Default {white} + */ + fillColor?: string; + + /**Defines the header of the lane + * @Default {{ text: Function, fontSize: 11 }} + */ + header?: any; + + /**Defines the object as a lane + * @Default {false} + */ + isLane?: boolean; + + /**Sets the unique identifier of the lane + */ + name?: string; + + /**Sets the orientation of the lane. + * @Default {vertical} + */ + orientation?: string; +} + +export interface NodesPaletteItem { + + /**Defines whether the symbol should be drawn at its actual size regardless of precedence factors or not + * @Default {true} + */ + enableScale?: boolean; + + /**Defines the height of the symbol + * @Default {0} + */ + height?: number; + + /**Defines the margin of the symbol item + * @Default {{ left: 4, right: 4, top: 4, bottom: 4 }} + */ + margin?: any; + + /**Defines the preview height of the symbol + * @Default {undefined} + */ + previewHeight?: number; + + /**Defines the preview width of the symbol + * @Default {undefined} + */ + previewWidth?: number; + + /**Defines the width of the symbol + * @Default {0} + */ + width?: number; +} + +export interface NodesPhases { + + /**Defines the header of the smaller regions + * @Default {null} + */ + label?: any; + + /**Defines the line color of the splitter that splits adjacent phases. + * @Default {#606060} + */ + lineColor?: string; + + /**Sets the dash array that used to stroke the phase splitter + * @Default {3,3} + */ + lineDashArray?: string; + + /**Sets the lineWidth of the phase + * @Default {1} + */ + lineWidth?: number; + + /**Sets the unique identifier of the phase + */ + name?: string; + + /**Sets the length of the smaller region(phase) of a swimlane + * @Default {100} + */ + offset?: number; + + /**Sets the orientation of the phase + * @Default {horizontal} + */ + orientation?: string; + + /**Sets the type of the object as phase + * @Default {phase} + */ + type?: string; +} + +export interface NodesPorts { + + /**Sets the border color of the port + * @Default {#1a1a1a} + */ + borderColor?: string; + + /**Sets the stroke width of the port + * @Default {1} + */ + borderWidth?: number; + + /**Defines the space to be left between the port bounds and its incoming and outgoing connections. + * @Default {0} + */ + connectorPadding?: number; + + /**Defines whether connections can be created with the port + * @Default {ej.datavisualization.Diagram.PortConstraints.Connect} + */ + constraints?: ej.datavisualization.Diagram.PortConstraints|string; + + /**Sets the fill color of the port + * @Default {white} + */ + fillColor?: string; + + /**Sets the unique identifier of the port + */ + name?: string; + + /**Defines the position of the port as fraction/ ratio relative to node + * @Default {ej.datavisualization.Diagram.Point(0, 0)} + */ + offset?: any; + + /**Defines the path data to draw the port. Applicable, if the port shape is path. + */ + pathData?: string; + + /**Defines the shape of the port. + * @Default {ej.datavisualization.Diagram.PortShapes.Square} + */ + shape?: ej.datavisualization.Diagram.PortShapes|string; + + /**Defines the size of the port + * @Default {8} + */ + size?: number; + + /**Defines when the port should be visible. + * @Default {ej.datavisualization.Diagram.PortVisibility.Default} + */ + visibility?: ej.datavisualization.Diagram.PortVisibility|string; +} + +export interface NodesShadow { + + /**Defines the angle of the shadow relative to node + * @Default {45} + */ + angle?: number; + + /**Sets the distance to move the shadow relative to node + * @Default {5} + */ + distance?: number; + + /**Defines the opaque of the shadow + * @Default {0.7} + */ + opacity?: number; +} + +export interface NodesSubProcess { + + /**Defines whether the bpmn sub process is without any prescribed order or not + * @Default {false} + */ + adhoc?: boolean; + + /**Sets the boundary of the BPMN process + * @Default {ej.datavisualization.Diagram.BPMNBoundary.Default} + */ + boundary?: ej.datavisualization.Diagram.BPMNBoundary|string; + + /**Sets whether the bpmn subprocess is triggered as a compensation of a specific activity + * @Default {false} + */ + compensation?: boolean; + + /**Defines the loop type of a sub process. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; +} + +export interface NodesTask { + + /**To set whether the task is a global task or not + * @Default {false} + */ + call?: boolean; + + /**Sets whether the task is triggered as a compensation of another specific activity + * @Default {false} + */ + compensation?: boolean; + + /**Sets the loop type of a bpmn task. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; + + /**Sets the type of the BPMN task. + * @Default {ej.datavisualization.Diagram.BPMNTasks.None} + */ + type?: ej.datavisualization.Diagram.BPMNTasks|string; +} + +export interface Nodes { + + /**Defines the type of BPMN Activity. Applicable, if the node is a bpmn activity. + * @Default {ej.datavisualization.Diagram.BPMNActivity.Task} + */ + activity?: ej.datavisualization.Diagram.BPMNActivity|string; + + /**To maintain additional information about nodes + * @Default {{}} + */ + addInfo?: any; + + /**Sets the border color of node + * @Default {black} + */ + borderColor?: string; + + /**Sets the pattern of dashes and gaps to stroke the border + */ + borderDashArray?: string; + + /**Sets the border width of the node + * @Default {1} + */ + borderWidth?: number; + + /**Defines whether the group can be ungrouped or not + * @Default {true} + */ + canUngroup?: boolean; + + /**Array of JSON objects where each object represents a child node/connector + * @Default {[]} + */ + children?: Array; + + /**Defines whether the BPMN data object is a collection or not + * @Default {false} + */ + collection?: boolean; + + /**Defines the distance to be left between a node and its connections(In coming and out going connections). + * @Default {0} + */ + connectorPadding?: number; + + /**Enables or disables the default behaviors of the node. + * @Default {ej.datavisualization.Diagram.NodeConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.NodeConstraints|string; + + /**Defines how the child objects need to be arranged(Either in any predefined manner or automatically). Applicable, if the node is a group. + * @Default {null} + */ + container?: NodesContainer; + + /**Defines the corner radius of rectangular shapes. + * @Default {0} + */ + cornerRadius?: number; + + /**Configures the styles of shapes + */ + cssClass?: string; + + /**Sets the type of the BPMN Events. Applicable, if the node is a bpmn event. + * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} + */ + event?: ej.datavisualization.Diagram.BPMNEvents|string; + + /**Defines whether the node can be automatically arranged using layout or not + * @Default {false} + */ + excludeFromLayout?: boolean; + + /**Defines the fill color of the node + * @Default {white} + */ + fillColor?: string; + + /**Sets the type of the BPMN Gateway. Applicable, if the node is a bpmn gateway. + * @Default {ej.datavisualization.Diagram.BPMNGateways.None} + */ + gateway?: ej.datavisualization.Diagram.BPMNGateways|string; + + /**Paints the node with a smooth transition from one color to another color + */ + gradient?: NodesGradient; + + /**Defines the header of a swimlane/lane + * @Default {{ text: Title, fontSize: 11 }} + */ + header?: any; + + /**Defines the height of the node + * @Default {0} + */ + height?: number; + + /**Sets the horizontal alignment of the node. Applicable, if the parent of the node is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**A read only collection of the incoming connectors/edges of the node + * @Default {[]} + */ + inEdges?: Array; + + /**Defines whether the sub tree of the node is expanded or collapsed + * @Default {true} + */ + isExpanded?: boolean; + + /**Sets the node as a swimlane + * @Default {false} + */ + isSwimlane?: boolean; + + /**A collection of objects where each object represents a label + * @Default {[]} + */ + labels?: Array; + + /**An array of objects where each object represents a lane. Applicable, if the node is a swimlane. + * @Default {[]} + */ + lanes?: Array; + + /**Defines the minimum space to be left between the bottom of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /**Defines the minimum space to be left between the left of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /**Defines the minimum space to be left between the right of the parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /**Defines the minimum space to be left between the top of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /**Defines the maximum height limit of the node + * @Default {0} + */ + maxHeight?: number; + + /**Defines the maximum width limit of the node + * @Default {0} + */ + maxWidth?: number; + + /**Defines the minimum height limit of the node + * @Default {0} + */ + minHeight?: number; + + /**Defines the minimum width limit of the node + * @Default {0} + */ + minWidth?: number; + + /**Sets the unique identifier of the node + */ + name?: string; + + /**Defines the position of the node on X-Axis + * @Default {0} + */ + offsetX?: number; + + /**Defines the position of the node on Y-Axis + * @Default {0} + */ + offsetY?: number; + + /**Defines the opaque of the node + * @Default {1} + */ + opacity?: number; + + /**Defines the orientation of nodes. Applicable, if the node is a swimlane. + * @Default {vertical} + */ + orientation?: string; + + /**A read only collection of outgoing connectors/edges of the node + * @Default {[]} + */ + outEdges?: Array; + + /**Defines the minimum padding value to be left between the bottom most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingBottom?: number; + + /**Defines the minimum padding value to be left between the left most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingLeft?: number; + + /**Defines the minimum padding value to be left between the right most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingRight?: number; + + /**Defines the minimum padding value to be left between the top most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingTop?: number; + + /**Defines the size and preview size of the node to add that to symbol palette + * @Default {null} + */ + paletteItem?: NodesPaletteItem; + + /**Sets the name of the parent group + */ + parent?: string; + + /**Sets the path geometry that defines the shape of a path node + */ + pathData?: string; + + /**An array of objects, where each object represents a smaller region(phase) of a swimlane. + * @Default {[]} + */ + phases?: Array; + + /**Sets the height of the phase headers + * @Default {0} + */ + phaseSize?: number; + + /**Sets the ratio/ fractional value relative to node, based on which the node will be transformed(positioning, scaling and rotation) + * @Default {ej.datavisualization.Diagram.Points(0.5,0.5)} + */ + pivot?: any; + + /**Defines a collection of points to draw a polygon. Applicable, if the shape is a polygon. + * @Default {[]} + */ + points?: Array; + + /**An array of objects where each object represents a port + * @Default {[]} + */ + ports?: Array; + + /**Sets the angle to which the node should be rotated + * @Default {0} + */ + rotateAngle?: number; + + /**Defines the opacity and the position of shadow + * @Default {ej.datavisualization.Diagram.Shadow()} + */ + shadow?: NodesShadow; + + /**Sets the shape of the node. It depends upon the type of node. + * @Default {ej.datavisualization.Diagram.BasicShapes.Rectangle} + */ + shape?: ej.datavisualization.Diagram.BasicShapes|string; + + /**Sets the source path of the image. Applicable, if the type of the node is image. + */ + source?: string; + + /**Defines the sub process of a BPMN Activity. Applicable, if the type of the bpmn activity is sub process. + * @Default {ej.datavisualization.Diagram.BPMNSubProcess()} + */ + subProcess?: NodesSubProcess; + + /**Defines the task of the bpmn activity. Applicable, if the type of activity is set as task. + * @Default {ej.datavisualization.Diagram.BPMNTask()} + */ + task?: NodesTask; + + /**Sets the id of svg/html templates. Applicable, if the node is html or native. + */ + templateId?: string; + + /**Defines the textBlock of a text node + * @Default {null} + */ + textBlock?: any; + + /**Defines the tooltip that should be shown when the mouse hovers over node. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /**Sets the type of BPMN Event Triggers. + * @Default {ej.datavisualization.Diagram.BPMNTriggers.None} + */ + trigger?: ej.datavisualization.Diagram.BPMNTriggers|string; + + /**Defines the type of the node. + * @Default {ej.datavisualization.Diagram.Shapes.Basic} + */ + type?: ej.datavisualization.Diagram.Shapes|string; + + /**Sets the vertical alignment of a node. Applicable, if the parent of a node is a container. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Defines the visibility of the node + * @Default {true} + */ + visible?: boolean; + + /**Defines the width of the node + * @Default {0} + */ + width?: number; + + /**Defines the z-index of the node + * @Default {0} + */ + zOrder?: number; +} + +export interface PageSettings { + + /**Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling + * @Default {{ left: 15, top: 15, right: 15, bottom: 15 }} + */ + autoScrollBorder?: any; + + /**Sets whether multiple pages can be created to fit all nodes and connectors + * @Default {false} + */ + multiplePage?: boolean; + + /**Defines the background color of diagram pages + * @Default {#ffffff} + */ + pageBackgroundColor?: string; + + /**Defines the page border color + * @Default {#565656} + */ + pageBorderColor?: string; + + /**Sets the border width of diagram pages + * @Default {0} + */ + pageBorderWidth?: number; + + /**Defines the height of a page + * @Default {null} + */ + pageHeight?: number; + + /**Defines the page margin + * @Default {24} + */ + pageMargin?: number; + + /**Sets the orientation of the page. + * @Default {ej.datavisualization.Diagram.PageOrientations.Portrait} + */ + pageOrientation?: ej.datavisualization.Diagram.PageOrientations|string; + + /**Defines the height of a diagram page + * @Default {null} + */ + pageWidth?: number; + + /**Defines the scrollable area of diagram. Applicable, if the scroll limit is "limited". + * @Default {null} + */ + scrollableArea?: any; + + /**Defines the scrollable region of diagram. + * @Default {ej.datavisualization.Diagram.ScrollLimit.Infinite} + */ + scrollLimit?: ej.datavisualization.Diagram.ScrollLimit|string; + + /**Enables or disables the page breaks + * @Default {false} + */ + showPageBreak?: boolean; +} + +export interface ScrollSettings { + + /**Allows to read the zoom value of diagram + * @Default {0} + */ + currentZoom?: number; + + /**Sets the horizontal scroll offset + * @Default {0} + */ + horizontalOffset?: number; + + /**Allows to extend the scrollable region that is based on the scroll limit + * @Default {{left: 0, right: 0, top:0, bottom: 0}} + */ + padding?: any; + + /**Sets the vertical scroll offset + * @Default {0} + */ + verticalOffset?: number; + + /**Allows to read the view port height of the diagram + * @Default {0} + */ + viewPortHeight?: number; + + /**Allows to read the view port width of the diagram + * @Default {0} + */ + viewPortWidth?: number; +} + +export interface SelectedItems { + + /**A read only collection of the selected items + * @Default {[]} + */ + children?: Array; + + /**Controls the visibility of selector. + * @Default {ej.datavisualization.Diagram.SelectorConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.SelectorConstraints|string; + + /**Defines a method that dynamically enables/ disables the interaction with multiple selection. + * @Default {null} + */ + getConstraints?: any; + + /**Sets the height of the selected items + * @Default {0} + */ + height?: number; + + /**Sets the x position of the selector + * @Default {0} + */ + offsetX?: number; + + /**Sets the y position of the selector + * @Default {0} + */ + offsetY?: number; + + /**Sets the angle to rotate the selected items + * @Default {0} + */ + rotateAngle?: number; + + /**Sets the angle to rotate the selected items. For tooltip properties, refer Tooltip + * @Default {ej.datavisualization.Diagram.Tooltip()} + */ + tooltip?: any; + + /**A collection of frequently using commands that have to be added around the selector. + * @Default {[]} + */ + userHandles?: Array; + + /**Sets the width of the selected items + * @Default {0} + */ + width?: number; +} + +export interface SnapSettingsHorizontalGridLines { + + /**Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /**Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /**A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: Array; + + /**Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: Array; +} + +export interface SnapSettingsVerticalGridLines { + + /**Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /**Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /**A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: Array; + + /**Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: Array; +} + +export interface SnapSettings { + + /**Enables or disables snapping nodes/connectors to objects + * @Default {true} + */ + enableSnapToObject?: boolean; + + /**Defines the appearance of horizontal gridlines + */ + horizontalGridLines?: SnapSettingsHorizontalGridLines; + + /**Defines the angle by which the object needs to be snapped + * @Default {5} + */ + snapAngle?: number; + + /**Defines the minimum distance between the selected object and the nearest object + * @Default {5} + */ + snapObjectDistance?: number; + + /**Defines the appearance of horizontal gridlines + */ + verticalGridLines?: SnapSettingsVerticalGridLines; +} + +export interface TooltipAlignment { + + /**Defines the horizontal alignment of tooltip. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontal?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**Defines the vertical alignment of tooltip. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Bottom} + */ + vertical?: ej.datavisualization.Diagram.VerticalAlignment|string; +} + +export interface Tooltip { + + /**Aligns the tooltip around nodes/connectors + */ + alignment?: TooltipAlignment; + + /**Sets the margin of the tooltip + * @Default {{ left: 5, right: 5, top: 5, bottom: 5 }} + */ + margin?: any; + + /**Defines whether the tooltip should be shown at the mouse position or around node. + * @Default {ej.datavisualization.Diagram.RelativeMode.Object} + */ + relativeMode?: ej.datavisualization.Diagram.RelativeMode|string; + + /**Sets the svg/html template to be bound with tooltip + */ + templateId?: string; +} +} +module Diagram +{ +enum BridgeDirection +{ +//Used to set the direction of line bridges as left +Left, +//Used to set the direction of line bridges as right +Right, +//Used to set the direction of line bridges as top +Top, +//Used to set the direction of line bridges as bottom +Bottom, +} +} +module Diagram +{ +enum Keys +{ +//No key pressed. +None, +//The A key. +A, +//The B key. +B, +//The C key. +C, +//The D Key. +D, +//The E key. +E, +//The F key. +F, +//The G key. +G, +//The H Key. +H, +//The I key. +I, +//The J key. +J, +//The K key. +K, +//The L Key. +L, +//The M key. +M, +//The N key. +N, +//The O key. +O, +//The P Key. +P, +//The Q key. +Q, +//The R key. +R, +//The S key. +S, +//The T Key. +T, +//The U key. +U, +//The V key. +V, +//The W key. +W, +//The X key. +X, +//The Y key. +Y, +//The Z key. +Z, +//The 0 key. +Number0, +//The 1 key. +Number1, +//The 2 key. +Number2, +//The 3 key. +Number3, +//The 4 key. +Number4, +//The 5 key. +Number5, +//The 6 key. +Number6, +//The 7 key. +Number7, +//The 8 key. +Number8, +//The 9 key. +Number9, +//The LEFT ARROW key. +Left, +//The UP ARROW key. +Up, +//The RIGHT ARROW key. +Right, +//The DOWN ARROW key. +Down, +//The ESC key. +Escape, +//The DEL key. +Delete, +//The TAB key. +Tab, +//The ENTER key. +Enter, +} +} +module Diagram +{ +enum KeyModifiers +{ +//No modifiers are pressed. +None, +//The ALT key. +Alt, +//The CTRL key. +Control, +//The SHIFT key. +Shift, +} +} +module Diagram +{ +enum ConnectorConstraints +{ +//Disable all connector Constraints +None, +//Enables connector to be selected +Select, +//Enables connector to be Deleted +Delete, +//Enables connector to be Dragged +Drag, +//Enables connectors source end to be selected +DragSourceEnd, +//Enables connectors target end to be selected +DragTargetEnd, +//Enables control point and end point of every segment in a connector for editing +DragSegmentThumb, +//Enables bridging to the connector +Bridging, +//Enables label of node to be Dragged +DragLabel, +//Enables bridging to the connector +InheritBridging, +//Enables all constraints +Default, +} +} +module Diagram +{ +enum HorizontalAlignment +{ +//Used to align text horizontally on left side of node/connector +Left, +//Used to align text horizontally on center of node/connector +Center, +//Used to align text horizontally on right side of node/connector +Right, +} +} +module Diagram +{ +enum Segments +{ +//Used to specify the lines as Straight +Straight, +//Used to specify the lines as Orthogonal +Orthogonal, +//Used to specify the lines as Bezier +Bezier, +} +} +module Diagram +{ +enum DecoratorShapes +{ +//Used to set decorator shape as none +None, +//Used to set decorator shape as Arrow +Arrow, +//Used to set decorator shape as Open Arrow +OpenArrow, +//Used to set decorator shape as Circle +Circle, +//Used to set decorator shape as Diamond +Diamond, +//Used to set decorator shape as path +Path, +} +} +module Diagram +{ +enum VerticalAlignment +{ +//Used to align text Vertically on left side of node/connector +Top, +//Used to align text Vertically on center of node/connector +Center, +//Used to align text Vertically on bottom of node/connector +Bottom, +} +} +module Diagram +{ +enum DiagramConstraints +{ +//Disables all DiagramConstraints +None, +//Enables/Disables PageEditing +PageEditable, +//Enables/Disables Bridging +Bridging, +//Enables/Disables Zooming +Zoomable, +//Enables/Disables panning on horizontal axis +PannableX, +//Enables/Disables panning on vertical axis +PannableY, +//Enables/Disables Panning +Pannable, +//Enables/Disables undo actions +Undoable, +//Enables all Constraints +Default, +} +} +module Diagram +{ +enum LayoutOrientations +{ +//Used to set LayoutOrientation from top to bottom +TopToBottom, +//Used to set LayoutOrientation from bottom to top +BottomToTop, +//Used to set LayoutOrientation from left to right +LeftToRight, +//Used to set LayoutOrientation from right to left +RightToLeft, +} +} +module Diagram +{ +enum LayoutTypes +{ +//Used not to set any specific layout +None, +//Used to set layout type as hierarchical layout +HierarchicalTree, +//Used to set layout type as organnizational chart +OrganizationalChart, +} +} +module Diagram +{ +enum BPMNActivity +{ +//Used to set BPMN Activity as None +None, +//Used to set BPMN Activity as Task +Task, +//Used to set BPMN Activity as SubProcess +SubProcess, +} +} +module Diagram +{ +enum NodeConstraints +{ +//Disable all node Constraints +None, +//Enables node to be selected +Select, +//Enables node to be Deleted +Delete, +//Enables node to be Dragged +Drag, +//Enables node to be Rotated +Rotate, +//Enables node to be connected +Connect, +//Enables node to be resize north east +ResizeNorthEast, +//Enables node to be resize east +ResizeEast, +//Enables node to be resize south east +ResizeSouthEast, +//Enables node to be resize south +ResizeSouth, +//Enables node to be resize south west +ResizeSouthWest, +//Enables node to be resize west +ResizeWest, +//Enables node to be resize north west +ResizeNorthWest, +//Enables node to be resize north +ResizeNorth, +//Enables node to be Resized +Resize, +//Enables shadow +Shadow, +//Enables label of node to be Dragged +DragLabel, +//Enables panning should be done while node dragging +AllowPan, +//Enables Proportional resize for node +AspectRatio, +//Enables all node constraints +Default, +} +} +module Diagram +{ +enum ContainerType +{ +//Sets the container type as Canvas +Canvas, +//Sets the container type as Stack +Stack, +} +} +module Diagram +{ +enum BPMNEvents +{ +//Used to set BPMN Event as Start +Start, +//Used to set BPMN Event as Intermediate +Intermediate, +//Used to set BPMN Event as End +End, +//Used to set BPMN Event as NonInterruptingStart +NonInterruptingStart, +//Used to set BPMN Event as NonInterruptingIntermediate +NonInterruptingIntermediate, +} +} +module Diagram +{ +enum BPMNGateways +{ +//Used to set BPMN Gateway as None +None, +//Used to set BPMN Gateway as Exclusive +Exclusive, +//Used to set BPMN Gateway as Inclusive +Inclusive, +//Used to set BPMN Gateway as Parallel +Parallel, +//Used to set BPMN Gateway as Complex +Complex, +//Used to set BPMN Gateway as EventBased +EventBased, +} +} +module Diagram +{ +enum LabelEditMode +{ +//Used to set label edit mode as edit +Edit, +//Used to set label edit mode as view +View, +} +} +module Diagram +{ +enum TextAlign +{ +//Used to align text on left side of node/connector +Left, +//Used to align text on center of node/connector +Center, +//Used to align text on Right side of node/connector +Right, +} +} +module Diagram +{ +enum TextDecorations +{ +//Used to set text decoration of the label as Underline +Underline, +//Used to set text decoration of the label as Overline +Overline, +//Used to set text decoration of the label as LineThrough +LineThrough, +//Used to set text decoration of the label as None +None, +} +} +module Diagram +{ +enum TextWrapping +{ +//Disables wrapping +NoWrap, +//Enables Line-break at normal word break points +Wrap, +//Enables Line-break at normal word break points with longer word overflows +WrapWithOverflow, +} +} +module Diagram +{ +enum PortConstraints +{ +//Disable all constraints +None, +//Enables connections with connector +Connect, +} +} +module Diagram +{ +enum PortShapes +{ +//Used to set port shape as X +X, +//Used to set port shape as Circle +Circle, +//Used to set port shape as Square +Square, +//Used to set port shape as Path +Path, +} +} +module Diagram +{ +enum PortVisibility +{ +//Set the port visibility as Visible +Visible, +//Set the port visibility as Hidden +Hidden, +//Port get visible when hover connector on node +Hover, +//Port gets visible when connect connector to node +Connect, +//Specifies the port visibility as default +Default, +} +} +module Diagram +{ +enum BasicShapes +{ +//Used to specify node Shape as Rectangle +Rectangle, +//Used to specify node Shape as Ellipse +Ellipse, +//Used to specify node Shape as Path +Path, +//Used to specify node Shape as Polygon +Polygon, +//Used to specify node Shape as Triangle +Triangle, +//Used to specify node Shape as Plus +Plus, +//Used to specify node Shape as Star +Star, +//Used to specify node Shape as Pentagon +Pentagon, +//Used to specify node Shape as Heptagon +Heptagon, +//Used to specify node Shape as Octagon +Octagon, +//Used to specify node Shape as Trapezoid +Trapezoid, +//Used to specify node Shape as Decagon +Decagon, +//Used to specify node Shape as RightTriangle +RightTriangle, +//Used to specify node Shape as Cylinder +Cylinder, +} +} +module Diagram +{ +enum BPMNBoundary +{ +//Used to set BPMN SubProcess's Boundary as Default +Default, +//Used to set BPMN SubProcess's Boundary as Call +Call, +//Used to set BPMN SubProcess's Boundary as Event +Event, +} +} +module Diagram +{ +enum BPMNLoops +{ +//Used to set BPMN Activity's Loop as None +None, +//Used to set BPMN Activity's Loop as Standard +Standard, +//Used to set BPMN Activity's Loop as ParallelMultiInstance +ParallelMultiInstance, +//Used to set BPMN Activity's Loop as SequenceMultiInstance +SequenceMultiInstance, +} +} +module Diagram +{ +enum BPMNTasks +{ +//Used to set BPMN Task Type as None +None, +//Used to set BPMN Task Type as Service +Service, +//Used to set BPMN Task Type as Receive +Receive, +//Used to set BPMN Task Type as Send +Send, +//Used to set BPMN Task Type as InstantiatingReceive +InstantiatingReceive, +//Used to set BPMN Task Type as Manual +Manual, +//Used to set BPMN Task Type as BusinessRule +BusinessRule, +//Used to set BPMN Task Type as User +User, +//Used to set BPMN Task Type as Script +Script, +//Used to set BPMN Task Type as Parallel +Parallel, +} +} +module Diagram +{ +enum BPMNTriggers +{ +//Used to set Event Trigger as None +None, +//Used to set Event Trigger as Message +Message, +//Used to set Event Trigger as Timer +Timer, +//Used to set Event Trigger as Escalation +Escalation, +//Used to set Event Trigger as Link +Link, +//Used to set Event Trigger as Error +Error, +//Used to set Event Trigger as Compensation +Compensation, +//Used to set Event Trigger as Signal +Signal, +//Used to set Event Trigger as Multiple +Multiple, +//Used to set Event Trigger as Parallel +Parallel, +} +} +module Diagram +{ +enum Shapes +{ +//Used to set decorator shape as none +None, +//Used to set decorator shape as Arrow +Arrow, +//Used to set decorator shape as Open Arrow +OpenArrow, +//Used to set decorator shape as Circle +Circle, +//Used to set decorator shape as Diamond +Diamond, +//Used to set decorator shape as path +Path, +} +} +module Diagram +{ +enum PageOrientations +{ +//Used to set orientation as Landscape +Landscape, +//Used to set orientation as portrait +Portrait, +} +} +module Diagram +{ +enum ScrollLimit +{ +//Used to set scrollLimit as Infinite +Infinite, +//Used to set scrollLimit as Diagram +Diagram, +//Used to set scrollLimit as Limited +Limited, +} +} +module Diagram +{ +enum SelectorConstraints +{ +//Hides the selector +None, +//Sets the visibility of rotation handle as visible +Rotator, +//Sets the visibility of resize handles as visible +Resizer, +//Sets the visibility of user handles as visible +UserHandles, +//Sets the visibility of all selection handles as visible +All, +} +} +module Diagram +{ +enum Tool +{ +//Disables all Tools +None, +//Enables/Disables SingleSelect tool +SingleSelect, +//Enables/Disables MultiSelect tool +MultipleSelect, +//Enables/Disables ZoomPan tool +ZoomPan, +//Enables/Disables DrawOnce tool +DrawOnce, +//Enables/Disables ContinuousDraw tool +ContinuesDraw, +} +} +module Diagram +{ +enum RelativeMode +{ +//Shows tooltip around the node +Object, +//Shows tooltip at the mouse position +Mouse, +} +} + +} + +interface JQueryXHR { +} +interface JQueryPromise { +} +interface JQueryDeferred extends JQueryPromise { +} +interface JQueryParam { +} +interface JQuery { + data(key: any): any; +} +interface JQuery { + + /*Accordion*/ + ejmAccordion(): JQuery; + ejmAccordion(options?: ej.mobile.AccordionOptions): JQuery; + data(key: "ejmAccordion"): ej.mobile.Accordion; + /*Accordion*/ + + /*AutoComplete*/ + ejmAutocomplete(): JQuery; + ejmAutocomplete(options?: ej.mobile.AutocompleteOptions): JQuery; + data(key: "ejmAutocomplete"): ej.mobile.Autocomplete; + /*AutoComplete*/ + + /*Button*/ + ejmButton(): JQuery; + ejmButton(options?: ej.mobile.ButtonOptions): JQuery; + data(key: "ejmButton"): ej.mobile.Button; + + ejmActionlink(): JQuery; + ejmActionlink(options?: ej.mobile.ButtonOptions): JQuery; + data(key: "ejmActionlink"): ej.mobile.Button; + /*Button*/ + + /* DatePicker */ + ejmDatePicker(): JQuery; + ejmDatePicker(options?: ej.mobile.DatePickerOptions): JQuery; + data(key: "ejmDatePicker"): ej.mobile.DatePicker; + /* DatePicker */ + + /*Editor*/ + ejmNumeric(): JQuery; + ejmNumeric(options?: ej.mobile.EditorOptions): JQuery; + data(key: "ejmNumeric"): ej.mobile.Numeric; + /*Editor*/ + + /* Grid Start */ + ejmGrid(): JQuery; + ejmGrid(options?: ej.mobile.GridOptions): JQuery; + data(key: "ejmGrid"): ej.mobile.Grid; + /* Grid End */ + + /*Header*/ + ejmHeader(): JQuery; + ejmHeader(options?: ej.mobile.HeaderOptions): JQuery; + data(key: "ejmHeader"): ej.mobile.Header; + /*Header*/ + + /*ListView*/ + ejmListView(): JQuery; + ejmListView(options?: ej.mobile.ListViewOptions): JQuery; + data(key: "ejmListView"): ej.mobile.ListView; + /*ListView*/ + + /*Menu*/ + ejmMenu(): JQuery; + ejmMenu(options?: ej.mobile.MenuOptions): JQuery; + data(key: "ejmMenu"): ej.mobile.Menu; + /*Menu*/ + + /* ProgressBar */ + ejmProgress(): JQuery; + ejmProgress(options?: ej.mobile.ProgressOptions): JQuery; + data(key: "ejmProgress"): ej.mobile.Progress; + /* ProgressBar */ + + /*Radio Button*/ + ejmRadioButton(): JQuery; + ejmRadioButton(options?: ej.mobile.RadioButtonOptions): JQuery; + data(key: "ejmRadioButton"): ej.mobile.RadioButton; + /*Radio Button*/ + + /*Rating*/ + ejmRating(): JQuery; + ejmRating(options?: ej.mobile.RatingOptions): JQuery; + data(key: "ejmRating"): ej.mobile.Rating; + /*Rating*/ + + + /*Rotator*/ + ejmRotator(): JQuery; + ejmRotator(options?: ej.mobile.RotatorOptions): JQuery; + data(key: "ejmRotator"): ej.mobile.Rotator; + /*Rotator*/ + + /*Slider*/ + ejmSlider(): JQuery; + ejmSlider(options?: ej.mobile.SliderOptions): JQuery; + data(key: "ejmSlider"): ej.mobile.Slider; + /*Slider*/ + + /* Tab */ + ejmTab(): JQuery; + ejmTab(options?: ej.mobile.TabOptions): JQuery; + data(key: "ejmTab"): ej.mobile.Tab; + /* Tab */ + + /*Tile*/ + ejmTile(): JQuery; + ejmTile(options?: ej.mobile.TileOptions): JQuery; + data(key: "ejmTile"): ej.mobile.Tile; + /*Tile*/ + + /* TimePicker */ + ejmTimePicker(): JQuery; + ejmTimePicker(options?: ej.mobile.TimePickerOptions): JQuery; + data(key: "ejmTimePicker"): ej.mobile.TimePicker; + /* TimePicker */ + + /*ToggleButton*/ + ejmToggleButton(): JQuery; + ejmToggleButton(options?: ej.mobile.ToggleButtonOptions): JQuery; + data(key: "ejmToggleButton"): ej.mobile.ToggleButton; + /*ToggleButton*/ + + /*Toolbar*/ + ejmToolbar(): JQuery; + ejmToolbar(options?: ej.mobile.ToolbarOptions): JQuery; + data(key: "ejmToolbar"): ej.mobile.Toolbar; + /*Toolbar*/ + + /*GroupButton*/ + ejmGroupButton(): JQuery; + ejmGroupButton(options?: ej.mobile.GroupButtonOptions): JQuery; + data(key: "ejmGroupButton"): ej.mobile.GroupButton; + /*GroupButton*/ + + /* SplitPane */ + ejmSplitPane(): JQuery; + ejmSplitPane(options?: ej.mobile.SplitPaneOptions): JQuery; + data(key: "ejmSplitPane"): ej.mobile.SplitPane; + /* SplitPane */ + + /* Dialog */ + ejmDialog(): JQuery; + ejmDialog(options?: ej.mobile.DialogOptions): JQuery; + data(key: "ejmDialog"): ej.mobile.Dialog; + /* Dialog */ + + /* TextBox */ + ejmTextBox(): JQuery; + ejmTextBox(options?: ej.mobile.TextBoxOptions): JQuery; + data(key: "ejmTextBox"): ej.mobile.TextBox; + /* TextBox */ + + /* Password */ + ejmPassword(): JQuery; + ejmPassword(options?: ej.mobile.TextBoxOptions): JQuery; + data(key: "ejmPassword"): ej.mobile.TextBox; + /* Password */ + + /* MaskEdit */ + ejmMaskEdit(): JQuery; + ejmMaskEdit(options?: ej.mobile.MaskEditOptions): JQuery; + data(key: "ejmMaskEdit"): ej.mobile.MaskEdit; + /* MaskEdit */ + + /* TextArea */ + ejmTextArea(): JQuery; + ejmTextArea(options?: ej.mobile.TextBoxOptions): JQuery; + data(key: "ejmTextArea"): ej.mobile.TextBox; + /* MaskEdit */ + + /* Footer */ + ejmFooter(): JQuery; + ejmFooter(options?: ej.mobile.FooterOptions): JQuery; + data(key: "ejmFooter"): ej.mobile.Footer; + /* Footer */ + + /* CheckBox */ + ejmCheckBox(): JQuery; + ejmCheckBox(options?: ej.mobile.CheckBoxOptions): JQuery; + data(key: "ejmCheckBox"): ej.mobile.CheckBox; + /* CheckBox */ + + /* ScrollPanel */ + ejmScrollPanel(): JQuery; + ejmScrollPanel(options: ej.mobile.ScrollPanelOptions): JQuery; + data(key: "ejmScrollPanel"): ej.mobile.ScrollPanel; + /* ScrollPanel */ + + /* NavigationDrawer */ + ejmNavigationDrawer(): JQuery; + ejmNavigationDrawer(options: ej.mobile.NavigationDrawerOptions): JQuery; + data(key: "ejmNavigationDrawer"): ej.mobile.NavigationDrawer; + /* NavigationDrawer */ + + /* RadialMenu */ + ejmRadialMenu(): JQuery; + ejmRadialMenu(options?: ej.mobile.RadialMenuOptions): JQuery; + data(key: "ejmRadialMenu"): ej.mobile.RadialMenu; + /* RadialMenu */ + + ejLinearGauge(): JQuery; + ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; + data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; + + ejDigitalGauge(): JQuery; + ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; + data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; + + ejCircularGauge(): JQuery; + ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; + data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; + + ejChart(): JQuery; + ejChart(options?: ej.datavisualization.Chart.Model): JQuery; + data(key: "ejChart"): ej.datavisualization.Chart; + + ejRangeNavigator(): JQuery; + ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; + data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; + + ejBulletGraph(): JQuery; + ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; + data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; + + ejMap(): JQuery; + ejMap(options?: ej.datavisualization.Map.Model): JQuery; + data(key: "ejMap"): ej.datavisualization.Map; + + ejTreeMap(): JQuery; + ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; + data(key: "ejTreeMap"): ej.datavisualization.TreeMap; + + ejBarcode(): JQuery; + ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; + data(key: "ejBarcode"): ej.datavisualization.Barcode; + + ejDiagram(): JQuery; + ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; + data(key: "ejDiagram"): ej.datavisualization.Diagram; + +} \ No newline at end of file diff --git a/ej.widgets.all/ej.web.all-tests.ts b/ej.widgets.all/ej.web.all-tests.ts new file mode 100644 index 0000000000..091359c821 --- /dev/null +++ b/ej.widgets.all/ej.web.all-tests.ts @@ -0,0 +1,1260 @@ +/// +/// + +$(document).ready(function () { + + //Properties + $("#draggable1").ejDraggable({ + drag: ondrag1, dragStart: ondragstart1, dragStop: ondragstop1 + }); + $("#droppable1").ejDroppable(); + +}); +//Events + +function ondrag1() { + console.log("The mouse is moved during the dragging."); +} +function ondragstart1() { + console.log("To handle the drag start event as an init option."); +} +function ondragstop1() { + console.log("The mouse is moved during the dragging.."); +} + + + + + +$(document).ready(function () { + + //Properties + $("#draggable1").ejDraggable({ + drag: ondrag2, dragStart: ondragstart2, dragStop: ondragstop2 + }); + $("#droppable1").ejDroppable(); + +}); +//Events + +function ondrag2() { + console.log("The mouse is moved during the dragging."); +} +function ondragstart2() { + console.log("To handle the drag start event as an init option."); +} +function ondragstop2() { + console.log("The mouse is moved during the dragging.."); +} + + + + + +$(document).ready(function () { + + //Properties + $("#resizable1").ejResizable({resizeStart: onresizestart , resizeStop: onresizestop }); + +}); +//Events +function onresizestart() { + console.log("The resizing is start"); +} +function onresizestop() { + console.log("The resizing is stop"); +} + + + + + +$(document).ready(function () { + + //Properties + $("#scroller1").ejScroller({ height: 300, width: 500, create: onScrollCreate }); + $("#scroller2").ejScroller({ height: 300, width: 500,scrollTop:40 }); + +}); +//Events +function onScrollCreate() { + console.log("control created"); +} + +$(document).ready(function () { + + $("#accordion1").ejAccordion({cssClass: "gradient-lime" , create: AccordionCreate }); + $("#accordion2").ejAccordion({ enabled: true , activate: AccordionActivate }); + +}); + +function AccordionCreate() { + console.log("create"); +} +function AccordionActivate(){ + console.log("activate") +} + +$(document).ready(function () { + + $("#Text1").ejButton({ text: "Button", enabled: false , create: onButtoncreate }); + $("#Text2").ejButton({ text: "Button", cssClass: "customclass" , click: onButtonclick }); +}); + +function onButtoncreate() { + console.log("create"); +} +function onButtonclick(){ + console.log("click") +} +$(document).ready(function () { + + //Properties + $("#listbox1").ejListBox({ allowMultiSelection: true, create: onlistBoxcreate }); + $("#listbox2").ejListBox({ showCheckbox: true,checkChange: onlistBoxcheckchange }); + +}); +//Events +function onlistBoxcreate() { + console.log("control created"); +} +function onlistBoxcheckchange() { + console.log("list item is checked or unchecked"); +} + + + + + +$(document).ready(function () { + + $("#checkbox1").ejCheckBox({ enableTriState: true, create: onCheckboxcreate }); + $("#checkbox2").ejCheckBox({ checked: true , change: onCheckboxchange }); + +}); + +function onCheckboxcreate() { + console.log("create"); +} +function onCheckboxchange(){ + console.log("change") +} + + + +$(document).ready(function () { + + $("#colorpicker1").ejColorPicker({ value: "#278787" , open: oncolorPickeropen }); + $("#colorpicker2").ejColorPicker({ enabled: true, create: oncolorPickercreate }); + +}); +function oncolorPickeropen() { + console.log("open"); +} +function oncolorPickercreate(){ + console.log("create") +} + + +$(document).ready(function () { + + $("#fileExplorer").ejFileExplorer({ + isResponsive: true, + fileTypes: "*.png, *.gif, *.jpg, *.jpeg, *.docx", + layout: "largeicons", + path: "http://mvc.syncfusion.com/ODataServices/FileBrowser/", + ajaxAction: "http://mvc.syncfusion.com/OdataServices/fileExplorer/fileoperation/doJSONPAction", + ajaxDataType: "jsonp", + }); +}); + + +$(document).ready(function () { + + $("#datepicker1").ejDatePicker({dateFormat: "dd/MM/yyyy" ,open: ondatePickeropen }); + $("#datepicker3").ejDatePicker({value: "21/2/2010" , select: ondatePickerselect }); + +}); +function ondatePickeropen() { + console.log("open"); +} +function ondatePickerselect(){ + console.log("select") +} + + +$(document).ready(function () { + + $("#datetimepicker1").ejDateTimePicker({width:"100%" , create: ondatetimePickercreate }); + $("#datetimepicker2").ejDateTimePicker({enableRTL: true , open: ondatetimePickeropen }); +}); +function ondatetimePickercreate() { + console.log("create"); +} +function ondatetimePickeropen(){ + console.log("open") +} + + +$(document).ready(function () { + $("#Div1").ejDialog({ enabled: true , open : ondialogOpen }); + $("#Div2").ejDialog({ title: "Low battery" , beforeClose : ondialogbeforeClose }); +}); +function ondialogbeforeClose() { + console.log("beforeClose"); +} +function ondialogOpen() { + console.log("open"); +} +$(document).ready(function () { + + $("#dropdownlist1").ejDropDownList({ targetID: "carsList", create: ondropDowncreate }); + $("#dropdownlist2").ejDropDownList({ watermarkText: "Select a car", change: ondropDownchange }); +}); + +function ondropDowncreate() { + console.log("create"); +} +function ondropDownchange(){ + console.log("change") +} +$(document).ready(function () { + $("#num1").ejNumericTextbox({ value:"35" ,create: onEditorcreate }); + $("#num2").ejNumericTextbox({ width:"100%" , change: onEditorchange }); + + $("#num3").ejPercentageTextbox({ value:"3" ,create: onEditorcreate }); + $("#num4").ejPercentageTextbox({ width:"100%" , change: onEditorchange }); + + $("#num5").ejCurrencyTextbox({ value:"555" ,create: onEditorcreate }); + $("#num6").ejCurrencyTextbox({ width:"100%" , change: onEditorchange }); + +}); + +function onEditorcreate() { + console.log("create"); +} +function onEditorchange(){ + console.log("change") +} + +$(document).ready(function () { + + //Properties + $("#listview1").ejListView({ width: 200,mouseUP: onlistViewmouseup }); + $("#listview2").ejListView({ height: 300, mouseDown: onlistViewmousedown }); + +}); +//Events +function onlistViewmouseup() { + console.log("mouse up happens on the item."); +} +function onlistViewmousedown() { + console.log("mouse down happens on the item."); +} + + + + + + + + + +$(document).ready(function () { + $("#num1").ejMaskEdit({ maskFormat: "99-999-99999" ,create: onmaskEditcreate }); + $("#num2").ejMaskEdit({ watermarkText: "99-999-99999", width:"100%" , change: onmaskEditchange }); +}); + +function onmaskEditcreate() { + console.log("create"); +} +function onmaskEditchange(){ + console.log("change") +} +$(document).ready(function () { + + //Properties + $("#menu1").ejMenu({ enabled: false ,create: onMenucreate }); + $("#menu2").ejMenu({ width: "800px",click: onMenuclick }); + +}); +//Events +function onMenucreate() { + console.log("control created"); +} +function onMenuclick() { + console.log("mouse click on menu items"); +} + + + + + +$(document).ready(function () { + $("#pager1").ejPager({ click : onclickpager }); + $("#pager2").ejPager({ enableRTL: true }); +}); + +function onclickpager(){ + console.log("click") +} +$(document).ready(function () { + + $("#progress1").ejProgressBar({ text: 'loading...' , value: 50 , create: ProgressBarCreate }); + $("#progress2").ejProgressBar({ width: 200, value: 50 , change: ProgressBarChange }); + +}); + +function ProgressBarCreate() { + console.log("create"); +} +function ProgressBarChange(){ + console.log("change"); +} + +$(document).ready(function () { + $("#r1").ejRadioButton({ create: onradioButtoncreate }); + $("#r2").ejRadioButton({ text: "RadioButton",change: onradioButtonchange }); + $("#r3").ejRadioButton({ text: "RadioButton1", enabled: false }); +}); + +function onradioButtonchange() { + console.log("Change triggered"); +} +function onradioButtoncreate() { + console.log("Create triggered"); +} +$(document).ready(function () { + $("#Div1").ejRating({ enabled: true, click: onRatingclick }); + $("#Div2").ejRating({ incrementStep: 1, change: RatingvalueChanged }); +}); + +function RatingvalueChanged() { + console.log("Value changed"); +} +function onRatingclick() { + console.log("Entered"); +} +$(document).ready(function () { + + + $("#test1").ejRibbon({ + allowResizing:true,applicationTab: { + menuSettings: { + openOnClick: false + } + }, + tabs: [{ + id: "home", + text: "HOME", + groups: [{ + text: "New", + type: "custom", + contentID: "btn" + }] + }], + }); + $("#test2").ejRibbon({ + width: "100%", + applicationTab: { + menuSettings: { + openOnClick: false + } + }, + tabs: [{ + id: "home", + text: "HOME", + groups: [{ + text: "New", + type: "custom", + contentID: "btn" + }] + }], tabClick: onRibbonTabClick + }); +}); + +function onRibbonTabClick() { + console.log("Tab Clicked.."); +} + +$(function() { + $("#Kanban").ejKanban( + { + enableRTL: true, + columns: [ + { headerText: "Backlog", key: "Open" }, + { headerText: "In Progress", key: "InProgress" }, + { headerText: "Testing", key: "Testing" }, + { headerText: "Done", key: "Close" } + ], + keyField: "Status", + + + }); + }); + +$(document).ready(function () { + var imageData = [ + { + "imageurl": "../themes/images/rose.jpg", + }, + { + "imageurl": "../themes/images/rose.jpg", + } + + ]; + $("#test1").ejRotator({ + dataSource:imageData, allowKeyboardNavigation : false,create: onRotatorCreate + }); + $("#test2").ejRotator({ + dataSource:imageData, displayItemsCount : "1",pagerClick: onRotatorpagerClick + + }); + + +}); + +function onRotatorCreate() { + console.log("created"); +} +function onRotatorpagerClick() { + console.log("page clicked.."); +} + + +$(document).ready(function () { + $("#rteSample").ejRTE({ allowEditing: false , enableRTL: true }); + $("#rteSample").ejRTE({ change: onRtechange , execute: onRteExecute }); +}); + +function onRtechange() { + console.log("Change triggered"); +} +function onRteExecute() { + console.log("Executed"); +} +$(document).ready(function() { + $("#test1").ejSlider({ showRoundedCorner: true }); + $("#test2").ejSlider({ orientation: ej.Orientation.Vertical }); + $("#test3").ejSlider({ minValue: 20, maxValue: 80 }); + $("#test4").ejSlider({ start: Sliderstart }); + $("#test5").ejSlider({ enabled: false }); + $("#test6").ejSlider({ slide: onSliderslide }); +}); +function Sliderstart() { + console.log("Slider Started"); +} +function onSliderslide() { + console.log("Moving"); +} + +$(document).ready(function () { + $("#sbutton").ejSplitButton({ + width: "120px", + height: "50px", + buttonMode: ej.ButtonMode.Dropdown, + create: splitButtonopen, + targetID: "target", + }); +}); + +function splitButtonopen() +{ +alert("Opened"); +} + + + +$(document).ready(function () { + + $("#splitter1").ejSplitter({ enableRTL: true , create: onSplitterCreate }); + $("#splitter2").ejSplitter({allowKeyboardNavigation: false , expandCollapse: onSplitterExpandCollapse }); + +}); +function onSplitterCreate() { + console.log("Created"); +} +function onSplitterExpandCollapse(){ + console.log("expand and collapsed") +} + +$(document).ready(function () { + + $("#tab1").ejTab({ enableRTL: true , create: onTabCreate }); + $("#tab2").ejTab({ showRoundedCorner: true , ajaxSuccess: onTabAjaxSuccess }); + +}); +function onTabCreate() { + console.log("created"); +} + +function onTabAjaxSuccess() { + console.log("ajaxsuccess"); +} + + +$(function () { + // declaration + var websiteCollection = [ + { text: "Google", url: "http://www.google.com", frequency: 12 }, + { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, + + ]; + $("#tagtest").ejTagCloud({ + titleText: "Tech Sites", + dataSource: websiteCollection, + enableRTL: true, mouseout: onTagMouseout + }); + $("#tagtest1").ejTagCloud({ + titleText: "Tech Sites", + dataSource: websiteCollection, + maxFontSize: "10px", create: onTagCreate + }); + function onTagCreate() { + console.log("created"); + } + function onTagMouseout() { + console.log("mouseout"); + } +}); + + + + $(function () { + $("#time").ejTimePicker({ enabled : true, height : "35",close: TimeClose,create: TimeCreate}); + }); + + function TimeClose() { + console.log("close"); + } + function TimeCreate() { + console.log("create"); + } + + + $(function () { + $("#tbutton").ejToggleButton({ + size: "large", + height: "28px", + click:ToggleClick, + create:ToggleCreate + }); + }); + + function ToggleClick() { + console.log("click"); + } + function ToggleCreate() { + console.log("create"); + } + +$(function () {// document ready + // Toolbar control creation + $("#ToolbarItem").ejToolbar({ + width: "auto", // width of the Toolbar + height: "33px", // height of the Toolbar + create:ToolBarCreate, + click:ToolBarClick + }); + }); + +function ToolBarCreate() { + console.log("click"); +} +function ToolBarClick() { + console.log("create"); +} + +$(document).ready(function () { + + $("#treeView").ejTreeView({ width: 300 , cssClass: 'customclass' , create: TreeViewCreate }); + + $("#treeView1").ejTreeView({ height: 300 , enabled: true , nodeClick: TreeViewClick }); +}); + + +function TreeViewCreate() { + console.log("create"); +} +function TreeViewClick(){ + console.log("click"); +} + +$(document).ready(function () { + + //Properties + $("#uploadbbox1").ejUploadbox({ height: "60px", create: onuploadBoxcreate }); + $("#uploadbbox2").ejUploadbox({ enableRTL: true, fileSelect: onuploadBoxfileselect }); + +}); +//Events +function onuploadBoxcreate() { + console.log("control created"); +} +function onuploadBoxfileselect() { + console.log("file has been selected"); +} + + + + + + + + + +$(document).ready(function () { + + //Properties + $("#waitingpopup1").ejWaitingPopup({ showOnInit: true, create: onwaitingPopupcreate }); + $("#waitingpopup2").ejWaitingPopup({ showOnInit: true, showImage: false }); + +}); +//Events +function onwaitingPopupcreate() { + console.log("control created"); +} + + + + + +$(function () { + $("#Grid").ejGrid({ + allowPaging: true, + allowSorting: true, + rowSelected: onGridRowSelect, + columnSelected: onGridColumnSelect, + rightClick: onGridRightClick, + columns: [ + { field: "OrderID", headerText: "Order ID", width: 75 , textAlign: ej.TextAlign.Right }, + { field: "CustomerID", headerText: "Customer ID", width: 80 }, + { field: "EmployeeID", headerText: "Employee ID", width: 75, textAlign: ej.TextAlign.Right }, + { field: "Freight", width: 75, format: "{0:C}", textAlign: ej.TextAlign.Right }, + { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right }, + { field: "ShipCity", headerText: "Ship City", width: 110 } + ] + }); + }); + +function onGridRowSelect() +{ +console.log("Row Selected"); +} +function onGridRightClick() +{ +console.log("Right Click Button Clicked"); +} +function onGridColumnSelect() +{ +console.log("Column Selected"); +} + + $(function () { + $("#PivotGrid").ejPivotGrid({ + load: PivotGridload, + renderComplete: PivotGridrenderComplete, + url: "/wcf/PivotGridService.svc", + isResponsive: true + + }); + }); + + function PivotGridload() { + console.log("load"); + } + function PivotGridrenderComplete() { + console.log("rendercomplete"); + } + + + $(function () { + $("#PivotSchemaDesigner1").ejPivotSchemaDesigner({ + height: "630px", + url: "/wcf/PivotService.svc" + }); + }); + + + +$(document).ready(function () { + $("#pivotpager1").ejPivotPager({ categoricalCurrentPage: 1 }); + $("#pivotpager2").ejPivotPager({ seriesPageCount: 0 }); +}); + +$(document).ready(function () { + $("#test1").ejSchedule({ + cellHeight:"35px", cellClick: onScheduleCellClick + }); + $("#test2").ejSchedule({ + enableRTL: true, menuItemClick: onScheduleMenuItemClick + }); +}); +function onScheduleCellClick() { + console.log("cell clicked.."); +} +function onScheduleMenuItemClick() { + console.log("Menu Item Clicked.."); +} + + + $(function () { + $("#RecurrenceEditor").ejRecurrenceEditor({ + selectedRecurrenceType: 0, + create: RecurrenceEditorOncreate + }); + + }); + + function RecurrenceEditorOncreate() { + this.element.find("#recurrencetype_wrapper").css("width", "33%"); + } + +$(document).ready(function () { + +$("#GanttContainer").ejGantt({ + allowSelection: true, + allowColumnResize: true, + taskIdMapping: "TaskID", + taskNameMapping: "TaskName", + scheduleStartDate: "02/23/2014", + scheduleEndDate: "03/31/2014", + startDateMapping: "StartDate", + endDateMapping: "EndDate", + progressMapping: "Progress", + childMapping: "Children", + allowGanttChartEditing: false, + treeColumnIndex: 1, + enableResize: true, + expanded: onGanttExpand, + load: onGanttLoad + }); +}); + +function onGanttExpand() +{ +console.log("Expanded"); +} +function onGanttLoad() +{ +console.log("Loading"); +} +$(document).ready(function () { + + + $("#test1").ejReportViewer({ reportServiceUrl: "../api/RDLReport",enablePageCache: false,reportLoaded: onReportReportLoaded }); + $("#test2").ejReportViewer({ + renderMode: ej.ReportViewer.RenderMode.Default,reportServiceUrl: "../api/RDLReport",renderingBegin: onReportRenderingBegin }); +}); +function onReportRenderingBegin() { + console.log("Rendering Begin.."); +} +function onReportReportLoaded() { + console.log("Report Loaded.."); +} + +$(document).ready(function () { + var dataManager = [ + { + taskID: 1, + taskName: "Planning", + startDate: "02/03/2014", + endDate: "02/07/2014", + progress: 100, + duration: 5, + priority: "Normal", + approved: false, + subtasks: [ + { taskID: 2, taskName: "Plan timeline", startDate: "02/03/2014", endDate: "02/07/2014", duration: 5, progress: 100, priority: "Normal", approved: false }, + { taskID: 3, taskName: "Plan budget", startDate: "02/03/2014", endDate: "02/07/2014", duration: 5, progress: 100, approved: true }, + { taskID: 4, taskName: "Allocate resources", startDate: "02/03/2014", endDate: "02/07/2014", duration: 5, progress: 100, priority: "Critical", approved: false }, + { taskID: 5, taskName: "Planning complete", startDate: "02/07/2014", endDate: "02/07/2014", duration: 0, progress: 0, priority: "Low", approved: true } + ] + }]; + +$("#test1").ejTreeGrid({ + dataSource:dataManager,allowColumnResize: true, + columns: [ + { field: "taskID", headerText: "Task Id", editType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker" }, + { field: "endDate", headerText: "End Date", editType: "datepicker" }, + { field: "duration", headerText: "Duration", editType: "numericedit" }, + { field: "progress", headerText: "Progress", editType: "numericedit" } + ],load: onTreeLoad + }); + $("#test2").ejTreeGrid({ + dataSource:dataManager,rowHeight : 30, + columns: [ + { field: "taskID", headerText: "Task Id", editType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker" }, + { field: "endDate", headerText: "End Date", editType: "datepicker" }, + { field: "duration", headerText: "Duration", editType: "numericedit" }, + { field: "progress", headerText: "Progress", editType: "numericedit" } + ],rowSelected: onTreeRowSelected + + }); + + +}); +function onTreeLoad() { + console.log("loaded.."); +} +function onTreeRowSelected() { + console.log("row Selected.."); +} + + +$(document).ready(function () { + $("#navpane").ejNavigationDrawer({ type: "overlay", direction: "left", position: "fixed",open: NavigationDrawerOpen }); +}); + +function NavigationDrawerOpen() +{ + console.log("open"); +} + + + $(function () { + $('#radialmenu').ejRadialMenu({ targetElementId: "radialtarget", "autoOpen":true,select: RadialMenuSelect , mouseUp: RadialMenuMouseUp }); + }); + + function RadialMenuMouseUp() { + console.log("mouseUp"); + } + function RadialMenuSelect() { + console.log("select"); + } + + + +$(function () +{ + $("#tile1").ejTile({ text: "Map", tileSize: "medium", imageUrl: 'http://js.syncfusion.com/ug/web/content/tile/map.png', mouseUp: TileMouseUp, mouseDown: TileMouseDown }); +}); + +function TileMouseUp() { + console.log("mouseUp"); +} + +function TileMouseDown() { + console.log("mousedown"); +} + + + + + $(function () { + $("#radialSlider").ejRadialSlider({ innerCircleImageUrl: "chevron-right.png",autoOpen:true, create: RadialSliderCreate , start: RadialSliderStart }); + }); + + function RadialSliderCreate() { + console.log("create"); + } + function RadialSliderStart() { + console.log("start"); + } + +$(document).ready(function () { + $("#test1").ejSpreadsheet({ + allowDelete: true, cellEdit: onSpreadsheetCellEdit + }); + $("#test2").ejSpreadsheet({ + cssClass: "gradient-lime", drag: onSpreadsheetDrag + }); +}); +function onSpreadsheetDrag() { + console.log("item drag.."); +} +function onSpreadsheetCellEdit() { + console.log("cell edited.."); +} + + + $(function() + { + $("#OlapChart").ejOlapChart( + { + url: "OlapChartService.svc", + renderFailure: OlapChartRenderFailure, + renderSuccess: OlapChartRenderSuccess + }); + }); + + function OlapChartRenderFailure() { + console.log("failure"); + } + function OlapChartRenderSuccess() { + console.log("success"); + } + + + $(function() + { + $("#OlapClient").ejOlapClient( + { + url: "/wcf/OlapClientService.svc", + title: "OLAP Browser", + renderFailure: OlapClientRenderFailure, + renderSuccess: OlapClientRenderSuccess + }); + }); + + function OlapClientRenderFailure() { + console.log("failure"); + } + function OlapClientRenderSuccess() { + console.log("success"); + } + +$(document).ready(function() + { + $("#olapgauge1").ejOlapGauge( + { + url: "../wcf/OlapGaugeService.svc", + enableTooltip: true, + renderFailure: olapGaugerenderFailure, + renderSuccess: olapGaugerenderSuccess + }); + }); +function olapGaugerenderFailure() { + console.log("failure"); + } +function olapGaugerenderSuccess() { + console.log("success"); + } + +$(document).ready(function () { + + $("#CoreLinearGauge").ejLinearGauge({ + labelColor: "#8c8c8c", width: 500, + scales: [{ + width: 4, border: { color: "transparent",width:0 }, showBarPointers: false, showRanges: true, length: 310, + position: { x: 52, y: 50 }, markerPointers: [{ + value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } + }], + labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale:{x: -13} }], + ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], + ranges: [{ + endValue: 60, + startValue: 0, + backgroundColor: "#F6B53F", + border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 + }, { + endValue: 100, + startValue: 60, + backgroundColor: "#E94649", + border: { color: "#E94649" }, startWidth: 4, endWidth: 4 + }] + }], + init:onLinearGaugeinit, + mouseClick:onLinearGaugemouseClick + }); +}); + +function onLinearGaugeinit() +{ + console.log("init"); +} +function onLinearGaugemouseClick() +{ + console.log("mouseClick"); +} + +$(document).ready(function () { + + $("#CoreCircularGauge").ejCircularGauge({ + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7, + pointerCap: { radius: 12 } + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }], + mouseClick:onCircularMouseClick + }); + +}); + +function onCircularMouseClick() +{ + console.log("Mouse click.."); +} + +$(document).ready(function () { + + $("#DigitalCore").ejDigitalGauge({ + width: 525, + height: 305, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "123456789", + position: { x: 52, y: 52 } + }], + init:onDigitalGaugeinit, + itemRendering:onDigitalGaugeItemRendering + }); +}); + +function onDigitalGaugeinit() +{ + console.log("init"); +} +function onDigitalGaugeItemRendering() +{ + console.log("itemRendering"); +} + +$(document).ready(function () { + + $("#container").ejChart( + { + + + + //Initializing Common Properties for all the series + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : {width: 2} + }, + + + + title :{text: 'Efficiency of oil-fired power production'}, + size: { height: "600" }, + legend: { visible: true}, + create:onChartCreate + }); + +}); + +function onChartCreate() +{ + console.log("create"); +} + +$(document).ready(function () { + + $("#scrollcontent").ejRangeNavigator({ + + enableDeferredUpdate: true, + padding: "15", + allowSnapping:true, + selectedRangeSettings: { + start:"2015/5/25", end:"2016/5/25" + }, + + }) +}); + +$(document).ready(function () { + $("#BulletGraph1").ejBulletGraph({ + qualitativeRangeSize: 32, + quantitativeScaleLength: 475, tooltipSettings: {template: "Tooltip", visible: true}, orientation: ej.datavisualization.BulletGraph.Orientation.Horizontal, + flowDirection: ej.datavisualization.BulletGraph.FlowDirection.Forward, + quantitativeScaleSettings: { + location: { x: 110, y: 10 }, + minimum: 0, + maximum: 10, + interval: 1, + minorTicksPerInterval: 4, + majorTickSettings:{ size: 13, width: 1, stroke: 'gray'}, + minorTickSettings:{ size: 5, width: 1, stroke: 'gray'}, + + labelSettings: { + position: ej.datavisualization.BulletGraph.LabelPosition.Below, offset: 14, size: 10 + }, + featuredMeasureSettings: { width: 6 }, + comparativeMeasureSettings:{ + width: 5 + }, + featureMeasures: [{ value: 8, comparativeMeasureValue: 6.7, category: ""}] + }, + qualitativeRanges: [{ + rangeEnd: 4.3 + }, { + rangeEnd: 7.3 + }, { + rangeEnd: 10 + }], + captionSettings: { textAngle: 0, + location: { x: 17, y: 20 }, text: "Revenue YTD", font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1 }, //'#707070' + subTitle: { textAngle: 0, + text: "$ in Thousands", location: { x: 10, y: 35 }, font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1} //'#707070' + } + } + + + + }); + + $("#BulletGraph2").ejBulletGraph({ qualitativeRangeSize: 32, height:140, + quantitativeScaleLength: 475, orientation: ej.datavisualization.BulletGraph.Orientation.Horizontal, + flowDirection: ej.datavisualization.BulletGraph.FlowDirection.Forward, + quantitativeScaleSettings: { + location: { x: 110, y: 10 }, + minimum: -10, + maximum: 10, + interval: 2, + minorTicksPerInterval: 4, + majorTickSettings:{ size: 13, width: 1}, + minorTickSettings:{ size: 5, width: 1}, + + labelSettings: { + position: ej.datavisualization.BulletGraph.LabelPosition.Below, offset: 14, size: 10, labelSuffix: ' %' + }, + featuredMeasureSettings: { width: 6 }, + comparativeMeasureSettings:{ width: 5 }, + featureMeasures: [{ value: 8, comparativeMeasureValue: 6.7}] + }, + qualitativeRanges: [{ + rangeEnd: -4, rangeStroke: "#61a301" + }, { + rangeEnd: 3, rangeStroke: "#fcda21" + }, { + rangeEnd: 10, rangeStroke: "#d61e3f" + }], + captionSettings: { textAngle: 0, + location: { x: 60, y: 25 }, text: "Profit", font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '13px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1 }, //'#707070' + //subTitle: { textAngle: 0, + // text: "profit in %", location: { x: 35, y: 35 }, font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1} //'#707070' + //} + }, + drawLabels:onBulletDrawLabel + }); + +}); + + function onBulletDrawLabel() + { + console.log("drawLabel"); + } + + +$(document).ready(function () { + + $("#barcode").ejBarcode({ text: "HTTP://WWW.SYNCFUSION.COM", symbologyType: "qrbarcode", xDimension: 8, displayText: true, load:onBarcodeLoad }); + +}); + +function onBarcodeLoad() + { + console.log("load"); + } + + jQuery(function ($) { + $("#container").ejMap({ + mouseover:MapMouseOver, + onRenderComplete:MapOnRenderComplete, + navigationControl:{enableNavigation:true,orientation:'vertical',absolutePosition:{x:5,y:15},dockPosition: 'none'}, + background:'white', + enableAnimation: true, + layers: [ + { + layerType: "geometry", + enableSelection: false, + enableMouseHover:false, + + showMapItems: false, + markerTemplate: 'template', + shapeSettings: { + fill: "#626171", + strokeThickness: "1", + stroke: "#6F6F79", + highlightStroke:"#6F6F79", + valuePath: "name", + highlightColor: "gray" + + }, + + } + ] + + }); + }); + function MapMouseOver() { + console.log("mouseover"); + } + function MapOnRenderComplete() { + console.log("onRenderComplete"); + } + + + jQuery(function ($) { + $("#treemapContainer").ejTreeMap({ + treeMapItemSelected:onTreeMapItemSelected, + + levels: [ + { groupPath: "Continent", groupGap: 5} + ], + colorValuePath: "Growth", + rangeColorMapping: [ + { color: "#DC562D", from: "0", to: "1" }, + { color: "#FED124", from: "1", to: "1.5" }, + { color: "#487FC1", from: "1.5", to: "2" }, + { color: "#0E9F49", from: "2", to: "3" } + ], + showTooltip:true, + leafItemSettings: { labelPath: "Region" } + }); + }); + function onTreeMapItemSelected() { + console.log("TreeMapItemSelected"); + } + + \ No newline at end of file diff --git a/ej.widgets.all/ej.web.all.d.ts b/ej.widgets.all/ej.web.all.d.ts new file mode 100644 index 0000000000..de335df408 --- /dev/null +++ b/ej.widgets.all/ej.web.all.d.ts @@ -0,0 +1,47109 @@ +// Type definitions for ej.web.all v14.1.0.41 +// Project: http://help.syncfusion.com/js/typescript +// Definitions by: Syncfusion +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*! +* filename: ej.web.all.d.ts +* version : 14.1.0.41 +* Copyright Syncfusion Inc. 2001 - 2016. All rights reserved. +* Use of this code is subject to the terms of our license. +* A copy of the current license can be obtained at any time by e-mailing +* licensing@syncfusion.com. Any infringement will be prosecuted under +* applicable laws. +*/ +declare module ej { + + var dataUtil: dataUtil; + function isMobile(): boolean; + function isIOS(): boolean; + function isAndroid(): boolean; + function isFlat(): boolean; + function isWindows(): boolean; + function isCssCalc(): boolean; + function getCurrentPage(): JQuery; + function isLowerResolution(): boolean; + function browserInfo(): browserInfoOptions; + function isTouchDevice(): boolean; + function addPrefix(style: string): string; + function animationEndEvent(): string; + function blockDefaultActions(e: Object): void; + function buildTag(tag: string, innerHtml: string, styles: Object, attrs: Object): JQuery; + function cancelEvent(): string; + function copyObject(): string; + function createObject(nameSpace: string, value: Object, initIn: string): JQuery; + function defineClass(className: string, constructor:any, proto: Object, replace: boolean): Object; + function destroyWidgets(element: Object): void; + function endEvent(): string; + function event(type: string, data: any, eventProp: Object): Object; + function getAndroidVersion(): Object; + function getAttrVal(ele: Object, val: string, option: Object): Object; + function getBooleanVal(ele: Object, val: string, option: Object): Object; + function getClearString(): string; + function getDimension(element: Object, method: string): Object; + function getFontString(fontObj: Object): string; + function getFontStyle(style: string): string; + function getMaxZindex(): number; + function getNameSpace(className: string): string; + function getObject(nameSpace: string): Object; + function getOffset(ele: string): Object; + function getRenderMode(): string; + function getScrollableParents(element: Object): void; + function getTheme(): string; + function getZindexPartial(element: Object, popupEle: string): number; + function hasRenderMode(element: string): void; + function hasStyle(prop: string): boolean; + function hasTheme(element: string): string; + function hexFromRGB(color: string): string; + function ieClearRemover(element: string): void; + function isAndroidWebView(): string; + function isDevice(): boolean; + function isIOS7(): boolean; + function isIOSWebView(): boolean; + function isLowerAndroid(): boolean; + function isNullOrUndefined(value: Object): boolean; + function isPlainObject(): JQuery; + function isPortrait(): any; + function isTablet(): boolean; + function isWindowsWebView(): string; + function listenEvents(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function listenTouchEvent(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function logBase(val: string, base: string): number; + function measureText(text: string, maxwidth: number, font: string): string; + function moveEvent(): string; + function print(element: string): void; + function proxy(fn: Object, context: string, arg: string): boolean; + function round(value: string, div: string, up: string): any; + function sendAjaxRequest(ajaxOptions: Object): void; + function setCaretToPos(nput: string, pos1: string, pos2: string): void; + function setRenderMode(element: string): void; + function setTheme(): Object; + function startEvent(): string; + function tapEvent(): string; + function tapHoldEvent(): string; + function throwError(): Object; + function transitionEndEvent(): Object; + function userAgent(): boolean; + function widget(pluginName: string, className: string, proto: Object): Object; + function avg(json: Object, filedName: string): any; + function getGuid(prefix: string): number; + function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): Object; + function isJson(jsonData: string): string; + function max(jsonArray: any, fieldName: string, comparer: string): any; + function min(jsonArray: any, fieldName: string, comparer: string): any; + function merge(first: string, second: string): any; + function mergeshort(jsonArray: any, fieldName: string, comparer: string): any; + function parseJson(jsonText: string): string; + function parseTable(table: number, headerOption: string, headerRowIndex: string): Object; + function select(jsonArray: any, fields: string): any; + function setTransition(): boolean; + function sum(json: string, fieldName: string): string; + function swap(array: any, x: string, y: string): any; + var cssUA: string; + var serverTimezoneOffset: number; + var transform: string; + var transformOrigin: string; + var transformStyle: string; + var transition: string; + var transitionDelay: string; + var transitionDuration: string; + var transitionProperty: string; + var transitionTimingFunction: string; + export module device { + function isAndroid(): boolean; + function isIOS(): boolean; + function isFlat(): boolean; + function isIOS7(): boolean; + function isWindows(): boolean; + } + export module widget { + var autoInit: boolean; + var registeredInstances: Array; + var registeredWidgets: Array; + function register(pluginName: string, className: string, prototype: any): void; + function destroyAll(elements: Element): void; + function init(element: Element): void; + function registerInstance(element: Element, pluginName: string, className: string, prototype: any):void; + } + + interface browserInfoOptions { + name: string; + version: string; + culture: Object; + isMSPointerEnabled: boolean; + } + class WidgetBase { + destroy(): void; + element: JQuery; + setModel(options: Object, forceSet?: boolean):any; + option(prop?: Object, value?: Object, forceSet?: boolean): any; + persistState(): void; + restoreState(silent: boolean): void; + } + + class Widget extends WidgetBase { + constructor(pluginName: string, className: string, proto: any); + static fn: Widget; + static extend(widget: Widget): any; + register(pluginName: string, className: string, prototype: any): void; + destroyAll(elements: Element): void; + model: any; + } + + + interface BaseEvent { + cancel: boolean; + type: string; + } + class DataManager { + constructor(dataSource?: any, query?: ej.Query, adaptor?: any); + setDefaultQuery(query: ej.Query): void; + executeQuery(query?: ej.Query, done?: any, fail?: any, always?: any): JQueryPromise; + executeLocal(query?: ej.Query): ej.DataManager; + saveChanges(changes?: Changes, key?: string, tableName?: string): JQueryDeferred; + insert(data: Object, tableName: string): JQueryPromise; + remove(keyField: string, value: any, tableName: string): Object; + update(keyField: string, value: any, tableName: string): Object; + } + + class Query { + constructor(); + static fn: Query; + static extend(prototype: Object): Query; + key(field: string): ej.Query; + using(dataManager: ej.DataManager): ej.Query; + execute(dataManager: ej.DataManager, done: any, fail?: string, always?: string): any; + executeLocal(dataManager: ej.DataManager): ej.DataManager; + clone(): ej.Query; + from(tableName: any): ej.Query; + addParams(key: string, value: string): ej.Query; + expand(tables: any): ej.Query; + where(fieldName: string, operator: ej.FilterOperators, value: string, ignoreCase?: boolean): ej.Query; + where(predicate:ej.Predicate):ej.Query; + search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; + sortBy(fieldName: string, comparer?: ej.SortOrder, isFromGroup?: boolean): ej.Query; + sortByDesc(fieldName: string): ej.Query; + group(fieldName: string): ej.Query; + page(pageIndex: number, pageSize: number): ej.Query; + take(nos: number): ej.Query; + skip(nos: number): ej.Query; + select(fieldNames: any): ej.Query; + hierarchy(query: ej.Query, selectorFn: any): ej.Query; + foreignKey(key: string): ej.Query; + requiresCount(): ej.Query; + range(start:number, end:number): ej.Query; + } + + class Adaptor { + constructor(ds: any); + pvt: Object; + type: ej.Adaptor; + options: AdaptorOptions; + extend(overrides: any): ej.Adaptor; + processQuery(dm: ej.DataManager, query: ej.Query):any; + processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + } + + interface AdaptorOptions { + from?: string; + requestType?: string; + sortBy?: string; + select?: string; + skip?: string; + group?: string; + take?: string; + search?: string; + count?: string; + where?: string; + aggregates?: string; + } + + class UrlAdaptor extends ej.Adaptor { + constructor(); + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: Object): { + type: string; url: string; ejPvtData: Object; contentType?: string; data?: Object; + } + convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; + processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + onGroup(e: any): void; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; + beforeSend(dm: ej.DataManager, request: any, settings?:any): void; + insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: any }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; + getFiltersFrom(data: Object, query: ej.Query): ej.Predicate; + } + + class ODataAdaptor extends ej.UrlAdaptor { + constructor(); + options: UrlAdaptorOptions; + onEachWhere(filter: any, requiresCast: boolean): any; + onPredicate(pred: ej.Predicate, query: ej.Query, requiresCast: boolean): string; + onComplexPredicate(pred: ej.Predicate, requiresCast: boolean): string; + onWhere(filters: Array): string; + onEachSearch(e: Object): void; + onSearch(e: Object): string; + onEachSort(e: Object): string; + onSortBy(e: Object): string; + onGroup(e: Object): string; + onSelect(e: Object): string; + onCount(e: Object): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { + result: Object; count: number + }; + convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; + insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: Object; } + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; } + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: Object; accept: string; } + batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: Object; contentType: string; } + generateDeleteRequest(arr: Array, e: any): string; + generateInsertRequest(arr: Array, e: any): string; + generateUpdateRequest(arr: Array, e: any): string; + } + interface UrlAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class ODataV4Adaptor extends ej.ODataAdaptor { + constructor(); + options: ODataAdaptorOptions; + onCount(e: Object): string; + onEachSearch(e: Object): void; + onSearch(e: Object): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { + result: Object; count: number + }; + + } + interface ODataAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + search?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class JsonAdaptor extends ej.Adaptor { + constructor(); + processQuery(ds: Object, query: ej.Query): string; + batchRequest(dm: ej.DataManager, changes: Changes, e:any): Changes; + onWhere(ds: Object, e: any): any; + onSearch(ds: Object, e: any): any + onSortBy(ds: Object, e: any, query: ej.Query): Object; + onGroup(ds: Object, e: any, query: ej.Query): Object; + onPage(ds: Object, e: any, query: ej.Query): Object; + onRange(ds: Object, e: any): Object; + onTake(ds: Object, e: any): Object; + onSkip(ds: Object, e: any): Object; + onSelect(ds: Object, e: any): Object; + insert(dm: ej.DataManager, data: any): Object; + remove(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + update(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + } + class TableModel { + constructor(name: string, jsonArray: Array, dataManager: ej.DataManager, modelComputed: any); + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + setDataManager(dataManager: DataManager): void; + saveChanges(): void; + rejectChanges(): void; + insert(json: any): void; + update(value: any): void; + remove(key: string): void; + isDirty(): boolean; + getChanges(): Changes; + toArray(): Array; + setDirty(dirty:any, model:any): void; + get(index: number): void; + length(): number; + bindTo(element: any): void; + } + class Model { + constructor(json: any, table: string, name: string); + formElements: Array; + computes(value: any): void; + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + set(field: string, value: any): void; + get(field: string): any; + revert(suspendEvent: any): void; + save(dm: ej.DataManager, key: string): void; + markCommit(): void; + markDelete(): void; + changeState(state: boolean, args: any): void; + properties(): any; + bindTo(element: any): void; + unbind(element: any): void; + } + interface Changes { + changed?: Array; + added?: Array; + deleted?: Array; + } + class Predicate { + constructor(field: string, operator: ej.FilterOperators, value: any, ignoreCase: boolean); + and(field: string, operator: any, value:any, ignoreCase:boolean): void; + or(field: string, operator: any, value: any, ignoreCase: boolean): void; + validate(record: Object): boolean; + toJSON(): { + isComplex: boolean; + field: string; + operator: string; + value: any; + ignoreCase: boolean; + condition: string; + predicates: any; + }; + } + interface dataUtil { + swap(array: Array, x: number, y: number): void; + mergeSort(jsonArray: Array, fieldName: string, comparer:any): Array; + max(jsonArray: Array, fieldName: string, comparer: string): Array; + min(jsonArray: Array, fieldName: string, comparer: string): Array; + distinct(jsonArray: Array, fieldName: string, requiresCompleteRecord:any): Array; + sum(json:any, fieldName: string): number; + avg(json:any, fieldName: string): number; + select(jsonArray: Array, fieldName: string, fields:string): Array; + group(jsonArray: Array, field: string, /* internal */ level: number): Array; + parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): Object; + } + interface AjaxSettings { + type?: string; + cache: boolean; + data?: any; + dataType?: string; + contentType?: any; + async?: boolean; + } + enum FilterOperators { + contains, + endsWith, + equal, + greaterThan, + greaterThanOrEqual, + lessThan, + lessThanOrEqual, + notEqual, + startsWith + } + + enum MatrixDefaults { + m11, + m12, + m21, + m22, + offsetX, + offsetY, + type + } + enum MatrixTypes { + Identity, + Scaling, + Translation, + Unknown + } + + enum Orientation { + Horizontal, + Vertical + } + + enum SliderType { + Default, + MinRange, + Range + } + + enum eventType { + click, + mouseDown, + mouseLeave, + mouseMove, + mouseUp + } + enum headerOption { + row, + tHead + } + + enum filterType{ + StartsWith, + Contains, + EndsWith, + LessThan, + GreaterThan, + LessThanOrEqual , + GreaterThanOrEqual, + Equal, + NotEqual + } + enum Animation{ + Fade, + None, + Slide + } + enum Type{ + Overlay, + Slide + } +class Draggable extends ej.Widget { + static fn: Draggable; + constructor(element: JQuery, options?: DraggableOptions); + constructor(element: Element, options?: DraggableOptions); + model: DraggableOptions; +} + +interface DraggableOptions { + scope?: string; + handle?: Object; + dragArea?: Object; + clone?: boolean; + distance?: number; + helper?: any; + cursorAt?: DragAtPositon; + destroy? (e: DraggableEvent): void; + drag? (e: DraggableDragEvent): void; + dragStart? (e: DraggableDragStartEvent): void; + dragStop? (e: DraggableDragStopEvent): void; + +} + +interface DragAtPositon { + top?: number; + left?: number; +} + +interface DraggableEvent extends ej.BaseEvent { + model: DraggableOptions; +} +interface DraggableDragStartEvent extends ej.BaseEvent, DraggableEvent { + element: Object; + target: Object; +} +interface DraggableDragStopEvent extends ej.BaseEvent, DraggableEvent { + element: Object; + target: Object; +} +interface DraggableDragEvent extends ej.BaseEvent, DraggableEvent { + element: Object; + target: Object; +} +class Droppable extends ej.Widget { + static fn: Droppable; + constructor(element: JQuery, options?: DroppableOptions); + constructor(element: Element, options?: DroppableOptions); + model: DroppableOptions; +} + +interface DroppableOptions { + scope?: string; + accept?: Object; + drop? (e: DroppableDropEvent): void; + over? (e: DroppableOverEvent): void; + out? (e: DroppableOutEvent): void; +} + +interface DroppableEvent extends ej.BaseEvent { + model: DroppableOptions; +} +interface DroppableDropEvent extends ej.BaseEvent, DraggableEvent { + targetElement: Object; +} +interface DroppableOverEvent extends ej.BaseEvent, DraggableEvent { + targetElement: Object; +} +interface DroppableOutEvent extends ej.BaseEvent, DraggableEvent { + targetElement: Object; +} +class Resizable extends ej.Widget { + static fn: Resizable; + constructor(element: JQuery, options?: ResizableOptions); + constructor(element: Element, options?: ResizableOptions); + model: ResizableOptions; +} + +interface ResizableOptions { + scope?: string; + handle?: Object; + distance?: number; + cursorAt?: resizeAtPositon; + helper?: any; + maxHeight?: (number|string); + maxWidth?: (number|string); + minHeight?: (number|string); + minWidth?: (number|string); + destroy? (e: ResizeEvent): void; + resizeStart? (e: ResizableStartEvent): void; + resize? (e: ResizableEvent): void; + resizeStop? (e: ResizableStopEvent): void; +} + +interface resizeAtPositon { + top?: number; + left?: number; +} + +interface ResizeEvent extends ej.BaseEvent { + model: ResizableOptions; +} +interface ResizableStartEvent extends ej.BaseEvent, ResizeEvent { + targetElement: Object; +} +interface ResizableEvent extends ej.BaseEvent, ResizeEvent { + targetElement: Object; +} +interface ResizableStopEvent extends ej.BaseEvent, ResizeEvent { + targetElement: Object; +} + + var globalize:globalize; + var cultures:culture; + function addCulture(name: string, culture ?: any): void; + function preferredCulture(culture ?: string): culture; + function format(value: any, format: string, culture ?: string): string; + function parseInt(value: string, radix?: any, culture ?: string): number; + function parseFloat(value: string, radix?: any, culture ?: string): number; + function parseDate(value: string, format: string, culture ?: string): Date; + function getLocalizedConstants(controlName: string, culture ?: string): any; + +interface globalize { + addCulture(name: string, culture?: any): void; + preferredCulture(culture?: string): culture; + format(value: any, format: string, culture?: string): string; + parseInt(value: string, radix?: any, culture?: string): number; + parseFloat(value: string, radix?: any, culture?: string): number; + parseDate(value: string, format: string, culture?: string): Date; + getLocalizedConstants(controlName: string, culture?: string): any; + } + interface culture { + name?: string; + englishName?: string; + namtiveName?: string; + language?: string; + isRTL: boolean; + numberFormat?: formatSettings; + calendars?: calendarsSettings; + } + interface formatSettings { + pattern: Array; + decimals: number; + groupSizes: Array; + percent: percentSettings; + currency: currencySettings; + } + interface percentSettings { + pattern: Array; + decimals: number; + groupSizes: Array; + symbol: string; + } + interface currencySettings { + pattern: Array; + decimals: number; + groupSizes: Array; + symbol: string; + } + interface calendarsSettings { + standard: standardSettings; + } + interface standardSettings { + firstDay: number; + days: daySettings; + months: monthSettings; + AM: Array; + PM: Array; + twoDigitYearMax: number; + patterns: patternSettings; + } + interface daySettings { + names: Array; + namesAbbr: Array; + namesShort: Array; + } + interface monthSettings { + names: Array; + namesAbbr: Array; + } + interface patternSettings { + d: string; + D: string; + t: string; + T: string; + f: string; + F: string; + M: string; + Y: string; + S: string; + } +class Scroller extends ej.Widget { + static fn: Scroller; + constructor(element: JQuery, options?: Scroller.Model); + constructor(element: Element, options?: Scroller.Model); + model:Scroller.Model; + defaults:Scroller.Model; + + /** destroy the Scroller control, unbind the all ej control related events automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** User disables the Scroller control at any time. + * @returns {void} + */ + disable(): void; + + /** User enables the Scroller control at any time. + * @returns {void} + */ + enable(): void; + + /** Returns true if horizontal scrollbar is shown, else return false. + * @returns {boolean} + */ + isHScroll(): boolean; + + /** Returns true if vertical scrollbar is shown, else return false. + * @returns {boolean} + */ + isVScroll(): boolean; + + /** User refreshes the Scroller control at any time. + * @returns {void} + */ + refresh(): void; + + /** Scroller moves to given pixel in X (left) position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. + * @returns {void} + */ + scrollX(): void; + + /** Scroller moves to given pixel in Y (top) position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. + * @returns {void} + */ + scrollY(): void; +} +export module Scroller{ + +export interface Model { + + /**Set true to hides the scrollbar, when mouseout the content area. + * @Default {false} + */ + autoHide?: boolean; + + /**Specifies the height and width of button in the scrollbar. + * @Default {18} + */ + buttonSize?: number; + + /**Specifies to enable or disable the scroller + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Indicates the Right to Left direction to scroller + * @Default {undefined} + */ + enableRTL?: boolean; + + /**Enables or Disable the touch Scroll + * @Default {true} + */ + enableTouchScroll?: boolean; + + /**Specifies the height of Scroll panel and scrollbars. + * @Default {250} + */ + height?: number; + + /**If the scrollbar has vertical it set as width, else it will set as height of the handler. + * @Default {18} + */ + scrollerSize?: number; + + /**The Scroller content and scrollbars move left with given value. + * @Default {0} + */ + scrollLeft?: number; + + /**While press on the arrow key the scrollbar position added to the given pixel value. + * @Default {57} + */ + scrollOneStepBy?: number; + + /**The Scroller content and scrollbars move to top position with specified value. + * @Default {0} + */ + scrollTop?: number; + + /**Indicates the target area to which scroller have to appear. + * @Default {null} + */ + targetPane?: string; + + /**Specifies the width of Scroll panel and scrollbars. + * @Default {0} + */ + width?: number; + + /**Fires when Scroller control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when Scroller control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the scroller model + */ + model?: ej.Scroller.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the scroller model + */ + model?: ej.Scroller.Model; + + /**returns the name of the event. + */ + type?: string; +} +} + +class Accordion extends ej.Widget { + static fn: Accordion; + constructor(element: JQuery, options?: Accordion.Model); + constructor(element: Element, options?: Accordion.Model); + model:Accordion.Model; + defaults:Accordion.Model; + + /** AddItem method is used to add the panel in dynamically. It receives the following parameters + * @param {string} specify the name of the header + * @param {string} content of the new panel + * @param {number} insertion place of the new panel + * @param {boolean} Enable or disable the ajax request to the added panel + * @returns {void} + */ + addItem(header_name: string, content: string, index: number, isAjaxReq: boolean): void; + + /** This method used to collapse the all the expanded items in accordion at a time. + * @returns {void} + */ + collapseAll(): void; + + /** destroy the Accordion widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Disables the accordion widget includes all the headers and content panels. + * @returns {void} + */ + disable(): void; + + /** Disable the accordion widget item based on specified header index. + * @param {Array} index values to disable the panels + * @returns {void} + */ + disableItems(index: Array): void; + + /** Enable the accordion widget includes all the headers and content panels. + * @returns {void} + */ + enable(): void; + + /** Enable the accordion widget item based on specified header index. + * @param {Array} index values to enable the panels + * @returns {void} + */ + enableItems(index: Array): void; + + /** To expand all the accordion widget items. + * @returns {void} + */ + expandAll(): void; + + /** Returns the total number of panels in the control. + * @returns {number} + */ + getItemsCount(): number; + + /** Hides the visible Accordion control. + * @returns {void} + */ + hide(): void; + + /** The refresh method is used to adjust the control size based on the parent element dimension. + * @returns {void} + */ + refresh(): void; + + /** RemoveItem method is used to remove the specified index panel.It receives the parameter as number. + * @param {number} specify the index value for remove the accordion panel. + * @returns {void} + */ + removeItem( index : number): void; + + /** Shows the hidden Accordion control. + * @returns {void} + */ + show(): void; +} +export module Accordion{ + +export interface Model { + + /**Specifies the ajaxSettings option to load the content to the accordion control. + * @Default {null} + */ + ajaxSettings?: AjaxSettings; + + /**Accordion headers can be expanded and collapsed on keyboard action. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**To set the Accordion headers Collapse Speed. + * @Default {300} + */ + collapseSpeed?: number; + + /**Specifies the collapsible state of accordion control. + * @Default {false} + */ + collapsible?: boolean; + + /**Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /**Allows you to set the custom header Icon. It accepts two key values “header”, ”selectedHeader”. + * @Default {{ header: e-collapse, selectedHeader: e-expand }} + */ + customIcon?: CustomIcon; + + /**Disables the specified indexed items in accordion. + * @Default {[]} + */ + disabledItems?: number[]; + + /**Specifies the animation behavior in accordion. + * @Default {true} + */ + enableAnimation?: boolean; + + /**With this enabled property, you can enable or disable the Accordion. + * @Default {true} + */ + enabled?: boolean; + + /**Used to enable the disabled items in accordion. + * @Default {[]} + */ + enabledItems?: number[]; + + /**Multiple content panels to activate at a time. + * @Default {false} + */ + enableMultipleOpen?: boolean; + + /**Save current model value to browser cookies for maintaining states. When refreshing the accordion control page, the model value is applied from browser cookies or HTML 5local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Display headers and panel text from right-to-left. + * @Default {false} + */ + enableRTL?: boolean; + + /**The events API binds the action for activating the accordion header. Users can activate the header by using mouse actions such as mouse-over, mouse-up, mouse-down, and soon. + * @Default {click} + */ + events?: string; + + /**To set the Accordion headers Expand Speed. + * @Default {300} + */ + expandSpeed?: number; + + /**Sets the height for Accordion items header. + */ + headerSize?: number|string; + + /**Specifies height of the accordion. + * @Default {null} + */ + height?: number|string; + + /**Adjusts the content panel height based on the given option (content, auto, or fill). By default, the panel heights are adjusted based on the content. + * @Default {content} + */ + heightAdjustMode?: ej.Accordion.HeightAdjustMode|string; + + /**It allows to define the characteristics of the Accordion control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**The given index header will activate (open). If collapsible is set to true, and a negative value is given, then all headers are collapsed. Otherwise, the first panel isactivated. + * @Default {0} + */ + selectedItemIndex?: number|string; + + /**Activate the specified indexed items of the accordion + * @Default {[0]} + */ + selectedItems?: number[]; + + /**Used to determines the close button visibility an each accordion items. This close button helps to remove the accordion item from the control. + * @Default {false} + */ + showCloseButton?: boolean; + + /**Displays rounded corner borders on the Accordion control's panels and headers. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies width of the accordion. + * @Default {null} + */ + width?: number|string; + + /**Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value.*/ + activate? (e: ActivateEventArgs): void; + + /**Triggered before the AJAX content is loaded in a content panel. Arguments have location of the content (URL) and current model value.*/ + ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + + /**Triggered after AJAX load failed action. Arguments have URL, error message, and current model value.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**Triggered after the AJAX content loads. Arguments have current model values.*/ + ajaxLoad? (e: AjaxLoadEventArgs): void; + + /**Triggered after AJAX success action. Arguments have URL, content, and current model values.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**Triggered before a tab item is active. Arguments have active index and model values.*/ + beforeActivate? (e: BeforeActivateEventArgs): void; + + /**Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value.*/ + beforeInactivate? (e: BeforeInactivateEventArgs): void; + + /**Triggered after Accordion control creation.*/ + create? (e: CreateEventArgs): void; + + /**Triggered after Accordion control destroy.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value.*/ + inActivate? (e: InActivateEventArgs): void; +} + +export interface ActivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + activeIndex ?: number; + + /**returns current active header + */ + activeHeader ?: any; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface AjaxBeforeLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns current ajax content location + */ + url ?: string; +} + +export interface AjaxErrorEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns current ajax content location + */ + url ?: string; + + /**returns the failed data sent. + */ + data ?: string; +} + +export interface AjaxLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the name of the url + */ + url ?: string; +} + +export interface AjaxSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns current ajax content location + */ + url ?: string; + + /**returns the successful data sent. + */ + data ?: string; + + /**returns the ajax content. + */ + content ?: string; +} + +export interface BeforeActivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + activeIndex ?: number; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface BeforeInactivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + inActiveIndex ?: number; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface InActivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + inActiveIndex ?: number; + + /**returns in active element + */ + inActiveHeader ?: any; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface AjaxSettings { + + /**It specifies, whether to enable or disable asynchronous request. + */ + async?: boolean; + + /**It specifies the page will be cached in the web browser. + */ + cache?: boolean; + + /**It specifies the type of data is send in the query string. + */ + contentType?: string; + + /**It specifies the data as an object, will be passed in the query string. + */ + data?: any; + + /**It specifies the type of data that you're expecting back from the response. + */ + dataType?: string; + + /**It specifies the HTTP request type. + */ + type?: string; +} + +export interface CustomIcon { + + /**This class name set to collapsing header. + */ + header?: string; + + /**This class name set to expanded (active) header. + */ + selectedHeader?: string; +} + +enum HeightAdjustMode{ + + ///Height fit to the content in the panel + Content, + + ///Height set to the largest content in the panel + Auto, + + ///Height filled to the content of the panel + Fill +} + +} + +class Autocomplete extends ej.Widget { + static fn: Autocomplete; + constructor(element: JQuery, options?: Autocomplete.Model); + constructor(element: Element, options?: Autocomplete.Model); + model:Autocomplete.Model; + defaults:Autocomplete.Model; + + /** Clears the text in the Autocomplete textbox. + * @returns {void} + */ + clearText(): void; + + /** Destroys the Autocomplete widget. + * @returns {void} + */ + destroy(): void; + + /** Disables the autocomplete widget. + * @returns {void} + */ + disable(): void; + + /** Enables the autocomplete widget. + * @returns {void} + */ + enable(): void; + + /** Returns objects (data object) of all the selected items in the autocomplete textbox. + * @returns {void} + */ + getSelectedItems(): void; + + /** Returns the current selected value from the Autocomplete textbox. + * @returns {void} + */ + getValue(): void; + + /** Search the entered text and show it in the suggestion list if available. + * @returns {void} + */ + search(): void; + + /** Open up the autocomplete suggestion popup with all list items. + * @returns {void} + */ + open(): void; + + /** Sets the value of the Autocomplete textbox based on the given key value. + * @param {string} The key value of the specific suggestion item. + * @returns {void} + */ + selectValueByKey(Key: string): void; + + /** Sets the value of the Autocomplete textbox based on the given input text value. + * @param {string} The text (label) value of the specific suggestion item. + * @returns {void} + */ + selectValueByText(Text: string): void; +} +export module Autocomplete{ + +export interface Model { + + /**Customize "Add New" text (label) to be added in the autocomplete popup list for the entered text when there are no suggestions for it. + * @Default {Add New} + */ + addNewText?: boolean; + + /**Allows new values to be added to the autocomplete input other than the values in the suggestion list. Normally, when there are no suggestions it will display “No suggestions” label in the popup. + * @Default {false} + */ + allowAddNew?: boolean; + + /**Enables or disables the sorting of suggestion list item. The default sort order is ascending order. You customize sort order. + * @Default {true} + */ + allowSorting?: boolean; + + /**To focus the items in the suggestion list when the popup is shown. By default first item will be focused. + * @Default {false} + */ + autoFocus?: boolean; + + /**Enables or disables the case sensitive search. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**The root class for the Autocomplete textbox widget which helps in customizing its theme. + * @Default {””} + */ + cssClass?: string; + + /**The data source contains the list of data for the suggestions list. It can be a string array or json array. + * @Default {null} + */ + dataSource?: any|Array; + + /**The time delay (in milliseconds) after which the suggestion popup will be shown. + * @Default {200} + */ + delaySuggestionTimeout?: number; + + /**The special character which acts as a separator for the given words for multi-mode search i.e. the text after the delimiter are considered as a separate word or query for search operation. + * @Default {’,’} + */ + delimiterChar?: string; + + /**The text to be displayed in the popup when there are no suggestions available for the entered text. + * @Default {“No suggestions”} + */ + emptyResultText?: string; + + /**Fills the autocomplete textbox with the first matched item from the suggestion list automatically based on the entered text when enabled. + * @Default {false} + */ + enableAutoFill?: boolean; + + /**Enables or disables the Autocomplete textbox widget. + * @Default {true} + */ + enabled?: boolean; + + /**Enables or disables displaying the duplicate names present in the search result. + * @Default {false} + */ + enableDistinct?: boolean; + + /**Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. While refreshing the page, it retains the model value from browser cookies or local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays the Autocomplete widget’s content from right to left when enabled. + * @Default {false} + */ + enableRTL?: boolean; + + /**Mapping fields for the suggestion items of the Autocomplete textbox widget. + * @Default {null} + */ + fields?: any; + + /**Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’. + * @Default {ej.filterType.StartsWith} + */ + filterType?: string; + + /**The height of the Autocomplete textbox. + * @Default {null} + */ + height?: string; + + /**The search text can be highlighted in the AutoComplete suggestion list when enabled. + * @Default {false} + */ + highlightSearch?: boolean; + + /**Number of items to be displayed in the suggestion list. + * @Default {0} + */ + itemsCount?: number; + + /**Minimum number of character to be entered in the Autocomplete textbox to show the suggestion list. + * @Default {1} + */ + minCharacter?: number; + + /**Enables or disables selecting multiple values from the suggestion list. Multiple values can be selected through either of the following options, + * @Default {ej.MultiSelectMode.None} + */ + multiSelectMode?: ej.Autocomplete.MultiSelectMode|string; + + /**The height of the suggestion list. + * @Default {“152px”} + */ + popupHeight?: string; + + /**The width of the suggestion list. + * @Default {“auto”} + */ + popupWidth?: string; + + /**The query to retrieve the data from the data source. + * @Default {null} + */ + query?: ej.Query|string; + + /**Indicates that the autocomplete textbox values can only be readable. + * @Default {false} + */ + readOnly?: boolean; + + /**Enables or disables showing the message when there are no suggestions for the entered text. + * @Default {true} + */ + showEmptyResultText?: boolean; + + /**Enables or disables the loading icon to intimate the searching operation. The loading icon is visible when there is a time delay to perform the search. + * @Default {true} + */ + showLoadingIcon?: boolean; + + /**Enables the showPopup button in autocomplete textbox. When the Showpopup button is clicked, it displays all the available data from the data source. + * @Default {false} + */ + showPopupButton?: boolean; + + /**Enables or disables rounded corner. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Sort order specifies whether the suggestion list values has to be displayed in ascending or descending order. + * @Default {ej.SortOrder.Ascending} + */ + sortOrder?: ej.Autocomplete.SortOrder|string; + + /**The template to display the suggestion list items with customized appearance. + * @Default {null} + */ + template?: string; + + /**The jQuery validation error message to be displayed on form validation. + * @Default {null} + */ + validationMessage?: any; + + /**The jQuery validation rules for form validation. + * @Default {null} + */ + validationRules?: any; + + /**The value to be displayed in the autocomplete textbox. + * @Default {null} + */ + value?: string; + + /**Enables or disables the visibility of the autocomplete textbox. + * @Default {true} + */ + visible?: boolean; + + /**The text to be displayed when the value of the autocomplete textbox is empty. + * @Default {null} + */ + watermarkText?: string; + + /**The width of the Autocomplete textbox. + * @Default {null} + */ + width?: string; + + /**Triggers when the data requested from AJAX will get successfully loaded in the Autocomplete widget.*/ + actionSuccess? (e: ActionSuccessEventArgs): void; + + /**Triggers when the AJAX requests complete. The request may get failed or succeed.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggers when the data requested from AJAX get failed.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Triggers when the text box value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Triggers after the suggestion popup is closed.*/ + close? (e: CloseEventArgs): void; + + /**Triggers when Autocomplete widget is created.*/ + create? (e: CreateEventArgs): void; + + /**Triggers after the Autocomplete widget is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggers after the autocomplete textbox is focused.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Triggers after the Autocomplete textbox gets out of the focus.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Triggers after the suggestion list is opened.*/ + open? (e: OpenEventArgs): void; + + /**Triggers when an item has been selected from the suggestion list.*/ + select? (e: SelectEventArgs): void; +} + +export interface ActionSuccessEventArgs { +} + +export interface ActionCompleteEventArgs { +} + +export interface ActionFailureEventArgs { +} + +export interface ChangeEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; +} + +export interface CloseEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; +} + +export interface OpenEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface SelectEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; + + /**Text of the selected item. + */ + text?: string; + + /**Key of the selected item. + */ + key?: string; + + /**Data object of the selected item. + */ + Item?: ej.Autocomplete.Model; +} + +enum MultiSelectMode{ + + ///Multiple values are separated using a given special character. + Delimiter, + + ///Each values are displayed in separate box with close button. + VisualMode +} + + +enum SortOrder{ + + ///Items to be displayed in the suggestion list in ascending order. + Ascending, + + ///Items to be displayed in the suggestion list in descending order. + Descending +} + +} + +class Button extends ej.Widget { + static fn: Button; + constructor(element: JQuery, options?: Button.Model); + constructor(element: Element, options?: Button.Model); + model:Button.Model; + defaults:Button.Model; + + /** destroy the button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the button + * @returns {void} + */ + disable(): void; + + /** To enable the button + * @returns {void} + */ + enable(): void; +} +export module Button{ + +export interface Model { + + /**Specifies the contentType of the Button. See below to know available ContentType + * @Default {ej.ContentType.TextOnly} + */ + contentType?: ej.ContentType|string; + + /**Sets the root CSS class for Button theme, which is used customize. + */ + cssClass?: string; + + /**Specifies the button control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the Right to Left direction to button + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the Button. + * @Default {28} + */ + height?: number; + + /**It allows to define the characteristics of the Button control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the image position of the Button. This image position is applicable only with the textandimage contentType property. The images can be positioned in both imageLeft and imageRight options. See below to know about available ImagePosition + * @Default {ej.ImagePosition.ImageLeft} + */ + imagePosition?: ej.ImagePosition|string; + + /**Specifies the primary icon for Button. This icon will be displayed from the left margin of the button. + * @Default {null} + */ + prefixIcon?: string; + + /**Convert the button as repeat button. It raises the 'Click' event repeatedly from the it is pressed until it is released. + * @Default {false} + */ + repeatButton?: boolean; + + /**Displays the Button with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the size of the Button. See below to know available ButtonSize + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /**Specifies the secondary icon for Button. This icon will be displayed from the right margin of the button. + * @Default {null} + */ + suffixIcon?: string; + + /**Specifies the text content for Button. + * @Default {null} + */ + text?: string; + + /**Specified the time interval between two consecutive 'click' event on the button. + * @Default {150} + */ + timeInterval?: string; + + /**Specifies the Type of the Button. See below to know available ButtonType + * @Default {ej.ButtonType.Submit} + */ + type?: ej.ButtonType|string; + + /**Specifies the width of the Button. + * @Default {100} + */ + width?: number; + + /**Fires when Button control is clicked successfully.Consider the scenario to perform any validation,modification of content or any other operations click on button,we can make use of this click event to achieve the scenario.*/ + click? (e: ClickEventArgs): void; + + /**Fires after Button control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the button is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event.*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the button model + */ + model?: ej.Button.Model; + + /**returns the name of the event + */ + type?: string; + + /**return the button state + */ + status?: boolean; + + /**return the event model for sever side processing. + */ + e?: any; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the button model + */ + model?: ej.Button.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the button model + */ + model?: ej.Button.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum ContentType +{ +//To display the text content only in button +TextOnly, +//To display the image only in button +ImageOnly, +//Supports to display image for both ends of the button +ImageBoth, +//Supports to display image with the text content +TextAndImage, +//Supports to display image with both ends of the text +ImageTextImage, +} +enum ImagePosition +{ +//support for aligning text in left and image in right +ImageRight, +//support for aligning text in right and image in left +ImageLeft, +//support for aligning text in bottom and image in top. +ImageTop, +//support for aligning text in top and image in bottom +ImageBottom, +} +enum ButtonSize +{ +//Creates button with inbuilt default size height, width specified +Normal, +//Creates button with inbuilt mini size height, width specified +Mini, +//Creates button with inbuilt small size height, width specified +Small, +//Creates button with inbuilt medium size height, width specified +Medium, +//Creates button with inbuilt large size height, width specified +Large, +} +enum ButtonType +{ +//Creates button with inbuilt button type specified +Button, +//Creates button with inbuilt reset type specified +Reset, +//Creates button with inbuilt submit type specified +Submit, +} + +class Captcha extends ej.Widget { + static fn: Captcha; + constructor(element: JQuery, options?: Captcha.Model); + constructor(element: Element, options?: Captcha.Model); + model:Captcha.Model; + defaults:Captcha.Model; +} +export module Captcha{ + +export interface Model { + + /**Specifies the character set of the Captcha that will be used to generate captcha text randomly. + */ + characterSet?: string; + + /**Specifies the error message to be displayed when the Captcha mismatch. + */ + customErrorMessage?: string; + + /**Set the Captcha validation automatically. + */ + enableAutoValidation?: boolean; + + /**Specifies the case sensitivity for the characters typed in the Captcha. + */ + enableCaseSensitivity?: boolean; + + /**Specifies the background patterns for the Captcha. + */ + enablePattern?: boolean; + + /**Sets the Captcha direction as right to left alignment. + */ + enableRTL?: boolean; + + /**Specifies the background apperance for the captcha. + */ + hatchStyle?: ej.HatchStyle|string; + + /**Specifies the height of the Captcha. + */ + height?: number; + + /**Specifies the method with values to be mapped in the Captcha. + */ + mapper?: string; + + /**Specifies the maximum number of characters used in the Captcha. + */ + maximumLength?: number; + + /**Specifies the minimum number of characters used in the Captcha. + */ + minimumLength?: number; + + /**Specifies the method to map values to Captcha. + */ + requestMapper?: string; + + /**Sets the Captcha with audio support, that enables to dictate the captcha text. + */ + showAudioButton?: boolean; + + /**Sets the Captcha with a refresh button. + */ + showRefreshButton?: boolean; + + /**Specifies the target button of the Captcha to validate the entered text and captcha text. + */ + targetButton?: string; + + /**Specifies the target input element that will verify the Captcha. + */ + targetInput?: string; + + /**Specifies the width of the Captcha. + */ + width?: number; + + /**Fires when captch refresh begins.*/ + refreshBegin? (e: RefreshBeginEventArgs): void; + + /**Fires after captch refresh completed.*/ + refreshComplete? (e: RefreshCompleteEventArgs): void; + + /**Fires when captch refresh fails to load.*/ + refreshFailure? (e: RefreshFailureEventArgs): void; + + /**Fires after captch refresh succeeded.*/ + refreshSuccess? (e: RefreshSuccessEventArgs): void; +} + +export interface RefreshBeginEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RefreshCompleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RefreshFailureEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RefreshSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} +} +enum HatchStyle +{ +//Set background as None to Captcha +None, +//Set background as BackwardDiagonal to Captcha +BackwardDiagonal, +//Set background as Cross to Captcha +Cross, +//Set background as DarkDownwardDiagonal to Captcha +DarkDownwardDiagonal, +//Set background as DarkHorizontal to Captcha +DarkHorizontal, +//Set background as DarkUpwardDiagonal to Captcha +DarkUpwardDiagonal, +//Set background as DarkVertical to Captcha +DarkVertical, +//Set background as DashedDownwardDiagonal to Captcha +DashedDownwardDiagonal, +//Set background as DashedHorizontal to Captcha +DashedHorizontal, +//Set background as DashedUpwardDiagonal to Captcha +DashedUpwardDiagonal, +//Set background as DashedVertical to Captcha +DashedVertical, +//Set background as DiagonalBrick to Captcha +DiagonalBrick, +//Set background as DiagonalCross to Captcha +DiagonalCross, +//Set background as Divot to Captcha +Divot, +//Set background as DottedDiamond to Captcha +DottedDiamond, +//Set background as DottedGrid to Captcha +DottedGrid, +//Set background as ForwardDiagonal to Captcha +ForwardDiagonal, +//Set background as Horizontal to Captcha +Horizontal, +//Set background as HorizontalBrick to Captcha +HorizontalBrick, +//Set background as LargeCheckerBoard to Captcha +LargeCheckerBoard, +//Set background as LargeConfetti to Captcha +LargeConfetti, +//Set background as LargeGrid to Captcha +LargeGrid, +//Set background as LightDownwardDiagonal to Captcha +LightDownwardDiagonal, +//Set background as LightHorizontal to Captcha +LightHorizontal, +//Set background as LightUpwardDiagonal to Captcha +LightUpwardDiagonal, +//Set background as LightVertical to Captcha +LightVertical, +//Set background as Max to Captcha +Max, +//Set background as Min to Captcha +Min, +//Set background as NarrowHorizontal to Captcha +NarrowHorizontal, +//Set background as NarrowVertical to Captcha +NarrowVertical, +//Set background as OutlinedDiamond to Captcha +OutlinedDiamond, +//Set background as Percent90 to Captcha +Percent90, +//Set background as Wave to Captcha +Wave, +//Set background as Weave to Captcha +Weave, +//Set background as WideDownwardDiagonal to Captcha +WideDownwardDiagonal, +//Set background as WideUpwardDiagonal to Captcha +WideUpwardDiagonal, +//Set background as ZigZag to Captcha +ZigZag, +} + +class ListBox extends ej.Widget { + static fn: ListBox; + constructor(element: JQuery, options?: ListBox.Model); + constructor(element: Element, options?: ListBox.Model); + model:ListBox.Model; + defaults:ListBox.Model; + + /** Adds a given list items in the ListBox widget at a specified index. It accepts two parameters. + * @param {any|string} This can be a list item object (for JSON binding) or a string (for UL and LI rendering). Also we can the specify this as an array of list item object or an array of strings to add multiple items. + * @param {number} The index value to add the given items at the specified index. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + addItem(listItem: any|string, index: number): void; + + /** Checks all the list items in the ListBox widget. It is dependent on showCheckbox property. + * @returns {void} + */ + checkAll(): void; + + /** Checks a list item by using its index. It is dependent on showCheckbox property. + * @param {number} Index of the listbox item to be checked. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + checkItemByIndex(index: number): void; + + /** Checks multiple list items by using its index values. It is dependent on showCheckbox property. + * @param {number[]} Index/Indices of the listbox items to be checked. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + checkItemsByIndices(indices: number[]): void; + + /** Disables the ListBox widget. + * @returns {void} + */ + disable(): void; + + /** Disables a list item by passing the item text as parameter. + * @param {string} Text of the listbox item to be disabled. + * @returns {void} + */ + disableItem(text: string): void; + + /** Disables a list Item using its index value. + * @param {number} Index of the listbox item to be disabled. + * @returns {void} + */ + disableItemByIndex(index: number): void; + + /** Disables set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be disabled. + * @returns {void} + */ + disableItemsByIndices(Indices: number[]|string): void; + + /** Enables the ListBox widget when it is disabled. + * @returns {void} + */ + enable(): void; + + /** Enables a list Item using its item text value. + * @param {string} Text of the listbox item to be enabled. + * @returns {void} + */ + enableItem(text: string): void; + + /** Enables a list item using its index value. + * @param {number} Index of the listbox item to be enabled. + * @returns {void} + */ + enableItemByIndex(index: number): void; + + /** Enables a set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be enabled. + * @returns {void} + */ + enableItemsByIndices(indices: number[]|string): void; + + /** Returns the list of checked items in the ListBox widget. It is dependent on showCheckbox property. + * @returns {any} + */ + getCheckedItems(): any; + + /** Returns the list of selected items in the ListBox widget. + * @returns {any} + */ + getSelectedItems(): any; + + /** Returns an item’s index based on the given text. + * @param {string} The list item text (label) + * @returns {number} + */ + getIndexByText(text: string): number; + + /** Returns an item’s index based on the value given. + * @param {string} The list item’s value + * @returns {number} + */ + getIndexByValue(indices: string): number; + + /** Returns an item’s text (label) based on the index given. + * @returns {string} + */ + getTextByIndex(): string; + + /** Returns a list item’s object using its index. + * @returns {any} + */ + getItemByIndex(): any; + + /** Returns a list item’s object based on the text given. + * @param {string} The list item text. + * @returns {any} + */ + getItemByText(text: string): any; + + /** Merges the given data with the existing data items in the listbox. + * @param {Array} Data to merge in listbox. + * @returns {void} + */ + mergeData(data: Array): void; + + /** Selects the next item based on the current selection. + * @returns {void} + */ + moveDown(): void; + + /** Selects the previous item based on the current selection. + * @returns {void} + */ + moveUp(): void; + + /** Refreshes the ListBox widget. + * @param {boolean} Refreshes both the datasource and the dimensions of the ListBox widget when the parameter is passed as true, otherwise only the ListBox dimensions will be refreshed. + * @returns {void} + */ + refresh(refreshData: boolean): void; + + /** Removes all the list items from listbox. + * @returns {void} + */ + removeAll(): void; + + /** Removes the selected list items from the listbox. + * @returns {void} + */ + removeSelectedItems(): void; + + /** Removes a list item by using its text. + * @param {string} Text of the listbox item to be removed. + * @returns {void} + */ + removeItemByText(text: string): void; + + /** Removes a list item by using its index value. + * @param {number} Index of the listbox item to be removed. + * @returns {void} + */ + removeItemByIndex(index: number): void; + + /** + * @returns {void} + */ + selectAll(): void; + + /** Selects the list tem using its text value. + * @param {string} Text of the listbox item to be selected. + * @returns {void} + */ + selectItemByText(text: string): void; + + /** Selects list tem using its value property. + * @param {string} Value of the listbox item to be selected. + * @returns {void} + */ + selectItemByValue(value: string): void; + + /** Selects list item using its index value. + * @param {number} Index of the listbox item to be selected. + * @returns {void} + */ + selectItemByIndex(index: number): void; + + /** Selects a set of list items through its index values. + * @param {number|number[]} Index/Indices of the listbox item to be selected. + * @returns {void} + */ + selectItemsByIndices(Indices: number|number[]): void; + + /** Unchecks all the checked list items in the ListBox widget. To use this method showCheckbox property to be set as true. + * @returns {void} + */ + uncheckAll(): void; + + /** Unchecks a checked list item using its index value. To use this method showCheckbox property to be set as true. + * @param {number} Index of the listbox item to be unchecked. + * @returns {void} + */ + uncheckItemByIndex(index: number): void; + + /** Unchecks the set of checked list items using its index values. To use this method showCheckbox property must be set to true. + * @param {number[]|string} Indices of the listbox item to be unchecked. + * @returns {void} + */ + uncheckItemsByIndices(indices: number[]|string): void; + + /** + * @returns {void} + */ + unselectAll(): void; + + /** Unselects a selected list item using its index value + * @param {number} Index of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByIndex(index: number): void; + + /** Unselects a selected list item using its text value. + * @param {string} Text of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByText(text: string): void; + + /** Unselects a selected list item using its value. + * @param {string} Value of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByValue(value: string): void; + + /** Unselects a set of list items using its index values. + * @param {number[]|string} Indices of the listbox item to be unselected. + * @returns {void} + */ + unselectItemsByIndices(indices: number[]|string): void; + + /** Hides all the checked items in the listbox. + * @returns {void} + */ + hideCheckedItems (): void; + + /** Shows a set of hidden list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be shown. + * @returns {void} + */ + showItemByIndices(indices: number[]|string): void; + + /** Hides a set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be hidden. + * @returns {void} + */ + hideItemsByIndices(indices: number[]|string): void; + + /** Shows the hidden list items using its values. + * @param {Array} Values of the listbox items to be shown. + * @returns {void} + */ + showItemsByValues(values: Array): void; + + /** Hides the list item using its values. + * @param {Array} Values of the listbox items to be hidden. + * @returns {void} + */ + hideItemsByValues(values: Array): void; + + /** Shows a hidden list item using its value. + * @param {string} Value of the listbox item to be shown. + * @returns {void} + */ + showItemByValue(value: string): void; + + /** Hide a list item using its value. + * @param {string} Value of the listbox item to be hidden. + * @returns {void} + */ + hideItemByValue(value: string): void; + + /** Shows a hidden list item using its index value. + * @param {number} Index of the listbox item to be shown. + * @returns {void} + */ + showItemByIndex(index: number): void; + + /** Hides a list item using its index value. + * @param {number} Index of the listbox item to be hidden. + * @returns {void} + */ + hideItemByIndex (index: number): void; + + /** + * @returns {void} + */ + show(): void; + + /** Hides the listbox. + * @returns {void} + */ + hide(): void; + + /** Hides all the listbox items in the listbox. + * @returns {void} + */ + hideAllItems(): void; + + /** Shows all the listbox items in the listbox. + * @returns {void} + */ + showAllItems(): void; +} +export module ListBox{ + +export interface Model { + + /**Enables/disables the dragging behavior of the items in ListBox widget. + * @Default {false} + */ + allowDrag?: boolean; + + /**Accepts the items which are dropped in to it, when it is set to true. + * @Default {false} + */ + allowDrop?: boolean; + + /**Enables or disables multiple selection. + * @Default {false} + */ + allowMultiSelection?: boolean; + + /**Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property. + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /**Enables or disables the case sensitive search for list item by typing the text (search) value. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**Dynamically populate data of a list box while selecting an item in another list box i.e. rendering child list box based on the item selection in parent list box. This property accepts the id of the child ListBox widget to populate the data. + * @Default {null} + */ + cascadeTo?: string; + + /**Set of list items to be checked by default using its index. It works only when the showCheckbox property is set to true. + * @Default {null} + */ + checkedIndices?: string; + + /**The root class for the ListBox widget to customize the existing theme. + * @Default {“”} + */ + cssClass?: string; + + /**Contains the list of data for generating the list items. + * @Default {null} + */ + dataSource?: any; + + /**Enables or disables the ListBox widget. + * @Default {true} + */ + enabled?: boolean; + + /**Enables or disables the search behavior to find the specific list item by typing the text value. + * @Default {false} + */ + enableIncrementalSearch?: boolean; + + /**Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays the ListBox widget’s content from right to left when enabled. + * @Default {false} + */ + enableRTL?: boolean; + + /**Mapping fields for the data items of the ListBox widget. + * @Default {null} + */ + fields?: any; + + /**Defines the height of the ListBox widget. + * @Default {null} + */ + height?: string; + + /**The number of list items to be shown in the ListBox widget. The remaining list items will be scrollable. + * @Default {null} + */ + itemsCount?: number; + + /**The total number of list items to be rendered in the ListBox widget. + * @Default {null} + */ + totalItemsCount?: number; + + /**The number of list items to be loaded in the list box while enabling virtual scrolling and when virtualScrollMode is set to continuous. + * @Default {5} + */ + itemRequestCount?: number; + + /**Loads data for the listbox by default (i.e. on initialization) when it is set to true. It creates empty ListBox if it is set to false. + */ + loadDataOnInit?: boolean; + + /**The query to retrieve required data from the data source. + * @Default {ej.Query()} + */ + query?: ej.Query|string; + + /**The list item to be selected by default using its index. + * @Default {null} + */ + selectedIndex?: number; + + /**The list items to be selected by default using its indices. To use this property allowMultiSelection should be enabled. + * @Default {[]} + */ + selectedIndices?: Array; + + /**Enables/Disables the multi selection option with the help of checkbox control. + * @Default {false} + */ + showCheckbox?: boolean; + + /**To display the ListBox container with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**The template to display the ListBox widget with customized appearance. + * @Default {null} + */ + template?: string; + + /**Holds the selected items values and used to bind value to the list item using angular and knockout. + * @Default {“”} + */ + value?: number; + + /**Specifies the virtual scroll mode to load the list data on demand via scrolling behavior. There are two types of mode. + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /**Defines the width of the ListBox widget. + * @Default {null} + */ + width?: string; + + /**Specifies the targetID for the listbox items. + */ + targetID?: string; + + /**Triggers before the AJAX request begins to load data in the ListBox widget.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggers after the data requested via AJAX is successfully loaded in the ListBox widget.*/ + actionSuccess? (e: ActionSuccessEventArgs): void; + + /**Triggers when the AJAX requests complete. The request may get failed or succeed.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggers when the data requested from AJAX get failed.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Event will be triggered before the requested data via AJAX once loaded in successfully.*/ + actionBeforeSuccess? (e: ActionBeforeSuccessEventArgs): void; + + /**Triggers when the item selection is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Triggers when the list item is checked or unchecked.*/ + checkChange? (e: CheckChangeEventArgs): void; + + /**Triggers when the ListBox widget is created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Triggers when the ListBox widget is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggers when focus the listbox items.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Triggers when focus out from listbox items.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Triggers when the list item is being dragged.*/ + itemDrag? (e: ItemDragEventArgs): void; + + /**Triggers when the list item is ready to be dragged.*/ + itemDragStart? (e: ItemDragStartEventArgs): void; + + /**Triggers when the list item stops dragging.*/ + itemDragStop? (e: ItemDragStopEventArgs): void; + + /**Triggers when the list item is dropped.*/ + itemDrop? (e: ItemDropEventArgs): void; + + /**Triggers when a list item gets selected.*/ + select? (e: SelectEventArgs): void; + + /**Triggers when a list item gets unselected.*/ + unselect? (e: UnselectEventArgs): void; +} + +export interface ActionBeginEventArgs { +} + +export interface ActionSuccessEventArgs { +} + +export interface ActionCompleteEventArgs { +} + +export interface ActionFailureEventArgs { +} + +export interface ActionBeforeSuccessEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List of actual object. + */ + actual?: any; + + /**Object of ListBox widget which contains DataManager arguments + */ + request?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**List of array object + */ + result?: Array; + + /**ExcuteQuery object of DataManager + */ + xhr?: any; +} + +export interface ChangeEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface CheckChangeEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface CreateEventArgs { + + /**Instance of the listbox model object. + */ + model?: ej.ListBox.Model; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface DestroyEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface FocusInEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface FocusOutEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface ItemDragEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface ItemDragStartEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface ItemDragStopEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface ItemDropEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface SelectEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface UnselectEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} +} + +class Calculate extends ej.Widget { + static fn: Calculate; + constructor(element: JQuery, options?: Calculate.Model); + constructor(element: Element, options?: Calculate.Model); + model:Calculate.Model; + defaults:Calculate.Model; + + /** Add the custom formuls with function in CalcEngine library + * @param {string} pass the formula name + * @param {string} pass the custom function name to call + * @returns {void} + */ + addCustomFunction(FormulaName: string, FunctionName: string): void; + + /** Adds a named range to the NamedRanges collection + * @param {string} pass the namedRange's name + * @param {string} pass the cell range of NamedRange + * @returns {void} + */ + addNamedRange(Name: string, cellRange: string): void; + + /** Accepts a possible parsed formula and returns the calculated value without quotes. + * @param {string} pass the cell range to adjust its range + * @returns {string} + */ + adjustRangeArg(Name: string): string; + + /** When a formula cell changes, call this method to clear it from its dependent cells. + * @param {string} pass the changed cell address + * @returns {void} + */ + clearFormulaDependentCells(Cell: string): void; + + /** Call this method to clear whether an exception was raised during the computation of a library function. + * @returns {void} + */ + clearLibraryComputationException(): void; + + /** Get the column index from a cell reference passed in. + * @param {string} pass the cell address + * @returns {void} + */ + colIndex(Cell: string): void; + + /** Evaluates a parsed formula. + * @param {string} pass the parsed formula + * @returns {string} + */ + computedValue(Formula: string): string; + + /** Evaluates a parsed formula. + * @param {string} pass the parsed formula + * @returns {string} + */ + computeFormula(Formula: string): string; +} +export module Calculate{ + +export interface Model { +} +} + +class CheckBox extends ej.Widget { + static fn: CheckBox; + constructor(element: JQuery, options?: CheckBox.Model); + constructor(element: Element, options?: CheckBox.Model); + model:CheckBox.Model; + defaults:CheckBox.Model; + + /** Destroy the CheckBox widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Disable the CheckBox to prevent all user interactions. + * @returns {void} + */ + disable(): void; + + /** To enable the CheckBox + * @returns {void} + */ + enable(): void; + + /** To Check the status of CheckBox + * @returns {boolean} + */ + isChecked(): boolean; +} +export module CheckBox{ + +export interface Model { + + /**Specifies whether CheckBox has to be in checked or not. We can also specify array of string as value for this property. If any of the value in the specified array matches the value of the textbox, then it will be considered as checked. It will be useful in MVVM binding, specify array type to identify the values of the checked CheckBoxes. + * @Default {false} + */ + checked?: boolean|string[]; + + /**Specifies the State of CheckBox.See below to get available CheckState + * @Default {null} + */ + checkState?: ej.CheckState|string; + + /**Sets the root CSS class for CheckBox theme, which is used customize. + */ + cssClass?: string; + + /**Specifies the checkbox control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the persist property for CheckBox while initialization. The persist API save current model value to browser cookies for state maintains. While refreshing the CheckBox control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left direction to Checkbox + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the enable or disable Tri-State for checkbox control. + * @Default {false} + */ + enableTriState?: boolean; + + /**It allows to define the characteristics of the CheckBox control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specified value to be added an id attribute of the CheckBox. + * @Default {null} + */ + id?: string; + + /**Specify the prefix value of id to be added before the current id of the CheckBox. + * @Default {ej} + */ + idPrefix?: string; + + /**Specifies the name attribute of the CheckBox. + * @Default {null} + */ + name?: string; + + /**Displays rounded corner borders to CheckBox + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the size of the CheckBox.See below to know available CheckboxSize + * @Default {small} + */ + size?: ej.CheckboxSize|string; + + /**Specifies the text content to be displayed for CheckBox. + */ + text?: string; + + /**Set the jQuery validation error message in CheckBox. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jQuery validation rules in CheckBox. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value attribute of the CheckBox. + * @Default {null} + */ + value?: string; + + /**Fires before the CheckBox is going to changed its state successfully*/ + beforeChange? (e: BeforeChangeEventArgs): void; + + /**Fires when the CheckBox state is changed successfully*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the CheckBox state is created successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires when the CheckBox state is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface BeforeChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the event model values + */ + event?: any; + + /**returns the status whether the element is checked or not. + */ + isChecked?: boolean; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the event arguments + */ + event?: any; + + /**returns the status whether the element is checked or not. + */ + isChecked?: boolean; + + /**returns the state of the checkbox + */ + checkState?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum CheckState +{ +//string +Uncheck, +//string +Check, +//string +Indeterminate, +} +enum CheckboxSize +{ +//Displays the CheckBox in medium size +Medium, +//Displays the CheckBox in small size +Small, +} + +class ColorPicker extends ej.Widget { + static fn: ColorPicker; + constructor(element: JQuery, options?: ColorPicker.Model); + constructor(element: Element, options?: ColorPicker.Model); + model:ColorPicker.Model; + defaults:ColorPicker.Model; + + /** Disables the color picker control + * @returns {void} + */ + disable(): void; + + /** Enable the color picker control + * @returns {void} + */ + enable(): void; + + /** Gets the selected color in RGB format + * @returns {any} + */ + getColor(): any; + + /** Gets the selected color value as string + * @returns {string} + */ + getValue(): string; + + /** To Convert color value from hexCode to RGB + * @returns {any} + */ + hexCodeToRGB(): any; + + /** Hides the ColorPicker popup, if in opened state. + * @returns {void} + */ + hide(): void; + + /** Convert color value from HSV to RGB + * @returns {any} + */ + HSVToRGB(): any; + + /** Convert color value from RGB to HEX + * @returns {string} + */ + RGBToHEX(): string; + + /** Convert color value from RGB to HSV + * @returns {any} + */ + RGBToHSV(): any; + + /** Open the ColorPicker popup. + * @returns {void} + */ + show(): void; +} +export module ColorPicker{ + +export interface Model { + + /**The ColorPicker control allows to define the customized text to displayed in button elements. Using the property to achieve the customized culture values. + * @Default {buttonText.apply= Apply, buttonText.cancel= Cancel,buttonText.swatches=Swatches} + */ + buttonText?: any; + + /**Allows to change the mode of the button. Please refer below to know available button mode + * @Default {ej.ButtonMode.Split} + */ + buttonMode?: ej.ButtonMode|string; + + /**Specifies the number of columns to be displayed color palette model. + * @Default {10} + */ + columns?: number; + + /**This property allows you to customize its appearance using user-defined CSS and custom skin options such as colors and backgrounds. + */ + cssClass?: string; + + /**This property allows to define the custom colors in the palette model.Custom palettes are created by passing a comma delimited string of HEX values or an array of colors. + * @Default {empty} + */ + custom?: Array; + + /**This property allows to embed the popup in the order of DOM element flow . When we set the value as true, the color picker popup is always in visible state. + * @Default {false} + */ + displayInline?: boolean; + + /**This property allows to change the control in enabled or disabled state. + * @Default {true} + */ + enabled?: boolean; + + /**This property allows to enable or disable the opacity slider in the color picker control + * @Default {true} + */ + enableOpacity?: boolean; + + /**It allows to define the characteristics of the ColorPicker control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the model type to be rendered initially in the color picker control. See below to get available ModelType + * @Default {ej.ColorPicker.ModelType.Default} + */ + modelType?: ej.ColorPicker.ModelType|string; + + /**This property allows to change the opacity value .The selected color opacity will be adjusted by using this opacity value. + * @Default {100} + */ + opacityValue?: number; + + /**Specifies the palette type to be displayed at initial time in palette model.There two types of palette model available in ColorPicker control. See below available Palette + * @Default {ej.ColorPicker.Palette.BasicPalette} + */ + palette?: ej.ColorPicker.Palette|string; + + /**This property allows to define the preset model to be rendered initially in palette type.It consists of 12 different types of presets. Each presets have 50 colors. See below available Presets + * @Default {ej.ColorPicker.Presets.Basic} + */ + presetType?: ej.ColorPicker.Presets|string; + + /**Allows to show/hides the apply and cancel buttons in ColorPicker control + * @Default {true} + */ + showApplyCancel?: boolean; + + /**Allows to show/hides the clear button in ColorPicker control + * @Default {true} + */ + showClearButton?: boolean; + + /**This property allows to provides live preview support for current cursor selection color and selected color. + * @Default {true} + */ + showPreview?: boolean; + + /**This property allows to store the color values in custom list.The ColorPicker will keep up to 11 colors in a custom list.By clicking the add button, the selected color from picker or palette will get added in the recent color list. + * @Default {false} + */ + showRecentColors?: boolean; + + /**This property allows to shows tooltip to notify the slider value in color picker control. + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the toolIcon to be displayed in dropdown control color area. + * @Default {null} + */ + toolIcon?: string; + + /**This property allows to define the customized text or content to displayed when mouse over the following elements. This property also allows to use the culture values. + * @Default {tooltipText: { switcher: Switcher, addbutton: Add Color, basic: Basic, monochrome: Mono Chrome, flatcolors: Flat Color, seawolf: Sea Wolf, webcolors: Web Colors, sandy: Sandy, pinkshades: Pink Shades, misty: Misty, citrus: Citrus, vintage: Vintage, moonlight: Moon Light, candycrush: Candy Crush, currentcolor: Current Color, selectedcolor: Selected Color }} + */ + tooltipText?: any; + + /**Specifies the color value for color picker control, the value is in hexadecimal form with prefix of "#". + * @Default {null} + */ + value?: string; + + /**Fires after Color value has been changed successfully.If the user want to perform any operation after the color value changed then the user can make use of this change event.*/ + change? (e: ChangeEventArgs): void; + + /**Fires after closing the color picker popup.*/ + close? (e: CloseEventArgs): void; + + /**Fires after Color picker control is created. If the user want to perform any operation after the color picker control creation then the user can make use of this create event.*/ + create? (e: CreateEventArgs): void; + + /**Fires after Color picker control is destroyed. If the user want to perform any operation after the color picker control destroyed then the user can make use of this destroy event.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires after opening the color picker popup*/ + open? (e: OpenEventArgs): void; + + /**Fires after Color value has been selected successfully. If the user want to perform any operation after the color value selected then the user can make use of this select event.*/ + select? (e: SelectEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**return the changed color value + */ + value?: string; +} + +export interface CloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**return the selected color value + */ + value?: string; +} + +enum ModelType{ + + ///support palette type mode in color picker. + Palette, + + ///support palette type mode in color picker. + Picker +} + + +enum Palette{ + + ///used to show the basic palette + BasicPalette, + + ///used to show the custompalette + CustomPalette +} + + +enum Presets{ + + ///used to show the basic presets + Basic, + + ///used to show the CandyCrush colors presets + CandyCrush, + + ///used to show the Citrus colors presets + Citrus, + + ///used to show the FlatColors presets + FlatColors, + + ///used to show the Misty presets + Misty, + + ///used to show the MoonLight presets + MoonLight, + + ///used to show the PinkShades presets + PinkShades, + + ///used to show the Sandy presets + Sandy, + + ///used to show the Seawolf presets + SeaWolf, + + ///used to show the Vintage presets + Vintage, + + ///used to show the WebColors presets + WebColors +} + +} +enum ButtonMode +{ +//Displays the button in split mode +Split, +//Displays the button in Dropdown mode +Dropdown, +} + +class FileExplorer extends ej.Widget { + static fn: FileExplorer; + constructor(element: JQuery, options?: FileExplorer.Model); + constructor(element: Element, options?: FileExplorer.Model); + model:FileExplorer.Model; + defaults:FileExplorer.Model; + + /** Refresh the size of FileExplorer control. + * @returns {void} + */ + adjustSize(): void; + + /** Disable the particular context menu item. + * @param {string|HTMLElement} Id of the menu item/ Menu element to be disabled + * @returns {void} + */ + disableMenuItem(item: string|HTMLElement): void; + + /** Disable the particular toolbar item. + * @param {string|HTMLElement} Id of the toolbar item/ Tool item element to be disabled + * @returns {void} + */ + disableToolbarItem(item: string|HTMLElement): void; + + /** Enable the particular context menu item. + * @param {string|HTMLElement} Id of the menu item/ Menu element to be Enabled + * @returns {void} + */ + enableMenuItem(item: string|HTMLElement): void; + + /** Enable the particular toolbar item + * @param {string|HTMLElement} Id of the tool item/ Tool item element to be Enabled + * @returns {void} + */ + enableToolbarItem(item: string|HTMLElement): void; + + /** Refresh the content of the selected folder in FileExplorer control. + * @returns {void} + */ + refresh(): void; + + /** Remove the particular toolbar item. + * @param {string|HTMLElement} Id of the tool item/ tool item element to be removed + * @returns {void} + */ + removeToolbarItem(item: string|HTMLElement): void; +} +export module FileExplorer{ + +export interface Model { + + /**Sets the URL of server side ajax handling method that handles file operation like Read, Remove, Rename, Create, Upload, Download, Copy and Move in File Explorer. + */ + ajaxAction?: string; + + /**Specifies the data type of server side ajax handling method. + * @Default {json} + */ + ajaxDataType?: string; + + /**By using ajaxSettings property, you can customize the ajax configurations. Normally you can customize the following option in ajax handling data, url, type, async, contentType, dataType and success. For upload, download and getImage API, you can only customize url. + * @Default {{ read: {}, createFolder: {}, remove: {}, rename: {}, paste: {}, getDetails: {}, download: {}, upload: {}, getImage: {}}} + */ + ajaxSettings?: any; + + /**The FileExplorer allows to select multiple files by enabling the allowMultiSelection property. You can perform multi selection by pressing the Ctrl key or Shift key. + * @Default {true} + */ + allowMultiSelection?: boolean; + + /**Sets the root class for FileExplorer theme. This cssClass API allows to use custom skinning option for File Explorer control. By defining the root class by using this API, you have to include this root class in CSS. + */ + cssClass?: string; + + /**Enables or disables the resize support in FileExplorer control. + * @Default {false} + */ + enableResize?: boolean; + + /**Enables or disables the Right to Left alignment support in FileExplorer control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows specified type of files only to display in FileExplorer control. + * @Default {.} + */ + fileTypes?: string; + + /**By using filterSettings property, you can customize the search functionality of the search bar in FileExplorer control. + */ + filterSettings?: FilterSettings; + + /**By using the gridSettings property, you can customize the grid behavior in the FileExplorer control. + */ + gridSettings?: GridSettings; + + /**Specifies the height of FileExplorer control. + * @Default {400} + */ + height?: string|number; + + /**Enables or disables the responsive support for FileExplorer control during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /**Sets the file view type. There are two view types available, such as grid, tile. See layoutType. + * @Default {ej.FileExplorer.layoutType.Grid} + */ + layout?: ej.FileExplorer.layoutType|string; + + /**Sets the culture in FileExplorer. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum height of FileExplorer control. + * @Default {null} + */ + maxHeight?: string|number; + + /**Sets the maximum width of FileExplorer control. + * @Default {null} + */ + maxWidth?: string|number; + + /**Sets the minimum height of FileExplorer control. + * @Default {250} + */ + minHeight?: string|number; + + /**Sets the minimum width of FileExplorer control. + * @Default {400} + */ + minWidth?: string|number; + + /**The property path denotes the filesystem path that are to be explored. The path for the filesystem can be physical path or relative path, but it has to be relevant to where the Web API is hosted. + */ + path?: string; + + /**The selectedFolder is used to select the specified folder of FileExplorer control. + */ + selectedFolder?: string; + + /**The selectedItems is used to select the specified items (file, folder) of FileExplorer control. + */ + selectedItems?: string|Array; + + /**Enables or disables the context menu option in FileExplorer control. + * @Default {true} + */ + showContextMenu?: boolean; + + /**Enables or disables the footer in FileExplorer control. The footer element displays the details of the current selected files and folders. And also the footer having the switcher to change the layout view. + * @Default {true} + */ + showFooter?: boolean; + + /**Shows or disables the toolbar in FileExplorer control. + * @Default {true} + */ + showToolbar?: boolean; + + /**Enables or disables the navigation pane in FileExplorer control. The navigation pane contains a tree view element that displays all the folders from the filesystem in a hierarchical manner. This is useful to a quick navigation of any folder in the filesystem. + * @Default {true} + */ + showNavigationPane?: boolean; + + /**The tools property is used to configure and group required toolbar items in FileExplorer control. + * @Default {{ creation:[NewFolder, Open], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, Paste], getProperties: [Details], searchBar: [Searchbar] }} + */ + tools?: any; + + /**The toolsList property is used to arrange the toolbar items in the FileExplorer control. + * @Default {[creation, navigation, addressBar, editing, copyPaste, getProperties, searchBar]} + */ + toolsList?: Array; + + /**Gets or sets an object that indicates whether to customize the upload behavior in the FileExplorer. + */ + uploadSettings?: UploadSettings; + + /**Specifies the width of FileExplorer control. + * @Default {850} + */ + width?: string|number; + + /**Fires before the ajax request is performed.*/ + beforeAjaxRequest? (e: BeforeAjaxRequestEventArgs): void; + + /**Fires before downloading the files.*/ + beforeDownload? (e: BeforeDownloadEventArgs): void; + + /**Fires before files or folders open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires before uploading the files.*/ + beforeUpload? (e: BeforeUploadEventArgs): void; + + /**Fires when file or folder is copied successfully.*/ + copy? (e: CopyEventArgs): void; + + /**Fires when new folder is created successfully in file system.*/ + createFolder? (e: CreateFolderEventArgs): void; + + /**Fires when file or folder is cut successfully.*/ + cut? (e: CutEventArgs): void; + + /**Fires when the file view type is changed.*/ + layoutChange? (e: LayoutChangeEventArgs): void; + + /**Fires when files are successfully opened.*/ + open? (e: OpenEventArgs): void; + + /**Fires when a file or folder is pasted successfully.*/ + paste? (e: PasteEventArgs): void; + + /**Fires when file or folder is deleted successfully.*/ + remove? (e: RemoveEventArgs): void; + + /**Fires when resizing is performed for FileExplorer.*/ + resize? (e: ResizeEventArgs): void; + + /**Fires when resizing is started for FileExplorer.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Fires this event when the resizing is stopped for FileExplorer.*/ + resizeStop? (e: ResizeStopEventArgs): void; + + /**Fires when the items from grid view or tile view of FileExplorer control is selected.*/ + select? (e: SelectEventArgs): void; +} + +export interface BeforeAjaxRequestEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ajax response data + */ + data?: any; + + /**returns the FileExplorer model + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface BeforeDownloadEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the downloaded file names. + */ + files?: string[]; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeOpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the opened item type. + */ + itemType?: string; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeUploadEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CopyEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of copied file/folder. + */ + name?: string[]; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the source path. + */ + sourcePath?: string; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CreateFolderEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ajax response data + */ + data?: any; + + /**returns the FileExplorer model + */ + model?: ej.FileExplorer.Model; + + /**returns the selected item details + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CutEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of moved file or folder. + */ + name?: string[]; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the source path. + */ + sourcePath?: string; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LayoutChangeEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the current view type. + */ + layoutType?: string; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface OpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the opened item type. + */ + itemType?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface PasteEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of moved file or folder. + */ + name?: string[]; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the target folder item details. + */ + targetFolder?: any; + + /**returns the target path. + */ + targetPath?: string; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RemoveEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ajax response data. + */ + data?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the names of deleted items. + */ + name?: string; + + /**returns the path of deleted item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mouse move event args. + */ + event?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeStartEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the mouse down event args. + */ + event?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeStopEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the mouse leave event args. + */ + event?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface SelectEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of clicked item. + */ + name?: string; + + /**returns the path of clicked item. + */ + path?: string; + + /**returns the selected item details + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface FilterSettings { + + /**Enables or disables to perform the filter operation with case sensitive. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**Sets the search filter type. There are several filter types available, such as "startswith", "contains", "endswith". See filterType + * @Default {ej.FileExplorer.filterType.Contains} + */ + filterType?: ej.FilterType|string; +} + +export interface GridSettings { + + /**Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. + * @Default {true} + */ + allowSorting?: boolean; + + /**Gets or sets an object that indicates to render the grid with specified columns. You can use this property same as the column property in Grid control. + * @Default {[{ field: name, headerText: Name, width: 25% }, { field: type, headerText: Type, width: 20% }, { field: dateModified, headerText: Date Modified, width: 35% }, { field: size, headerText: Size, width: 15%, textAlign: right, headerTextAlign: left }]} + */ + columns?: Array; +} + +export interface UploadSettings { + + /**Specifies the maximum file size allowed to upload. It accepts the value in bytes. + * @Default {31457280} + */ + maxFileSize?: number; + + /**Enables or disables the multiple files upload. When it is enabled, you can upload multiple files at a time and when disabled, you can upload only one file at a time. + * @Default {true} + */ + allowMultipleFile?: boolean; + + /**Enables or disables the auto upload option while uploading files in FileExplorer control. + * @Default {false} + */ + autoUpload?: boolean; +} + +enum layoutType{ + + ///Supports to display files in tile view + Tile, + + ///Supports to display files in grid view + Grid, + + ///Supports to display files as large icons + LargeIcons +} + +} + +class DatePicker extends ej.Widget { + static fn: DatePicker; + constructor(element: JQuery, options?: DatePicker.Model); + constructor(element: Element, options?: DatePicker.Model); + model:DatePicker.Model; + defaults:DatePicker.Model; + + /** Disables the DatePicker control. + * @returns {void} + */ + disable(): void; + + /** Enable the DatePicker control, if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Returns the current date value in the DatePicker control. + * @returns {string} + */ + getValue(): string; + + /** Close the DatePicker popup, if it is in opened state. + * @returns {void} + */ + hide(): void; + + /** Opens the DatePicker popup. + * @returns {void} + */ + show(): void; +} +export module DatePicker{ + +export interface Model { + + /**Used to allow or restrict the editing in DatePicker input field directly. By setting false to this API, You can only pick the date from DatePicker popup. + * @Default {true} + */ + allowEdit?: boolean; + + /**allow or restrict the drill down to multiple levels of view (month/year/decade) in DatePicker calendar + * @Default {true} + */ + allowDrillDown?: boolean; + + /**Sets the specified text value to the today button in the DatePicker calendar. + * @Default {Today} + */ + buttonText?: string; + + /**Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /**Formats the value of the DatePicker in to the specified date format. If this API is not specified, dateFormat will be set based on the current culture of DatePicker. + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /**Specifies the header format of days in DatePicker calendar. See below to get available Headers options + * @Default {ej.DatePicker.Header.Min} + */ + dayHeaderFormat?: string | ej.DatePicker.Header; + + /**Specifies the navigation depth level in DatePicker calendar. This option is not applied when start level view option is lower than depth level view. See below to know available levels in DatePicker Calendar + */ + depthLevel?: string | ej.DatePicker.Level; + + /**Allows to embed the DatePicker calendar in the page. Also associates DatePicker with div element instead of input. + * @Default {false} + */ + displayInline?: boolean; + + /**Enables or disables the animation effect with DatePicker calendar. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Enable or disable the DatePicker control. + * @Default {true} + */ + enabled?: boolean; + + /**Sustain the entire widget model of DatePicker even after form post or browser refresh + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays DatePicker calendar along with DatePicker input field in Right to Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows to enter valid or invalid date in input textbox and indicate as error if it is invalid value, when this API value is set to true. For false value, invalid date is not allowed to input field and corrected to valid date automatically, even if invalid date is given. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**Used the required fields for special Dates in DatePicker in order to customize the special dates in a calendar. + * @Default {null} + */ + fields?: Fields; + + /**Specifies the header format to be displayed in the DatePicker calendar. + * @Default {MMMM yyyy} + */ + headerFormat?: string; + + /**Specifies the height of the DatePicker input text. + * @Default {28px} + */ + height?: string; + + /**HighlightSection is used to highlight currently selected date's month/week/workdays. See below to get available HighlightSection options + * @Default {none} + */ + highlightSection?: string | ej.DatePicker.HighlightSection; + + /**Weekend dates will be highlighted when this property is set to true. + * @Default {false} + */ + highlightWeekend?: boolean; + + /**Specifies the HTML Attributes of the DatePicker. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Change the DatePicker calendar and date format based on given culture. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the maximum date in the calendar that the user can select. + * @Default {new Date(2099, 11, 31)} + */ + maxDate?: string|Date; + + /**Specifies the minimum date in the calendar that the user can select. + * @Default {new Date(1900, 00, 01)} + */ + minDate?: string|Date; + + /**Allows to toggles the read only state of the DatePicker. When the widget is readOnly, it doesn't allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /**It allows to display footer in DatePicker calendar. + * @Default {true} + */ + showFooter?: boolean; + + /**It allows to display/hides the other months days from the current month calendar in a DatePicker. + * @Default {true} + */ + showOtherMonths?: boolean; + + /**Shows/hides the date icon button at right side of textbox, which is used to open or close the DatePicker calendar popup. + * @Default {true} + */ + showPopupButton?: boolean; + + /**DatePicker input is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Used to show the tooltip when hovering on the days in the DatePicker calendar. + * @Default {true} + */ + showTooltip?: boolean; + + /**Specifies the special dates in DatePicker. + * @Default {null} + */ + specialDates?: any; + + /**Specifies the start day of the week in DatePicker calendar. + * @Default {0} + */ + startDay?: number; + + /**Specifies the start level view in DatePicker calendar. See below available Levels + * @Default {ej.DatePicker.Level.Month} + */ + startLevel?: string | ej.DatePicker.Level; + + /**Specifies the number of months to be navigate for one click of next and previous button in a DatePicker Calendar. + * @Default {1} + */ + stepMonths?: number; + + /**Provides option to customize the tooltip format. + * @Default {ddd MMM dd yyyy} + */ + tooltipFormat?: string; + + /**Sets the jQuery validation support to DatePicker Date value. See validation + * @Default {null} + */ + validationMessage?: any; + + /**Sets the jQuery validation custom rules to the DatePicker. see validation + * @Default {null} + */ + validationRules?: any; + + /**sets or returns the current value of DatePicker + * @Default {null} + */ + value?: string|Date; + + /**Specifies the water mark text to be displayed in input text. + * @Default {Select date} + */ + watermarkText?: string; + + /**Specifies the width of the DatePicker input text. + * @Default {160px} + */ + width?: string; + + /**Fires before closing the DatePicker popup.*/ + beforeClose? (e: BeforeCloseEventArgs): void; + + /**Fires when each date is created in the DatePicker popup calendar.*/ + beforeDateCreate? (e: BeforeDateCreateEventArgs): void; + + /**Fires before opening the DatePicker popup.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when the DatePicker input value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when DatePicker popup is closed.*/ + close? (e: CloseEventArgs): void; + + /**Fires when the DatePicker is created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the DatePicker is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**NameTypeDescriptioncancelbooleanSet to true when the event has to be canceled, else false.modelobjectreturns the DatePicker model.typestringreturns the name of the event.valuestringreturns the currently selected date value.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when DatePicker input loses the focus.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when DatePicker popup is opened.*/ + open? (e: OpenEventArgs): void; + + /**Fires when a date is selected from the DatePicker popup.*/ + select? (e: SelectEventArgs): void; +} + +export interface BeforeCloseEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the event parameters from DatePicker. + */ + events?: any; + + /**returns the DatePicker popup. + */ + element?: HTMLElement; +} + +export interface BeforeDateCreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the currently created date object. + */ + date?: any; + + /**returns the current DOM object of the date from the Calendar. + */ + element?: HTMLElement; +} + +export interface BeforeOpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the event parameters from DatePicker. + */ + events?: any; + + /**returns the DatePicker popup. + */ + element?: HTMLElement; +} + +export interface ChangeEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the DatePicker input value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; +} + +export interface CloseEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the current date value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; +} + +export interface CreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the currently selected date value. + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the currently selected date value. + */ + value?: string; + + /**returns the previously selected date value. + */ + prevDate?: string; +} + +export interface OpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the current date value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; +} + +export interface SelectEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the current date value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; + + /**returns whether the currently selected date is special date or not. + */ + isSpecialDay?: string; +} + +export interface Fields { + + /**Specifies the specials dates + */ + date?: string; + + /**Specifies the icon class to special dates. + */ + iconClass?: string; + + /**Specifies the tooltip to special dates. + */ + tooltip?: string; +} + +enum Header{ + + ///Removes day header in DatePicker + None, + + ///sets the short format of day name (like Sun) in header in DatePicker + Short, + + ///sets the Min format of day name (like su) in header format DatePicker + Min +} + + +enum Level{ + + ///allow navigation upto year level in DatePicker + Year, + + ///allow navigation upto decade level in DatePicker + Decade, + + ///allow navigation upto Century level in DatePicker + Century +} + + +enum HighlightSection{ + + ///Highlight the week of the currently selected date in DatePicker popup calendar + Week, + + ///Highlight the workdays in a currently selected date's week in DatePicker popup calendar + WorkDays, + + ///Nothing will be highlighted, remove highlights from DatePicker popup calendar if already exists + None +} + +} + +class DateTimePicker extends ej.Widget { + static fn: DateTimePicker; + constructor(element: JQuery, options?: DateTimePicker.Model); + constructor(element: Element, options?: DateTimePicker.Model); + model:DateTimePicker.Model; + defaults:DateTimePicker.Model; + + /** Disables the DateTimePicker control. + * @returns {void} + */ + disable(): void; + + /** Enables the DateTimePicker control. + * @returns {void} + */ + enable(): void; + + /** Returns the current datetime value in the DateTimePicker. + * @returns {string} + */ + getValue(): string; + + /** Hides or closes the DateTimePicker popup. + * @returns {void} + */ + hide(): void; + + /** Updates the current system date value and time value to the DateTimePicker. + * @returns {void} + */ + setCurrentDateTime(): void; + + /** Shows or opens the DateTimePicker popup. + * @returns {void} + */ + show(): void; +} +export module DateTimePicker{ + +export interface Model { + + /**Displays the custom text for the buttons inside the DateTimePicker popup. when the culture value changed, we can change the buttons text based on the culture. + * @Default {{ today: Today, timeNow: Time Now, done: Done, timeTitle: Time }} + */ + buttonText?: ButtonText; + + /**Set the root class for DateTimePicker theme. This cssClass API helps to use custom skinning option for DateTimePicker control. + */ + cssClass?: string; + + /**Defines the datetime format displayed in the DateTimePicker. The value should be a combination of date format and time format. + * @Default {M/d/yyyy h:mm tt} + */ + dateTimeFormat?: string; + + /**Specifies the header format of the datepicker inside the DateTimePicker popup. See DatePicker.Header + * @Default {ej.DatePicker.Header.Min} + */ + dayHeaderFormat?: ej.DatePicker.Header|string; + + /**Specifies the drill down level in datepicker inside the DateTimePicker popup. See ej.DatePicker.Level + */ + depthLevel?: ej.DatePicker.Level|string; + + /**Enable or disable the animation effect in DateTimePicker. + * @Default {true} + */ + enableAnimation?: boolean; + + /**When this property is set to false, it disables the DateTimePicker control. + * @Default {false} + */ + enabled?: boolean; + + /**Enables or disables the state maintenance of DateTimePicker. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Sets the DateTimePicker direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**When enableStrictMode true it allows the value outside of the range also but it highlights the textbox with error class, otherwise it internally changed to the correct value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**Specifies the header format to be displayed in the DatePicker calendar inside the DateTimePicker popup. + * @Default {MMMM yyyy} + */ + headerFormat?: string; + + /**Defines the height of the DateTimePicker textbox. + * @Default {30} + */ + height?: string|number; + + /**Specifies the HTML Attributes of the ejDateTimePicker + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the time interval between the two adjacent time values in the time popup. + * @Default {30} + */ + interval?: number; + + /**Defines the localization culture for DateTimePicker. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum value to the DateTimePicker. Beyond the maximum value an error class is added to the wrapper element when we set true to enableStrictMode. + * @Default {new Date(12/31/2099 11:59:59 PM)} + */ + maxDateTime?: string|Date; + + /**Sets the minimum value to the DateTimePicker. Behind the minimum value an error class is added to the wrapper element. + * @Default {new Date(1/1/1900 12:00:00 AM)} + */ + minDateTime?: string|Date; + + /**Specifies the popup position of DateTimePicker.See below to know available popup positions + * @Default {ej.DateTimePicker.Bottom} + */ + popupPosition?: string | ej.popupPosition; + + /**Indicates that the DateTimePicker value can only be read and can’t change. + * @Default {false} + */ + readOnly?: boolean; + + /**It allows showing days in other months of DatePicker calendar inside the DateTimePicker popup. + * @Default {true} + */ + showOtherMonths?: boolean; + + /**Shows or hides the arrow button from the DateTimePicker textbox. When the button disabled, the DateTimePicker popup opens while focus in the textbox and hides while focus out from the textbox. + * @Default {true} + */ + showPopupButton?: boolean; + + /**Changes the sharped edges into rounded corner for the DateTimePicker textbox and popup. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the start day of the week in datepicker inside the DateTimePicker popup. + * @Default {1} + */ + startDay?: number; + + /**Specifies the start level view in datepicker inside the DateTimePicker popup. See DatePicker.Level + * @Default {ej.DatePicker.Level.Month or month} + */ + startLevel?: ej.DatePicker.Level|string; + + /**Specifies the number of months to navigate at one click of next and previous button in datepicker inside the DateTimePicker popup. + * @Default {1} + */ + stepMonths?: number; + + /**Defines the time format displayed in the time dropdown inside the DateTimePicker popup. + * @Default {h:mm tt} + */ + timeDisplayFormat?: string; + + /**We can drill down up to time interval on selected date with meridian details. + * @Default {{ enabled: false, interval: 5, showMeridian: false, autoClose: true }} + */ + timeDrillDown?: TimeDrillDown; + + /**Defines the width of the time dropdown inside the DateTimePicker popup. + * @Default {100} + */ + timePopupWidth?: string|number; + + /**Set the jquery validation error message in DateTimePicker. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jquery validation rules in DateTimePicker. + * @Default {null} + */ + validationRules?: any; + + /**Sets the DateTime value to the control. + */ + value?: string|Date; + + /**Defines the width of the DateTimePicker textbox. + * @Default {143} + */ + width?: string|number; + + /**Fires when the datetime value changed in the DateTimePicker textbox.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when DateTimePicker popup closes.*/ + close? (e: CloseEventArgs): void; + + /**Fires after DateTimePicker control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the DateTimePicker is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the focus-in happens in the DateTimePicker textbox.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when the focus-out happens in the DateTimePicker textbox.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when DateTimePicker popup opens.*/ + open? (e: OpenEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the current value is valid or not + */ + isValidState?: boolean; + + /**returns the modified datetime value + */ + value?: string; + + /**returns the previously selected date time value + */ + prevDateTime?: string; + + /**returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; +} + +export interface CloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the modified datetime value + */ + value?: string; + + /**returns the previously selected date time value + */ + prevDateTime?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DateTimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DateTimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the datetime value, which is in text box + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the datetime value, which is in text box + */ + value?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the modified datetime value + */ + value?: string; + + /**returns the previously selected date time value + */ + prevDateTime?: string; +} + +export interface ButtonText { + + /**Sets the text for the Done button inside the datetime popup. + */ + done?: string; + + /**Sets the text for the Now button inside the datetime popup. + */ + timeNow?: string; + + /**Sets the header text for the Time dropdown. + */ + timeTitle?: string; + + /**Sets the text for the Today button inside the datetime popup. + */ + today?: string; +} + +export interface TimeDrillDown { + + /**This is the field to show/hide the timeDrillDown in DateTimePicker. + */ + enabled?: boolean; + + /**Sets the interval time of minutes on selected date. + */ + interval?: number; + + /**Allows the user to show or hide the meridian with time in DateTimePicker. + */ + showMeridian?: boolean; + + /**After choosing the time, the popup will close automatically if we set it as true, otherwise we focus out the DateTimePicker or choose timeNow button for closing the popup. + */ + autoClose?: boolean; +} +} +enum popupPosition +{ +//Opens the DateTimePicker popup below to the DateTimePicker input box +Bottom, +//Opens the DateTimePicker popup above to the DateTimePicker input box +Top, +} + +class Dialog extends ej.Widget { + static fn: Dialog; + constructor(element: JQuery, options?: Dialog.Model); + constructor(element: Element, options?: Dialog.Model); + model:Dialog.Model; + defaults:Dialog.Model; + + /** Closes the dialog widget dynamically. + * @returns {void} + */ + close(): void; + + /** Collapses the content area when it is expanded. + * @returns {void} + */ + collapse(): void; + + /** Destroys the Dialog widget. + * @returns {void} + */ + destroy(): void; + + /** Expands the content area when it is collapsed. + * @returns {void} + */ + expand(): void; + + /** Checks whether the Dialog widget is opened or not. This methods returns Boolean value. + * @returns {void} + */ + isOpen(): void; + + /** Maximizes the Dialog widget. + * @returns {void} + */ + maximize(): void; + + /** Minimizes the Dialog widget. + * @returns {void} + */ + minimize(): void; + + /** Opens the Dialog widget. + * @returns {void} + */ + open(): void; + + /** Pins the dialog in its current position. + * @returns {void} + */ + pin(): void; + + /** Restores the dialog. + * @returns {void} + */ + restore(): void; + + /** Unpins the Dialog widget. + * @returns {void} + */ + unpin(): void; + + /** Sets the title for the Dialog widget. + * @param {string} The title for the dialog widget. + * @returns {void} + */ + setTitle(Title: string): void; + + /** Sets the content for the Dialog widget dynamically. + * @param {string} The content for the dialog widget. It accepts both string and html string. + * @returns {void} + */ + setContent(content: string): void; + + /** Sets the focus on the Dialog widget. + * @returns {void} + */ + focus(): void; +} +export module Dialog{ + +export interface Model { + + /**Adds action buttons like close, minimize, pin, maximize in the dialog header. + */ + actionButtons?: string[]; + + /**Enables or disables draggable. + */ + allowDraggable?: boolean; + + /**Enables or disables keyboard interaction. + */ + allowKeyboardNavigation?: boolean; + + /**Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. In order to customize animation effects, you need to set “enableAnimation” as true. It contains the following sub properties. + */ + animation?: any; + + /**The tooltip text for the dialog close button. + */ + closeIconTooltip?: string; + + /**Closes the dialog widget on pressing the ESC key when it is set to true. + */ + closeOnEscape?: boolean; + + /**The selector for the container element. If the property is set, then dialog will append to the selected element and it is restricted to move only within the specified container element. + */ + containment?: string; + + /**The content type to load the dialog content at run time. The possible values are null, ajax, iframe and image. When it is null (default value), the content inside dialog element will be displayed as content and when it is not null, the content will be loaded from the URL specified in the contentUrl property. + */ + contentType?: string; + + /**The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’. + */ + contentUrl?: string; + + /**The root class for the Dialog widget to customize the existing theme. + */ + cssClass?: string; + + /**Enable or disables animation when the dialog is opened or closed. + */ + enableAnimation?: boolean; + + /**Enables or disables the Dialog widget. + */ + enabled?: boolean; + + /**Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is closed. + */ + enableModal?: boolean; + + /**Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. + */ + enablePersistence?: boolean; + + /**Allows the dialog to be resized. The dialog cannot be resized less than the minimum height, width values and greater than the maximum height and width. + */ + enableResize?: boolean; + + /**Displays dialog content from right to left when set to true. + */ + enableRTL?: boolean; + + /**The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true since the favicon will be displayed in the dialog header. + */ + faviconCSS?: string; + + /**Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”. + */ + height?: string|number; + + /**Enable or disables responsive behavior. + */ + isResponsive?: boolean; + + /**Default Value:{:.param}“en-US” + */ + locale?: number; + + /**Sets the maximum height for the dialog widget. + */ + maxHeight?: number; + + /**Sets the maximum width for the dialog widget. + */ + maxWidth?: number; + + /**Sets the minimum height for the dialog widget. + */ + minHeight?: number; + + /**Sets the minimum width for the dialog widget. + */ + minWidth?: number; + + /**Displays the Dialog widget at the given X and Y position. + */ + position?: any; + + /**Shows or hides the dialog header. + */ + showHeader?: boolean; + + /**The Dialog widget can be opened by default i.e. on initialization, when it is set to true. + */ + showOnInit?: boolean; + + /**Enables or disables the rounder corner. + */ + showRoundedCorner?: boolean; + + /**The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container. + */ + target?: string; + + /**The title text to be displayed in the dialog header. In order to set title, you need to set showHeader as true since the title will be displayed in the dialog header. + */ + title?: string; + + /**Add or configure the tooltip text for actionButtons in the dialog header. + */ + tooltip?: any; + + /**Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”. + */ + width?: string|number; + + /**Sets the z-index value for the Dialog widget. + */ + zIndex?: number; + + /**This event is triggered before the dialog widgets gets open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**This event is triggered whenever the Ajax request fails to retrieve the dialog content.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**This event is triggered whenever the Ajax request to retrieve the dialog content, gets succeed.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**This event is triggered before the dialog widgets get closed.*/ + beforeClose? (e: BeforeCloseEventArgs): void; + + /**This event is triggered after the dialog widget is closed.*/ + close? (e: CloseEventArgs): void; + + /**Triggered after the dialog content is loaded in DOM.*/ + contentLoad? (e: ContentLoadEventArgs): void; + + /**Triggered after the dialog is created successfully*/ + create? (e: CreateEventArgs): void; + + /**Triggered after the dialog widget is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered while the dialog is dragged.*/ + drag? (e: DragEventArgs): void; + + /**Triggered when the user starts dragging the dialog.*/ + dragStart? (e: DragStartEventArgs): void; + + /**Triggered when the user stops dragging the dialog.*/ + dragStop? (e: DragStopEventArgs): void; + + /**Triggered after the dialog is opened.*/ + open? (e: OpenEventArgs): void; + + /**Triggered while the dialog is resized.*/ + resize? (e: ResizeEventArgs): void; + + /**Triggered when the user starts resizing the dialog.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Triggered when the user stops resizing the dialog.*/ + resizeStop? (e: ResizeStopEventArgs): void; + + /**Triggered when the dialog content is expanded.*/ + expand? (e: ExpandEventArgs): void; + + /**Triggered when the dialog content is collapsed.*/ + collapse? (e: CollapseEventArgs): void; +} + +export interface BeforeOpenEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; +} + +export interface AjaxErrorEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**URL of the content. + */ + url?: string; + + /**Error page content. + */ + responseText?: string; + + /**Error code. + */ + status?: number; + + /**The corresponding error description. + */ + statusText?: string; +} + +export interface AjaxSuccessEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**URL of the content. + */ + url?: string; + + /**Response content. + */ + data?: string; +} + +export interface BeforeCloseEventArgs { + + /**Current event object. + */ + event?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface CloseEventArgs { + + /**Current event object. + */ + event?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; +} + +export interface ContentLoadEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**URL of the content. + */ + url?: string; + + /**Content type + */ + contentType?: any; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface DragEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface DragStartEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface DragStopEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface OpenEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface ResizeStartEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface ResizeStopEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface ExpandEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface CollapseEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} +} + +class DropDownList extends ej.Widget { + static fn: DropDownList; + constructor(element: JQuery, options?: DropDownList.Model); + constructor(element: Element, options?: DropDownList.Model); + model:DropDownList.Model; + defaults:DropDownList.Model; + + /** Adding a single item or an array of items into the DropDownList allows you to specify all the field attributes such as value, template, image URL, and html attributes for those items. + * @param {any|Array} this parameter should have field attributes with respect to mapped field attributes and it's corresponding values to fields + * @returns {void} + */ + addItem(data: any|Array): void; + + /** This method is used to select all the items in the DropDownList. + * @returns {void} + */ + checkAll(): void; + + /** Clears the text in the DropDownList textbox. + * @returns {void} + */ + clearText(): void; + + /** Destroys the DropDownList widget. + * @returns {void} + */ + destroy(): void; + + /** This property is used to disable the DropDownList widget. + * @returns {void} + */ + disable(): void; + + /** This property disables the set of items in the DropDownList. + * @param {string|number|Array} disable the given index list items + * @returns {void} + */ + disableItemsByIndices(index: string|number|Array): void; + + /** This property enables the DropDownList control. + * @returns {void} + */ + enable(): void; + + /** Enables an Item or set of Items that are disabled in the DropDownList + * @param {string|number|Array} enable the given index list items if it's disabled + * @returns {void} + */ + enableItemsByIndices(index: string|number|Array): void; + + /** This method retrieves the items using given value. + * @param {string|number|any} Return the whole object of data based on given value + * @returns {any} + */ + getItemDataByValue(value: string|number|any): any; + + /** This method is used to retrieve the items that are bound with the DropDownList. + * @returns {any} + */ + getListData(): any; + + /** This method is used to get the selected items in the DropDownList. + * @returns {HTMLElement} + */ + getSelectedItem(): HTMLElement; + + /** This method is used to retrieve the items value that are selected in the DropDownList. + * @returns {string} + */ + getSelectedValue(): string; + + /** This method hides the suggestion popup in the DropDownList. + * @returns {void} + */ + hidePopup(): void; + + /** This method is used to select the list of items in the DropDownList through the Index of the items. + * @param {string|number|Array} select the given index list items + * @returns {void} + */ + selectItemsByIndices(index: string|number|Array): void; + + /** This method is used to select an item in the DropDownList by using the given text value. + * @param {string|number|Array} select the list items relates to given text + * @returns {void} + */ + selectItemByText(index: string|number|Array): void; + + /** This method is used to select an item in the DropDownList by using the given value. + * @param {string|number|Array} select the list items relates to given values + * @returns {void} + */ + selectItemByValue(index: string|number|Array): void; + + /** This method shows the DropDownList control with the suggestion popup. + * @returns {void} + */ + showPopup(): void; + + /** This method is used to unselect all the items in the DropDownList. + * @returns {void} + */ + unCheckAll(): void; + + /** This method is used to unselect the list of items in the DropDownList through Index of the items. + * @param {string|number|Array} unselect the given index list items + * @returns {void} + */ + unselectItemsByIndices(index: string|number|Array): void; + + /** This method is used to unselect an item in the DropDownList by using the given text value. + * @param {string|number|Array} unselect the list items realtes to given text + * @returns {void} + */ + unselectItemByText(index: string|number|Array): void; + + /** This method is used to unselect an item in the DropDownList by using the given value. + * @param {string|number|Array} unselect the list items realtes to given values + * @returns {void} + */ + unselectItemByValue(index: string|number|Array): void; +} +export module DropDownList{ + +export interface Model { + + /**The cascading DropDownLists is a series of two or more DropDownLists in which each DropDownList is filtered according to the previous DropDownList’s value. + * @Default {null} + */ + cascadeTo?: string; + + /**Sets the case sensitivity of the search operation. It supports both enableFilterSearch and enableIncrementalSearch property. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**Dropdown widget's style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass property. You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied. + */ + cssClass?: string; + + /**This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the instance of the ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled with the dropdown. When you enter the delimiter value, the texts after the delimiter are considered as a separate word or query. The delimiter string is a single character and must be a symbol. Mostly, the delimiter symbol is used as comma (,) or semi-colon (;) or any other special character. + * @Default {','} + */ + delimiterChar?: string; + + /**The enabled Animation property uses the easeOutQuad animation to SlideDown and SlideUp the Popup list in 200 and 100 milliseconds, respectively. + * @Default {false} + */ + enableAnimation?: boolean; + + /**This property is used to indicate whether the DropDownList control responds to the user interaction or not. By default, the control is in the enabled mode and you can disable it by setting it to false. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies to perform incremental search for the selection of items from the DropDownList with the help of this property. This helps in selecting the item by using the typed character. + * @Default {true} + */ + enableIncrementalSearch?: boolean; + + /**This property selects the item in the DropDownList when the item is entered in the Search textbox. + * @Default {false} + */ + enableFilterSearch?: boolean; + + /**Saves the current model value to the browser cookies for state maintenance. While refreshing the DropDownList control page, it retains the model value and it is applied from the browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**This enables the resize handler to resize the popup to any size. + * @Default {false} + */ + enablePopupResize?: boolean; + + /**Sets the DropDownList textbox direction from right to left align. + * @Default {false} + */ + enableRTL?: boolean; + + /**This property is used to sort the Items in the DropDownList. By default, it sorts the items in an ascending order. + * @Default {false} + */ + enableSorting?: boolean; + + /**Specifies the mapping fields for the data items of the DropDownList. + * @Default {null} + */ + fields?: Fields; + + /**When the enableFilterSearch property value is set to true, the values in the DropDownList shows the items starting with or containing the key word/letter typed in the Search textbox. + * @Default {ej.FilterType.Contains} + */ + filterType?: ej.FilterType|string; + + /**Used to create visualized header for dropdown items + * @Default {null} + */ + headerTemplate?: string; + + /**Defines the height of the DropDownList textbox. + * @Default {null} + */ + height?: string|number; + + /**It sets the given HTML attributes for the DropDownList control such as ID, name, disabled, etc. + * @Default {null} + */ + htmlAttributes?: any; + + /**Data can be fetched in the DropDownList control by using the DataSource, specifying the number of items. + * @Default {5} + */ + itemsCount?: number; + + /**Defines the maximum height of the suggestion box. This property restricts the maximum height of the popup when resize is enabled. + * @Default {null} + */ + maxPopupHeight?: string|number; + + /**Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. + * @Default {null} + */ + minPopupHeight?: string|number; + + /**Defines the maximum width of the suggestion box. This property restricts the maximum width of the popup when resize is enabled. + * @Default {null} + */ + maxPopupWidth?: string|number; + + /**Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. + * @Default {0} + */ + minPopupWidth?: string|number; + + /**With the help of this property, you can make a single or multi selection with the DropDownList and display the text in two modes, delimiter and visual mode. In delimiter mode, you can separate the items by using the delimiter character such as comma (,) or semi-colon (;) or any other special character. In the visual mode, the items are showcased like boxes with close icon in the textbox. + * @Default {ej.MultiSelectMode.None} + */ + multiSelectMode?: ej.MultiSelectMode|string; + + /**Defines the height of the suggestion popup box in the DropDownList control. + * @Default {152px} + */ + popupHeight?: string|number; + + /**Defines the width of the suggestion popup box in the DropDownList control. + * @Default {auto} + */ + popupWidth?: string|number; + + /**Specifies the query to retrieve the data from the DataSource. + * @Default {null} + */ + query?: any; + + /**Specifies that the DropDownList textbox values should be read-only. + * @Default {false} + */ + readOnly?: boolean; + + /**Specifies an item to be selected in the DropDownList. + * @Default {null} + */ + selectedIndex?: number; + + /**Specifies the selectedItems for the DropDownList. + * @Default {[]} + */ + selectedIndices?: Array; + + /**Selects multiple items in the DropDownList with the help of the checkbox control. To achieve this, enable the showCheckbox option to true. + * @Default {false} + */ + showCheckbox?: boolean; + + /**DropDownList control is displayed with the popup seen. + * @Default {false} + */ + showPopupOnLoad?: boolean; + + /**DropDownList textbox displayed with the rounded corner style. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**When the enableSorting property value is set to true, this property helps to sort the items either in ascending or descending order + * @Default {ej.sortOrder.Ascending} + */ + sortOrder?: ej.SortOrder|string; + + /**Specifies the targetID for the DropDownList’s items. + * @Default {null} + */ + targetID?: string; + + /**By default, you can add any text or image to the DropDownList item. To customize the item layout or to create your own visualized elements, you can use this template support. + * @Default {null} + */ + template?: string; + + /**Defines the text value that is displayed in the DropDownList textbox. + * @Default {null} + */ + text?: string; + + /**Sets the jQuery validation error message in the DropDownList + * @Default {null} + */ + validationMessage?: any; + + /**Sets the jquery validation rules in the Dropdownlist. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value (text content) for the DropDownList control. + * @Default {null} + */ + value?: string; + + /**Specifies a short hint that describes the expected value of the DropDownList control. + * @Default {null} + */ + watermarkText?: string; + + /**Defines the width of the DropDownList textbox. + * @Default {null} + */ + width?: string|number; + + /**The Virtual Scrolling feature is used to display a large amount of records in the DropDownList, that is, when scrolling, an Ajax request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. You can set the itemsCount property that represents the number of items to be fetched from the server on every Ajax request. + * @Default {normal} + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /**Fires the action before the XHR request.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Fires the action when the list of items is bound to the DropDownList by xhr post calling*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Fires the action when the xhr post calling failed on remote data binding with the DropDownList control.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Fires the action when the xhr post calling succeed on remote data binding with the DropDownList control*/ + actionSuccess? (e: ActionSuccessEventArgs): void; + + /**Fires the action before the popup is ready to hide.*/ + beforePopupHide? (e: BeforePopupHideEventArgs): void; + + /**Fires the action before the popup is ready to be displayed.*/ + beforePopupShown? (e: BeforePopupShownEventArgs): void; + + /**Fires when the cascading happens between two DropDownList exactly after the value changes in the first dropdown and before filtering in the second Dropdown.*/ + cascade? (e: CascadeEventArgs): void; + + /**Fires the action when the DropDownList control’s value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Fires the action when the list item checkbox value is changed.*/ + checkChange? (e: CheckChangeEventArgs): void; + + /**Fires the action once the DropDownList is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires the action when the list items is bound to the DropDownList.*/ + dataBound? (e: DataBoundEventArgs): void; + + /**Fires the action when the DropDownList is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires the action, once the popup is closed*/ + popupHide? (e: PopupHideEventArgs): void; + + /**Fires the action, when the popup is resized.*/ + popupResize? (e: PopupResizeEventArgs): void; + + /**Fires the action, once the popup is opened.*/ + popupShown? (e: PopupShownEventArgs): void; + + /**Fires the action, when resizing a popup starts.*/ + popupResizeStart? (e: PopupResizeStartEventArgs): void; + + /**Fires the action, when the popup resizing is stopped.*/ + popupResizeStop? (e: PopupResizeStopEventArgs): void; + + /**Fires the action before filtering the list items that starts in the DropDownList when the enableFilterSearch is enabled.*/ + search? (e: SearchEventArgs): void; + + /**Fires the action, when the list of item is selected.*/ + select? (e: SelectEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ActionCompleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns number of times trying to fetch the data + */ + count?: number; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the query for data retrieval + */ + query?: any; + + /**Returns the query for data retrieval from the Database + */ + request?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the number of items fetched from remote data + */ + result?: Array; + + /**Returns the requested data + */ + xhr?: any; +} + +export interface ActionFailureEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the error message + */ + error?: any; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the query for data retrieval + */ + query?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ActionSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns number of times trying to fetch the data + */ + count?: number; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the query for data retrieval + */ + query?: any; + + /**Returns the query for data retrieval from the Database + */ + request?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the number of items fetched from remote data + */ + result?: Array; + + /**Returns the requested data + */ + xhr?: any; +} + +export interface BeforePopupHideEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface BeforePopupShownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface CascadeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the cascading dropdown model. + */ + cascadeModel?: any; + + /**returns the current selected value in first dropdown. + */ + cascadeValue?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the default filter action for second dropdown data should happen or not. + */ + requiresDefaultFilter?: boolean; + + /**returns the name of the event + */ + type?: string; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /**Returns the selected item ID. + */ + itemId?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the selected text. + */ + text?: string; + + /**Returns the selected value. + */ + value?: string; +} + +export interface CheckChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /**Returns the selected item ID. + */ + itemId?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the selected text. + */ + text?: string; + + /**Returns the selected value. + */ + value?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface DataBoundEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the data that is bound to DropDownList + */ + data?: any; +} + +export interface DestroyEventArgs { + + /**its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface PopupHideEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface PopupResizeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the data from the resizable plugin. + */ + event?: any; +} + +export interface PopupShownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface PopupResizeStartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the data from the resizable plugin. + */ + event?: any; +} + +export interface PopupResizeStopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the data from the resizable plugin. + */ + event?: any; +} + +export interface SearchEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the data bound to the DropDownList. + */ + items?: any; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the search string typed in search box. + */ + searchString?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /**Returns the selected item ID. + */ + itemId?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the selected text. + */ + text?: string; + + /**Returns the selected value. + */ + value?: string; +} + +export interface Fields { + + /**Used to group the items. + */ + groupBy?: string; + + /**Defines the HTML attributes such as ID, class, and styles for the item. + */ + htmlAttributes?: any; + + /**Defines the ID for the tag. + */ + id?: string; + + /**Defines the image attributes such as height, width, styles, and so on. + */ + imageAttributes?: string; + + /**Defines the imageURL for the image location. + */ + imageUrl?: string; + + /**Defines the tag value to be selected initially. + */ + selected?: boolean; + + /**Defines the sprite css for the image tag. + */ + spriteCssClass?: string; + + /**Defines the table name for tag value or display text while rendering remote data. + */ + tableName?: string; + + /**Defines the text content for the tag. + */ + text?: string; + + /**Defines the tag value. + */ + value?: string; +} +} +enum FilterType +{ +//filter the data wherever contains search key +Contains, +//filter the data based on search key present at start position +StartsWith, +} +enum MultiSelectMode +{ +// can select only single item in DropDownList +None, +//can select multiple items and it's seperated by delimiterChar +Delimiter, +// can select multiple items and it's show's like visual box in textbox +VisualMode, +} +enum SortOrder +{ +// Sort the data in ascending order +Ascending, +//Sort the data in descending order +Descending, +} +enum VirtualScrollMode +{ +// The data is loaded only to the corresponding page (display items). When scrolling some other position, it enables the load on demand with the DropDownList. +Normal, +//The data items are loaded from the remote when scroll handle reaches the end of the scrollbar like infinity scrolling. +Continuous, +} + +class Editor extends ej.Widget { + static fn: Editor; + constructor(element: JQuery, options?: Editor.Model); + constructor(element: Element, options?: Editor.Model); + model:Editor.Model; + defaults:Editor.Model; + + /** destroy the editor widgets all events are unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the corresponding Editors + * @returns {void} + */ + disable(): void; + + /** To enable the corresponding Editors + * @returns {void} + */ + enable(): void; + + /** To get value from corresponding Editors + * @returns {number} + */ + getValue(): number; +} + + class NumericTextbox extends Editor{ +} + + class CurrencyTextbox extends Editor{ +} + + class PercentageTextbox extends Editor{ +} +export module Editor{ + +export interface Model { + + /**Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /**DecimalPlaces declares the number of digits to be displayed right side of the value. + * @Default {0} + */ + decimalPlaces?: number; + + /**Specify the editor control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the enablePersistence to editor to save current model value to browser cookies for state maintains + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left Direction to editor. + * @Default {false} + */ + enableRTL?: boolean; + + /**Strict mode option to restrict entering values defined outside the range in the editor. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**It provides the options to get the customized character to separate the digits. If not set, the separator defined by the current culture. + * @Default {null} + */ + groupSeparator?: string; + + /**Specifies the height of the editor. + * @Default {30} + */ + height?: number|string; + + /**It allows to define the characteristics of the Editors control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**The Editor value increment or decrement based an increment step value. + * @Default {1} + */ + incrementStep?: number; + + /**Specifies the Localization info used by the editor. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the maximum value of the editor. + * @Default {Number.MAX_VALUE} + */ + maxValue?: number; + + /**Specifies the minimum value of the editor. + * @Default {-(Number.MAX_VALUE) and 0 for Currency Textbox.} + */ + minValue?: number; + + /**Specifies the name of the editor. + * @Default {Sets id as name if it is null.} + */ + name?: string; + + /**Toggles the readonly state of the editor. When the Editor is readonly it doesn't allow user interactions. + * @Default {false} + */ + readOnly?: boolean; + + /**Specify the rounded corner to editor + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies whether the up and down spin buttons should be displayed in editor. + * @Default {true} + */ + showSpinButton?: boolean; + + /**Enables decimal separator position validation on type . + * @Default {false} + */ + validateOnType?: boolean; + + /**Set the jQuery validation error message in editor. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jQuery validation rules to the editor. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value of the editor. + * @Default {null} + */ + value?: number|string; + + /**Specify the watermark text to editor. + */ + watermarkText?: string; + + /**Specifies the width of the editor. + * @Default {143} + */ + width?: number|string; + + /**Fires after Editor control value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Fires after Editor control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Editor is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires after Editor control is focused.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires after Editor control is loss the focus.*/ + focusOut? (e: FocusOutEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the corresponding editor model. + */ + model ?: ej.Editor.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the corresponding editor control value. + */ + value ?: number; + + /**returns true when the value changed by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the editor model + */ + model ?: ej.Editor.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the editor model + */ + model ?: ej.Editor.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the corresponding editor control value. + */ + value?: number; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the corresponding editor control value. + */ + value?: number; +} +} + +class ListView extends ej.Widget { + static fn: ListView; + constructor(element: JQuery, options?: ListView.Model); + constructor(element: Element, options?: ListView.Model); + model:ListView.Model; + defaults:ListView.Model; + + /** To add item in the given index. + * @param {string} Specifies the item to be added in ListView + * @param {number} Specifies the index where item to be added + * @returns {void} + */ + addItem(item: string, index: number): void; + + /** To check all the items. + * @returns {void} + */ + checkAllItem(): void; + + /** To check item in the given index. + * @param {number} Specifies the index of the item to be checked + * @returns {void} + */ + checkItem(index: number): void; + + /** To clear all the list item in the control before updating with new datasource. + * @returns {void} + */ + clear(): void; + + /** To make the item in the given index to be default state. + * @param {number} Specifies the index to make the item to be in default state. + * @returns {void} + */ + deActive(index: number): void; + + /** To disable item in the given index. + * @param {number} Specifies the index value to be disabled. + * @returns {void} + */ + disableItem(index: number): void; + + /** To enable item in the given index. + * @param {number} Specifies the index value to be enabled. + * @returns {void} + */ + enableItem(index: number): void; + + /** To get the active item. + * @returns {HTMLElement} + */ + getActiveItem(): HTMLElement; + + /** To get the text of the active item. + * @returns {string} + */ + getActiveItemText(): string; + + /** To get all the checked items. + * @returns {Array} + */ + getCheckedItems(): Array; + + /** To get the text of all the checked items. + * @returns {Array} + */ + getCheckedItemsText(): Array; + + /** To get the total item count. + * @returns {number} + */ + getItemsCount(): number; + + /** To get the text of the item in the given index. + * @param {string|number} Specifies the index value to get the textvalue. + * @returns {string} + */ + getItemText(index: string|number): string; + + /** To check whether the item in the given index has child item. + * @param {number} Specifies the index value to check the item has child or not. + * @returns {boolean} + */ + hasChild(index: number): boolean; + + /** To hide the list. + * @returns {void} + */ + hide(): void; + + /** To hide item in the given index. + * @param {number} Specifies the index value to hide the item. + * @returns {void} + */ + hideItem(index: number): void; + + /** To check whether item in the given index is checked. + * @returns {boolean} + */ + isChecked(): boolean; + + /** To load the ajax content while selecting the item. + * @param {string} Specifies the item to load the ajax content. + * @returns {void} + */ + loadAjaxContent(item: string): void; + + /** To remove the check mark either for specific item in the given index or for all items. + * @param {number} Specifies the index value to remove the checkbox. + * @returns {void} + */ + removeCheckMark(index: number): void; + + /** To remove item in the given index. + * @param {number} Specifies the index value to remove the item. + * @returns {void} + */ + removeItem(index: number): void; + + /** To select item in the given index. + * @param {number} Specifies the index value to select the item. + * @returns {void} + */ + selectItem(index: number): void; + + /** To make the item in the given index to be active state. + * @param {number} Specifies the index value to make the item in active state. + * @returns {void} + */ + setActive(index: number): void; + + /** To show the list. + * @returns {void} + */ + show(): void; + + /** To show item in the given index. + * @param {number} Specifies the index value to show the hided item. + * @returns {void} + */ + showItem(index: number): void; + + /** To uncheck all the items. + * @returns {void} + */ + unCheckAllItem(): void; + + /** To uncheck item in the given index. + * @param {number} Specifies the index value to uncheck the item. + * @returns {void} + */ + unCheckItem(index: number): void; +} +export module ListView{ + +export interface Model { + + /**Sets the root class for ListView theme. This cssClass API helps to use custom skinning option for ListView control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssClass?: string; + + /**Contains the list of data for generating the ListView items. + * @Default {[]} + */ + dataSource?: Array; + + /**Specifies whether to load ajax content while selecting item. + * @Default {false} + */ + enableAjax?: boolean; + + /**Specifies whether to enable caching the content. + * @Default {false} + */ + enableCache?: boolean; + + /**Specifies whether to enable check mark for the item. + * @Default {false} + */ + enableCheckMark?: boolean; + + /**Specifies whether to enable the filtering feature to filter the item. + * @Default {false} + */ + enableFiltering?: boolean; + + /**Specifies whether to group the list item. + * @Default {false} + */ + enableGroupList?: boolean; + + /**Specifies to maintain the current model value to browser cookies for state maintenance. While refresh the page, the model value will get apply to the control from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specifies the field settings to map the datasource. + */ + fieldSettings?: any; + + /**Specifies the text of the back button in the header. + * @Default {null} + */ + headerBackButtonText?: string; + + /**Specifies the title of the header. + * @Default {Title} + */ + headerTitle?: string; + + /**Specifies the height. + * @Default {null} + */ + height?: number; + + /**Specifies whether to retain the selection of the item. + * @Default {false} + */ + persistSelection?: boolean; + + /**Specifies whether to prevent the selection of the item. + * @Default {false} + */ + preventSelection?: boolean; + + /**Specifies the query to execute with the datasource. + * @Default {null} + */ + query?: any; + + /**Specifies whether need to render the control with the template contents. + * @Default {false} + */ + renderTemplate?: boolean; + + /**Specifies the index of item which need to be in selected state initially while loading. + * @Default {0} + */ + selectedItemIndex?: number; + + /**Specifies whether to show the header. + * @Default {true} + */ + showHeader?: boolean; + + /**Specifies ID of the element contains template contents. + * @Default {false} + */ + templateId?: boolean; + + /**Specifies the width. + * @Default {null} + */ + width?: number; + + /**Event triggers before the ajax request happens.*/ + ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + + /**Event triggers after the ajax content loaded completely.*/ + ajaxComplete? (e: AjaxCompleteEventArgs): void; + + /**Event triggers when the ajax request failed.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**Event triggers after the ajax content loaded successfully.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**Event triggers before the items loaded.*/ + load? (e: LoadEventArgs): void; + + /**Event triggers after the items loaded.*/ + loadComplete? (e: LoadCompleteEventArgs): void; + + /**Event triggers when mouse down happens on the item.*/ + mouseDown? (e: MouseDownEventArgs): void; + + /**Event triggers when mouse up happens on the item.*/ + mouseUP? (e: MouseUPEventArgs): void; +} + +export interface AjaxBeforeLoadEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**returns the ajax settings. + */ + ajaxData?: any; +} + +export interface AjaxCompleteEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; +} + +export interface AjaxErrorEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**returns the error thrown in the ajax post. + */ + errorThrown?: any; + + /**returns the status. + */ + textStatus?: any; + + /**returns the current list item. + */ + item?: any; + + /**returns the current item text. + */ + text?: string; + + /**returns the current item index. + */ + index?: number; +} + +export interface AjaxSuccessEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**returns the ajax current content. + */ + content?: string; + + /**returns the current list item. + */ + item?: any; + + /**returns the current item text. + */ + text?: string; + + /**returns the current item index. + */ + index?: number; + + /**returns the current url of the ajax post. + */ + url?: string; +} + +export interface LoadEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; +} + +export interface LoadCompleteEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; +} + +export interface MouseDownEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**If the child element exist return true; otherwise, false. + */ + hasChild?: boolean; + + /**returns the current list item. + */ + item?: string; + + /**returns the current text of item. + */ + text?: string; + + /**returns the current Index of the item. + */ + index?: number; + + /**If checked return true; otherwise, false. + */ + isChecked?: boolean; + + /**returns the list of checked items. + */ + checkedItems?: number; + + /**returns the current checked item text. + */ + checkedItemsText?: string; +} + +export interface MouseUPEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**If the child element exist return true; otherwise, false. + */ + hasChild?: boolean; + + /**returns the current list item. + */ + item?: string; + + /**returns the current text of item. + */ + text?: string; + + /**returns the current Index of the item. + */ + index?: number; + + /**If checked return true; otherwise, false. + */ + isChecked?: boolean; + + /**returns the list of checked items. + */ + checkedItems?: number; + + /**returns the current checked item text. + */ + checkedItemsText?: string; +} +} + +class MaskEdit extends ej.Widget { + static fn: MaskEdit; + constructor(element: JQuery, options?: MaskEdit.Model); + constructor(element: Element, options?: MaskEdit.Model); + model:MaskEdit.Model; + defaults:MaskEdit.Model; + + /** To clear the text in mask edit textbox control. + * @returns {void} + */ + clear(): void; + + /** To disable the mask edit textbox control. + * @returns {void} + */ + disable(): void; + + /** To enable the mask edit textbox control. + * @returns {void} + */ + enable(): void; + + /** To obtained the pure value of the text value, removes all the symbols in mask edit textbox control. + * @returns {string} + */ + get_StrippedValue(): string; + + /** To obtained the textbox value as such that, Just replace all '_' to ' '(space) in mask edit textbox control. + * @returns {string} + */ + get_UnstrippedValue(): string; +} +export module MaskEdit{ + +export interface Model { + + /**Specify the cssClass to achieve custom theme. + * @Default {null} + */ + cssClass?: string; + + /**Specify the custom character allowed to entered in mask edit textbox control. + * @Default {null} + */ + customCharacter?: string; + + /**Specify the state of the mask edit textbox control. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the enablePersistence to mask edit textbox to save current model value to browser cookies for state maintains. + */ + enablePersistence?: boolean; + + /**Specifies the height for the mask edit textbox control. + * @Default {28 px} + */ + height?: string; + + /**Specifies whether hide the prompt characters with spaces on blur. Prompt chars will be shown again on focus the textbox. + * @Default {false} + */ + hidePromptOnLeave?: boolean; + + /**Specifies the list of html attributes to be added to mask edit textbox. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specify the inputMode for mask edit textbox control. See InputMode + * @Default {ej.InputMode.Text} + */ + inputMode?: ej.InputMode|string; + + /**Specifies the input mask. + * @Default {null} + */ + maskFormat?: string; + + /**Specifies the name attribute value for the mask edit textbox. + * @Default {null} + */ + name?: string; + + /**Toggles the readonly state of the mask edit textbox. When the mask edit textbox is readonly, it doesn't allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /**Specifies whether the error will show until correct value entered in the mask edit textbox control. + * @Default {false} + */ + showError?: boolean; + + /**MaskEdit input is displayed in rounded corner style when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specify the text alignment for mask edit textbox control.See TextAlign + * @Default {left} + */ + textAlign?: ej.TextAlign|string; + + /**Sets the jQuery validation error message in mask edit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. + * @Default {null} + */ + validationMessage?: any; + + /**Sets the jQuery validation rules to the MaskEdit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value for the mask edit textbox control. + * @Default {null} + */ + value?: string; + + /**Specifies the water mark text to be displayed in input text. + * @Default {null} + */ + watermarkText?: string; + + /**Specifies the width for the mask edit textbox control. + * @Default {143pixel} + */ + width?: string; + + /**Fires when value changed in mask edit textbox control.*/ + change? (e: ChangeEventArgs): void; + + /**Fires after MaskEdit control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the MaskEdit is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when focused in mask edit textbox control.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when focused out in mask edit textbox control.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when keydown in mask edit textbox control.*/ + keydown? (e: KeydownEventArgs): void; + + /**Fires when key press in mask edit textbox control.*/ + keyPress? (e: KeyPressEventArgs): void; + + /**Fires when keyup in mask edit textbox control.*/ + keyup? (e: KeyupEventArgs): void; + + /**Fires when mouse out in mask edit textbox control.*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Fires when mouse over in mask edit textbox control.*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the MaskEdit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the MaskEdit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface KeydownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface KeyPressEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface KeyupEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface MouseoutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface MouseoverEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} +} +enum InputMode +{ +//string +Password, +//string +Text, +} +enum TextAlign +{ +//string +Center, +//string +Justify, +//string +Left, +//string +Right, +} + +class Menu extends ej.Widget { + static fn: Menu; + constructor(element: JQuery, options?: Menu.Model); + constructor(element: Element, options?: Menu.Model); + model:Menu.Model; + defaults:Menu.Model; + + /** Disables the Menu control. + * @returns {void} + */ + disable(): void; + + /** Specifies the Menu Item to be disabled by using the Menu Item Text. + * @param {string} Specifies the Menu Item Text to be disabled. + * @returns {void} + */ + disableItem(itemtext: string): void; + + /** Specifies the Menu Item to be disabled by using the Menu Item Id. + * @param {string|number} Specifies the Menu Item id to be disabled + * @returns {void} + */ + disableItembyID(itemid: string|number): void; + + /** Enables the Menu control. + * @returns {void} + */ + enable(): void; + + /** Specifies the Menu Item to be enabled by using the Menu Item Text. + * @param {string} Specifies the Menu Item Text to be enabled. + * @returns {void} + */ + enableItem(itemtext: string): void; + + /** Specifies the Menu Item to be enabled by using the Menu Item Id. + * @param {string|number} Specifies the Menu Item id to be enabled. + * @returns {void} + */ + enableItembyID(itemid: string|number): void; + + /** Hides the Context Menu control. + * @returns {void} + */ + hide(): void; + + /** Insert the menu item as child of target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insert(item: any, target: string|any): void; + + /** Insert the menu item after the target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insertAfter(item: any, target: string|any): void; + + /** Insert the menu item before the target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insertBefore(item: any, target: string|any): void; + + /** Remove Menu item. + * @param {any|Array} Selector of target node or Object of target node. + * @returns {void} + */ + remove(target: any|Array): void; + + /** To show the Menu control. + * @param {number} x co-ordinate position of context menu. + * @param {number} y co-ordinate position of context menu. + * @param {any} target element + * @param {any} name of the event + * @returns {void} + */ + show(locationX: number, locationY: number, targetElement: any, event: any): void; +} +export module Menu{ + +export interface Model { + + /**To enable or disable the Animation while hover or click an menu items.See AnimationType + * @Default {ej.AnimationType.Default} + */ + animationType?: ej.AnimationType|string; + + /**Specifies the target id of context menu. On right clicking the specified contextTarget element, context menu gets shown. + * @Default {null} + */ + contextMenuTarget?: string; + + /**Specify the CSS class to achieve custom theme. + */ + cssClass?: string; + + /**To enable or disable the Animation effect while hover or click an menu items. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the root menu items to be aligned center in horizontal menu. + * @Default {false} + */ + enableCenterAlign?: boolean; + + /**Enable / Disable the Menu control. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the menu items to be displayed in right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**When this property sets to false, the menu items is displayed without any separators. + * @Default {true} + */ + enableSeparator?: boolean; + + /**Specifies the target which needs to be excluded. i.e., The context menu will not be displayed in those specified targets. + * @Default {null} + */ + excludeTarget?: string; + + /**Fields used to bind the data source and it includes following field members to make databind easier. + * @Default {null} + */ + fields?: Fields; + + /**Specifies the height of the root menu. + * @Default {auto} + */ + height?: string|number; + + /**Specifies the list of html attributes to be added to menu control. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the type of the menu. Essential JavaScript Menu consists of two type of menu, they are Normal Menu and Context Menu mode.See MenuType + * @Default {ej.MenuType.NormalMenu} + */ + menuType?: string|ej.MenuType; + + /**Specifies the sub menu items to be show or open only on click. + * @Default {false} + */ + openOnClick?: boolean; + + /**Specifies the orientation of normal menu. Normal menu can rendered in horizontal or vertical direction by using this API. See Orientation + * @Default {ej.Orientation.Horizontal} + */ + orientation?: string|ej.Orientation; + + /**Specifies the main menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showRooltLevelArrows?: boolean; + + /**Specifies the sub menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showSubLevelArrows?: boolean; + + /**Specifies position of pulldown submenus that will appear on mouse over.See Direction + * @Default {ej.Direction.Right} + */ + subMenuDirection?: string|ej.Direction; + + /**Specifies the title to responsive menu. + * @Default {Menu} + */ + titleText?: string; + + /**Specifies the width of the main menu. + * @Default {auto} + */ + width?: string|number; + + /**Fires before context menu gets open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when mouse click on menu items.*/ + click? (e: ClickEventArgs): void; + + /**Fire when context menu on close.*/ + close? (e: CloseEventArgs): void; + + /**Fires when context menu on open.*/ + open? (e: OpenEventArgs): void; + + /**Fires to create menu items.*/ + create? (e: CreateEventArgs): void; + + /**Fires to destroy menu items.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when key down on menu items.*/ + keydown? (e: KeydownEventArgs): void; + + /**Fires when mouse out from menu items.*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Fires when mouse over the Menu items.*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface BeforeOpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target element + */ + target?: any; +} + +export interface ClickEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + text?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; + + /**returns the selected item + */ + selectedItem?: number; +} + +export interface CloseEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target element + */ + target?: any; +} + +export interface OpenEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target element + */ + target?: any; +} + +export interface CreateEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface KeydownEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + menuText?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface MouseoutEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + text?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface MouseoverEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + text?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface Fields { + + /**It receives the child data for the inner level. + */ + child?: any; + + /**It receives datasource as Essential DataManager object and JSON object. + */ + dataSource?: any; + + /**Specifies the html attributes to “li” item list. + */ + htmlAttribute?: string; + + /**Specifies the id to menu items list + */ + id?: string; + + /**Specifies the image attribute to “img” tag inside items list. + */ + imageAttribute?: string; + + /**Specifies the image URL to “img” tag inside item list. + */ + imageUrl?: string; + + /**Adds custom attributes like "target" to the anchor tag of the menu items. + */ + linkAttribute?: string; + + /**Specifies the parent id of the table. + */ + parentId?: string; + + /**It receives query to retrieve data from the table (query is same as SQL). + */ + query?: any; + + /**Specifies the sprite CSS class to “li” item list. + */ + spriteCssClass?: string; + + /**It receives table name to execute query on the corresponding table. + */ + tableName?: string; + + /**Specifies the text of menu items list. + */ + text?: string; + + /**Specifies the url to the anchor tag in menu item list. + */ + url?: string; +} +} +enum AnimationType +{ +//string +Default, +//string +None, +} +enum MenuType +{ +//string +ContextMenu, +//string +NormalMenu, +} +enum Direction +{ +//string +Left, +//string +None, +//string +Right, +} + +class Pager extends ej.Widget { + static fn: Pager; + constructor(element: JQuery, options?: Pager.Model); + constructor(element: Element, options?: Pager.Model); + model:Pager.Model; + defaults:Pager.Model; + + /** Send a paging request to specified page through the pagerControl. + * @returns {void} + */ + gotoPage(): void; +} +export module Pager{ + +export interface Model { + + /**Gets or sets a value that indicates whether to define the number of records displayed per page. + * @Default {12} + */ + pageSize?: number; + + /**Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation. + * @Default {10} + */ + pageCount?: number; + + /**Gets or sets a value that indicates whether to define which page to display currently in pager. + * @Default {1} + */ + currentPage?: number; + + /**Get or sets a value of total number of pages in the pager. The totalPages value is calculated based on pagesize and totalrecords. + * @Default {null} + */ + totalPages?: number; + + /**Get the value of total number of records which is bound to a data item. + * @Default {null} + */ + totalRecordsCount?: number; + + /**Gets or sets a value that indicates whether to pass the current page information as a query string along with the url while navigating to other page. + * @Default {false} + */ + enableQueryString?: boolean; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Align content in the pager control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**Triggered when pager numeric item is clicked in pager control.*/ + click? (e: ClickEventArgs): void; +} + +export interface ClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current page index. + */ + currentPage?: number; + + /**Returns the pager model. + */ + model?: any; + + /**Returns the name of event + */ + type?: string; + + /**Returns current action event type and its target. + */ + event?: any; +} +} + +class ProgressBar extends ej.Widget { + static fn: ProgressBar; + constructor(element: JQuery, options?: ProgressBar.Model); + constructor(element: Element, options?: ProgressBar.Model); + model:ProgressBar.Model; + defaults:ProgressBar.Model; + + /** Destroy the progressbar widget + * @returns {void} + */ + destroy(): void; + + /** Disables the progressbar control + * @returns {void} + */ + disable(): void; + + /** Enables the progressbar control + * @returns {void} + */ + enable(): void; + + /** Returns the current progress value in percent. + * @returns {number} + */ + getPercentage(): number; + + /** Returns the current progress value + * @returns {number} + */ + getValue(): number; +} +export module ProgressBar{ + +export interface Model { + + /**Sets the root CSS class for ProgressBar theme, which is used customize. + * @Default {null} + */ + cssClass?: string; + + /**When this property sets to false, it disables the ProgressBar control + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for state maintains. While refresh the progressBar control page retains the model value apply from browser cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /**Sets the ProgressBar direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**Defines the height of the ProgressBar. + * @Default {null} + */ + height?: number|string; + + /**It allows to define the characteristics of the progressBar control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the maximum value of the ProgressBar. + * @Default {100} + */ + maxValue?: number; + + /**Sets the minimum value of the ProgressBar. + * @Default {0} + */ + minValue?: number; + + /**Sets the ProgressBar value in percentage. The value should be in between 0 to 100. + * @Default {0} + */ + percentage?: number; + + /**Displays rounded corner borders on the progressBar control. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Sets the custom text for the ProgressBar. The text placed in the middle of the ProgressBar and it can be customizable using the class 'e-progress-text'. + * @Default {null} + */ + text?: string; + + /**Sets the ProgressBar value. The value should be in between min and max values. + * @Default {0} + */ + value?: number; + + /**Defines the width of the ProgressBar. + * @Default {null} + */ + width?: number|string; + + /**Event triggers when the progress value changed*/ + change? (e: ChangeEventArgs): void; + + /**Event triggers when the process completes (at 100%)*/ + complete? (e: CompleteEventArgs): void; + + /**Event triggers when the progressbar are created*/ + create? (e: CreateEventArgs): void; + + /**Event triggers when the progressbar are destroyed*/ + destroy? (e: DestroyEventArgs): void; + + /**Event triggers when the process starts (from 0%)*/ + start? (e: StartEventArgs): void; +} + +export interface ChangeEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /**returns the current progress percentage + */ + percentage?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the current progress value + */ + value?: string; +} + +export interface CompleteEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /**returns the current progress percentage + */ + percentage?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the current progress value + */ + value?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the progressbar model + */ + model?: ej.ProgressBar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the progressbar model + */ + model?: ej.ProgressBar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface StartEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /**returns the current progress percentage + */ + percentage?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the current progress value + */ + value?: string; +} +} + +class RadioButton extends ej.Widget { + static fn: RadioButton; + constructor(element: JQuery, options?: RadioButton.Model); + constructor(element: Element, options?: RadioButton.Model); + model:RadioButton.Model; + defaults:RadioButton.Model; + + /** To disable the RadioButton + * @returns {void} + */ + disable(): void; + + /** To enable the RadioButton + * @returns {void} + */ + enable(): void; +} +export module RadioButton{ + +export interface Model { + + /**Specifies the check attribute of the Radio Button. + * @Default {false} + */ + checked?: boolean; + + /**Specify the CSS class to RadioButton to achieve custom theme. + */ + cssClass?: string; + + /**Specifies the RadioButton control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the enablePersistence property for RadioButton while initialization. The enablePersistence API save current model value to browser cookies for state maintains. While refreshing the radio button control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left direction to RadioButton + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the HTML Attributes of the Checkbox + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the id attribute for the Radio Button while initialization. + * @Default {null} + */ + id?: string; + + /**Specify the idPrefix value to be added before the current id of the RadioButton. + * @Default {ej} + */ + idPrefix?: string; + + /**Specifies the name attribute for the Radio Button while initialization. + * @Default {Sets id as name if it is null} + */ + name?: string; + + /**Specifies the size of the RadioButton. + * @Default {small} + */ + size?: ej.RadioButtonSize|string; + + /**Specifies the text content for RadioButton. + */ + text?: string; + + /**Set the jquery validation error message in radio button. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jquery validation rules in radio button. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value attribute of the Radio Button. + * @Default {null} + */ + value?: string; + + /**Fires before the RadioButton is going to changed its state successfully*/ + beforeChange? (e: BeforeChangeEventArgs): void; + + /**Fires when the RadioButton state is changed successfully*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the RadioButton created successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires when the RadioButton destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface BeforeChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns true if element is checked, otherwise returns false + */ + isChecked?: boolean; + + /**returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns true if element is checked, otherwise returns false + */ + isChecked?: boolean; + + /**returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum RadioButtonSize +{ +//Shows small size radio button +Small, +//Shows medium size radio button +Medium, +} + +class Rating extends ej.Widget { + static fn: Rating; + constructor(element: JQuery, options?: Rating.Model); + constructor(element: Element, options?: Rating.Model); + model:Rating.Model; + defaults:Rating.Model; + + /** Destroy the Rating widget all events bound will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To get the current value of rating control. + * @returns {number} + */ + getValue(): number; + + /** To hide the rating control. + * @returns {void} + */ + hide(): void; + + /** User can refresh the rating control to identify changes. + * @returns {void} + */ + refresh(): void; + + /** To reset the rating value. + * @returns {void} + */ + reset(): void; + + /** To set the rating value. + * @param {string|number} Specifies the rating value. + * @returns {void} + */ + setValue(value: string|number): void; + + /** To show the rating control + * @returns {void} + */ + show(): void; +} +export module Rating{ + +export interface Model { + + /**Enables the rating control with reset button.It can be used to reset the rating control value. + * @Default {true} + */ + allowReset?: boolean; + + /**Specify the CSS class to achieve custom theme. + */ + cssClass?: string; + + /**When this property is set to false, it disables the rating control. + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specifies the height of the Rating control wrapper. + * @Default {null} + */ + height?: string; + + /**Specifies the value to be increased while navigating between shapes(stars) in Rating control. + * @Default {1} + */ + incrementStep?: number; + + /**Allow to render the maximum number of Rating shape(star). + * @Default {5} + */ + maxValue?: number; + + /**Allow to render the minimum number of Rating shape(star). + * @Default {0} + */ + minValue?: number; + + /**Specifies the orientation of Rating control. See Orientation + * @Default {ej.Rating.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Helps to provide more precise ratings.Rating control supports three precision modes - full, half, and exact. See Precision + * @Default {full} + */ + precision?: ej.Rating.Precision|string; + + /**Interaction with Rating control can be prevented by enabling this API. + * @Default {false} + */ + readOnly?: boolean; + + /**To specify the height of each shape in Rating control. + * @Default {23} + */ + shapeHeight?: number; + + /**To specify the width of each shape in Rating control. + * @Default {23} + */ + shapeWidth?: number; + + /**Enables the tooltip option.Currently selected value will be displayed in tooltip. + * @Default {true} + */ + showTooltip?: boolean; + + /**To specify the number of stars to be selected while rendering. + * @Default {1} + */ + value?: number; + + /**Specifies the width of the Rating control wrapper. + * @Default {null} + */ + width?: string; + + /**Fires when Rating value changes.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when Rating control is clicked successfully.*/ + click? (e: ClickEventArgs): void; + + /**Fires when Rating control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when Rating control is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when mouse hover is removed from Rating control.*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Fires when mouse hovered over the Rating control.*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface ChangeEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; +} + +export interface ClickEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseoutEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; +} + +export interface MouseoverEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; + + /**returns the current index value. + */ + index?: any; +} + +enum Precision{ + + ///string + Exact, + + ///string + Full, + + ///string + Half +} + +} + +class Ribbon extends ej.Widget { + static fn: Ribbon; + constructor(element: JQuery, options?: Ribbon.Model); + constructor(element: Element, options?: Ribbon.Model); + model:Ribbon.Model; + defaults:Ribbon.Model; + + /** Adds contextual tab or contextual tab set dynamically in the ribbon control with contextual tabs object and index position. When index is null, ribbon contextual tab or contextual tab set is added at the last index. + * @param {any} contextual tab or contextual tab set object. + * @param {number} index of the contextual tab or contextual tab set, this is optional. + * @returns {void} + */ + addContextualTabs(contextualTabSet: any, index: number): void; + + /** Adds tab dynamically in the ribbon control with given name, tab group array and index position. When index is null, ribbon tab is added at the last index. + * @param {string} ribbon tab display text. + * @param {Array} groups to be displayed in ribbon tab . + * @param {number} index of the ribbon tab,this is optional. + * @returns {void} + */ + addTab(tabText: string, ribbonGroups: Array, index: number): void; + + /** Adds tab group dynamically in the ribbon control with given tab index, tab group object and group index position. When group index is null, ribbon group is added at the last index. + * @param {number} ribbon tab index. + * @param {any} group to be displayed in ribbon tab . + * @param {number} index of the ribbon group,this is optional. + * @returns {void} + */ + addTabGroup(tabIndex: number, tabGroup: any, groupIndex: number): void; + + /** Adds group content dynamically in the ribbon control with given tab index, group index, sub group index, content and content index position. When content index is null, content is added at the last index. + * @param {number} ribbon tab index. + * @param {number} ribbon group index. + * @param {number} sub group index in the ribbon group, + * @param {any} content to be displayed in the ribbon group. + * @param {number} ribbon content index .this is optional. + * @returns {void} + */ + addTabGroupContent(tabIndex: number, groupIndex: number, subGroupIndex: number, content: any, contentIndex: number): void; + + /** Hides the ribbon backstage page. + * @returns {void} + */ + hideBackstage(): void; + + /** Collapses the ribbon tab content. + * @returns {void} + */ + collapse(): void; + + /** Destroys the ribbon widget. All the events bound using this._on are unbound automatically and the ribbon control is moved to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Expands the ribbon tab content. + * @returns {void} + */ + expand(): void; + + /** Gets text of the given index tab in the ribbon control. + * @param {number} index of the tab item. + * @returns {string} + */ + getTabText(index: number): string; + + /** Hides the given text tab in the ribbon control. + * @param {string} text of the tab item. + * @returns {void} + */ + hideTab(string: string): void; + + /** Checks whether the given text tab in the ribbon control is enabled or not. + * @param {string} text of the tab item. + * @returns {boolean} + */ + isEnable(string: string): boolean; + + /** Checks whether the given text tab in the ribbon control is visible or not. + * @param {string} text of the tab item. + * @returns {boolean} + */ + isVisible(string: string): boolean; + + /** Removes the given index tab item from the ribbon control. + * @param {number} index of tab item. + * @returns {void} + */ + removeTab(index: number): void; + + /** Sets new text to the given text tab in the ribbon control. + * @param {string} current text of the tab item. + * @param {string} new text of the tab item. + * @returns {void} + */ + setTabText(tabText: string, newText: string): void; + + /** Displays the ribbon backstage page. + * @returns {void} + */ + showBackstage(): void; + + /** Displays the given text tab in the ribbon control. + * @param {string} text of the tab item. + * @returns {void} + */ + showTab(string: string): void; +} +export module Ribbon{ + +export interface Model { + + /**Enables the ribbon resize feature. + * @Default {false} + */ + allowResizing?: boolean; + + /**Specifies the height, width, enableRTL, showRoundedCorner,enabled,cssClass property to the controls in the ribbon commonly andit will work only when those properties are not defined in buttonSettings and content defaults. + * @Default {object} + */ + buttonDefaults?: any; + + /**Property to enable the ribbon quick access toolbar. + * @Default {false} + */ + showQAT?: boolean; + + /**Sets custom setting to the collapsible pin in the ribbon. + * @Default {Object} + */ + collapsePinSettings?: CollapsePinSettings; + + /**Sets custom setting to the expandable pin in the ribbon. + * @Default {Object} + */ + expandPinSettings?: ExpandPinSettings; + + /**Specifies the application tab to contain application menu or backstage page in the ribbon control. + * @Default {Object} + */ + applicationTab?: ApplicationTab; + + /**Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs into the contextual tab and contextual tab set. + * @Default {array} + */ + contextualTabs?: Array; + + /**Specifies the index or indexes to disable the given index tab or indexes tabs in the ribbon control. + * @Default {0} + */ + disabledItemIndex?: Array; + + /**Specifies the index or indexes to enable the given index tab or indexes tabs in the ribbon control. + * @Default {null} + */ + enabledItemIndex?: Array; + + /**Specifies the index of the ribbon tab to select the given index tab item in the ribbon control. + * @Default {1} + */ + selectedItemIndex?: number; + + /**Specifies the tabs and its groups. Also specifies the control details that has to be placed in the tab area in the ribbon control. + * @Default {array} + */ + tabs?: Array; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region and it will need to use the user's preference. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the width to the ribbon control. You can set width in string or number format. + * @Default {null} + */ + width?: string|number; + + /**Triggered before the ribbon tab item is removed.*/ + beforeTabRemove? (e: BeforeTabRemoveEventArgs): void; + + /**Triggered before the ribbon control is created.*/ + create? (e: CreateEventArgs): void; + + /**Triggered before the ribbon control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered when the control in the group is clicked successfully.*/ + groupClick? (e: GroupClickEventArgs): void; + + /**Triggered when the groupexpander in the group is clicked successfully.*/ + groupExpand? (e: GroupExpandEventArgs): void; + + /**Triggered when an item in the Gallery control is clicked successfully.*/ + galleryItemClick? (e: GalleryItemClickEventArgs): void; + + /**Triggered when a tab or button in the backstage page is clicked successfully.*/ + backstageItemClick? (e: BackstageItemClickEventArgs): void; + + /**Triggered when the ribbon control is collapsed.*/ + collapse? (e: CollapseEventArgs): void; + + /**Triggered when the ribbon control is expanded.*/ + expand? (e: ExpandEventArgs): void; + + /**Triggered after adding the new ribbon tab item.*/ + tabAdd? (e: TabAddEventArgs): void; + + /**Triggered when tab is clicked successfully in the ribbon control.*/ + tabClick? (e: TabClickEventArgs): void; + + /**Triggered before the ribbon tab is created.*/ + tabCreate? (e: TabCreateEventArgs): void; + + /**Triggered after the tab item is removed from the ribbon control.*/ + tabRemove? (e: TabRemoveEventArgs): void; + + /**Triggered after the ribbon tab item is selected in the ribbon control.*/ + tabSelect? (e: TabSelectEventArgs): void; + + /**Triggered when the expand/collapse button is clicked successfully .*/ + toggleButtonClick? (e: ToggleButtonClickEventArgs): void; + + /**Triggered when the QAT menu item is clicked successfully .*/ + qatMenuItemClick? (e: QatMenuItemClickEventArgs): void; +} + +export interface BeforeTabRemoveEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns current tab item index in the ribbon control. + */ + index?: number; +} + +export interface CreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns current ribbon tab item index + */ + deleteIndex?: number; +} + +export interface GroupClickEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the control clicked in the group. + */ + target?: number; +} + +export interface GroupExpandEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the clicked groupexpander. + */ + target?: number; +} + +export interface GalleryItemClickEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the gallery model. + */ + galleryModel?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the item clicked in the gallery. + */ + target?: number; +} + +export interface BackstageItemClickEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the item clicked in the gallery. + */ + target?: number; + + /**returns the id of the target item. + */ + id?: string; + + /**returns the text of the target item. + */ + text?: string; +} + +export interface CollapseEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ExpandEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface TabAddEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns new added tab header. + */ + tabHeader?: any; + + /**returns new added tab content panel. + */ + tabContent?: any; +} + +export interface TabClickEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: any; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: any; + + /**returns current active index. + */ + activeIndex?: number; +} + +export interface TabCreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns current ribbon tab item index + */ + deleteIndex?: number; +} + +export interface TabRemoveEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the removed index. + */ + removedIndex?: number; +} + +export interface TabSelectEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: any; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: any; + + /**returns current active index. + */ + activeIndex?: number; +} + +export interface ToggleButtonClickEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the expand/collapse button. + */ + target?: number; +} + +export interface QatMenuItemClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the clicked menu item text. + */ + text?: string; +} + +export interface CollapsePinSettings { + + /**Sets tooltip for the collapse pin . + * @Default {null} + */ + toolTip?: string; + + /**Specifies the custom tooltip for collapse pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; +} + +export interface ExpandPinSettings { + + /**Sets tooltip for the expand pin. + * @Default {null} + */ + toolTip?: string; + + /**Specifies the custom tooltip for expand pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; +} + +export interface ApplicationTabBackstageSettingsPages { + + /**Specifies the id for ribbon backstage page's tab and button elements. + * @Default {null} + */ + id?: string; + + /**Specifies the text for ribbon backstage page's tab header and button elements. + * @Default {null} + */ + text?: string; + + /**Specifies the type for ribbon backstage page's contents. Set "ej.Ribbon.backStageItemType.tab" to render the tab or "ej.Ribbon.backStageItemType.button" to render the button. + * @Default {ej.Ribbon.itemType.tab} + */ + itemType?: ej.Ribbon.itemType|string; + + /**Specifies the id of html elements like div, ul, etc., as ribbon backstage page's tab content. + * @Default {null} + */ + contentID?: string; + + /**Specifies the separator between backstage page's tab and button elements. + * @Default {false} + */ + enableSeparator?: boolean; +} + +export interface ApplicationTabBackstageSettings { + + /**Specifies the display text of application tab. + * @Default {null} + */ + text?: string; + + /**Specifies the height of ribbon backstage page. + * @Default {null} + */ + height?: string|number; + + /**Specifies the width of ribbon backstage page. + * @Default {null} + */ + width?: string|number; + + /**Specifies the ribbon backstage page with its tab and button elements. + * @Default {array} + */ + pages?: Array; + + /**Specifies the width of backstage page header that contains tabs and buttons. + * @Default {null} + */ + headerWidth?: string|number; +} + +export interface ApplicationTab { + + /**Specifies the ribbon backstage page items. + * @Default {object} + */ + backstageSettings?: ApplicationTabBackstageSettings; + + /**Specifies the ID of 'ul' list to create application menu in the ribbon control. + * @Default {null} + */ + menuItemID?: string; + + /**Specifies the menu members, events by using the menu settings for the menu in the application tab. + * @Default {object} + */ + menuSettings?: any; + + /**Specifies the application menu or backstage page. Specify the type of application tab as "ej.Ribbon.applicationTabType.menu" to render the application menu or "ej.Ribbon.applicationTabType.backstage" to render backstage page in the ribbon control. + * @Default {ej.Ribbon.applicationTabType.menu} + */ + type?: ej.Ribbon.applicationTabType|string; +} + +export interface ContextualTabs { + + /**Specifies the backgroundColor of the contextual tabs and tab set in the ribbon control. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor of the contextual tabs and tab set in the ribbon control. + * @Default {null} + */ + borderColor?: string; + + /**Specifies the tabs to present in the contextual tabs and tab set. Refer to the tabs section for adding tabs into the contextual tabs and tab set. + * @Default {array} + */ + tabs?: Array; +} + +export interface TabsGroupsContentGroupsCustomGalleryItems { + + /**Specifies the syncfusion button members, events by using buttonSettings. + * @Default {object} + */ + buttonSettings?: any; + + /**Specifies the type as ej.Ribbon.customItemType.menu or ej.Ribbon.customItemType.button to render Syncfusion button and menu. + * @Default {ej.Ribbon.customItemType.button} + */ + customItemType?: ej.Ribbon.customItemType|string; + + /**Specifies the custom tooltip for gallery extra item's button. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {object} + */ + customToolTip?: any; + + /**Specifies the UL list id to render menu as gallery extra item. + * @Default {null} + */ + menuId?: string; + + /**Specifies the Syncfusion menu members, events by using menuSettings. + * @Default {object} + */ + menuSettings?: any; + + /**Specifies the text for gallery extra item's button. + * @Default {null} + */ + text?: string; + + /**Specifies the tooltip for gallery extra item's button. + * @Default {null} + */ + toolTip?: string; +} + +export interface TabsGroupsContentGroupsCustomToolTip { + + /**Sets content to the custom tooltip. Text and html support are provided for content. + * @Default {null} + */ + content?: string; + + /**Sets icon to the custom tooltip content. + * @Default {null} + */ + prefixIcon?: string; + + /**Sets title to the custom tooltip. Text and html support are provided for title and the title is in bold for text format. + * @Default {null} + */ + title?: string; +} + +export interface TabsGroupsContentGroupsGalleryItems { + + /**Specifies the Syncfusion button members, events by using buttonSettings. + * @Default {object} + */ + buttonSettings?: any; + + /**Specifies the custom tooltip for gallery content. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {object} + */ + customToolTip?: any; + + /**Sets text for the gallery content. + * @Default {null} + */ + text?: string; + + /**Sets tooltip for the gallery content. + * @Default {null} + */ + toolTip?: string; +} + +export interface TabsGroupsContentGroups { + + /**Specifies the Syncfusion button members, events by using this buttonSettings. + * @Default {object} + */ + buttonSettings?: any; + + /**It is used to set the count of gallery contents in a row. + * @Default {null} + */ + columns?: number; + + /**Specifies the custom items such as div, table, controls as custom controls with the type "ej.Ribbon.type.custom" in the groups. + * @Default {null} + */ + contentID?: string; + + /**Specifies the css class property to apply styles to the button, split, dropdown controls in the groups. + * @Default {null} + */ + cssClass?: string; + + /**Specifies the Syncfusion button and menu as gallery extra items. + * @Default {array} + */ + customGalleryItems?: Array; + + /**Provides custom tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. Text and html support are also provided for title and content. + * @Default {Object} + */ + customToolTip?: TabsGroupsContentGroupsCustomToolTip; + + /**Specifies the Syncfusion dropdown list members, events by using this dropdownSettings. + * @Default {object} + */ + dropdownSettings?: any; + + /**Specifies the separator to the control that is in row type group. The separator separates the control from the next control in the group. Set "true" to enable the separator. + * @Default {false} + */ + enableSeparator?: boolean; + + /**Sets the count of gallery contents in a row, when the gallery is in expanded state. + * @Default {null} + */ + expandedColumns?: number; + + /**Defines each gallery content. + * @Default {array} + */ + galleryItems?: Array; + + /**Specifies the Id for button, split button, dropdown list, toggle button, gallery, custom controls in the sub groups. + * @Default {null} + */ + id?: string; + + /**Specifies the size for button, split button controls. Set "true" for big size and "false" for small size. + * @Default {null} + */ + isBig?: boolean; + + /**Sets the height of each gallery content. + * @Default {null} + */ + itemHeight?: string|number; + + /**Sets the width of each gallery content. + * @Default {null} + */ + itemWidth?: string|number; + + /**Specifies the Syncfusion split button members, events by using this splitButtonSettings. + * @Default {object} + */ + splitButtonSettings?: any; + + /**Specifies the text for button, split button, toggle button controls in the sub groups. + * @Default {null} + */ + text?: string; + + /**Specifies the Syncfusion toggle button members, events by using toggleButtonSettings. + * @Default {object} + */ + toggleButtonSettings?: any; + + /**Specifies the tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. + * @Default {null} + */ + toolTip?: string; + + /**To add,show and hide controls in Quick Access toolbar. + * @Default {ej.Ribbon.quickAccessMode.none} + */ + quickAccessMode?: ej.Ribbon.quickAccessMode|string; + + /**Specifies the type as "ej.Ribbon.type.button" or "ej.Ribbon.type.splitButton" or "ej.Ribbon.type.dropDownList" or "ej.Ribbon.type.toggleButton" or "ej.Ribbon.type.custom" or "ej.Ribbon.type.gallery" to render button, split, dropdown, toggle button, gallery, custom controls. + * @Default {ej.Ribbon.type.button} + */ + type?: ej.Ribbon.type|string; +} + +export interface TabsGroupsContent { + + /**Specifies the height, width, type, isBig property to the controls in the group commonly. + * @Default {object} + */ + defaults?: any; + + /**Specifies the controls such as Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls in the subgroup of the ribbon tab . + * @Default {array} + */ + groups?: Array; +} + +export interface TabsGroupsGroupExpanderSettings { + + /**Sets tooltip for the group expander of the group. + * @Default {null} + */ + toolTip?: string; + + /**Specifies the custom tooltip for group expander.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; +} + +export interface TabsGroups { + + /**Specifies the alignment of controls in the groups in 'row' type or 'column' type. Value for row type is "ej.Ribbon.alignType.rows" and for column type is "ej.Ribbon.alignType.columns". + * @Default {ej.Ribbon.alignType.rows} + */ + alignType?: ej.Ribbon.alignType|string; + + /**Specifies the Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls to the groups in the ribbon control. + * @Default {array} + */ + content?: Array; + + /**Specifies the ID of custom items to be placed in the groups. + * @Default {null} + */ + contentID?: string; + + /**Specifies the HTML contents to place into the groups. + * @Default {null} + */ + customContent?: string; + + /**Specifies the group expander for groups in the ribbon control. Set "true" to enable the group expander. + * @Default {false} + */ + enableGroupExpander?: boolean; + + /**Sets custom setting to the groups in the ribbon control. + * @Default {Object} + */ + groupExpanderSettings?: TabsGroupsGroupExpanderSettings; + + /**Specifies the text to the groups in the ribbon control. + * @Default {null} + */ + text?: string; + + /**Specifies the custom items such as div, table, controls by using the "custom" type. + * @Default {null} + */ + type?: string; +} + +export interface Tabs { + + /**Specifies single group or multiple groups and its contents to each tab in the ribbon control. + * @Default {array} + */ + groups?: Array; + + /**Specifies the ID for each tab's content panel. + * @Default {null} + */ + id?: string; + + /**Specifies the text of the tab in the ribbon control. + * @Default {null} + */ + text?: string; +} + +enum itemType{ + + ///To render the button for ribbon backstage page’s contents + Button, + + ///To render the tab for ribbon backstage page’s contents + Tab +} + + +enum applicationTabType{ + + ///applicationTab display as menu + Menu, + + ///applicationTab display as backstage + Backstage +} + + +enum alignType{ + + ///To align the group content's in row + Rows, + + ///To align group content's in columns + Columns +} + + +enum customItemType{ + + ///Specifies the button type in customGalleryItems + Button, + + ///Specifies the menu type in customGalleryItems + Menu +} + + +enum quickAccessMode{ + + ///Controls are hidden in Quick Access toolbar + None, + + ///Add controls in toolBar + ToolBar, + + ///Add controls in menu + Menu +} + + +enum type{ + + ///Specifies the button control + Button, + + ///Specifies the split button + SplitButton, + + ///Specifies the dropDown + DropDownList, + + ///To append external element's + Custom, + + ///Specifies the toggle button + ToggleButton, + + ///Specifies the ribbon gallery + Gallery +} + +} + +class Kanban extends ej.Widget { + static fn: Kanban; + constructor(element: JQuery, options?: Kanban.Model); + constructor(element: Element, options?: Kanban.Model); + model:Kanban.Model; + defaults:Kanban.Model; + + /** Add a new card in kanban control.If parameters are not given default dialog will be open + * @param {string} Pass the primary key field Name of the column + * @param {Array} Pass the edited json data of card need to be add. + * @returns {void} + */ + addCard(primaryKey: string, card: Array): void; + + /** Method used for send a clear search request to kanban. + * @returns {void} + */ + clearSearch(): void; + + /** It is used to clear all the card selection. + * @returns {void} + */ + clearSelection(): void; + + /** Collapse all the swimlane rows in kanban. + * @returns {void} + */ + collapseAll(): void; + + /** Add or remove columns in kanban columns collections + * @param {Array|string} Pass array of columns or string of headerText to add/remove the column in kanban + * @param {Array|string} Pass array of columns or string of keyvalue to add/remove the column in kanban + * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform + * @returns {void} + */ + columns(columndetails: Array|string, keyvalue: Array|string, action: string): void; + + /** Send a cancel request of add/edit card in kanban + * @returns {void} + */ + cancelEdit(): void; + + /** Destroy the kanban widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Delete a card in kanban control. + * @param {string|number} Pass the key of card to be delete + * @returns {void} + */ + deleteCard(Key: string|number): void; + + /** Refresh the kanban with new data source. + * @param {Array} Pass new data source to the kanban + * @returns {void} + */ + dataSource(datasource: Array): void; + + /** Send a save request in kanban when any card is in edit/new add card state. + * @returns {void} + */ + endEdit(): void; + + /** toggleColumn based on the headerText in kanban. + * @param {any} Pass the header text of the column to get the corresponding column object + * @returns {void} + */ + toggleColumn( headerText : any): void; + + /** Expand or collapse the card based on the state of target "div" + * @param {string|number} Pass the key of card to be toggle + * @returns {void} + */ + toggleCard( key : string|number): void; + + /** Expand or collapse the swimlane row based on the state of target "div" + * @param {any} Pass the div object to toggleSwimlane row based on its row state + * @returns {void} + */ + toggleSwimlane( $div : any): void; + + /** Expand all the swimlane rows in kanban. + * @returns {void} + */ + expandAll(): void; + + /** used for get the names of all the visible column name collections in kanban. + * @returns {void} + */ + getVisibleColumnNames(): void; + + /** Get the scroller object of kanban. + * @returns {void} + */ + getScrollObject(): void; + + /** Get the column details based on the given header text in kanban. + * @param {string} Pass the header text of the column to get the corresponding column object + * @returns {string} + */ + getColumnByHeaderText( headerText : string): string; + + /** Hide columns from the kanban based on the header text + * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide + * @returns {void} + */ + hideColumns( headerText : Array|string): void; + + /** Refresh the template of the kanban + * @returns {void} + */ + refreshTemplate(): void; + + /** Refresh the kanban contents.The template refreshment is based on the argument passed along with this method + * @param {boolean} optional When templateRefresh is set true, template and kanban contents both are refreshed in kanban else only kanban content is refreshed + * @returns {void} + */ + refresh( templateRefresh : boolean): void; + + /** send a search request to kanban with specified string passed in it. + * @param {string} Pass the string to search in Kanban card + * @returns {void} + */ + searchCards( searchString: string): void; + + /** Method used for set validation to a field during editing. + * @param {string} Specify the name of the column to set validation rules + * @param {any} Specify the validation rules for the field + * @returns {void} + */ + setValidationToField(name: string, rules: any): void; + + /** Send an edit card request in kanban.Parameter will be Html element or primary key + * @param {any} Pass the div selected row element to be edited in kanban + * @returns {void} + */ + startEdit( $div : any): void; + + /** Show columns in the kanban based on the header text. + * @param {Array|string} You can pass either array of header text of various columns or a header text of a column to show + * @returns {void} + */ + showColumns( headerText : Array|string): void; + + /** Update a card in kanban control based on key and json data given. + * @param {string} Pass the key field Name of the column + * @param {Array} Pass the edited json data of card need to be update. + * @returns {void} + */ + updateCard( key : string, data : Array): void; +} +export module Kanban{ + +export interface Model { + + /**Gets or sets a value that indicates whether to enable allowDragAndDrop behavior on kanban. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /**To enable or disable the title of the card. + * @Default {false} + */ + allowTitle?: boolean; + + /**Customize the settings for swimlane. + * @Default {Object} + */ + swimlaneSettings?: SwimlaneSettings; + + /**To enable or disable the column expand /collapse. + * @Default {false} + */ + allowToggleColumn?: boolean; + + /**To enable Searching operation in kanban. + * @Default {false} + */ + allowSearching?: boolean; + + /**Gets or sets a value that indicates whether to enable allowSelection behavior on kanban.User can select card and the selected card will be highlighted on kanban. + * @Default {true} + */ + allowSelection?: boolean; + + /**Gets or sets a value that indicates whether to allow card hover actions. + * @Default {true} + */ + allowHover?: boolean; + + /**To allow keyboard navigation actions. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Gets or sets a value that indicates whether to enable the scrollbar in the kanban and view the card by scroll through the kanban manually. + * @Default {false} + */ + allowScrolling?: boolean; + + /**Gets or sets an object that indicates whether to customize the context menu behavior of the kanban. + * @Default {Object} + */ + contextMenuSettings?: ContextMenuSettings; + + /**Gets or sets an object that indicates to render the kanban with specified columns. + * @Default {array} + */ + columns?: Array; + + /**Gets or sets an object that indicates whether to Customize the card based on the Mapping Fields. + * @Default {Object} + */ + cardSettings?: CardSettings; + + /**Gets or sets a value that indicates to render the kanban with custom theme. + * @Default {null} + */ + cssClass?: string; + + /**Gets or sets the data to render the kanban with card. + * @Default {Object} + */ + dataSource?: any; + + /**Align content in the kanban control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**To show Total count of cards in each column + * @Default {true} + */ + enableTotalCount?: boolean; + + /**Gets or sets a value that indicates whether to enablehover support for performing card hover actions. + * @Default {true} + */ + enableHover?: boolean; + + /**Get or sets an object that indicates whether to customize the editing behavior of the kanban. + * @Default {Object} + */ + editSettings?: EditSettings; + + /**To customize field mappings for card , editing title and control key parameters + * @Default {Object} + */ + fields?: Fields; + + /**To map datasource field for column values mapping + * @Default {null} + */ + keyField?: string; + + /**Gets or sets a value that indicates whether the kanban design has be to made responsive. + * @Default {false} + */ + isResponsive?: boolean; + + /**Gets or sets a value that indicates whether to set the minimum width of the responsive kanban while isResponsive property is true and enableResponsiveRow property is set as false. + * @Default {null} + */ + minWidth?: number; + + /**To customize the filtering behavior based on queries given. + * @Default {array} + */ + filterSettings?: Array; + + /**The primarykey field is get as property of kanban. And this will used for Drag and drop and editing mainly + * @Default {null} + */ + primaryKeyField?: string; + + /**ej Query to query database of kanban. + * @Default {Object} + */ + query?: any; + + /**To change the key in keyboard interaction to kanban control. + * @Default {Object} + */ + keySettings?: KeySettings; + + /**Gets or sets an object that indicates whether to customize the scrolling behavior of the kanban. + * @Default {Object} + */ + scrollSettings?: any; + + /**To customize the searching behavior of the kanban. + * @Default {Object} + */ + searchSettings?: SearchSettings; + + /**To allow customize selection type. Accepting types are "single" and "multiple". + * @Default {ej.Kanban.SelectionType.Single} + */ + selectionType?: ej.Kanban.SelectionType|string; + + /**Gets or sets an object that indicates to managing the collection of stacked header rows for the kanban. + * @Default {Array} + */ + stackedHeaderRows?: Array; + + /**The tooltip allows to display card details in a tooltip while hovering on it. + */ + tooltipSettings?: TooltipSettings; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Triggered for every kanban action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**tiggered for every kanban action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered for every kanban action server failure event.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Triggered before the task is going to be edited.*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered before the task is going to be added*/ + beginAdd? (e: BeginAddEventArgs): void; + + /**triggered before the card is going to be selecting.*/ + beforeCardSelect? (e: BeforeCardSelectEventArgs): void; + + /**Trigger after the card is clicked.*/ + cardClick? (e: CardClickEventArgs): void; + + /**Triggered when the card is being dragged.*/ + cardDrag? (e: CardDragEventArgs): void; + + /**Triggered when card dragging start.*/ + cardDragStart? (e: CardDragStartEventArgs): void; + + /**triggered when card dragging stops.*/ + cardDragStop? (e: CardDragStopEventArgs): void; + + /**Triggered when the card is Drop.*/ + cardDrop? (e: CardDropEventArgs): void; + + /**Triggered after the card is select.*/ + cardSelect? (e: CardSelectEventArgs): void; + + /**Triggered when card is double clicked.*/ + cardDoubleClick? (e: CardDoubleClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the kanban model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current action event type. + */ + originalEventType?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the card object (JSON). + */ + data?: any; + + /**Returns current filtering object field name. + */ + currentFilteringobject?: any; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns kanban element. + */ + target?: any; + + /**Returns the card object (JSON). + */ + data?: any; + + /**Returns the selectedRow index. + */ + selectedRow?: number; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface ActionFailureEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the error return by server. + */ + error?: any; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns kanban element. + */ + target?: any; + + /**Returns the card object (JSON). + */ + data?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns beginedit data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeginAddEventArgs { + + /**Returns the kanban model. + */ + model?: any; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns beginAdd data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeCardSelectEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the select cell index value. + */ + cellIndex?: number; + + /**Returns the select card index value. + */ + cardIndex?: number; + + /**Returns the select cell element + */ + currentCell?: any; + + /**Returns the previously select the card element + */ + previousCard?: any; + + /**Returns the previously select card indexes + */ + previousRowcellindex?: Array; + + /**Returns the Target item. + */ + Target?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns select card data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the current card to the kanban. + */ + currentCard?: string; + + /**Returns kanban element. + */ + target?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns the Header text of the column corresponding to the selected card. + */ + columnName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDragEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns drag data. + */ + data?: any; + + /**Returns drag start element. + */ + dragtarget?: any; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDragStartEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns carddragstart data. + */ + data?: any; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns drag start element. + */ + dragtarget?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDragStopEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns drag stop element. + */ + droptarget?: any; + + /**Returns dragg stop data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDropEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns dragged data. + */ + data?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns drop element. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardSelectEventArgs { + + /**Returns the select cell index value. + */ + cellIndex?: number; + + /**Returns the select card index value. + */ + cardIndex?: number; + + /**Returns the select cell element + */ + currentCell?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the previously select the card element + */ + previousCard?: any; + + /**Returns the previously select card indexes + */ + previousRowcellindex?: Array; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns select card data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDoubleClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current card object (JSON). + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface SwimlaneSettings { + + /**To enable or disable items count in swimlane + * @Default {true} + */ + showCount?: boolean; +} + +export interface ContextMenuSettingsCustomMenuItems { + + /**Sets context menu to target element. + * @Default {ej.Kanban.Target.All} + */ + target?: ej.Kanban.Target|string; + + /**Gets the name to custom menu. + * @Default {null} + */ + text?: string; + + /**Gets the template to render custom menu. + * @Default {null} + */ + template?: string; +} + +export interface ContextMenuSettings { + + /**To enable Context menu , All default context menu will show. + * @Default {false} + */ + enable?: boolean; + + /**Gets or sets a value that indicates the list of items needs to be diable from default context menu + * @Default {array} + */ + disableDefaultItems?: Array; + + /**Gets or sets a value that indicates whether to add custom contextMenu items + * @Default {array} + */ + customMenuItems?: Array; +} + +export interface ColumnsConstraints { + + /**It is used to specify the type whether the constraints based on column or swimlane. + * @Default {null} + */ + type?: string; + + /**It is used to specify the minimum amount of card in particular column cell or swimlane cell can hold. + * @Default {null} + */ + min?: number; + + /**It is used to specify the maximum amount of card in particular column cell or swimlane cell can hold. + * @Default {null} + */ + max?: number; +} + +export interface Columns { + + /**Gets or sets an object that indicates to render the kanban with specified columns headertext. + * @Default {null} + */ + headerText?: string; + + /**Gets or sets an object that indicates to render the kanban with specified columns key. + * @Default {null} + */ + key?: string|number; + + /**To set column collape or expand state + * @Default {false} + */ + isCollapsed?: boolean; + + /**To customize the column constraints whether the constraints contains minimum limit or maximum limit or both. + * @Default {object} + */ + constraints?: ColumnsConstraints; + + /**Gets or sets a value that indicates to add the template within the header element. + * @Default {null} + */ + headerTemplate?: string; + + /**Gets or sets an object that indicates to render the kanban with specified columns width. + * @Default {null} + */ + width?: string|number; + + /**Gets or sets an object that indicates to render the kanban with specified columns visible. + * @Default {true} + */ + visible?: boolean; +} + +export interface CardSettings { + + /**Gets or sets a value that indicates to add the template of card . + * @Default {null} + */ + template?: string; + + /**To customize the card bordercolor based on assinged task. Colors and corresponding values defined here will be mapped with colorField mapped data source column. + * @Default {Object} + */ + colorMapping?: any; +} + +export interface EditSettingsEditItems { + + /**It is used to map editing field in the card. + * @Default {null} + */ + field?: string; + + /**It is used to set the particular editType in the card for editing. + * @Default {ej.Kanban.EditingType.String} + */ + editType?: ej.Kanban.EditingType|string; + + /**Gets or sets a value that indicates to define constraints for saving data to the database. + * @Default {Object} + */ + validationRules?: any; + + /**It is used to set the particular editparams in the card for editing. + * @Default {Object} + */ + editParams?: any; + + /**It is used to specify defaultValue in the card. + * @Default {null} + */ + defaultValue?: string|number; +} + +export interface EditSettings { + + /**Gets or sets a value that indicates whether to enable the editing action in cards of kanban. + * @Default {false} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable the adding action in cards behavior on kanban. + * @Default {false} + */ + allowAdding?: boolean; + + /**This specifies the id of the template.which is require to be edited using the Dialog Box + * @Default {null} + */ + dialogTemplate?: string; + + /**Get or sets an object that indicates whether to customize the editMode of the kanban. + * @Default {ej.Kanban.EditMode.Dialog} + */ + editMode?: ej.Kanban.EditMode|string; + + /**Get or sets an object that indicates whether to customize the editing fields of kanban card. + * @Default {Array} + */ + editItems?: Array; +} + +export interface Fields { + + /**The primarykey field is get as property of kanban. And this will used for Drag and drop and editing mainly. + * @Default {null} + */ + primaryKey?: string; + + /**To enable swimlane grouping based on the given key field. + * @Default {null} + */ + swimlaneKey?: string; + + /**Priority field has been mapped data source field to maintain card priority + * @Default {null} + */ + priority?: string; + + /**ContentField has been Mapped into card text. + * @Default {null} + */ + content?: string; + + /**TagField has been Mapped into card tag. + * @Default {null} + */ + tag?: string; + + /**TitleField has been Mapped to field in datasource for title content. If titlefield specified , card expand/collapse will be enabled with header and content section + * @Default {null} + */ + title?: string; + + /**To customize the card has been Mapped into card colorfield. + * @Default {null} + */ + color?: string; + + /**ImageUrlField has been Mapped into card image. + * @Default {null} + */ + imageUrl?: string; +} + +export interface FilterSettings { + + /**Gets or sets an object of display name to filter queries. + * @Default {null} + */ + text?: string; + + /**Gets or sets an object that Queries to perform filtering + * @Default {Object} + */ + query?: any; + + /**Gets or sets an object of tooltip to filter buttons. + * @Default {null} + */ + description?: string; +} + +export interface KeySettings { + + /**To specify the focus in kanban control. + * @Default {Object} + */ + focus?: any; + + /**To specify the key value to insert the card. + * @Default {null} + */ + insertCard?: string; + + /**To specify the key value to delete the card. + * @Default {null} + */ + deleteCard?: string; + + /**TTo specify the key value to edit the card. + * @Default {null} + */ + editCard?: string; + + /**TTo specify the key value to save request. + * @Default {null} + */ + saveRequest?: string; + + /**To specify the key value to cancel request. + * @Default {null} + */ + cancelRequest?: string; + + /**To specify the key value to first card selection. + * @Default {null} + */ + firstCardSelection?: string; + + /**To specify the key value to last card selection. + * @Default {null} + */ + lastCardSelection?: string; + + /**To specify the key value to upArrow. + * @Default {null} + */ + upArrow?: string; + + /**To specify the key value to downArrow. + * @Default {null} + */ + downArrow?: string; + + /**To specify the key value to rightArrow. + * @Default {null} + */ + rightArrow?: string; + + /**To specify the key value to leftArrow. + * @Default {null} + */ + leftArrow?: string; + + /**To specify the key value to swimlane expand all. + * @Default {null} + */ + swimlaneExpandAll?: string; + + /**To specify the key value to swimlane collapse all. + * @Default {null} + */ + swimlaneCollapseAll?: string; + + /**To specify the key value to selected group expand. + * @Default {null} + */ + selectedGroupExpand?: string; + + /**To specify the key value to selected group collapse. + * @Default {null} + */ + selectedGroupCollapse?: string; + + /**To specify the key value to selected column collapse. + * @Default {null} + */ + selectedColumnCollapse?: string; + + /**To specify the key value to selected column expand. + * @Default {null} + */ + selectedColumnExpand?: string; + + /**To specify the key value to multi selection by up arrow. + * @Default {null} + */ + multiSelectionByUpArrow?: string; + + /**To specify the key value to multi selection by left arrow. + * @Default {null} + */ + multiSelectionByLeftArrow?: string; + + /**To specify the key value to multi selection by right arrow. + * @Default {null} + */ + multiSelectionByRightArrow?: string; +} + +export interface SearchSettings { + + /**To customize the fields the searching operation can be perform. + * @Default {Array} + */ + fields?: Array; + + /**To customize the searching string. + * @Default {null} + */ + key?: string; + + /**To customize the operator based on searching. + * @Default {null} + */ + operator?: string; + + /**To customize the ignorecase based on searching. + * @Default {true} + */ + ignoreCase?: boolean; +} + +export interface StackedHeaderRowsStackedHeaderColumns { + + /**Gets or sets a value that indicates the headerText for the particular stacked header column. + * @Default {null} + */ + headerText?: string; + + /**Gets or sets a value that indicates the column for the particular stacked header column. + * @Default {null} + */ + column?: string; +} + +export interface StackedHeaderRows { + + /**Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows. + * @Default {Array} + */ + stackedHeaderColumns?: Array; +} + +export interface TooltipSettings { + + /**To enable or disable the tooltip display. + * @Default {false} + */ + enable?: boolean; + + /**To customize the tooltip display based on your requirements. + * @Default {null} + */ + template?: string; +} + +enum Target{ + + ///Sets context menu to kanban header + Header, + + ///Sets context menu to kanban content + Content, + + ///Sets context menu to kanban + All +} + + +enum EditMode{ + + ///Creates kanban with editMode as Dialog + Dialog, + + ///Creates kanban with editMode as DialogTemplate + DialogTemplate +} + + +enum EditingType{ + + ///Allows to set edit type as string edit type + String, + + ///Allows to set edit type as numeric edit type + Numeric, + + ///Allows to set edit type as drop down edit type + Dropdown, + + ///Allows to set edit type as date picker edit type + DatePicker, + + ///Allows to set edit type as date time picker edit type + DateTimePicker, + + ///Allows to set edit type as text area edit type + TextArea, + + ///Allows to set edit type as RTE edit type + RTE +} + + +enum SelectionType{ + + ///Support for Single selection in Kanban + Single, + + ///Support for multiple selections in Kanban + Multiple +} + +} + +class Rotator extends ej.Widget { + static fn: Rotator; + constructor(element: JQuery, options?: Rotator.Model); + constructor(element: Element, options?: Rotator.Model); + model:Rotator.Model; + defaults:Rotator.Model; + + /** Disables the Rotator control. + * @returns {void} + */ + disable(): void; + + /** Enables the Rotator control. + * @returns {void} + */ + enable(): void; + + /** This method is used to get the current slide index. + * @returns {number} + */ + getIndex(): number; + + /** This method is used to move a slide to the specified index. + * @param {number} index of an slide + * @returns {void} + */ + gotoIndex(index: number): void; + + /** This method is used to pause autoplay. + * @returns {void} + */ + pause(): void; + + /** This method is used to move slides continuously (or start autoplay) in the specified autoplay direction. + * @returns {void} + */ + play(): void; + + /** This method is used to move to the next slide from the current slide. If the current slide is the last slide, then the first slide will be treated as the next slide. + * @returns {void} + */ + slideNext(): void; + + /** This method is used to move to the previous slide from the current slide. If the current slide is the first slide, then the last slide will be treated as the previous slide. + * @returns {void} + */ + slidePrevious(): void; +} +export module Rotator{ + +export interface Model { + + /**Turns on keyboard interaction with the Rotator items. You must set this property to true to access the following keyboard shortcuts: + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Sets the animationSpeed of slide transition. + * @Default {600} + */ + animationSpeed?: string|number; + + /**Specifies the animationType type for the Rotator Item. animationType options include slide, fastSlide, slowSlide, and other custom easing animationTypes. + * @Default {slide} + */ + animationType?: string; + + /**Enables the circular mode item rotation. + * @Default {true} + */ + circularMode?: boolean; + + /**Specify the CSS class to Rotator to achieve custom theme. + */ + cssClass?: string; + + /**Specify the list of data which contains a set of data fields. Each data value is used to render an item for the Rotator. + * @Default {null} + */ + dataSource?: any; + + /**Sets the delay between the Rotator Items move after the slide transition. + * @Default {500} + */ + delay?: number; + + /**Specifies the number of Rotator Items to be displayed. + * @Default {1} + */ + displayItemsCount?: string|number; + + /**Rotates the Rotator Items continuously without user interference. + * @Default {false} + */ + enableAutoPlay?: boolean; + + /**Enables or disables the Rotator control. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies right to left transition of slides. + * @Default {false} + */ + enableRTL?: boolean; + + /**Defines mapping fields for the data items of the Rotator. + * @Default {null} + */ + fields?: Fields; + + /**Sets the space between the Rotator Items. + */ + frameSpace?: string|number; + + /**Resizes the Rotator when the browser is resized. + * @Default {false} + */ + isResponsive?: boolean; + + /**Specifies the number of Rotator Items to navigate on a single click (next/previous/play buttons). The navigateSteps property value must be less than or equal to the displayItemsCount property value. + * @Default {1} + */ + navigateSteps?: string|number; + + /**Specifies the orientation for the Rotator control, that is, whether it must be rendered horizontally or vertically. See Orientation + * @Default {ej.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Specifies the position of the showPager in the Rotator Item. See PagerPosition + * @Default {outside} + */ + pagerPosition?: string|ej.Rotator.PagerPosition; + + /**Retrieves data from remote data. This property is applicable only when a remote data source is used. + * @Default {null} + */ + query?: string; + + /**If the Rotator Item is an image, you can specify a caption for the Rotator Item. The caption text for each Rotator Item must be set by using the title attribute of the respective tag. The caption cannot be displayed if multiple Rotator Items are present. + * @Default {false} + */ + showCaption?: boolean; + + /**Turns on or off the slide buttons (next and previous) in the Rotator Items. Slide buttons are used to navigate the Rotator Items. + * @Default {true} + */ + showNavigateButton?: boolean; + + /**Turns on or off the pager support in the Rotator control. The Pager is used to navigate the Rotator Items. + * @Default {true} + */ + showPager?: boolean; + + /**Enable play / pause button on rotator. + * @Default {false} + */ + showPlayButton?: boolean; + + /**Turns on or off thumbnail support in the Rotator control. Thumbnail is used to navigate between slides. Thumbnail supports only single slide transition You must specify the source for thumbnail elements through the thumbnailSourceID property. + * @Default {false} + */ + showThumbnail?: boolean; + + /**Sets the height of a Rotator Item. + */ + slideHeight?: string|number; + + /**Sets the width of a Rotator Item. + */ + slideWidth?: string|number; + + /**Sets the index of the slide that must be displayed first. + * @Default {0} + */ + startIndex?: string|number; + + /**Pause the auto play while hover on the rotator content. + * @Default {false} + */ + stopOnHover?: boolean; + + /**Specifies the source for thumbnail elements. + * @Default {null} + */ + thumbnailSourceID?: any; + + /**This event is fired when the Rotator slides are changed.*/ + change? (e: ChangeEventArgs): void; + + /**This event is fired when the Rotator control is initialized.*/ + create? (e: CreateEventArgs): void; + + /**This event is fired when the Rotator control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**This event is fired when a pager is clicked.*/ + pagerClick? (e: PagerClickEventArgs): void; + + /**This event is fired when enableAutoPlay is started.*/ + start? (e: StartEventArgs): void; + + /**This event is fired when autoplay is stopped or paused.*/ + stop? (e: StopEventArgs): void; + + /**This event is fired when a thumbnail pager is clicked.*/ + thumbItemClick? (e: ThumbItemClickEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface PagerClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface StartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface StopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface ThumbItemClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface Fields { + + /**Specifies a link for the image. + */ + linkAttribute?: string; + + /**Specifies where to open a given link. + */ + targetAttribute?: string; + + /**Specifies a caption for the image. + */ + text?: string; + + /**Specifies a caption for the thumbnail image. + */ + thumbnailText?: string; + + /**Specifies the URL for an thumbnail image. + */ + thumbnailUrl?: string; + + /**Specifies the URL for an image. + */ + url?: string; +} + +enum PagerPosition{ + + ///string + BottomLeft, + + ///string + BottomRight, + + ///string + Outside, + + ///string + TopCenter, + + ///string + TopLeft, + + ///string + TopRight +} + +} + +class RTE extends ej.Widget { + static fn: RTE; + constructor(element: JQuery, options?: RTE.Model); + constructor(element: Element, options?: RTE.Model); + model:RTE.Model; + defaults:RTE.Model; + + /** Returns the range object. + * @returns {void} + */ + createRange(): void; + + /** Disables the RTE control. + * @returns {void} + */ + disable(): void; + + /** Disables the corresponding tool in the RTE ToolBar. + * @returns {void} + */ + disableToolbarItem(): void; + + /** Enables the RTE control. + * @returns {void} + */ + enable(): void; + + /** Enables the corresponding tool in the toolbar when the tool is disabled. + * @returns {void} + */ + enableToolbarItem(): void; + + /** Performs the action value based on the given command. + * @returns {void} + */ + executeCommand(): void; + + /** Focuses the RTE control. + * @returns {void} + */ + focus(): void; + + /** Gets the command status of the selected text based on the given comment in the RTE control. + * @returns {void} + */ + getCommandStatus(): void; + + /** Gets the HTML string from the RTE control. + * @returns {void} + */ + getDocument(): void; + + /** Gets the HTML string from the RTE control. + * @returns {void} + */ + getHtml(): void; + + /** Gets the selected html string from the RTE control. + * @returns {void} + */ + getSelectedHtml(): void; + + /** Gets the content as string from the RTE control. + * @returns {void} + */ + getText(): void; + + /** Hides the RTE control. + * @returns {void} + */ + hide(): void; + + /** Inserts new item to the target contextmenu node. + * @returns {void} + */ + insertMenuOption(): void; + + /** This method helps to insert/paste the content at the current cursor (caret) position or the selected content to be replaced with our text by passing the value as parameter to the pasteContent method in the Editor. + * @returns {void} + */ + pasteContent(): void; + + /** Refreshes the RTE control. + * @returns {void} + */ + refresh(): void; + + /** Removes the target menu item from the RTE contextmenu. + * @returns {void} + */ + removeMenuOption (): void; + + /** Removes the given tool from the RTE Toolbar. + * @returns {void} + */ + removeToolbarItem(): void; + + /** Selects all the contents within the RTE. + * @returns {void} + */ + selectAll(): void; + + /** Selects the contents in the given range. + * @returns {void} + */ + selectRange(): void; + + /** Sets the color picker model type rendered initially in the RTE control. + * @returns {void} + */ + setColorPickerType(): void; + + /** Sets the HTML string from the RTE control. + * @returns {void} + */ + setHtml(): void; + + /** Displays the RTE control. + * @returns {void} + */ + show(): void; +} +export module RTE{ + +export interface Model { + + /**Enables/disables the editing of the content. + * @Default {True} + */ + allowEditing?: boolean; + + /**RTE control can be accessed through the keyboard shortcut keys. + * @Default {True} + */ + allowKeyboardNavigation?: boolean; + + /**When the property is set to true, it focuses the RTE at the time of rendering. + * @Default {false} + */ + autoFocus?: boolean; + + /**Based on the content size, its height is adjusted instead of adding the scrollbar. + * @Default {false} + */ + autoHeight?: boolean; + + /**Sets the colorCode to display the color of the fontColor and backgroundColor in the font tools of the RTE. + * @Default {[000000, FFFFFF, C4C4C4, ADADAD, 595959, 262626, 4f81bd, dbe5f1, b8cce4, 95b3d7, 366092, 244061, c0504d, f2dcdb, e5b9b7, d99694, 953734,632423, 9bbb59, ebf1dd, d7e3bc, c3d69b, 76923c, 4f6128, 8064a2, e5e0ec, ccc1d9, b2a2c7, 5f497a, 3f3151, f79646, fdeada, fbd5b5, fac08f,e36c09, 974806]} + */ + colorCode?: any; + + /**The number of columns given are rendered in the color palate popup. + * @Default {6} + */ + colorPaletteColumns?: number; + + /**The number of rows given are rendered in the color palate popup. + * @Default {6} + */ + colorPaletteRows?: number; + + /**Sets the root class for the RTE theme. This cssClass API helps the usage of custom skinning option for the RTE control by including this root class in CSS. + */ + cssClass?: string; + + /**Enables/disables the RTE control’s accessibility or interaction. + * @Default {True} + */ + enabled?: boolean; + + /**When the property is set to true, it returns the encrypted text. + * @Default {false} + */ + enableHtmlEncode?: boolean; + + /**Maintain the values of the RTE after page reload. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Shows the resize icon and enables the resize option in the RTE. + * @Default {True} + */ + enableResize?: boolean; + + /**Shows the RTE in the RTL direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Formats the contents based on the XHTML rules. + * @Default {false} + */ + enableXHTML?: boolean; + + /**Enables the tab key action with the RichTextEditor content. + * @Default {True} + */ + enableTabKeyNavigation?: boolean; + + /**Load the external CSS file inside Iframe. + * @Default {null} + */ + externalCSS?: string; + + /**This API allows to enable the file browser support in the RTE control to browse, create, delete and upload the files in the specified current directory. + * @Default {null} + */ + fileBrowser?: FileBrowser; + + /**Sets the fontName in the RTE. + * @Default {{text: Segoe UI, value: Segoe UI },{text: Arial, value: Arial,Helvetica,sans-serif },{text: Courier New, value: Courier New,Courier,Monospace },{text: Georgia, value: Georgia,serif },{text: Impact, value: Impact,Charcoal,sans-serif },{text: Lucida Console, value: Lucida Console,Monaco,Monospace },{text: Tahoma, value: Tahoma,Geneva,sans-serif },{text: Times New Roman, value: Times New Roman },{text: Trebuchet MS, value: Trebuchet MS,Helvetica,sans-serif },{text: Verdana, value: Verdana,Geneva,sans-serif}} + */ + fontName?: any; + + /**Sets the fontSize in the RTE. + * @Default {{ text: 1, value: 1 },{ text: 2 (10pt), value: 2 },{ text: 3 (12pt), value: 3 },{ text: 4 (14pt), value: 4 },{ text: 5 (18pt), value: 5 },{ text: 6 (24pt), value: 6 },{ text: 7 (36pt), value: 7 }} + */ + fontSize?: any; + + /**Sets the format in the RTE. + * @Default {{ text: Paragraph, value: <p>, spriteCssClass: e-paragraph },{ text: Quotation, value: <blockquote>, spriteCssClass: e-quotation },{ text: Heading 1, value: <h1>, spriteCssClass: e-h1 },{ text: Heading 2, value: <h2>, spriteCssClass: e-h2 },{ text: Heading 3, value: <h3>, spriteCssClass: e-h3 },{ text: Heading 4, value: <h4>, spriteCssClass: e-h4 },{ text: Heading 5, value: <h5>, spriteCssClass: e-h5 },{ text: Heading 6, value: <h6>, spriteCssClass: e-h6}} + */ + format?: string; + + /**Defines the height of the RTE textbox. + * @Default {370} + */ + height?: string|number; + + /**Specifies the HTML Attributes of the ejRTE. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the given attributes to the iframe body element. + * @Default {{}} + */ + iframeAttributes?: any; + + /**This API allows the image browser to support in the RTE control to browse, create, delete, and upload the image files to the specified current directory. + * @Default {null} + */ + imageBrowser?: ImageBrowser; + + /**Enables/disables responsive support for the RTE control toolbar items during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /**Sets the culture in the RTE when you set the localization values are needs to be assigned to the corresponding text as follows. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum height for the RTE outer wrapper element. + * @Default {null} + */ + maxHeight?: string|number; + + /**Sets the maximum length for the RTE outer wrapper element. + * @Default {7000} + */ + maxLength?: number; + + /**Sets the maximum width for the RTE outer wrapper element. + * @Default {null} + */ + maxWidth?: string|number; + + /**Sets the minimum height for the RTE outer wrapper element. + * @Default {280} + */ + minHeight?: string|number; + + /**Sets the minimum width for the RTE outer wrapper element. + * @Default {400} + */ + minWidth?: string|number; + + /**Sets the name in the RTE. When the name value is not initialized, the ID value is assigned to the name. + */ + name?: string; + + /**Shows ClearAll icon in the RTE footer. + * @Default {false} + */ + showClearAll?: boolean; + + /**Shows the clear format in the RTE footer. + * @Default {true} + */ + showClearFormat?: boolean; + + /**Shows the Custom Table in the RTE. + * @Default {True} + */ + showCustomTable?: boolean; + + /**Shows custom contextmenu with the RTE. + * @Default {True} + */ + showContextMenu?: boolean; + + /**This API is used to set the default dimensions for the image and video. When this property is set to true, the image and video dialog displays the dimension option. + * @Default {false} + */ + showDimensions?: boolean; + + /**Shows the FontOption in the RTE. + * @Default {True} + */ + showFontOption?: boolean; + + /**Shows footer in the RTE. When the footer is enabled, it displays the html tag, word Count, character count, clear format, resize icon and clear all the content icons, by default. + * @Default {false} + */ + showFooter?: boolean; + + /**Shows the HtmlSource in the RTE footer. + * @Default {false} + */ + showHtmlSource?: boolean; + + /**When the cursor is placed or when the text is selected in the RTE, it displays the tag info in the footer. + * @Default {True} + */ + showHtmlTagInfo?: boolean; + + /**Shows the toolbar in the RTE. + * @Default {True} + */ + showToolbar?: boolean; + + /**Counts the total characters and displays it in the RTE footer. + * @Default {True} + */ + showCharCount?: boolean; + + /**Counts the total words and displays it in the RTE footer. + * @Default {True} + */ + showWordCount?: boolean; + + /**The given number of columns render the insert table pop. + * @Default {10} + */ + tableColumns?: number; + + /**The given number of rows render the insert table pop. + * @Default {8} + */ + tableRows?: number; + + /**Sets the tools in the RTE and gets the inner display order of the corresponding group element. Tools are dependent on the toolsList property. + * @Default {formatStyle: [format],style: [bold, italic, underline, strikethrough],alignment: [justifyLeft, justifyCenter, justifyRight, justifyFull],lists: [unorderedList, orderedList],indenting: [outdent, indent],doAction: [undo, redo],links: [createLink,removeLink],images: [image],media: [video],tables: [createTable, addRowAbove, addRowBelow, addColumnLeft, addColumnRight, deleteRow, deleteColumn, deleteTable]],view:[“fullScreen”,zoomIn,zoomOut],print:[print]} + */ + tools?: Tools; + + /**Specifies the list of groups and order of those groups displayed in the RTE toolbar. The toolsList property is used to get the root group order and tools property is used to get the inner order of the corresponding groups displayed. When the value is not specified, it gets its default display order and tools. + * @Default {[formatStyle, font, style, effects, alignment, lists, indenting, clipboard, doAction, clear, links, images, media, tables, casing,view, customTools,print,edit]} + */ + toolsList?: Array; + + /**Gets the undo stack limit. + * @Default {50} + */ + undoStackLimit?: number; + + /**The given string value is displayed in the editable area. + * @Default {null} + */ + value?: string; + + /**Sets the jquery validation rules to the Rich Text Editor. + * @Default {null} + */ + validationRules?: any; + + /**Sets the jquery validation error message to the Rich Text Editor. + * @Default {null} + */ + validationMessage?: any; + + /**Defines the width of the RTE textbox. + * @Default {786} + */ + width?: string|number; + + /**Increases and decreases the contents zoom range in percentage + * @Default {0.05} + */ + zoomStep?: string|number; + + /**Fires when changed successfully.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the RTE is created successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires when mouse click on menu items.*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Fires before the RTE is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the commands are executed successfully.*/ + execute? (e: ExecuteEventArgs): void; + + /**Fires when the keydown action is successful.*/ + keydown? (e: KeydownEventArgs): void; + + /**Fires when the keyup action is successful.*/ + keyup? (e: KeyupEventArgs): void; + + /**Fires before the RTE Edit area is rendered and after the toolbar is rendered.*/ + preRender? (e: PreRenderEventArgs): void; +} + +export interface ChangeEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RTE model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface ContextMenuClickEventArgs { + + /**returns clicked menu item text. + */ + text?: string; + + /**returns clicked menu item element. + */ + element?: any; + + /**returns the selected item. + */ + selectedItem?: number; +} + +export interface DestroyEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface ExecuteEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface KeydownEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface KeyupEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface PreRenderEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface FileBrowser { + + /**This API is used to receive the server-side handler for file related operations. + */ + ajaxAction?: string; + + /**Specifies the file type extension shown in the file browser window. + */ + extensionAllow?: string; + + /**Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected files to the current directory. + */ + filePath?: string; +} + +export interface ImageBrowser { + + /**This API is used to receive the server-side handler for the file related operations. + */ + ajaxAction?: string; + + /**Specifies the file type extension shown in the image browser window. + */ + extensionAllow?: string; + + /**Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected images to the current directory. + */ + filePath?: string; +} + +export interface ToolsCustomOrderedList { + + /**Specifies the name for customOrderedList item. + */ + name?: string; + + /**Specifies the title for customOrderedList item. + */ + tooltip?: string; + + /**Specifies the styles for customOrderedList item. + */ + css?: string; + + /**Specifies the text for customOrderedList item. + */ + text?: string; + + /**Specifies the list style for customOrderedList item. + */ + listStyle?: string; + + /**Specifies the image for customOrderedList item. + */ + listImage?: string; +} + +export interface ToolsCustomUnorderedList { + + /**Specifies the name for customUnorderedList item. + */ + name?: string; + + /**Specifies the title for customUnorderedList item. + */ + tooltip?: string; + + /**Specifies the styles for customUnorderedList item. + */ + css?: string; + + /**Specifies the text for customUnorderedList item. + */ + text?: string; + + /**Specifies the list style for customUnorderedList item. + */ + listStyle?: string; + + /**Specifies the image for customUnorderedList item. + */ + listImage?: string; +} + +export interface Tools { + + /**Specifies the alignment tools and the display order of this tool in the RTE toolbar. + */ + alignment?: any; + + /**Specifies the casing tools and the display order of this tool in the RTE toolbar. + */ + casing?: Array; + + /**Specifies the clear tools and the display order of this tool in the RTE toolbar. + */ + clear?: Array; + + /**Specifies the clipboard tools and the display order of this tool in the RTE toolbar. + */ + clipboard?: Array; + + /**Specifies the edit tools and the displays tool in the RTE toolbar. + */ + edit?: Array; + + /**Specifies the doAction tools and the display order of this tool in the RTE toolbar. + */ + doAction?: Array; + + /**Specifies the effect of tools and the display order of this tool in RTE toolbar. + */ + effects?: Array; + + /**Specifies the font tools and the display order of this tool in the RTE toolbar. + */ + font?: Array; + + /**Specifies the formatStyle tools and the display order of this tool in the RTE toolbar. + */ + formatStyle?: Array; + + /**Specifies the image tools and the display order of this tool in the RTE toolbar. + */ + images?: Array; + + /**Specifies the indent tools and the display order of this tool in the RTE toolbar. + */ + indenting?: Array; + + /**Specifies the link tools and the display order of this tool in the RTE toolbar. + */ + links?: Array; + + /**Specifies the list tools and the display order of this tool in the RTE toolbar. + */ + lists?: Array; + + /**Specifies the media tools and the display order of this tool in the RTE toolbar. + */ + media?: Array; + + /**Specifies the style tools and the display order of this tool in the RTE toolbar. + */ + style?: Array; + + /**Specifies the table tools and the display order of this tool in the RTE toolbar. + */ + tables?: Array; + + /**Specifies the view tools and the display order of this tool in the RTE toolbar. + */ + view?: Array; + + /**Specifies the print tools and the display order of this tool in the RTE toolbar. + */ + print?: Array; + + /**Specifies the customOrderedList tools and the display order of this tool in the RTE toolbar. + */ + customOrderedList?: Array; + + /**Specifies the customUnOrderedList tools and the display order of this tool in the RTE toolbar. + */ + customUnorderedList?: Array; +} +} + +class Slider extends ej.Widget { + static fn: Slider; + constructor(element: JQuery, options?: Slider.Model); + constructor(element: Element, options?: Slider.Model); + model:Slider.Model; + defaults:Slider.Model; + + /** To disable the slider + * @returns {void} + */ + disable(): void; + + /** To enable the slider + * @returns {void} + */ + enable(): void; + + /** To get value from slider handle + * @returns {number} + */ + getValue(): number; + + /** To set value to slider handle + * @returns {void} + */ + setValue(): void; +} +export module Slider{ + +export interface Model { + + /**Specifies the animationSpeed of the slider. + * @Default {500} + */ + animationSpeed?: number; + + /**Specify the CSS class to slider to achieve custom theme. + */ + cssClass?: string; + + /**Specifies the animation behavior of the slider. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the state of the slider. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the enablePersistence to slider to save current model value to browser cookies for state maintains + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specifies the Right to Left Direction of the slider. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the slider. + * @Default {14} + */ + height?: string; + + /**Specifies the HTML Attributes of the ejSlider. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the incremental step value of the slider. + * @Default {1} + */ + incrementStep?: number; + + /**Specifies the distance between two major (large) ticks from the scale of the slider. + * @Default {10} + */ + largeStep?: number; + + /**Specifies the ending value of the slider. + * @Default {100} + */ + maxValue?: number; + + /**Specifies the starting value of the slider. + * @Default {0} + */ + minValue?: number; + + /**Specifies the orientation of the slider. + * @Default {ej.orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Specifies the readOnly of the slider. + * @Default {false} + */ + readOnly?: boolean; + + /**Specifies the rounded corner behavior for slider. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Shows/Hide the major (large) and minor (small) ticks in the scale of the slider. + * @Default {false} + */ + showScale?: boolean; + + /**Specifies the small ticks from the scale of the slider. + * @Default {true} + */ + showSmallTicks?: boolean; + + /**Specifies the showTooltip to shows the current Slider value, while moving the Slider handle or clicking on the slider handle of the slider. + * @Default {true} + */ + showTooltip?: boolean; + + /**Specifies the sliderType of the slider. + * @Default {ej.SliderType.Default} + */ + sliderType?: ej.slider.sliderType|string; + + /**Specifies the distance between two minor (small) ticks from the scale of the slider. + * @Default {1} + */ + smallStep?: number; + + /**Specifies the value of the slider. But it's not applicable for range slider. To range slider we can use values property. + * @Default {0} + */ + value?: number; + + /**Specifies the values of the range slider. But it's not applicable for default and minRange sliders. we can use value property for default and minRange sliders. + * @Default {[minValue,maxValue]} + */ + values?: Array; + + /**Specifies the width of the slider. + * @Default {100%} + */ + width?: string; + + /**Fires once Slider control value is changed successfully.*/ + change? (e: ChangeEventArgs): void; + + /**Fires once Slider control has been created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when Slider control has been destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires once Slider control is sliding successfully.*/ + slide? (e: SlideEventArgs): void; + + /**Fires once Slider control is started successfully.*/ + start? (e: StartEventArgs): void; + + /**Fires when Slider control is stopped successfully.*/ + stop? (e: StopEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id. + */ + id?: string; + + /**returns the slider model. + */ + model?: ej.Slider.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the slider value. + */ + value?: number; + + /**returns true if event triggered by interaction else returns false. + */ + isInteraction?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface SlideEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id + */ + id?: string; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the slider value + */ + value?: number; +} + +export interface StartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id + */ + id?: string; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the slider value + */ + value?: number; +} + +export interface StopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id + */ + id?: string; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the slider value + */ + value?: number; +} +} +module slider +{ +enum sliderType +{ +//Shows default slider +Default, +//Shows minRange slider +MinRange, +//Shows Range slider +Range, +} +} + +class SplitButton extends ej.Widget { + static fn: SplitButton; + constructor(element: JQuery, options?: SplitButton.Model); + constructor(element: Element, options?: SplitButton.Model); + model:SplitButton.Model; + defaults:SplitButton.Model; + + /** destroy the split button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the split button + * @returns {void} + */ + disable(): void; + + /** To Enable the split button + * @returns {void} + */ + enable(): void; + + /** To Hide the list content of the split button. + * @returns {void} + */ + hide(): void; + + /** To show the list content of the split button. + * @returns {void} + */ + show(): void; +} +export module SplitButton{ + +export interface Model { + + /**Specifies the arrowPosition of the Split or Dropdown Button.See arrowPosition + * @Default {ej.ArrowPosition.Right} + */ + arrowPosition?: string|ej.ArrowPosition; + + /**Specifies the buttonMode like Split or Dropdown Button.See ButtonMode + * @Default {ej.ButtonMode.Split} + */ + buttonMode?: string|ej.ButtonMode; + + /**Specifies the contentType of the Split Button.See ContentType + * @Default {ej.ContentType.TextOnly} + */ + contentType?: string|ej.ContentType; + + /**Set the root class for Split Button control theme + */ + cssClass?: string; + + /**Specifies the disabling of Split Button if enabled is set to false. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the enableRTL property for Split Button while initialization. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the Split Button. + * @Default {“”} + */ + height?: string|number; + + /**Specifies the HTML Attributes of the Split Button. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the imagePosition of the Split Button.See imagePositions + * @Default {ej.ImagePosition.ImageRight} + */ + imagePosition?: string|ej.ImagePosition; + + /**Specifies the image content for Split Button while initialization. + */ + prefixIcon?: string; + + /**Specifies the showRoundedCorner property for Split Button while initialization. + * @Default {false} + */ + showRoundedCorner?: string; + + /**Specifies the size of the Button. See ButtonSize + * @Default {ej.ButtonSize.Normal} + */ + size?: string|ej.ButtonSize; + + /**Specifies the image content for Split Button while initialization. + */ + suffixIcon?: string; + + /**Specifies the list content for Split Button while initialization + */ + targetID?: string; + + /**Specifies the text content for Split Button while initialization. + */ + text?: string; + + /**Specifies the width of the Split Button. + * @Default {“”} + */ + width?: string|number; + + /**Fires before menu of the split button control is opened.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when Button control is clicked successfully*/ + click? (e: ClickEventArgs): void; + + /**Fires before the list content of Button control is closed*/ + close? (e: CloseEventArgs): void; + + /**Fires after Split Button control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Split Button is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when a menu item is Hovered out successfully*/ + itemMouseOut? (e: ItemMouseOutEventArgs): void; + + /**Fires when a menu item is Hovered in successfully*/ + itemMouseOver? (e: ItemMouseOverEventArgs): void; + + /**Fires when a menu item is clicked successfully*/ + itemSelected? (e: ItemSelectedEventArgs): void; + + /**Fires before the list content of Button control is opened*/ + open? (e: OpenEventArgs): void; +} + +export interface BeforeOpenEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ClickEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**return the button state + */ + status?: boolean; +} + +export interface CloseEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemMouseOutEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface ItemMouseOutEvent { + + /**return the menu item id + */ + ID?: string; + + /**return the clicked menu item text + */ + Text?: string; +} + +export interface ItemMouseOverEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface ItemMouseOverEvent { + + /**return the menu item id + */ + ID?: string; + + /**return the clicked menu item text + */ + Text?: string; +} + +export interface ItemSelectedEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the clicked menu item element + */ + element?: any; + + /**returns the selected item + */ + selectedItem?: any; + + /**return the menu id + */ + menuId?: string; + + /**return the clicked menu item text + */ + menuText?: string; +} + +export interface OpenEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum ArrowPosition +{ +//To set Left arrowPosition of the split button +Left, +//To set Right arrowPosition of the split button +Right, +//To set Top arrowPosition of the split button +Top, +//To set Bottom arrowPosition of the split button +Bottom, +} + +class Splitter extends ej.Widget { + static fn: Splitter; + constructor(element: JQuery, options?: Splitter.Model); + constructor(element: Element, options?: Splitter.Model); + model:Splitter.Model; + defaults:Splitter.Model; + + /** To add a new pane to splitter control. + * @param {string} content of pane. + * @param {any} pane properties. + * @param {number} index of pane. + * @returns {HTMLElement} + */ + addItem(content: string, property: any, index: number): HTMLElement; + + /** To collapse the splitter control pane. + * @param {number} index number of pane. + * @returns {void} + */ + collapse(paneIndex: number): void; + + /** To expand the splitter control pane. + * @param {number} index number of pane. + * @returns {void} + */ + expand(paneIndex: number): void; + + /** To refresh the splitter control pane resizing. + * @returns {void} + */ + refresh(): void; + + /** To remove a specified pane from the splitter control. + * @param {number} index of pane. + * @returns {void} + */ + removeItem(index: number): void; +} +export module Splitter{ + +export interface Model { + + /**Turns on keyboard interaction with the Splitter panes. You must set this property to true to access the keyboard shortcuts of ejSplitter. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Specify animation speed for the Splitter pane movement, while collapsing and expanding. + * @Default {300} + */ + animationSpeed?: number; + + /**Specify the CSS class to splitter control to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Specifies the animation behavior of the splitter. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the splitter control to be displayed in right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specify height for splitter control. + * @Default {null} + */ + height?: string; + + /**Specifies the HTML Attributes of the Splitter. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specify window resizing behavior for splitter control. + * @Default {false} + */ + isResponsive?: boolean; + + /**Specify the orientation for spliter control. See orientation + * @Default {ej.orientation.Horizontal or “horizontal”} + */ + orientation?: ej.Orientation|string; + + /**Specify properties for each pane like paneSize, minSize, maxSize, collapsible, resizable. + * @Default {[]} + */ + properties?: Array; + + /**Specify width for splitter control. + * @Default {null} + */ + width?: string; + + /**Fires before expanding / collapsing the split pane of splitter control.*/ + beforeExpandCollapse? (e: BeforeExpandCollapseEventArgs): void; + + /**Fires when splitter control pane has been created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when splitter control pane has been destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when expand / collapse operation in splitter control pane has been performed successfully.*/ + expandCollapse? (e: ExpandCollapseEventArgs): void; + + /**Fires when resize in splitter control pane.*/ + resize? (e: ResizeEventArgs): void; +} + +export interface BeforeExpandCollapseEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns collapsed pane details. + */ + collapsed?: any; + + /**returns expanded pane details. + */ + expanded?: any; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the current split bar index. + */ + splitbarIndex?: number; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ExpandCollapseEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns collapsed pane details. + */ + collapsed?: any; + + /**returns expanded pane details. + */ + expanded?: any; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the current split bar index. + */ + splitbarIndex?: number; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns previous pane details. + */ + prevPane?: any; + + /**returns next pane details. + */ + nextPane?: any; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the current split bar index. + */ + splitbarIndex?: number; + + /**returns the name of the event. + */ + type?: string; +} +} + +class Tab extends ej.Widget { + static fn: Tab; + constructor(element: JQuery, options?: Tab.Model); + constructor(element: Element, options?: Tab.Model); + model:Tab.Model; + defaults:Tab.Model; + + /** Add new tab items with given name, url and given index position, if index null it’s add last item. + * @param {string} URL name / tab id. + * @param {string} Tab Display name. + * @param {number} Index position to placed , this is optional. + * @param {string} specifies cssClass, this is optional. + * @param {string} specifies id of tab, this is optional. + * @returns {void} + */ + addItem(url: string, displayLabel: string, index: number, cssClass: string, id: string): void; + + /** To disable the tab control. + * @returns {void} + */ + disable(): void; + + /** To enable the tab control. + * @returns {void} + */ + enable(): void; + + /** This function get the number of tab rendered + * @returns {number} + */ + getItemsCount(): number; + + /** This function hides the tab control. + * @returns {void} + */ + hide(): void; + + /** This function hides the specified item tab in tab control. + * @param {number} index of tab item. + * @returns {void} + */ + hideItem(index: number): void; + + /** Remove the given index tab item. + * @param {number} index of tab item. + * @returns {void} + */ + removeItem(index: number): void; + + /** This function is to show the tab control. + * @returns {void} + */ + show(): void; + + /** This function helps to show the specified hidden tab item in tab control. + * @param {number} index of tab item. + * @returns {void} + */ + showItem(index: number): void; +} +export module Tab{ + +export interface Model { + + /**Specifies the ajaxSettings option to load the content to the Tab control. + */ + ajaxSettings?: AjaxSettings; + + /**Tab items interaction with keyboard keys, like headers active navigation. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Allow to collapsing the active item, while click on the active header. + * @Default {false} + */ + collapsible?: boolean; + + /**Set the root class for Tab theme. This cssClass API helps to use custom skinning option for Tab control. + */ + cssClass?: string; + + /**Disables the given tab headers and content panels. + * @Default {[]} + */ + disabledItemIndex?: number[]; + + /**Specifies the animation behavior of the tab. + * @Default {true} + */ + enableAnimation?: boolean; + + /**When this property is set to false, it disables the tab control. + * @Default {true} + */ + enabled?: boolean; + + /**Enables the given tab headers and content panels. + * @Default {[]} + */ + enabledItemIndex?: number[]; + + /**Save current model value to browser cookies for state maintains. While refresh the Tab control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Display Right to Left direction for headers and panels text of tab. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specify to enable scrolling for Tab header. + * @Default {false} + */ + enableTabScroll?: boolean; + + /**The event API to bind the action for active the tab items. + * @Default {click} + */ + events?: string; + + /**Specifies the position of Tab header as top, bottom, left or right. See below to get availanle Position + * @Default {top} + */ + headerPosition?: string | ej.Tab.Position; + + /**Set the height of the tab header element. Default this property value is null, so height take content height. + * @Default {null} + */ + headerSize?: string|number; + + /**Height set the outer panel element. Default this property value is null, so height take content height. + * @Default {null} + */ + height?: string|number; + + /**Adjust the content panel height for given option (content, auto and fill), by default panels height adjust based on the content.See below to get available HeightAdjustMode + * @Default {content} + */ + heightAdjustMode?: string | ej.Tab.HeightAdjustMode; + + /**Specifies to hide a pane of Tab control. + * @Default {[]} + */ + hiddenItemIndex?: Array; + + /**Specifies the HTML Attributes of the Tab. + * @Default {{}} + */ + htmlAttributes?: any; + + /**The idPrefix property appends the given string on the added tab item id’s in runtime. + * @Default {ej-tab-} + */ + idPrefix?: string; + + /**Specifies the Tab header in active for given index value. + * @Default {0} + */ + selectedItemIndex?: number; + + /**Display the close button for each tab items. While clicking on the close icon, particular tab item will be removed. + * @Default {false} + */ + showCloseButton?: boolean; + + /**Display the Reload button for each tab items. + * @Default {false} + */ + showReloadIcon?: boolean; + + /**Tab panels and headers to be displayed in rounded corner style. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Set the width for outer panel element, if not it’s take parent width. + * @Default {null} + */ + width?: string|number; + + /**Triggered after a tab item activated.*/ + itemActive? (e: ItemActiveEventArgs): void; + + /**Triggered before ajax content has been loaded.*/ + ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + + /**Triggered if error occurs in Ajax request.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**Triggered after ajax content load action.*/ + ajaxLoad? (e: AjaxLoadEventArgs): void; + + /**Triggered after a tab item activated.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**Triggered before a tab item activated.*/ + beforeActive? (e: BeforeActiveEventArgs): void; + + /**Triggered before a tab item remove.*/ + beforeItemRemove? (e: BeforeItemRemoveEventArgs): void; + + /**Triggered before a tab item Create.*/ + create? (e: CreateEventArgs): void; + + /**Triggered before a tab item destroy.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered after new tab item add*/ + itemAdd? (e: ItemAddEventArgs): void; + + /**Triggered after tab item removed.*/ + itemRemove? (e: ItemRemoveEventArgs): void; +} + +export interface ItemActiveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface AjaxBeforeLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns the url of ajax request + */ + url?: string; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface AjaxErrorEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns ajax data details. + */ + data?: any; + + /**returns the url of ajax request. + */ + url?: string; +} + +export interface AjaxLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns the url of ajax request + */ + url?: string; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface AjaxSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**return ajax data. + */ + data?: any; + + /**returns ajax url + */ + url?: string; + + /**returns content of ajax request. + */ + content?: any; +} + +export interface BeforeActiveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface BeforeItemRemoveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns current tab item index + */ + index?: number; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ItemAddEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns new added tab header. + */ + tabHeader?: HTMLElement; + + /**returns new added tab content panel. + */ + tabContent?: any; +} + +export interface ItemRemoveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns removed tab header. + */ + removedTab?: HTMLElement; +} + +export interface AjaxSettings { + + /**It specifies, whether to enable or disable asynchronous request. + * @Default {true} + */ + async?: boolean; + + /**It specifies the page will be cached in the web browser. + * @Default {false} + */ + cache?: boolean; + + /**It specifies the type of data is send in the query string. + * @Default {html} + */ + contentType?: string; + + /**It specifies the data as an object, will be passed in the query string. + * @Default {{}} + */ + data?: any; + + /**It specifies the type of data that you're expecting back from the response. + * @Default {html} + */ + dataType?: string; + + /**It specifies the HTTP request type. + * @Default {get} + */ + type?: string; +} + +enum Position{ + + ///Tab headers display to top position + Top, + + ///Tab headers display to bottom position + Bottom, + + ///Tab headers display to left position. + Left, + + ///Tab headers display to right position. + Right +} + + +enum HeightAdjustMode{ + + ///string + None, + + ///string + Content, + + ///string + Auto, + + ///string + Fill +} + +} + +class TagCloud extends ej.Widget { + static fn: TagCloud; + constructor(element: JQuery, options?: TagCloud.Model); + constructor(element: Element, options?: TagCloud.Model); + model:TagCloud.Model; + defaults:TagCloud.Model; + + /** Inserts a new item into the TagCloud + * @param {string} Insert new item into the TagCloud + * @returns {void} + */ + insert(name: string): void; + + /** Inserts a new item into the TagCloud at a particular position. + * @param {string} Inserts a new item into the TagCloud + * @param {number} Inserts a new item into the TagCloud with the specified position + * @returns {void} + */ + insertAt(name: string, position: number): void; + + /** Removes the item from the TagCloud based on the name. It removes all the tags which have the corresponding name + * @param {string} name of the tag. + * @returns {void} + */ + remove(name: string): void; + + /** Removes the item from the TagCloud based on the position. It removes the tags from the the corresponding position only. + * @param {number} position of tag item. + * @returns {void} + */ + removeAt(position: number): void; +} +export module TagCloud{ + +export interface Model { + + /**Specify the CSS class to button to achieve custom theme. + */ + cssClass?: string; + + /**The dataSource contains the list of data to display in a cloud format. Each data contains a link url, frequency to categorize the font size and a display text. + * @Default {null} + */ + dataSource?: any; + + /**Sets the TagCloud and tag items direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**Defines the mapping fields for the data items of the TagCloud. + * @Default {null} + */ + fields?: Fields; + + /**Defines the format for the TagCloud to display the tag items.See Format + * @Default {ej.Format.Cloud} + */ + format?: string|ej.Format; + + /**Sets the maximum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. + * @Default {40px} + */ + maxFontSize?: string|number; + + /**Sets the minimum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. + * @Default {10px} + */ + minFontSize?: string|number; + + /**Define the query to retrieve the data from online server. The query is used only when the online dataSource is used. + * @Default {null} + */ + query?: any; + + /**Shows or hides the TagCloud title. When this set to false, it hides the TagCloud header. + * @Default {true} + */ + showTitle?: boolean; + + /**Sets the title image for the TagCloud. To show the title image, the showTitle property should be enabled. + * @Default {null} + */ + titleImage?: string; + + /**Sets the title text for the TagCloud. To show the title text, the showTitle property should be enabled. + * @Default {Title} + */ + titleText?: string; + + /**Event triggers when the TagCloud items are clicked*/ + click? (e: ClickEventArgs): void; + + /**Event triggers when the TagCloud are created*/ + create? (e: CreateEventArgs): void; + + /**Event triggers when the TagCloud are destroyed*/ + destroy? (e: DestroyEventArgs): void; + + /**Event triggers when the cursor leaves out from a tag item*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Event triggers when the cursor hovers on a tag item*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; + + /**return current tag name + */ + text?: string; + + /**return current url link + */ + url?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseoutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; + + /**return current tag name + */ + text?: string; + + /**return current url link + */ + url?: string; +} + +export interface MouseoverEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; + + /**return current tag name + */ + text?: string; + + /**return current url link + */ + url?: string; +} + +export interface Fields { + + /**Defines the frequency number to categorize the font size. + */ + frequency?: number; + + /**Defines the html attributes for the anchor elements inside the each tag items. + */ + htmlAttributes?: any; + + /**Defines the tag value or display text. + */ + text?: string; + + /**Defines the url link to navigate while click the tag. + */ + url?: string; +} +} +enum Format +{ +//To render the TagCloud items in cloud format +Cloud, +//To render the TagCloud items in list format +List, +} + +class TimePicker extends ej.Widget { + static fn: TimePicker; + constructor(element: JQuery, options?: TimePicker.Model); + constructor(element: Element, options?: TimePicker.Model); + model:TimePicker.Model; + defaults:TimePicker.Model; + + /** Allows you to disable the TimePicker. + * @returns {void} + */ + disable(): void; + + /** Allows you to enable the TimePicker. + * @returns {void} + */ + enable(): void; + + /** It returns the current time value. + * @returns {string} + */ + getValue(): string; + + /** This method will hide the TimePicker control popup. + * @returns {void} + */ + hide(): void; + + /** Updates the current system time in TimePicker. + * @returns {void} + */ + setCurrentTime(): void; + + /** This method will show the TimePicker control popup. + * @returns {void} + */ + show(): void; +} +export module TimePicker{ + +export interface Model { + + /**Sets the root CSS class for the TimePicker theme, which is used to customize. + */ + cssClass?: string; + + /**Specifies the animation behavior in TimePicker. + * @Default {true} + */ + enableAnimation?: boolean; + + /**When this property is set to false, it disables the TimePicker control. + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for maintaining states. When refreshing the TimePicker control page, the model value is applied from browser cookies or HTML 5local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays the TimePicker as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**When the enableStrictMode is set as true it allows the value outside of the range and also indicate with red color border, otherwise it internally changed to the min or max range value based an input value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**Defines the height of the TimePicker textbox. + */ + height?: string|number; + + /**Sets the step value for increment an hour value through arrow keys or mouse scroll. + * @Default {1} + */ + hourInterval?: number; + + /**It allows to define the characteristics of the TimePicker control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the time interval between the two adjacent time values in the popup. + * @Default {30} + */ + interval?: number; + + /**Defines the localization info used by the TimePicker. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum time value to the TimePicker. + * @Default {11:59:59 PM} + */ + maxTime?: string; + + /**Sets the minimum time value to the TimePicker. + * @Default {12:00:00 AM} + */ + minTime?: string; + + /**Sets the step value for increment the minute value through arrow keys or mouse scroll. + * @Default {1} + */ + minutesInterval?: number; + + /**Defines the height of the TimePicker popup. + * @Default {191px} + */ + popupHeight?: string|number; + + /**Defines the width of the TimePicker popup. + * @Default {auto} + */ + popupWidth?: string|number; + + /**Toggles the readonly state of the TimePicker + * @Default {false} + */ + readOnly?: boolean; + + /**Sets the step value for increment the seconds value through arrow keys or mouse scroll. + * @Default {1} + */ + secondsInterval?: number; + + /**shows or hides the drop down button in TimePicker. + * @Default {true} + */ + showPopupButton?: boolean; + + /**TimePicker is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Defines the time format displayed in the TimePicker. + * @Default {h:mm tt} + */ + timeFormat?: string; + + /**Sets a specified time value on the TimePicker. + * @Default {null} + */ + value?: string|Date; + + /**Defines the width of the TimePicker textbox. + */ + width?: string|number; + + /**Fires when the time value changed in the TimePicker.*/ + beforeChange? (e: BeforeChangeEventArgs): void; + + /**Fires when the TimePicker popup before opened.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when the time value changed in the TimePicker.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the TimePicker popup closed.*/ + close? (e: CloseEventArgs): void; + + /**Fires when create TimePicker successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the TimePicker is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the TimePicker control gets focus.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when the TimePicker control get lost focus.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when the TimePicker popup opened.*/ + open? (e: OpenEventArgs): void; + + /**Fires when the value is selected from the TimePicker dropdown list.*/ + select? (e: SelectEventArgs): void; +} + +export interface BeforeChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the modified time value + */ + value?: string; +} + +export interface BeforeOpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the time value + */ + value?: string; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns true when the value changed by user interaction otherwise returns false + */ + isInteraction?: boolean; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the modified time value + */ + value?: string; +} + +export interface CloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the time value + */ + value?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the current time value + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the current time value + */ + value?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the time value + */ + value?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the selected time value + */ + value?: string; +} +} + +class ToggleButton extends ej.Widget { + static fn: ToggleButton; + constructor(element: JQuery, options?: ToggleButton.Model); + constructor(element: Element, options?: ToggleButton.Model); + model:ToggleButton.Model; + defaults:ToggleButton.Model; + + /** Allows you to destroy the ToggleButton widget. + * @returns {void} + */ + destroy(): void; + + /** To disable the ToggleButton to prevent all user interactions. + * @returns {void} + */ + disable(): void; + + /** To enable the ToggleButton. + * @returns {void} + */ + enable(): void; +} +export module ToggleButton{ + +export interface Model { + + /**Specify the icon in active state to the toggle button and it will be aligned from left margin of the button. + */ + activePrefixIcon?: string; + + /**Specify the icon in active state to the toggle button and it will be aligned from right margin of the button. + */ + activeSuffixIcon?: string; + + /**Sets the text when ToggleButton is in active state i.e.,checked state. + * @Default {null} + */ + activeText?: string; + + /**Specifies the contentType of the ToggleButton. See ContentType as below + * @Default {ej.ContentType.TextOnly} + */ + contentType?: ej.ContentType|string; + + /**Specify the CSS class to the ToggleButton to achieve custom theme. + */ + cssClass?: string; + + /**Specify the icon in default state to the toggle button and it will be aligned from left margin of the button. + */ + defaultPrefixIcon?: string; + + /**Specify the icon in default state to the toggle button and it will be aligned from right margin of the button. + */ + defaultSuffixIcon?: string; + + /**Specifies the text of the ToggleButton, when the control is a default state. i.e., unChecked state. + * @Default {null} + */ + defaultText?: string; + + /**Specifies the state of the ToggleButton. + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for maintaining states. When refreshing the ToggleButton control page, the model value is applied from browser cookies or HTML 5local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left direction of the ToggleButton. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the ToggleButton. + * @Default {28pixel} + */ + height?: number|string; + + /**It allows to define the characteristics of the ToggleButton control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the image position of the ToggleButton. + * @Default {ej.ImagePosition.ImageLeft} + */ + imagePosition?: ej.ImagePosition|string; + + /**Allows to prevents the control switched to checked (active) state. + * @Default {false} + */ + preventToggle?: boolean; + + /**Displays the ToggleButton with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the size of the ToggleButton. See ButtonSize as below + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /**It allows to define the ToggleButton state to checked(Active) or unchecked(Default) at initial time. + * @Default {false} + */ + toggleState?: boolean; + + /**Specifies the type of the ToggleButton. See ButtonType as below + * @Default {ej.ButtonType.Button} + */ + type?: ej.ButtonType|string; + + /**Specifies the width of the ToggleButton. + * @Default {100pixel} + */ + width?: number|string; + + /**Fires when ToggleButton control state is changed successfully.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when ToggleButton control is clicked successfully.*/ + click? (e: ClickEventArgs): void; + + /**Fires when ToggleButton control is created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when ToggleButton control is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**return the toggle button checked state + */ + isChecked?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**return the toggle button checked state + */ + isChecked?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**return the toggle button state + */ + status?: boolean; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**returns the name of the event + */ + type?: string; +} +} + +class Toolbar extends ej.Widget { + static fn: Toolbar; + constructor(element: JQuery, options?: Toolbar.Model); + constructor(element: Element, options?: Toolbar.Model); + model:Toolbar.Model; + defaults:Toolbar.Model; + + /** Deselect the specified Toolbar item. + * @param {any} The element need to be deselected + * @returns {void} + */ + deselectItem(element: any): void; + + /** Deselect the Toolbar item based on specified id. + * @param {string} The ID of the element need to be deselected + * @returns {void} + */ + deselectItemByID(ID: string): void; + + /** Allows you to destroy the Toolbar widget. + * @returns {void} + */ + destroy(): void; + + /** To disable all items in the Toolbar control. + * @returns {void} + */ + disable(): void; + + /** Disable the specified Toolbar item. + * @param {any} The element need to be disabled + * @returns {void} + */ + disableItem(element: any): void; + + /** Disable the Toolbar item based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be disabled + * @returns {void} + */ + disableItemByID(ID: string): void; + + /** Enable the Toolbar if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Enable the Toolbar item based on specified item. + * @param {any} The element need to be enabled + * @returns {void} + */ + enableItem(element: any): void; + + /** Enable the Toolbar item based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be enabled + * @returns {void} + */ + enableItemByID(ID: string): void; + + /** To hide the Toolbar + * @returns {void} + */ + hide(): void; + + /** Remove the item from toolbar, based on specified item. + * @param {any} The element need to be removed + * @returns {void} + */ + removeItem(element: any): void; + + /** Remove the item from toolbar, based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be removed + * @returns {void} + */ + removeItemByID(ID: string): void; + + /** Selects the item from toolbar, based on specified item. + * @param {any} The element need to be selected + * @returns {void} + */ + selectItem(element: any): void; + + /** Selects the item from toolbar, based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be selected + * @returns {void} + */ + selectItemByID(ID: string): void; + + /** To show the Toolbar. + * @returns {void} + */ + show(): void; +} +export module Toolbar{ + +export interface Model { + + /**Sets the root CSS class for Toolbar control to achieve the custom theme. + */ + cssClass?: string; + + /**Specifies dataSource value for the Toolbar control during initialization. + * @Default {null} + */ + dataSource?: any; + + /**Specifies the Toolbar control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies enableRTL property to align the Toolbar control from right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows to separate the each UL items in the Toolbar control. + * @Default {false} + */ + enableSeparator?: boolean; + + /**Specifies the mapping fields for the data items of the Toolbar + * @Default {null} + */ + fields?: string; + + /**Specifies the height of the Toolbar. + * @Default {28} + */ + height?: number|string; + + /**Specifies whether the Toolbar control is need to be show or hide. + * @Default {false} + */ + hide?: boolean; + + /**Enables/Disables the responsive support for Toolbar items during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /**Specifies the Toolbar orientation. See orientation + * @Default {Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Specifies the query to retrieve the data from the online server. The query is used only when the online dataSource is used. + * @Default {null} + */ + query?: any; + + /**Displays the Toolbar with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the width of the Toolbar. + */ + width?: number|string; + + /**Fires after Toolbar control is clicked.*/ + click? (e: ClickEventArgs): void; + + /**Fires after Toolbar control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Toolbar is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires after Toolbar control item is hovered.*/ + itemHover? (e: ItemHoverEventArgs): void; + + /**Fires after mouse leave from Toolbar control item.*/ + itemLeave? (e: ItemLeaveEventArgs): void; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**returns the target of the current object. + */ + currentTarget?: any; + + /**return the Toolbar state + */ + status?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemHoverEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**returns the target of the current object. + */ + currentTarget?: any; + + /**return the Toolbar state + */ + status?: boolean; +} + +export interface ItemLeaveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**returns the target of the current object. + */ + currentTarget?: any; + + /**return the Toolbar state + */ + status?: boolean; +} + +export interface Fields { + + /**Defines the group name for the item. + */ + group?: string; + + /**Defines the html attributes such as id, class, styles for the item to extend the capability. + */ + htmlAttributes?: any; + + /**Defines id for the tag. + */ + id?: string; + + /**Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; + + /**Defines the imageURL for the image location. + */ + imageUrl?: string; + + /**Defines the sprite CSS for the image tag. + */ + spriteCssClass?: string; + + /**Defines the text content for the tag. + */ + text?: string; + + /**Defines the tooltip text for the tag. + */ + tooltipText?: string; +} +} + +class TreeView extends ej.Widget { + static fn: TreeView; + constructor(element: JQuery, options?: TreeView.Model); + constructor(element: Element, options?: TreeView.Model); + model:TreeView.Model; + defaults:TreeView.Model; + + /** To add a Node or collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + addNode(newNodeText: string|any, target: string|any): void; + + /** To add a collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {any|Array} New node details in JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + addNodes(collection: any|Array, target : string|any): void; + + /** To check all the nodes in TreeView. + * @returns {void} + */ + checkAll(): void; + + /** To check a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + checkNode( element : string|any): void; + + /** To collapse all the TreeView nodes. + * @returns {void} + */ + collapseAll(): void; + + /** To collapse a particular node in TreeView. + * @param {string|any} ID of TreeView node|object of TreeView node + * @returns {void} + */ + collapseNode( element : string|any): void; + + /** To disable the node in the TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + disableNode( element : string|any): void; + + /** To enable the node in the TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + enableNode( element : string|any): void; + + /** To ensure that the TreeView node is visible in the TreeView. This method is useful if we need select a TreeView node dynamically. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + ensureVisible( element : string|any): boolean; + + /** To expand all the TreeView nodes. + * @returns {void} + */ + expandAll(): void; + + /** To expandNode particular node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + expandNode( element : string|any): void; + + /** To get currently checked nodes in TreeView. + * @returns {any} + */ + getCheckedNodes(): any; + + /** To get currently checked nodes indexes in TreeView. + * @returns {Array} + */ + getCheckedNodesIndex(): Array; + + /** To get number of nodes in TreeView. + * @returns {number} + */ + getNodeCount(): number; + + /** To get currently expanded nodes in TreeView. + * @returns {any} + */ + getExpandedNodes(): any; + + /** To get currently expanded nodes indexes in TreeView. + * @returns {Array} + */ + getExpandedNodesIndex(): Array; + + /** To get TreeView node by using index position in TreeView. + * @param {number} Index position of TreeView node + * @returns {any} + */ + getNodeByIndex( index : number): any; + + /** To get TreeView node data such as id, text, parentId, selected, checked, expanded, level, childs and index. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {any} + */ + getNode(element: string|any): any; + + /** To get current index position of TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {number} + */ + getNodeIndex(element : string|any): number; + + /** To get immediate parent TreeView node of particular TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {any} + */ + getParent(element : string|any): any; + + /** To get the currently selected node in TreeView. + * @returns {any} + */ + getSelectedNode(): any; + + /** To get the index position of currently selected node in TreeView. + * @returns {number} + */ + getSelectedNodeIndex(): number; + + /** To get the text of a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {string} + */ + getText( element : string|any): string; + + /** To get the updated datasource of TreeView after performing some operation like drag and drop, node editing, adding and removing node. + * @returns {Array} + */ + getTreeData(): Array; + + /** To get currently visible nodes in TreeView. + * @returns {any} + */ + getVisibleNodes(): any; + + /** To check a node having child or not. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + hasChildNode( element : string|any): boolean; + + /** To show nodes in TreeView. + * @returns {void} + */ + hide(): void; + + /** To hide particular node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + hideNode( element : string|any): void; + + /** To add a Node or collection of nodes after the particular TreeView node. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + insertAfter( newNodeText : string|any, target : string|any): void; + + /** To add a Node or collection of nodes before the particular TreeView node. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + insertBefore( newNodeText : string|any, target : string|any): void; + + /** To check the given TreeView node is checked or unchecked. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isNodeChecked( element : string|any): boolean; + + /** To check whether the child nodes are loaded of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isChildLoaded( element : string|any): boolean; + + /** To check the given TreeView node is disabled or enabled. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isDisabled( element : string|any): boolean; + + /** To check the given node is exist in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isExist( element : string|any): boolean; + + /** To get the expand status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isExpanded( element : string|any): boolean; + + /** To get the select status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isSelected( element : string|any): boolean; + + /** To get the visibility status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isVisible( element : string|any): boolean; + + /** To load the TreeView nodes from the particular URL. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {string} URL location, the data returned from the URL will be loaded in TreeView + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + loadData( URL : string, target : string|any): void; + + /** To move the TreeView node with in same TreeView. The new poistion of given TreeView node will be based on destionation node and index position. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {number} New index position of given source node + * @returns {void} + */ + moveNode( sourceNode : string|any, destinationNode : string|any, index : number): void; + + /** To refresh the TreeView + * @returns {void} + */ + refresh(): void; + + /** To remove all the nodes in TreeView. + * @returns {void} + */ + removeAll(): void; + + /** To remove a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + removeNode( element : string|any): void; + + /** To select a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + selectNode( element : string|any): void; + + /** To show nodes in TreeView. + * @returns {void} + */ + show(): void; + + /** To show a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + showNode( element : string|any): void; + + /** To uncheck all the nodes in TreeView. + * @returns {void} + */ + unCheckAll(): void; + + /** To uncheck a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + uncheckNode( element : string|any): void; + + /** To unselect the node in the TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + unselectNode( element : string|any): void; + + /** To edit or update the text of the TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string} New text + * @returns {void} + */ + updateText( target : string|any, newText : string): void; +} +export module TreeView{ + +export interface Model { + + /**Gets or sets a value that indicates whether to enable drag and drop a node within the same tree. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /**Gets or sets a value that indicates whether to enable drag and drop a node in inter ej.TreeView. + * @Default {true} + */ + allowDragAndDropAcrossControl?: boolean; + + /**Gets or sets a value that indicates whether to drop a node to a sibling of particular node. + * @Default {true} + */ + allowDropSibling?: boolean; + + /**Gets or sets a value that indicates whether to drop a node to a child of particular node. + * @Default {true} + */ + allowDropChild?: boolean; + + /**Gets or sets a value that indicates whether to enable node editing support for TreeView. + * @Default {false} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable keyboard support for TreeView actions like nodeSelection, nodeEditing, nodeExpand, nodeCollapse, nodeCut and Paste. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node. + * @Default {true} + */ + autoCheck?: boolean; + + /**Allow us to specify the parent node to be retain in checked or unchecked state instead of going for indeterminate state. + * @Default {false} + */ + autoCheckParentNode?: boolean; + + /**Gets or sets a value that indicates the checkedNodes index collection as an array. The given array index position denotes the nodes, that are checked while rendering TreeView. + * @Default {[]} + */ + checkedNodes?: Array; + + /**Sets the root CSS class for TreeView which allow us to customize the appearance. + */ + cssClass?: string; + + /**Gets or sets a value that indicates whether to enable or disable the animation effect while expanding or collapsing a node. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Gets or sets a value that indicates whether a TreeView can be enabled or disabled. No actions can be performed while this property is set as false + * @Default {true} + */ + enabled?: boolean; + + /**Allow us to prevent multiple nodes to be in expanded state. If it set to false, previously expanded node will be collapsed automatically, while we expand a node. + * @Default {true} + */ + enableMultipleExpand?: boolean; + + /**Sets a value that indicates whether to persist the TreeView model state in page using applicable medium i.e., HTML5 localStorage or cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /**Gets or sets a value that indicates to align content in the TreeView control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**Gets or sets a array of value that indicates the expandedNodes index collection as an array. The given array index position denotes the nodes, that are expanded while rendering TreeView. + * @Default {[]} + */ + expandedNodes?: Array; + + /**Gets or sets a value that indicates the TreeView node can be expand or collapse by using the specified action. + * @Default {dblclick} + */ + expandOn?: string; + + /**Gets or sets a fields object that allow us to map the data members with field properties in order to make the data binding easier. + * @Default {null} + */ + fields?: Fields; + + /**Defines the height of the TreeView. + * @Default {Null} + */ + height?: string|number; + + /**Specifies the HTML Attributes for the TreeView. Using this API we can add custom attributes in TreeView control. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the child nodes to be loaded on demand + * @Default {false} + */ + loadOnDemand?: boolean; + + /**Gets or Sets a value that indicates the index position of a tree node. The particular index tree node will be selected while rendering the TreeView. + * @Default {-1} + */ + selectedNode?: number; + + /**Gets or sets a value that indicates whether to display or hide checkbox for all TreeView nodes. + * @Default {false} + */ + showCheckbox?: boolean; + + /**By using sortSettings property, you can customize the sorting option in TreeView control. + */ + sortSettings?: SortSettings; + + /**Allow us to use custom template in order to create TreeView. + * @Default {null} + */ + template?: string; + + /**Defines the width of the TreeView. + * @Default {Null} + */ + width?: string|number; + + /**Fires before adding node to TreeView.*/ + beforeAdd? (e: BeforeAddEventArgs): void; + + /**Fires before collapse a node.*/ + beforeCollapse? (e: BeforeCollapseEventArgs): void; + + /**Fires before cut node in TreeView.*/ + beforeCut? (e: BeforeCutEventArgs): void; + + /**Fires before deleting node in TreeView.*/ + beforeDelete? (e: BeforeDeleteEventArgs): void; + + /**Fires before editing the node in TreeView.*/ + beforeEdit? (e: BeforeEditEventArgs): void; + + /**Fires before expanding the node.*/ + beforeExpand? (e: BeforeExpandEventArgs): void; + + /**Fires before loading nodes to TreeView.*/ + beforeLoad? (e: BeforeLoadEventArgs): void; + + /**Fires before paste node in TreeView.*/ + beforePaste? (e: BeforePasteEventArgs): void; + + /**Fires before selecting node in TreeView.*/ + beforeSelect? (e: BeforeSelectEventArgs): void; + + /**Fires when TreeView created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when TreeView destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires before nodeEdit Successful.*/ + inlineEditValidation? (e: InlineEditValidationEventArgs): void; + + /**Fires when key pressed successfully.*/ + keyPress? (e: KeyPressEventArgs): void; + + /**Fires when data load fails.*/ + loadError? (e: LoadErrorEventArgs): void; + + /**Fires when data loaded successfully.*/ + loadSuccess? (e: LoadSuccessEventArgs): void; + + /**Fires once node added successfully.*/ + nodeAdd? (e: NodeAddEventArgs): void; + + /**Fires once node checked successfully.*/ + nodeCheck? (e: NodeCheckEventArgs): void; + + /**Fires when node clicked successfully.*/ + nodeClick? (e: NodeClickEventArgs): void; + + /**Fires when node collapsed successfully.*/ + nodeCollapse? (e: NodeCollapseEventArgs): void; + + /**Fires when node cut successfully.*/ + nodeCut? (e: NodeCutEventArgs): void; + + /**Fires when node deleted successfully.*/ + nodeDelete? (e: NodeDeleteEventArgs): void; + + /**Fires when node dragging.*/ + nodeDrag? (e: NodeDragEventArgs): void; + + /**Fires once node drag start successfully.*/ + nodeDragStart? (e: NodeDragStartEventArgs): void; + + /**Fires before the dragged node to be dropped.*/ + nodeDragStop? (e: NodeDragStopEventArgs): void; + + /**Fires once node dropped successfully.*/ + nodeDropped? (e: NodeDroppedEventArgs): void; + + /**Fires once node edited successfully.*/ + nodeEdit? (e: NodeEditEventArgs): void; + + /**Fires once node expanded successfully.*/ + nodeExpand? (e: NodeExpandEventArgs): void; + + /**Fires once node pasted successfully.*/ + nodePaste? (e: NodePasteEventArgs): void; + + /**Fires when node selected successfully.*/ + nodeSelect? (e: NodeSelectEventArgs): void; + + /**Fires once node unchecked successfully.*/ + nodeUncheck? (e: NodeUncheckEventArgs): void; +} + +export interface BeforeAddEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the given new node data + */ + data ?: string|any; + + /**returns the parent element, the given new nodes to be appended to the given parent element + */ + targetParent ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface BeforeCollapseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the child nodes are loaded or not + */ + isChildLoaded ?: boolean; + + /**returns the id of currently clicked node + */ + id ?: string; + + /**returns the parent id of currently clicked node + */ + parentId ?: string; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface BeforeCutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be cut + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface BeforeDeleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be deleted + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the current parent element of the target node + */ + parentElement ?: any; + + /**returns the parent node values + */ + parentDetails ?: any; +} + +export interface BeforeEditEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; +} + +export interface BeforeExpandEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**if the child node is ready to expanded state; otherwise, false. + */ + isChildLoaded ?: boolean; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the id of currently clicked node + */ + id ?: string; + + /**returns the parent id of currently clicked node + */ + parentId ?: string; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface BeforeLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the AJAX settings object + */ + ajaxOptions ?: any; +} + +export interface BeforePasteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be pasted + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface BeforeSelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the target element, the given node to be selected + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface InlineEditValidationEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the new entered text for the node + */ + newText ?: string; + + /**returns the current node element id + */ + id ?: any; + + /**returns the old node text + */ + oldText ?: string; +} + +export interface KeyPressEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns node path from root element + */ + path ?: string; + + /**returns the keypressed keycode value + */ + keyCode ?: number; + + /**it returns when the current node is in expanded state; otherwise, false. + */ + isExpanded ?: boolean; +} + +export interface LoadErrorEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the AJAX error object + */ + error ?: any; +} + +export interface LoadSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the success data from the URL + */ + data ?: any; + + /**returns the target parent element, the data returned from the URL to be appended to the given parent element, else in TreeView + */ + targetParent ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface NodeAddEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the added data, that are given initially + */ + data ?: any; + + /**returns the newly added elements + */ + nodes ?: any; + + /**returns the target parent element of the added element + */ + parentElement ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface NodeCheckEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns the id of the current element of the node clicked + */ + id ?: string; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**it returns true when the node checkbox is checked; otherwise, false. + */ + isChecked ?: boolean; + + /**it returns the currently checked node name + */ + currentNode ?: Array; + + /**it returns the currently checked and its child node details + */ + currentCheckedNodes ?: Array; +} + +export interface NodeClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the id of current element + */ + id ?: string; + + /**returns the parentId of current element + */ + parentId ?: string; +} + +export interface NodeCollapseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the id of the current element of the node clicked + */ + id ?: string; + + /**returns the name of the event + */ + type ?: string; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the child nodes are loaded or not + */ + isChildLoaded ?: boolean; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface NodeCutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current parent element of the cut node + */ + parentElement ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface NodeDeleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current parent element of the deleted node + */ + parentElement ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface NodeDragEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drag target + */ + dragTarget ?: any; + + /**returns the current target TreeView node + */ + target ?: any; + + /**returns the current target details + */ + targetElementData ?: any; + + /**returns the current parent element of the target node + */ + draggedElement ?: any; + + /**returns the given parent node details + */ + draggedElementData ?: any; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeDragStartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drag target + */ + dragTarget ?: any; + + /**returns the current dragging parent TreeView node + */ + parentElement ?: any; + + /**returns the current dragging parent TreeView node details + */ + parentElementData ?: any; + + /**returns the current parent element of the dragging node + */ + target ?: any; + + /**returns the given parent node details + */ + targetElementData ?: any; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeDragStopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drop target + */ + dropTarget ?: any; + + /**returns the current dragged TreeView node + */ + draggedElement ?: any; + + /**returns the current dragged TreeView node details + */ + draggedElementData ?: any; + + /**returns the current parent element of the dragged node + */ + target ?: any; + + /**returns the given parent node details + */ + targetElementData ?: any; + + /**returns the drop position such as before, after or over + */ + position ?: string; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeDroppedEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drop target + */ + dropTarget ?: any; + + /**returns the current dropped TreeView node + */ + droppedElement ?: any; + + /**returns the current dropped TreeView node details + */ + droppedElementData ?: any; + + /**returns the current parent element of the dropped node + */ + target ?: any; + + /**returns the given parent node details + */ + targetElementData ?: any; + + /**returns the drop position such as before, after or over + */ + position ?: string; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeEditEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the id of the element + */ + id ?: string; + + /**returns the oldText of the element + */ + oldText ?: string; + + /**returns the newText of the element + */ + newText ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be cut + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; +} + +export interface NodeExpandEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**if the child node is ready to expanded state; otherwise, false. + */ + isChildLoaded ?: boolean; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the id of currently clicked node + */ + id ?: string; + + /**returns the parent id of currently clicked node + */ + parentId ?: string; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface NodePasteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the pasted element + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface NodeSelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the id of the current element of the node clicked + */ + id ?: any; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; +} + +export interface NodeUncheckEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the id of the current element of the node clicked + */ + id ?: any; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**it returns true when the node checkbox is checked; otherwise, false. + */ + isChecked ?: boolean; + + /**it returns currently unchecked node name + */ + currentNode ?: string; + + /**it returns currently unchecked node and its child node details. + */ + currentUncheckedNodes ?: Array; +} + +export interface Fields { + + /**It receives the child level or inner level data source such as Essential DataManager object and JSON object. + */ + child?: any; + + /**It receives Essential DataManager object and JSON object. + */ + dataSource?: any; + + /**Specifies the node to be in expanded state. + */ + expanded?: boolean; + + /**Its allow us to indicate whether the node has child or not in load on demand + */ + hasChild?: boolean; + + /**Specifies the html attributes to “li” item list. + */ + htmlAttribute?: any; + + /**Specifies the id to TreeView node items list. + */ + id?: string; + + /**Specifies the image attribute to “img” tag inside items list + */ + imageAttribute?: any; + + /**Specifies the html attributes to “li” item list. + */ + imageUrl?: string; + + /**If its true Checkbox node will be checked when rendered with checkbox. + */ + isChecked?: boolean; + + /**Specifies the link attribute to “a” tag in item list. + */ + linkAttribute?: any; + + /**Specifies the parent id of the node. The nodes are listed as child nodes of the specified parent node by using its parent id. + */ + parentId?: string; + + /**It receives query to retrieve data from the table (query is same as SQL). + */ + query?: any; + + /**Allow us to specify the node to be in selected state + */ + selected?: boolean; + + /**Specifies the sprite CSS class to “li” item list. + */ + spriteCssClass?: string; + + /**It receives the table name to execute query on the corresponding table. + */ + tableName?: string; + + /**Specifies the text of TreeView node items list. + */ + text?: string; +} + +export interface SortSettings { + + /**Enables or disables the sorting option in TreeView control + * @Default {false} + */ + allowSorting?: boolean; + + /**Sets the sorting order type. There are two sorting types available, such as "ascending", "descending". + * @Default {ej.sortOrder.Ascending} + */ + sortOrder?: ej.sortOrder|string; +} +} +enum sortOrder +{ +//Enum for Ascending sort order +Ascending, +//Enum for Descending sort order +Descending, +} + +class Uploadbox extends ej.Widget { + static fn: Uploadbox; + constructor(element: JQuery, options?: Uploadbox.Model); + constructor(element: Element, options?: Uploadbox.Model); + model:Uploadbox.Model; + defaults:Uploadbox.Model; + + /** The destroy method destroys the control and brings the control to a pre-init state. All the events of the Upload control is bound by using this._on unbinds automatically. + * @returns {void} + */ + destroy(): void; + + /** Disables the Uploadbox control + * @returns {void} + */ + disable(): void; + + /** Enables the Uploadbox control + * @returns {void} + */ + enable(): void; +} +export module Uploadbox{ + +export interface Model { + + /**Enables the file drag and drop support to the Uploadbox control. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /**Uploadbox supports both synchronous and asynchronous upload. This can be achieved by using the asyncUpload property. + * @Default {true} + */ + asyncUpload?: boolean; + + /**Uploadbox supports auto uploading of files after the file selection is done. + * @Default {false} + */ + autoUpload?: boolean; + + /**Sets the text for each action button. + * @Default {{browse: Browse, upload: Upload, cancel: Cancel, close: Close}} + */ + buttonText?: ButtonText; + + /**Sets the root class for the Uploadbox control theme. This cssClass API helps to use custom skinning option for the Uploadbox button and dialog content. + */ + cssClass?: string; + + /**Specifies the custom file details in the dialog popup on initialization. + * @Default {{ title:true, name:true, size:true, status:true, action:true}} + */ + customFileDetails?: CustomFileDetails; + + /**Specifies the actions for dialog popup while initialization. + * @Default {{ modal:false, closeOnComplete:false, content:null, drag:true}} + */ + dialogAction?: DialogAction; + + /**Displays the Uploadbox dialog at the given X and Y positions. X: Dialog sets the left position value. Y: Dialog sets the top position value. + * @Default {null} + */ + dialogPosition?: any; + + /**Property for applying the text to the Dialog title and content headers. + * @Default {{ title: Upload Box, name: Name, size: Size, status: Status}} + */ + dialogText?: DialogText; + + /**The dropAreaText is displayed when the draganddrop support is enabled in the Uploadbox control. + * @Default {Drop files or click to upload} + */ + dropAreaText?: string; + + /**Specifies the dropAreaHeight when the draganddrop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaHeight?: number|string; + + /**Specifies the dropAreaWidth when the draganddrop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaWidth?: number|string; + + /**Based on the property value, Uploadbox is enabled or disabled. + * @Default {true} + */ + enabled?: boolean; + + /**Sets the right-to-left direction property for the Uploadbox control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Only the files with the specified extension is allowed to upload. This is mentioned in the string format. + */ + extensionsAllow?: string; + + /**Only the files with the specified extension is denied for upload. This is mentioned in the string format. + */ + extensionsDeny?: string; + + /**Sets the maximum size limit for uploading the file. This is mentioned in the number format. + * @Default {31457280} + */ + fileSize?: number; + + /**Sets the height of the browse button. + * @Default {35px} + */ + height?: string; + + /**Configures the culture data and sets the culture to the Uploadbox. + * @Default {en-US} + */ + locale?: string; + + /**Enables multiple file selection for upload. + * @Default {true} + */ + multipleFilesSelection?: boolean; + + /**You can push the file to the Uploadbox in the client-side of the XHR supported browsers alone. + * @Default {null} + */ + pushFile?: any; + + /**Specifies the remove action to be performed after the file uploading is completed. Here, mention the server address for removal. + */ + removeUrl?: string; + + /**Specifies the save action to be performed after the file is pushed for uploading. Here, mention the server address to be saved. + */ + saveUrl?: string; + + /**Enables the browse button support to the Uploadbox control. + * @Default {true} + */ + showBrowseButton?: boolean; + + /**Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. + * @Default {true} + */ + showFileDetails?: boolean; + + /**Sets the name for the Uploadbox control. This API helps to Map the action in code behind to retrieve the files. + */ + uploadName?: string; + + /**Sets the width of the browse button. + * @Default {100px} + */ + width?: string; + + /**Fires when the upload progress begins.*/ + begin? (e: BeginEventArgs): void; + + /**Fires when the upload progress is cancelled.*/ + cancel? (e: CancelEventArgs): void; + + /**Fires when the file upload progress is completed.*/ + complete? (e: CompleteEventArgs): void; + + /**Fires when the file upload progress is completed.*/ + success? (e: SuccessEventArgs): void; + + /**Fires when the Uploadbox control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Uploadbox control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the Upload process ends in Error.*/ + error? (e: ErrorEventArgs): void; + + /**Fires when the file is selected for upload successfully.*/ + fileSelect? (e: FileSelectEventArgs): void; + + /**Fires when the uploaded file is removed successfully.*/ + remove? (e: RemoveEventArgs): void; +} + +export interface BeginEventArgs { + + /**To pass additional information to the server. + */ + data?: any; + + /**Selected FileList Object. + */ + files?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CancelEventArgs { + + /**Canceled FileList Object. + */ + fileStatus?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CompleteEventArgs { + + /**AJAX event argument for reference. + */ + e?: any; + + /**Uploaded file list. + */ + files?: any; + + /**response from the server. + */ + responseText?: string; + + /**XHR-AJAX Object for reference. + */ + xhr?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface SuccessEventArgs { + + /**response from the server. + */ + responseText?: string; + + /**AJAX event argument for reference. + */ + e?: any; + + /**successfully uploaded files list. + */ + success?: any; + + /**Uploaded file list. + */ + files?: any; + + /**XHR-AJAX Object for reference. + */ + xhr?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ErrorEventArgs { + + /**details about the error information. + */ + error?: string; + + /**returns the name of the event. + */ + type?: string; + + /**error event action details. + */ + action?: string; + + /**returns the file details of the file uploaded + */ + files?: any; +} + +export interface FileSelectEventArgs { + + /**returns Selected FileList objects + */ + files?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RemoveEventArgs { + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the file details of the file object + */ + fileStatus?: any; +} + +export interface ButtonText { + + /**Sets the text for the browse button. + */ + browse?: string; + + /**Sets the text for the cancel button. + */ + cancel?: string; + + /**Sets the text for the close button. + */ + Close?: string; + + /**Sets the text for the Upload button inside the dialog popup. + */ + upload?: string; +} + +export interface CustomFileDetails { + + /**Enables the file upload interactions like remove/cancel in File details of the dialog popup. + */ + action?: boolean; + + /**Enables the name in the File details of the dialog popup. + */ + name?: boolean; + + /**Enables or disables the File size details of the dialog popup. + */ + size?: boolean; + + /**Enables or disables the file uploading status visibility in the dialog file details content. + */ + status?: boolean; + + /**Enables the title in File details for the dialog popup. + */ + title?: boolean; +} + +export interface DialogAction { + + /**Once uploaded successfully, the dialog popup closes immediately. + */ + closeOnComplete?: boolean; + + /**Sets the content container option to the Uploadbox dialog popup. + */ + content?: string; + + /**Enables the drag option to the dialog popup. + */ + drag?: boolean; + + /**Enables or disables the Uploadbox dialog’s modal property to the dialog popup. + */ + modal?: boolean; +} + +export interface DialogText { + + /**Sets the uploaded file’s Name (header text) to the Dialog popup. + */ + name?: string; + + /**Sets the upload file Size (header text) to the dialog popup. + */ + size?: string; + + /**Sets the upload file Status (header text) to the dialog popup. + */ + status?: string; + + /**Sets the title text of the dialog popup. + */ + title?: string; +} +} + +class WaitingPopup extends ej.Widget { + static fn: WaitingPopup; + constructor(element: JQuery, options?: WaitingPopup.Model); + constructor(element: Element, options?: WaitingPopup.Model); + model:WaitingPopup.Model; + defaults:WaitingPopup.Model; + + /** To hide the waiting popup + * @returns {void} + */ + hide(): void; + + /** Refreshes the WaitingPopup control by resetting the pop-up panel position and content position + * @returns {void} + */ + refresh(): void; + + /** To show the waiting popup + * @returns {void} + */ + show(): void; +} +export module WaitingPopup{ + +export interface Model { + + /**Sets the root class for the WaitingPopup control theme + * @Default {null} + */ + cssClass?: string; + + /**Enables or disables the default loading icon. + * @Default {true} + */ + showImage?: boolean; + + /**Enables the visibility of the WaitingPopup control + * @Default {false} + */ + showOnInit?: boolean; + + /**Loads HTML content inside the popup panel instead of the default icon + * @Default {null} + */ + template?: any; + + /**Sets the custom text in the pop-up panel to notify the waiting process + * @Default {null} + */ + text?: string; + + /**Fires after Create WaitingPopup successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires after Destroy WaitingPopup successfully*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface CreateEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the WaitingPopup model + */ + model?: ej.WaitingPopup.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the WaitingPopup model + */ + model?: ej.WaitingPopup.Model; + + /**returns the name of the event + */ + type?: string; +} +} + +class Grid extends ej.Widget { + static fn: Grid; + constructor(element: JQuery, options?: Grid.Model); + constructor(element: Element, options?: Grid.Model); + model:Grid.Model; + defaults:Grid.Model; + + /** Adds a grid model property which is to be ignored upon exporting. + * @returns {void} + */ + addIgnoreOnExport(): void; + + /** Add a new record in grid control when allowAdding is set as true. + * @returns {void} + */ + addRecord(): void; + + /** Cancel the modified changes in grid control when edit mode is "batch". + * @returns {void} + */ + batchCancel(): void; + + /** Save the modified changes to data source in grid control when edit mode is "batch". + * @returns {void} + */ + batchSave(): void; + + /** Send a cancel request in grid. + * @returns {void} + */ + cancelEdit(): void; + + /** Send a cancel request to the edited cell in grid. + * @returns {void} + */ + cancelEditCell(): void; + + /** It is used to clear all the cell selection. + * @returns {boolean} + */ + clearCellSelection(): boolean; + + /** It is used to clear all the row selection or at specific row selection based on the index provided. + * @param {number} optional If index of the column is specified then it will remove the selection from the particular column else it will clears all of the column selection + * @returns {boolean} + */ + clearColumnSelection(index: number): boolean; + + /** It is used to clear all the filtering done. + * @param {string} If field of the column is specified then it will clear the particular filtering column + * @returns {void} + */ + clearFiltering(field: string): void; + + /** Clear the searching from the grid + * @returns {void} + */ + clearSearching(): void; + + /** Clear all the row selection or at specific row selection based on the index provided + * @param {number} optional If index of the row is specified then it will remove the selection from the particular row else it will clears all of the row selection + * @returns {boolean} + */ + clearSelection(index: number): boolean; + + /** Clear the sorting from columns in the grid + * @returns {void} + */ + clearSorting(): void; + + /** Collapse all the group caption rows in grid + * @returns {void} + */ + collapseAll(): void; + + /** Collapse the group drop area in grid + * @returns {void} + */ + collapseGroupDropArea(): void; + + /** Add or remove columns in grid column collections + * @param {Array|string} Pass array of columns or string of field name to add/remove the column in grid + * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform + * @returns {void} + */ + columns(columnDetails: Array|string, action: string): void; + + /** Refresh the grid with new data source + * @param {Array} Pass new data source to the grid + * @returns {void} + */ + dataSource(datasource: Array): void; + + /** Delete a record in grid control when allowDeleting is set as true + * @param {string} Pass the primary key field Name of the column + * @param {Array} Pass the json data of record need to be delete. + * @returns {void} + */ + deleteRecord(fieldName: string, data: Array): void; + + /** Destroy the grid widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Edit a particular cell based on the row index and field name provided in "batch" edit mode. + * @param {number} Pass row index to edit particular cell + * @param {string} Pass the field name of the column to perform batch edit + * @returns {void} + */ + editCell(index: number, fieldName: string): void; + + /** Send a save request in grid. + * @returns {void} + */ + endEdit(): void; + + /** Expand all the group caption rows in grid. + * @returns {void} + */ + expandAll(): void; + + /** Expand or collapse the row based on the row state in grid + * @param {JQuery} Pass the target object to expand/collapse the row based on its row state + * @returns {HTMLElement} + */ + expandCollapse($target: JQuery): HTMLElement; + + /** Expand the group drop area in grid. + * @returns {void} + */ + expandGroupDropArea(): void; + + /** Export the grid content to excel, word or pdf document. + * @param {string} Pass the controller action name corresponding to exporting + * @param {string} optionalASP server event name corresponding to exporting + * @param {boolean} optionalPass the multiple exporting value as true/false + * @param {Array} optionalPass the array of the gridIds to be filtered + * @returns {void} + */ + export(action: string, serverEvent: string, multipleExport: boolean, gridIds: Array): void; + + /** Send a filtering request to filter one column in grid. + * @param {string} Pass the field name of the column + * @param {string} string/integer/dateTime operator + * @param {string|number} Pass the value to be filtered in a column + * @param {string} Pass the predicate as and/or + * @param {boolean} optional Pass the match case value as true/false + * @returns {void} + */ + filterColumn(fieldName: string, filterOperator: string, filterValue: string|number, predicate: string, matchcase: boolean): void; + + /** Send a filtering request to filter single or multiple column in grid. + * @param {Array} Pass array of filterColumn query for performing filter operation + * @returns {void} + */ + filterColumn(filterQueries: Array): void; + + /** Get the batch changes of edit, delete and add operations of grid. + * @returns {any} + */ + getBatchChanges(): any; + + /** Get the browser details + * @returns {any} + */ + getBrowserDetails(): any; + + /** Get the column details based on the given field in grid + * @param {string} Pass the field name of the column to get the corresponding column object + * @returns {any} + */ + getColumnByField(fieldName: string): any; + + /** Get the column details based on the given header text in grid. + * @param {string} Pass the header text of the column to get the corresponding column object + * @returns {any} + */ + getColumnByHeaderText(headerText: string): any; + + /** Get the column details based on the given column index in grid + * @param {number} Pass the index of the column to get the corresponding column object + * @returns {any} + */ + getColumnByIndex(columnIndex: number): any; + + /** Get the list of field names from column collection in grid. + * @returns {Array} + */ + getColumnFieldNames(): Array; + + /** Get the column index of the given field in grid. + * @param {string} Pass the field name of the column to get the corresponding column index + * @returns {number} + */ + getColumnIndexByField(fieldName: string): number; + + /** Get the content div element of grid. + * @returns {HTMLElement} + */ + getContent(): HTMLElement; + + /** Get the content table element of grid + * @returns {HTMLElement} + */ + getContentTable(): HTMLElement; + + /** Get the data of currently edited cell value in "batch" edit mode + * @returns {any} + */ + getCurrentEditCellData(): any; + + /** Get the current page index in grid pager. + * @returns {number} + */ + getCurrentIndex(): number; + + /** Get the current page data source of grid. + * @returns {Array} + */ + getCurrentViewData(): Array; + + /** Get the column field name from the given header text in grid. + * @param {string} Pass header text of the column to get its corresponding field name + * @returns {string} + */ + getFieldNameByHeaderText(headerText: string): string; + + /** Get the filter bar of grid + * @returns {HTMLElement} + */ + getFilterBar(): HTMLElement; + + /** Get the records filtered or searched in Grid + * @returns {Array} + */ + getFilteredRecords(): Array; + + /** Get the footer content of grid. + * @returns {HTMLElement} + */ + getFooterContent(): HTMLElement; + + /** Get the footer table element of grid. + * @returns {HTMLElement} + */ + getFooterTable(): HTMLElement; + + /** Get the header content div element of grid. + * @returns {HTMLElement} + */ + getHeaderContent(): HTMLElement; + + /** Get the header table element of grid + * @returns {HTMLElement} + */ + getHeaderTable(): HTMLElement; + + /** Get the column header text from the given field name in grid. + * @param {string} Pass field name of the column to get its corresponding header text + * @returns {string} + */ + getHeaderTextByFieldName(field: string): string; + + /** Get the names of all the hidden column collections in grid. + * @returns {Array} + */ + getHiddenColumnNames(): Array; + + /** Get the row index based on the given tr element in grid. + * @param {JQuery} Pass the tr element in grid content to get its row index + * @returns {number} + */ + getIndexByRow($tr: JQuery): number; + + /** Get the pager of grid. + * @returns {HTMLElement} + */ + getPager(): HTMLElement; + + /** Get the names of primary key columns in Grid + * @returns {Array} + */ + getPrimaryKeyFieldNames(): Array; + + /** Get the rows(tr element) from the given from and to row index in grid + * @param {number} Pass the from index from which the rows to be returned + * @param {number} Pass the to index to which the rows to be returned + * @returns {HTMLElement} + */ + getRowByIndex(from: number, to: number): HTMLElement; + + /** Get the row height of grid. + * @returns {number} + */ + getRowHeight(): number; + + /** Get the rows(tr element)of grid which is displayed in the current page. + * @returns {HTMLElement} + */ + getRows(): HTMLElement; + + /** Get the scroller object of grid. + * @returns {any} + */ + getScrollObject(): any; + + /** Get the selected records details in grid. + * @returns {void} + */ + getSelectedRecords(): void; + + /** Get the names of all the visible column collections in grid + * @returns {Array} + */ + getVisibleColumnNames(): Array; + + /** Send a paging request to specified page in grid + * @param {number} Pass the page index to perform paging at specified page index + * @returns {void} + */ + gotoPage(pageIndex: number): void; + + /** Send a column grouping request in grid. + * @param {string} Pass the field Name of the column to be grouped in grid control + * @returns {void} + */ + groupColumn(fieldName: string): void; + + /** Hide columns from the grid based on the header text + * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide + * @returns {void} + */ + hideColumns(headerText: Array|string): void; + + /** Print the grid control + * @returns {void} + */ + print(): void; + + /** It is used to refresh and reset the changes made in "batch" edit mode + * @returns {void} + */ + refreshBatchEditChanges(): void; + + /** Refresh the grid contents. The template refreshment is based on the argument passed along with this method + * @param {boolean} optional When templateRefresh is set true, template and grid contents both are refreshed in grid else only grid content is refreshed + * @returns {void} + */ + refreshContent(templateRefresh: boolean): void; + + /** Refresh the template of the grid + * @returns {void} + */ + refreshTemplate(): void; + + /** Refresh the toolbar items in grid. + * @returns {void} + */ + refreshToolbar(): void; + + /** Remove a column or collection of columns from a sorted column collections in grid. + * @param {Array|string} Pass array of field names of the columns to remove a collection of sorted columns or pass a string of field name to remove a column from sorted column collections + * @returns {void} + */ + removeSortedColumns(fieldName: Array|string): void; + + /** Creates a grid control + * @returns {void} + */ + render(): void; + + /** Re-order the column in grid + * @param {string} Pass the from field name of the column needs to be changed + * @param {string} Pass the to field name of the column needs to be changed + * @returns {void} + */ + reorderColumns(fromFieldName: string, toFieldName: string): void; + + /** Reset the model collections like pageSettings, groupSettings, filterSettings, sortSettings and summaryRows. + * @returns {void} + */ + resetModelCollections(): void; + + /** Resize the columns by giving column name and width for the corresponding one. + * @param {string} Pass the column name that needs to be changed + * @param {string} Pass the width to resize the particular columns + * @returns {void} + */ + resizeColumns(column: string, width: string): void; + + /** Resolves row height issue when unbound column is used with FrozenColumn + * @returns {void} + */ + rowHeightRefresh(): void; + + /** Save the particular edited cell in grid. + * @returns {boolean} + */ + saveCell(): boolean; + + /** Set dimension for grid with corresponding to grid parent. + * @returns {void} + */ + setDimension(): void; + + /** Send a request to grid to refresh the width set to columns + * @returns {void} + */ + setWidthToColumns(): void; + + /** Send a search request to grid with specified string passed in it + * @param {string} Pass the string to search in Grid records + * @returns {void} + */ + search(searchString: string): void; + + /** Select cells in grid. + * @param {any} It is used to set the starting index of row and indexes of cells for that corresponding row for selecting cells. + * @returns {void} + */ + selectCells(rowCellIndexes: any): void; + + /** Select columns in grid. + * @param {number} It is used to set the starting index of column for selecting columns. + * @returns {void} + */ + selectColumns(fromIndex: number): void; + + /** Select rows in grid. + * @param {number} It is used to set the starting index of row for selecting rows. + * @param {number} It is used to set the ending index of row for selecting rows. + * @returns {void} + */ + selectRows(fromIndex: number, toIndex: number): void; + + /** Select rows in grid. + * @param {Array} Pass array of rowIndexes for selecting rows + * @returns {void} + */ + selectRows(rowIndexes: Array): void; + + /** Used to update a particular cell value.Note: It will work only for Local Data. + * @returns {void} + */ + setCellText(): void; + + /** Used to update a particular cell value based on specified row Index and the fieldName. + * @param {number} It is used to set the index for selecting the row. + * @param {string} It is used to set the field name for selecting column. + * @param {any} It is used to set the value for the selected cell. + * @returns {void} + */ + setCellValue(Index: number, fieldName: string, value: any): void; + + /** Set validation to a field during editing. + * @param {string} Specify the field name of the column to set validation rules + * @param {any} Specify the validation rules for the field + * @returns {void} + */ + setValidationToField(fieldName: string, rules: any): void; + + /** Show columns in the grid based on the header text + * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to show + * @returns {void} + */ + showColumns(headerText: Array|string): void; + + /** Send a sorting request in grid. + * @param {string} Pass the field name of the column as columnName for which sorting have to be performed + * @param {string} optional Pass the sort direction ascending/descending by which the column have to be sort. By default it is sorting in an ascending order + * @returns {void} + */ + sortColumn(columnName: string, sortingDirection: string): void; + + /** Send an edit record request in grid + * @param {JQuery} Pass the tr- selected row element to be edited in grid + * @returns {HTMLElement} + */ + startEdit($tr: JQuery): HTMLElement; + + /** Un-group a column from grouped columns collection in grid + * @param {string} Pass the field Name of the column to be ungrouped from grouped column collection + * @returns {void} + */ + ungroupColumn(fieldName: string): void; + + /** Update a edited record in grid control when allowEditing is set as true. + * @param {string} Pass the primary key field Name of the column + * @param {Array} Pass the edited json data of record need to be update. + * @returns {void} + */ + updateRecord(fieldName: string, data: Array): void; + + /** It adapts grid to its parent element or to the browsers window. + * @returns {void} + */ + windowonresize(): void; +} +export module Grid{ + +export interface Model { + + /**Gets or sets a value that indicates whether to customizing cell based on our needs. + * @Default {false} + */ + allowCellMerging?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic grouping behavior. Grouping can be done by drag on drop desired columns to grid’s GroupDropArea. This can be further customized through “groupSettings” property. + * @Default {false} + */ + allowGrouping?: boolean; + + /**Gets or sets a value that indicates whether to enable keyboard support for performing grid actions. selectionType – Gets or sets a value that indicates whether to enable single row or multiple rows selection behavior in grid. Multiple selection can be done through by holding CTRL and clicking the grid rows + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic filtering behavior on grid. Filtering can be used to limit the records displayed using required criteria and this can be further customized through “filterSettings” property + * @Default {false} + */ + allowFiltering?: boolean; + + /**Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. + * @Default {false} + */ + allowSorting?: boolean; + + /**Gets or sets a value that indicates whether to enable multi columns sorting behavior in grid. Sort multiple columns by holding CTRL and click on the corresponding column header. + * @Default {false} + */ + allowMultiSorting?: boolean; + + /**This specifies the grid to show the paginated data. Also enables pager control at the bottom of grid for dynamic navigation through data source. Paging can be further customized through “pageSettings” property. + * @Default {false} + */ + allowPaging?: boolean; + + /**Gets or sets a value that indicates whether to enable the columns reordering behavior in the grid. Reordering can be done through by drag and drop the particular column from one index to another index within the grid. + * @Default {false} + */ + allowReordering?: boolean; + + /**Gets or sets a value that indicates whether the column is non resizable. Column width is set automatically based on the content or header text which is large. + * @Default {false} + */ + allowResizeToFit?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic resizable of columns. Resize the width of the columns by simply click and move the particular column header line + * @Default {false} + */ + allowResizing?: boolean; + + /**Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually + * @Default {false} + */ + allowScrolling?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic searching behavior in grid. Currently search box can be enabled through “toolbarSettings” + * @Default {false} + */ + allowSearching?: boolean; + + /**Gets or sets a value that indicates whether user can select rows on grid. On enabling feature, selected row will be highlighted. + * @Default {true} + */ + allowSelection?: boolean; + + /**Gets or sets a value that indicates whether the Content will wrap to the next line if the content exceeds the boundary of the Column Cells. + * @Default {false} + */ + allowTextWrap?: boolean; + + /**Gets or sets a value that indicates whether to enable the multiple exporting behavior on grid data. + * @Default {false} + */ + allowMultipleExporting?: boolean; + + /**Gets or sets a value that indicates to define common width for all the columns in the grid. + */ + commonWidth?: number; + + /**Gets or sets a value that indicates to enable the visibility of the grid lines. + * @Default {ej.Grid.GridLines.Both} + */ + gridLines?: ej.Grid.GridLines|string; + + /**This specifies the grid to add the grid control inside the grid row of the parent with expand/collapse options + * @Default {null} + */ + childGrid?: any; + + /**Used to enable or disable static width settings for column. If the columnLayout is set as fixed, then column width will be static. + * @Default {ej.Grid.ColumnLayout.Auto} + */ + columnLayout?: ej.Grid.ColumnLayout|string; + + /**Gets or sets an object that indicates to render the grid with specified columns + * @Default {[]} + */ + columns?: Array; + + /**Gets or sets an object that indicates whether to customize the context menu behavior of the grid. + */ + contextMenuSettings?: ContextMenuSettings; + + /**Gets or sets a value that indicates to render the grid with custom theme. allowScrolling – Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually + */ + cssClass?: string; + + /**Gets or sets the data to render the grid with records + * @Default {null} + */ + dataSource?: any; + + /**Default Value: + * @Default {null} + */ + detailsTemplate?: string; + + /**Gets or sets an object that indicates whether to customize the editing behavior of the grid. + */ + editSettings?: EditSettings; + + /**Gets or sets a value that indicates whether to enable the alternative rows differentiation in the grid records based on corresponding theme. + * @Default {true} + */ + enableAltRow?: boolean; + + /**Gets or sets a value that indicates whether to enable the save action in the grid through row selection + * @Default {true} + */ + enableAutoSaveOnSelectionChange?: boolean; + + /**Gets or sets a value that indicates whether to enable mouse over effect on the corresponding column header cell of the grid + * @Default {false} + */ + enableHeaderHover?: boolean; + + /**Gets or sets a value that indicates whether to persist the grid model state in page using applicable medium i.e., HTML5 localStorage or cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /**Gets or sets a value that indicates whether the grid rows has to be rendered as detail view in mobile mode + * @Default {false} + */ + enableResponsiveRow?: boolean; + + /**Gets or sets a value that indicates whether to enable mouse over effect on corresponding grid row. + * @Default {true} + */ + enableRowHover?: boolean; + + /**Align content in the grid control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**To Disable the mouse swipe property as false. + * @Default {true} + */ + enableTouch?: boolean; + + /**Gets or sets an object that indicates whether to customize the filtering behavior of the grid + */ + filterSettings?: FilterSettings; + + /**Gets or sets an object that indicates whether to customize the grouping behavior of the grid. + */ + groupSettings?: GroupSettings; + + /**Gets or sets an object that indicates whether to auto wrap the grid header or content or both + */ + textWrapSettings?: TextWrapSettings; + + /**Gets or sets a value that indicates whether the grid design has be to made responsive. + * @Default {false} + */ + isResponsive?: boolean; + + /**This specifies to change the key in keyboard interaction to grid control + * @Default {null} + */ + keySettings?: any; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Gets or sets a value that indicates whether to set the minimum width of the responsive grid while isResponsive property is true and enableResponsiveRow property is set as false. + * @Default {0} + */ + minWidth?: number; + + /**Gets or sets an object that indicates whether to modify the pager default configuration. + */ + pageSettings?: PageSettings; + + /**Query the dataSource from the table for Grid. + * @Default {null} + */ + query?: any; + + /**Gets or sets a value that indicates to render the grid with template rows. The template row must be a table row. That table row must have the JavaScript render binding format ({{:columnName}}) then the grid data source binds the data to the corresponding table row of the template. + * @Default {null} + */ + rowTemplate?: string; + + /**Gets or sets an object that indicates whether to customize the scrolling behavior of the grid. + */ + scrollSettings?: ScrollSettings; + + /**Gets or sets an object that indicates whether to customize the searching behavior of the grid + */ + searchSettings?: SearchSettings; + + /**Gets a value that indicates whether the grid model to hold multiple selected records . selectedRecords can be used to displayed hold the single or multiple selected records using “selectedRecords” property + * @Default {null} + */ + selectedRecords?: Array; + + /**Gets or sets a value that indicates to select the row while initializing the grid + * @Default {-1} + */ + selectedRowIndex?: number; + + /**This property is used to configure the selection behavior of the grid. + */ + selectionSettings?: SelectionSettings; + + /**The row selection behavior of grid. Accepting types are "single" and "multiple". + * @Default {ej.Grid.SelectionType.Single} + */ + selectionType?: ej.Grid.SelectionType|string; + + /**This specifies to add new editable row dynamically at the either top or bottom of the grid. + * @Default {false} + */ + showAddNewRow?: boolean; + + /**Default Value: + * @Default {false} + */ + showColumnChooser?: boolean; + + /**Default Value: + * @Default {true} + */ + showInColumnChooser?: boolean; + + /**Gets or sets a value that indicates stacked header should be shown on grid layout when the property “stackedHeaderRows” is set. + * @Default {false} + */ + showStackedHeader?: boolean; + + /**Gets or sets a value that indicates summary rows should be shown on grid layout when the property “summaryRows” is set + * @Default {false} + */ + showSummary?: boolean; + + /**Gets or sets a value that indicates whether to customize the sorting behavior of the grid. + */ + sortSettings?: SortSettings; + + /**Gets or sets an object that indicates to managing the collection of stacked header rows for the grid. + * @Default {[]} + */ + stackedHeaderRows?: Array; + + /**Gets or sets an object that indicates to managing the collection of summary rows for the grid. + * @Default {[]} + */ + summaryRows?: Array; + + /**Gets or sets an object that indicates whether to enable the toolbar in the grid and add toolbar items + */ + toolbarSettings?: ToolbarSettings; + + /**Triggered for every grid action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every grid action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered for every grid action server failure event.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Triggered when record batch add.*/ + batchAdd? (e: BatchAddEventArgs): void; + + /**Triggered when record batch delete.*/ + batchDelete? (e: BatchDeleteEventArgs): void; + + /**Triggered before the batch add.*/ + beforeBatchAdd? (e: BeforeBatchAddEventArgs): void; + + /**Triggered before the batch delete.*/ + beforeBatchDelete? (e: BeforeBatchDeleteEventArgs): void; + + /**Triggered before the batch save.*/ + beforeBatchSave? (e: BeforeBatchSaveEventArgs): void; + + /**Triggered before the record is going to be edited.*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered when record cell edit.*/ + cellEdit? (e: CellEditEventArgs): void; + + /**Triggered when record cell save.*/ + cellSave? (e: CellSaveEventArgs): void; + + /**Triggered after the cell is selected.*/ + cellSelected? (e: CellSelectedEventArgs): void; + + /**Triggered before the cell is going to be selected.*/ + cellSelecting? (e: CellSelectingEventArgs): void; + + /**Triggered when the column is being dragged.*/ + columnDrag? (e: ColumnDragEventArgs): void; + + /**Triggered when column dragging begins.*/ + columnDragStart? (e: ColumnDragStartEventArgs): void; + + /**Triggered when the column is dropped.*/ + columnDrop? (e: ColumnDropEventArgs): void; + + /**Triggered after the column is selected.*/ + columnSelected? (e: ColumnSelectedEventArgs): void; + + /**Triggered before the column is going to be selected.*/ + columnSelecting? (e: ColumnSelectingEventArgs): void; + + /**Triggered when context menu item is clicked*/ + contextClick? (e: ContextClickEventArgs): void; + + /**Triggered before the context menu is opened.*/ + contextOpen? (e: ContextOpenEventArgs): void; + + /**Triggered when the grid is rendered completely.*/ + create? (e: CreateEventArgs): void; + + /**Triggered when the grid is bound with data during initial rendering.*/ + dataBound? (e: DataBoundEventArgs): void; + + /**Triggered when grid going to destroy.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered when detail template row is clicked to collapse.*/ + detailsCollapse? (e: DetailsCollapseEventArgs): void; + + /**Triggered detail template row is initialized.*/ + detailsDataBound? (e: DetailsDataBoundEventArgs): void; + + /**Triggered when detail template row is clicked to expand.*/ + detailsExpand? (e: DetailsExpandEventArgs): void; + + /**Triggered after the record is added.*/ + endAdd? (e: EndAddEventArgs): void; + + /**Triggered after the record is deleted.*/ + endDelete? (e: EndDeleteEventArgs): void; + + /**Triggered after the record is edited.*/ + endEdit? (e: EndEditEventArgs): void; + + /**Triggered initial load.*/ + load? (e: LoadEventArgs): void; + + /**Triggered every time a request is made to access particular cell information, element and data.*/ + mergeCellInfo? (e: MergeCellInfoEventArgs): void; + + /**Triggered every time a request is made to access particular cell information, element and data.*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggered when record is clicked.*/ + recordClick? (e: RecordClickEventArgs): void; + + /**Triggered when record is double clicked.*/ + recordDoubleClick? (e: RecordDoubleClickEventArgs): void; + + /**Triggered after column resized.*/ + resized? (e: ResizedEventArgs): void; + + /**Triggered when column resize end.*/ + resizeEnd? (e: ResizeEndEventArgs): void; + + /**Triggered when column resize start.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Triggered when right clicked on grid element.*/ + rightClick? (e: RightClickEventArgs): void; + + /**Triggered every time a request is made to access row information, element and data.*/ + rowDataBound? (e: RowDataBoundEventArgs): void; + + /**Triggered after the row is selected.*/ + rowSelected? (e: RowSelectedEventArgs): void; + + /**Triggered before the row is going to be selected.*/ + rowSelecting? (e: RowSelectingEventArgs): void; + + /**Triggered when refresh the template column elements in the Grid.*/ + templateRefresh? (e: TemplateRefreshEventArgs): void; + + /**Triggered when toolbar item is clicked in grid.*/ + toolBarClick? (e: ToolBarClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current selected page number. + */ + currentPage?: number; + + /**Returns the previous selected page number. + */ + previousPage?: number; + + /**Returns the end row index of that current page. + */ + endIndex?: number; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the start row index of that current page. + */ + startIndex?: number; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns the column sort direction. + */ + columnSortDirection?: string; + + /**Returns current edited row. + */ + row?: any; + + /**Returns the current action event type. + */ + originalEventType?: string; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the record object (JSON). + */ + data?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the selected row index. + */ + selectedRow?: number; + + /**Returns selected row for delete. + */ + tr?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: any; + + /**Returns filter details. + */ + filterCollection?: any; + + /**Returns type of the column like number, string and so on. + */ + columnType?: string; + + /**Returns the excel filter model. + */ + filtermodel?: any; + + /**Returns the dataSource. + */ + dataSource?: any; + + /**Returns the query manager. + */ + query?: any; + + /**Returns the customfilter option value. + */ + isCustomFilter?: boolean; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current selected page number. + */ + currentPage?: number; + + /**Returns the previous selected page number. + */ + previousPage?: number; + + /**Returns the end row index of that current page. + */ + endIndex?: number; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns the start row index of the current page. + */ + startIndex?: number; + + /**Returns grid element. + */ + target?: any; + + /**Returns the current sorted column field name. + */ + columnName?: string; + + /**Returns the column sort direction. + */ + columnSortDirection?: string; + + /**Returns current edited row. + */ + row?: any; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the record object (JSON). + */ + data?: any; + + /**Returns the selectedRow index. + */ + selectedRow?: number; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns selected row for delete. + */ + tr?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; + + /**Returns the dataSource. + */ + dataSource?: any; + + /**Returns the excel filter model. + */ + filtermodel?: any; + + /**Returns type of the column like number, string and so on. + */ + columnType?: string; + + /**Returns the customfilter option value. + */ + isCustomFilter?: boolean; +} + +export interface ActionFailureEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the error return by server. + */ + error?: any; + + /**Returns the current selected page number. + */ + currentPage?: number; + + /**Returns the previous selected page number. + */ + previousPage?: number; + + /**Returns the end row index of that current page. + */ + endIndex?: number; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns the start row index of the current page. + */ + startIndex?: number; + + /**Returns grid element. + */ + target?: any; + + /**Returns the current sorted column field name. + */ + columnName?: string; + + /**Returns the column sort direction. + */ + columnSortDirection?: string; + + /**Returns current edited row. + */ + row?: any; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the record object (JSON). + */ + data?: any; + + /**Returns the selectedRow index. + */ + selectedRow?: number; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns selected row for delete. + */ + tr?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface BatchAddEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column object. + */ + columnObject?: any; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the row element. + */ + row?: any; + + /**Returns the primaryKey. + */ + primaryKey?: any; + + /**Returns the cell object. + */ + cell?: any; +} + +export interface BatchDeleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the primary key. + */ + primaryKey?: any; + + /**Returns the row Index. + */ + rowIndex?: number; +} + +export interface BeforeBatchAddEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the default data object. + */ + defaultData?: any; + + /**Returns the primaryKey. + */ + primaryKey?: any; +} + +export interface BeforeBatchDeleteEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the primaryKey. + */ + primaryKey?: any; + + /**Returns the row index. + */ + rowIndex?: number; + + /**Returns the row data. + */ + rowData?: any; + + /**Returns the row element. + */ + row?: any; +} + +export interface BeforeBatchSaveEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the changed record object. + */ + batchChanges?: any; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current edited row. + */ + row?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the primary key. + */ + primaryKey?: any; + + /**Returns the primary key value. + */ + primaryKeyValue?: any; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellEditEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the validation rules. + */ + validationRules?: any; + + /**Returns the column name. + */ + columnName?: string; + + /**Returns the cell value. + */ + value?: string; + + /**Returns the row data object. + */ + rowData?: any; + + /**Returns the previous value of the cell. + */ + previousValue?: string; + + /**Returns the column object. + */ + columnObject?: any; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns isForeignKey option value. + */ + isForeignKey?: boolean; +} + +export interface CellSaveEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column name. + */ + columnName?: string; + + /**Returns the cell value. + */ + value?: string; + + /**Returns the row data object. + */ + rowData?: any; + + /**Returns the previous value of the cell. + */ + previousValue?: string; + + /**Returns the column object. + */ + columnObject?: any; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns isForeignKey option value. + */ + isForeignKey?: boolean; +} + +export interface CellSelectedEventArgs { + + /**Returns the selected cell index value. + */ + cellIndex?: number; + + /**Returns the previous selected cell index value. + */ + previousRowCellIndex?: number; + + /**Returns the selected cell element. + */ + currentCell?: any; + + /**Returns the previous selected cell element. + */ + previousRowCell?: any; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the selected row cell index values. + */ + selectedRowCellIndex?: Array; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellSelectingEventArgs { + + /**Returns the selected cell index value. + */ + cellIndex?: number; + + /**Returns the previous selected cell index value. + */ + previousRowCellIndex?: number; + + /**Returns the selected cell element. + */ + currentCell?: any; + + /**Returns the previous selected cell element. + */ + previousRowCell?: any; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns whether the ctrl key is pressed while selecting cell + */ + isCtrlKeyPressed?: boolean; + + /**Returns whether the shift key is pressed while selecting cell + */ + isShiftKeyPressed?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDragEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns draggable element type. + */ + draggableType?: any; + + /**Returns the draggable column object. + */ + column?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns target elements based on mouse move position. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDragStartEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns draggable element type. + */ + draggableType?: any; + + /**Returns the draggable column object. + */ + column?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns drag start element. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDropEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns draggable element type. + */ + draggableType?: string; + + /**Returns the draggable column object. + */ + column?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns dropped dragged element. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnSelectedEventArgs { + + /**Returns the selected cell index value. + */ + columnIndex?: number; + + /**Returns the previous selected column index value. + */ + previousColumnIndex?: number; + + /**Returns the selected header cell element. + */ + headerCell?: any; + + /**Returns the previous selected header cell element. + */ + prevColumnHeaderCell?: any; + + /**Returns corresponding column object (JSON). + */ + column?: any; + + /**Returns the selected columns values. + */ + selectedColumnsIndex?: Array; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnSelectingEventArgs { + + /**Returns the selected column index value. + */ + columnIndex?: number; + + /**Returns the previous selected column index value. + */ + previousColumnIndex?: number; + + /**Returns the selected header cell element. + */ + headerCell?: any; + + /**Returns the previous selected header cell element. + */ + prevColumnHeaderCell?: any; + + /**Returns corresponding column object (JSON). + */ + column?: any; + + /**Returns whether the ctrl key is pressed while selecting cell + */ + isCtrlKeyPressed?: boolean; + + /**Returns whether the shift key is pressed while selecting cell + */ + isShiftKeyPressed?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ContextClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the status of contextmenu item which denotes its enabled state + */ + status?: boolean; + + /**Returns the target item. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ContextOpenEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the status of contextmenu item which denotes its enabled state + */ + status?: boolean; + + /**Returns the target item. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DetailsCollapseEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns detail row element. + */ + detailsRow?: any; + + /**Returns master row of detail row record object (JSON). + */ + masterData?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns master row element. + */ + masterRow?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DetailsDataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns details row element. + */ + detailsElement?: any; + + /**Returns the details row data. + */ + data?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DetailsExpandEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns detail row element. + */ + detailsRow?: any; + + /**Returns master row of detail row record object (JSON). + */ + masterData?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns master row element. + */ + masterRow?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndAddEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns added data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndDeleteEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndEditEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns modified data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface MergeCellInfoEventArgs { + + /**Returns grid cell. + */ + cell?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current row record object (JSON). + */ + data?: any; + + /**Returns the text value in the cell. + */ + text?: string; + + /**Returns the column object. + */ + column?: any; + + /**Method to merge Grid rows. + */ + rowMerge?: void; + + /**Method to merge Grid columns. + */ + colMerge?: void; + + /**Method to merge Grid rows and columns. + */ + merge?: void; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface QueryCellInfoEventArgs { + + /**Returns grid cell. + */ + cell?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current row record object (JSON). + */ + data?: any; + + /**Returns the text value in the cell. + */ + text?: string; + + /**Returns the column object. + */ + column?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RecordClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the jquery object of the current selected row. + */ + row?: any; + + /**Returns the current selected cell. + */ + cell?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the cell index value. + */ + cellIndex?: number; + + /**Returns the corresponding cell value. + */ + cellValue?: string; + + /**Returns the Header text of the column corresponding to the selected cell. + */ + columnName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RecordDoubleClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the jquery object of the current selected row. + */ + row?: any; + + /**Returns the current selected cell. + */ + cell?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the selected cell index value. + */ + cellIndex?: number; + + /**Returns the corresponding cell value. + */ + cellValue?: string; + + /**Returns the Header text of the column corresponding to the selected cell. + */ + columnName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ResizedEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the column object. + */ + column?: any; + + /**Returns the grid object. + */ + target?: any; + + /**Returns the old width value. + */ + oldWidth?: number; + + /**Returns the new width value. + */ + newWidth?: number; +} + +export interface ResizeEndEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the column object. + */ + column?: any; + + /**Returns the grid object. + */ + target?: any; + + /**Returns the old width value. + */ + oldWidth?: number; + + /**Returns the new width value. + */ + newWidth?: number; + + /**Returns the extra width value. + */ + extra?: number; +} + +export interface ResizeStartEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the column object. + */ + column?: any; + + /**Returns the grid object. + */ + target?: any; + + /**Returns the old width value. + */ + oldWidth?: number; +} + +export interface RightClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + currentData?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the current selected row. + */ + row?: any; + + /**Returns the selected row data object. + */ + data?: any; + + /**Returns the cell index of the selected cell. + */ + cellIndex?: number; + + /**Returns the cell value. + */ + cellValue?: string; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowDataBoundEventArgs { + + /**Returns grid row. + */ + row?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current row record object (JSON). + */ + data?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowSelectedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the current selected row. + */ + row?: any; + + /**Returns the previous selected row element. + */ + prevRow?: any; + + /**Returns the previous selected row index. + */ + prevRowIndex?: number; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowSelectingEventArgs { + + /**Returns the selected row index value. + */ + rowIndex?: number; + + /**Returns the selected row element. + */ + row?: any; + + /**Returns the previous selected row element. + */ + prevRow?: any; + + /**Returns the previous selected row index. + */ + prevRowIndex?: number; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface TemplateRefreshEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns the column object. + */ + column?: any; + + /**Returns the current row data. + */ + data?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the current row index. + */ + rowIndex?: number; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ToolBarClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the status of toolbar item which denotes its enabled state + */ + status?: boolean; + + /**Returns the target item. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the grid model. + */ + gridModel?: any; + + /**Returns the toolbar object of the selected toolbar element. + */ + toolbarData?: any; +} + +export interface ColumnsCommands { + + /**Gets or sets an object that indicates to define all the button options which are available in ejButton. + */ + buttonOptions?: any; + + /**Gets or sets a value that indicates to add the command column button. See unboundType + */ + type?: ej.Grid.UnboundType|string; +} + +export interface Columns { + + /**Gets or sets a value that indicates whether to enable editing behavior for particular column. + * @Default {true} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic filtering behavior for particular column. + * @Default {true} + */ + allowFiltering?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic grouping behavior for particular column. + * @Default {true} + */ + allowGrouping?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic sorting behavior for particular column. + * @Default {true} + */ + allowSorting?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic resizable for particular column. + * @Default {true} + */ + allowResizing?: boolean; + + /**Used to hide the particular column in column chooser by giving value as false. + * @Default {true} + */ + showInColumnChooser?: boolean; + + /**Gets or sets an object that indicates to define a command column in the grid. + * @Default {[]} + */ + commands?: Array; + + /**Gets or sets a value that indicates to provide custom css for an individual column. + */ + cssClass?: string; + + /**Gets or sets a value that indicates the attribute values to the td element of a particular column + */ + customAttributes?: any; + + /**Gets or sets a value that indicates to bind the external datasource to the particular column when columnEditType as "dropdownedit" and also it is used to bind the datasource to the foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column. + * @Default {null} + */ + dataSource?: Array; + + /**Gets or sets a value that indicates to display the specified default value while adding a new record to the grid + */ + defaultValue?: string|number|boolean|Date; + + /**Gets or sets a value that indicates to render the grid content and header with an html elements + * @Default {false} + */ + disableHtmlEncode?: boolean; + + /**Gets or sets a value that indicates to display a column value as checkbox or string + * @Default {true} + */ + displayAsCheckBox?: boolean; + + /**Gets or sets a value that indicates to customize ejNumericTextbox of an editable column. See editingType + */ + editParams?: any; + + /**Gets or sets a template that displays a custom editor used to edit column values. See editTemplate + * @Default {null} + */ + editTemplate?: any; + + /**Gets or sets a value that indicates to render the element(based on edit type) for editing the grid record. See editingType + * @Default {ej.Grid.EditingType.String} + */ + editType?: ej.Grid.EditingType|string; + + /**Gets or sets a value that indicates to display the columns in the grid mapping with column name of the dataSource. + */ + field?: string; + + /**Gets or sets a value that indicates to define foreign key field name of the grid datasource. + * @Default {null} + */ + foreignKeyField?: string; + + /**Gets or sets a value that indicates to bind the field which is in foreign column datasource based on the foreignKeyField + * @Default {null} + */ + foreignKeyValue?: string; + + /**Gets or sets a value that indicates the format for the text applied on the column + */ + format?: string; + + /**Gets or sets a value that indicates to add the template within the header element of the particular column. + * @Default {null} + */ + headerTemplateID?: string; + + /**Gets or sets a value that indicates to display the title of that particular column. + */ + headerText?: string; + + /**This defines the text alignment of a particular column header cell value. See headerTextAlign + * @Default {ej.TextAlign.Left} + */ + headerTextAlign?: ej.TextAlign|string; + + /**You can use this property to freeze selected columns in grid at the time of scrolling. + * @Default {false} + */ + isFrozen?: boolean; + + /**Gets or sets a value that indicates the column has an identity in the database. + * @Default {false} + */ + isIdentity?: boolean; + + /**Gets or sets a value that indicates the column is act as a primary key(read-only) of the grid. The editing is performed based on the primary key column + * @Default {false} + */ + isPrimaryKey?: boolean; + + /**Gets or sets a value that indicates whether to bind the column which are not in the datasource + * @Default {false} + */ + isUnbound?: boolean; + + /**Gets or sets a value that indicates whether to enables column template for a particular column. + * @Default {false} + */ + template?: boolean|string; + + /**Gets or sets a value that indicates to add the template as a particular column data . + * @Default {null} + */ + templateID?: string; + + /**Gets or sets a value that indicates to align the text within the column. See textAlign + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + + /**Sets the template for Tooltip in Grid Columns(both header and content) + */ + tooltip?: string; + + /**Sets the clip mode for Grid cell as ellipsis or clipped content(both header and content) + * @Default {ej.Grid.ClipMode.Clip} + */ + clipMode?: ej.Grid.ClipMode|string; + + /**Gets or sets a value that indicates to specify the data type of the specified columns. + */ + type?: string; + + /**Gets or sets a value that indicates to define constraints for saving data to the database. + */ + validationRules?: any; + + /**Gets or sets a value that indicates whether this column is visible in the grid. + * @Default {true} + */ + visible?: boolean; + + /**Gets or sets a value that indicates to define the width for a particular column in the grid. + */ + width?: number; +} + +export interface ContextMenuSettingsSubContextMenu { + + /**Used to get or set the corresponding custom context menu item to which the submenu to be appended. + * @Default {null} + */ + contextMenuItem?: string; + + /**Used to get or set the sub menu items to the custom context menu item. + * @Default {[]} + */ + subMenu?: Array; +} + +export interface ContextMenuSettings { + + /**Gets or sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, if you want selected items from contextmenu you have to mention in the contextMenuItems + * @Default {[]} + */ + contextMenuItems?: Array; + + /**Gets or sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid + * @Default {[]} + */ + customContextMenuItems?: Array; + + /**Gets or sets a value that indicates whether to enable the context menu action in the grid. + * @Default {false} + */ + enableContextMenu?: boolean; + + /**Used to get or set the subMenu to the corresponding custom context menu item. + */ + subContextMenu?: Array; + + /**Gets or sets a value that indicates whether to disable the default context menu items in the grid. + * @Default {false} + */ + disabledefaultitems?: boolean; +} + +export interface EditSettings { + + /**Gets or sets a value that indicates whether to enable insert action in the editing mode. + * @Default {false} + */ + allowAdding?: boolean; + + /**Gets or sets a value that indicates whether to enable the delete action in the editing mode. + * @Default {false} + */ + allowDeleting?: boolean; + + /**Gets or sets a value that indicates whether to enable the edit action in the editing mode. + * @Default {false} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable the editing action while double click on the record + * @Default {true} + */ + allowEditOnDblClick?: boolean; + + /**This specifies the id of the template. This template can be used to display the data that you require to be edited using the Dialog Box + * @Default {null} + */ + dialogEditorTemplateID?: string; + + /**Gets or sets a value that indicates whether to define the mode of editing See editMode + * @Default {ej.Grid.EditMode.Normal} + */ + editMode?: ej.Grid.EditMode|string; + + /**This specifies the id of the template. This template can be used to display the data that you require to be edited using the External edit form + * @Default {null} + */ + externalFormTemplateID?: string; + + /**This specifies to set the position of an External edit form either in the top-right or bottom-left of the grid + * @Default {ej.Grid.FormPosition.BottomLeft} + */ + formPosition?: ej.Grid.FormPosition|string; + + /**This specifies the id of the template. This template can be used to display the data that you require to be edited using the Inline edit form + * @Default {null} + */ + inlineFormTemplateID?: string; + + /**This specifies to set the position of an adding new row either in the top or bottom of the grid + * @Default {ej.Grid.RowPosition.top} + */ + rowPosition?: ej.Grid.RowPosition|string; + + /**Gets or sets a value that indicates whether the confirm dialog has to be shown while saving or discarding the batch changes + * @Default {true} + */ + showConfirmDialog?: boolean; + + /**Gets or sets a value that indicates whether the confirm dialog has to be shown while deleting record + * @Default {false} + */ + showDeleteConfirmDialog?: boolean; + + /**Gets or sets a value that indicates whether the title for edit form is different from the primarykey column. + * @Default {null} + */ + titleColumn?: string; + + /**Gets or sets a value that indicates whether to display the add new form by default in the grid. + * @Default {false} + */ + showAddNewRow?: boolean; +} + +export interface FilterSettingsFilteredColumns { + + /**Gets or sets a value that indicates whether to define the field name of the column to be filter. + */ + field?: string; + + /**Gets or sets a value that indicates whether to define the filter condition to filtered column. + */ + operator?: ej.FilterOperators|string; + + /**Gets or sets a value that indicates whether to define the predicate as and/or. + */ + predicate?: string; + + /**Gets or sets a value that indicates whether to define the value to be filtered in a column. + */ + value?: string|number; +} + +export interface FilterSettings { + + /**Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode + * @Default {false} + */ + enableCaseSensitivity?: boolean; + + /**This specifies the grid to starts the filter action while typing in the filterBar or after pressing the enter key. based on the filterBarMode. See filterBarMode + * @Default {ej.Grid.FilterBarMode.Immediate} + */ + filterBarMode?: ej.Grid.FilterBarMode|string; + + /**Gets or sets a value that indicates whether to define the filtered columns details programmatically at initial load + * @Default {[]} + */ + filteredColumns?: Array; + + /**This specifies the grid to show the filterBar or filterMenu to the grid records. See filterType + * @Default {ej.Grid.FilterType.FilterBar} + */ + filterType?: ej.Grid.FilterType|string; + + /**Gets or sets a value that indicates the maximum number of filter choices that can be showed in the excel styled filter menu. + * @Default {1000} + */ + maxFilterChoices?: number; + + /**This specifies the grid to show the filter text within the grid pager itself. + * @Default {true} + */ + showFilterBarMessage?: boolean; + + /**Gets or sets a value that indicates whether to enable the predicate options in the filtering menu + * @Default {false} + */ + showPredicate?: boolean; +} + +export interface GroupSettings { + + /**Gets or sets a value that customize the group caption format. + * @Default {null} + */ + captionFormat?: string; + + /**Gets or sets a value that indicates whether to enable the animation effects to the group drop area + * @Default {true} + */ + enableDropAreaAnimation?: boolean; + + /**Gets or sets a value that indicates whether to enable animation button option in the group drop area of the grid. + * @Default {false} + */ + enableDropAreaAutoSizing?: boolean; + + /**Gets or sets a value that indicates whether to add grouped columns programmatically at initial load + * @Default {[]} + */ + groupedColumns?: Array; + + /**Gets or sets a value that indicates whether to show the group drop area just above the column header. It can be used to avoid ungrouping the already grouped column using groupsettings. + * @Default {true} + */ + showDropArea?: boolean; + + /**Gets or sets a value that indicates whether to hide the grouped columns from the grid + * @Default {false} + */ + showGroupedColumn?: boolean; + + /**Gets or sets a value that indicates whether to show the group button image(toggle button)in the column header and also in the grouped column in the group drop area . It can be used to group/ungroup the columns by click on the toggle button. + * @Default {false} + */ + showToggleButton?: boolean; + + /**Gets or sets a value that indicates whether to enable the close button in the grouped column which is in the group drop area to ungroup the grouped column + * @Default {false} + */ + showUngroupButton?: boolean; +} + +export interface TextWrapSettings { + + /**This specifies the grid to apply the auto wrap for grid content or header or both. + * @Default {ej.Grid.WrapMode.Both} + */ + wrapMode?: ej.Grid.WrapMode|string; +} + +export interface PageSettings { + + /**Gets or sets a value that indicates whether to define which page to display currently in the grid + * @Default {1} + */ + currentPage?: number; + + /**Gets or sets a value that indicates whether to pass the current page information as a query string along with the url while navigating to other page. + * @Default {false} + */ + enableQueryString?: boolean; + + /**Gets or sets a value that indicates whether to enables pager template for the grid. + * @Default {false} + */ + enableTemplates?: boolean; + + /**Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation + * @Default {8} + */ + pageCount?: number; + + /**Gets or sets a value that indicates whether to define the number of records displayed per page + * @Default {12} + */ + pageSize?: number; + + /**Gets or sets a value that indicates whether to enables default pager for the grid. + * @Default {false} + */ + showDefaults?: boolean; + + /**Gets or sets a value that indicates to add the template as a pager template for grid. + * @Default {null} + */ + template?: string; + + /**Get the value of total number of pages in the grid. The totalPages value is calculated based on page size and total records of grid + * @Default {null} + */ + totalPages?: number; + + /**Get the value of total number of records which is bound to the grid. The totalRecordsCount value is calculated based on dataSource bound to the grid. + * @Default {null} + */ + totalRecordsCount?: number; + + /**Gets or sets a value that indicates whether to define the number of pages to print + * @Default {ej.Grid.PrintMode.AllPages} + */ + printMode?: ej.Grid.PrintMode|string; +} + +export interface ScrollSettings { + + /**This specify the grid to to view data that you require without buffering the entire load of a huge database + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /**This specify the grid to enable/disable touch control for scrolling. + * @Default {true} + */ + enableTouchScroll?: boolean; + + /**This specify the grid to freeze particular columns at the time of scrolling. + * @Default {0} + */ + frozenColumns?: number; + + /**This specify the grid to freeze particular rows at the time of scrolling. + * @Default {0} + */ + frozenRows?: number; + + /**This specify the grid to show the vertical scroll bar, to scroll and view the grid contents. + * @Default {0} + */ + height?: number; + + /**This is used to define the mode of virtual scrolling in grid. See virtualScrollMode + * @Default {ej.Grid.VirtualScrollMode.Normal} + */ + virtualScrollMode?: ej.Grid.VirtualScrollMode|string; + + /**This specify the grid to show the horizontal scroll bar, to scroll and view the grid contents + * @Default {250} + */ + width?: number; + + /**This specify the scroll down pixel of mouse wheel, to scroll mouse wheel and view the grid contents. + * @Default {57} + */ + scrollOneStepBy?: number; +} + +export interface SearchSettings { + + /**This specify the grid to search for the value in particular columns that is mentioned in the field. + * @Default {[]} + */ + field?: any; + + /**This specifies the grid to search the particular data that is mentioned in the key. + */ + key?: string; + + /**It specifies the grid to search the records based on operator. + * @Default {contains} + */ + operator?: string; + + /**It enables or disables case-sensitivity while searching the search key in grid. + * @Default {true} + */ + ignoreCase?: boolean; +} + +export interface SelectionSettings { + + /**Gets or sets a value that indicates whether to enable the toggle selction behavior for row, cell and column. + * @Default {false} + */ + enableToggle?: boolean; + + /**Gets or sets a value that indicates whether to add the default selection actions as a seleciton mode.See selectionMode + * @Default {[row]} + */ + selectionMode?: ej.Grid.SelectionMode|string; +} + +export interface SortSettingsSortedColumns { + + /**Gets or sets a value that indicates whether to define the direction to sort the column. + */ + direction?: string; + + /**Gets or sets a value that indicates whether to define the field name of the column to be sort + */ + field?: string; +} + +export interface SortSettings { + + /**Gets or sets a value that indicates whether to define the direction and field to sort the column. + */ + sortedColumns?: Array; +} + +export interface StackedHeaderRowsStackedHeaderColumns { + + /**Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + column?: string; + + /**Gets or sets a value that indicates class to the corresponding stackedHeaderColumn. + * @Default {null} + */ + cssClass?: string; + + /**Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + headerText?: string; + + /**Gets or sets a value that indicates the text alignment of the corresponding headerText. + * @Default {ej.TextAlign.Left} + */ + textAlign?: string; +} + +export interface StackedHeaderRows { + + /**Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows + * @Default {[]} + */ + stackedHeaderColumns?: Array; +} + +export interface SummaryRowsSummaryColumns { + + /**Gets or sets a value that indicates the text displayed in the summary column as a value + * @Default {null} + */ + customSummaryValue?: string; + + /**This specifies summary column used to perform the summary calculation + * @Default {null} + */ + dataMember?: string; + + /**Gets or sets a value that indicates to define the target column at which to display the summary. + * @Default {null} + */ + displayColumn?: string; + + /**Gets or sets a value that indicates the format for the text applied on the column + * @Default {null} + */ + format?: string; + + /**Gets or sets a value that indicates the text displayed before the summary column value + * @Default {null} + */ + prefix?: string; + + /**Gets or sets a value that indicates the text displayed after the summary column value + * @Default {null} + */ + suffix?: string; + + /**Gets or sets a value that indicates the type of calculations to be performed for the corresponding summary column + * @Default {[]} + */ + summaryType?: ej.Grid.SummaryType|string; + + /**Gets or sets a value that indicates to add the template for the summary value of dataMember given. + * @Default {null} + */ + template?: string; +} + +export interface SummaryRows { + + /**Gets or sets a value that indicates whether to show the summary value within the group caption area for the corresponding summary column while grouping the column + * @Default {false} + */ + showCaptionSummary?: boolean; + + /**Gets or sets a value that indicates whether to show the group summary value for the corresponding summary column while grouping a column + * @Default {false} + */ + showGroupSummary?: boolean; + + /**Gets or sets a value that indicates whether to show the total summary value the for the corresponding summary column. The summary row is added after the grid content. + * @Default {true} + */ + showTotalSummary?: boolean; + + /**Gets or sets a value that indicates whether to add summary columns into the summary rows. + * @Default {[]} + */ + summaryColumns?: Array; + + /**This specifies the grid to show the title for the summary rows. + */ + title?: string; + + /**This specifies the grid to show the title of summary row in the specified column. + * @Default {null} + */ + titleColumn?: string; +} + +export interface ToolbarSettings { + + /**Gets or sets a value that indicates whether to add custom toolbar items within the toolbar to perform any action in the grid + * @Default {[]} + */ + customToolbarItems?: Array; + + /**Gets or sets a value that indicates whether to enable toolbar in the grid. + * @Default {false} + */ + showToolbar?: boolean; + + /**Gets or sets a value that indicates whether to add the default editing actions as a toolbar items + * @Default {[]} + */ + toolbarItems?: ej.Grid.ToolBarItems|string; +} + +enum GridLines{ + + ///Displays both the horizontal and vertical grid lines. + Both, + + ///Displays the horizontal grid lines only. + Horizontal, + + ///Displays the vertical grid lines only. + Vertical, + + ///No grid lines are displayed. + None +} + + +enum ColumnLayout{ + + ///Column layout is auto(based on width). + Auto, + + ///Column layout is fixed(based on width). + Fixed +} + + +enum UnboundType{ + + ///Unbound type is edit. + Edit, + + ///Unbound type is save. + Save, + + ///Unbound type is delete. + Delete, + + ///Unbound type is cancel. + Cancel +} + + +enum EditingType{ + + ///Specifies editing type as string edit. + String, + + ///Specifies editing type as boolean edit. + Boolean, + + ///Specifies editing type as numeric edit. + Numeric, + + ///Specifies editing type as dropdown edit. + Dropdown, + + ///Specifies editing type as datepicker. + DatePicker, + + ///Specifies editing type as datetime picker. + DateTimePicker +} + + +enum ClipMode{ + + ///Shows ellipsis for the overflown cell. + Ellipsis, + + ///Truncate the text in the cell + Clip, + + ///Shows ellipsis and tooltip for the overflown cell. + EllipsisWithTooltip +} + + +enum EditMode{ + + ///Edit mode is normal. + Normal, + + ///Truncate the text in the cell + Clip, + + ///Edit mode is dialog. + Dialog, + + ///Edit mode is dialog template. + DialogTemplate, + + ///Edit mode is batch. + Batch, + + ///Edit mode is inline form. + InlineForm, + + ///Edit mode is inline template form. + InlineTemplateForm, + + ///Edit mode is external form. + ExternalForm, + + ///Edit mode is external form template. + ExternalFormTemplate +} + + +enum FormPosition{ + + ///Form position is bottomleft. + BottomLeft, + + ///Form position is topright. + TopRight +} + + +enum RowPosition{ + + ///Specifies position of add new row as top. + Top, + + ///Specifies position of add new row as bottom. + Bottom +} + + +enum FilterBarMode{ + + ///Initiate filter operation on typing the filter query. + Immediate, + + ///Initiate filter operation after Enter key is pressed. + OnEnter +} + + +enum FilterType{ + + ///Specifies the filter type as menu. + Menu, + + ///Specifies the filter type as excel. + Excel, + + ///Specifies the filter type as filterbar. + FilterBar +} + + +enum WrapMode{ + + ///Auto wrap is applied for both content and header. + Both, + + ///Auto wrap is applied only for content. + Content, + + ///Auto wrap is applied only for header. + Header +} + + +enum PrintMode{ + + ///Prints all pages. + AllPages, + + ///Prints curren tpage. + CurrentPage +} + + +enum VirtualScrollMode{ + + ///virtual scroll mode is normal. + Normal, + + ///virtual scroll mode is continuous. + Continuous +} + + +enum SelectionMode{ + + ///Selection is row basis. + Row, + + ///Selection is cell basis. + Cell, + + ///Selection is column basis. + Column +} + + +enum SelectionType{ + + ///Specifies the selection type as single. + Single, + + ///Specifies the selection type as multiple. + Multiple +} + + +enum SummaryType{ + + ///Summary type is average. + Average, + + ///Summary type is minimum. + Minimum, + + ///Summary type is maximum. + Maximum, + + ///Summary type is count. + Count, + + ///Summary type is sum. + Sum, + + ///Summary type is custom. + Custom, + + ///Summary type is true count. + TrueCount, + + ///Summary type is false count. + FalseCount +} + + +enum ToolBarItems{ + + ///Toolbar item is add. + Add, + + ///Toolbar item is edit. + Edit, + + ///Toolbar item is delete. + Delete, + + ///Toolbar item is update. + Update, + + ///Toolbar item is cancel. + Cancel, + + ///Toolbar item is search. + Search, + + ///Toolbar item is pdfExport. + PdfExport, + + ///Toolbar item is printGrid. + PrintGrid, + + ///Toolbar item is wordExport. + WordExport +} + +} + +class PivotGrid extends ej.Widget { + static fn: PivotGrid; + constructor(element: JQuery, options?: PivotGrid.Model); + constructor(element: Element, options?: PivotGrid.Model); + model:PivotGrid.Model; + defaults:PivotGrid.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the PivotGrid to an appropriate format based on the parameter passed. + * @returns {void} + */ + exportPivotGrid(): void; + + /** This function re-renders the PivotGrid on clicking the navigation buttons on PivotPager. + * @returns {void} + */ + refreshPagedPivotGrid(): void; + + /** This function receives the JSON formatted datasource to render the PivotGrid control. + * @returns {void} + */ + renderControlFromJSON(): void; +} +export module PivotGrid{ + +export interface Model { + + /**Sets the mode for the PivotGrid widget for binding either OLAP or relational data source. + * @Default {ej.PivotGrid.AnalysisMode.Olap} + */ + analysisMode?: any; + + /**Specifies the CSS class to PivotGrid to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Contains the serialized OlapReport at that instant. + * @Default {“”} + */ + currentReport?: string; + + /**Initializes the data source for the PivotGrid widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /**Used to bind the drilled members by default through report. + * @Default {[]} + */ + drilledItems?: Array; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {null} + */ + customObject?: any; + + /**Allows the user to access each cell on right-click. + * @Default {false} + */ + enableCellContext?: boolean; + + /**Enables the cell selection for a specified range of value cells. + * @Default {false} + */ + enableCellSelection?: boolean; + + /**Collapses the Pivot Items along rows and columns by default. It works only for relational data source. + * @Default {false} + */ + enableCollapseByDefault?: boolean; + + /**Enables the display of grand total for all the columns. + * @Default {true} + */ + enableColumnGrandTotal?: boolean; + + /**Allows the user to format a specific set of cells based on the condition. + * @Default {false} + */ + enableConditionalFormatting?: boolean; + + /**Allows the user to refresh the control on-demand and not during every UI operation. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /**Enables the display of GroupingBar allowing you to filter, sort and remove fields obtained from relational datasource. + * @Default {false} + */ + enableGroupingBar?: boolean; + + /**Enables the display of grand total for rows and columns. + * @Default {true} + */ + enableGrandTotal?: boolean; + + /**Allows the user to load PivotGrid using JSON data. + * @Default {false} + */ + enableJSONRendering?: boolean; + + /**Enables rendering of PivotGrid widget along with the PivotTable Field List, which allows UI operation. + * @Default {true} + */ + enablePivotFieldList?: boolean; + + /**Enables the display of grand total for all the rows. + * @Default {true} + */ + enableRowGrandTotal?: boolean; + + /**Allows the user to view PivotGrid from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows the user to enable ToolTip option. + * @Default {false} + */ + enableToolTip?: boolean; + + /**Allows the user to view large amount of data through virtual scrolling. + * @Default {false} + */ + enableVirtualScrolling?: boolean; + + /**Allows the user to configure hyperlink settings of PivotGrid control. + * @Default {{}} + */ + hyperlinkSettings?: HyperlinkSettings; + + /**This is used for identifying whether the member is Named Set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /**Allows the user to enable PivotGrid’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Contains the serialized JSON string which renders PivotGrid. + * @Default {“”} + */ + jsonRecords?: string; + + /**Sets the summary layout for PivotGrid. Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. + * @Default {ej.PivotGrid.Layout.Normal} + */ + layout?: ej.PivotGrid.Layout|string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Sets the mode for the PivotGrid widget for binding data source either in server-side or client-side. + * @Default {ej.PivotGrid.OperationalMode.ClientMode} + */ + operationalMode?: any; + + /**Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from PivotGrid to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers when right-click action is performed on a cell.*/ + cellContext? (e: CellContextEventArgs): void; + + /**Triggers when a specific range of value cells are selected.*/ + cellSelection? (e: CellSelectionEventArgs): void; + + /**Triggers when the hyperlink of column header is clicked.*/ + columnHeaderHyperlinkClick? (e: ColumnHeaderHyperlinkClickEventArgs): void; + + /**Triggers after performing drill operation in PivotGrid.*/ + drillSuccess? (e: DrillSuccessEventArgs): void; + + /**Triggers when PivotGrid loading is initiated.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when PivotGrid widget completes all operations at client-side after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when PivotGrid successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; + + /**Triggers when the hyperlink of row header is clicked.*/ + rowHeaderHyperlinkClick? (e: RowHeaderHyperlinkClickEventArgs): void; + + /**Triggers when the hyperlink of summary cell is clicked.*/ + summaryCellHyperlinkClick? (e: SummaryCellHyperlinkClickEventArgs): void; + + /**Triggers when the hyperlink of value cell is clicked.*/ + valueCellHyperlinkClick? (e: ValueCellHyperlinkClickEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of PivotGrid control. + */ + action?: string; + + /**return the custom object bounds with PivotGrid control. + */ + customObject?: any; + + /**return the outer HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of PivotGrid control. + */ + action?: string; + + /**return the custom object bounds with PivotGrid control. + */ + customObject?: any; + + /**return the outer HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface CellContextEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface CellSelectionEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**Returns the selected cell values. + */ + cellvalue?: any; + + /**Returns the selected value cells row headers. + */ + rowheaders?: any; + + /**Returns the selected value cells column headers. + */ + colheaders?: any; + + /**Returns the selected value cells measure. + */ + measure?: any; + + /**Return the row and column measure count. + */ + measureValue?: any; +} + +export interface ColumnHeaderHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface DrillSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**returns the error message with error code. + */ + message?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RowHeaderHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface SummaryCellHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface ValueCellHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface DataSourceValues { + + /**This holds the measures unique names to bind the measures from Cube. + * @Default {[]} + */ + measures?: Array; + + /**To set the axis name in-order to place the measures. + * @Default {“”} + */ + axis?: string; +} + +export interface DataSource { + + /**Contains the database name as string type to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; + + /**Lists out the items to be arranged in column section of PivotGrid. + * @Default {[]} + */ + columns?: Array; + + /**Contains the respective Cube name as string type. + * @Default {“”} + */ + cube?: string; + + /**Provides the raw data source for the PivotGrid. + * @Default {null} + */ + data?: any; + + /**Lists out the items to be arranged in row section of PivotGrid. + * @Default {[]} + */ + rows?: Array; + + /**Lists out the items which supports calculation in PivotGrid. + * @Default {[]} + */ + values?: Array; + + /**Lists out the items which supports filtering of values in PivotGrid. + * @Default {[]} + */ + filters?: Array; +} + +export interface HyperlinkSettings { + + /**Allows the user to enable/disable hyperlink for column header. + * @Default {false} + */ + enableColumnHeaderHyperlink?: boolean; + + /**Allows the user to enable/disable hyperlink for row header. + * @Default {false} + */ + enableRowHeaderHyperlink?: boolean; + + /**Allows the user to enable/disable hyperlink for summary cells. + * @Default {false} + */ + enableSummaryCellHyperlink?: boolean; + + /**Allows the user to enable/disable hyperlink for value cells. + * @Default {false} + */ + enableValueCellHyperlink?: boolean; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that's responsible for drill up/down operation in PivotGrid. + * @Default {DrillGrid} + */ + drillDown?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportPivotGrid?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for performing server-side actions on defer update. + * @Default {DeferUpdate} + */ + deferUpdate?: string; + + /**Allows the user to set the custom name for the service method that’s responsible to getting the values for the tree-view inside filter dialog. + * @Default {FetchMembers} + */ + fetchMembers?: string; + + /**Allows the user to set the custom name for the service method that's responsible for filtering operation in PivotGrid. + * @Default {Filtering} + */ + filtering?: string; + + /**Allows the user to set the custom name for the service method that's responsible for initializing PivotGrid. + * @Default {InitializeGrid} + */ + initialize?: string; + + /**Allows the user to set the custom name for the service method that's responsible for the server-side action, on dropping a node into Field List. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action on changing the checked state of a node in Field List. + * @Default {NodeStateModified} + */ + nodeStateModified?: string; + + /**Allows the user to set the custom name for the service method that's responsible for performing paging operation in PivotGrid. + * @Default {Paging} + */ + paging?: string; + + /**Allows the user to set the custom name for the service method that's responsible for sorting operation in PivotGrid. + * @Default {Sorting} + */ + sorting?: string; +} + +enum Layout{ + + ///To set normal summary layout in PivotGrid. + Normal, + + ///To set layout with summaries at the top in PivotGrid. + NormalTopSummary, + + ///To set layout without summaries in PivotGrid. + NoSummaries, + + ///To set excel-like layout in PivotGrid. + ExcelLikeLayout +} + +} + +class PivotSchemaDesigner extends ej.Widget { + static fn: PivotSchemaDesigner; + constructor(element: JQuery, options?: PivotSchemaDesigner.Model); + constructor(element: Element, options?: PivotSchemaDesigner.Model); + model:PivotSchemaDesigner.Model; + defaults:PivotSchemaDesigner.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; +} +export module PivotSchemaDesigner{ + +export interface Model { + + /**Specifies the CSS class to PivotSchemaDesigner to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**For ASP.NET and MVC Wrapper, Pivots Schema Designer will be initialized and rendered empty initially. Once PivotGrid widget is rendered completely, Pivots Schema Designer will just be populated with data source by setting this property to “true”. + * @Default {false} + */ + enableWrapper?: boolean; + + /**Allows the user to set the list of filters in filter section. + * @Default {newArray()} + */ + filters?: Array; + + /**Sets the height for PivotSchemaDesigner. + * @Default {“”} + */ + height?: string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Allows the user to set list of PivotCalculations in values section. + * @Default {newArray()} + */ + pivotCalculations?: Array; + + /**Allows the user to set the list of PivotItems in column section. + * @Default {newArray()} + */ + pivotColumns?: Array; + + /**Sets the Pivot control bound with this PivotSchemaDesigner. + * @Default {null} + */ + pivotControl?: any; + + /**Allows the user to set the list of PivotItems in row section. + * @Default {newArray()} + */ + pivotRows?: Array; + + /**Allows the user to arrange the fields inside Field List of PivotSchemaDesigner. + * @Default {newArray()} + */ + pivotTableFields?: Array; + + /**Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethod?: ServiceMethod; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Sets the width for PivotSchemaDesigner. + * @Default {“”} + */ + width?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from PivotSchemaDesigner to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of PivotSchemaDesigner control. + */ + action?: string; + + /**return the custom object bounds with PivotSchemaDesigner control. + */ + customObject?: any; + + /**return the outer HTML of PivotSchemaDesigner control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotSchemaDesigner model + */ + model?: ej.PivotSchemaDesigner.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of PivotSchemaDesigner control. + */ + action?: string; + + /**return the custom object bounds with PivotSchemaDesigner control. + */ + customObject?: any; + + /**return the outer HTML of PivotSchemaDesigner control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotSchemaDesigner model + */ + model?: ej.PivotSchemaDesigner.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ServiceMethod { + + /**Allows the user to set the custom name for the service method that’s responsible for getting the values for the tree-view inside filter dialog. + * @Default {FetchMembers} + */ + fetchMembers?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for filtering operation in Field List. + * @Default {Filtering} + */ + filtering?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action, on expanding members in Field List. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action, on dropping a node into Field List. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action on changing the checked state of a node in Field List. + * @Default {NodeStateModified} + */ + nodeStateModified?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for remove operation in Field List. + * @Default {RemoveButton} + */ + removeButton?: string; +} +} + +class PivotPager extends ej.Widget { + static fn: PivotPager; + constructor(element: JQuery, options?: PivotPager.Model); + constructor(element: Element, options?: PivotPager.Model); + model:PivotPager.Model; + defaults:PivotPager.Model; + + /** This function initializes the page counts and page numbers for the PivotPager. + * @returns {void} + */ + initPagerProperties(): void; +} +export module PivotPager{ + +export interface Model { + + /**Contains the current page number in categorical axis. + * @Default {1} + */ + categoricalCurrentPage?: number; + + /**Contains the total page count in categorical axis. + * @Default {1} + */ + categoricalPageCount?: number; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Sets the pager mode (Only Categorical Pager/Only Series Pager/Both) for the PivotPager. + * @Default {ej.PivotPager.Mode.Both} + */ + mode?: ej.PivotPager.Mode|string; + + /**Contains the current page number in series axis. + * @Default {1} + */ + seriesCurrentPage?: number; + + /**Contains the total page count in series axis. + * @Default {1} + */ + seriesPageCount?: number; + + /**Contains the ID of the target element for which paging needs to be done. + * @Default {“”} + */ + targetControlID?: string; +} + +enum Mode{ + + ///To set both categorical and series pager for paging. + Both, + + ///To set only categorical pager for paging. + Categorical, + + ///To set only series pager for paging. + Series +} + +} + +class Schedule extends ej.Widget { + static fn: Schedule; + constructor(element: JQuery, options?: Schedule.Model); + constructor(element: Element, options?: Schedule.Model); + model:Schedule.Model; + defaults:Schedule.Model; + + /** This method is used to delete the appointment based on the guid value or the appointment data passed to it. + * @param {string|any} GUID value of an appointment element or an appointment object + * @returns {void} + */ + deleteAppointment(data: string|any): void; + + /** Destroys the Schedule widget. All the events bound using this._on are unbound automatically and the control is moved to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Exports the appointments from the Schedule control. + * @param {string} It refers the controller action name to redirect. (For MVC) + * @param {string} It refers the server event name.(For ASP) + * @param {string|number} Pass the id of an appointment, in case if a single appointment needs to be exported. Otherwise, it takes the null value. + * @returns {void} + */ + exportSchedule(action: string, serverEvent: string, id: string|number): void; + + /** Searches the appointments from appointment list of Schedule control. + * @param {Array} Holds array of one or more conditional objects for filtering the appointments based on it. + * @returns {void} + */ + filterAppointments(filterConditions: Array): void; + + /** Gets the appointment list of Schedule control. + * @returns {void} + */ + getAppointments(): void; + + /** Prints the Scheduler. + * @returns {void} + */ + print(): void; + + /** Refreshes the Scroller within Scheduler while using it with some other controls or application. + * @returns {void} + */ + refreshScroller(): void; + + /** It is used to save the appointment. The appointment obj is based on the argument passed along with this method. + * @param {any} appointment object which includes appointment details + * @returns {void} + */ + saveAppointment(appointmentObject: any): void; + + /** Retrieves the time slot information (start/end time and resource details) of the given element. The parameter is optional - as when no element is passed to it, the currently selected cell information will be retrieved. When multiple cells are selected in the Scheduler, it is not necessary to provide the parameter. + * @param {any} TD element object rendered as Scheduler work cell + * @returns {void} + */ + getSlotByElement(element: any): void; + + /** Searches the appointments from the appointment list of Schedule control. + * @param {any|string} Defines the search word or the filter condition, based on which the appointments are filtered from the list. + * @param {string} Defines the field name on which the search is to be made. + * @param {string|string} Defines the filterOperator value for the search operation. + * @param {boolean} Defines the ignoreCase value for performing the search operation. + * @returns {void} + */ + searchAppointments(searchString: any|string, field: string, operator: string|string, ignoreCase: boolean): void; + + /** To refresh the Schedule control. + * @returns {void} + */ + refresh(): void; + + /** Refreshes only the appointments within the Schedule control. + * @returns {void} + */ + refreshAppointment(): void; +} +export module Schedule{ + +export interface Model { + + /**When set to true, Schedule allows the appointments to be dragged and dropped at required time. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /**When set to true, Scheduler allows interaction through keyboard shortcut keys. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**It includes the dataSource option and the fields related to Schedule appointments. The appointment fields within the appointmentSettings can accept both string and object type values. To apply validation rules on the appointment window fields, then the appointment fields needs to be defined with object type values. + */ + appointmentSettings?: AppointmentSettings; + + /**Default Value + * @Default {null} + */ + appointmentTemplateId?: string; + + /**Default Value + */ + cssClass?: string; + + /**Sets various categorize colors to the Schedule appointments to differentiate it. + */ + categorizeSettings?: CategorizeSettings; + + /**Sets the height for Schedule cells. + * @Default {20px} + */ + cellHeight?: string; + + /**Sets the width for Schedule cells. + */ + cellWidth?: string; + + /**Holds all options related to the context menu settings of the Schedule. + */ + contextMenuSettings?: ContextMenuSettings; + + /**Sets current date of the Schedule. The Schedule displays initially with the date that is provided here. + * @Default {new Date()} + */ + currentDate?: any; + + /**Sets current view of the Schedule. Schedule renders initially with the view that is specified here. The available views are day, week, workweek, month, agenda and custom view - from which any one of the required view can be set to the Schedule. It accepts both string or enum values. The enum values that are accepted by currentView(ej.Schedule.CurrentView) are as follows, + * @Default {ej.Schedule.CurrentView.Week} + */ + currentView?: string|ej.Schedule.CurrentView; + + /**Sets the date format for Schedule. + */ + dateFormat?: string; + + /**When set to true, shows the previous/next appointment navigator button on the Scheduler. + * @Default {true} + */ + showAppointmentNavigator?: boolean; + + /**When set to true, enables the resize behavior of appointments within the Schedule. + * @Default {true} + */ + enableAppointmentResize?: boolean; + + /**When set to true, enables the loading of Schedule appointments based on your demand. With this load on demand concept, the data consumption of the Schedule can be limited. + * @Default {false} + */ + enableLoadOnDemand?: boolean; + + /**Saves the current model value to browser cookies for state maintenance. When the page gets refreshed, Schedule control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /**When set to true, the Schedule layout and behavior changes as per the common RTL conventions. + * @Default {false} + */ + enableRTL?: boolean; + + /**Sets the end hour time limit to be displayed on the Schedule. + * @Default {24} + */ + endHour?: number; + + /**To configure resource grouping on the Schedule. + */ + group?: Group; + + /**Sets the height of the Schedule. Accepts both pixel and percentage values. + * @Default {1120px} + */ + height?: string; + + /**To define the work hours within the Schedule control. + */ + workHours?: WorkHours; + + /**When set to true, enables the Schedule to observe Daylight Saving Time for supported timezones. + * @Default {false} + */ + isDST?: boolean; + + /**When set to true, adapts the Schedule layout to fit the screen size of devices on which it renders. + * @Default {true} + */ + isResponsive?: boolean; + + /**Sets the specific culture to the Schedule. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum date limit to display on the Schedule. Setting maxDate with specific date value disallows the Schedule to navigate beyond that date. + * @Default {new Date(2099, 12, 31)} + */ + maxDate?: any; + + /**Sets the minimum date limit to display on the Schedule. Setting minDate with specific date value disallows the Schedule to navigate beyond that date. + * @Default {new Date(1900, 01, 01)} + */ + minDate?: any; + + /**Sets the mode of Schedule rendering either in a vertical or horizontal direction. It accepts either string("vertical" or "horizontal") or enum values. The enum values that are accepted by orientation(ej.Schedule.Orientation) are as follows, + * @Default {ej.Schedule.Orientation.Vertical} + */ + orientation?: string|ej.Schedule.Orientation; + + /**Holds all the options related to priority settings of the Schedule. + */ + prioritySettings?: PrioritySettings; + + /**When set to true, disables the interaction with the Schedule appointments, simply allowing the date and view navigation to occur. + * @Default {false} + */ + readOnly?: boolean; + + /**Holds all the options related to reminder settings of the Schedule. + */ + reminderSettings?: ReminderSettings; + + /**Defines the specific start and end dates to be rendered in the Schedule control. To render such user-specified custom date ranges in the Schedule control, set the currentView property to customview. + * @Default {null} + */ + renderDates?: RenderDates; + + /**Template design that applies on the Schedule resource header. + * @Default {null} + */ + resourceHeaderTemplateId?: string; + + /**Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the Schedule based on the order of the resource data provided within this collection. + * @Default {null} + */ + resources?: Array; + + /**When set to true, displays the all-day row cells on the Schedule. + * @Default {true} + */ + showAllDayRow?: boolean; + + /**When set to true, displays the current time indicator on the Schedule. + * @Default {true} + */ + showCurrentTimeIndicator?: boolean; + + /**When set to true, displays the header bar on the Schedule. + * @Default {true} + */ + showHeaderBar?: boolean; + + /**When set to true, displays the location field additionally on Schedule appointment window. + * @Default {false} + */ + showLocationField?: boolean; + + /**When set to true, displays the quick window for every single click made on the Schedule cells or appointments. + * @Default {true} + */ + showQuickWindow?: boolean; + + /**When set to true, displays the timescale on the left side of the Schedule. + * @Default {true} + */ + showTimeScale?: boolean; + + /**Sets the start hour time range to be displayed on the Schedule. + * @Default {0} + */ + startHour?: number; + + /**Sets either 12 or 24 hour time mode on the Schedule. It accepts either the string value("12" or "24") or the below mentioned enum values. The enum values that are accepted by timeMode(ej.Schedule.TimeMode) are as follows, + * @Default {null} + */ + timeMode?: string|ej.Schedule.TimeMode; + + /**Sets the timezone for the Schedule. + * @Default {null} + */ + timeZone?: string; + + /**Sets the collection of timezone items to be bound to the Schedule. Only the items bound to this property gets listed out in the timezone field of the appointment window. + */ + timeZoneCollection?: TimeZoneCollection; + + /**Defines the view collection to be displayed on the Schedule. By default, it displays all the views namely, Day, Week, WorkWeek and Month. + * @Default {[Day, Week, WorkWeek, Month, Agenda]} + */ + views?: Array; + + /**Sets the width of the Schedule. Accepts both pixel and percentage values. + * @Default {100%} + */ + width?: string; + + /**When set to true, Schedule allows the validation of recurrence pattern to take place before it is being assigned to the appointments. For example, when one of the instance of recurrence appointment is dragged beyond the next or previous instance of the same recurrence appointment, a pop-up is displayed with the validation message disallowing the drag functionality. + * @Default {true} + */ + enableRecurrenceValidation?: boolean; + + /**Sets the week to display more than one week appointment summary. + */ + agendaViewSettings?: AgendaViewSettings; + + /**You can change or set the starting day of the week. + * @Default {null} + */ + firstDayOfWeek?: string; + + /**You can set the workWeek days of the workWeek. + * @Default {[Monday, Tuesday, Wednesday, Thursday, Friday]} + */ + workWeek?: Array; + + /**The tooltip allows to display appointment details in a tooltip while hovering on it. + */ + tooltipSettings?: TooltipSettings; + + /**Holds all the options related to the time scale of Scheduler. The timeslots either major or minor slots can be customized with this property. + */ + timeScale?: TimeScale; + + /**When set to true, shows the delete confirmation dialog before deleting an appointment. + * @Default {true} + */ + showDeleteConfirmationDialog?: boolean; + + /**Accepts the id value of the template layout defined for the all-day cells. + * @Default {null} + */ + allDayCellsTemplateId?: string; + + /**Accepts the id value of the template layout defined for the work cells and month cells. + * @Default {null} + */ + workCellsTemplateId?: string; + + /**Accepts the id value of the template layout defined for the date header cells. + * @Default {null} + */ + dateHeaderTemplateId?: string; + + /**when set to false, allows the height of the work-cells to adjust automatically based on the number of appointment count it has. + * @Default {true} + */ + showOverflowButton?: boolean; + + /**Allows setting draggable area for the Scheduler appointments. Also, turns on the external drag and drop, when set with some specific external drag area name. + */ + appointmentDragArea?: string; + + /**When set to true, displays the other months days from the current month on the Schedule. + * @Default {true} + */ + showNextPrevMonth?: boolean; + + /**Triggers before the action begin of the Schedule.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggers after the completion of action in the Schedule.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggers after the appointment is clicked.*/ + appointmentClick? (e: AppointmentClickEventArgs): void; + + /**Triggers before the appointment is being removed from the Scheduler.*/ + beforeAppointmentRemove? (e: BeforeAppointmentRemoveEventArgs): void; + + /**Triggers before the edited appointment is being saved.*/ + beforeAppointmentChange? (e: BeforeAppointmentChangeEventArgs): void; + + /**Triggers after the appointment is hovered.*/ + appointmentHover? (e: AppointmentHoverEventArgs): void; + + /**Triggers before the appointment gets saved.*/ + beforeAppointmentCreate? (e: BeforeAppointmentCreateEventArgs): void; + + /**Triggers before the appointment window opens.*/ + appointmentWindowOpen? (e: AppointmentWindowOpenEventArgs): void; + + /**Triggers before the context menu opens.*/ + beforeContextMenuOpen? (e: BeforeContextMenuOpenEventArgs): void; + + /**Triggers after the cell is clicked.*/ + cellClick? (e: CellClickEventArgs): void; + + /**Triggers after the cell is clicked twice.*/ + cellDoubleClick? (e: CellDoubleClickEventArgs): void; + + /**Triggers after the cell is hovered.*/ + cellHover? (e: CellHoverEventArgs): void; + + /**Triggers while the appointment is being dragged over the work cells.*/ + drag? (e: DragEventArgs): void; + + /**Triggers when the appointment dragging begins.*/ + dragStart? (e: DragStartEventArgs): void; + + /**Triggers when the appointment is dropped.*/ + dragStop? (e: DragStopEventArgs): void; + + /**Triggers after the context menu is clicked.*/ + menuItemClick? (e: MenuItemClickEventArgs): void; + + /**Triggers after the Schedule view or date is navigated.*/ + navigation? (e: NavigationEventArgs): void; + + /**Triggers every time before the elements of the scheduler such as work cells, time cells or header cells and so on renders or re-renders on a page.*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggers when the reminder is raised for an appointment.*/ + reminder? (e: ReminderEventArgs): void; + + /**Triggers while resizing the appointment.*/ + resize? (e: ResizeEventArgs): void; + + /**Triggers when the appointment resizing begins.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Triggers when appointment resizing stops.*/ + resizeStop? (e: ResizeStopEventArgs): void; + + /**Triggers when the overflow button is clicked.*/ + overflowButtonClick? (e: OverflowButtonClickEventArgs): void; + + /**Triggers while mouse hovering on the overflow button.*/ + overflowButtonHover? (e: OverflowButtonHoverEventArgs): void; + + /**Triggers when any of the keyboard keys are pressed.*/ + keyDown? (e: KeyDownEventArgs): void; + + /**Triggers after the appointment is saved.*/ + appointmentCreated? (e: AppointmentCreatedEventArgs): void; + + /**Triggers after the appointment is edited.*/ + appointmentChanged? (e: AppointmentChangedEventArgs): void; + + /**Triggers after the appointment is deleted.*/ + appointmentRemoved? (e: AppointmentRemovedEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the current date value. + */ + currentDate?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current view value. + */ + currentView?: string; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the action begin request type. + */ + requestType?: string; + + /**Returns the target of the click. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the save appointment value. + */ + data?: any; + + /**Returns the id of delete appointment. + */ + id?: number; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data about view change action. + */ + data?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the action complete request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the appointment data dropped. + */ + appointment?: any; +} + +export interface AppointmentClickEventArgs { + + /**Returns the object of appointmentClick event. + */ + object?: any; + + /**Returns the clicked appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeAppointmentRemoveEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the deleted appointment object. + */ + appointment?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface BeforeAppointmentChangeEventArgs { + + /**Returns the edited appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentHoverEventArgs { + + /**Returns the object of appointmentHover event. + */ + object?: any; + + /**Returns the hovered appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeAppointmentCreateEventArgs { + + /**Returns the appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentWindowOpenEventArgs { + + /**returns the object of appointmentWindowOpen event while selecting the detail option from quick window or edit appointment or edit series option. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the end time of the double clicked cell. + */ + endTime?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the action name that triggers window open. + */ + originalEventType?: string; + + /**Returns the start time of the double clicked cell. + */ + startTime?: any; + + /**Returns the target of the double clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the edit appointment object. + */ + appointment?: any; + + /**Returns the edit occurrence option value. + */ + edit?: boolean; +} + +export interface BeforeContextMenuOpenEventArgs { + + /**Returns the object of beforeContextMenuOpen event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current cell index value. + */ + cellIndex?: number; + + /**Returns the current date value. + */ + currentDate?: any; + + /**Returns the current resource details, when multiple resources are present, otherwise returns null. + */ + resources?: any; + + /**Returns the current appointment details while opening the menu from appointment. + */ + appointment?: any; + + /**Returns the object of before opening menu target. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellClickEventArgs { + + /**Returns the object of cellClick event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the end time of the clicked cell. + */ + endTime?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the start time of the clicked cell. + */ + startTime?: any; + + /**Returns the target of the clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellDoubleClickEventArgs { + + /**Returns the object of cellDoubleClick event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the end time of the double clicked cell. + */ + endTime?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the start time of the double clicked cell. + */ + startTime?: any; + + /**Returns the target of the double clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellHoverEventArgs { + + /**Returns the object of cellHover event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the index of the hovered cell. + */ + cellIndex?: any; + + /**Returns the current date of the hovered cell. + */ + currentDate?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DragEventArgs { + + /**Returns the object of dragOver event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the drag over appointment. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DragStartEventArgs { + + /**Returns the object of dragStart event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the dragging appointment. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DragStopEventArgs { + + /**Returns the object of dragDrop event. + */ + object?: any; + + /**Returns the dropped appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface MenuItemClickEventArgs { + + /**Returns the object of menuItemClick event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface NavigationEventArgs { + + /**Returns the current date object. + */ + currentDate?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the current view value. + */ + currentView?: string; + + /**Returns the previous view value. + */ + previousView?: string; + + /**Returns the target of the action. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the previous date of the Schedule. + */ + previousDate?: any; +} + +export interface QueryCellInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the current appontment data. + */ + appointment?: any; + + /**Returns the currently rendering DOM element. + */ + element?: any; + + /**Returns the name of the currently rendering element on the scheduler. + */ + requestType?: string; + + /**Returns the cell type which is currently rendering on the Scheduler. + */ + cellType?: string; + + /**Returns the start date of the currently rendering appointment. + */ + currentAppointmentDate?: any; + + /**Returns the currently rendering cell information. + */ + cell?: any; + + /**Returns the currently rendering resource details. + */ + resource?: any; + + /**Returns the currently rendering date information. + */ + currentDay?: any; +} + +export interface ReminderEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the appointment object for which the reminder is raised. + */ + reminderAppointment?: any; +} + +export interface ResizeEventArgs { + + /**Returns the object of resizing event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the resize element value. + */ + element?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ResizeStartEventArgs { + + /**Returns the object of resizeStart event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the resize element value. + */ + element?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ResizeStopEventArgs { + + /**Returns the object of resizeStop event. + */ + object?: any; + + /**Returns the resized appointment value. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the resized appointment. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface OverflowButtonClickEventArgs { + + /**Returns the object consisting of starttime, endtime and resource value of the underlying cell on which the clicked overflow button is present. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface OverflowButtonHoverEventArgs { + + /**Returns the object consisting of starttime, endtime and resource value of the underlying cell on which the overflow button is currently hovered. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface KeyDownEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface AppointmentCreatedEventArgs { + + /**Returns the appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentChangedEventArgs { + + /**Returns the edited appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentRemovedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the deleted appointment object. + */ + appointment?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentSettings { + + /**Default Value + * @Default {Array} + */ + dataSource?: any|Array; + + /**Default Value + * @Default {null} + */ + query?: string; + + /**Default Value + * @Default {null} + */ + tableName?: string; + + /**Binds the id field name in dataSource to the id of Schedule appointments. It denotes the unique id assigned to appointments. + */ + id?: string; + + /**Binds the name of startTime field in the dataSource with start time of the Schedule appointments. It indicates the date and Time when Schedule appointment actually starts. + */ + startTime?: string; + + /**Binds the name of endTime field in dataSource with the end time of Schedule appointments. It indicates the date and time when Schedule appointment actually ends. + */ + endTime?: string; + + /**Binds the name of subject field in the dataSource to appointment Subject. Indicates the Subject or title that gets displayed on Schedule appointments. + */ + subject?: string; + + /**Binds the description field name in dataSource. It indicates the appointment description. + */ + description?: string; + + /**Binds the name of recurrence field in dataSource. It indicates whether the appointment is a recurrence appointment or not. + */ + recurrence?: string; + + /**Binds the name of recurrenceRule field in dataSource. It indicates the recurrence pattern associated with appointments. + */ + recurrenceRule?: string; + + /**Binds the name of allDay field in dataSource. It indicates whether the appointment is an allday appointment or not. + * @Default {AllDay} + */ + allDay?: string; + + /**Default Value + * @Default {null} + */ + resourceFields?: string; + + /**Default Value + * @Default {null} + */ + categorize?: string; + + /**Default Value + * @Default {null} + */ + location?: string; + + /**Default Value + * @Default {null} + */ + priority?: string; + + /**Default Value + * @Default {StartTimeZone} + */ + startTimeZone?: string; + + /**Default Value + * @Default {EndTimeZone} + */ + endTimeZone?: string; +} + +export interface CategorizeSettings { + + /**Default Value + * @Default {false} + */ + allowMultiple?: boolean; + + /**Default Value + * @Default {false} + */ + enable?: boolean; + + /**Default Value + * @Default {Array} + */ + dataSource?: Array|any; + + /**Binds id field name in the dataSource to id of category data. + * @Default {id} + */ + id?: string; + + /**Binds text field name in the dataSource to category text. + * @Default {text} + */ + text?: string; + + /**Binds color field name in the dataSource to category color. + * @Default {color} + */ + color?: string; + + /**Binds fontColor field name in the dataSource to category font. + * @Default {fontColor} + */ + fontColor?: string; +} + +export interface ContextMenuSettings { + + /**When set to true, enables the context menu options available for the Schedule cells and appointments. + * @Default {false} + */ + enable?: boolean; + + /**Contains all the default context menu options that are applicable for both Schedule cells and appointments. It also supports adding custom menu items to cells or appointment collection. + * @Default {[]} + */ + menuItems?: any; +} + +export interface Group { + + /**Holds the array of resource names to be grouped on the Schedule. + */ + resources?: any; +} + +export interface WorkHours { + + /**When set to true, highlights the work hours of the Schedule. + * @Default {true} + */ + highlight?: boolean; + + /**Sets the start time to depict the start of working or business hour in a day. + * @Default {null} + */ + start?: number; + + /**Sets the end time to depict the end of working or business hour in a day. + * @Default {null} + */ + end?: number; +} + +export interface PrioritySettings { + + /**When set to true, enables the priority options available for the Schedule appointments. + * @Default {false} + */ + enable?: boolean; + + /**The dataSource option can accept the JSON object collection that contains the priority related data. + * @Default {Array} + */ + dataSource?: any|Array; + + /**Binds text field name in the dataSource to prioritySettings text. These text gets listed out in priority field of the appointment window. + * @Default {text} + */ + text?: string; + + /**Binds value field name in the dataSource to prioritySettings value. These field names usually accepts four priority values by default, high, low, medium and none. + * @Default {value} + */ + value?: string; + + /**Allows priority field customization in the appointment window to add custom icons denoting the priority level for the appointments. + * @Default {null} + */ + template?: string; +} + +export interface ReminderSettings { + + /**When set to true, enables the reminder option available for the Schedule appointments. + * @Default {false} + */ + enable?: boolean; + + /**Sets the timing, when the reminders are to be alerted for the Schedule appointments. + * @Default {5} + */ + alertBefore?: number; +} + +export interface RenderDates { + + /**Sets the start of custom date range to be rendered in the Schedule. + * @Default {null} + */ + start?: any; + + /**Sets the end limit of the custom date range. + * @Default {null} + */ + end?: any; +} + +export interface ResourcesResourceSettings { + + /**The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains the resources related data. + */ + dataSource?: any|Array; + + /**Binds text field name in the dataSource to resourceSettings text. These text gets listed out in resources field of the appointment window. + */ + text?: string; + + /**Binds id field name in the dataSource to resourceSettings id. + */ + id?: string; + + /**Binds groupId field name in the dataSource to resourceSettings groupId. + */ + groupId?: string; + + /**Binds color field name in the dataSource to resourceSettings color. The color specified here gets applied to the Schedule appointments denoting to the resource it belongs. + */ + color?: string; + + /**Binds the starting work hour field name in the dataSource. It's optional, but when provided with some numeric value will set the starting work hour for specific resources. + */ + start?: string; + + /**Binds the end work hour field name in the dataSource. It's optional, but when provided with some numeric value will set the end work hour for specific resources. + */ + end?: string; + + /**Binds the resources working days field name in the dataSource. It's optional, and accepts the array of strings (week day names). When provided with some values (array of day names), only those days will render for the specific resources. + */ + workWeek?: string; + + /**Binds appointmentClass field name in the dataSource. It applies custom CSS class name to appointments depicting to the resource it belongs. + */ + appointmentClass?: string; +} + +export interface Resources { + + /**It holds the name of the resource field to be bound to the Schedule appointments that contains the resource Id. + * @Default {[]} + */ + field?: string; + + /**It holds the title name of the resource field to be displayed on the Schedule appointment window. + * @Default {[]} + */ + title?: string; + + /**A unique resource name that is used for differentiating various resource objects while grouping it in various levels. + * @Default {[]} + */ + name?: string; + + /**When set to true, allows multiple selection of resource names, thus creating multiple instances of same appointment for the selected resources. + * @Default {[]} + */ + allowMultiple?: string; + + /**It holds the field names of the resources to be bound to the Schedule and also the dataSource. + */ + resourceSettings?: ResourcesResourceSettings; +} + +export interface TimeZoneCollection { + + /**Sets the collection of timezone items to the dataSource that accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule timezones. + */ + dataSource?: any; + + /**Binds text field name in the dataSource to timeZoneCollection text. These text gets listed out in the timezone fields of the appointment window. + */ + text?: string; + + /**Binds id field name in the dataSource to timeZoneCollection id. + */ + id?: string; + + /**Binds value field name in the dataSource to timeZoneCollection value. + */ + value?: string; +} + +export interface AgendaViewSettings { + + /**You can display the summary of multiple week's appointment by setting this value. + * @Default {7} + */ + daysInAgenda?: number; + + /**You can customize the Date column display based on the requirement. + * @Default {null} + */ + dateColumnTemplateId?: string; + + /**You can customize the time column display based on the requirement. + * @Default {null} + */ + timeColumnTemplateId?: string; +} + +export interface TooltipSettings { + + /**To enable or disable the tooltip display. + * @Default {false} + */ + enable?: boolean; + + /**To customize the tooltip display based on your requirements. + * @Default {null} + */ + templateId?: string; +} + +export interface TimeScale { + + /**When set to true, displays the timescale on the Scheduler. + * @Default {null} + */ + enable?: boolean; + + /**When set with some specific value, defines the number of time divisions split per hour(as per value given for the majorTimeSlot). Those time divisions are meant to be the minor slots. + * @Default {2} + */ + minorSlotCount?: number; + + /**Accepts the value in minutes. When provided with specific value, displays the appropriate time interval on the Scheduler + * @Default {60} + */ + majorSlot?: number; + + /**Accepts id value of the template defined for minor time slots + * @Default {null} + */ + minorSlotTemplateId?: string; + + /**Accepts id value of the template defined for major time slots. + * @Default {null} + */ + majorSlotTemplateId?: string; +} + +enum CurrentView{ + + ///Set currentView as Day to Scheduler + Day, + + ///Set currentView as Week to Scheduler + Week, + + ///Set currentView as Workweek to Scheduler + Workweek, + + ///Set currentView as Month to Scheduler + Month, + + ///Set currentView as Agenda to Scheduler + Agenda, + + ///Set currentView as CustomView to Scheduler + CustomView +} + + +enum Orientation{ + + ///Set orientation as vertical to Scheduler + Vertical, + + ///Set orientation as horizontal to Scheduler + Horizontal +} + + +enum TimeMode{ + + ///Set timeMode as 12 hours to Scheduler + Hour12, + + ///Set timeMode as 24 hours to Scheduler + Hour24 +} + +} + +class RecurrenceEditor extends ej.Widget { + static fn: RecurrenceEditor; + static Locale:any; + constructor(element: JQuery, options?: RecurrenceEditorOptions); + constructor(element: Element, options?: RecurrenceEditorOptions); + model:RecurrenceEditorOptions; + defaults:RecurrenceEditorOptions; + recurrenceDateGenerator(recurrenceString: string,strDate:Object): string; + closeRecurPublic(): string; + getRecurrenceRule(): void; + recurrenceRuleSplit(recurrenceRule: string, recurrenceExDate?: string): Object; + +} +interface RecurrenceEditorOptions { + frequencies?: Array; + firstDayOfWeek?: string; + name?: string; + enableSpinners?: boolean; + startDate?: Date; + locale?: string; + enableRTL?: boolean; + value?: string; + dateFormat?: string; + selectedRecurrenceType?: number; + enableRecurrenceValidation?: boolean; + minDate?: Date; + maxDate?: Date; + cssClass?: string; + change?(e: RecurrenceEditorChangeEvent): void; + create?(e: RecurrenceEditorBaseEvent): void; +} +interface RecurrenceEditorBaseEvent extends ej.BaseEvent { + model: RecurrenceEditorOptions; +} +interface RecurrenceEditorChangeEvent extends RecurrenceEditorBaseEvent { + requestType?: string; +} +class Gantt extends ej.Widget { + static fn: Gantt; + constructor(element: JQuery, options?: Gantt.Model); + constructor(element: Element, options?: Gantt.Model); + model:Gantt.Model; + defaults:Gantt.Model; + + /** To add item in gantt + * @param {any} Item to add in Gantt row. + * @param {string} Defines in which position the row wants to add + * @returns {void} + */ + addRecord(data: any, rowPosition: string): void; + + /** Positions the splitter by the specified column index. + * @param {number} Set the splitter position based on column index. + * @returns {void} + */ + setSplitterIndex(index: number): void; + + /** To cancel the edited state of an item in gantt + * @returns {void} + */ + cancelEdit(): void; + + /** To collapse all the parent items in gantt + * @returns {void} + */ + collapseAllItems(): void; + + /** To delete a selected item in gantt + * @returns {void} + */ + deleteItem(): void; + + /** destroy the gantt widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To Expand all the parent items in gantt + * @returns {void} + */ + expandAllItems(): void; + + /** To expand and collapse an item in gantt using item's ID + * @param {number} Exapnd or Collapse a record based on task id. + * @returns {void} + */ + expandCollapseRecord(taskId: number): void; + + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide + * @returns {void} + */ + hideColumn(headerText: string): void; + + /** To indent a selected item in gantt + * @returns {void} + */ + indentItem(): void; + + /** To Open the dialog to add new task to the gantt + * @returns {void} + */ + openAddDialog(): void; + + /** To Open the dialog to edit existing task to the gantt + * @returns {void} + */ + openEditDialog(): void; + + /** To outdent a selected item in gantt + * @returns {void} + */ + outdentItem(): void; + + /** To save the edited state of an item in gantt + * @returns {void} + */ + saveEdit(): void; + + /** To search an item with search string provided at the run time + * @param {string} you can pass a text to search in Gantt Control. + * @returns {void} + */ + searchItem(searchString: string): void; + + /** To set the grid width in gantt + * @param {string} you can give either percentage or pixels value + * @returns {void} + */ + setSplitterPosition(width: string): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show + * @returns {void} + */ + showColumn(headerText: string): void; +} +export module Gantt{ + +export interface Model { + + /**Specifies the fields to be included in the add dialog in gantt + * @Default {[]} + */ + addDialogFields?: Array; + + /**Enables or disables the ability to resize column. + * @Default {false} + */ + allowColumnResize?: boolean; + + /**Enables or Disables gantt chart editing in gantt + * @Default {true} + */ + allowGanttChartEditing?: boolean; + + /**Enables or Disables Keyboard navigation in gantt + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Specifies enabling or disabling multiple sorting for Gantt columns + * @Default {false} + */ + allowMultiSorting?: boolean; + + /**Enables or disables the interactive selection of a row. + * @Default {true} + */ + allowSelection?: boolean; + + /**Enables or disables sorting. When enabled, we can sort the column by clicking on the column. + * @Default {false} + */ + allowSorting?: boolean; + + /**Enable or disable predecessor validation. When it is true, all the task's start and end dates are aligned based on its predecessors start and end dates. + * @Default {true} + */ + enablePredecessorValidation?: boolean; + + /**Specifies the baseline background color in gantt + * @Default {#fba41c} + */ + baselineColor?: string; + + /**Specifies the mapping property path for baseline end date in datasource + */ + baselineEndDateMapping?: string; + + /**Specifies the mapping property path for baseline start date of a task in datasource + */ + baselineStartDateMapping?: string; + + /**Specifies the mapping property path for sub tasks in datasource + */ + childMapping?: string; + + /**Specifies the background of connector lines in Gantt + */ + connectorLineBackground?: string; + + /**Specifies the width of the connector lines in gantt + * @Default {1} + */ + connectorlineWidth?: number; + + /**Specify the CSS class for gantt to achieve custom theme. + */ + cssClass?: string; + + /**Collection of data or hierarchical data to represent in gantt + * @Default {null} + */ + dataSource?: Array; + + /**Specifies the dateFormat for gantt , given format is displayed in tooltip , grid . + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /**Specifies the mapping property path for duration of a task in datasource + */ + durationMapping?: string; + + /**Specifies the duration unit for each tasks whether days or hours or minutes + * @Default {ej.Gantt.DurationUnit.Day} + */ + durationUnit?: ej.Gantt.DurationUnit|string; + + /**Specifies the fields to be included in the edit dialog in gantt + * @Default {[]} + */ + editDialogFields?: Array; + + /**Option to configure the splitter position. + */ + splitterSettings?: SplitterSettings; + + /**Specifies the editSettings options in gantt. + */ + editSettings?: EditSettings; + + /**Enables or Disables enableAltRow row effect in gantt + * @Default {true} + */ + enableAltRow?: boolean; + + /**Enables or disables the collapse all records when loading the gantt. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /**Enables or disables the contextmenu for gantt , when enabled contextmenu appears on right clicking gantt + * @Default {false} + */ + enableContextMenu?: boolean; + + /**Indicates whether we can edit the progress of a task interactively in gantt chart. + * @Default {true} + */ + enableProgressBarResizing?: boolean; + + /**Enables or disables the option for dynamically updating the Gantt size on window resizing + * @Default {false} + */ + enableResize?: boolean; + + /**Enables or disables tooltip while editing (dragging/resizing) the taskbar. + * @Default {true} + */ + enableTaskbarDragTooltip?: boolean; + + /**Enables or disables tooltip for taskbar. + * @Default {true} + */ + enableTaskbarTooltip?: boolean; + + /**Enables/Disables virtualization for rendering gantt items. + * @Default {false} + */ + enableVirtualization?: boolean; + + /**Specifies the mapping property path for end Date of a task in datasource + */ + endDateMapping?: string; + + /**Specifies whether to highlight the weekends in gantt . + * @Default {true} + */ + highlightWeekends?: boolean; + + /**Collection of holidays with date, background and label information to be displayed in gantt. + * @Default {[]} + */ + holidays?: Array; + + /**Specifies whether to include weekends while calculating the duration of a task. + * @Default {true} + */ + includeWeekend?: boolean; + + /**Specify the locale for gantt + * @Default {en-US} + */ + locale?: string; + + /**Specifies the mapping property path for milestone in datasource + */ + milestoneMapping?: string; + + /**Specifies the background of parent progressbar in gantt + */ + parentProgressbarBackground?: string; + + /**Specifies the background of parent taskbar in gantt + */ + parentTaskbarBackground?: string; + + /**Specifies the mapping property path for parent task Id in self reference datasource + */ + parentTaskIdMapping?: string; + + /**Specifies the mapping property path for predecessors of a task in datasource + */ + predecessorMapping?: string; + + /**Specifies the background of progressbar in gantt + */ + progressbarBackground?: string; + + /**Specified the height of the progressbar in taskbar + * @Default {100} + */ + progressbarHeight?: number; + + /**Specifies the template for tooltip on resizing progressbar + * @Default {null} + */ + progressbarTooltipTemplate?: string; + + /**Specifies the template ID for customized tooltip for progressbar editing in gantt + * @Default {null} + */ + progressbarTooltipTemplateId?: string; + + /**Specifies the mapping property path for progress percentage of a task in datasource + */ + progressMapping?: string; + + /**It receives query to retrieve data from the table (query is same as SQL). + * @Default {null} + */ + query?: any; + + /**Enables or Disables rendering baselines in Gantt , when enabled baseline is rendered in gantt + * @Default {false} + */ + renderBaseline?: boolean; + + /**Specifies the mapping property name for resource ID in resource Collection in gantt + */ + resourceIdMapping?: string; + + /**Specifies the mapping property path for resources of a task in datasource + */ + resourceInfoMapping?: string; + + /**Specifies the mapping property path for resource name of a task in gantt + */ + resourceNameMapping?: string; + + /**Collection of data regarding resources involved in entire project + * @Default {[]} + */ + resources?: Array; + + /**Specifies whether rounding off the day working time edits + * @Default {true} + */ + roundOffDayworkingTime?: boolean; + + /**Specifies the height of a single row in gantt. Also, we need to set same height in the CSS style with class name e-rowcell. + * @Default {30} + */ + rowHeight?: number; + + /**Specifies end date of the gantt schedule. By default, end date will be rounded to its next Saturday. + * @Default {null} + */ + scheduleEndDate?: string; + + /**Specifies the options for customizing schedule header. + */ + scheduleHeaderSettings?: ScheduleHeaderSettings; + + /**Specifies start date of the gantt schedule. By default, start date will be rounded to its previous Sunday. + * @Default {null} + */ + scheduleStartDate?: string; + + /**Specifies the selected row index in gantt + * @Default {null} + */ + selectedItem?: number; + + /**Specifies the selected row Index in gantt , the row with given index will highlighted + * @Default {-1} + */ + selectedRowIndex?: number; + + /**Enables or disables the column chooser. + * @Default {false} + */ + showColumnChooser?: boolean; + + /**Specifies whether to show grid cell tooltip. + * @Default {true} + */ + showGridCellTooltip?: boolean; + + /**Specifies whether to show grid cell tooltip over expander cell alone. + * @Default {true} + */ + showGridExpandCellTooltip?: boolean; + + /**Specifies whether display task progress inside taskbar. + * @Default {true} + */ + showProgressStatus?: boolean; + + /**Specifies whether to display resource names for a task beside taskbar. + * @Default {true} + */ + showResourceNames?: boolean; + + /**Specifies whether to display task name beside task bar. + * @Default {true} + */ + showTaskNames?: boolean; + + /**Specifies the size option of gantt control. + */ + sizeSettings?: SizeSettings; + + /**Specifies the sorting options for gantt. + */ + sortSettings?: SortSettings; + + /**Specifies splitter position in gantt. + * @Default {null} + */ + splitterPosition?: string; + + /**Specifies the mapping property path for start date of a task in datasource + */ + startDateMapping?: string; + + /**Specifies the options for striplines + * @Default {[]} + */ + stripLines?: Array; + + /**Specifies the background of the taskbar in gantt + */ + taskbarBackground?: string; + + /**Specifies the template script for customized tooltip for taskbar editing in gantt + */ + taskbarEditingTooltipTemplate?: string; + + /**Specifies the template Id for customized tooltip for taskbar editing in gantt + */ + taskbarEditingTooltipTemplateId?: string; + + /**Specifies the template for tooltip on mouse action on taskbars + */ + taskbarTooltipTemplate?: string; + + /**Specifies the template id for tooltip on mouse action on taskbars + */ + taskbarTooltipTemplateId?: string; + + /**Specifies the mapping property path for task Id in datasource + */ + taskIdMapping?: string; + + /**Specifies the mapping property path for task name in datasource + */ + taskNameMapping?: string; + + /**Specifies the toolbarSettings options. + */ + toolbarSettings?: ToolbarSettings; + + /**Specifies the tree expander column in gantt + * @Default {0} + */ + treeColumnIndex?: number; + + /**Specifies the weekendBackground color in gantt + * @Default {#F2F2F2} + */ + weekendBackground?: string; + + /**Specifies the working time schedule of day + * @Default {ej.Gantt.workingTimeScale.TimeScale8Hours} + */ + workingTimeScale?: ej.Gantt.workingTimeScale|string; + + /**Triggered for every gantt action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every gantt action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered while enter the edit mode in the tree grid cell*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered after collapsed the gantt record*/ + collapsed? (e: CollapsedEventArgs): void; + + /**Triggered while collapsing the gantt record*/ + collapsing? (e: CollapsingEventArgs): void; + + /**Triggered while Context Menu is rendered in Gantt control*/ + contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + + /**Triggered after save the modified cellValue in gantt.*/ + endEdit? (e: EndEditEventArgs): void; + + /**Triggered after expand the record*/ + expanded? (e: ExpandedEventArgs): void; + + /**Triggered while expanding the gantt record*/ + expanding? (e: ExpandingEventArgs): void; + + /**Triggered while gantt is loaded*/ + load? (e: LoadEventArgs): void; + + /**Triggered while rendering each cell in the tree grid*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggered while rendering each taskbar in the gantt chart*/ + queryTaskbarInfo? (e: QueryTaskbarInfoEventArgs): void; + + /**Triggered while rendering each row*/ + rowDataBound? (e: RowDataBoundEventArgs): void; + + /**Triggered after the row is selected.*/ + rowSelected? (e: RowSelectedEventArgs): void; + + /**Triggered before the row is going to be selected.*/ + rowSelecting? (e: RowSelectingEventArgs): void; + + /**Triggered after completing the editing operation in taskbar*/ + taskbarEdited? (e: TaskbarEditedEventArgs): void; + + /**Triggered while editing the gantt chart (dragging, resizing the taskbar )*/ + taskbarEditing? (e: TaskbarEditingEventArgs): void; + + /**Triggered when toolbar item is clicked in Gantt.*/ + toolbarClick? (e: ToolbarClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; + + /**Returns the value of searching element. + */ + keyValue?: string; + + /**Returns the data of deleting element. + */ + data?: string; + + /**Returns selected record index + */ + recordIndex?: number; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; + + /**Returns the value of searched element. + */ + keyValue?: string; + + /**Returns the data of deleted element. + */ + data?: string; + + /**Returns selected record index + */ + recordIndex?: number; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column Index of cell belongs. + */ + columnIndex?: number; +} + +export interface CollapsedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsed record. + */ + recordIndex?: number; + + /**Returns the data of collapsed record. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface CollapsingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsing record. + */ + recordIndex?: number; + + /**Returns the data of edited cell record.. + */ + data?: any; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface ContextMenuOpenEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the default context menu items to which we add custom items. + */ + contextMenuItems?: Array; + + /**Returns the gantt model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of edited cell record. + */ + data?: any; + + /**Returns the column name of edited cell belongs. + */ + columnName?: string; + + /**Returns the column object of edited cell belongs. + */ + columnObject?: any; +} + +export interface ExpandedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of record. + */ + recordIndex?: number; + + /**Returns the data of expanded record. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface ExpandingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of record. + */ + recordIndex?: any; + + /**Returns the data of edited cell record.. + */ + data?: any; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface LoadEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the gantt model + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface QueryCellInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting cell element. + */ + cellElement?: any; + + /**Returns the value of cell. + */ + cellValue?: string; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column of cell belongs. + */ + column?: any; +} + +export interface QueryTaskbarInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the taskbar background of current item. + */ + TaskbarBackground?: string; + + /**Returns the progressbar background of current item. + */ + ProgressbarBackground?: string; + + /**Returns the parent taskbar background of current item. + */ + parentTaskbarBackground?: string; + + /**Returns the parent progressbar background of current item. + */ + parentProgressbarBackground?: string; + + /**Returns the data of the record. + */ + data?: any; +} + +export interface RowDataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of rendering row. + */ + rowElement?: any; + + /**Returns the data of rendering row record.. + */ + data?: any; +} + +export interface RowSelectedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting row element. + */ + targetRow?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: number; + + /**Returns the data of selected record. + */ + data?: any; +} + +export interface RowSelectingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data selecting record. + */ + data?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: string; + + /**Returns the selecting row chart element. + */ + targetChartRow?: any; + + /**Returns the selecting row grid element. + */ + targetGridRow?: any; + + /**Returns the previous selected data. + */ + previousData?: any; + + /**Returns the previous selected row index. + */ + previousIndex?: string; + + /**Returns the previous selected row chart element. + */ + previousChartRow?: any; + + /**Returns the previous selected row grid element. + */ + previousGridRow?: any; +} + +export interface TaskbarEditedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data of edited record. + */ + data?: any; + + /**Returns the previous data value of edited record. + */ + previousData?: any; + + /**Returns 'true' if taskbar is dragged. + */ + dragging?: boolean; + + /**Returns 'true' if taskbar is left resized. + */ + leftResizing?: boolean; + + /**Returns 'true' if taskbar is right resized. + */ + rightResizing?: boolean; + + /**Returns 'true' if taskbar is progress resized. + */ + progressResizing?: boolean; + + /**Returns the field values of record being edited. + */ + editingFields?: any; + + /**Returns the gantt model. + */ + model?: any; +} + +export interface TaskbarEditingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the gantt model. + */ + model?: any; + + /**Returns the row object being edited. + */ + rowData?: any; + + /**Returns the field values of record being edited. + */ + editingFields?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ToolbarClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the Gantt model. + */ + model?: any; + + /**Returns the name of the toolbar item on which mouse click has been performed + */ + itemName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface SplitterSettings { + + /**Specifies position of the splitter in Gantt , splitter can be placed either based on percentage values or pixel values. + */ + position?: string; + + /**Specifies the position of splitter in Gantt, based on column index in Gantt. + */ + index?: string; +} + +export interface EditSettings { + + /**Enables or disables add record icon in gantt toolbar + * @Default {false} + */ + allowAdding?: boolean; + + /**Enables or disables delete icon in gantt toolbar + * @Default {false} + */ + allowDeleting?: boolean; + + /**Specifies the option for enabling or disabling editing in Gantt grid part + * @Default {false} + */ + allowEditing?: boolean; + + /**Specifies the edit mode in Gantt, "normal" is for dialog editing ,"cellEditing" is for cell type editing + * @Default {normal} + */ + editMode?: string; +} + +export interface ScheduleHeaderSettings { + + /**Specified the format for day view in schedule header + * @Default {ddd} + */ + dayHeaderFormat?: string; + + /**Specified the format for Hour view in schedule header + * @Default {HH} + */ + hourHeaderFormat?: string; + + /**Specifies the number of minutes per interval + * @Default {ej.Gantt.minutesPerInterval.Auto} + */ + minutesPerInterval?: ej.Gantt.minutesPerInterval|string; + + /**Specified the format for month view in schedule header + * @Default {MMM} + */ + monthHeaderFormat?: string; + + /**Specifies the schedule mode + * @Default {ej.Gantt.ScheduleHeaderType.Week} + */ + scheduleHeaderType?: ej.Gantt.ScheduleHeaderType|string; + + /**Specified the background for weekends in gantt + * @Default {#F2F2F2} + */ + weekendBackground?: string; + + /**Specified the format for week view in schedule header + * @Default {ddd} + */ + weekHeaderFormat?: string; + + /**Specified the format for year view in schedule header + * @Default {yyyy} + */ + yearHeaderFormat?: string; +} + +export interface SizeSettings { + + /**Specifies the height of gantt control + * @Default {450px} + */ + height?: string; + + /**Specifies the width of gantt control + * @Default {1000px} + */ + width?: string; +} + +export interface SortSettings { + + /**Specifies the sorted columns for gantt + * @Default {[]} + */ + sortedColumns?: Array; +} + +export interface ToolbarSettings { + + /**Specifies the state of enabling or disabling toolbar + * @Default {true} + */ + showToolBar?: boolean; + + /**Specifies the list of toolbar items to rendered in toolbar + * @Default {[]} + */ + toolbarItems?: Array; +} + +enum DurationUnit{ + + ///Sets the Duration Unit as day. + Day, + + ///Sets the Duration Unit as hour. + Hour, + + ///Sets the Duration Unit as minute. + Minute +} + + +enum minutesPerInterval{ + + ///Sets the interval automatically according with schedule start and end date. + Auto, + + ///Sets one minute intervals per hour. + OneMinute, + + ///Sets Five minute intervals per hour. + FiveMinutes, + + ///Sets fifteen minute intervals per hour. + FifteenMinutes, + + ///Sets thirty minute intervals per hour. + ThirtyMinutes +} + + +enum ScheduleHeaderType{ + + ///Sets year Schedule Mode. + Year, + + ///Sets month Schedule Mode. + Month, + + ///Sets week Schedule Mode. + Week, + + ///Sets day Schedule Mode. + Day, + + ///Sets hour Schedule Mode. + Hour +} + + +enum workingTimeScale{ + + ///Sets eight hour timescale. + TimeScale8Hours, + + ///Sets twenty four hour timescale. + TimeScale24Hours +} + +} + +class ReportViewer extends ej.Widget { + static fn: ReportViewer; + constructor(element: JQuery, options?: ReportViewer.Model); + constructor(element: Element, options?: ReportViewer.Model); + model:ReportViewer.Model; + defaults:ReportViewer.Model; + + /** Export the report to the specified format. + * @returns {void} + */ + exportReport(): void; + + /** Fit the report page to the container. + * @returns {void} + */ + fitToPage(): void; + + /** Fit the report page height to the container. + * @returns {void} + */ + fitToPageHeight(): void; + + /** Fit the report page width to the container. + * @returns {void} + */ + fitToPageWidth(): void; + + /** Get the available datasets name of the rdlc report. + * @returns {void} + */ + getDataSetNames(): void; + + /** Get the available parameters of the report. + * @returns {void} + */ + getParameters(): void; + + /** Navigate to first page of report. + * @returns {void} + */ + gotoFirstPage(): void; + + /** Navigate to last page of the report. + * @returns {void} + */ + gotoLastPage(): void; + + /** Navigate to next page from the current page. + * @returns {void} + */ + gotoNextPage(): void; + + /** Go to specific page index of the report. + * @returns {void} + */ + gotoPageIndex(): void; + + /** Navigate to previous page from the current page. + * @returns {void} + */ + gotoPreviousPage(): void; + + /** Print the report. + * @returns {void} + */ + print(): void; + + /** Apply print layout to the report. + * @returns {void} + */ + printLayout(): void; + + /** Refresh the report. + * @returns {void} + */ + refresh(): void; +} +export module ReportViewer{ + +export interface Model { + + /**Gets or sets the list of data sources for the RDLC report. + * @Default {[]} + */ + dataSources?: Array; + + /**Enables or disables the page cache of report. + * @Default {false} + */ + enablePageCache?: boolean; + + /**Specifies the export settings. + */ + exportSettings?: ExportSettings; + + /**When set to true, adapts the report layout to fit the screen size of devices on which it renders. + * @Default {true} + */ + isResponsive?: boolean; + + /**Specifies the locale for report viewer. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the page settings. + */ + pageSettings?: PageSettings; + + /**Gets or sets the list of parameters associated with the report. + * @Default {[]} + */ + parameters?: Array; + + /**Enables and disables the print mode. + * @Default {false} + */ + printMode?: boolean; + + /**Specifies the print option of the report. + * @Default {ej.ReportViewer.PrintOptions.Default} + */ + printOptions?: ej.ReportViewer.PrintOptions|string; + + /**Specifies the processing mode of the report. + * @Default {ej.ReportViewer.ProcessingMode.Remote} + */ + processingMode?: ej.ReportViewer.ProcessingMode|string; + + /**Specifies the render layout. + * @Default {ej.ReportViewer.RenderMode.Default} + */ + renderMode?: ej.ReportViewer.RenderMode|string; + + /**Gets or sets the path of the report file. + * @Default {empty} + */ + reportPath?: string; + + /**Gets or sets the reports server url. + * @Default {empty} + */ + reportServerUrl?: string; + + /**Specifies the report Web API service url. + * @Default {empty} + */ + reportServiceUrl?: string; + + /**Specifies the toolbar settings. + */ + toolbarSettings?: ToolbarSettings; + + /**Gets or sets the zoom factor for report viewer. + * @Default {1} + */ + zoomFactor?: number; + + /**Fires when the report viewer is destroyed successfully.If you want to perform any operation after destroying the reportviewer control,you can make use of the destroy event.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires during drill through action done in report.If you want to perform any operation when a drill through action is performed, you can make use of the drillThrough event.*/ + drillThrough? (e: DrillThroughEventArgs): void; + + /**Fires before report rendering is completed.If you want to perform any operation before the rendering of report,you can make use of the renderingBegin event.*/ + renderingBegin? (e: RenderingBeginEventArgs): void; + + /**Fires after report rendering completed.If you want to perform any operation after the rendering of report,you can make use of this renderingComplete event.*/ + renderingComplete? (e: RenderingCompleteEventArgs): void; + + /**Fires when any error occurred while rendering the report.If you want to perform any operation when an error occurs in the report, you can make use of the reportError event.*/ + reportError? (e: ReportErrorEventArgs): void; + + /**Fires when the report is being exported.If you want to perform any operation before exporting of report, you can make use of the reportExport event.*/ + reportExport? (e: ReportExportEventArgs): void; + + /**Fires when the report is loaded.If you want to perform any operation after the successful loading of report, you can make use of the reportLoaded event.*/ + reportLoaded? (e: ReportLoadedEventArgs): void; + + /**Fires when click the View Report Button.*/ + viewReportClick? (e: ViewReportClickEventArgs): void; +} + +export interface DestroyEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DrillThroughEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the actionInfo's parameters bookmarkLink, hyperLink, reportName, parameters. + */ + actionInfo?: any; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderingBeginEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderingCompleteEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the collection of parameters. + */ + reportParameters?: any; +} + +export interface ReportErrorEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the error details. + */ + error?: string; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ReportExportEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ReportLoadedEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ViewReportClickEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the parameter collection. + */ + parameters?: any; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DataSources { + + /**Gets or sets the name of the data source. + * @Default {empty} + */ + name?: string; + + /**Gets or sets the values of data source. + * @Default {[]} + */ + values?: Array; +} + +export interface ExportSettings { + + /**Specifies the export formats. + * @Default {ej.ReportViewer.ExportOptions.All} + */ + exportOptions?: ej.ReportViewer.ExportOptions|string; + + /**Specifies the excel export format. + * @Default {ej.ReportViewer.ExcelFormats.Excel97to2003} + */ + excelFormat?: ej.ReportViewer.ExcelFormats|string; + + /**Specifies the word export format. + * @Default {ej.ReportViewer.WordFormats.Doc} + */ + wordFormat?: ej.ReportViewer.WordFormats|string; +} + +export interface PageSettings { + + /**Specifies the print layout orientation. + * @Default {null} + */ + orientation?: ej.ReportViewer.Orientation|string; + + /**Specifies the paper size of print layout. + * @Default {null} + */ + paperSize?: ej.ReportViewer.PaperSize|string; +} + +export interface Parameters { + + /**Gets or sets the parameter labels. + * @Default {null} + */ + labels?: Array; + + /**Gets or sets the name of the parameter. + * @Default {empty} + */ + name?: string; + + /**Gets or sets whether the parameter allows nullable value or not. + * @Default {false} + */ + nullable?: boolean; + + /**Gets or sets the prompt message associated with the specified parameter. + * @Default {empty} + */ + prompt?: string; + + /**Gets or sets the parameter values. + * @Default {[]} + */ + values?: Array; +} + +export interface ToolbarSettings { + + /**Fires when user click on toolbar item in the toolbar. + * @Default {empty} + */ + click?: string; + + /**Specifies the toolbar items. + * @Default {ej.ReportViewer.ToolbarItems.All} + */ + items?: ej.ReportViewer.ToolbarItems|string; + + /**Shows or hides the toolbar. + * @Default {true} + */ + showToolbar?: boolean; + + /**Shows or hides the tooltip of toolbar items. + * @Default {true} + */ + showTooltip?: boolean; + + /**Specifies the toolbar template ID. + * @Default {empty} + */ + templateId?: string; +} + +enum ExportOptions{ + + ///Specifies the All property in ExportOptions to get all availble options. + All, + + ///Specifies the Pdf property in ExportOptions to get Pdf option. + Pdf, + + ///Specifies the Word property in ExportOptions to get Word option. + Word, + + ///Specifies the Excel property in ExportOptions to get Excel option. + Excel, + + ///Specifies the Html property in ExportOptions to get Html option. + Html +} + + +enum ExcelFormats{ + + ///Specifies the Excel97to2003 property in ExcelFormats to get specified version of exported format. + Excel97to2003, + + ///Specifies the Excel2007 property in ExcelFormats to get specified version of exported format. + Excel2007, + + ///Specifies the Excel2010 property in ExcelFormats to get specified version of exported format. + Excel2010, + + ///Specifies the Excel2013 property in ExcelFormats to get specified version of exported format. + Excel2013 +} + + +enum WordFormats{ + + ///Specifies the Doc property in WordFormats to get specified version of exported format. + Doc, + + ///Specifies the Dot property in WordFormats to get specified version of exported format. + Dot, + + ///Specifies the Docx property in WordFormats to get specified version of exported format. + Docx, + + ///Specifies the Word2007 property in WordFormats to get specified version of exported format. + Word2007, + + ///Specifies the Word2010 property in WordFormats to get specified version of exported format. + Word2010, + + ///Specifies the Word2013 property in WordFormats to get specified version of exported format. + Word2013, + + ///Specifies the Word2007Dotx property in WordFormats to get specified version of exported format. + Word2007Dotx, + + ///Specifies the Word2010Dotx property in WordFormats to get specified version of exported format. + Word2010Dotx, + + ///Specifies the Word2013Dotx property in WordFormats to get specified version of exported format. + Word2013Dotx, + + ///Specifies the Word2007Docm property in WordFormats to get specified version of exported format. + Word2007Docm, + + ///Specifies the Word2010Docm property in WordFormats to get specified version of exported format. + Word2010Docm, + + ///Specifies the Word2013Docm property in WordFormats to get specified version of exported format. + Word2013Docm, + + ///Specifies the Word2007Dotm property in WordFormats to get specified version of exported format. + Word2007Dotm, + + ///Specifies the Word2010Dotm property in WordFormats to get specified version of exported format. + Word2010Dotm, + + ///Specifies the Word2013Dotm property in WordFormats to get specified version of exported format. + Word2013Dotm, + + ///Specifies the Rtf property in WordFormats to get specified version of exported format. + Rtf, + + ///Specifies the Txt property in WordFormats to get specified version of exported format. + Txt, + + ///Specifies the EPub property in WordFormats to get specified version of exported format. + EPub, + + ///Specifies the Html property in WordFormats to get specified version of exported format. + Html, + + ///Specifies the Xml property in WordFormats to get specified version of exported format. + Xml, + + ///Specifies the Automatic property in WordFormats to get specified version of exported format. + Automatic +} + + +enum Orientation{ + + ///Specifies the Landscape property in pageSettings.orientation to get specified layout. + Landscape, + + ///Specifies the portrait property in pageSettings.orientation to get specified layout. + Portrait +} + + +enum PaperSize{ + + ///Specifies the A3 as value in pageSettings.paperSize to get specified size. + A3, + + ///Specifies the A4 as value in pageSettings.paperSize to get specified size. + Portrait, + + ///Specifies the B4(JIS) as value in pageSettings.paperSize to get specified size. + B4_JIS, + + ///Specifies the B5(JIS) as value in pageSettings.paperSize to get specified size. + B5_JIS, + + ///Specifies the Envelope #10 as value in pageSettings.paperSize to get specified size. + Envelope_10, + + ///Specifies the Envelope as value in pageSettings.paperSize to get specified size. + Envelope_Monarch, + + ///Specifies the Executive as value in pageSettings.paperSize to get specified size. + Executive, + + ///Specifies the Legal as value in pageSettings.paperSize to get specified size. + Legal, + + ///Specifies the Letter as value in pageSettings.paperSize to get specified size. + Letter, + + ///Specifies the Tabloid as value in pageSettings.paperSize to get specified size. + Tabloid, + + ///Specifies the Custom as value in pageSettings.paperSize to get specified size. + Custom +} + + +enum PrintOptions{ + + ///Specifies the Default property in printOptions. + Default, + + ///Specifies the NewTab property in printOptions. + NewTab, + + ///Specifies the None property in printOptions. + None +} + + +enum ProcessingMode{ + + ///Specifies the Remote property in processingMode. + Remote, + + ///Specifies the Local property in processingMode. + Local +} + + +enum RenderMode{ + + ///Specifies the Default property in RenderMode to get default output. + Default, + + ///Specifies the Mobile property in RenderMode to get specified output. + Mobile, + + ///Specifies the Desktop property in RenderMode to get specified output. + Desktop +} + + +enum ToolbarItems{ + + ///Specifies the Print as value in ToolbarItems to get specified item. + Print, + + ///Specifies the Refresh as value in ToolbarItems to get specified item. + Refresh, + + ///Specifies the Zoom as value in ToolbarItems to get specified item. + Zoom, + + ///Specifies the FittoPage as value in ToolbarItems to get specified item. + FittoPage, + + ///Specifies the Export as value in ToolbarItems to get specified item. + Export, + + ///Specifies the PageNavigation as value in ToolbarItems to get specified item. + PageNavigation, + + ///Specifies the Parameters as value in ToolbarItems to get specified item. + Parameters, + + ///Specifies the PrintLayout as value in ToolbarItems to get specified item. + PrintLayout, + + ///Specifies the PageSetup as value in ToolbarItems to get specified item. + PageSetup +} + +} + +class TreeGrid extends ej.Widget { + static fn: TreeGrid; + constructor(element: JQuery, options?: TreeGrid.Model); + constructor(element: Element, options?: TreeGrid.Model); + model:TreeGrid.Model; + defaults:TreeGrid.Model; + + /** To clear all the selection in TreeGrid + * @param {number} you can pass a row index to clear the row selection. + * @returns {void} + */ + clearSelection(index: number): void; + + /** To collapse all the parent items in tree grid + * @returns {void} + */ + collapseAll(): void; + + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide. + * @returns {void} + */ + hideColumn(headerText: string): void; + + /** To refresh the changes in tree grid + * @param {Array} Pass which data source you want to show in tree grid + * @param {any} Pass which data you want to show in tree grid + * @returns {void} + */ + refresh(dataSource: Array, query: any): void; + + /** Freeze all the columns preceding to the column specified by the field name. + * @param {string} Freeze all Columns before this field column. + * @returns {void} + */ + freezePrecedingColumns (field: string): void; + + /** Freeze/unfreeze the specified column. + * @param {string} Freeze/Unfreeze this field column. + * @param {boolean} Decides to Freeze/Unfreeze this field column. + * @returns {void} + */ + freezeColumn (field: string, isFrozen: boolean): void; + + /** To save the edited cell in TreeGrid + * @returns {void} + */ + saveCell(): void; + + /** To search an item with search string provided at the run time + * @param {string} you can pass a searchString to search the tree grid + * @returns {void} + */ + search(searchString: string): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show. + * @returns {void} + */ + showColumn(headerText: string): void; + + /** To sorting the data based on the particular fields + * @param {string} you can pass a name of column to sort. + * @param {string} you can pass a sort direction to sort the column. + * @returns {void} + */ + sortColumn(columnName: string, columnSortDirection: string): void; +} +export module TreeGrid{ + +export interface Model { + + /**Enables or disables the ability to resize the column width interactively. + * @Default {false} + */ + allowColumnResize?: boolean; + + /**Enables or disables the ability to drag and drop the row interactively to reorder the rows. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /**Enables or disables the ability to filter the data on all the columns. Enabling this property will display a row with editor controls corresponding to each column. You can restrict filtering on particular column by disabling this property directly on that column instance itself. + * @Default {false} + */ + allowFiltering?: boolean; + + /**Enables or disables keyboard navigation. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Enables or disables the ability to sort the rows based on multiple columns/fields by clicking on each column header. Rows will be sorted recursively on clicking the column headers. + * @Default {false} + */ + allowMultiSorting?: boolean; + + /**Enables or disables the ability to select a row interactively. + * @Default {true} + */ + allowSelection?: boolean; + + /**Enables or disables the ability to sort the rows based on a single field/column by clicking on that column header. When enabled, rows can be sorted only by single field/column. + * @Default {false} + */ + allowSorting?: boolean; + + /**Specifies the id of the template that has to be applied for alternate rows. + */ + altRowTemplateID?: string; + + /**Specifies the mapping property path for sub tasks in datasource + */ + childMapping?: string; + + /**Option for adding columns; each column has the option to bind to a field in the dataSource. + */ + columns?: Array; + + /**Options for displaying and customizing context menu items. + */ + contextMenuSettings?: ContextMenuSettings; + + /**Specifies hierarchical or self-referential data to populate the TreeGrid. + * @Default {null} + */ + dataSource?: Array; + + /**Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. + * @Default {none} + */ + headerTextOverflow?: string; + + /**Options for displaying and customizing the tooltip. This tooltip will show the preview of the row that is being dragged. + */ + dragTooltip?: DragTooltip; + + /**Options for enabling and configuring the editing related operations. + */ + editSettings?: EditSettings; + + /**Specifies whether to render alternate rows in different background colors. + * @Default {true} + */ + enableAltRow?: boolean; + + /**Specifies whether to load all the rows in collapsed state when the TreeGrid is rendered for the first time. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /**Specifies whether to resize TreeGrid whenever window size changes. + * @Default {false} + */ + enableResize?: boolean; + + /**Specifies whether to render only the visual elements that are visible in the UI. When you enable this property, it will reduce the loading time for loading large number of records. + * @Default {false} + */ + enableVirtualization?: boolean; + + /**Specifies if the filtering should happen immediately on each key press or only on pressing enter key. + * @Default {immediate} + */ + filterBarMode?: string; + + /**Specifies the name of the field in the dataSource, which contains the id of that row. + */ + idMapping?: string; + + /**Specifies the name of the field in the dataSource, which contains the parent’s id. This is necessary to form a parent-child hierarchy, if the dataSource contains self-referential data. + */ + parentIdMapping?: string; + + /**Specifies ej.Query to select data from the dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /**Specifies the height of a single row in tree grid. Also, we need to set same height in the CSS style with class name e-rowcell. + * @Default {30} + */ + rowHeight?: number; + + /**Specifies the id of the template to be applied for all the rows. + */ + rowTemplateID?: string; + + /**Specifies the index of the selected row. + * @Default {-1} + */ + selectedRowIndex?: number; + + /**Specifies the type of selection whether to select single row or multiple rows. + * @Default {ej.TreeGrid.SelectionType.Single} + */ + selectionType?: ej.Gantt.SelectionType|string; + + /**Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose “Columns” item from this popup, a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. + * @Default {false} + */ + showColumnChooser?: boolean; + + /**Specifies whether to show tooltip when mouse is hovered on the cell. + * @Default {true} + */ + showGridCellTooltip?: boolean; + + /**Specifies whether to show tooltip for the cells, which has expander button. + * @Default {true} + */ + showGridExpandCellTooltip?: boolean; + + /**Options for setting width and height for TreeGrid. + */ + sizeSettings?: SizeSettings; + + /**Options for sorting the rows. + */ + sortSettings?: SortSettings; + + /**Options for displaying and customizing the toolbar items. + */ + toolbarSettings?: ToolbarSettings; + + /**Specifies the index of the column that needs to have the expander button. By default, cells in the first column contain the expander button. + * @Default {0} + */ + treeColumnIndex?: number; + + /**Triggered before every success event of TreeGrid action.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every TreeGrid action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered while enter the edit mode in the TreeGrid cell*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered after collapsed the TreeGrid record*/ + collapsed? (e: CollapsedEventArgs): void; + + /**Triggered while collapsing the TreeGrid record*/ + collapsing? (e: CollapsingEventArgs): void; + + /**Triggered while Context Menu is rendered in TreeGrid control*/ + contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + + /**Triggered after saved the modified cellValue in TreeGrid*/ + endEdit? (e: EndEditEventArgs): void; + + /**Triggered after expand the record*/ + expanded? (e: ExpandedEventArgs): void; + + /**Triggered while expanding the TreeGrid record*/ + expanding? (e: ExpandingEventArgs): void; + + /**Triggered while Treegrid is loaded*/ + load? (e: LoadEventArgs): void; + + /**Triggered while rendering each cell in the TreeGrid*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggered while rendering each row*/ + rowDataBound? (e: RowDataBoundEventArgs): void; + + /**Triggered while dragging a row in TreeGrid control*/ + rowDrag? (e: RowDragEventArgs): void; + + /**Triggered while start to drag row in TreeGrid control*/ + rowDragStart? (e: RowDragStartEventArgs): void; + + /**Triggered while drop a row in TreeGrid control*/ + rowDragStop? (e: RowDragStopEventArgs): void; + + /**Triggered after the row is selected.*/ + rowSelected? (e: RowSelectedEventArgs): void; + + /**Triggered before the row is going to be selected.*/ + rowSelecting? (e: RowSelectingEventArgs): void; + + /**Triggered when toolbar item is clicked in TreeGrid.*/ + toolbarClick? (e: ToolbarClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the direction of sorting ascending or descending. + */ + columnSortDirection?: string; + + /**Returns the value of expanding parent element. + */ + keyValue?: string; + + /**Returns the data or deleting element. + */ + data?: string; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; + + /**Returns the value of searched element. + */ + keyValue?: string; + + /**Returns the data of deleted element. + */ + data?: string; + + /**Returns selected record index + */ + recordIndex?: number; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column Index of cell belongs. + */ + columnIndex?: number; +} + +export interface CollapsedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsed record. + */ + recordIndex?: number; + + /**Returns the data of collpsed record.. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + + /**Returns the event type. + */ + type?: string; +} + +export interface CollapsingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsing record. + */ + recordIndex?: number; + + /**Returns the data of collapsing record.. + */ + data?: any; + + /**Returns the event Type. + */ + type?: string; + + /**Returns state of a record whether it is in expanded or collapsing state. + */ + expanded?: boolean; +} + +export interface ContextMenuOpenEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the default context menu items to which we add custom items. + */ + contextMenuItems?: Array; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of edited cell record. + */ + data?: any; + + /**Returns the column name of edited cell belongs. + */ + columnName?: string; + + /**Returns the column object of edited cell belongs. + */ + columnObject?: any; +} + +export interface ExpandedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of expanded record. + */ + recordIndex?: number; + + /**Returns the data of expanded record.. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or expanded state. + */ + expanded?: boolean; + + /**Returns the event type. + */ + type?: string; +} + +export interface ExpandingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of expanding record. + */ + recordIndex?: number; + + /**Returns the data of expanding record.. + */ + data?: any; + + /**Returns the event Type. + */ + type?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface LoadEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the TreeGrid model + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface QueryCellInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting cell element. + */ + cellElement?: any; + + /**Returns the value of cell. + */ + cellValue?: string; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column of cell belongs. + */ + column?: any; +} + +export interface RowDataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of rendering row. + */ + rowElement?: any; + + /**Returns the data of rendering row record. + */ + data?: any; +} + +export interface RowDragEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row which we start to drag. + */ + draggedRow?: any; + + /**Returns the row index which we start to drag. + */ + draggedRowIndex?: number; + + /**Returns the row on which we are dragging. + */ + targetRow?: any; + + /**Returns the row index on which we are dragging. + */ + targetRowIndex?: number; + + /**Returns that we can drop over that record or not. + */ + canDrop?: boolean; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowDragStartEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row which we start to drag. + */ + draggedRow?: any; + + /**Returns the row index which we start to drag. + */ + draggedRowIndex?: boolean; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowDragStopEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row which we start to drag. + */ + draggedRow?: any; + + /**Returns the row index which we start to drag. + */ + draggedRowIndex?: number; + + /**Returns the row which we are dropped to row. + */ + targetRow?: any; + + /**Returns the row index which we are dropped to row. + */ + targetRowIndex?: number; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowSelectedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting row element. + */ + targetRow?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: number; + + /**Returns the data of selected record. + */ + data?: any; + + /**Returns the event type. + */ + type?: string; +} + +export interface RowSelectingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data selecting record. + */ + data?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: string; + + /**Returns the selecting row element. + */ + targetRow?: any; + + /**Returns the previous selected data. + */ + previousData?: any; + + /**Returns the previous selected row index. + */ + previousIndex?: string; + + /**Returns the previous selected row element. + */ + previousTreeGridRow?: any; +} + +export interface ToolbarClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns the name of the toolbar item on which mouse click has been performed + */ + itemName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface Columns { + + /**Enables or disables the ability to filter the rows based on this column. + * @Default {false} + */ + allowFiltering?: boolean; + + /**Enables or disables the ability to sort the rows based on this column/field. + * @Default {false} + */ + allowSorting?: boolean; + + /**Specifies the edit type of the column. + * @Default {ej.TreeGrid.EditingType.String} + */ + editType?: ej.TreeGrid.EditingType|string; + + /**Specifies the name of the field from the dataSource to bind with this column. + */ + field?: string; + + /**Specifies the type of the editor control to be used to filter the rows. + * @Default {ej.TreeGrid.EditingType.String} + */ + filterEditType?: ej.TreeGrid.EditingType|string; + + /**Header text of the column. + * @Default {null} + */ + headerText?: string; + + /**Controls the visibility of the column. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the header template value for the column header + */ + headerTemplateID?: string; + + /**Specifies whether the column is frozen + * @Default {false} + */ + isFrozen?: boolean; + + /**Enables or disables the ability to freeze/unfreeze the columns + * @Default {false} + */ + allowFreezing?: boolean; +} + +export interface ContextMenuSettings { + + /**Option for adding items to context menu. + * @Default {[]} + */ + contextMenuItems?: Array; + + /**Shows/hides the context menu. + * @Default {false} + */ + showContextMenu?: boolean; +} + +export interface DragTooltip { + + /**Specifies whether to show tooltip while dragging a row. + * @Default {true} + */ + showTooltip?: boolean; + + /**Option to add field names whose corresponding values in the dragged row needs to be shown in the preview tooltip. + * @Default {[]} + */ + tooltipItems?: Array; + + /**Custom template for that tooltip that is shown while dragging a row. + * @Default {null} + */ + tooltipTemplate?: string; +} + +export interface EditSettings { + + /**Enables or disables the button to add new row in context menu as well as in toolbar. + * @Default {true} + */ + allowAdding?: boolean; + + /**Enables or disables the button to delete the selected row in context menu as well as in toolbar. + * @Default {true} + */ + allowDeleting?: boolean; + + /**Enables or disables the ability to edit a row or cell. + * @Default {false} + */ + allowEditing?: boolean; + + /**specifies the edit mode in TreeGrid , "cellEditing" is for cell type editing and "rowEditing" is for entire row. + * @Default {ej.TreeGrid.EditMode.CellEditing} + */ + editMode?: ej.TreeGrid.EditMode|string; + + /**Specifies the position where the new row has to be added. + * @Default {top} + */ + rowPosition?: ej.TreeGrid.RowPosition|string; +} + +export interface SizeSettings { + + /**Height of the TreeGrid. + * @Default {null} + */ + height?: string; + + /**Width of the TreeGrid. + * @Default {null} + */ + width?: string; +} + +export interface SortSettings { + + /**Option to add columns based on which the rows have to be sorted recursively. + * @Default {[]} + */ + sortedColumns?: Array; +} + +export interface ToolbarSettings { + + /**Shows/hides the toolbar. + * @Default {false} + */ + showToolBar?: boolean; + + /**Option to add items to the toolbar. + * @Default {[]} + */ + toolbarItems?: Array; +} + +enum EditingType{ + + ///It Specifies String edit type. + String, + + ///It Specifies Boolean edit type. + Boolean, + + ///It Specifies Numeric edit type. + Numeric, + + ///It Specifies Dropdown edit type. + Dropdown, + + ///It Specifies DatePicker edit type. + DatePicker, + + ///It Specifies DateTimePicker edit type. + DateTimePicker, + + ///It Specifies Maskedit edit type. + Maskedit +} + + +enum EditMode{ + + ///you can edit a cell. + CellEditing, + + ///you can edit a row. + RowEditing +} + + +enum RowPosition{ + + ///you can add a new row at top. + Top, + + ///you can add a new row at bottom. + Bottom, + + ///you can add a new row to above selected row. + Above, + + ///you can add a new row to below selected row. + Below, + + ///you can add a new row as a child for selected row. + Child +} + +} +module Gantt +{ +enum SelectionType +{ +//you can select a single row. +Single, +//you can select a multiple row. +Multiple, +} +} + +class NavigationDrawer extends ej.Widget { + static fn: NavigationDrawer; + constructor(element: JQuery, options?: NavigationDrawer.Model); + constructor(element: Element, options?: NavigationDrawer.Model); + model:NavigationDrawer.Model; + defaults:NavigationDrawer.Model; + + /** To close the navigation drawer control + * @returns {void} + */ + close(): void; + + /** To open the navigation drawer control + * @returns {void} + */ + open(): void; + + /** To Toggle the navigation drawer control + * @returns {void} + */ + toggle(): void; +} +export module NavigationDrawer{ + +export interface Model { + + /**Specifies the contentId for navigation drawer, where the ajax content need to updated + * @Default {null} + */ + contentid?: string; + + /**Sets the root class for NavigationDrawer theme. This cssClass API helps to use custom skinning option for NavigationDrawer control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssclass?: string; + + /**Sets the Direction for the control. See Direction + * @Default {left} + */ + direction?: ej.Direction|string; + + /**Sets the listview to be enabled or not + * @Default {false} + */ + enablelistview?: boolean; + + /**Specifies the listview items as an array of object. + * @Default {[]} + */ + items?: Array; + + /**Sets all the properties of listview to render in navigation drawer + */ + listviewsettings?: any; + + /**Specifies position whether it is in fixed or relative to the page. See Position + * @Default {normal} + */ + position?: string; + + /**Specifies the targetId for navigation drawer + */ + targetid?: string; + + /**Sets the rendering type of the control. See Type + * @Default {overlay} + */ + type?: string; + + /**Specifies the width of the control + * @Default {auto} + */ + width?: number; + + /**Event triggers before the control gets closed.*/ + beforeclose? (e: BeforecloseEventArgs): void; + + /**Event triggers when the control open.*/ + open? (e: OpenEventArgs): void; + + /**Event triggers when the Swipe happens.*/ + swipe? (e: SwipeEventArgs): void; +} + +export interface BeforecloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface SwipeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} +} + +class RadialMenu extends ej.Widget { + static fn: RadialMenu; + constructor(element: JQuery, options?: RadialMenu.Model); + constructor(element: Element, options?: RadialMenu.Model); + model:RadialMenu.Model; + defaults:RadialMenu.Model; + + /** To hide the redialmenu + * @returns {void} + */ + hide(): void; + + /** To hide the redialmenu items + * @returns {void} + */ + menuHide(): void; + + /** To Show the redialmenu + * @returns {void} + */ + show(): void; +} +export module RadialMenu{ + +export interface Model { + + /**To show the Radial in intial render. + */ + autoOpen?: boolean; + + /**Renders the back button Image for Radial using class. + */ + backImageClass?: string; + + /**Sets the root class for RadialMenu theme. This cssClass API helps to use custom skinning option for RadialMenu control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssClass?: string; + + /**To enable Animation for Radial Menu. + */ + enableAnimation?: boolean; + + /**Renders the Image for Radial using Class. + */ + imageClass?: string; + + /**Specifies the radius of radial menu + */ + radius?: number; + + /**To show the Radial while clicking given target element. + */ + targetElementId?: string; + + /**Event triggers when the mouse down happens.*/ + mouseDown? (e: MouseDownEventArgs): void; + + /**Event triggers when the mouse up happens.*/ + mouseUp? (e: MouseUpEventArgs): void; + + /**Event triggers when we select an item.*/ + select? (e: SelectEventArgs): void; +} + +export interface MouseDownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Radialmenu model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface MouseUpEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Radialmenu model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Radialmenu model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} +} + +class Tile extends ej.Widget { + static fn: Tile; + constructor(element: JQuery, options?: Tile.Model); + constructor(element: Element, options?: Tile.Model); + model:Tile.Model; + defaults:Tile.Model; + + /** Update the image template of tile item to another one. + * @param {string} UpdateTemplate by using id + * @returns {void} + */ + updateTemplate(name: string): void; +} +export module Tile{ + +export interface Model { + + /**Section for badge specific functionalities and it represents the notification for tile items. + */ + badge?: Badge; + + /**Specifies the tile caption in outside of template content. + * @Default {null} + */ + captionTemplateId?: string; + + /**Sets the root class for Tile theme. This cssClass API helps to use custom skinning option for Tile control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssClass?: string; + + /**Saves current model value to browser cookies for state maintains. While refreshing the page retains the model value applies from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Customize the tile size height. + * @Default {null} + */ + height?: number; + + /**Specifies Tile imageClass, using this property we can give images for each tile through css classes. + * @Default {null} + */ + imageClass?: string; + + /**Specifies the position of tile image. See imagePosition + * @Default {center} + */ + imagePosition?: ej.Tile.ImagePosition|string; + + /**Specifies the tile image in outside of template content. + * @Default {null} + */ + imageTemplateId?: string; + + /**Specifies the url of tile image. + * @Default {null} + */ + imageUrl?: string; + + /**Section for livetile specific functionalities. + */ + livetile?: Livetile; + + /**Specifies whether the tile text to be shown or hidden. + * @Default {true} + */ + showText?: boolean; + + /**Changes the text of a tile. + * @Default {Text} + */ + text?: string; + + /**Aligns the text of a tile. See textAlignment + * @Default {normal} + */ + textAlignment?: ej.Tile.TextAlignment|string; + + /**Specifies the size of a tile. See tileSize + * @Default {small} + */ + tileSize?: ej.Tile.TileSize|string; + + /**Customize the tile size width. + * @Default {null} + */ + width?: number; + + /**Sets the rounded corner to tile. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Sets allowSelection to tile. + * @Default {false} + */ + allowSelection?: boolean; + + /**Sets the background color to tile. + * @Default {false} + */ + backgroundColor?: string; + + /**Event triggers when the mouse down happens in the tile*/ + mouseDown? (e: MouseDownEventArgs): void; + + /**Event triggers when the mouse up happens in the tile*/ + mouseUp? (e: MouseUpEventArgs): void; +} + +export interface MouseDownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tile model + */ + model?: boolean; + + /**returns the name of the event + */ + type?: boolean; + + /**returns the current tile text + */ + text?: string; + + /**returns the index of current tile item + */ + index?: number; +} + +export interface MouseUpEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tile model + */ + model?: boolean; + + /**returns the name of the event + */ + type?: boolean; + + /**returns the current tile text + */ + text?: boolean; + + /**returns the index of current tile item + */ + index?: number; +} + +export interface Badge { + + /**Specifies whether to enable badge or not. + * @Default {false} + */ + enabled?: boolean; + + /**Specifies maximum value for tile badge. + * @Default {100} + */ + maxValue?: number; + + /**Specifies minimum value for tile badge. + * @Default {1} + */ + minValue?: number; + + /**Specifies text instead of number for tile badge. + * @Default {null} + */ + text?: string; + + /**Sets value for tile badge. + * @Default {1} + */ + value?: number; + + /**Sets position for tile badge. + * @Default {“bottomright”} + */ + position?: ej.Tile.BadgePosition|string; +} + +export interface Livetile { + + /**Specifies whether to enable livetile or not. + * @Default {false} + */ + enabled?: boolean; + + /**Specifies liveTile images in css classes. + * @Default {null} + */ + imageClass?: string; + + /**Specifies liveTile images in templates. + * @Default {null} + */ + imageTemplateId?: string; + + /**Specifies liveTile images in css classes. + * @Default {null} + */ + imageUrl?: string; + + /**Specifies liveTile type for Tile. See orientation + * @Default {flip} + */ + type?: ej.Tile.LiveTileType|string; + + /**Specifies time interval between two successive livetile animation + * @Default {2000} + */ + updateInterval?: number; + + /**Sets the text to each living tile + * @Default {Null} + */ + text?: Array; +} + +enum BadgePosition{ + + ///To set the topright position of tile badge + Topright, + + ///To set the bottomright of tile image + Bottomright +} + + +enum ImagePosition{ + + ///To set the center position of tile image + Center, + + ///To set the top position of tile image + Top, + + ///To set the bottom position of tile image + Bottom, + + ///To set the right position of tile image + Right, + + ///To set the left position of tile image + Left, + + ///To set the topleft position of tile image + TopLeft, + + ///To set the topright position of tile image + TopRight, + + ///To set the bottomright position of tile image + BottomRight, + + ///To set the bottomleft position of tile image + BottomLeft, + + ///To set the fill position of tile image + Fill +} + + +enum LiveTileType{ + + ///To set flip type of liveTile for tile control + Flip, + + ///To set slide type of liveTile for tile control + Slide, + + ///To set carousel type of liveTile for tile control + Carousel +} + + +enum TextAlignment{ + + ///To set the normal alignment of text for tile control + Normal, + + ///To set the left alignment of text for tile control + Left, + + ///To set the right alignment of text for tile control + Right, + + ///To set the center alignment of text for tile control + Center +} + + +enum TextPosition{ + + ///To set the innertop position of the tile text + Innertop, + + ///To set the innerbottom position of the tile text + Innerbottom, + + ///To set the outer position of the tile text + Outer +} + + +enum TileSize{ + + ///To set the medium size for tile control + Medium, + + ///To set the small size for tile control + Small, + + ///To set the large size for tile control + Large, + + ///To set the wide size for tile control + Wide +} + +} + +class RadialSlider extends ej.Widget { + static fn: RadialSlider; + element: JQuery; + constructor(element: JQuery, options?: RadialSliderOptions); + constructor(element: Element, options?: RadialSliderOptions); + model:RadialSliderOptions; + defaults:RadialSliderOptions; + show(): void; + hide(): void; +} + +interface RadialSliderOptions { + radius?: number; + endAngle?: number; + startAngle?: number; + ticks?: Int32Array; + enableRoundOff?: boolean; + value?: number; + strokeWidth?: number; + autoOpen?: boolean; + enableAnimation?: boolean; + cssClass?: string; + innerCircleImageClass?: string; + innerCircleImageUrl?: string; + showInnerCircle?: boolean; + inline?: boolean; + stop? (e: RadialSliderStopEventArgs): void; + start? (e: RadialSliderStartEventArgs): void; + slide? (e: RadialSliderSlideEventArgs): void; + change? (e: RadialSliderChangeEventArgs): void; + mouseover? (e: RadialSliderMouseOverEventArgs): void; + create? (e: RadialSliderCreateEventArgs): void; + destory? (e: RadialSliderDestroyEventArgs): void; +} +interface RadialSliderCreateEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; +} +interface RadialSliderDestroyEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; +} +interface RadialSliderStopEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; +} + +interface RadialSliderStartEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; +} +interface RadialSliderSlideEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; + selectedValue: number; +} +interface RadialSliderChangeEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; + oldValue: number; +} +interface RadialSliderMouseOverEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; + selectedValue: number; +} +class Spreadsheet extends ej.Widget { + static fn: Spreadsheet; + constructor(element: JQuery, options?: Spreadsheet.Model); + constructor(element: Element, options?: Spreadsheet.Model); + model:Spreadsheet.Model; + defaults:Spreadsheet.Model; + + /** This method is used to add a new sheet in the last position of the sheet container. + * @returns {void} + */ + addNewSheet(): void; + + /** It is used to clear all the data and format in the specified range of cells in Spreadsheet. + * @param {string} Optional. If range is specified, then it will clear all content in the specified range else it will use the current selected range. + * @returns {void} + */ + clearAll(range: string): void; + + /** This property is used to clear all the formats applied in the specified range in Spreadsheet. + * @param {string} Optional. If range is specified, then it will clear all format in the specified range else it will use the current selected range. + * @returns {void} + */ + clearAllFormat(range: string): void; + + /** Used to clear the applied border in the specified range in Spreadsheet. + * @param {string} Optional. If range is specified, then it will clear border in the specified range else it will use the current selected range. + * @returns {void} + */ + clearBorder(range: string): void; + + /** This property is used to clear the contents in the specified range in Spreadsheet. + * @param {string} Optional. If the range is specified, then it will clear the content in the specified range else it will use the current selected range. + * @returns {void} + */ + clearContents(range: string): void; + + /** This method is used to remove only the data in the range denoted by the specified range name. + * @param {string} Pass the defined rangeSettings property name. + * @returns {void} + */ + clearRange(rangeName: string): void; + + /** It is used to remove data in the specified range of cells based on the defined property. + * @param {Array|string} Optional. If range is specified, it will clear data for the specified range else it will use the current selected range. + * @param {string} Optional. If property is specified, it will remove the specified property in the range else it will remove default properties + * @param {boolean} Optional. If pass true, if you want to skip the hidden rows + * @returns {void} + */ + clearRangeData(range: Array|string, property: string, skipHiddenRow: boolean): void; + + /** This method is used to copy sheets in Spreadsheet. + * @param {number} Pass the sheet index that you want to copy. + * @param {number} Pass the position index where you want to copy. + * @returns {void} + */ + copySheet(fromIdx: number, toIdx: number): void; + + /** This method is used to delete the entire column which is selected. + * @param {number} Pass the start column index. + * @param {number} Pass the end column index. + * @returns {void} + */ + deleteEntireColumn(startCol: number, endCol: number): void; + + /** This method is used to delete the entire row which is selected. + * @param {number} Pass the start row index. + * @param {number} Pass the end row index. + * @returns {void} + */ + deleteEntireRow(startRow: number, endRow: number): void; + + /** This method is used to delete a particular sheet in the Spreadsheet. + * @param {number} Pass the sheet index to perform delete action. + * @returns {void} + */ + deleteSheet(idx: number): void; + + /** This method is used to delete the selected cells and shift the remaining cells to left. + * @param {any} Row index and column index of the starting cell. + * @param {any} Row index and column index of the ending cell. + * @returns {void} + */ + deleteShiftLeft(startCell: any, endCell: any): void; + + /** This method is used to delete the selected cells and shift the remaining cells up. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + deleteShiftUp(startCell: any, endCell: any): void; + + /** This method is used to edit data in the specified range of cells based on its corresponding rangeSettings. + * @param {string} Pass the defined rangeSettings property name. + * @param {Function} Pass the function that you want to perform range edit. + * @returns {void} + */ + editRange(rangeName: string, fn: Function): void; + + /** This method is used to get the activation panel in the Spreadsheet. + * @returns {HTMLElement} + */ + getActivationPanel(): HTMLElement; + + /** This method is used to get the active cell object in Spreadsheet. It will returns object which contains rowIndex and colIndex of the active cell. + * @param {number} Optional. If sheetIdx is specified, it will return the active cell object in specified sheet index else it will use the current sheet index + * @returns {any} + */ + getActiveCell(sheetIdx: number): any; + + /** This method is used to get the active cell element based on the given sheet index in the Spreadsheet. + * @param {number} Optional. If sheetIndex is specified, it will return the active cell element in specified sheet index else it will use the current active sheet index. + * @returns {HTMLElement} + */ + getActiveCellElem(sheetIdx: number): HTMLElement; + + /** This method is used to get the current active sheet index in Spreadsheet. + * @returns {number} + */ + getActiveSheetIndex(): number; + + /** This method is used to get the auto fill element in Spreadsheet. + * @returns {HTMLElement} + */ + getAutoFillElem(): HTMLElement; + + /** This method is used to get the cell element based on specified row and column index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @param {number} Optional. Pass the sheet index that you want to get cell. + * @returns {HTMLElement} + */ + getCell(rowIdx: number, colIdx: number, sheetIdx: number): HTMLElement; + + /** This method is used to get the frozen columns index in the Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getFrozenColumns(sheetIdx: number): number; + + /** This method is used to get the frozen row’s index in Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getFrozenRows(sheetIdx: number): number; + + /** This method is used to get the hyperlink data as object from the specified cell in Spreadsheet. + * @param {HTMLElement} Pass the DOM element to get hyperlink + * @returns {any} + */ + getHyperlink(cell: HTMLElement): any; + + /** This method is used to get all cell elements in the specified range. + * @param {number} Pass the row index of the start cell. + * @param {number} Pass the column index of the start cell. + * @param {number} Pass the row index of the end cell. + * @param {number} Pass the column index of the end cell. + * @param {number} Pass the index of the sheet. + * @returns {HTMLElement} + */ + getRange(startRIndex: number, startCIndex: number, endRIndex: number, endCIndex: number, sheetIdx: number): HTMLElement; + + /** This method is used to get the data in specified range in Spreadsheet. + * @param {Array|string} Optional. If range is specified, it will get range data for the specified range else it will use the current selected range. + * @param {boolean} Pass 'true' if you want cell values alone. + * @param {Array|string} Optional. If property is specified, it will get the specified property in the range else it will get default properties. + * @param {number} Optional. Pass the index of the sheet. + * @param {boolean} Optional. When skipDateTime is set as true, it return 'value2' cell value (cell type as 'datetime') + * @param {boolean} Optional. Pass true, if you want to get the calculated formula value else it return formula string. + * @param {boolean} Optional. Pass true, if you want to skip the hidden rows data. + * @param {number} Optional. Pass virtual row index of sheet. + * @param {number} Optional. Pass virtual row count of sheet. + * @returns {Array} + */ + getRangeData(range: Array|string, valueOnly: boolean, property: Array|string, sheetIdx: number, skipDateTime: boolean, skipFormula: boolean, skipHiddenRow: boolean, virtualRowIdx: number, virtualRowCount: number): Array; + + /** This method is used to get the range indices array based on the specified alpha range in Spreadsheet. + * @param {string} Pass the alpha range that you want to get range indices. + * @returns {Array} + */ + getRangeIndices(range: string): Array; + + /** This method is used to get the sheet details based on the given sheet index in Spreadsheet. + * @param {number} Pass the sheet index to get the sheet object. + * @returns {any} + */ + getSheet(sheetIdx: number): any; + + /** This method is used to get the sheet content div element of Spreadsheet. + * @param {number} Pass the sheet index to get the sheet content. + * @returns {HTMLElement} + */ + getSheetElement(sheetIdx: number): HTMLElement; + + /** This method is used to send a paging request to the specified sheet Index in the Spreadsheet. + * @param {number} Pass the sheet index to perform paging at specified sheet index + * @param {boolean} Pass 'true' to create a new sheet. If the specified sheet index is already exist, it navigate to that sheet else it create a new sheet. + * @returns {void} + */ + gotoPage(sheetIdx: number, newSheet: boolean): void; + + /** This method is used to hide the entire columns from the specified range (startCol, endCol) in Spreadsheet. + * @param {number} Index of the start column. + * @param {number} Index of the end column. + * @returns {void} + */ + hideColumn(startCol: number, endCol: number): void; + + /** This method is used to hide the formula bar in Spreadsheet. + * @returns {void} + */ + hideFormulaBar(): void; + + /** This method is used to hide the rows, based on the specified row index in Spreadsheet. + * @param {number} Index of the start row. + * @param {number} Index of the end row. + * @returns {void} + */ + hideRow(startRow: number, endRow: number): void; + + /** This method is used to hide the sheet based on the specified sheetIndex or sheet name in the Spreadsheet. + * @param {string|number} Pass the sheet name or index that you want to hide. + * @returns {void} + */ + hideSheet(sheetIdx: string|number): void; + + /** This method is used to hide the displayed waiting pop-up in Spreadsheet. + * @returns {void} + */ + hideWaitingPopUp(): void; + + /** This method is used to insert a column before the active cell's column in the Spreadsheet. + * @param {number} Pass start column. + * @param {number} Pass end column. + * @returns {void} + */ + insertEntireColumn(startCol: number, endCol: number): void; + + /** This method is used to insert a row before the active cell's row in the Spreadsheet. + * @param {number} Pass start row. + * @param {number} Pass end row. + * @returns {void} + */ + insertEntireRow(startRow: number, endRow: number): void; + + /** This method is used to insert a new sheet to the left of the current active sheet. + * @returns {void} + */ + insertSheet(): void; + + /** This method is used to insert cells in the selected or specified range and shift remaining cells to bottom. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + insertShiftBottom(startCell: any, endCell: any): void; + + /** This method is used to insert cells in the selected or specified range and shift remaining cells to right. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + insertShiftRight(startCell: any, endCell: any): void; + + /** This method is used to import excel file manually by using form data. + * @param {any} Pass the form data object to import files manually. + * @returns {void} + */ + import(importRequest: any): void; + + /** This method is used to lock/unlock the range of cells in active sheet. Lock cells are activated only after the sheet is protected. Once the sheet is protected it is unable to lock/unlock cells. + * @param {string|Array} Pass the alpha range cells or array range of cells. + * @param {string} Optional. By default is true. If it is false locked cells are unlocked. + * @returns {void} + */ + lockCells(range: string|Array, isLocked: string): void; + + /** This method is used to merge cells by across in the Spreadsheet. + * @param {string} Optional. To pass the cell range or selected cells are process. + * @param {boolean} Optional. If pass true it does not show alert. + * @returns {void} + */ + mergeAcrossCells(range: string, alertStatus: boolean): void; + + /** This method is used to merge the selected cells in the Spreadsheet. + * @param {string} Optional. To pass the cell range or selected cells are process. + * @param {boolean} Optional. If pass true it does not show alert. + * @returns {void} + */ + mergeCells(range: string, alertStatus: boolean): void; + + /** This method is used to move sheets in Spreadsheet. + * @param {number} Pass the sheet index that you want to move. + * @param {number} Pass the position index where you want to move. + * @returns {void} + */ + moveSheet(fromIdx: number, toIdx: number): void; + + /** This method is used to protect or unprotect active sheet. + * @param {boolean} Optional. By default is true. If it is false active sheet is unprotected. + * @returns {void} + */ + protectSheet(isProtected: boolean): void; + + /** This method is used to remove the hyperlink from selected cells of current sheet. + * @param {string} Hyperlink remove from the specified range. + * @param {boolean} Optional. If it is true, It will clear link only not format. + * @returns {void} + */ + removeHyperlink(range: string, isClearHLink: boolean): void; + + /** This method is used to remove the range data and its defined rangeSettings property based on the specified range name. + * @param {string} Pass the defined rangeSetting property name. + * @returns {void} + */ + removeRange(rangeName: string): void; + + /** This method is used to set the active cell in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @param {number} Pass the index of the sheet. + * @returns {void} + */ + setActiveCell(rowIdx: number, colIdx: number, sheetIdx: number): void; + + /** This method is used to set active sheet index for the Spreadsheet. + * @param {number} Pass the active sheet index for Spreadsheet. + * @returns {void} + */ + setActiveSheetIndex(sheetIdx: number): void; + + /** This method is used to set border for the specified range of cells in the Spreadsheet. + * @param {any} Pass the border properties that you want to set. + * @param {string} Optional. If range is specified, it will set border for the specified range else it will use the selected range. + * @returns {void} + */ + setBorder(property: any, range: string): void; + + /** This method is used to set the hyperlink in selected cells of the current sheet. + * @param {string} If range is specified, it will set the hyperlink in range of the cells. + * @param {any} Pass cellAddress or webAddress + * @param {number} If we pass cellAddress then which sheet to be navigate in the applied link. + * @returns {void} + */ + setHyperlink(range: string, link: any, sheetIdx: number): void; + + /** This method is used to set the focus to the Spreadsheet. + * @returns {void} + */ + setSheetFocus(): void; + + /** This method is used to set the width for the columns in the Spreadsheet. + * @param {Array|any} Pass the cell index and width of the cells. + * @returns {void} + */ + setWidthToColumns(widthColl: Array|any): void; + + /** This method is used to rename the active sheet. + * @param {string} Pass the sheet name that you want to change the current active sheet name. + * @returns {void} + */ + sheetRename(sheetName: string): void; + + /** This method is used to display the activationPanel for the specified range name. + * @param {string} Pass the range name that you want to display the activation panel. + * @returns {void} + */ + showActivationPanel(rangeName: string): void; + + /** This method is used to show the hidden columns within the specified range in the Spreadsheet. + * @param {number} Index of the start column. + * @param {number} Index of the end column. + * @returns {void} + */ + showColumn(startColIdx: number, endColIdx: number): void; + + /** This method is used to show the formula bar in Spreadsheet. + * @returns {void} + */ + showFormulaBar(): void; + + /** This method is used to show the hidden rows in the specified range in the Spreadsheet. + * @param {number} Index of the start row. + * @param {number} Index of the end row. + * @returns {void} + */ + showRow(startRow: number, endRow: number): void; + + /** This method is used to show waiting pop-up in Spreadsheet. + * @returns {void} + */ + showWaitingPopUp(): void; + + /** This method is used to unfreeze the frozen rows and columns in the Spreadsheet. + * @returns {void} + */ + unfreezePanes(): void; + + /** This method is used to unhide the sheet based on specified sheet name or sheet index. + * @param {string|number} Pass the sheet name or index that you want to unhide. + * @returns {void} + */ + unhideSheet(sheetInfo: string|number): void; + + /** This method is used to unmerge the selected range of cells in the Spreadsheet. + * @param {string} Optional. If the range is specified, then it will un merge the specified range else it will use the current selected range. + * @returns {void} + */ + unmergeCells(range: string): void; + + /** This method is used to unwrap the selected range of cells in the Spreadsheet. + * @param {Array|string} Optional. If the range is specified, then it will update unwrap in the specified range else it will use the current selected range. + * @returns {void} + */ + unWrapText(range: Array|string): void; + + /** This method is used to update the data for the specified range of cells in the Spreadsheet. + * @param {any} Pass the cells data that you want to update. + * @param {Array} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. + * @returns {void} + */ + updateData(data: any, range: Array): void; + + /** This method is used to update the formula bar in the Spreadsheet. + * @returns {void} + */ + updateFormulaBar(): void; + + /** This method is used to update the range of cells based on the specified settings which we want to update in the Spreadsheet. + * @param {number} Pass the sheet index that you want to update. + * @param {any} Pass the dataSource, startCell and showHeader values as settings. + * @returns {void} + */ + updateRange(sheetIdx: number, settings: any): void; + + /** This method is used to update the unique data for the specified range of cells in Spreadsheet. + * @param {any} Pass the data that you want to update in the particular range + * @param {Array|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. + * @returns {void} + */ + updateUniqueData(data: any, range: Array|string): void; + + /** This method is used to wrap the selected range of cells in the Spreadsheet. + * @param {Array|string} Optional. If the range is specified, then it will update wrap in the specified range else it will use the current selected range. + * @returns {void} + */ + wrapText(range: Array|string): void; + + XLCellType: Spreadsheet.XLCellType; + + XLCFormat: Spreadsheet.XLCFormat; + + XLChart: Spreadsheet.XLChart; + + XLClipboard: Spreadsheet.XLClipboard; + + XLComment: Spreadsheet.XLComment; + + XLDragDrop: Spreadsheet.XLDragDrop; + + XLDragFill: Spreadsheet.XLDragFill; + + XLEdit: Spreadsheet.XLEdit; + + XLExport: Spreadsheet.XLExport; + + XLFilter: Spreadsheet.XLFilter; + + XLFormat: Spreadsheet.XLFormat; + + XLFreeze: Spreadsheet.XLFreeze; + + XLPrint: Spreadsheet.XLPrint; + + XLResize: Spreadsheet.XLResize; + + XLRibbon: Spreadsheet.XLRibbon; + + XLSearch: Spreadsheet.XLSearch; + + XLSelection: Spreadsheet.XLSelection; + + XLSort: Spreadsheet.XLSort; + + XLValidate: Spreadsheet.XLValidate; +} +export module Spreadsheet{ + +export interface XLCellType { + + /** This method is used to set a cell type from the specified range of cells in the spreadsheet. + * @param {string} Pass the range where you want apply cell type. + * @param {any} Pass type of cell type and its settings. + * @param {number} Optional. Pass sheet index. + * @returns {void} + */ + addCellTypes(range: string,settings: any,sheetIdx: number): void; + + /** This method is used to remove cell type from the specified range of cells in the Spreadsheet. + * @param {string} Pass the range where you want remove cell type. + * @param {number} Optional. Pass sheet index. + * @returns {void} + */ + removeCellTypes(range: string,sheetIdx: number): void; +} + +export interface XLCFormat { + + /** This method is used to clear the applied conditional formatting rules in the Spreadsheet. + * @param {boolean} Pass true if you want to clear rules from selected cells else it will clear rules from entire sheet. + * @param {Array|string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + clearCF(isSelected: boolean,range: Array|string): void; + + /** This method is used to get the applied conditional formatting rules as array of objects based on the specified row Index and column Index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @returns {Array} + */ + getCFRule(rowIdx: number,colIdx: number): Array; + + /** This method is used to set the conditional formatting rule in the Spreadsheet. + * @param {any} Pass the rule to set. + * @returns {void} + */ + setCFRule(rule: any): void; +} + +export interface XLChart { + + /** This method is used to create a chart for specified range in Spreadsheet. + * @param {string} Optional. If range is specified, it will create chart for the specified range else it will use the current selected range. + * @param {any} To pass the type of chart and chart name. + * @returns {void} + */ + createChart(range: string,options: any): void; + + /** This method is used to refresh the chart in the Spreadsheet. + * @param {string} To pass the chart Id. + * @param {any} To pass the type of chart and chart name. + * @returns {void} + */ + refreshChart(id: string,options: any): void; + + /** This method is used to resize the chart of specified id in the Spreadsheet. + * @param {string} To pass the chart id. + * @param {number} To pass height value. + * @param {number} To pass the width value. + * @returns {void} + */ + resizeChart(id: string,height: number,width: number): void; +} + +export interface XLClipboard { + + /** This method is used to copy the selected cells in the Spreadsheet. + * @returns {void} + */ + copy(): void; + + /** This method is used to cut the selected cells in the Spreadsheet. + * @returns {void} + */ + cut(): void; + + /** This method is used to paste the cut or copied cells data in the Spreadsheet. + * @returns {void} + */ + paste(): void; +} + +export interface XLComment { + + /** This method is used to delete the comment in the specified range in Spreadsheet. + * @param {Array|string} Optional. If range is specified, it will delete comments for the specified range else it will use the current selected range. + * @param {number} Optional. If sheetIdx is specified, it will delete comment in specified sheet else it will use active sheet. + * @param {boolean} Optional. Pass true, if you want to skip the hidden rows data. + * @returns {void} + */ + deleteComment(range: Array|string,sheetIdx: number,skipHiddenRow: boolean): void; + + /** This method is used to edit the comment in the target Cell in Spreadsheet. + * @param {any} Optional. Pass the row index and column index of the cell which contains comment. + * @returns {void} + */ + editComment(targetCell: any): void; + + /** This method is used to find the next comment from the active cell in Spreadsheet. + * @returns {boolean} + */ + findNextComment(): boolean; + + /** This method is used to find the previous comment from the active cell in Spreadsheet. + * @returns {boolean} + */ + findPrevComment(): boolean; + + /** This method is used to get comment data for the specified cell. + * @param {HTMLElement} Pass the DOM element to get comment data as object. + * @returns {any} + */ + getComment(cell: HTMLElement): any; + + /** This method is used to set new comment in Spreadsheet. + * @param {string|Array} Optional. If we pass the range comment will set in the range otherwise it will set with selected cells. + * @param {string} Pass the comment data. + * @param {boolean} Optional. Pass true to show comment in edit mode + * @returns {void} + */ + setComment(range: string|Array,data: string,showEditPanel: boolean): void; + + /** This method is used to show all the comments in the Spreadsheet. + * @returns {void} + */ + showAllComments(): void; + + /** This method is used to show or hide the specific comment in the Spreadsheet. + * @param {HTMLElement} Optional. Pass the cell DOM element to show or hide its comment. If pass empty argument active cell will processed. + * @returns {void} + */ + showHideComment(targetCell: HTMLElement): void; +} + +export interface XLDragDrop { + + /** This method is used to drag and drop the selected range of cells to destination range in the Spreadsheet. + * @param {any|Array} Pass the source range to perform drag and drop. + * @param {any|Array} Pass the destination range to drop the dragged cells. + * @returns {void} + */ + moveRangeTo(sourceRange: any|Array,destinationRange: any|Array): void; +} + +export interface XLDragFill { + + /** This method is used to perform auto fill in Spreadsheet. + * @param {any} Pass the options to perform auto fill in Spreadsheet. + * @returns {void} + */ + autoFill(options: any): void; + + /** This method is used to hide the auto fill element in the Spreadsheet. + * @returns {void} + */ + hideAutoFillElement(): void; + + /** This method is used to hide the auto fill options in the Spreadsheet. + * @returns {void} + */ + hideAutoFillOptions(): void; + + /** This method is used to set position of the auto fill element in the Spreadsheet. + * @param {boolean} Pass the drag fill status as boolean value for show auto fill options in Spreadsheet. + * @returns {void} + */ + positionAutoFillElement(isDragFill: boolean): void; +} + +export interface XLEdit { + + /** This method is used to calculate formulas in the specified sheet. + * @param {number} Optional. If sheet index is specified, then it will calculate formulas in the specified sheet only else it will calculate formulas in all sheets. + * @returns {void} + */ + calcNow(sheetIdx: number): void; + + /** This method is used to edit a particular cell based on the row index and column index in the Spreadsheet. + * @param {number} Pass the row index to edit particular cell. + * @param {number} Pass the column index to edit particular cell. + * @param {boolean} Pass true, if you want to maintain previous cell value. + * @returns {void} + */ + editCell(rowIdx: number,colIdx: number,oldData: boolean): void; + + /** This method is used to get the property value of particular cell, based on the row and column index in the Spreadsheet. + * @param {number} Pass the row index to get the property value. + * @param {number} Pass the column index to get the property value. + * @param {string} Optional. Pass the property name that you want("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", "cellType"). + * @param {number} Optional. Pass the index of the sheet. + * @returns {any|string|Array} + */ + getPropertyValue(rowIdx: number,colIdx: number,prop: string,sheetIdx: number): any|string|Array; + + /** This method is used to get the property value in specified cell in Spreadsheet. + * @param {HTMLElement} Pass the cell element to get property value. + * @param {string} Pass the property name that you want ("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", "cellType"). + * @param {number} Pass the index of sheet. + * @returns {void} + */ + getPropertyValueByElem(elem: HTMLElement,property: string,sheetIdx: number): void; + + /** This method is used to save the edited cell value in the Spreadsheet. + * @returns {void} + */ + saveCell(): void; + + /** This method is used to update a particular cell value in the Spreadsheet. + * @param {any} Pass row index and column index of the cell. + * @param {string|number} Pass the cell value. + * @returns {void} + */ + updateCell(cell: any,value: string|number): void; + + /** This method is used to update a particular cell value and its format in the Spreadsheet. + * @param {any} Pass row index and column index of the cell. + * @param {string|number} Pass the cell value. + * @param {string} Pass the class name to update format. + * @param {number} Pass sheet index. + * @returns {void} + */ + updateCellValue(cellIdx: any,val: string|number,formatClass: string,sheetIdx: number): void; +} + +export interface XLExport { + + /** This method is used to save the sheet data as Excel or CSV document (.xls, .xlsx and .csv) in Spreadsheet. + * @param {string} Pass the export type that you want. + * @returns {void} + */ + export(type: string): void; +} + +export interface XLFilter { + + /** This method is used to clear the filter in filtered columns in the Spreadsheet. + * @returns {void} + */ + clearFilter(): void; + + /** This method is used to apply filter for the selected range of cells in the Spreadsheet. + * @param {string} Pass the range of the selected cells. + * @returns {void} + */ + filter(range: string): void; + + /** This method is used to apply filter for the column by active cell's value in the Spreadsheet. + * @returns {void} + */ + filterByActiveCell(): void; +} + +export interface XLFormat { + + /** This method is used to create a table for the selected range of cells in the Spreadsheet. + * @param {any} Pass the table object. + * @param {string} Optional. If the range is specified, then it will create table in the specified range else it will use the current selected range. + * @returns {void} + */ + createTable(tableObject: any,range: string): void; + + /** This method is used to set format style and values in a cell or range of cells. + * @param {any} Pass the formatObject which contains style, type, format, groupSeparator and decimalPlaces. + * @param {string} Pass the range indices to format cells. + * @returns {void} + */ + format(formatObj: any,range: string): void; + + /** This method is used to remove table with specified tableId in the Spreadsheet. + * @param {number} Pass the tableId that you want to remove. + * @returns {void} + */ + removeTable(tableId: number): void; + + /** This method is used to update the decimal places for numeric value for the selected range of cells in the Spreadsheet. + * @param {string} Pass the decimal places type in increment/decrement. + * @param {string} Pass the range indices. + * @returns {void} + */ + updateDecimalPlaces(type: string,range: string): void; + + /** This method is used to update the format for the selected range of cells in the Spreadsheet. + * @param {any} Pass the format object that you want to update. + * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. + * @returns {void} + */ + updateFormat(formatObj: any,range: Array): void; + + /** This method is used to update the unique format for selected range of cells in the Spreadsheet. + * @param {string} Pass the unique format class. + * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. + * @returns {void} + */ + updateUniqueFormat(formatClass: string,range: Array): void; +} + +export interface XLFreeze { + + /** This method is used to freeze columns upto the specified column index in the Spreadsheet. + * @param {number} Index of the column to be freeze. + * @returns {void} + */ + freezeColumns(colIdx: number): void; + + /** This method is used to freeze the first column in the Spreadsheet. + * @returns {void} + */ + freezeLeftColumn(): void; + + /** This method is used to freeze rows and columns before the specified cell in the Spreadsheet. + * @param {any} Row index and column index of the cell which you want to freeze. + * @returns {void} + */ + freezePanes(cell: any): void; + + /** This method is used to freeze rows upto the specified row index in the Spreadsheet. + * @param {number} Index of the row to be freeze. + * @returns {void} + */ + freezeRows(rowIdx: number): void; + + /** This method is used to freeze the top row in the Spreadsheet. + * @returns {void} + */ + freezeTopRow(): void; +} + +export interface XLPrint { + + /** This method is used to print the selected contents in the Spreadsheet. + * @returns {void} + */ + printSelection(): void; + + /** This method is used to print the entire contents in the active sheet. + * @returns {void} + */ + printSheet(): void; +} + +export interface XLResize { + + /** This method is used to get the column width of the specified column index in the Spreadsheet. + * @param {number} Pass the column index. + * @returns {number} + */ + getColWidth(colIdx: number): number; + + /** This method is used to get the row height of the specified row index in the Spreadsheet. + * @param {number} Pass the row index which you want to find its height. + * @returns {number} + */ + getRowHeight(rowIdx: number): number; + + /** This method is used to set the column width of the specified column index in the Spreadsheet. + * @param {number} Pass the column index. + * @param {number} Pass the width value that you want to set. + * @returns {void} + */ + setColWidth(colIdx: number,size: number): void; + + /** This method is used to set the row height of the specified row index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the height value that you want to set. + * @returns {void} + */ + setRowHeight(rowIdx: number,size: number): void; +} + +export interface XLRibbon { + + /** This method is used to add a new name in the Spreadsheet name manager. + * @param {string} Pass the name that you want to define in name manager. + * @param {string} Pass the cell reference. + * @param {string} Optional. Pass comment, if you want. + * @param {number} Optional. Pass the sheet index. + * @returns {void} + */ + addNamedRange(name: string,refersTo: string,comment: string,sheetIdx: number): void; + + /** This method is used to insert the few type (SUM, MAX, MIN, AVG, COUNT) of formulas in the selected range of cells in the Spreadsheet. + * @param {string} To pass the type("SUM","MAX","MIN","AVG","COUNT"). + * @param {string} If range is specified, it will apply auto sum for the specified range else it will use the current selected range. + * @returns {void} + */ + autoSum(type: string,range: string): void; + + /** This method is used to delete the defined name in the Spreadsheet name manager. + * @param {string} Pass the defined name that you want to remove from name manager. + * @returns {void} + */ + removeNamedRange(name: string): void; +} + +export interface XLSearch { + + /** This method is used to find and replace all data by workbook in the Spreadsheet. + * @param {string} Pass the search data. + * @param {string} Pass the replace data. + * @param {boolean} Pass true, if you want to match with case-sensitive. + * @param {boolean} Pass true, if you want to match with entire cell contents. + * @returns {void} + */ + replaceAllByBook(findData: string,replaceData: string,isCSen: boolean,isEMatch: boolean): void; + + /** This method is used to find and replace all data by sheet in Spreadsheet. + * @param {string} Pass the search data. + * @param {string} Pass the replace data. + * @param {boolean} Pass true, if you want to match with case-sensitive. + * @param {boolean} Pass true, if you want to match with entire cell contents. + * @returns {void} + */ + replaceAllBySheet(findData: string,replaceData: string,isCSen: boolean,isEMatch: boolean): void; +} + +export interface XLSelection { + + /** This method is used to get the selected cells element based on specified sheet index in the Spreadsheet. + * @param {number} Pass the sheet index to get the cells element. + * @returns {HTMLElement} + */ + getSelectedCells(sheetIdx: number): HTMLElement; + + /** This method is used to refresh the selection in the Spreadsheet. + * @param {Array} Optional. Pass range to refresh selection. + * @returns {void} + */ + refreshSelection(range: Array): void; + + /** This method is used to select a single column in the Spreadsheet. + * @param {number} Pass the column index value. + * @returns {void} + */ + selectColumn(colIdx: number): void; + + /** This method is used to select entire columns in a specified range (start index and end index) in the Spreadsheet. + * @param {number} Pass the column start index. + * @param {number} Pass the column end index. + * @returns {void} + */ + selectColumns(startIdx: number,endIdx: number): void; + + /** This method is used to select the specified range of cells in the Spreadsheet. + * @param {string} Pass range which want to select. + * @param {any} Pass the row and column index of the end cell. + * @returns {void} + */ + selectRange(range: string,endCell: any): void; + + /** This method is used to select a single row in the Spreadsheet. + * @param {number} Pass the row index value. + * @returns {void} + */ + selectRow(rowIdx: number): void; + + /** This method is used to select entire rows in a specified range (start index and end index) in the Spreadsheet. + * @param {number} Pass the start row index. + * @param {number} Pass the end row index. + * @returns {void} + */ + selectRows(startIdx: number,endIdx: number): void; + + /** This method is used to select all cells in active sheet. + * @returns {void} + */ + selectSheet(): void; +} + +export interface XLSort { + + /** This method is used to sort a particular range of cells based on its cell or font color in the Spreadsheet. + * @param {string} Pass 'PutCellColor' to sort by cell color or 'PutFontColor' for by font color. + * @param {any} Pass the HEX color code to sort. + * @param {string} Pass the range + * @returns {void} + */ + sortByColor(operation: string,color: any,range: string): void; + + /** This method is used to sort a particular range of cells based on its values in the Spreadsheet. + * @param {Array|string} Pass the range to sort. + * @param {string} Pass the column name. + * @param {any} Pass the direction to sort (ascending or descending). + * @returns {void} + */ + sortByRange(range: Array|string,columnName: string,direction: any): void; +} + +export interface XLValidate { + + /** This method is used to apply data validation rules in a selected range of cells based on the defined condition in the Spreadsheet. + * @param {string} If range is specified, it will apply rules for the specified range else it will use the current selected range. + * @param {Array} Pass the validation condition, value1 and value2. + * @param {string} Pass the data type. + * @param {boolean} Pass 'true' if you ignore blank values. + * @param {boolean} Pass 'true' if you want to show an error alert. + * @returns {void} + */ + applyDVRules(range: string,values: Array,type: string,required: boolean,showErrorAlert: boolean): void; + + /** This method is used to clear the applied validation rules in a specified range of cells in the Spreadsheet. + * @param {string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + clearDV(range: string): void; + + /** This method is used to highlight invalid data in a specified range of cells in the Spreadsheet. + * @param {string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + highlightInvalidData(range: string): void; +} + +export interface Model { + + /**Gets or sets an active sheet index in the Spreadsheet. By defining this value, you can specify which sheet should be active in workbook. + * @Default {1} + */ + activeSheetIndex?: number; + + /**Gets or sets a value that indicates whether to enable or disable auto rendering of cell type in the Spreadsheet. + * @Default {false} + */ + allowAutoCellType?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable auto fill feature in the Spreadsheet. + * @Default {true} + */ + allowAutoFill?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable auto sum feature in the Spreadsheet. + * @Default {true} + */ + allowAutoSum?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable cell format feature in the Spreadsheet. By enabling this, you can customize styles and number formats. + * @Default {true} + */ + allowCellFormatting?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable cell type feature in the Spreadsheet. + * @Default {false} + */ + allowCellType?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable chart feature in the Spreadsheet. By enabling this feature, you can create and customize charts in Spreadsheet. + * @Default {true} + */ + allowCharts?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable clipboard feature in the Spreadsheet. By enabling this feature, you can perform cut/copy and paste operations in Spreadsheet. + * @Default {true} + */ + allowClipboard?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable comment feature in the Spreadsheet. By enabling this, you can add/delete/modify comments in Spreadsheet. + * @Default {true} + */ + allowComments?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable Conditional Format feature in the Spreadsheet. By enabling this, you can apply formatting to the selected range of cells based on the provided conditions (Greater than, Less than, Equal, Between, Contains, etc.).Note: allowCellFormatting must be true while using conditional formatting. + * @Default {true} + */ + allowConditionalFormats?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable data validation feature in the Spreadsheet. + * @Default {true} + */ + allowDataValidation?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the delete action in the Spreadsheet. By enabling this feature, you can delete existing rows, columns, cells and sheet. + * @Default {true} + */ + allowDelete?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable drag and drop feature in the Spreadsheet. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the edit action in the Spreadsheet. + * @Default {true} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable filtering feature in the Spreadsheet. Filtering can be used to limit the data displayed using required criteria. + * @Default {true} + */ + allowFiltering?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable table feature in the Spreadsheet. By enabling this, you can render table in selected range. + * @Default {true} + */ + allowFormatAsTable?: boolean; + + /**Get or sets a value that indicates whether to enable or disable format painter feature in the Spreadsheet. By enabling this feature, you can copy the format from the selected range and apply it to another range. + * @Default {true} + */ + allowFormatPainter?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable formula bar in the Spreadsheet. + * @Default {true} + */ + allowFormulaBar?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable freeze pane support in Spreadsheet. After enabling this feature, you can use freeze top row, freeze first column and freeze panes options. + * @Default {true} + */ + allowFreezing?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable hyperlink feature in the Spreadsheet. By enabling this feature, you can add hyperlink which is used to easily navigate to the cell reference from one sheet to another or a web page. + * @Default {true} + */ + allowHyperlink?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable import feature in the Spreadsheet. By enabling this feature, you can open existing Spreadsheet documents. + * @Default {true} + */ + allowImport?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the insert action in the Spreadsheet. By enabling this feature, you can insert new rows, columns, cells and sheet. + * @Default {true} + */ + allowInsert?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable keyboard navigation feature in the Spreadsheet. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable lock cell feature in the Spreadsheet. + * @Default {true} + */ + allowLockCell?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable merge feature in the Spreadsheet. + * @Default {true} + */ + allowMerging?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable resizing feature in the Spreadsheet. By enabling this feature, you can change the column width and row height by dragging its header boundaries. + * @Default {true} + */ + allowResizing?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable find and replace feature in the Spreadsheet. By enabling this, you can easily find and replace a specific value in the sheet or workbook. By using goto behavior, you can select and highlight all cells that contains specific data or data types. + * @Default {true} + */ + allowSearching?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable selection in the Spreadsheet. By enabling this feature, selected items will be highlighted. + * @Default {true} + */ + allowSelection?: boolean; + + /**Gets or sets a value that indicates whether to enable the sorting feature in the Spreadsheet. + * @Default {true} + */ + allowSorting?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable undo and redo feature in the Spreadsheet. + * @Default {true} + */ + allowUndoRedo?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable wrap text feature in the Spreadsheet. By enabling this, cell content can wrap to the next line, if the cell content exceeds the boundary of the cell. + * @Default {true} + */ + allowWrap?: boolean; + + /**Gets or sets a value that indicates to define the width of the activation panel in Spreadsheet. + * @Default {200} + */ + apWidth?: number; + + /**Gets or sets an object that indicates to customize the auto fill behavior in the Spreadsheet. + */ + autoFillSettings?: AutoFillSettings; + + /**Gets or sets an object that indicates to customize the chart behavior in the Spreadsheet. + */ + chartSettings?: ChartSettings; + + /**Gets or sets a value that defines the number of columns displayed in the sheet. + * @Default {21} + */ + columnCount?: number; + + /**Gets or sets a value that indicates to define the common width for each column in the Spreadsheet. + * @Default {60} + */ + columnWidth?: number; + + /**Gets or sets a value that indicates to render the spreadsheet with custom theme. + */ + cssClass?: string; + + /**Gets or sets a value that indicates whether to enable or disable context menu in the Spreadsheet. + * @Default {true} + */ + enableContextMenu?: boolean; + + /**Gets or sets an object that indicates to customize the exporting behavior in Spreadsheet. + */ + exportSettings?: ExportSettings; + + /**Gets or sets an object that indicates to customize the format behavior in the Spreadsheet. + */ + formatSettings?: FormatSettings; + + /**Gets or sets an object that indicates to customize the import behavior in the Spreadsheet. + */ + importSettings?: ImportSettings; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data (i.e.) in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Gets or sets an object that indicates to customize the picture behavior in the Spreadsheet. + */ + pictureSettings?: PictureSettings; + + /**Gets or sets an object that indicates to customize the print option in Spreadsheet. + */ + printSettings?: PrintSettings; + + /**Gets or sets a value that indicates whether to define the number of rows to be displayed in the sheet. + * @Default {20} + */ + rowCount?: number; + + /**Gets or sets a value that indicates to define the common height for each row in the sheet. + * @Default {20} + */ + rowHeight?: number; + + /**Gets or sets an object that indicates to customize the scroll options in the Spreadsheet. + */ + scrollSettings?: ScrollSettings; + + /**Gets or sets an object that indicates to customize the selection options in the Spreadsheet. + */ + selectionSettings?: SelectionSettings; + + /**Gets or sets a value that indicates to define the number of sheets to be created at the initial load. + * @Default {1} + */ + sheetCount?: number; + + /**Gets or sets an object that indicates to customize the sheet behavior in Spreadsheet. + */ + sheets?: Array; + + /**Gets or sets a value that indicates whether to show or hide ribbon in the Spreadsheet. + * @Default {true} + */ + showRibbon?: boolean; + + /**This is used to set the number of undo-redo steps in the Spreadsheet. + * @Default {20} + */ + undoRedoStep?: number; + + /**Define the username for the Spreadsheet which is displayed in comment. + * @Default {User Name} + */ + userName?: string; + + /**Triggered for every action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every action complete.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered when the auto fill operation begins.*/ + autoFillBegin? (e: AutoFillBeginEventArgs): void; + + /**Triggered when the auto fill operation completes.*/ + autoFillComplete? (e: AutoFillCompleteEventArgs): void; + + /**Triggered before the cells to be formatted.*/ + beforeCellFormat? (e: BeforeCellFormatEventArgs): void; + + /**Triggered before the cell selection.*/ + beforeCellSelect? (e: BeforeCellSelectEventArgs): void; + + /**Triggered before the selected cells are dropped.*/ + beforeDrop? (e: BeforeDropEventArgs): void; + + /**Triggered before the contextmenu is open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Triggered before the activation panel is open.*/ + beforePanelOpen? (e: BeforePanelOpenEventArgs): void; + + /**Triggered when click on sheet cell.*/ + cellClick? (e: CellClickEventArgs): void; + + /**Triggered when the cell is edited.*/ + cellEdit? (e: CellEditEventArgs): void; + + /**Triggered when mouse hover on cell in sheets.*/ + cellHover? (e: CellHoverEventArgs): void; + + /**Triggered when save the edited cell.*/ + cellSave? (e: CellSaveEventArgs): void; + + /**Triggered when click the contextmenu items.*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Triggered when the selected cells are being dragged.*/ + drag? (e: DragEventArgs): void; + + /**Triggered when the selected cells are initiated to drag.*/ + dragStart? (e: DragStartEventArgs): void; + + /**Triggered when the selected cells are dropped.*/ + drop? (e: DropEventArgs): void; + + /**Triggered before the range editing starts.*/ + editRangeBegin? (e: EditRangeBeginEventArgs): void; + + /**Triggered after range editing completes.*/ + editRangeComplete? (e: EditRangeCompleteEventArgs): void; + + /**Triggered before the sheet is loaded.*/ + load? (e: LoadEventArgs): void; + + /**Triggered after the sheet is loaded.*/ + loadComplete? (e: LoadCompleteEventArgs): void; + + /**Triggered every click of the menu item.*/ + menuClick? (e: MenuClickEventArgs): void; + + /**Triggered when import sheet is failed to open.*/ + openFailure? (e: OpenFailureEventArgs): void; + + /**Triggered when pager item is clicked in the Spreadsheet.*/ + pagerClick? (e: PagerClickEventArgs): void; + + /**Triggered when click on the ribbon.*/ + ribbonClick? (e: RibbonClickEventArgs): void; + + /**Triggered when the chart series rendering.*/ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /**Triggered when click the ribbon tab.*/ + tabClick? (e: TabClickEventArgs): void; + + /**Triggered when select the ribbon tab.*/ + tabSelect? (e: TabSelectEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the applied style format object. + */ + afterFormat?: any; + + /**Returns the applied style format object. + */ + beforeFormat?: any; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the cell range. + */ + range?: Array; + + /**Returns the action format. + */ + reqType?: string; + + /**Returns goto index while paging. + */ + gotoIdx?: number; + + /**Returns boolean value. If create new sheet it returns true. + */ + newSheet?: boolean; + + /**Return column name while sorting. + */ + columnName?: string; + + /**Returns selected columns while sorting or filtering begins. + */ + colSelected?: number; + + /**Returns sort direction while sort action begins. + */ + sortDirection?: string; +} + +export interface ActionCompleteEventArgs { + + /**Returns Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the applied cell format object. + */ + selectedCell?: Array|any; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the request type. + */ + reqType?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface AutoFillBeginEventArgs { + + /**Returns auto fill begin cell range. + */ + dataRange?: Array; + + /**Returns which direction drag the auto fill. + */ + direction?: string; + + /**Returns fill cells range. + */ + fillRange?: Array; + + /**Returns the auto fill type. + */ + fillType?: string; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface AutoFillCompleteEventArgs { + + /**Returns auto fill begin cell range. + */ + dataRange?: Array; + + /**Returns which direction to drag the auto fill. + */ + direction?: string; + + /**Returns fill cells range. + */ + fillRange?: Array; + + /**Returns the auto fill type. + */ + fillType?: string; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforeCellFormatEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the applied style format object. + */ + format?: any; + + /**Returns the selected cells. + */ + cells?: Array|any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeCellSelectEventArgs { + + /**Returns the previous cell range. + */ + prevRange?: Array; + + /**Returns the current cell range. + */ + currRange?: Array; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforeDropEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the cell Overwriting alert option value. + */ + preventAlert?: boolean; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforeOpenEventArgs { + + /**Returns the target element. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforePanelOpenEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the activation panel element. + */ + activationPanel?: any; + + /**Returns the range option value. + */ + range?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellClickEventArgs { + + /**Returns the click cell element. + */ + cell?: HTMLElement; + + /**Returns the column index of clicked cell. + */ + columnIndex?: number; + + /**Returns the row index of clicked cell. + */ + rowIndex?: number; + + /**Returns the column name of clicked cell. + */ + columnName?: string; + + /**Returns the column information. + */ + columnObject?: any; +} + +export interface CellEditEventArgs { + + /**Returns the click cell element. + */ + cell?: HTMLElement; + + /**Returns the columnName of clicked cell. + */ + columnName?: string; + + /**Returns the column field information. + */ + columnObject?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellHoverEventArgs { + + /**Returns the target element. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellSaveEventArgs { + + /**Returns the save cell element. + */ + cell?: HTMLElement; + + /**Returns the columnName of clicked cell. + */ + columnName?: string; + + /**Returns the column field information. + */ + columnObject?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cell previous value. + */ + pValue?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the cell value. + */ + value?: string; +} + +export interface ContextMenuClickEventArgs { + + /**Returns target element Id. + */ + Id?: string; + + /**Returns the target element. + */ + element?: HTMLElement; + + /**Returns event information. + */ + event?: any; + + /**Returns target element and event information. + */ + events?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns target element parent Id. + */ + parentId?: string; + + /**Returns target element parent text. + */ + parentText?: string; + + /**Returns target element text. + */ + text?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface DragEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface DragStartEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface DropEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface EditRangeBeginEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the range option value. + */ + range?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface EditRangeCompleteEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the range option value. + */ + range?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface LoadEventArgs { + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the active sheet index. + */ + sheetIndex?: number; +} + +export interface LoadCompleteEventArgs { + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface MenuClickEventArgs { + + /**Returns menu click element. + */ + element?: HTMLElement; + + /**Returns the event information. + */ + event?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns target element parent Id. + */ + parentId?: string; + + /**Returns target element parent text. + */ + parentText?: string; + + /**Returns target element text. + */ + text?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface OpenFailureEventArgs { + + /**Returns the failure type. + */ + failureType?: string; + + /**Returns the status index. + */ + status?: number; + + /**Returns the status in text. + */ + statusText?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface PagerClickEventArgs { + + /**Returns the active sheet index. + */ + activeSheet?: number; + + /**Returns the new sheet index. + */ + gotoSheet?: number; + + /**Returns whether new sheet icon is clicked. + */ + newSheet?: boolean; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface RibbonClickEventArgs { + + /**Returns element Id. + */ + Id?: string; + + /**Returns target information. + */ + prop?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns status. + */ + status?: boolean; + + /**Returns isChecked in boolean. + */ + isChecked?: boolean; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface SeriesRenderingEventArgs { + + /**Returns chart data and chart information. + */ + data?: any; + + /**Returns the chart model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface TabClickEventArgs { + + /**Returns the active tab index. + */ + activeIndex?: number; + + /**Returns active tab header element. + */ + activeHeader?: any; + + /**Returns previous active tab header element. + */ + prevActiveHeader?: any; + + /**Returns previous active tab index. + */ + prevActiveIndex?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface TabSelectEventArgs { + + /**Returns the active tab index. + */ + activeIndex?: number; + + /**Returns active tab header element. + */ + activeHeader?: any; + + /**Returns previous active tab header element. + */ + prevActiveHeader?: any; + + /**Returns previous active tab index. + */ + prevActiveIndex?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface AutoFillSettings { + + /**This property is used to set fillType unit in Spreadsheet. It has five types which are CopyCells, FillSeries, FillFormattingOnly, FillWithoutFormatting and FlashFill. + * @Default {ej.Spreadsheet.AutoFillOptions.FillSeries} + */ + fillType?: ej.Spreadsheet.AutoFillOptions|string; + + /**Gets or sets a value that indicates to enable or disable auto fill options in the Spreadsheet. + * @Default {true} + */ + showFillOptions?: boolean; +} + +export interface ChartSettings { + + /**Gets or sets a value that defines the chart height in Spreadsheet. + * @Default {220} + */ + height?: number; + + /**Gets or sets a value that defines the chart width in the Spreadsheet. + * @Default {440} + */ + width?: number; +} + +export interface ExportSettings { + + /**Gets or sets a value that indicates whether to enable or disable save feature in Spreadsheet. By enabling this feature, you can save existing Spreadsheet. + * @Default {true} + */ + allowExporting?: boolean; + + /**Gets or sets a value that indicates to define csvUrl for export to csv format. + * @Default {null} + */ + csvUrl?: string; + + /**Gets or sets a value that indicates to define excelUrl for export to excel format.Note: User must specify allowExporting true while use this property. + * @Default {null} + */ + excelUrl?: string; + + /**Gets or sets a value that indicates to define password while export to excel format. + * @Default {null} + */ + password?: string; +} + +export interface FormatSettings { + + /**Gets or sets a value that indicates whether to enable or disable cell border feature in the Spreadsheet. + * @Default {true} + */ + allowCellBorder?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable decimal places in the Spreadsheet. + * @Default {true} + */ + allowDecimalPlaces?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable font family feature in Spreadsheet. + * @Default {true} + */ + allowFontFamily?: boolean; +} + +export interface ImportSettings { + + /**Sets import mapper to perform import feature in Spreadsheet. + */ + importMapper?: string; + + /**Sets import Url to access the online files in the Spreadsheet. + */ + importUrl?: string; + + /**Gets or sets a value that indicates to define password while importing in the Spreadsheet. + */ + password?: string; +} + +export interface PictureSettings { + + /**Gets or sets a value that indicates whether to enable or disable picture feature in Spreadsheet. By enabling this, you can add pictures in Spreadsheet. + * @Default {true} + */ + allowPictures?: boolean; + + /**Gets or sets a value that indicates to define height to picture in the Spreadsheet. + * @Default {220} + */ + height?: number; + + /**Gets or sets a value that indicates to define width to picture in the Spreadsheet. + * @Default {440} + */ + width?: number; +} + +export interface PrintSettings { + + /**Gets or sets a value that indicates whether to enable or disable page setup support for printing in Spreadsheet. + * @Default {true} + */ + allowPageSetup?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable page size support for printing in Spreadsheet. + * @Default {false} + */ + allowPageSize?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable print feature in the Spreadsheet. + * @Default {true} + */ + allowPrinting?: boolean; +} + +export interface ScrollSettings { + + /**Gets or sets a value that indicates whether to enable or disable scrolling in Spreadsheet. + * @Default {true} + */ + allowScrolling?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable sheet on demand. By enabling this, it render only the active sheet element while paging remaining sheets are created one by one. + * @Default {false} + */ + allowSheetOnDemand?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable virtual scrolling feature in the Spreadsheet. + * @Default {true} + */ + allowVirtualScrolling?: boolean; + + /**Gets or sets the value that indicates to define the height of spreadsheet. + * @Default {550} + */ + height?: number|string; + + /**Gets or sets the value that indicates whether to enable or disable responsive mode in the Spreadsheet. + * @Default {false} + */ + isResponsive?: boolean; + + /**Gets or sets a value that indicates to set scroll mode in Spreadsheet. It has two scroll modes, Normal and Infinite. + * @Default {ej.Spreadsheet.scrollMode.Infinite} + */ + scrollMode?: ej.Spreadsheet.scrollMode|string; + + /**Gets or sets the value that indicates to define the height off spreadsheet. + * @Default {1200} + */ + width?: number|string; +} + +export interface SelectionSettings { + + /**Gets or sets a value that indicates to define active cell in spreadsheet. + */ + activeCell?: string; + + /**Gets or sets a value that indicates to define animation time while selection in the Spreadsheet. + * @Default {0.001} + */ + animationTime?: number; + + /**Gets or sets a value that indicates to enable or disable animation while selection.Note: allowSelection must be true while using this property. + * @Default {false} + */ + enableAnimation?: boolean; + + /**Gets or sets a value that indicates to set selection type in Spreadsheet. It has three types which are Column, Row and default. + * @Default {ej.Spreadsheet.SelectionType.Default} + */ + selectionType?: ej.Spreadsheet.SelectionType|string; + + /**Gets or sets a value that indicates to set selection unit in Spreadsheet. It has three types which are Single, Range and MultiRange. + * @Default {ej.Spreadsheet.SelectionUnit.MultiRange} + */ + selectionUnit?: ej.Spreadsheet.SelectionUnit|string; +} + +export interface SheetsRangeSettings { + + /**Gets or sets the data to render the Spreadsheet. + */ + dataSource?: any; + + /**Specifies the header styles for the datasource range in Spreadsheet. + * @Default {null} + */ + headerStyles?: any; + + /**Specifies the primary key for the datasource in Spreadsheet. + */ + primaryKey?: string; + + /**Specifies the query for the datasource in Spreadsheet. + * @Default {null} + */ + query?: any; + + /**Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. + * @Default {false} + */ + showHeader?: boolean; + + /**Specifies the start cell for the datasource range in Spreadsheet. + * @Default {A1} + */ + startCell?: string; +} + +export interface Sheets { + + /**Gets or sets a value that indicates to define column count in the Spreadsheet. + * @Default {21} + */ + colCount?: number; + + /**Gets or sets a value that indicates to define column width in the Spreadsheet. + * @Default {64} + */ + columnWidth?: number; + + /**Gets or sets the data to render the Spreadsheet. + */ + dataSource?: any; + + /**Gets or sets a value that indicates whether to enable or disable field as column header in the Spreadsheet. + * @Default {false} + */ + fieldAsColumnHeader?: boolean; + + /**Specifies the header styles for the datasource range in Spreadsheet. + * @Default {null} + */ + headerStyles?: any; + + /**Specifies the primary key for the datasource in Spreadsheet. + */ + primaryKey?: string; + + /**Specifies the query for the datasource in Spreadsheet. + * @Default {null} + */ + query?: any; + + /**Specifies single range or multiple range settings for a sheet in Spreadsheet. + */ + rangeSettings?: Array; + + /**Gets or sets a value that indicates to define row count in the Spreadsheet. + * @Default {20} + */ + rowCount?: number; + + /**Gets or sets a value that indicates whether to show or hide grid lines in the Spreadsheet. + * @Default {true} + */ + showGridlines?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. + * @Default {false} + */ + showHeader?: boolean; + + /**Gets or sets a value that indicates whether to show or hide headings in the Spreadsheet. + * @Default {true} + */ + showHeadings?: boolean; + + /**Specifies the start cell for the datasource range in Spreadsheet. + * @Default {A1} + */ + startCell?: string; +} + +enum AutoFillOptions{ + + ///Specifies the CopyCells property in AutoFillOptions. + CopyCells, + + ///Specifies the FillSeries property in AutoFillOptions. + FillSeries, + + ///Specifies the FillFormattingOnly property in AutoFillOptions. + FillFormattingOnly, + + ///Specifies the FillWithoutFormatting property in AutoFillOptions. + FillWithoutFormatting, + + ///Specifies the FlashFill property in AutoFillOptions. + FlashFill +} + + +enum scrollMode{ + + ///To enable Infinite scroll mode for Spreadsheet. + Infinite, + + ///To enable Normal scroll mode for Spreadsheet. + Normal +} + + +enum SelectionType{ + + ///To select only Column in Spreadsheet. + Column, + + ///To select only Row in Spreadsheet. + Row, + + ///To select both Column/Row in Spreadsheet. + Default +} + + +enum SelectionUnit{ + + ///To enable Single selection in Spreadsheet. + Single, + + ///To enable Range selection in Spreadsheet. + Range, + + ///To enable MultiRange selection in Spreadsheet. + MultiRange +} + +} + +} +declare module ej.olap { + +class OlapChart extends ej.Widget { + static fn: OlapChart; + constructor(element: JQuery, options?: OlapChart.Model); + constructor(element: Element, options?: OlapChart.Model); + model:OlapChart.Model; + defaults:OlapChart.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the OlapChart to an appropriate format based on the parameter passed. + * @returns {void} + */ + exportOlapChart(): void; + + /** This function receives the JSON formatted datasource to render the OlapChart control. + * @returns {void} + */ + renderChartFromJSON(): void; + + /** This function receives the update from service-end, which would be utilized for rendering the widget. + * @returns {void} + */ + renderControlSuccess(): void; +} +export module OlapChart{ + +export interface Model { + + /**Specifies the CSS class to OlapChart to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Contains the serialized OlapReport at that instant, that is, current OlapReport. + * @Default {“”} + */ + currentReport?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**Allows the user to enable 3D view of OlapChart. + * @Default {false} + */ + enable3D?: boolean; + + /**Allows the user to enable OlapChart’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Allows the user to rotate the angle of OlapChart in 3D view. + * @Default {0} + */ + rotation?: number; + + /**Allows the user to set custom name for the methods at service-end, communicated on AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from OlapChart to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers when drill up/down happens in OlapChart control.*/ + drillSuccess? (e: DrillSuccessEventArgs): void; + + /**Triggers when OlapChart widget completes all operations at client-side after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when OlapChart successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DrillSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the error stack trace of the original exception. + */ + message?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportOlapChart?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for drilling up/down operation in OlapChart. + * @Default {DrillChart} + */ + drillDown?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for initializing OlapChart. + * @Default {InitializeChart} + */ + initialize?: string; +} +} + +class OlapClient extends ej.Widget { + static fn: OlapClient; + constructor(element: JQuery, options?: OlapClient.Model); + constructor(element: Element, options?: OlapClient.Model); + model:OlapClient.Model; + defaults:OlapClient.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; +} +export module OlapClient{ + +export interface Model { + + /**Allows the user to set the specific chart type for OlapChart. + * @Default {ej.olap.OlapChart.ChartTypes.Column} + */ + chartType?: ej.olap.OlapChart.ChartTypes|string; + + /**Sets the mode to export the OLAP visualization components such as OlapChart and PivotGrid in OlapClient. Based on the option, either Chart or Grid or both gets exported. + * @Default {ej.olap.OlapClient.ClientExportMode.ChartAndGrid} + */ + clientExportMode?: string; + + /**Specifies the CSS class to OlapClient to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**Allows the user to customize the widgets layout and appearance. + * @Default {{}} + */ + displaySettings?: DisplaySettings; + + /**Allows the user to refresh the control on-demand and not during every UI operation. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /**Enables/disables the visibility of measure group selector drop-down in Cube Browser. + * @Default {false} + */ + enableMeasureGroups?: boolean; + + /**Sets the summary layout for PivotGrid. Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. + * @Default {ej.PivotGrid.Layout.Normal} + */ + gridLayout?: ej.PivotGrid.Layout|string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Sets the title for OlapClient widget. + * @Default {null} + */ + title?: string; + + /**Connects the service using the specified URL for any server updates. + * @Default {null} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from OlapClient to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers before rendering the OlapChart.*/ + chartLoad? (e: ChartLoadEventArgs): void; + + /**Triggers while we initiate loading of the widget.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when OlapClient widget completes all operations at client-end after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when OlapClient successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of OlapClient control. + */ + action?: string; + + /**return the custom object bounds with OlapClient control. + */ + customObject?: any; + + /**return the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of OlapClient control. + */ + action?: string; + + /**return the custom object bounds with OlapClient control. + */ + customObject?: any; + + /**return the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ChartLoadEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the outer HTML of OlapClient component. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the outer HTML of OlapClient control. + */ + element?: string; + + /**returns the error message with error code. + */ + message?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DisplaySettings { + + /**Let’s the user to customize the display of OlapChart and PivotGrid widgets, either in tab view or in tile view. + * @Default {ej.olap.OlapClient.ControlPlacement.Tab} + */ + controlPlacement?: ej.olap.OlapClient.ControlPlacement|string; + + /**Let’s the user to set either Chart or Grid as the start-up widget. + * @Default {ej.olap.OlapClient.DefaultView.Grid} + */ + defaultView?: ej.olap.OlapClient.DefaultView|string; + + /**Enables/disables the full screen view of OlapChart and PivotGrid in OlapClient. + * @Default {false} + */ + enableFullScreen?: boolean; + + /**Enhances the space for PivotGrid and OlapChart, by hiding Cube Browser and Axis Element Builder. + * @Default {false} + */ + enableTogglePanel?: boolean; + + /**Allows the user to enable OlapClient’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Sets the display mode (Only Chart/Only Grid/Both) in OlapClient. + * @Default {ej.olap.OlapClient.DisplayMode.ChartAndGrid} + */ + mode?: ej.olap.OlapClient.DisplayMode|string; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that’s responsible for updating the entire report and widget, while changing the Cube. + * @Default {CubeChanged} + */ + cubeChanged?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportOlapClient?: string; + + /**Allows the user to set the custom name for the service method that’s responsible to get the members, for the tree-view inside member-editor dialog. + * @Default {FetchMemberTreeNodes} + */ + fetchMemberTreeNodes?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for fetching the report names from the database. + * @Default {FetchReportListFromDB} + */ + fetchReportList?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report while filtering members. + * @Default {FilterElement} + */ + filterElement?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for initializing OlapClient. + * @Default {InitializeClient} + */ + initialize?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for loading the report collection from the database. + * @Default {LoadReportFromDB} + */ + loadReport?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for retrieving the MDX query for the current report. + * @Default {GetMDXQuery} + */ + mdxQuery?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating the tree-view inside Cube Browser, while changing the measure group. + * @Default {MeasureGroupChanged} + */ + measureGroupChanged?: string; + + /**Allows the user to set the custom name for the service method that’s responsible to get the child members, on tree-view node expansion. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report while dropping a node/SplitButton inside Axis Element Builder. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report while removing SplitButton from Axis Element Builder. + * @Default {RemoveSplitButton} + */ + removeSplitButton?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for saving the report collection to database. + * @Default {SaveReportToDB} + */ + saveReport?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for toggling the elements in row and column axes. + * @Default {ToggleAxis} + */ + toggleAxis?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for any toolbar operation. + * @Default {ToolbarOperations} + */ + toolbarServices?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report collection. + * @Default {UpdateReport} + */ + updateReport?: string; +} +} +module OlapChart +{ +enum ChartTypes +{ +//To render a Line type for OlapChart. +Line, +//To render a Spline type for OlapChart. +Spline, +//To render a Column type for OlapChart. +Column, +//To render a Area type for OlapChart. +Area, +//To render a SplineArea type for OlapChart. +SplineArea, +//To render a StepLine type for OlapChart. +StepLine, +//To render a StepArea type for OlapChart. +StepArea, +//To render a Pie type for OlapChart. +Pie, +//To render a Bar type for OlapChart. +Bar, +//To render a StackingArea type for OlapChart. +StackingArea, +//To render a StackingColumn type for OlapChart. +StackingColumn, +//To render a StackingBar type for OlapChart. +StackingBar, +//To render a Pyramid type for OlapChart. +Pyramid, +//To render a Funnel type for OlapChart. +Funnel, +//To render a Doughnut type for OlapChart. +Doughnut, +//To render a Scatter type for OlapChart. +Scatter, +//To render a Bubble type for OlapChart. +Bubble, +} +} +module OlapClient +{ +enum ControlPlacement +{ +//To display OlapChart and PivotGrid widgets in tab view. +Tab, +//To display OlapChart and PivotGrid widgets within the same view, one below the other. +Tile, +} +} +module OlapClient +{ +enum DefaultView +{ +//To set OlapChart as a default control in view when the OlapClient widget is loaded for the first time. +Chart, +//To set PivotGrid as a default control in view when the OlapClient widget is loaded for the first time. +Grid, +} +} +module OlapClient +{ +enum DisplayMode +{ +//To display only OlapChart widget. +ChartOnly, +//To display only PivotGrid widget. +GridOnly, +//To display both OlapChart and PivotGrid widgets. +ChartAndGrid, +} +} + +class OlapGauge extends ej.Widget { + static fn: OlapGauge; + constructor(element: JQuery, options?: OlapGauge.Model); + constructor(element: Element, options?: OlapGauge.Model); + model:OlapGauge.Model; + defaults:OlapGauge.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** This function is used to refresh the OlapGauge at client-side itself. + * @returns {void} + */ + refresh(): void; + + /** This function removes the KPI related images from OlapGauge. + * @returns {void} + */ + removeImg(): void; + + /** This function receives the JSON formatted datasource to render the OlapGauge control. + * @returns {void} + */ + renderControlFromJSON(): void; +} +export module OlapGauge{ + +export interface Model { + + /**Sets the number of column count to arrange the OlapGauge's. + * @Default {0} + */ + columnsCount?: number; + + /**Specify the CSS class to OlapGauge to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**Enables/disables tooltip visibility in OlapGauge. + * @Default {false} + */ + enableTooltip?: boolean; + + /**Allows the user to enable OlapGauge’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Allows the user to change the format of the label values in OlapGauge. + * @Default {ej.olap.OlapGauge.NumberFormat.Default} + */ + labelFormatSettings?: ej.olap.OlapGauge.NumberFormat|string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Sets the number of row count to arrange the OlapGauge's. + * @Default {0} + */ + rowsCount?: number; + + /**Sets the scale values such as pointers, indicators, etc... for OlapGauge. + * @Default {{}} + */ + scales?: any; + + /**Allows the user to set the custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Enables/disables the header labels in OlapGauge. + * @Default {true} + */ + showHeaderLabel?: boolean; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from OlapGauge to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers when OlapGauge started loading at client-side.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when OlapGauge widget completes all operations at client-side after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when OlapGauge successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of OlapGauge control. + */ + action?: string; + + /**return the custom object bounds with OlapGauge control. + */ + customObject?: any; + + /**return the outer HTML of OlapGauge control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of OlapGauge control. + */ + action?: string; + + /**return the custom object bounds with OlapGauge control. + */ + customObject?: any; + + /**return the outer HTML of OlapGauge control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the outer HTML of OlapGauge control. + */ + element?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**returns the outer HTML of OlapGauge control. + */ + element?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the error message with error code. + */ + message?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the JSON formatted response while error occurs. + */ + responseJSON?: any; +} + +export interface RenderSuccessEventArgs { + + /**returns the outer HTML of OlapGauge control. + */ + element?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LabelFormatSettings { + + /**Allows the user to change the number format of the label values in OlapGauge. + * @Default {ej.olap.OlapGauge.NumberFormat.Default} + */ + numberFormat?: ej.olap.OlapGauge.NumberFormat|string; + + /**Allows you to change the position of a digit on the right-hand side of the decimal point for label value. + * @Default {5} + */ + decimalPlaces?: number; + + /**Allows you to add a text at the beginning of the label. + */ + prefixText?: string; + + /**Allows you to add text at the end of the label. + */ + suffixText?: string; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that’s responsible for initializing OlapGauge. + * @Default {InitializeGauge} + */ + initialize?: string; +} +} +module OlapGauge +{ +enum NumberFormat +{ +//To set default format for label values. +Default, +//To set currency format for label values. +Currency, +//To set percentage format for label values. +Percentage, +//To set fraction format for label values. +Fraction, +//To set scientific format for label values. +Scientific, +//To set text format for label values. +Text, +//To set notation format for label values. +Notation, +} +} + +} +declare module ej.datavisualization { + +class LinearGauge extends ej.Widget { + static fn: LinearGauge; + constructor(element: JQuery, options?: LinearGauge.Model); + constructor(element: Element, options?: LinearGauge.Model); + model:LinearGauge.Model; + defaults:LinearGauge.Model; + + /** destroy the linear gauge all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get Bar Distance From Scale in number + * @returns {void} + */ + getBarDistanceFromScale(): void; + + /** To get Bar Pointer Value in number + * @returns {void} + */ + getBarPointerValue(): void; + + /** To get Bar Width in number + * @returns {void} + */ + getBarWidth(): void; + + /** To get CustomLabel Angle in number + * @returns {void} + */ + getCustomLabelAngle(): void; + + /** To get CustomLabel Value in string + * @returns {void} + */ + getCustomLabelValue(): void; + + /** To get Label Angle in number + * @returns {void} + */ + getLabelAngle(): void; + + /** To get LabelPlacement in number + * @returns {void} + */ + getLabelPlacement(): void; + + /** To get LabelStyle in number + * @returns {void} + */ + getLabelStyle(): void; + + /** To get Label XDistance From Scale in number + * @returns {void} + */ + getLabelXDistanceFromScale(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getLabelYDistanceFromScale(): void; + + /** To get Major Interval Value in number + * @returns {void} + */ + getMajorIntervalValue(): void; + + /** To get MarkerStyle in number + * @returns {void} + */ + getMarkerStyle(): void; + + /** To get Maximum Value in number + * @returns {void} + */ + getMaximumValue(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getMinimumValue(): void; + + /** To get Minor Interval Value in number + * @returns {void} + */ + getMinorIntervalValue(): void; + + /** To get Pointer Distance From Scale in number + * @returns {void} + */ + getPointerDistanceFromScale(): void; + + /** To get PointerHeight in number + * @returns {void} + */ + getPointerHeight(): void; + + /** To get Pointer Placement in String + * @returns {void} + */ + getPointerPlacement(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getPointerValue(): void; + + /** To get PointerWidth in number + * @returns {void} + */ + getPointerWidth(): void; + + /** To get Range Border Width in number + * @returns {void} + */ + getRangeBorderWidth(): void; + + /** To get Range Distance From Scale in number + * @returns {void} + */ + getRangeDistanceFromScale(): void; + + /** To get Range End Value in number + * @returns {void} + */ + getRangeEndValue(): void; + + /** To get Range End Width in number + * @returns {void} + */ + getRangeEndWidth(): void; + + /** To get Range Position in number + * @returns {void} + */ + getRangePosition(): void; + + /** To get Range Start Value in number + * @returns {void} + */ + getRangeStartValue(): void; + + /** To get Range Start Width in number + * @returns {void} + */ + getRangeStartWidth(): void; + + /** To get ScaleBarLength in number + * @returns {void} + */ + getScaleBarLength(): void; + + /** To get Scale Bar Size in number + * @returns {void} + */ + getScaleBarSize(): void; + + /** To get Scale Border Width in number + * @returns {void} + */ + getScaleBorderWidth(): void; + + /** To get Scale Direction in number + * @returns {void} + */ + getScaleDirection(): void; + + /** To get Scale Location in object + * @returns {void} + */ + getScaleLocation(): void; + + /** To get Scale Style in string + * @returns {void} + */ + getScaleStyle(): void; + + /** To get Tick Angle in number + * @returns {void} + */ + getTickAngle(): void; + + /** To get Tick Height in number + * @returns {void} + */ + getTickHeight(): void; + + /** To get getTickPlacement in number + * @returns {void} + */ + getTickPlacement(): void; + + /** To get Tick Style in string + * @returns {void} + */ + getTickStyle(): void; + + /** To get Tick Width in number + * @returns {void} + */ + getTickWidth(): void; + + /** To get get Tick XDistance From Scale in number + * @returns {void} + */ + getTickXDistanceFromScale(): void; + + /** To get Tick YDistance From Scale in number + * @returns {void} + */ + getTickYDistanceFromScale(): void; + + /** Specifies the scales. + * @returns {void} + */ + scales(): void; + + /** To set setBarDistanceFromScale + * @returns {void} + */ + setBarDistanceFromScale(): void; + + /** To set setBarPointerValue + * @returns {void} + */ + setBarPointerValue(): void; + + /** To set setBarWidth + * @returns {void} + */ + setBarWidth(): void; + + /** To set setCustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set setCustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set setLabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set setLabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set setLabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set setLabelXDistanceFromScale + * @returns {void} + */ + setLabelXDistanceFromScale(): void; + + /** To set setLabelYDistanceFromScale + * @returns {void} + */ + setLabelYDistanceFromScale(): void; + + /** To set setMajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set setMarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set setMaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set setMinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set setMinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set setPointerDistanceFromScale + * @returns {void} + */ + setPointerDistanceFromScale(): void; + + /** To set PointerHeight + * @returns {void} + */ + setPointerHeight(): void; + + /** To set setPointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set setRangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set setRangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set setRangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set setRangeEndWidth + * @returns {void} + */ + setRangeEndWidth(): void; + + /** To set setRangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set setRangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set setRangeStartWidth + * @returns {void} + */ + setRangeStartWidth(): void; + + /** To set setScaleBarLength + * @returns {void} + */ + setScaleBarLength(): void; + + /** To set setScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set setScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set setScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set setScaleLocation + * @returns {void} + */ + setScaleLocation(): void; + + /** To set setScaleStyle + * @returns {void} + */ + setScaleStyle(): void; + + /** To set setTickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set setTickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set setTickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set setTickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set setTickWidth + * @returns {void} + */ + setTickWidth(): void; + + /** To set setTickXDistanceFromScale + * @returns {void} + */ + setTickXDistanceFromScale(): void; + + /** To set setTickYDistanceFromScale + * @returns {void} + */ + setTickYDistanceFromScale(): void; +} +export module LinearGauge{ + +export interface Model { + + /**Specifies the animationSpeed + * @Default {500} + */ + animationSpeed?: number; + + /**Specifies the backgroundColor for Linear gauge. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor for Linear gauge. + * @Default {null} + */ + borderColor?: string; + + /**Specifies the animate state + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the animate state for marker pointer + * @Default {true} + */ + enableMarkerPointerAnimation?: boolean; + + /**Specifies the can resize state. + * @Default {false} + */ + enableResize?: boolean; + + /**Specify frame of linear gauge + * @Default {null} + */ + frame?: Frame; + + /**Specifies the height of Linear gauge. + * @Default {400} + */ + height?: number; + + /**Specifies the labelColor for Linear gauge. + * @Default {null} + */ + labelColor?: string; + + /**Specifies the maximum value of Linear gauge. + * @Default {100} + */ + maximum?: number; + + /**Specifies the minimum value of Linear gauge. + * @Default {0} + */ + minimum?: number; + + /**Specifies the orientation for Linear gauge. + * @Default {Vertical} + */ + orientation?: string; + + /**Specify labelPosition value of Linear gauge See OuterCustomLabelPosition + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.LinearGauge.OuterCustomLabelPosition|string; + + /**Specifies the pointerGradient1 for Linear gauge. + * @Default {null} + */ + pointerGradient1?: any; + + /**Specifies the pointerGradient2 for Linear gauge. + * @Default {null} + */ + pointerGradient2?: any; + + /**Specifies the read only state. + * @Default {true} + */ + readOnly?: boolean; + + /**Specifies the scales + * @Default {null} + */ + scales?: Scales; + + /**Specifies the theme for Linear gauge. See LinearGauge.Themes + * @Default {flatlight} + */ + theme?: ej.datavisualization.LinearGauge.Themes|string; + + /**Specifies the tick Color for Linear gauge. + * @Default {null} + */ + tickColor?: string; + + /**Specify tooltip options of linear gauge + * @Default {false} + */ + tooltip?: Tooltip; + + /**Specifies the value of the Gauge. + * @Default {0} + */ + value?: number; + + /**Specifies the width of Linear gauge. + * @Default {150} + */ + width?: number; + + /**Triggers while the bar pointer are being drawn on the gauge.*/ + drawBarPointers? (e: DrawBarPointersEventArgs): void; + + /**Triggers while the customLabel are being drawn on the gauge.*/ + drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + + /**Triggers while the Indicator are being drawn on the gauge.*/ + drawIndicators? (e: DrawIndicatorsEventArgs): void; + + /**Triggers while the label are being drawn on the gauge.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Triggers while the marker are being drawn on the gauge.*/ + drawMarkerPointers? (e: DrawMarkerPointersEventArgs): void; + + /**Triggers while the range are being drawn on the gauge.*/ + drawRange? (e: DrawRangeEventArgs): void; + + /**Triggers while the ticks are being drawn on the gauge.*/ + drawTicks? (e: DrawTicksEventArgs): void; + + /**Triggers when the gauge is initialized.*/ + init? (e: InitEventArgs): void; + + /**Triggers while the gauge start to Load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the left mouse button is clicked.*/ + mouseClick? (e: MouseClickEventArgs): void; + + /**Triggers when clicking and dragging the mouse pointer over the gauge pointer.*/ + mouseClickMove? (e: MouseClickMoveEventArgs): void; + + /**Triggers when the mouse click is released.*/ + mouseClickUp? (e: MouseClickUpEventArgs): void; + + /**Triggers while the rendering of the gauge completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface DrawBarPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the current Bar pointer element. + */ + barElement?: any; + + /**returns the index of the bar pointer. + */ + barPointerIndex?: number; + + /**returns the value of the bar pointer. + */ + PointerValue?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawCustomLabelEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the customLabel + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the customLabel style + */ + style?: any; + + /**returns the current customLabel element. + */ + customLabelElement?: any; + + /**returns the index of the customLabel. + */ + customLabelIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawIndicatorsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the Indicator + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the Indicator style + */ + style?: string; + + /**returns the current Indicator element. + */ + IndicatorElement?: any; + + /**returns the index of the Indicator. + */ + IndicatorIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the label + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; + + /**returns the label style + */ + style?: string; + + /**returns the angle of the label. + */ + angle?: number; + + /**returns the current label element. + */ + element?: any; + + /**returns the index of the label. + */ + index?: number; + + /**returns the label value of the label. + */ + value?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawMarkerPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the current marker pointer element. + */ + markerElement?: any; + + /**returns the index of the marker pointer. + */ + markerPointerIndex?: number; + + /**returns the value of the marker pointer. + */ + pointerValue?: number; + + /**returns the angle of the marker pointer. + */ + pointerAngle?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawRangeEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the range + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the range style + */ + style?: string; + + /**returns the current range element. + */ + rangeElement?: any; + + /**returns the index of the range. + */ + rangeIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawTicksEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the ticks + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the angle of the tick. + */ + angle?: number; + + /**returns the current tick element. + */ + element?: any; + + /**returns the index of the tick. + */ + index?: number; + + /**returns the tick value of the tick. + */ + value?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface InitEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: any; +} + +export interface MouseClickEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + markerpointerindex?: number; + + /**returns the pointer element. + */ + markerpointerelement?: any; + + /**returns the value of the pointer. + */ + markerpointervalue?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickMoveEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickUpEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + markerpointerIndex?: number; + + /**returns the pointer element. + */ + markerpointerElement?: any; + + /**returns the value of the pointer. + */ + markerpointerValue?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: any; +} + +export interface Frame { + + /**Specifies the frame background image url of linear gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the frame InnerWidth + * @Default {8} + */ + innerWidth?: number; + + /**Specifies the frame OuterWidth + * @Default {12} + */ + outerWidth?: number; +} + +export interface ScalesBarPointersBorder { + + /**Specifies the border Color of bar pointer + * @Default {null} + */ + color?: string; + + /**Specifies the border Width of bar pointer + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesBarPointers { + + /**Specifies the backgroundColor of bar pointer + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border of bar pointer + * @Default {null} + */ + border?: ScalesBarPointersBorder; + + /**Specifies the distanceFromScale of bar pointer + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the scaleBar Gradient of bar pointer + * @Default {null} + */ + gradients?: any; + + /**Specifies the opacity of bar pointer + * @Default {1} + */ + opacity?: number; + + /**Specifies the value of bar pointer + * @Default {null} + */ + value?: number; + + /**Specifies the pointer Width of bar pointer + * @Default {width=30} + */ + width?: number; +} + +export interface ScalesBorder { + + /**Specifies the border color of the Scale. + * @Default {null} + */ + color?: string; + + /**Specifies the border width of the Scale. + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesCustomLabelsFont { + + /**Specifies the fontFamily in customLabels + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle in customLabels. See FontStyle + * @Default {Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the font size in customLabels + * @Default {11px} + */ + size?: string; +} + +export interface ScalesCustomLabelsPosition { + + /**Specifies the position x in customLabels + * @Default {0} + */ + x?: number; + + /**Specifies the y in customLabels + * @Default {0} + */ + y?: number; +} + +export interface ScalesCustomLabels { + + /**Specifies the label Color in customLabels + * @Default {null} + */ + color?: number; + + /**Specifies the font in customLabels + * @Default {null} + */ + font?: ScalesCustomLabelsFont; + + /**Specifies the opacity in customLabels + * @Default {0} + */ + opacity?: string; + + /**Specifies the position in customLabels + * @Default {null} + */ + position?: ScalesCustomLabelsPosition; + + /**Specifies the positionType in customLabels.See CustomLabelPositionType + * @Default {null} + */ + positionType?: any; + + /**Specifies the textAngle in customLabels + * @Default {0} + */ + textAngle?: number; + + /**Specifies the label Value in customLabels + */ + value?: string; +} + +export interface ScalesIndicatorsBorder { + + /**Specifies the border Color in bar indicators + * @Default {null} + */ + color?: string; + + /**Specifies the border Width in bar indicators + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesIndicatorsFont { + + /**Specifies the fontFamily of font in bar indicators + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle of font in bar indicators. See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the size of font in bar indicators + * @Default {11px} + */ + size?: string; +} + +export interface ScalesIndicatorsPosition { + + /**Specifies the x position in bar indicators + * @Default {0} + */ + x?: number; + + /**Specifies the y position in bar indicators + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicatorsStateRanges { + + /**Specifies the backgroundColor in bar indicators state ranges + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor in bar indicators state ranges + * @Default {null} + */ + borderColor?: string; + + /**Specifies the endValue in bar indicators state ranges + * @Default {60} + */ + endValue?: number; + + /**Specifies the startValue in bar indicators state ranges + * @Default {50} + */ + startValue?: number; + + /**Specifies the text in bar indicators state ranges + */ + text?: string; + + /**Specifies the textColor in bar indicators state ranges + * @Default {null} + */ + textColor?: string; +} + +export interface ScalesIndicatorsTextLocation { + + /**Specifies the textLocation position in bar indicators + * @Default {0} + */ + x?: number; + + /**Specifies the Y position in bar indicators + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicators { + + /**Specifies the backgroundColor in bar indicators + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border in bar indicators + * @Default {null} + */ + border?: ScalesIndicatorsBorder; + + /**Specifies the font of bar indicators + * @Default {null} + */ + font?: ScalesIndicatorsFont; + + /**Specifies the indicator Height of bar indicators + * @Default {30} + */ + height?: number; + + /**Specifies the opacity in bar indicators + * @Default {NaN} + */ + opacity?: number; + + /**Specifies the position in bar indicators + * @Default {null} + */ + position?: ScalesIndicatorsPosition; + + /**Specifies the state ranges in bar indicators + * @Default {Array} + */ + stateRanges?: Array; + + /**Specifies the textLocation in bar indicators + * @Default {null} + */ + textLocation?: ScalesIndicatorsTextLocation; + + /**Specifies the indicator Style of font in bar indicators + * @Default {ej.datavisualization.LinearGauge.IndicatorType.Rectangle} + */ + type?: ej.datavisualization.LinearGauge.IndicatorTypes|string; + + /**Specifies the indicator Width in bar indicators + * @Default {30} + */ + width?: number; +} + +export interface ScalesLabelsDistanceFromScale { + + /**Specifies the xDistanceFromScale of labels. + * @Default {-10} + */ + x?: number; + + /**Specifies the yDistanceFromScale of labels. + * @Default {0} + */ + y?: number; +} + +export interface ScalesLabelsFont { + + /**Specifies the fontFamily of font. + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle of font.See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the size of font. + * @Default {11px} + */ + size?: string; +} + +export interface ScalesLabels { + + /**Specifies the angle of labels. + * @Default {0} + */ + angle?: number; + + /**Specifies the DistanceFromScale of labels. + * @Default {null} + */ + distanceFromScale?: ScalesLabelsDistanceFromScale; + + /**Specifies the font of labels. + * @Default {null} + */ + font?: ScalesLabelsFont; + + /**need to includeFirstValue. + * @Default {true} + */ + includeFirstValue?: boolean; + + /**Specifies the opacity of label. + * @Default {0} + */ + opacity?: number; + + /**Specifies the label Placement of label. See LabelPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the textColor of font. + * @Default {null} + */ + textColor?: string; + + /**Specifies the label Style of label. See LabelType + * @Default {ej.datavisualization.LinearGauge.LabelType.Major} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /**Specifies the unitText of label. + */ + unitText?: string; + + /**Specifies the unitText Position of label.See UnitTextPlacement + * @Default {Back} + */ + unitTextPlacement?: ej.datavisualization.LinearGauge.UnitTextPlacement|string; +} + +export interface ScalesMarkerPointersBorder { + + /**Specifies the border color of marker pointer + * @Default {null} + */ + color?: string; + + /**Specifies the border of marker pointer + * @Default {number} + */ + width?: number; +} + +export interface ScalesMarkerPointers { + + /**Specifies the backgroundColor of marker pointer + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border of marker pointer + * @Default {null} + */ + border?: ScalesMarkerPointersBorder; + + /**Specifies the distanceFromScale of marker pointer + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the pointer Gradient of marker pointer + * @Default {null} + */ + gradients?: any; + + /**Specifies the pointer Length of marker pointer + * @Default {30} + */ + length?: number; + + /**Specifies the opacity of marker pointer + * @Default {1} + */ + opacity?: number; + + /**Specifies the pointer Placement of marker pointer See PointerPlacement + * @Default {Far} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the marker Style of marker pointerSee MarkerType + * @Default {Triangle} + */ + type?: ej.datavisualization.LinearGauge.MarkerType|string; + + /**Specifies the value of marker pointer + * @Default {null} + */ + value?: number; + + /**Specifies the pointer Width of marker pointer + * @Default {30} + */ + width?: number; +} + +export interface ScalesPosition { + + /**Specifies the Horizontal position + * @Default {50} + */ + x?: number; + + /**Specifies the vertical position + * @Default {50} + */ + y?: number; +} + +export interface ScalesRangesBorder { + + /**Specifies the border color in the ranges. + * @Default {null} + */ + color?: string; + + /**Specifies the border width in the ranges. + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesRanges { + + /**Specifies the backgroundColor in the ranges. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border in the ranges. + * @Default {null} + */ + border?: ScalesRangesBorder; + + /**Specifies the distanceFromScale in the ranges. + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the endValue in the ranges. + * @Default {60} + */ + endValue?: number; + + /**Specifies the endWidth in the ranges. + * @Default {10} + */ + endWidth?: number; + + /**Specifies the range Gradient in the ranges. + * @Default {null} + */ + gradients?: any; + + /**Specifies the opacity in the ranges. + * @Default {null} + */ + opacity?: number; + + /**Specifies the range Position in the ranges. See RangePlacement + * @Default {Center} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the startValue in the ranges. + * @Default {20} + */ + startValue?: number; + + /**Specifies the startWidth in the ranges. + * @Default {10} + */ + startWidth?: number; +} + +export interface ScalesTicksDistanceFromScale { + + /**Specifies the xDistanceFromScale in the tick. + * @Default {0} + */ + x?: number; + + /**Specifies the yDistanceFromScale in the tick. + * @Default {0} + */ + y?: number; +} + +export interface ScalesTicks { + + /**Specifies the angle in the tick. + * @Default {0} + */ + angle?: number; + + /**Specifies the tick Color in the tick. + * @Default {null} + */ + color?: string; + + /**Specifies the DistanceFromScale in the tick. + * @Default {null} + */ + distanceFromScale?: ScalesTicksDistanceFromScale; + + /**Specifies the tick Height in the tick. + * @Default {10} + */ + height?: number; + + /**Specifies the opacity in the tick. + * @Default {0} + */ + opacity?: number; + + /**Specifies the tick Placement in the tick. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the tick Style in the tick. See TickType + * @Default {MajorInterval} + */ + type?: ej.datavisualization.LinearGauge.TicksType|string; + + /**Specifies the tick Width in the tick. + * @Default {3} + */ + width?: number; +} + +export interface Scales { + + /**Specifies the backgroundColor of the Scale. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the scaleBar Gradient of bar pointer + * @Default {Array} + */ + barPointers?: Array; + + /**Specifies the border of the Scale. + * @Default {null} + */ + border?: ScalesBorder; + + /**Specifies the customLabel + * @Default {Array} + */ + customLabels?: Array; + + /**Specifies the scale Direction of the Scale. See Directions + * @Default {CounterClockwise} + */ + direction?: ej.datavisualization.LinearGauge.Direction|string; + + /**Specifies the indicator + * @Default {Array} + */ + indicators?: Array; + + /**Specifies the labels. + * @Default {Array} + */ + labels?: Array; + + /**Specifies the scaleBar Length. + * @Default {290} + */ + length?: number; + + /**Specifies the majorIntervalValue of the Scale. + * @Default {10} + */ + majorIntervalValue?: number; + + /**Specifies the markerPointers + * @Default {Array} + */ + markerPointers?: Array; + + /**Specifies the maximum of the Scale. + * @Default {null} + */ + maximum?: number; + + /**Specifies the minimum of the Scale. + * @Default {null} + */ + minimum?: number; + + /**Specifies the minorIntervalValue of the Scale. + * @Default {2} + */ + minorIntervalValue?: number; + + /**Specifies the opacity of the Scale. + * @Default {NaN} + */ + opacity?: number; + + /**Specifies the position + * @Default {null} + */ + position?: ScalesPosition; + + /**Specifies the ranges in the tick. + * @Default {Array} + */ + ranges?: Array; + + /**Specifies the shadowOffset. + * @Default {0} + */ + shadowOffset?: number; + + /**Specifies the showBarPointers state. + * @Default {true} + */ + showBarPointers?: boolean; + + /**Specifies the showCustomLabels state. + * @Default {false} + */ + showCustomLabels?: boolean; + + /**Specifies the showIndicators state. + * @Default {false} + */ + showIndicators?: boolean; + + /**Specifies the showLabels state. + * @Default {true} + */ + showLabels?: boolean; + + /**Specifies the showMarkerPointers state. + * @Default {true} + */ + showMarkerPointers?: boolean; + + /**Specifies the showRanges state. + * @Default {false} + */ + showRanges?: boolean; + + /**Specifies the showTicks state. + * @Default {true} + */ + showTicks?: boolean; + + /**Specifies the ticks in the scale. + * @Default {Array} + */ + ticks?: Array; + + /**Specifies the scaleBar type .See ScaleType + * @Default {Rectangle} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /**Specifies the scaleBar width. + * @Default {30} + */ + width?: number; +} + +export interface Tooltip { + + /**Specify showCustomLabelTooltip value of linear gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /**Specify showLabelTooltip value of linear gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /**Specify templateID value of linear gauge + * @Default {false} + */ + templateID?: string; +} +} +module LinearGauge +{ +enum OuterCustomLabelPosition +{ +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +module LinearGauge +{ +enum FontStyle +{ +//string +Bold, +//string +Italic, +//string +Regular, +//string +Strikeout, +//string +Underline, +} +} +module LinearGauge +{ +enum Direction +{ +//string +Clockwise, +//string +CounterClockwise, +} +} +module LinearGauge +{ +enum IndicatorTypes +{ +//string +Rectangle, +//string +Circle, +//string +RoundedRectangle, +//string +Text, +} +} +module LinearGauge +{ +enum PointerPlacement +{ +//string +Near, +//string +Far, +//string +Center, +} +} +module LinearGauge +{ +enum ScaleType +{ +//string +Major, +//string +Minor, +} +} +module LinearGauge +{ +enum UnitTextPlacement +{ +//string +Back, +//string +From, +} +} +module LinearGauge +{ +enum MarkerType +{ +//string +Rectangle, +//string +Triangle, +//string +Ellipse, +//string +Diamond, +//string +Pentagon, +//string +Circle, +//string +Star, +//string +Slider, +//string +Pointer, +//string +Wedge, +//string +Trapezoid, +//string +RoundedRectangle, +} +} +module LinearGauge +{ +enum TicksType +{ +//string +Majorinterval, +//string +Minorinterval, +} +} +module LinearGauge +{ +enum Themes +{ +//string +FlatLight, +//string +FlatDark, +} +} + +class CircularGauge extends ej.Widget { + static fn: CircularGauge; + constructor(element: JQuery, options?: CircularGauge.Model); + constructor(element: Element, options?: CircularGauge.Model); + model:CircularGauge.Model; + defaults:CircularGauge.Model; + + /** destroy the circular gauge widget. all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get BackNeedleLength + * @returns {void} + */ + getBackNeedleLength(): void; + + /** To get CustomLabelAngle + * @returns {void} + */ + getCustomLabelAngle(): void; + + /** To get CustomLabelValue + * @returns {void} + */ + getCustomLabelValue(): void; + + /** To get LabelAngle + * @returns {void} + */ + getLabelAngle(): void; + + /** To get LabelDistanceFromScale + * @returns {void} + */ + getLabelDistanceFromScale(): void; + + /** To get LabelPlacement + * @returns {void} + */ + getLabelPlacement(): void; + + /** To get LabelStyle + * @returns {void} + */ + getLabelStyle(): void; + + /** To get MajorIntervalValue + * @returns {void} + */ + getMajorIntervalValue(): void; + + /** To get MarkerDistanceFromScale + * @returns {void} + */ + getMarkerDistanceFromScale(): void; + + /** To get MarkerStyle + * @returns {void} + */ + getMarkerStyle(): void; + + /** To get MaximumValue + * @returns {void} + */ + getMaximumValue(): void; + + /** To get MinimumValue + * @returns {void} + */ + getMinimumValue(): void; + + /** To get MinorIntervalValue + * @returns {void} + */ + getMinorIntervalValue(): void; + + /** To get NeedleStyle + * @returns {void} + */ + getNeedleStyle(): void; + + /** To get PointerCapBorderWidth + * @returns {void} + */ + getPointerCapBorderWidth(): void; + + /** To get PointerCapRadius + * @returns {void} + */ + getPointerCapRadius(): void; + + /** To get PointerLength + * @returns {void} + */ + getPointerLength(): void; + + /** To get PointerNeedleType + * @returns {void} + */ + getPointerNeedleType(): void; + + /** To get PointerPlacement + * @returns {void} + */ + getPointerPlacement(): void; + + /** To get PointerValue + * @returns {void} + */ + getPointerValue(): void; + + /** To get PointerWidth + * @returns {void} + */ + getPointerWidth(): void; + + /** To get RangeBorderWidth + * @returns {void} + */ + getRangeBorderWidth(): void; + + /** To get RangeDistanceFromScale + * @returns {void} + */ + getRangeDistanceFromScale(): void; + + /** To get RangeEndValue + * @returns {void} + */ + getRangeEndValue(): void; + + /** To get RangePosition + * @returns {void} + */ + getRangePosition(): void; + + /** To get RangeSize + * @returns {void} + */ + getRangeSize(): void; + + /** To get RangeStartValue + * @returns {void} + */ + getRangeStartValue(): void; + + /** To get ScaleBarSize + * @returns {void} + */ + getScaleBarSize(): void; + + /** To get ScaleBorderWidth + * @returns {void} + */ + getScaleBorderWidth(): void; + + /** To get ScaleDirection + * @returns {void} + */ + getScaleDirection(): void; + + /** To get ScaleRadius + * @returns {void} + */ + getScaleRadius(): void; + + /** To get StartAngle + * @returns {void} + */ + getStartAngle(): void; + + /** To get SubGaugeLocation + * @returns {void} + */ + getSubGaugeLocation(): void; + + /** To get SweepAngle + * @returns {void} + */ + getSweepAngle(): void; + + /** To get TickAngle + * @returns {void} + */ + getTickAngle(): void; + + /** To get TickDistanceFromScale + * @returns {void} + */ + getTickDistanceFromScale(): void; + + /** To get TickHeight + * @returns {void} + */ + getTickHeight(): void; + + /** To get TickPlacement + * @returns {void} + */ + getTickPlacement(): void; + + /** To get TickStyle + * @returns {void} + */ + getTickStyle(): void; + + /** To get TickWidth + * @returns {void} + */ + getTickWidth(): void; + + /** To set includeFirstValue + * @returns {void} + */ + includeFirstValue(): void; + + /** Switching the redraw option for the gauge + * @returns {void} + */ + redraw(): void; + + /** To set BackNeedleLength + * @returns {void} + */ + setBackNeedleLength(): void; + + /** To set CustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set CustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set LabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set LabelDistanceFromScale + * @returns {void} + */ + setLabelDistanceFromScale(): void; + + /** To set LabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set LabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set MajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set MarkerDistanceFromScale + * @returns {void} + */ + setMarkerDistanceFromScale(): void; + + /** To set MarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set MaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set MinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set MinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set NeedleStyle + * @returns {void} + */ + setNeedleStyle(): void; + + /** To set PointerCapBorderWidth + * @returns {void} + */ + setPointerCapBorderWidth(): void; + + /** To set PointerCapRadius + * @returns {void} + */ + setPointerCapRadius(): void; + + /** To set PointerLength + * @returns {void} + */ + setPointerLength(): void; + + /** To set PointerNeedleType + * @returns {void} + */ + setPointerNeedleType(): void; + + /** To set PointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set RangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set RangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set RangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set RangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set RangeSize + * @returns {void} + */ + setRangeSize(): void; + + /** To set RangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set ScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set ScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set ScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set ScaleRadius + * @returns {void} + */ + setScaleRadius(): void; + + /** To set StartAngle + * @returns {void} + */ + setStartAngle(): void; + + /** To set SubGaugeLocation + * @returns {void} + */ + setSubGaugeLocation(): void; + + /** To set SweepAngle + * @returns {void} + */ + setSweepAngle(): void; + + /** To set TickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set TickDistanceFromScale + * @returns {void} + */ + setTickDistanceFromScale(): void; + + /** To set TickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set TickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set TickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set TickWidth + * @returns {void} + */ + setTickWidth(): void; +} +export module CircularGauge{ + +export interface Model { + + /**Specifies animationSpeed of circular gauge + * @Default {500} + */ + animationSpeed?: number; + + /**Specifies the background color of circular gauge. + * @Default {null} + */ + backgroundColor?: string; + + /**Specify distanceFromCorner value of circular gauge + * @Default {center} + */ + distanceFromCorner?: number; + + /**Specify animate value of circular gauge + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specify enableResize value of circular gauge + * @Default {false} + */ + enableResize?: boolean; + + /**Specify the frame of circular gauge + * @Default {Object} + */ + frame?: Frame; + + /**Specify gaugePosition value of circular gauge See GaugePosition + * @Default {center} + */ + gaugePosition?: ej.datavisualization.CircularGauge.gaugePosition|string; + + /**Specifies the height of circular gauge. + * @Default {360} + */ + height?: number; + + /**Specifies the interiorGradient of circular gauge. + * @Default {null} + */ + interiorGradient?: any; + + /**Specify isRadialGradient value of circular gauge + * @Default {false} + */ + isRadialGradient?: boolean; + + /**Specifies the maximum value of circular gauge. + * @Default {100} + */ + maximum?: number; + + /**Specifies the minimum value of circular gauge. + * @Default {0} + */ + minimum?: number; + + /**Specify outerCustomLabelPosition value of circular gauge See OuterCustomLabelPosition + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.CircularGauge.CustomLabelPositionType|string; + + /**Specifies the radius of circular gauge. + * @Default {180} + */ + radius?: number; + + /**Specify readonly value of circular gauge + * @Default {true} + */ + readOnly?: boolean; + + /**Specify the pointers, ticks, labels, indicators, ranges of circular gauge + * @Default {null} + */ + scales?: Scales; + + /**Specify the theme of circular gauge. + * @Default {flatlight} + */ + theme?: string; + + /**Specify tooltip option of circular gauge + * @Default {object} + */ + tooltip?: Tooltip; + + /**Specifies the value of circular gauge. + * @Default {0} + */ + value?: number; + + /**Specifies the width of circular gauge. + * @Default {360} + */ + width?: number; + + /**Triggers while the custom labels are being drawn on the gauge.*/ + drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + + /**Triggers while the indicators are being started to drawn on the gauge.*/ + drawIndicators? (e: DrawIndicatorsEventArgs): void; + + /**Triggers while the labels are being drawn on the gauge.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Triggers while the pointer cap is being drawn on the gauge.*/ + drawPointerCap? (e: DrawPointerCapEventArgs): void; + + /**Triggers while the pointers are being drawn on the gauge.*/ + drawPointers? (e: DrawPointersEventArgs): void; + + /**Triggers when the ranges begin to be getting drawn on the gauge.*/ + drawRange? (e: DrawRangeEventArgs): void; + + /**Triggers while the ticks are being drawn on the gauge.*/ + drawTicks? (e: DrawTicksEventArgs): void; + + /**Triggers while the gauge start to Load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the left mouse button is clicked.*/ + mouseClick? (e: MouseClickEventArgs): void; + + /**Triggers when clicking and dragging the mouse pointer over the gauge pointer.*/ + mouseClickMove? (e: MouseClickMoveEventArgs): void; + + /**Triggers when the mouse click is released.*/ + mouseClickUp? (e: MouseClickUpEventArgs): void; + + /**Triggers when the rendering of the gauge is completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface DrawCustomLabelEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the custom label + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the custom label belongs. + */ + scaleIndex?: number; + + /**returns the custom label style + */ + style?: string; + + /**returns the current custom label element. + */ + customLabelElement?: any; + + /**returns the index of the custom label. + */ + customLabelIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawIndicatorsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the indicator + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the indicator belongs. + */ + scaleIndex?: number; + + /**returns the indicator style + */ + style?: string; + + /**returns the current indicator element. + */ + indicatorElement?: any; + + /**returns the index of the indicator. + */ + indicatorIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the labels + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; + + /**returns the label style + */ + style?: string; + + /**returns the angle of the labels. + */ + angle?: number; + + /**returns the current label element. + */ + element?: any; + + /**returns the index of the label. + */ + index?: number; + + /**returns the value of the label. + */ + pointerValue?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawPointerCapEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the startX and startY of the pointer cap. + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the pointer cap style + */ + style?: string; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the current pointer element. + */ + element?: any; + + /**returns the index of the pointer. + */ + index?: number; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawRangeEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the range + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the range belongs. + */ + scaleIndex?: number; + + /**returns the range style + */ + style?: string; + + /**returns the current range element. + */ + rangeElement?: any; + + /**returns the index of the range. + */ + rangeIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawTicksEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the ticks + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the angle of the tick. + */ + angle?: number; + + /**returns the current tick element. + */ + element?: any; + + /**returns the index of the tick. + */ + index?: number; + + /**returns the label value of the tick. + */ + pointerValue?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseClickEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickMoveEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickUpEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface Frame { + + /**Specify the url of the frame background image for circular gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the frameType of circular gauge. See Frame + * @Default {FullCircle} + */ + frameType?: ej.datavisualization.CircularGauge.FrameType|string; + + /**Specifies the end angle for the half circular frame. + * @Default {360} + */ + halfCircleFrameEndAngle?: number; + + /**Specifies the start angle for the half circular frame. + * @Default {180} + */ + halfCircleFrameStartAngle?: number; +} + +export interface ScalesBorder { + + /**Specify border color for scales of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify border width of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesIndicatorsPosition { + + /**Specify x-axis of position of circular gauge + * @Default {0} + */ + x?: number; + + /**Specify y-axis of position of circular gauge + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicatorsStateRanges { + + /**Specify backgroundColor for indicator of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify borderColor for indicator of circular gauge + * @Default {null} + */ + borderColor?: string; + + /**Specify end value for each specified state of circular gauge + * @Default {0} + */ + endValue?: number; + + /**Specify value of the font as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + font?: any; + + /**Specify start value for each specified state of circular gauge + * @Default {0} + */ + startValue?: number; + + /**Specify value of the text as the indicator when the indicator style is set with the value "text" of circular gauge + */ + text?: string; + + /**Specify value of the textColor as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + textColor?: string; +} + +export interface ScalesIndicators { + + /**Specify indicator height of circular gauge + * @Default {15} + */ + height?: number; + + /**Specify imageUrl of circular gauge + * @Default {null} + */ + imageUrl?: string; + + /**Specify position of circular gauge + * @Default {Object} + */ + position?: ScalesIndicatorsPosition; + + /**Specify the various states of circular gauge + * @Default {Array} + */ + stateRanges?: Array; + + /**Specify indicator style of circular gauge. See IndicatorType + * @Default {Circle} + */ + type?: ej.datavisualization.CircularGauge.IndicatorTypes|string; + + /**Specify indicator width of circular gauge + * @Default {15} + */ + width?: number; +} + +export interface ScalesLabelsFont { + + /**Specify font fontFamily for labels of circular gauge + * @Default {Arial} + */ + fontFamily?: string; + + /**Specify font Style for labels of circular gauge + * @Default {Bold} + */ + fontStyle?: string; + + /**Specify font size for labels of circular gauge + * @Default {11px} + */ + size?: string; +} + +export interface ScalesLabels { + + /**Specify the angle for the labels of circular gauge + * @Default {0} + */ + angle?: number; + + /**Specify labels autoAngle value of circular gauge + * @Default {false} + */ + autoAngle?: boolean; + + /**Specify label color of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify distanceFromScale value for labels of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify font for labels of circular gauge + * @Default {Object} + */ + font?: ScalesLabelsFont; + + /**Specify includeFirstValue of circular gauge + * @Default {true} + */ + includeFirstValue?: boolean; + + /**Specify opacity value for labels of circular gauge + * @Default {null} + */ + opacity?: number; + + /**Specify label placement of circular gauge. See LabelPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify label Style of circular gauge. See LabelType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /**Specify unitText of circular gauge + */ + unitText?: string; + + /**Specify unitTextPosition of circular gauge. See UnitTextPosition + * @Default {Back} + */ + unitTextPosition?: ej.datavisualization.CircularGauge.UnitTextPlacement|string; +} + +export interface ScalesPointerCap { + + /**Specify cap backgroundColor of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify cap borderColor of circular gauge + * @Default {null} + */ + borderColor?: string; + + /**Specify pointerCap borderWidth value of circular gauge + * @Default {3} + */ + borderWidth?: number; + + /**Specify cap interiorGradient value of circular gauge + * @Default {null} + */ + interiorGradient?: any; + + /**Specify pointerCap Radius value of circular gauge + * @Default {7} + */ + radius?: number; +} + +export interface ScalesPointersBorder { + + /**Specify border color for pointer of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify border width for pointers of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesPointersPointerValueTextFont { + + /**Specify pointer value text font family of circular gauge. + * @Default {Arial} + */ + fontFamily?: string; + + /**Specify pointer value text font style of circular gauge. + * @Default {Bold} + */ + fontStyle?: string; + + /**Specify pointer value text size of circular gauge. + * @Default {11px} + */ + size?: string; +} + +export interface ScalesPointersPointerValueText { + + /**Specify pointer text angle of circular gauge. + * @Default {0} + */ + angle?: number; + + /**Specify pointer text auto angle of circular gauge. + * @Default {false} + */ + autoAngle?: boolean; + + /**Specify pointer value text color of circular gauge. + * @Default {#8c8c8c} + */ + color?: string; + + /**Specify pointer value text distance from pointer of circular gauge. + * @Default {20} + */ + distance?: number; + + /**Specify pointer value text font option of circular gauge. + * @Default {object} + */ + font?: ScalesPointersPointerValueTextFont; + + /**Specify pointer value text opacity of circular gauge. + * @Default {1} + */ + opacity?: number; + + /**enable pointer value text visibility of circular gauge. + * @Default {false} + */ + showValue?: boolean; +} + +export interface ScalesPointers { + + /**Specify backgroundColor for the pointer of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify backNeedleLength of circular gauge + * @Default {10} + */ + backNeedleLength?: number; + + /**Specify the border for pointers of circular gauge + * @Default {Object} + */ + border?: ScalesPointersBorder; + + /**Specify distanceFromScale value for pointers of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify pointer gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /**Specify pointer image of circular gauge.It is applicable for both marker as well as needle type pointers. + * @Default {NULL} + */ + imageUrl?: string; + + /**Specify pointer length of circular gauge + * @Default {150} + */ + length?: number; + + /**Specify marker Style value of circular gauge. See MarkerType + * @Default {Rectangle} + */ + markerType?: ej.datavisualization.CircularGauge.MarkerType|string; + + /**Specify needle Style value of circular gauge. See NeedleType + * @Default {Triangle} + */ + needleType?: ej.datavisualization.CircularGauge.NeedleType|string; + + /**Specify opacity value for pointer of circular gauge + * @Default {1} + */ + opacity?: number; + + /**Specify pointer Placement value of circular gauge. See PointerPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify pointer value text of circular gauge. + * @Default {Object} + */ + pointerValueText?: ScalesPointersPointerValueText; + + /**Specify showBackNeedle value of circular gauge + * @Default {false} + */ + showBackNeedle?: boolean; + + /**Specify pointer type value of circular gauge. See PointerType + * @Default {Needle} + */ + type?: ej.datavisualization.CircularGauge.PointerType|string; + + /**Specify value of the pointer of circular gauge + * @Default {null} + */ + value?: number; + + /**Specify pointer width of circular gauge + * @Default {7} + */ + width?: number; +} + +export interface ScalesRangesBorder { + + /**Specify border color for ranges of circular gauge + * @Default {#32b3c6} + */ + color?: string; + + /**Specify border width for ranges of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesRanges { + + /**Specify backgroundColor for the ranges of circular gauge + * @Default {#32b3c6} + */ + backgroundColor?: string; + + /**Specify border for ranges of circular gauge + * @Default {Object} + */ + border?: ScalesRangesBorder; + + /**Specify distanceFromScale value for ranges of circular gauge + * @Default {25} + */ + distanceFromScale?: number; + + /**Specify endValue for ranges of circular gauge + * @Default {null} + */ + endValue?: number; + + /**Specify endWidth for ranges of circular gauge + * @Default {10} + */ + endWidth?: number; + + /**Specify range gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /**Specify opacity value for ranges of circular gauge + * @Default {null} + */ + opacity?: number; + + /**Specify placement of circular gauge. See RangePlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify size of the range value of circular gauge + * @Default {5} + */ + size?: number; + + /**Specify startValue for ranges of circular gauge + * @Default {null} + */ + startValue?: number; + + /**Specify startWidth of circular gauge + * @Default {[Array.number] scale.ranges.startWidth = 10} + */ + startWidth?: number; +} + +export interface ScalesSubGaugesPosition { + + /**Specify x-axis position for sub-gauge of circular gauge + * @Default {0} + */ + x?: number; + + /**Specify y-axis position for sub-gauge of circular gauge + * @Default {0} + */ + y?: number; +} + +export interface ScalesSubGauges { + + /**Specify subGauge Height of circular gauge + * @Default {150} + */ + height?: number; + + /**Specify position for sub-gauge of circular gauge + * @Default {Object} + */ + position?: ScalesSubGaugesPosition; + + /**Specify subGauge Width of circular gauge + * @Default {150} + */ + width?: number; +} + +export interface ScalesTicks { + + /**Specify the angle for the ticks of circular gauge + * @Default {0} + */ + angle?: number; + + /**Specify tick color of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify distanceFromScale value for ticks of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify tick height of circular gauge + * @Default {16} + */ + height?: number; + + /**Specify tick placement of circular gauge. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify tick Style of circular gauge. See TickType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /**Specify tick width of circular gauge + * @Default {3} + */ + width?: number; +} + +export interface Scales { + + /**Specify backgroundColor for the scale of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify border for scales of circular gauge + * @Default {Object} + */ + border?: ScalesBorder; + + /**Specify scale direction of circular gauge. See Directions + * @Default {Clockwise} + */ + direction?: ej.datavisualization.CircularGauge.Direction|string; + + /**Specify representing state of circular gauge + * @Default {Array} + */ + indicators?: Array; + + /**Specify the text values displayed in a meaningful manner alongside the ticks of circular gauge + * @Default {Array} + */ + labels?: Array; + + /**Specify majorIntervalValue of circular gauge + * @Default {10} + */ + majorIntervalValue?: number; + + /**Specify maximum scale value of circular gauge + * @Default {null} + */ + maximum?: number; + + /**Specify minimum scale value of circular gauge + * @Default {null} + */ + minimum?: number; + + /**Specify minorIntervalValue of circular gauge + * @Default {2} + */ + minorIntervalValue?: number; + + /**Specify opacity value of circular gauge + * @Default {1} + */ + opacity?: number; + + /**Specify pointer cap of circular gauge + * @Default {Object} + */ + pointerCap?: ScalesPointerCap; + + /**Specify pointers value of circular gauge + * @Default {Array} + */ + pointers?: Array; + + /**Specify scale radius of circular gauge + * @Default {170} + */ + radius?: number; + + /**Specify ranges value of circular gauge + * @Default {Array} + */ + ranges?: Array; + + /**Specify shadowOffset value of circular gauge + * @Default {0} + */ + shadowOffset?: number; + + /**Specify showIndicators of circular gauge + * @Default {false} + */ + showIndicators?: boolean; + + /**Specify showLabels of circular gauge + * @Default {true} + */ + showLabels?: boolean; + + /**Specify showPointers of circular gauge + * @Default {true} + */ + showPointers?: boolean; + + /**Specify showRanges of circular gauge + * @Default {false} + */ + showRanges?: boolean; + + /**Specify showScaleBar of circular gauge + * @Default {false} + */ + showScaleBar?: boolean; + + /**Specify showTicks of circular gauge + * @Default {true} + */ + showTicks?: boolean; + + /**Specify scaleBar size of circular gauge + * @Default {6} + */ + size?: number; + + /**Specify startAngle of circular gauge + * @Default {115} + */ + startAngle?: number; + + /**Specify subGauge of circular gauge + * @Default {Array} + */ + subGauges?: Array; + + /**Specify sweepAngle of circular gauge + * @Default {310} + */ + sweepAngle?: number; + + /**Specify ticks of circular gauge + * @Default {Array} + */ + ticks?: Array; +} + +export interface Tooltip { + + /**enable showCustomLabelTooltip of circular gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /**enable showLabelTooltip of circular gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /**Specify tooltip templateID of circular gauge + * @Default {false} + */ + templateID?: string; +} +} +module CircularGauge +{ +enum FrameType +{ +//string +FullCircle, +//string +HalfCircle, +} +} +module CircularGauge +{ +enum gaugePosition +{ +//string +TopLeft, +//string +TopRight, +//string +TopCenter, +//string +MiddleLeft, +//string +MiddleRight, +//string +Center, +//string +BottomLeft, +//string +BottomRight, +//string +BottomCenter, +} +} +module CircularGauge +{ +enum CustomLabelPositionType +{ +//string +Top, +//string +Bottom, +//string +Right, +//string +Left, +} +} +module CircularGauge +{ +enum Direction +{ +//string +Clockwise, +//string +CounterClockwise, +} +} +module CircularGauge +{ +enum IndicatorTypes +{ +//string +Rectangle, +//string +Circle, +//string +Text, +//string +RoundedRectangle, +//string +Image, +} +} +module CircularGauge +{ +enum Placement +{ +//string +Near, +//string +Far, +} +} +module CircularGauge +{ +enum LabelType +{ +//string +Major, +//string +Minor, +} +} +module CircularGauge +{ +enum UnitTextPlacement +{ +//string +Back, +//string +Front, +} +} +module CircularGauge +{ +enum MarkerType +{ +//string +Rectangle, +//string +Circle, +//string +Triangle, +//string +Ellipse, +//string +Diamond, +//string +Pentagon, +//string +Slider, +//string +Pointer, +//string +Wedge, +//string +Trapezoid, +//string +RoundedRectangle, +//string +Image, +} +} +module CircularGauge +{ +enum NeedleType +{ +//string +Triangle, +//string +Rectangle, +//string +Arrow, +//string +Image, +//string +Trapezoid, +} +} +module CircularGauge +{ +enum PointerType +{ +//string +Needle, +//string +Marker, +} +} + +class DigitalGauge extends ej.Widget { + static fn: DigitalGauge; + constructor(element: JQuery, options?: DigitalGauge.Model); + constructor(element: Element, options?: DigitalGauge.Model); + model:DigitalGauge.Model; + defaults:DigitalGauge.Model; + + /** To destroy the digital gauge + * @returns {void} + */ + destroy(): void; + + /** To export Digital Gauge as Image + * @param {string} fileName for the Image + * @param {string} fileType for the Image + * @returns {void} + */ + exportImage(fileName: string, fileType: string): void; + + /** Gets the location of an item that is displayed on the gauge. + * @param {number} Position value of an item that is displayed on the gauge. + * @returns {void} + */ + getPosition(itemIndex: number): void; + + /** ClientSideMethod getValue Gets the value of an item that is displayed on the gauge + * @param {number} Index value of an item that displayed on the gauge + * @returns {void} + */ + getValue(itemIndex: number): void; + + /** Refresh the digital gauge widget + * @returns {void} + */ + refresh(): void; + + /** ClientSideMethod Set Position Sets the location of an item to be displayed in the gauge + * @param {number} Index value of the digital gauge item + * @param {any} Location value of the digital gauge + * @returns {void} + */ + setPosition(itemIndex: number, value: any): void; + + /** ClientSideMethod SetValue Sets the value of an item to be displayed in the gauge. + * @param {number} Index value of the digital gauge item + * @param {string} Text value to be displayed in the gaugeS + * @returns {void} + */ + setValue(itemIndex: number, value: string): void; +} +export module DigitalGauge{ + +export interface Model { + + /**Specifies the resize option of the DigitalGauge. + * @Default {false} + */ + enableResize?: boolean; + + /**Specifies the frame of the Digital gauge. + * @Default {{backgroundImageUrl: null, innerWidth: 6, outerWidth: 10}} + */ + frame?: Frame; + + /**Specifies the height of the DigitalGauge. + * @Default {150} + */ + height?: number; + + /**Specifies the items for the DigitalGauge. + * @Default {null} + */ + items?: Items; + + /**Specifies the matrixSegmentData for the DigitalGauge. + */ + matrixSegmentData?: any; + + /**Specifies the segmentData for the DigitalGauge. + */ + segmentData?: any; + + /**Specifies the themes for the Digital gauge. See Themes + * @Default {flatlight} + */ + themes?: string; + + /**Specifies the value to the DigitalGauge. + * @Default {text} + */ + value?: string; + + /**Specifies the width for the Digital gauge. + * @Default {400} + */ + width?: number; + + /**Triggers when the gauge is initialized.*/ + init? (e: InitEventArgs): void; + + /**Triggers when the gauge item rendering.*/ + itemRendering? (e: ItemRenderingEventArgs): void; + + /**Triggers when the gauge is start to load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the gauge render is completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface InitEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemRenderingEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface Frame { + + /**Specifies the url of an image to be displayed as background of the Digital gauge. + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the inner width for the frame, when the background image has been set for the Digital gauge.. + * @Default {6} + */ + innerWidth?: number; + + /**Specifies the outer width of the frame, when the background image has been set for the Digital gauge. + * @Default {10} + */ + outerWidth?: number; +} + +export interface ItemsCharacterSettings { + + /**Specifies the CharacterCount value for the DigitalGauge. + * @Default {4} + */ + count?: number; + + /**Specifies the opacity value for the DigitalGauge. + * @Default {1} + */ + opacity?: number; + + /**Specifies the value for spacing between the characters + * @Default {2} + */ + spacing?: number; + + /**Specifies the character type for the text to be displayed. + * @Default {ej.datavisualization.DigitalGauge.CharacterType.EightCrossEightDotMatrix} + */ + type?: ej.datavisualization.DigitalGauge.CharacterType|string; +} + +export interface ItemsFont { + + /**Set the font family value + * @Default {Arial} + */ + fontFamily?: string; + + /**Set the font style for the font + * @Default {italic} + */ + fontStyle?: ej.datavisualization.DigitalGauge.FontStyle|string; + + /**Set the font size value + * @Default {11px} + */ + size?: string; +} + +export interface ItemsPosition { + + /**Set the horizontal location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + x?: number; + + /**Set the vertical location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + y?: number; +} + +export interface ItemsSegmentSettings { + + /**Set the color for the text segments. + * @Default {null} + */ + color?: string; + + /**Set the gradient for the text segments. + * @Default {null} + */ + gradient?: any; + + /**Set the length for the text segments. + * @Default {2} + */ + length?: number; + + /**Set the opacity for the text segments. + * @Default {0} + */ + opacity?: number; + + /**Set the spacing for the text segments. + * @Default {1} + */ + spacing?: number; + + /**Set the width for the text segments. + * @Default {1} + */ + width?: number; +} + +export interface Items { + + /**Specifies the Character settings for the DigitalGauge. + * @Default {null} + */ + characterSettings?: ItemsCharacterSettings; + + /**Enable/Disable the custom font to be applied to the text in the gauge. + * @Default {false} + */ + enableCustomFont?: boolean; + + /**Set the specific font for the text, when the enableCustomFont is set to true + * @Default {null} + */ + font?: ItemsFont; + + /**Set the location for the text, where it needs to be placed within the gauge. + * @Default {null} + */ + position?: ItemsPosition; + + /**Set the segment settings for the digital gauge. + * @Default {null} + */ + segmentSettings?: ItemsSegmentSettings; + + /**Set the value for enabling/disabling the blurring effect for the shadows of the text + * @Default {0} + */ + shadowBlur?: number; + + /**Specifies the color of the text shadow. + * @Default {null} + */ + shadowColor?: string; + + /**Set the x offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetX?: number; + + /**Set the y offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetY?: number; + + /**Set the alignment of the text that is displayed within the gauge.See TextAlign + * @Default {left} + */ + textAlign?: string; + + /**Specifies the color of the text. + * @Default {null} + */ + textColor?: string; + + /**Specifies the text value. + * @Default {null} + */ + value?: string; +} +} +module DigitalGauge +{ +enum CharacterType +{ +//string +SevenSegment, +//string +FourteenSegment, +//string +SixteenSegment, +//string +EightCrossEightDotMatrix, +//string +EightCrossEightSquareMatrix, +} +} +module DigitalGauge +{ +enum FontStyle +{ +//string +Normal, +//string +Bold, +//string +Italic, +//string +Underline, +//string +Strikeout, +} +} + +class Chart extends ej.Widget { + static fn: Chart; + constructor(element: JQuery, options?: Chart.Model); + constructor(element: Element, options?: Chart.Model); + model:Chart.Model; + defaults:Chart.Model; + + /** Animates the series and/or indicators in Chart. When parameter is not passed to this method, then all the series and indicators present in Chart are animated. + * @param {Array} Series and indicator objects passed in the array collection are animated.Example + * @param {any} Series or indicator object passed to this method are animated.Example, + * @returns {void} + */ + animate(options: Array, option: any): void; + + /** Exports chart as an image or to an excel file. Chart can be exported as an image only when exportCanvasRendering option is set to true. + * @param {string} Type of the export operation to be performed. Following are the two export types that are supported now,1. 'image'2. 'excel'Example + * @param {string} URL of the service, where the chart will be exported to excel.Example, + * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. This is an optional parameter. By default, it is false.Example, + * @returns {void} + */ + export(type: string, url: string, exportMultipleChart: boolean): void; + + /** Redraws the entire chart. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; +} +export module Chart{ + +export interface Model { + + /**Options for adding and customizing annotations in Chart. + */ + annotations?: Array; + + /**Url of the image to be used as chart background. + * @Default {null} + */ + backGroundImageUrl?: string; + + /**Options for customizing the color, opacity and width of the chart border. + */ + border?: Border; + + /**Controls whether Chart has to be responsive or not. + * @Default {false} + */ + canResize?: boolean; + + /**Options for configuring the border and background of the plot area. + */ + chartArea?: ChartArea; + + /**Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. + */ + columnDefinitions?: Array; + + /**Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. + */ + commonSeriesOptions?: CommonSeriesOptions; + + /**Options for displaying and customizing the crosshair. + */ + crosshair?: Crosshair; + + /**Depth of the 3D Chart from front view of series to background wall. This property is applicable only for 3D view. + * @Default {100} + */ + depth?: number; + + /**Controls whether 3D view has to be enabled or not. 3D view is supported only for column, bar. Stacking column, stacking bar, pie and doughnut series types. + * @Default {false} + */ + enable3D?: boolean; + + /**Controls whether Chart has to be rendered as Canvas or SVG. Canvas rendering supports all functionalities in SVG rendering except 3D Charts. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /**Controls whether 3D view has to be rotated on dragging. This property is applicable only for 3D view. + * @Default {false} + */ + enableRotation?: boolean; + + /**Options to customize the technical indicators. + */ + indicators?: Array; + + /**Options to customize the legend items and legend title. + */ + legend?: Legend; + + /**Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are not localized automatically. Provide localized text as value to string type properties. + * @Default {en-US} + */ + locale?: string; + + /**Palette is used to store the series fill color in array and apply the color to series collection in the order of series index. + * @Default {null} + */ + palette?: Array; + + /**Options to customize the left, right, top and bottom margins of chart area. + */ + Margin?: any; + + /**Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased.This property is applicable only when 3D view is enabled + * @Default {90} + */ + perspectiveAngle?: number; + + /**This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + */ + primaryXAxis?: PrimaryXAxis; + + /**This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + */ + primaryYAxis?: PrimaryYAxis; + + /**Rotation angle of the 3D view. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + rotation?: number; + + /**Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. + */ + rowDefinitions?: Array; + + /**Specifies the properties used for customizing the series. + */ + series?: Array; + + /**Controls whether data points has to be displayed side by side or along the depth of the axis. + * @Default {false} + */ + sideBySideSeriesPlacement?: boolean; + + /**Options to customize the Chart size. + */ + size?: Size; + + /**Specifies the theme for Chart. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Chart.Theme|string; + + /**Slope angle of 3D Chart. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + tilt?: number; + + /**Options for customizing the title and subtitle of Chart. + */ + title?: Title; + + /**Width of the wall used in 3D Chart. Wall is present only in Cartesian type 3D series and not in 3D pie or Doughnut series. This property is applicable only when 3D view is enabled. + * @Default {2} + */ + wallSize?: number; + + /**Options for enabling zooming feature of chart. + */ + zooming?: Zooming; + + /**Fires after the series animation is completed. This event will be triggered for each series when animation is enabled.*/ + animationComplete? (e: AnimationCompleteEventArgs): void; + + /**Fires before rendering the labels. This event is fired for each label in axis. You can use this event to add custom text to axis labels.*/ + axesLabelRendering? (e: AxesLabelRenderingEventArgs): void; + + /**Fires during the initialization of axis labels.*/ + axesLabelsInitialize? (e: AxesLabelsInitializeEventArgs): void; + + /**Fires during axes range calculation. This event is fired for each axis present in Chart. You can use this event to customize axis range as required.*/ + axesRangeCalculate? (e: AxesRangeCalculateEventArgs): void; + + /**Fires before rendering the axis title. This event is triggered for each axis with title. You can use this event to add custom text to axis title.*/ + axesTitleRendering? (e: AxesTitleRenderingEventArgs): void; + + /**Fires during the calculation of chart area bounds. You can use this event to customize the bounds of chart area.*/ + chartAreaBoundsCalculate? (e: ChartAreaBoundsCalculateEventArgs): void; + + /**Fires after chart is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when chart is destroyed completely.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires before rendering the data labels. This event is triggered for each data label in the series. You can use this event to add custom text in data labels.*/ + displayTextRendering? (e: DisplayTextRenderingEventArgs): void; + + /**Fires during the calculation of legend bounds. You can use this event to customize the bounds of legend.*/ + legendBoundsCalculate? (e: LegendBoundsCalculateEventArgs): void; + + /**Fires on clicking the legend item.*/ + legendItemClick? (e: LegendItemClickEventArgs): void; + + /**Fires when moving mouse over legend item. You can use this event for hit testing on legend items.*/ + legendItemMouseMove? (e: LegendItemMouseMoveEventArgs): void; + + /**Fires before rendering the legend item. This event is fired for each legend item in Chart. You can use this event to customize legend item shape or add custom text to legend item.*/ + legendItemRendering? (e: LegendItemRenderingEventArgs): void; + + /**Fires before loading the chart.*/ + load? (e: LoadEventArgs): void; + + /**Fires on clicking a point in chart. You can use this event to handle clicks made on points.*/ + pointRegionClick? (e: PointRegionClickEventArgs): void; + + /**Fires when mouse is moved over a point.*/ + pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + + /**Fires before rendering chart.*/ + preRender? (e: PreRenderEventArgs): void; + + /**Fires after selecting a series. This event is triggered after selecting a series only if selection mode is series.*/ + seriesRegionClick? (e: SeriesRegionClickEventArgs): void; + + /**Fires before rendering a series. This event is fired for each series in Chart.*/ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /**Fires before rendering the marker symbols. This event is triggered for each marker in Chart.*/ + symbolRendering? (e: SymbolRenderingEventArgs): void; + + /**Fires before rendering the Chart title. You can use this event to add custom text in Chart title.*/ + titleRendering? (e: TitleRenderingEventArgs): void; + + /**Fires before rendering the tooltip. This event is fired when tooltip is enabled and mouse is hovered on a Chart point. You can use this event to customize tooltip before rendering.*/ + toolTipInitialize? (e: ToolTipInitializeEventArgs): void; + + /**Fires before rendering crosshair tooltip in axis. This event is fired for each axis with crosshair label enabled. You can use this event to customize crosshair label before rendering*/ + trackAxisToolTip? (e: TrackAxisToolTipEventArgs): void; + + /**Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. You can use this event to customize the text displayed in trackball tooltip.*/ + trackToolTip? (e: TrackToolTipEventArgs): void; + + /**Fires, on clicking the axis label.*/ + axisLabelClick? (e: AxisLabelClickEventArgs): void; + + /**Fires on moving mouse over the axis label.*/ + axisLabelMouseMove? (e: AxisLabelMouseMoveEventArgs): void; + + /**Fires, on the clicking the chart.*/ + chartClick? (e: ChartClickEventArgs): void; + + /**Fires on moving mouse over the chart.*/ + chartMouseMove? (e: ChartMouseMoveEventArgs): void; + + /**Fires, on double clicking the chart.*/ + chartDoubleClick? (e: ChartDoubleClickEventArgs): void; + + /**Fires on clicking the annotation.*/ + annotationClick? (e: AnnotationClickEventArgs): void; + + /**Fires, after the chart is resized.*/ + afterResize? (e: AfterResizeEventArgs): void; + + /**Fires, when chart size is changing.*/ + beforeResize? (e: BeforeResizeEventArgs): void; + + /**Fires, when error bar is rendering.*/ + errorBarRendering? (e: ErrorBarRenderingEventArgs): void; +} + +export interface AnimationCompleteEventArgs { + + /**Instance of the series that completed has animation. + */ + series?: any; + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesLabelRenderingEventArgs { + + /**Instance of the corresponding axis. + */ + Axis?: any; + + /**Formatted text of the respective label. You can also add custom text to the label. + */ + LabelText?: string; + + /**Actual value of the label. + */ + LabelValue?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesLabelsInitializeEventArgs { + + /**Collection of axes in Chart + */ + dataAxes?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesRangeCalculateEventArgs { + + /**Difference between minimum and maximum value of axis range. + */ + delta?: number; + + /**Interval value of axis range. Grid lines, tick lines and axis labels are drawn based on this interval value. + */ + interval?: number; + + /**Maximum value of axis range. + */ + max?: number; + + /**Minimum value of axis range. + */ + min?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesTitleRenderingEventArgs { + + /**Instance of the axis whose title is being rendered + */ + axes?: any; + + /**X-coordinate of title location + */ + locationX?: number; + + /**Y-coordinate of title location + */ + locationY?: number; + + /**Axis title text. You can add custom text to the title. + */ + title?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface ChartAreaBoundsCalculateEventArgs { + + /**Height of the chart area. + */ + areaBoundsHeight?: number; + + /**Width of the chart area. + */ + areaBoundsWidth?: number; + + /**X-coordinate of the chart area. + */ + areaBoundsX?: number; + + /**Y-coordinate of the chart area. + */ + areaBoundsY?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface DisplayTextRenderingEventArgs { + + /**Text displayed in data label. You can add custom text to the data label + */ + text?: string; + + /**X-coordinate of data label location + */ + locationX?: number; + + /**Y-coordinate of data label location + */ + locationY?: number; + + /**Index of the series in series Collection whose data label is being rendered + */ + seriesIndex?: number; + + /**Index of the point in series whose data label is being rendered + */ + pointIndex?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface LegendBoundsCalculateEventArgs { + + /**Height of the legend. + */ + legendBoundsHeight?: number; + + /**Width of the legend. + */ + legendBoundsWidth?: number; + + /**Number of rows to display the legend items + */ + legendBoundsRows?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface LegendItemClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + LegendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + style?: any; + + /**Instance that holds information about legend bounds and legend item bounds. + */ + Bounds?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; + + /**Instance of the series object corresponding to the legend item + */ + series?: any; +} + +export interface LegendItemMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + LegendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + style?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + Bounds?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; + + /**Instance of the series object corresponding to the legend item + */ + series?: any; +} + +export interface LegendItemRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + legendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc. + */ + style?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; +} + +export interface LoadEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface PointRegionClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of point in pixel + */ + locationX?: number; + + /**Y-coordinate of point in pixel + */ + locationY?: number; + + /**Index of the point in series + */ + pointIndex?: number; + + /**Index of the series in series collection to which the point belongs + */ + seriesIndex?: number; +} + +export interface PointRegionMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of point in pixel + */ + locationX?: number; + + /**Y-coordinate of point in pixel + */ + locationY?: number; + + /**Index of the point in series + */ + pointIndex?: number; + + /**Index of the series in series collection to which the point belongs + */ + seriesIndex?: number; +} + +export interface PreRenderEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface SeriesRegionClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance of the selected series + */ + series?: any; + + /**Index of the selected series + */ + seriesIndex?: number; +} + +export interface SeriesRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance of the series which is about to get rendered + */ + series?: any; +} + +export interface SymbolRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance that holds the location of marker symbol + */ + location?: any; + + /**Options to customize the marker style such as color, border and size + */ + style?: any; +} + +export interface TitleRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Option to customize the title location in pixels + */ + location?: any; + + /**Read-only option to find the size of the title + */ + size?: any; + + /**Use this option to add custom text in title + */ + title?: string; +} + +export interface ToolTipInitializeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Text to be displayed in tooltip. Set this option to customize the text displayed in tooltip + */ + currentText?: string; + + /**Index of the point on which mouse is hovered + */ + pointIndex?: number; + + /**Index of the series in series collection whose point is hovered by mouse + */ + seriesIndex?: number; +} + +export interface TrackAxisToolTipEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Location of the crosshair label in pixels + */ + location?: any; + + /**Index of the axis for which crosshair label is displayed + */ + axisIndex?: number; + + /**Instance of the chart axis object for which cross hair label is displayed + */ + crossAxis?: number; + + /**Text to be displayed in crosshair label. Use this option to add custom text in crosshair label + */ + currentTrackText?: string; +} + +export interface TrackToolTipEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Location of the trackball tooltip in pixels + */ + location?: any; + + /**Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; + + /**Index of the series in series collection + */ + seriesIndex?: number; + + /**Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; + + /**Instance of the series object for which trackball tooltip is displayed. + */ + series?: any; +} + +export interface AxisLabelClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the labels in chart area. + */ + location?: any; + + /**Index of the label. + */ + index?: number; + + /**Instance of the corresponding axis. + */ + axis?: any; + + /**Label that is clicked. + */ + text?: string; +} + +export interface AxisLabelMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the labels in chart area. + */ + location?: any; + + /**Index of the label. + */ + index?: number; + + /**Instance of the corresponding axis. + */ + axis?: any; + + /**Label that is hovered. + */ + text?: string; +} + +export interface ChartClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface ChartMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface ChartDoubleClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface AnnotationClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the annotation in chart area. + */ + location?: any; + + /**Information about the annotation, like Coordinate unit, Region, content + */ + contentData?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface AfterResizeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Chart width, after resize + */ + width?: number; + + /**Chart height, after resize + */ + height?: number; + + /**Chart width, before resize + */ + prevWidth?: number; + + /**Chart height, before resize + */ + prevHeight?: number; + + /**Chart width, when the chart was first rendered + */ + originalWidth?: number; + + /**Chart height, when the chart was first rendered + */ + originalHeight?: number; +} + +export interface BeforeResizeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Chart width, before resize + */ + currentWidth?: number; + + /**Chart height, before resize + */ + currentHeight?: number; + + /**Chart width, after resize + */ + newWidth?: number; + + /**Chart height, after resize + */ + newHeight?: number; +} + +export interface ErrorBarRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Error bar Object + */ + errorbar?: any; +} + +export interface AnnotationsMargin { + + /**Annotation is placed at the specified value above its original position. + * @Default {0} + */ + bottom?: number; + + /**Annotation is placed at the specified value from left side of its original position. + * @Default {0} + */ + left?: number; + + /**Annotation is placed at the specified value from the right side of its original position. + * @Default {0} + */ + right?: number; + + /**Annotation is placed at the specified value under its original position. + * @Default {0} + */ + top?: number; +} + +export interface Annotations { + + /**Angle to rotate the annotation in degrees. + * @Default {'0'} + */ + angle?: number; + + /**Text content or id of a HTML element to be displayed as annotation. + */ + content?: string; + + /**Specifies how annotations have to be placed in Chart. + * @Default {none. See CoordinateUnit} + */ + coordinateUnit?: ej.datavisualization.Chart.CoordinateUnit|string; + + /**Specifies the horizontal alignment of the annotation. + * @Default {middle. See HorizontalAlignment} + */ + horizontalAlignment?: ej.datavisualization.Chart.HorizontalAlignment|string; + + /**Options to customize the margin of annotation. + */ + margin?: AnnotationsMargin; + + /**Controls the opacity of the annotation. + * @Default {1} + */ + opacity?: number; + + /**Specifies whether annotation has to be placed with respect to chart or series. + * @Default {chart. See Region} + */ + region?: ej.datavisualization.Chart.Region|string; + + /**Specifies the vertical alignment of the annotation. + * @Default {middle. See VerticalAlignment} + */ + verticalAlignment?: ej.datavisualization.Chart.VerticalAlignment|string; + + /**Controls the visibility of the annotation. + * @Default {false} + */ + visible?: boolean; + + /**Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property or primary X axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + x?: number; + + /**Name of the horizontal axis to be used for positioning the annotation. This property is applicable only when coordinateUnit is points. + */ + xAxisName?: string; + + /**Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with yAxisName property or primary Y axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + y?: number; + + /**Name of the vertical axis to be used for positioning the annotation.This property is applicable only when coordinateUnit is points. + */ + yAxisName?: string; +} + +export interface Border { + + /**Border color of the chart. + * @Default {null} + */ + color?: string; + + /**Opacity of the chart border. + * @Default {0.3} + */ + opacity?: number; + + /**Width of the Chart border. + * @Default {0} + */ + width?: number; +} + +export interface ChartAreaBorder { + + /**Border color of the plot area. + * @Default {Gray} + */ + color?: string; + + /**Opacity of the plot area border. + * @Default {0.3} + */ + opacity?: number; + + /**Border width of the plot area. + * @Default {0.5} + */ + width?: number; +} + +export interface ChartArea { + + /**Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /**Options for customizing the border of the plot area. + */ + border?: ChartAreaBorder; +} + +export interface ColumnDefinitions { + + /**Specifies the unit to measure the width of the column in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /**Width of the column in plotting area. Width is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + columnWidth?: number; + + /**Color of the line that indicates the starting point of the column in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /**Width of the line that indicates the starting point of the column in plot area. + * @Default {1} + */ + lineWidth?: number; +} + +export interface CommonSeriesOptionsBorder { + + /**Border color of all series. + * @Default {transparent} + */ + color?: string; + + /**DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; + + /**Border width of all series. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsFont { + + /**Font color of the text in all series. + * @Default {#707070} + */ + color?: string; + + /**Font Family for all the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the font Style for all the series. + * @Default {normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Specifies the font weight for all the series. + * @Default {regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity for text in all the series. + * @Default {1} + */ + opacity?: number; + + /**Font size for text in all the series. + * @Default {12px} + */ + size?: string; +} + +export interface CommonSeriesOptionsMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface CommonSeriesOptionsMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: CommonSeriesOptionsMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: CommonSeriesOptionsMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: CommonSeriesOptionsMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: CommonSeriesOptionsMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {none. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Name of a field in data source, where datalabel text is displayed. + */ + textMappingName?: string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {center} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: CommonSeriesOptionsMarkerBorder; + + /**Options for displaying and customizing data labels. + */ + dataLabel?: CommonSeriesOptionsMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: CommonSeriesOptionsMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsTooltipBorder { + + /**Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /**Border width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsTooltip { + + /**Options for customizing the border of the tooltip. + */ + border?: CommonSeriesOptionsTooltipBorder; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /**Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the animation of the tooltip when moving from one point to other. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /**Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Opacity of the tooltip. + * @Default {0.5} + */ + opacity?: number; + + /**Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /**Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsEmptyPointSettingsStyleBorder { + + /**Border color of the empty point. + */ + color?: string; + + /**Border width of the empty point. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsEmptyPointSettingsStyle { + + /**Color of the empty point. + */ + color?: string; + + /**Options for customizing border of the empty point in the series. + */ + border?: CommonSeriesOptionsEmptyPointSettingsStyleBorder; +} + +export interface CommonSeriesOptionsEmptyPointSettings { + + /**Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /**Options for customizing the color and border of the empty point in the series. + */ + style?: CommonSeriesOptionsEmptyPointSettingsStyle; +} + +export interface CommonSeriesOptionsConnectorLine { + + /**Width of the connector line. + * @Default {1} + */ + width?: number; + + /**Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /**DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /**DashArray of the connector line. + * @Default {1} + */ + opacity?: number; +} + +export interface CommonSeriesOptionsErrorBarCap { + + /**Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /**Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /**Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /**Color of the error bar cap. + * @Default {“#000000”} + */ + fill?: string; +} + +export interface CommonSeriesOptionsErrorBar { + + /**Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /**Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /**Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /**Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /**Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /**Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /**Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /**Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /**Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /**Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /**Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /**Width of the error bar. + * @Default {1} + */ + width?: number; + + /**Options for customizing the error bar cap. + */ + cap?: CommonSeriesOptionsErrorBarCap; +} + +export interface CommonSeriesOptionsTrendlines { + + /**Show/hides the trendline. + */ + visibility?: boolean; + + /**Specifies the type of the trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /**Name for the trendlines that is to be displayed in the legend text. + * @Default {trendline} + */ + name?: string; + + /**Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /**Width of the trendlines. + * @Default {1} + */ + width?: number; + + /**Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /**Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /**Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /**Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /**Specifies the order of the polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /**Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; +} + +export interface CommonSeriesOptionsHighlightSettingsBorder { + + /**Border color of the series/point on highlight. + */ + color?: string; + + /**Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; +} + +export interface CommonSeriesOptionsHighlightSettings { + + /**Enables/disables the ability to highlight the series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether the series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on highlight. + */ + color?: string; + + /**Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on highlight. + */ + border?: CommonSeriesOptionsHighlightSettingsBorder; + + /**Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on highlight. + */ + customPattern?: string; +} + +export interface CommonSeriesOptionsSelectionSettingsBorder { + + /**Border color of the series/point on selection. + */ + color?: string; + + /**Border width of the series/point on selection. + * @Default {2} + */ + width?: string; +} + +export interface CommonSeriesOptionsSelectionSettings { + + /**Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /**Specifies whether the series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on selection. + */ + color?: string; + + /**Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of the series on selection. + */ + border?: CommonSeriesOptionsSelectionSettingsBorder; + + /**Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on selection. + */ + customPattern?: string; +} + +export interface CommonSeriesOptions { + + /**Options to customize the border of all the series. + */ + border?: CommonSeriesOptionsBorder; + + /**Pattern of dashes and gaps used to stroke all the line type series. + */ + dashArray?: string; + + /**Set the dataSource for all series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Controls the size of the hole in doughnut series. Value ranges from 0 to 1 + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /**Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /**Specifies the type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: ej.datavisualization.Chart.DrawType|string; + + /**Enable/disable the animation for all the series. + * @Default {true} + */ + enableAnimation?: boolean; + + /**To avoid overlapping of data labels smartly. + * @Default {true} + */ + enableSmartLabels?: boolean; + + /**Start angle of pie/doughnut series. + * @Default {null} + */ + endAngle?: number; + + /**Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /**Explodes all the slice of pie/doughnut on render. + * @Default {false} + */ + explodeAll?: boolean; + + /**Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /**Specifies the distance of the slice from the center, when it is exploded. + * @Default {0.4} + */ + explodeOffset?: number; + + /**Fill color for all the series. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the font of all the series. + */ + font?: CommonSeriesOptionsFont; + + /**Sets the height of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /**Sets the width of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /**Gap between the slices in pyramid and funnel series. + * @Default {0} + */ + gapRatio?: number; + + /**Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /**Specifies whether to stack the column series in polar/radar charts. + * @Default {false} + */ + isStacking?: boolean; + + /**Renders the chart vertically. This is applicable only for cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /**Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Specifies the line cap of the series. + * @Default {butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /**Specifies the type of shape to be used where two lines meet. + * @Default {round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /**Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: CommonSeriesOptionsMarker; + + /**Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /**Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /**Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /**Specifies the mode of the pyramid series. + * @Default {linear. See PyramidMode} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /**Start angle from where the pie/doughnut series renders. By default it starts from 0. + * @Default {null} + */ + startAngle?: number; + + /**Options for customizing the tooltip of chart. + */ + tooltip?: CommonSeriesOptionsTooltip; + + /**Specifies the type of the series to render in chart. + * @Default {column. See Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /**Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /**Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /**Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /**Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /**Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /**Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /**Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /**Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /**Options for customizing the empty point in the series. + */ + emptyPointSettings?: CommonSeriesOptionsEmptyPointSettings; + + /**Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /**Options for customizing the waterfall connector line. + */ + connectorLine?: CommonSeriesOptionsConnectorLine; + + /**Options to customize the error bar in series. + */ + errorBar?: CommonSeriesOptionsErrorBar; + + /**Option to add the trendlines to chart. + */ + trendlines?: Array; + + /**Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: CommonSeriesOptionsHighlightSettings; + + /**Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: CommonSeriesOptionsSelectionSettings; +} + +export interface CrosshairMarkerBorder { + + /**Border width of the marker. + * @Default {3} + */ + width?: number; +} + +export interface CrosshairMarkerSize { + + /**Height of the marker. + * @Default {10} + */ + height?: number; + + /**Width of the marker. + * @Default {10} + */ + width?: number; +} + +export interface CrosshairMarker { + + /**Options for customizing the border. + */ + border?: CrosshairMarkerBorder; + + /**Opacity of the marker. + * @Default {true} + */ + opacity?: boolean; + + /**Options for customizing the size of the marker. + */ + size?: CrosshairMarkerSize; + + /**Show/hides the marker. + * @Default {true} + */ + visible?: boolean; +} + +export interface Crosshair { + + /**Options for customizing the marker in crosshair. + */ + marker?: CrosshairMarker; + + /**Specifies the type of the crosshair. It can be trackball or crosshair + * @Default {crosshair. See CrosshairType} + */ + type?: ej.datavisualization.Chart.CrosshairType|string; + + /**Show/hides the crosshair/trackball visibility. + * @Default {false} + */ + visible?: boolean; +} + +export interface IndicatorsHistogramBorder { + + /**Color of the histogram border in MACD indicator. + * @Default {#9999ff} + */ + color?: string; + + /**Controls the width of histogram border line in MACD indicator. + * @Default {1} + */ + width?: number; +} + +export interface IndicatorsHistogram { + + /**Options to customize the histogram border in MACD indicator. + */ + border?: IndicatorsHistogramBorder; + + /**Color of histogram columns in MACD indicator. + * @Default {#ccccff} + */ + fill?: string; + + /**Opacity of histogram columns in MACD indicator. + * @Default {1} + */ + opacity?: number; +} + +export interface IndicatorsLowerLine { + + /**Color of lower line. + * @Default {#008000} + */ + fill?: string; + + /**Width of the lower line. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsMacdLine { + + /**Color of MACD line. + * @Default {#ff9933} + */ + fill?: string; + + /**Width of the MACD line. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsPeriodLine { + + /**Color of period line in indicator. + * @Default {blue} + */ + fill?: string; + + /**Width of the period line in indicators. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsTooltipBorder { + + /**Border color of indicator tooltip. + * @Default {null} + */ + color?: string; + + /**Border width of indicator tooltip. + * @Default {1} + */ + width?: number; +} + +export interface IndicatorsTooltip { + + /**Option to customize the border of indicator tooltip. + */ + border?: IndicatorsTooltipBorder; + + /**Specifies the animation duration of indicator tooltip. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the tooltip animation. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Background color of indicator tooltip. + * @Default {null} + */ + fill?: string; + + /**Opacity of indicator tooltip. + * @Default {0.95} + */ + opacity?: number; + + /**Controls the visibility of indicator tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface IndicatorsUpperLine { + + /**Fill color of the upper line in indicators + * @Default {#ff9933} + */ + fill?: string; + + /**Width of the upper line in indicators. + * @Default {2} + */ + width?: number; +} + +export interface Indicators { + + /**The dPeriod value for stochastic indicator. + * @Default {3} + */ + dPeriod?: number; + + /**Enables/disables the animation. + * @Default {false} + */ + enableAnimation?: boolean; + + /**Color of the technical indicator. + * @Default {#00008B} + */ + fill?: string; + + /**Options to customize the histogram in MACD indicator. + */ + histogram?: IndicatorsHistogram; + + /**Specifies the k period in stochastic indicator. + * @Default {3} + */ + kPeriod?: number; + + /**Specifies the long period in MACD indicator. + * @Default {26} + */ + longPeriod?: number; + + /**Options to customize the lower line in indicators. + */ + lowerLine?: IndicatorsLowerLine; + + /**Options to customize the MACD line. + */ + macdLine?: IndicatorsMacdLine; + + /**Specifies the type of the MACD indicator. + * @Default {line. See MACDType} + */ + macdType?: string; + + /**Specifies period value in indicator. + * @Default {14} + */ + period?: number; + + /**Options to customize the period line in indicators. + */ + periodLine?: IndicatorsPeriodLine; + + /**Name of the series for which indicator has to be drawn. + */ + seriesName?: string; + + /**Specifies the short period in MACD indicator. + * @Default {13} + */ + shortPeriod?: number; + + /**Specifies the standard deviation value for Bollinger band indicator. + * @Default {2} + */ + standardDeviations?: number; + + /**Options to customize the tooltip. + */ + tooltip?: IndicatorsTooltip; + + /**Trigger value of MACD indicator. + * @Default {9} + */ + trigger?: number; + + /**Specifies the visibility of indicator. + * @Default {visible} + */ + visibility?: string; + + /**Specifies the type of indicator that has to be rendered. + * @Default {sma. See IndicatorsType} + */ + type?: string; + + /**Options to customize the upper line in indicators + */ + upperLine?: IndicatorsUpperLine; + + /**Width of the indicator line. + * @Default {2} + */ + width?: number; + + /**Name of the horizontal axis used for indicator. Primary X axis is used when x axis name is not specified. + */ + xAxisName?: string; + + /**Name of the vertical axis used for indicator. Primary Y axis is used when y axis name is not specified + */ + yAxisName?: string; +} + +export interface LegendBorder { + + /**Border color of the legend. + * @Default {transparent} + */ + color?: string; + + /**Border width of the legend. + * @Default {1} + */ + width?: number; +} + +export interface LegendFont { + + /**Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Font size for legend item text. + * @Default {12px} + */ + size?: string; +} + +export interface LegendItemStyleBorder { + + /**Border color of the legend items. + * @Default {transparent} + */ + color?: string; + + /**Border width of the legend items. + * @Default {1} + */ + width?: number; +} + +export interface LegendItemStyle { + + /**Options for customizing the border of legend items. + */ + border?: LegendItemStyleBorder; + + /**Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /**Width of the shape in legend items. + * @Default {10} + */ + width?: number; +} + +export interface LegendLocation { + + /**X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /**Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; +} + +export interface LegendSize { + + /**Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /**Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; +} + +export interface LegendTitleFont { + + /**Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Font size for legend title. + * @Default {12px} + */ + size?: string; +} + +export interface LegendTitle { + + /**Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /**Text to be displayed in legend title. + */ + text?: string; + + /**Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Legend { + + /**Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.Alignment|string; + + /**Background for the legend. Use this property to add a background image or background color for the legend. + */ + background?: string; + + /**Options for customizing the legend border. + */ + border?: LegendBorder; + + /**Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /**Controls whether legend has to use scrollbar or not. When enabled, scroll bar appears depending upon size and position properties of legend. + * @Default {true} + */ + enableScrollbar?: boolean; + + /**Fill color for the legend items. By using this property, it displays all legend item shapes in same color.Legend items representing invisible series is displayed in gray color. + * @Default {null} + */ + fill?: string; + + /**Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /**Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /**Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /**Options to customize the location of chart legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /**Opacity of the legend. + * @Default {1} + */ + opacity?: number; + + /**Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Chart.Position|string; + + /**Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /**Shape of the legend items. Default shape for pie and doughnut series is circle and all other series uses rectangle. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options to customize the size of the legend. + */ + size?: LegendSize; + + /**Options to customize the legend title. + */ + title?: LegendTitle; + + /**Specifies the action taken when the legend width is more than the textWidth. + * @Default {none. See textOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /**Text width for legend item. + * @Default {34} + */ + textWidth?: number; + + /**Controls the visibility of the legend. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryXAxisAlternateGridBandEven { + + /**Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryXAxisAlternateGridBandOdd { + + /**Fill color of the odd grid bands + * @Default {transparent} + */ + fill?: string; + + /**Opacity of odd grid band + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryXAxisAlternateGridBand { + + /**Options for customizing even grid band. + */ + even?: PrimaryXAxisAlternateGridBandEven; + + /**Options for customizing odd grid band. + */ + odd?: PrimaryXAxisAlternateGridBandOdd; +} + +export interface PrimaryXAxisAxisLine { + + /**Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /**Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /**Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /**Width of axis line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisCrosshairLabel { + + /**Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; +} + +export interface PrimaryXAxisFont { + + /**Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis labels. + * @Default {13px} + */ + size?: string; +} + +export interface PrimaryXAxisMajorGridLines { + + /**Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /**Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major grid lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMajorTickLines { + + /**Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major tick lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMinorGridLines { + + /**Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minorGridLines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMinorTickLines { + + /**Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minor tick line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisRange { + + /**Minimum value of the axis range. + * @Default {null} + */ + minimum?: number; + + /**Maximum value of the axis range. + * @Default {null} + */ + maximum?: number; + + /**Interval of the axis range. + * @Default {null} + */ + interval?: number; +} + +export interface PrimaryXAxisStripLineFont { + + /**Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /**Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /**Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the strip line text. + * @Default {12px} + */ + size?: string; +} + +export interface PrimaryXAxisStripLine { + + /**Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /**Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /**End value of the strip line. + * @Default {null} + */ + end?: number; + + /**Options for customizing the font of the text. + */ + font?: PrimaryXAxisStripLineFont; + + /**Start value of the strip line. + * @Default {null} + */ + start?: number; + + /**Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /**Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /**Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /**Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /**Width of the strip line. + * @Default {0} + */ + width?: number; + + /**Specifies the order where the strip line and the series have to be rendered. When zOrder is “behind”, strip line is rendered under the series and when it is “over”, it is rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; +} + +export interface PrimaryXAxisTitleFont { + + /**Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis title. + * @Default {16px} + */ + size?: string; +} + +export interface PrimaryXAxisTitle { + + /**Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the title font. + */ + font?: PrimaryXAxisTitleFont; + + /**Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {34} + */ + maximumTitleWidth?: number; + + /**Title for the axis. + */ + text?: string; + + /**Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryXAxis { + + /**Options for customizing horizontal axis alternate grid band. + */ + alternateGridBand?: PrimaryXAxisAlternateGridBand; + + /**Options for customizing the axis line. + */ + axisLine?: PrimaryXAxisAxisLine; + + /**Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. + * @Default {null} + */ + columnIndex?: number; + + /**Specifies the number of columns or plot areas an axis has to span horizontally. + * @Default {null} + */ + columnSpan?: number; + + /**Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryXAxisCrosshairLabel; + + /**With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /**Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /**Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the font of the axis Labels. + */ + font?: PrimaryXAxisFont; + + /**Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /**Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /**Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /**Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /**Specifies the position of the axis labels. + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Angle in degrees to rotate the axis labels. + * @Default {null} + */ + labelRotation?: number; + + /**Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /**Options for customizing major gird lines. + */ + majorGridLines?: PrimaryXAxisMajorGridLines; + + /**Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryXAxisMajorTickLines; + + /**Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /**Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {34} + */ + maximumLabelWidth?: number; + + /**Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryXAxisMinorGridLines; + + /**Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryXAxisMinorTickLines; + + /**Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /**Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /**Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /**Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /**Options to customize the range of the axis. + */ + range?: PrimaryXAxisRange; + + /**Specifies the padding for the axis range. + * @Default {None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /**Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /**Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: Array; + + /**Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /**Options for customizing the axis title. + */ + title?: PrimaryXAxisTitle; + + /**Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /**Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /**The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /**Position of the zoomed axis. Value ranges from 0 to 1. + * @Default {0} + */ + zoomPosition?: number; +} + +export interface PrimaryYAxisAlternateGridBandEven { + + /**Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryYAxisAlternateGridBandOdd { + + /**Fill color of the odd grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of odd grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryYAxisAlternateGridBand { + + /**Options for customizing even grid band. + */ + even?: PrimaryYAxisAlternateGridBandEven; + + /**Options for customizing odd grid band. + */ + odd?: PrimaryYAxisAlternateGridBandOdd; +} + +export interface PrimaryYAxisAxisLine { + + /**Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /**Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /**Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /**Width of axis line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisCrosshairLabel { + + /**Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; +} + +export interface PrimaryYAxisFont { + + /**Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis labels. + * @Default {13px} + */ + size?: string; +} + +export interface PrimaryYAxisMajorGridLines { + + /**Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /**Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major grid lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMajorTickLines { + + /**Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major tick lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMinorGridLines { + + /**Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minorGridLines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMinorTickLines { + + /**Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minor tick line + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisStripLineFont { + + /**Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /**Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /**Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the strip line text. + * @Default {12px} + */ + size?: string; +} + +export interface PrimaryYAxisStripLine { + + /**Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /**Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /**End value of the strip line. + * @Default {null} + */ + end?: number; + + /**Options for customizing the font of the text. + */ + font?: PrimaryYAxisStripLineFont; + + /**Start value of the strip line. + * @Default {null} + */ + start?: number; + + /**Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /**Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /**Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /**Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /**Width of the strip line. + * @Default {0} + */ + width?: number; + + /**Specifies the order in which strip line and the series have to be rendered. When zOrder is “behind”, strip line is rendered below the series and when it is “over”, it is rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; +} + +export interface PrimaryYAxisTitleFont { + + /**Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis title. + * @Default {16px} + */ + size?: string; +} + +export interface PrimaryYAxisTitle { + + /**Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {ej.datavisualization.Chart.enableTrim} + */ + enableTrim?: boolean; + + /**Options for customizing the title font. + */ + font?: PrimaryYAxisTitleFont; + + /**Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {ej.datavisualization.Chart.maximumTitleWidth.null} + */ + maximumTitleWidth?: number; + + /**Title for the axis. + */ + text?: string; + + /**Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryYAxis { + + /**Options for customizing vertical axis alternate grid band. + */ + alternateGridBand?: PrimaryYAxisAlternateGridBand; + + /**Options for customizing the axis line. + */ + axisLine?: PrimaryYAxisAxisLine; + + /**Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryYAxisCrosshairLabel; + + /**With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /**Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /**Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the font of the axis Labels. + */ + font?: PrimaryYAxisFont; + + /**Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /**Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /**Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /**Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /**Default Value + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /**Options for customizing major gird lines. + */ + majorGridLines?: PrimaryYAxisMajorGridLines; + + /**Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryYAxisMajorTickLines; + + /**Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /**Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {ej.datavisualization.Chart.maximumLabelWidth type {int}} + */ + maximumLabelWidth?: number; + + /**Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryYAxisMinorGridLines; + + /**Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryYAxisMinorTickLines; + + /**Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /**Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /**Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /**Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /**Specifies the padding for the axis range. + * @Default {ej.datavisualization.Chart.RangePadding.None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /**Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /**Specifies the index of the row to which the axis is associated, when the chart area is divided into multiple plot areas by using rowDefinitions. + * @Default {null} + */ + rowIndex?: number; + + /**Specifies the number of row or plot areas an axis has to span vertically. + * @Default {null} + */ + rowSpan?: number; + + /**Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: Array; + + /**Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /**Options for customizing the axis title. + */ + title?: PrimaryYAxisTitle; + + /**Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /**Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /**The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Values ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /**Position of the zoomed axis. Value ranges from 0 to 1 + * @Default {0} + */ + zoomPosition?: number; +} + +export interface RowDefinitions { + + /**Specifies the unit to measure the height of the row in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /**Height of the row in plotting area. Height is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + rowHeight?: number; + + /**Color of the line that indicates the starting point of the row in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /**Width of the line that indicates the starting point of the row in plot area. + * @Default {1} + */ + lineWidth?: number; +} + +export interface SeriesBorder { + + /**Border color of the series. + * @Default {transparent} + */ + color?: string; + + /**Border width of the series. + * @Default {1} + */ + width?: number; + + /**DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; +} + +export interface SeriesFont { + + /**Font color of the series text. + * @Default {#707070} + */ + color?: string; + + /**Font Family of the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font Style of the series. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the series. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of series text. + * @Default {1} + */ + opacity?: number; + + /**Size of the series text. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface SeriesMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: SeriesMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: SeriesMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Name of a field in data source where datalabel text is displayed. + */ + textMappingName?: string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /**Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /**Moves the label vertically by some offset. + * @Default {0} + */ + offset?: number; +} + +export interface SeriesMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface SeriesMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: SeriesMarkerBorder; + + /**Options for displaying and customizing data labels. + */ + dataLabel?: SeriesMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: SeriesMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesEmptyPointSettingsStyleBorder { + + /**Border color of the empty point. + */ + color?: string; + + /**Border width of the empty point. + * @Default {1} + */ + width?: number; +} + +export interface SeriesEmptyPointSettingsStyle { + + /**Color of the empty point. + */ + color?: string; + + /**Options for customizing border of the empty point in the series. + */ + border?: SeriesEmptyPointSettingsStyleBorder; +} + +export interface SeriesEmptyPointSettings { + + /**Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /**Options for customizing the color and border of the empty point in the series. + */ + style?: SeriesEmptyPointSettingsStyle; +} + +export interface SeriesConnectorLine { + + /**Width of the connector line. + * @Default {1} + */ + width?: number; + + /**Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /**DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /**DashArray of the connector line. + * @Default {1} + */ + opacity?: number; +} + +export interface SeriesErrorBarCap { + + /**Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /**Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /**Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /**Color of the error bar cap. + * @Default {#000000} + */ + fill?: string; +} + +export interface SeriesErrorBar { + + /**Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /**Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /**Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /**Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /**Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /**Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /**Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /**Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /**Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /**Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /**Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /**Width of the error bar. + * @Default {1} + */ + width?: number; + + /**Options for customizing the error bar cap. + */ + cap?: SeriesErrorBarCap; +} + +export interface SeriesPointsBorder { + + /**Border color of the point. + * @Default {null} + */ + color?: string; + + /**Border width of the point. + * @Default {null} + */ + width?: number; +} + +export interface SeriesPointsMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesPointsMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface SeriesPointsMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: SeriesPointsMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesPointsMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: SeriesPointsMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesPointsMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /**Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /**Moves the label vertically by specified offset. + * @Default {0} + */ + offset?: number; +} + +export interface SeriesPointsMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface SeriesPointsMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: SeriesPointsMarkerBorder; + + /**Options for displaying and customizing data label. + */ + dataLabel?: SeriesPointsMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: SeriesPointsMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesPoints { + + /**Options for customizing the border of a point. This is applicable only for column type series and accumulation type series. + */ + border?: SeriesPointsBorder; + + /**To show/hide the intermediate summary from the last intermediate point. + * @Default {false} + */ + showIntermediateSum?: boolean; + + /**To show/hide the total summary of the waterfall series. + * @Default {false} + */ + showTotalSum?: boolean; + + /**Close value of the point. Close value is applicable only for financial type series. + * @Default {null} + */ + close?: number; + + /**Size of a bubble in the bubble series. This is applicable only for the bubble series. + * @Default {null} + */ + size?: number; + + /**Background color of the point. This is applicable only for column type series and accumulation type series. + * @Default {null} + */ + fill?: string; + + /**High value of the point. High value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + high?: number; + + /**Low value of the point. Low value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + low?: number; + + /**Options for displaying and customizing marker for a data point. Marker contains shapes and/or data labels. + */ + marker?: SeriesPointsMarker; + + /**Open value of the point. This is applicable only for financial type series. + * @Default {null} + */ + open?: number; + + /**Datalabel text for the point. + * @Default {null} + */ + text?: string; + + /**X value of the point. + * @Default {null} + */ + x?: number; + + /**Y value of the point. + * @Default {null} + */ + y?: number; +} + +export interface SeriesTooltipBorder { + + /**Border Color of the tooltip. + * @Default {null} + */ + color?: string; + + /**Border Width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface SeriesTooltip { + + /**Options for customizing the border of the tooltip. + */ + border?: SeriesTooltipBorder; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /**Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the animation of the tooltip when moving from one point to another. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /**Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Opacity of the tooltip. + * @Default {0.95} + */ + opacity?: number; + + /**Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /**Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesTrendlines { + + /**Show/hides the trendline. + */ + visibility?: boolean; + + /**Specifies the type of trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /**Name for the trendlines that is to be displayed in legend text. + * @Default {Trendline} + */ + name?: string; + + /**Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /**Width of the trendlines. + * @Default {1} + */ + width?: number; + + /**Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /**Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /**Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /**Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /**Specifies the order of polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /**Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; +} + +export interface SeriesHighlightSettingsBorder { + + /**Border color of the series/point on highlight. + */ + color?: string; + + /**Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; +} + +export interface SeriesHighlightSettings { + + /**Enables/disables the ability to highlight series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on highlight. + */ + color?: string; + + /**Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on highlight. + */ + border?: SeriesHighlightSettingsBorder; + + /**Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on highlight. + */ + customPattern?: string; +} + +export interface SeriesSelectionSettingsBorder { + + /**Border color of the series/point on selection. + */ + color?: string; + + /**Border width of the series/point on selection. + * @Default {2} + */ + width?: string; +} + +export interface SeriesSelectionSettings { + + /**Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /**Color of the series/point on selection. + */ + color?: string; + + /**Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on selection. + */ + border?: SeriesSelectionSettingsBorder; + + /**Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on selection. + */ + customPattern?: string; +} + +export interface Series { + + /**Color of the point, where the close is up in financial chart. + * @Default {null} + */ + bearFillColor?: string; + + /**Options for customizing the border of the series. + */ + border?: SeriesBorder; + + /**Color of the point, where the close is down in financial chart. + * @Default {null} + */ + bullFillColor?: string; + + /**Pattern of dashes and gaps used to stroke the line type series. + */ + dashArray?: string; + + /**Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Controls the size of the hole in doughnut series. Value ranges from 0 to 1. + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /**Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /**Type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: boolean; + + /**Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /**To avoid overlapping of data labels smartly. + * @Default {null} + */ + enableSmartLabels?: number; + + /**End angle of pie/doughnut series. For a complete circle, it has to be 360, by default. + * @Default {null} + */ + endAngle?: number; + + /**Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /**Explodes all the slice of pie/doughnut on render. + * @Default {null} + */ + explodeAll?: boolean; + + /**Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /**Specifies the distance of the slice from the center, when it is exploded. + * @Default {25} + */ + explodeOffset?: number; + + /**Fill color of the series. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the series font. + */ + font?: SeriesFont; + + /**Specifies the height of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /**Specifies the width of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /**Gap between the slices of pyramid/funnel series. + * @Default {0} + */ + gapRatio?: number; + + /**Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /**Specifies whether to stack the column series in polar/radar charts. + * @Default {true} + */ + isStacking?: boolean; + + /**Renders the chart vertically. This is applicable only for cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /**Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Specifies the line cap of the series. + * @Default {Butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /**Specifies the type of shape to be used where two lines meet. + * @Default {Round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /**Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: SeriesMarker; + + /**Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /**Name of a field in data source where fill color for all the data points is generated. + */ + palette?: string; + + /**Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /**Options for customizing the empty point in the series. + */ + emptyPointSettings?: SeriesEmptyPointSettings; + + /**Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /**Options for customizing the waterfall connector line. + */ + connectorLine?: SeriesConnectorLine; + + /**Options to customize the error bar in series. + */ + errorBar?: SeriesErrorBar; + + /**Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. + */ + points?: Array; + + /**Specifies the mode of the pyramid series. + * @Default {linear} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /**Specifies ej.Query to select data from dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /**Start angle from where the pie/doughnut series renders. It starts from 0, by default. + * @Default {null} + */ + startAngle?: number; + + /**Options for customizing the tooltip of chart. + */ + tooltip?: SeriesTooltip; + + /**Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Controls the visibility of the series. + * @Default {visible} + */ + visibility?: string; + + /**Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /**Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /**Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /**Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /**Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /**Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /**Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /**Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /**Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /**Option to add trendlines to chart. + */ + trendlines?: Array; + + /**Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: SeriesHighlightSettings; + + /**Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: SeriesSelectionSettings; +} + +export interface Size { + + /**Height of the Chart. Height can be specified in either pixel or percentage. + * @Default {'450'} + */ + height?: string; + + /**Width of the Chart. Width can be specified in either pixel or percentage. + * @Default {'450'} + */ + width?: string; +} + +export interface TitleBorder { + + /**Width of the title border. + * @Default {1} + */ + width?: number; + + /**color of the title border. + * @Default {transparent} + */ + color?: string; + + /**opacity of the title border. + * @Default {0.8} + */ + opacity?: number; + + /**opacity of the title border. + * @Default {0.8} + */ + cornerRadius?: number; +} + +export interface TitleFont { + + /**Font family for Chart title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for Chart title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for Chart title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the Chart title. + * @Default {0.5} + */ + opacity?: number; + + /**Font size for Chart title. + * @Default {20px} + */ + size?: string; +} + +export interface TitleSubTitleFont { + + /**Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /**Font size for sub title. + * @Default {12px} + */ + size?: string; +} + +export interface TitleSubTitleBorder { + + /**Width of the subtitle border. + * @Default {1} + */ + width?: number; + + /**color of the subtitle border. + * @Default {transparent} + */ + color?: string; + + /**opacity of the subtitle border. + * @Default {0.8} + */ + opacity?: number; + + /**opacity of the subtitle border. + * @Default {0.8} + */ + cornerRadius?: number; +} + +export interface TitleSubTitle { + + /**Options for customizing the font of sub title. + */ + font?: TitleSubTitleFont; + + /**Background color for the chart subtitle. + * @Default {transparent} + */ + background?: string; + + /**Options to customize the border of the title. + */ + border?: TitleSubTitleBorder; + + /**Text to be displayed in sub title. + */ + text?: string; + + /**Alignment of sub title text. + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Title { + + /**Background color for the chart title. + * @Default {transparent} + */ + background?: string; + + /**Options to customize the border of the title. + */ + border?: TitleBorder; + + /**Options for customizing the font of Chart title. + */ + font?: TitleFont; + + /**Options to customize the sub title of Chart. + */ + subTitle?: TitleSubTitle; + + /**Text to be displayed in Chart title. + */ + text?: string; + + /**Alignment of the title text. + * @Default {Center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Zooming { + + /**Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /**Enable or disables the differed zooming. When it is enabled, chart is updated only on mouse up action while zooming and panning. + * @Default {false} + */ + enableDeferredZoom?: boolean; + + /**Enables/disables the ability to zoom the chart on moving the mouse wheel. + * @Default {false} + */ + enableMouseWheel?: boolean; + + /**Specifies whether to allow zooming the chart vertically or horizontally or in both ways. + * @Default {'x,y'} + */ + type?: string; + + /**To display user specified buttons in zooming toolbar. + * @Default {[zoomIn, zoomOut, zoom, pan, reset]} + */ + toolbarItems?: Array; +} +} +module Chart +{ +enum CoordinateUnit +{ +//string +None, +//string +Pixels, +//string +Points, +} +} +module Chart +{ +enum HorizontalAlignment +{ +//string +Left, +//string +Right, +//string +Middle, +} +} +module Chart +{ +enum Region +{ +//string +Chart, +//string +Series, +} +} +module Chart +{ +enum VerticalAlignment +{ +//string +Top, +//string +Bottom, +//string +Middle, +} +} +module Chart +{ +enum Unit +{ +//string +Percentage, +//string +Pixel, +} +} +module Chart +{ +enum DrawType +{ +//string +Line, +//string +Area, +//string +Column, +} +} +module Chart +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +} +} +module Chart +{ +enum FontWeight +{ +//string +Regular, +//string +Bold, +//string +Lighter, +} +} +module Chart +{ +enum LabelPosition +{ +//string +Inside, +//string +Outside, +//string +OutsideExtended, +} +} +module Chart +{ +enum LineCap +{ +//string +Butt, +//string +Round, +//string +Square, +} +} +module Chart +{ +enum LineJoin +{ +//string +Round, +//string +Bevel, +//string +Miter, +} +} +module Chart +{ +enum ConnectorLineType +{ +//string +Line, +//string +Bezier, +} +} +module Chart +{ +enum HorizontalTextAlignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum Shape +{ +//string +None, +//string +LeftArrow, +//string +RightArrow, +//string +Circle, +//string +Cross, +//string +HorizLine, +//string +VertLine, +//string +Diamond, +//string +Rectangle, +//string +Triangle, +//string +Hexagon, +//string +Pentagon, +//string +Star, +//string +Ellipse, +//string +Trapezoid, +//string +UpArrow, +//string +DownArrow, +//string +Image, +//string +SeriesType, +} +} +module Chart +{ +enum TextPosition +{ +//string +Top, +//string +Bottom, +//string +Middle, +} +} +module Chart +{ +enum VerticalTextAlignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum PyramidMode +{ +//string +Linear, +//string +Surface, +} +} +module Chart +{ +enum Type +{ +//string +Area, +//string +Line, +//string +Spline, +//string +Column, +//string +Scatter, +//string +Bubble, +//string +SplineArea, +//string +StepArea, +//string +StepLine, +//string +Pie, +//string +Hilo, +//string +HiloOpenClose, +//string +Candle, +//string +Bar, +//string +StackingArea, +//string +StackingArea100, +//string +RangeColumn, +//string +StackingColumn, +//string +StackingColumn100, +//string +StackingBar, +//string +StackingBar100, +//string +Pyramid, +//string +Funnel, +//string +Doughnut, +//string +Polar, +//string +Radar, +//string +RangeArea, +} +} +module Chart +{ +enum EmptyPointMode +{ +//string +Gap, +//string +Zero, +//string +Average, +} +} +module Chart +{ +enum ErrorBarType +{ +//string +FixedValue, +//string +Percentage, +//string +StandardDeviation, +//string +StandardError, +} +} +module Chart +{ +enum ErrorBarMode +{ +//string +Both, +//string +Vertical, +//string +Horizontal, +} +} +module Chart +{ +enum ErrorBarDirection +{ +//string +Both, +//string +Plus, +//string +Minus, +} +} +module Chart +{ +enum Mode +{ +//string +Series, +//string +Point, +//string +Cluster, +} +} +module Chart +{ +enum SelectionType +{ +//string +Single, +//string +Multiple, +} +} +module Chart +{ +enum CrosshairType +{ +//string +Crosshair, +//string +Trackball, +} +} +module Chart +{ +enum Alignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum Position +{ +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +module Chart +{ +enum TextOverflow +{ +//string +None, +//string +Trim, +//string +Wrap, +//string +WrapAndTrim, +} +} +module Chart +{ +enum EdgeLabelPlacement +{ +//string +None, +//string +Shift, +//string +Hide, +} +} +module Chart +{ +enum IntervalType +{ +//string +Days, +//string +Hours, +//string +Seconds, +//string +Milliseconds, +//string +Minutes, +//string +Months, +//string +Years, +} +} +module Chart +{ +enum LabelIntersectAction +{ +//string +None, +//string +Rotate90, +//string +Rotate45, +//string +Wrap, +//string +WrapByword, +//string +Trim, +//string +Hide, +//string +MultipleRows, +} +} +module Chart +{ +enum RangePadding +{ +//string +Additional, +//string +Normal, +//string +None, +//string +Round, +} +} +module Chart +{ +enum TextAlignment +{ +//string +MiddleTop, +//string +MiddleCenter, +//string +MiddleBottom, +} +} +module Chart +{ +enum ZIndex +{ +//string +Inside, +//string +Over, +} +} +module Chart +{ +enum TickLinesPosition +{ +//string +Inside, +//string +Outside, +} +} +module Chart +{ +enum ValueType +{ +//string +Double, +//string +Category, +//string +DateTime, +//string +Logarithmic, +} +} +module Chart +{ +enum Theme +{ +//string +Azure, +//string +FlatLight, +//string +FlatDark, +//string +Azuredark, +//string +Lime, +//string +LimeDark, +//string +Saffron, +//string +SaffronDark, +//string +GradientLight, +//string +GradientDark, +} +} + +class RangeNavigator extends ej.Widget { + static fn: RangeNavigator; + constructor(element: JQuery, options?: RangeNavigator.Model); + constructor(element: Element, options?: RangeNavigator.Model); + model:RangeNavigator.Model; + defaults:RangeNavigator.Model; + + /** destroy the range navigator widget + * @returns {void} + */ + _destroy (): void; +} +export module RangeNavigator{ + +export interface Model { + + /**Toggles the placement of slider exactly on the place it left or on the nearest interval. + * @Default {false} + */ + allowSnapping?: boolean; + + /**Specifies the data source for range navigator. + */ + dataSource?: any; + + /**Sets a value whether to make the range navigator responsive on resize. + * @Default {false} + */ + enableAutoResizing?: boolean; + + /**Toggles the redrawing of chart on moving the sliders. + * @Default {true} + */ + enableDeferredUpdate?: boolean; + + /**Toggles the direction of rendering the range navigator control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Options for customizing the labels colors, font, style, size, horizontalAlignment and opacity. + */ + labelSettings?: LabelSettings; + + /**This property is to specify the localization of range navigator. + * @Default {en-US} + */ + locale?: string; + + /**Options for customizing the range navigator. + */ + navigatorStyleSettings?: NavigatorStyleSettings; + + /**Padding specifies the gap between the container and the range navigator. + * @Default {0} + */ + padding?: string; + + /**If the range is not given explicitly, range will be calculated automatically. + * @Default {none} + */ + rangePadding?: ej.datavisualization.RangeNavigator.RangePadding|string; + + /**Options for customizing the starting and ending ranges. + */ + rangeSettings?: RangeSettings; + + /**selectedData is for getting the data when the "rangeChanged" event trigger from client side. + */ + selectedData?: any; + + /**Options for customizing the start and end range values. + */ + selectedRangeSettings?: SelectedRangeSettings; + + /**Contains property to customize the hight and width of range navigator. + */ + sizeSettings?: SizeSettings; + + /**By specifying this property the user can change the theme of the range navigator. + * @Default {null} + */ + theme?: string; + + /**Options for customizing the tooltip in range navigator. + */ + tooltipSettings?: TooltipSettings; + + /**Options for configuring minor grid lines, major grid lines, axis line of axis. + */ + valueAxisSettings?: ValueAxisSettings; + + /**You can plot data of type date time or numeric. This property determines the type of data that this axis will handle. + * @Default {datetime} + */ + valueType?: ej.datavisualization.RangeNavigator.ValueType|string; + + /**Specifies the xName for dataSource. This is used to take the x values from dataSource + */ + xName?: any; + + /**Specifies the yName for dataSource. This is used to take the y values from dataSource + */ + yName?: any; + + /**Fires on load of range navigator.*/ + load? (e: LoadEventArgs): void; + + /**Fires after range navigator is loaded.*/ + loaded? (e: LoadedEventArgs): void; + + /**Fires on changing the range of range navigator.*/ + rangeChanged? (e: RangeChangedEventArgs): void; +} + +export interface LoadEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RangeChangedEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LabelSettingsHigherLevelBorder { + + /**Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /**Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; +} + +export interface LabelSettingsHigherLevelGridLineStyle { + + /**Specifies the color of grid lines in higher level. + * @Default {#B5B5B5} + */ + color?: string; + + /**Specifies the dashArray of grid lines in higher level. + * @Default {20 5 0} + */ + dashArray?: string; + + /**Specifies the width of grid lines in higher level. + * @Default {#B5B5B5} + */ + width?: string; +} + +export interface LabelSettingsHigherLevelStyleFont { + + /**Specifies the label font color. Labels render with the specified font color. + * @Default {black} + */ + color?: string; + + /**Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the label font style. Labels render with the specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /**Specifies the label font weight. Labels render with the specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /**Specifies the label opacity. Labels render with the specified opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the label font size. Labels render with the specified font size. + * @Default {12px} + */ + size?: string; +} + +export interface LabelSettingsHigherLevelStyle { + + /**Options for customizing the font properties. + */ + font?: LabelSettingsHigherLevelStyleFont; + + /**Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; +} + +export interface LabelSettingsHigherLevel { + + /**Options for customizing the border of grid lines in higher level. + */ + border?: LabelSettingsHigherLevelBorder; + + /**Specifies the fill color of higher level labels. + * @Default {transparent} + */ + fill?: string; + + /**Options for customizing the grid line colors, width, dashArray, border. + */ + gridLineStyle?: LabelSettingsHigherLevelGridLineStyle; + + /**Specifies the intervalType for higher level labels. See IntervalType + * @Default {years} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /**Specifies the position of the labels to render either inside or outside of plot area + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /**Specifies the position of the labels in higher level + * @Default {top} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /**Options for customizing the style of higher level labels. + */ + style?: LabelSettingsHigherLevelStyle; + + /**Toggles the visibility of higher level labels. + * @Default {true} + */ + visible?: boolean; +} + +export interface LabelSettingsLowerLevelBorder { + + /**Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /**Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; +} + +export interface LabelSettingsLowerLevelGridLineStyle { + + /**Specifies the color of grid lines in lower level. + * @Default {#B5B5B5} + */ + color?: string; + + /**Specifies the dashArray of gridLines in lowerLevel. + * @Default {20 5 0} + */ + dashArray?: string; + + /**Specifies the width of grid lines in lower level. + * @Default {#B5B5B5} + */ + width?: string; +} + +export interface LabelSettingsLowerLevelStyleFont { + + /**Specifies the color of labels. Label text render in this specified color. + * @Default {black} + */ + color?: string; + + /**Specifies the font family of labels. Label text render in this specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the font style of labels. Label text render in this specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /**Specifies the font weight of labels. Label text render in this specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /**Specifies the opacity of labels. Label text render in this specified opacity. + * @Default {12px} + */ + opacity?: string; + + /**Specifies the size of labels. Label text render in this specified size. + * @Default {12px} + */ + size?: string; +} + +export interface LabelSettingsLowerLevelStyle { + + /**Options for customizing the font of labels. + */ + font?: LabelSettingsLowerLevelStyleFont; + + /**Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; +} + +export interface LabelSettingsLowerLevel { + + /**Options for customizing the border of grid lines in lower level. + */ + border?: LabelSettingsLowerLevelBorder; + + /**Specifies the fill color of labels in lower level. + * @Default {transparent} + */ + fill?: string; + + /**Options for customizing the grid lines in lower level. + */ + gridLineStyle?: LabelSettingsLowerLevelGridLineStyle; + + /**Specifies the intervalType of the labels in lower level.See IntervalType + * @Default {years} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /**Specifies the position of the labels to render either inside or outside of plot area. See LabelPlacement + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /**Specifies the position of the labels in lower level.See Position + * @Default {bottom} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /**Options for customizing the style of labels. + */ + style?: LabelSettingsLowerLevelStyle; + + /**Toggles the visibility of labels in lower level. + * @Default {true} + */ + visible?: boolean; +} + +export interface LabelSettingsStyleFont { + + /**Specifies the label color. This color is applied to the labels in range navigator. + * @Default {#FFFFFF} + */ + color?: string; + + /**Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /**Specifies the label font opacity. Labels render with the specified font opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the label font size. Labels render with the specified font size. + * @Default {1px} + */ + size?: string; + + /**Specifies the label font style. Labels render with the specified font style.. + * @Default {Normal} + */ + style?: ej.datavisualization.RangeNavigator.FontStyle|string; + + /**Specifies the lable font weight + * @Default {regular} + */ + weight?: ej.datavisualization.RangeNavigator.FontWeight|string; +} + +export interface LabelSettingsStyle { + + /**Options for customizing the font of labels in range navigator. + */ + font?: LabelSettingsStyleFont; + + /**Specifies the horizontalAlignment of the label in RangeNavigator + * @Default {middle} + */ + horizontalAlignment?: ej.datavisualization.RangeNavigator.HorizontalAlignment|string; +} + +export interface LabelSettings { + + /**Options for customizing the higher level labels in range navigator. + */ + higherLevel?: LabelSettingsHigherLevel; + + /**Options for customizing the labels in lower level. + */ + lowerLevel?: LabelSettingsLowerLevel; + + /**Options for customizing the style of labels in range navigator. + */ + style?: LabelSettingsStyle; +} + +export interface NavigatorStyleSettingsBorder { + + /**Specifies the border color of range navigator. + * @Default {transparent} + */ + color?: string; + + /**Specifies the dash array of range navigator. + * @Default {null} + */ + dashArray?: string; + + /**Specifies the border width of range navigator. + * @Default {0.5} + */ + width?: number; +} + +export interface NavigatorStyleSettingsMajorGridLineStyle { + + /**Specifies the color of major grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /**Toggles the visibility of major grid lines. + * @Default {true} + */ + visible?: boolean; +} + +export interface NavigatorStyleSettingsMinorGridLineStyle { + + /**Specifies the color of minor grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /**Toggles the visibility of minor grid lines. + * @Default {true} + */ + visible?: boolean; +} + +export interface NavigatorStyleSettings { + + /**Specifies the background color of range navigator. + * @Default {#dddddd} + */ + background?: string; + + /**Options for customizing the border color and width of range navigator. + */ + border?: NavigatorStyleSettingsBorder; + + /**Specifies the left side thumb template in range navigator we can give either div id or html string + * @Default {null} + */ + leftThumbTemplate?: string; + + /**Options for customizing the major grid lines. + */ + majorGridLineStyle?: NavigatorStyleSettingsMajorGridLineStyle; + + /**Options for customizing the minor grid lines. + */ + minorGridLineStyle?: NavigatorStyleSettingsMinorGridLineStyle; + + /**Specifies the opacity of RangeNavigator. + * @Default {1} + */ + opacity?: number; + + /**Specifies the right side thumb template in range navigator we can give either div id or html string + * @Default {null} + */ + rightThumbTemplate?: string; + + /**Specifies the color of the selected region in range navigator. + * @Default {#EFEFEF} + */ + selectedRegionColor?: string; + + /**Specifies the opacity of Selected Region. + * @Default {0} + */ + selectedRegionOpacity?: number; + + /**Specifies the color of the thumb in range navigator. + * @Default {#2382C3} + */ + thumbColor?: string; + + /**Specifies the radius of the thumb in range navigator. + * @Default {10} + */ + thumbRadius?: number; + + /**Specifies the stroke color of the thumb in range navigator. + * @Default {#303030} + */ + thumbStroke?: string; + + /**Specifies the color of the unselected region in range navigator. + * @Default {#5EABDE} + */ + unselectedRegionColor?: string; + + /**Specifies the opacity of Unselected Region. + * @Default {0.3} + */ + unselectedRegionOpacity?: number; +} + +export interface RangeSettings { + + /**Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /**Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; +} + +export interface SelectedRangeSettings { + + /**Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /**Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; +} + +export interface SizeSettings { + + /**Specifies height of the range navigator. + * @Default {null} + */ + height?: string; + + /**Specifies width of the range navigator. + * @Default {null} + */ + width?: string; +} + +export interface TooltipSettingsFont { + + /**Specifies the color of text in tooltip. Tooltip text render in the specified color. + * @Default {#FFFFFF} + */ + color?: string; + + /**Specifies the font family of text in tooltip. Tooltip text render in the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /**Specifies the font style of text in tooltip. Tooltip text render in the specified font style. + * @Default {ej.datavisualization.RangeNavigator.fontStyle.Normal} + */ + fontStyle?: string; + + /**Specifies the opacity of text in tooltip. Tooltip text render in the specified opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of text in tooltip. Tooltip text render in the specified size. + * @Default {10px} + */ + size?: string; + + /**Specifies the weight of text in tooltip. Tooltip text render in the specified weight. + * @Default {ej.datavisualization.RangeNavigator.weight.Regular} + */ + weight?: string; +} + +export interface TooltipSettings { + + /**Specifies the background color of tooltip. + * @Default {#303030} + */ + backgroundColor?: string; + + /**Options for customizing the font in tooltip. + */ + font?: TooltipSettingsFont; + + /**Specifies the format of text to be displayed in tooltip. + * @Default {MM/dd/yyyy} + */ + labelFormat?: string; + + /**Specifies the mode of displaying the tooltip. Neither to display the tooltip always nor on demand. + * @Default {null} + */ + tooltipDisplayMode?: string; + + /**Toggles the visibility of tooltip. + * @Default {true} + */ + visible?: boolean; +} + +export interface ValueAxisSettingsAxisLine { + + /**Toggles the visibility of axis line. + * @Default {none} + */ + visible?: string; +} + +export interface ValueAxisSettingsFont { + + /**Text in axis render with the specified size. + * @Default {0px} + */ + size?: string; +} + +export interface ValueAxisSettingsMajorGridLines { + + /**Toggles the visibility of major grid lines. + * @Default {false} + */ + visible?: boolean; +} + +export interface ValueAxisSettingsMajorTickLines { + + /**Specifies the size of the majorTickLines in range navigator + * @Default {0} + */ + size?: number; + + /**Toggles the visibility of major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Specifies width of the major tick lines. + * @Default {0} + */ + width?: number; +} + +export interface ValueAxisSettings { + + /**Options for customizing the axis line. + */ + axisLine?: ValueAxisSettingsAxisLine; + + /**Options for customizing the font of the axis. + */ + font?: ValueAxisSettingsFont; + + /**Options for customizing the major grid lines. + */ + majorGridLines?: ValueAxisSettingsMajorGridLines; + + /**Options for customizing the major tick lines in axis. + */ + majorTickLines?: ValueAxisSettingsMajorTickLines; + + /**If the range is not given explicitly, range will be calculated automatically. You can customize the automatic range calculation using rangePadding. + * @Default {none} + */ + rangePadding?: string; + + /**Toggles the visibility of axis in range navigator. + * @Default {false} + */ + visible?: boolean; +} +} +module RangeNavigator +{ +enum IntervalType +{ +//string +Years, +//string +Quarters, +//string +Months, +//string +Weeks, +//string +Days, +//string +Hours, +} +} +module RangeNavigator +{ +enum LabelPlacement +{ +//string +Inside, +//string +Outside, +} +} +module RangeNavigator +{ +enum Position +{ +//string +Top, +//string +Bottom, +} +} +module RangeNavigator +{ +enum FontStyle +{ +//string +Normal, +//string +Bold, +//string +Italic, +} +} +module RangeNavigator +{ +enum FontWeight +{ +//string +Regular, +//string +Lighter, +} +} +module RangeNavigator +{ +enum HorizontalAlignment +{ +//string +Middle, +//string +Left, +//string +Right, +} +} +module RangeNavigator +{ +enum RangePadding +{ +//string +Additional, +//string +Normal, +//string +None, +//string +Round, +} +} +module RangeNavigator +{ +enum ValueType +{ +//string +Numeric, +//string +DateTime, +} +} + +class BulletGraph extends ej.Widget { + static fn: BulletGraph; + constructor(element: JQuery, options?: BulletGraph.Model); + constructor(element: Element, options?: BulletGraph.Model); + model:BulletGraph.Model; + defaults:BulletGraph.Model; + + /** To destroy the bullet graph + * @returns {void} + */ + destroy (): void; + + /** To redraw the bulet graph + * @returns {void} + */ + redraw(): void; + + /** To set the value for comparative measure in bullet graph. + * @returns {void} + */ + setComparativeMeasureSymbol(): void; + + /** To set the value for feature measure bar. + * @returns {void} + */ + setFeatureMeasureBarValue(): void; +} +export module BulletGraph{ + +export interface Model { + + /**Toggles the visibility of the range stroke color of the labels. + * @Default {false} + */ + applyRangeStrokeToLabels?: boolean; + + /**Toggles the visibility of the range stroke color of the ticks. + * @Default {false} + */ + applyRangeStrokeToTicks?: boolean; + + /**Contains property to customize the caption in bullet graph. + */ + captionSettings?: CaptionSettings; + + /**Comparative measure bar in bullet graph render till the specified value. + * @Default {0} + */ + comparativeMeasureValue?: number; + + /**Toggles the animation of bullet graph. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Sets a value whether to make the bullet graph responsive on resize. + * @Default {true} + */ + enableResizing?: boolean; + + /**Specifies the direction of flow in bullet graph. Neither it may be backward nor forward. + * @Default {forward} + */ + flowDirection?: ej.datavisualization.BulletGraph.FlowDirection|string; + + /**Specifies the height of the bullet graph. + * @Default {90} + */ + height?: number; + + /**Bullet graph will render in the specified orientation. + * @Default {horizontal} + */ + orientation?: ej.datavisualization.BulletGraph.Orientation|string; + + /**Contains property to customize the qualitative ranges. + */ + qualitativeRanges?: Array; + + /**Size of the qualitative range depends up on the specified value. + * @Default {32} + */ + qualitativeRangeSize?: number; + + /**Length of the quantitative range depends up on the specified value. + * @Default {475} + */ + quantitativeScaleLength?: number; + + /**Contains all the properties to customize quantitative scale. + */ + quantitativeScaleSettings?: QuantitativeScaleSettings; + + /**By specifying this property the user can change the theme of the bullet graph. + * @Default {flatlight} + */ + theme?: string; + + /**Contains all the properties to customize tooltip. + */ + tooltipSettings?: TooltipSettings; + + /**Feature measure bar in bullet graph render till the specified value. + * @Default {0} + */ + value?: number; + + /**Specifies the width of the bullet graph. + * @Default {595} + */ + width?: number; + + /**Fires on rendering the caption of bullet graph.*/ + drawCaption? (e: DrawCaptionEventArgs): void; + + /**Fires on rendering the category.*/ + drawCategory? (e: DrawCategoryEventArgs): void; + + /**Fires on rendering the comparative measure symbol.*/ + drawComparativeMeasureSymbol? (e: DrawComparativeMeasureSymbolEventArgs): void; + + /**Fires on rednering the feature measure bar.*/ + drawFeatureMeasureBar? (e: DrawFeatureMeasureBarEventArgs): void; + + /**Fires on rendering the indicator of bullet graph.*/ + drawIndicator? (e: DrawIndicatorEventArgs): void; + + /**Fires on rendering the labels.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Fires on rendering the qualitative ranges.*/ + drawQualitativeRanges? (e: DrawQualitativeRangesEventArgs): void; + + /**Fires on loading bullet graph.*/ + load? (e: LoadEventArgs): void; +} + +export interface DrawCaptionEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the current captionSettings element. + */ + captionElement?: HTMLElement; + + /**returns the type of the captionSettings. + */ + captionType?: string; +} + +export interface DrawCategoryEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of category element. + */ + categoryElement?: HTMLElement; + + /**returns the text value of the category that is drawn. + */ + Value?: string; +} + +export interface DrawComparativeMeasureSymbolEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of comparative measure element. + */ + targetElement?: HTMLElement; + + /**returns the value of the comparative measure symbol. + */ + Value?: number; +} + +export interface DrawFeatureMeasureBarEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of feature measure element. + */ + currentElement?: HTMLElement; + + /**returns the value of the feature measure bar. + */ + Value?: number; +} + +export interface DrawIndicatorEventArgs { + + /**returns an object to customize bullet graph indicator text and symbol before rendering it. + */ + indicatorSettings?: any; + + /**returns the object of bullet graph. + */ + model?: any; + + /**returns the type of event. + */ + type?: string; + + /**for cancelling the event. + */ + cancel?: boolean; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the current label element. + */ + tickElement?: HTMLElement; + + /**returns the label type. + */ + labelType?: string; +} + +export interface DrawQualitativeRangesEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the index of current range. + */ + rangeIndex?: number; + + /**returns the settings for current range. + */ + rangeOptions?: any; + + /**returns the end value of current range. + */ + rangeEndValue?: number; +} + +export interface LoadEventArgs { +} + +export interface CaptionSettingsFont { + + /**Specifies the color of the text in caption. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of caption. Caption text render with this fontFamily + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of caption + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of caption + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of caption. Caption text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of caption. Caption text render with this size + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsIndicatorFont { + + /**Specifies the color of the indicator's text. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of indicator. Indicator text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of indicator. Indicator text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of indicator. Indicator text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of indicator text. Indicator text render with this Opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of indicator. Indicator text render with this size. + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsIndicatorLocation { + + /**Specifies the horizontal position of the indicator. + * @Default {10} + */ + x?: number; + + /**Specifies the vertical position of the indicator. + * @Default {60} + */ + y?: number; +} + +export interface CaptionSettingsIndicatorSymbolBorder { + + /**Specifies the border color of indicator symbol. + * @Default {null} + */ + color?: string; + + /**Specifies the border width of indicator symbol. + * @Default {1} + */ + width?: number; +} + +export interface CaptionSettingsIndicatorSymbolSize { + + /**Specifies the height of indicator symbol. + * @Default {10} + */ + height?: number; + + /**Specifies the width of indicator symbol. + * @Default {10} + */ + width?: number; +} + +export interface CaptionSettingsIndicatorSymbol { + + /**Contains property to customize the border of indicator symbol. + */ + border?: CaptionSettingsIndicatorSymbolBorder; + + /**Specifies the color of indicator symbol. + * @Default {null} + */ + color?: string; + + /**Specifies the url of image that represents indicator symbol. + */ + imageURL?: string; + + /**Specifies the opacity of indicator symbol. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of indicator symbol. + */ + shape?: string; + + /**Contains property to customize the size of indicator symbol. + */ + size?: CaptionSettingsIndicatorSymbolSize; +} + +export interface CaptionSettingsIndicator { + + /**Contains property to customize the font of indicator. + */ + font?: CaptionSettingsIndicatorFont; + + /**Contains property to customize the location of indicator. + */ + location?: CaptionSettingsIndicatorLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {2} + */ + padding?: number; + + /**Contains property to customize the symbol of indicator. + */ + symbol?: CaptionSettingsIndicatorSymbol; + + /**Specifies the text to be displayed as indicator text. By default difference between current value and target will be displayed + */ + text?: string; + + /**Specifies the alignement of indicator with respect to scale based on text position + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**indicator text render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /**Specifies where indicator should be placed + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; + + /**Specifies the space between indicator symbol and text. + * @Default {3} + */ + textSpacing?: number; + + /**Specifies whether indicator will be visible or not. + * @Default {false} + */ + visibile?: boolean; +} + +export interface CaptionSettingsLocation { + + /**Specifies the position in horizontal direction + * @Default {17} + */ + x?: number; + + /**Specifies the position in horizontal direction + * @Default {30} + */ + y?: number; +} + +export interface CaptionSettingsSubTitleFont { + + /**Specifies the color of the subtitle's text. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of subtitle. Subtitle text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of subtitle. Subtitle text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of subtitle. Subtitle text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of subtitle. Subtitle text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of subtitle. Subtitle text render with this size. + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsSubTitleLocation { + + /**Specifies the horizontal position of the subtitle. + * @Default {10} + */ + x?: number; + + /**Specifies the vertical position of the subtitle. + * @Default {45} + */ + y?: number; +} + +export interface CaptionSettingsSubTitle { + + /**Contains property to customize the font of subtitle. + */ + font?: CaptionSettingsSubTitleFont; + + /**Contains property to customize the location of subtitle. + */ + location?: CaptionSettingsSubTitleLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /**Specifies the text to be displayed as subtitle. + */ + text?: string; + + /**Specifies the alignment of sub title text with respect to scale. Alignment will not be applied in float position. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**Subtitle render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /**Specifies where sub title text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; +} + +export interface CaptionSettings { + + /**Specifies whether trim the labels will be true or false. + * @Default {true} + */ + enableTrim?: boolean; + + /**Contains property to customize the font of caption. + */ + font?: CaptionSettingsFont; + + /**Contains property to customize the indicator. + */ + indicator?: CaptionSettingsIndicator; + + /**Contains property to customize the location. + */ + location?: CaptionSettingsLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /**Contains property to customize the subtitle. + */ + subTitle?: CaptionSettingsSubTitle; + + /**Specifies the text to be displayed on bullet graph. + */ + text?: string; + + /**Specifies the alignment of caption text with respect to scale. This property will not be applied when text position is float. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies caption text anchoring when caption text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**Specifies the angel in which the caption is rendered. + * @Default {0} + */ + textAngle?: number; + + /**Specifies how caption text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; +} + +export interface QualitativeRanges { + + /**Specifies the ending range to which the qualitative ranges will render. + * @Default {3} + */ + rangeEnd?: number; + + /**Specifies the opacity for the qualitative ranges. + * @Default {1} + */ + rangeOpacity?: number; + + /**Specifies the stroke for the qualitative ranges. + * @Default {null} + */ + rangeStroke?: string; +} + +export interface QuantitativeScaleSettingsComparativeMeasureSettings { + + /**Specifies the stroke of the comparative measure. + * @Default {null} + */ + stroke?: number; + + /**Specifies the width of the comparative measure. + * @Default {5} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsFeaturedMeasureSettings { + + /**Specifies the Stroke of the featured measure in bullet graph. + * @Default {null} + */ + stroke?: number; + + /**Specifies the width of the featured measure in bullet graph. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsFeatureMeasures { + + /**Specifies the category of feature measure. + * @Default {null} + */ + category?: string; + + /**Comparative measure render till the specified value. + * @Default {null} + */ + comparativeMeasureValue?: number; + + /**Feature measure render till the specified value. + * @Default {null} + */ + value?: number; +} + +export interface QuantitativeScaleSettingsFields { + + /**Specifies the category of the bullet graph. + * @Default {null} + */ + category?: string; + + /**Comparative measure render based on the values in the specified field. + * @Default {null} + */ + comparativeMeasure?: string; + + /**Specifies the dataSource for the bullet graph. + * @Default {null} + */ + dataSource?: any; + + /**Feature measure render based on the values in the specified field. + * @Default {null} + */ + featureMeasures?: string; + + /**Specifies the query for fetching the values form data source to render the bullet graph. + * @Default {null} + */ + query?: string; + + /**Specifies the name of the table. + * @Default {null} + */ + tableName?: string; +} + +export interface QuantitativeScaleSettingsLabelSettingsFont { + + /**Specifies the fontFamily of labels in bullet graph. Labels render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of labels in bullet graph. Labels render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of labels in bullet graph. Labels render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of labels in bullet graph. Labels render with this opacity + * @Default {1} + */ + opacity?: number; +} + +export interface QuantitativeScaleSettingsLabelSettings { + + /**Contains property to customize the font of the labels in bullet graph. + */ + font?: QuantitativeScaleSettingsLabelSettingsFont; + + /**Specifies the placement of labels in bullet graph scale. + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.BulletGraph.LabelPlacement|string; + + /**Specifies the prefix to be added with labels in bullet graph. + * @Default {Empty string} + */ + labelPrefix?: string; + + /**Specifies the suffix to be added after labels in bullet graph. + * @Default {Empty string} + */ + labelSuffix?: string; + + /**Specifies the horizontal/vertical padding of labels. + * @Default {15} + */ + offset?: number; + + /**Specifies the position of the labels to render either above or below the graph. See Position + * @Default {below} + */ + position?: ej.datavisualization.BulletGraph.LabelPosition|string; + + /**Specifies the Size of the labels. + * @Default {12} + */ + size?: number; + + /**Specifies the stroke color of the labels in bullet graph. + * @Default {null} + */ + stroke?: string; +} + +export interface QuantitativeScaleSettingsLocation { + + /**This property specifies the x position for rendering quantitative scale. + * @Default {10} + */ + x?: number; + + /**This property specifies the y position for rendering quantitative scale. + * @Default {10} + */ + y?: number; +} + +export interface QuantitativeScaleSettingsMajorTickSettings { + + /**Specifies the size of the major ticks. + * @Default {13} + */ + size?: number; + + /**Specifies the stroke color of the major tick lines. + * @Default {null} + */ + stroke?: string; + + /**Specifies the width of the major tick lines. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsMinorTickSettings { + + /**Specifies the size of minor ticks. + * @Default {7} + */ + size?: number; + + /**Specifies the stroke color of minor ticks in bullet graph. + * @Default {null} + */ + stroke?: string; + + /**Specifies the width of the minor ticks in bullet graph. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettings { + + /**Contains property to customize the comparative measure. + */ + comparativeMeasureSettings?: QuantitativeScaleSettingsComparativeMeasureSettings; + + /**Contains property to customize the featured measure. + */ + featuredMeasureSettings?: QuantitativeScaleSettingsFeaturedMeasureSettings; + + /**Contains property to customize the featured measure. + */ + featureMeasures?: Array; + + /**Contains property to customize the fields. + */ + fields?: QuantitativeScaleSettingsFields; + + /**Specifies the interval for the Graph. + * @Default {1} + */ + interval?: number; + + /**Contains property to customize the labels. + */ + labelSettings?: QuantitativeScaleSettingsLabelSettings; + + /**Contains property to customize the position of the quantitative scale + */ + location?: QuantitativeScaleSettingsLocation; + + /**Contains property to customize the major tick lines. + */ + majorTickSettings?: QuantitativeScaleSettingsMajorTickSettings; + + /**Specifies the maximum value of the Graph. + * @Default {10} + */ + maximum?: number; + + /**Specifies the minimum value of the Graph. + * @Default {0} + */ + minimum?: number; + + /**Contains property to customize the minor ticks. + */ + minorTickSettings?: QuantitativeScaleSettingsMinorTickSettings; + + /**The specified number of minor ticks will be rendered per interval. + * @Default {4} + */ + minorTicksPerInterval?: number; + + /**Specifies the placement of ticks to render either inside or outside the scale. + * @Default {ej.datavisualization.BulletGraph.TickPlacement.Outside} + */ + tickPlacement?: ej.datavisualization.BulletGraph.TickPlacement|string; + + /**Specifies the position of the ticks to render either above,below or inside + * @Default {ej.datavisualization.BulletGraph.TickPosition.Far} + */ + tickPosition?: ej.datavisualization.BulletGraph.TickPosition|string; +} + +export interface TooltipSettings { + + /**Specifies template for caption tooltip + * @Default {null} + */ + captionTemplate?: string; + + /**Toggles the visibility of caption tooltip + * @Default {false} + */ + enableCaptionTooltip?: boolean; + + /**Specifies the ID of a div, which is to be displayed as tooltip. + * @Default {null} + */ + template?: string; + + /**Toggles the visibility of tooltip + * @Default {true} + */ + visible?: boolean; +} +} +module BulletGraph +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +//string +Oblique, +} +} +module BulletGraph +{ +enum FontWeight +{ +//string +Normal, +//string +Bold, +//string +Bolder, +//string +Lighter, +} +} +module BulletGraph +{ +enum TextAlignment +{ +//string +Near, +//string +Far, +//string +Center, +} +} +module BulletGraph +{ +enum TextAnchor +{ +//string +Start, +//string +Middle, +//string +End, +} +} +module BulletGraph +{ +enum TextPosition +{ +//string +Top, +//string +Right, +//string +Left, +//string +Bottom, +//string +Float, +} +} +module BulletGraph +{ +enum FlowDirection +{ +//string +Forward, +//string +Backward, +} +} +module BulletGraph +{ +enum Orientation +{ +//string +Horizontal, +//string +Vertical, +} +} +module BulletGraph +{ +enum LabelPlacement +{ +//string +Inside, +//string +Outside, +} +} +module BulletGraph +{ +enum LabelPosition +{ +//string +Above, +//string +Below, +} +} +module BulletGraph +{ +enum TickPlacement +{ +//string +Inside, +//string +Outside, +} +} +module BulletGraph +{ +enum TickPosition +{ +//string +Below, +//string +Above, +//string +Cross, +} +} + +class Barcode extends ej.Widget { + static fn: Barcode; + constructor(element: JQuery, options?: Barcode.Model); + constructor(element: Element, options?: Barcode.Model); + model:Barcode.Model; + defaults:Barcode.Model; + + /** To disable the barcode + * @returns {void} + */ + disable(): void; + + /** To enable the barcode + * @returns {void} + */ + enable(): void; +} +export module Barcode{ + +export interface Model { + + /**Specifies the distance between the barcode and text below it. + */ + barcodeToTextGapHeight?: number; + + /**Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. Please refer to xDimension for two dimensional barcode height customization. + */ + barHeight?: number; + + /**Specifies the dark bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + darkBarColor?: any; + + /**Specifies whether the text below the barcode is visible or hidden. + */ + displayText?: boolean; + + /**Specifies whether the control is enabled. + */ + enabled?: boolean; + + /**Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. These symbols are optional and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. + */ + encodeStartStopSymbol?: number; + + /**Specifies the light bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + lightBarColor?: any; + + /**Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on the provided input which can be specified during initialization. + */ + narrowBarWidth?: number; + + /**Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and stops. The purpose of a quiet zone is to prevent the reader from picking up unrelated information. + */ + quietZone?: QuietZone; + + /**Specifies the type of the Barcode. See SymbologyType + */ + symbologyType?: ej.datavisualization.Barcode.SymbologyType|string; + + /**Specifies the text to be encoded in the barcode. + */ + text?: string; + + /**Specifies the color of the text/data at the bottom of the barcode. + */ + textColor?: any; + + /**Specifies the width of the wide bars in the barcode. One dimensional barcode usually contains random narrow and wide bars based on the provided which can be customized during initialization. + */ + wideBarWidth?: number; + + /**Specifies the width of the narrowest element(bar or space) in a barcode. The greater the x dimension, the more easily a barcode reader will scan. + */ + xDimension?: number; + + /**Fires after Barcode control is loaded.*/ + load? (e: LoadEventArgs): void; +} + +export interface LoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the barcode model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**return the barcode state + */ + status?: boolean; +} + +export interface QuietZone { + + /**Specifies the quiet zone around the Barcode. + */ + all?: number; + + /**Specifies the bottom quiet zone of the Barcode. + */ + bottom?: number; + + /**Specifies the left quiet zone of the Barcode. + */ + left?: number; + + /**Specifies the right quiet zone of the Barcode. + */ + right?: number; + + /**Specifies the top quiet zone of the Barcode. + */ + top?: number; +} +} +module Barcode +{ +enum SymbologyType +{ +//Represents the QR code +QRBarcode, +//Represents the Data Matrix barcode +DataMatrix, +//Represents the Code 39 barcode +Code39, +//Represents the Code 39 Extended barcode +Code39Extended, +//Represents the Code 11 barcode +Code11, +//Represents the Codabar barcode +Codabar, +//Represents the Code 32 barcode +Code32, +//Represents the Code 93 barcode +Code93, +//Represents the Code 93 Extended barcode +Code93Extended, +//Represents the Code 128 A barcode +Code128A, +//Represents the Code 128 B barcode +Code128B, +//Represents the Code 128 C barcode +Code128C, +} +} + +class Map extends ej.Widget { + static fn: Map; + constructor(element: JQuery, options?: Map.Model); + constructor(element: Element, options?: Map.Model); + model:Map.Model; + defaults:Map.Model; + + /** Method for navigating to specific shape based on latitude, longitude and zoomlevel. + * @param {number} Pass the latitude value for map + * @param {number} Pass the longitude value for map + * @param {number} Pass the zoom level for map + * @returns {void} + */ + navigateTo(latitude: number, longitude: number, level: number): void; + + /** Method to perform map panning + * @param {string} Pass the direction in which map should be panned + * @returns {void} + */ + pan(direction: string): void; + + /** Method to reload the map. + * @returns {void} + */ + refresh(): void; + + /** Method to reload the shapeLayers with updated values + * @returns {void} + */ + refreshLayers(): void; + + /** Method to reload the navigation control with updated values. + * @param {any} Pass the navigation control instance + * @returns {void} + */ + refreshNavigationControl(navigation: any): void; + + /** Method to perform map zooming. + * @param {number} Pass the zoom level for map to be zoomed + * @param {boolean} Pass the boolean value to enable or disable animation while zooming + * @returns {void} + */ + zoom(level: number, isAnimate: boolean): void; +} +export module Map{ + +export interface Model { + + /**Specifies the background color for map + * @Default {white} + */ + background?: string; + + /**Specifies the base map-index of the map to determine the shapelayer to be displayed + * @Default {0} + */ + baseMapIndex?: number; + + /**Specify the center position where map should be displayed + * @Default {[0,0]} + */ + centerPosition?: any; + + /**Enables or Disables the map animation + * @Default {false} + */ + enableAnimation?: boolean; + + /**Enables or Disables the animation for layer change in map + * @Default {false} + */ + enableLayerChangeAnimation?: boolean; + + /**Enables or Disables the map panning + * @Default {true} + */ + enablePan?: boolean; + + /**Determines whether map need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /**Enables or Disables the zooming of map + * @Default {true} + */ + enableZoom?: boolean; + + /**Enables or Disables the zoom on selecting the map shape + * @Default {false} + */ + enableZoomOnSelection?: boolean; + + /**Specifies the zoom factor for map zoom value. + * @Default {1} + */ + factor?: number; + + /**Hold the shapelayers to be displayed in map + * @Default {[]} + */ + layers?: Array; + + /**Specifies the zoom level value for which map to be zoomed + * @Default {1} + */ + level?: number; + + /**Specifies the maximum zoom level of the map + * @Default {100} + */ + maxValue?: number; + + /**Specifies the minimum zoomSettings level of the map + * @Default {1} + */ + minValue?: number; + + /**Enables or Disables the navigation control for map to perform zooming and panning on map shapes. + */ + navigationControl?: any; + + /**Layer for holding the map shapes + */ + shapeLayer?: ShapeLayer; + + /**Enables or Disables the Zooming for map. + */ + zoomSettings?: any; + + /**Triggered on selecting the map markers.*/ + markerSelected? (e: MarkerSelectedEventArgs): void; + + /**Triggers while leaving the hovered map shape*/ + mouseleave? (e: MouseleaveEventArgs): void; + + /**Triggers while hovering the map shape.*/ + mouseover? (e: MouseoverEventArgs): void; + + /**Triggers once map render completed.*/ + onRenderComplete? (e: OnRenderCompleteEventArgs): void; + + /**Triggers when map panning ends.*/ + panned? (e: PannedEventArgs): void; + + /**Triggered on selecting the map shapes.*/ + shapeSelected? (e: ShapeSelectedEventArgs): void; + + /**Triggered when map is zoomed-in.*/ + zoomedIn? (e: ZoomedInEventArgs): void; + + /**Triggers when map is zoomed out.*/ + zoomedOut? (e: ZoomedOutEventArgs): void; +} + +export interface MarkerSelectedEventArgs { + + /**Returns marker object. + */ + originalEvent?: any; +} + +export interface MouseleaveEventArgs { + + /**Returns hovered map shape object. + */ + originalEvent?: any; +} + +export interface MouseoverEventArgs { + + /**Returns hovered map shape object. + */ + originalEvent?: any; +} + +export interface OnRenderCompleteEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; +} + +export interface PannedEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; +} + +export interface ShapeSelectedEventArgs { + + /**Returns selected shape object. + */ + originalEvent?: any; +} + +export interface ZoomedInEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; + + /**Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; +} + +export interface ZoomedOutEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; + + /**Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; +} + +export interface ShapeLayerBubbleSettings { + + /**Specifies the bubble Opacity value of bubbles for shape layer in map + * @Default {0.9} + */ + bubbleOpacity?: number; + + /**Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + color?: string; + + /**Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: any; + + /**Specifies the bubble color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /**Specifies the maximum size value of bubbles for shape layer in map + * @Default {20} + */ + maxValue?: number; + + /**Specifies the minimum size value of bubbles for shape layer in map + * @Default {10} + */ + minValue?: number; + + /**Specifies the showBubble visibility status map + * @Default {true} + */ + showBubble?: boolean; + + /**Specifies the tooltip visibility status of the shape layer in map + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the bubble tooltip template of the shape layer in map + * @Default {null} + */ + tooltipTemplate?: string; + + /**Specifies the bubble valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; +} + +export interface ShapeLayerLabelSettings { + + /**enable or disable the enableSmartLabel property + * @Default {false} + */ + enableSmartLabel?: boolean; + + /**set the labelLength property + * @Default {'2'} + */ + labelLength?: number; + + /**set the labelPath property + * @Default {null} + */ + labelPath?: string; + + /**enable or disable the showlabel property + * @Default {false} + */ + showLabels?: boolean; + + /**set the smartLabelSize property + * @Default {fixed} + */ + smartLabelSize?: ej.datavisualization.Map.LabelSize|string; +} + +export interface ShapeLayerLegendSettings { + + /**Determines whether the legend should be placed outside or inside the map bounds + * @Default {false} + */ + dockOnMap?: boolean; + + /**Determines the legend placement and it is valid only when dockOnMap is true + * @Default {top} + */ + dockPosition?: ej.datavisualization.Map.DockPosition|string; + + /**height value for legend setting + * @Default {0} + */ + height?: number; + + /**to get icon value for legend setting + * @Default {rectangle} + */ + icon?: ej.datavisualization.Map.LegendIcons|string; + + /**icon height value for legend setting + * @Default {20} + */ + iconHeight?: number; + + /**icon Width value for legend setting + * @Default {20} + */ + iconWidth?: number; + + /**set the orientation of legend labels + * @Default {vertical} + */ + labelOrientation?: ej.datavisualization.Map.LabelOrientation|string; + + /**to get leftLabel value for legend setting + * @Default {null} + */ + leftLabel?: string; + + /**to get mode of legend setting + * @Default {default} + */ + mode?: ej.datavisualization.Map.LegendMode|string; + + /**set the position of legend settings + * @Default {topleft} + */ + position?: ej.datavisualization.Map.Position|string; + + /**x position value for legend setting + * @Default {0} + */ + positionX?: number; + + /**y position value for legend setting + * @Default {0} + */ + positionY?: number; + + /**to get rightLabel value for legend setting + * @Default {null} + */ + rightLabel?: string; + + /**Enables or Disables the showLabels + * @Default {false} + */ + showLabels?: boolean; + + /**Enables or Disables the showLegend + * @Default {false} + */ + showLegend?: boolean; + + /**to get title of legend setting + * @Default {null} + */ + title?: string; + + /**to get type of legend setting + * @Default {layers} + */ + type?: ej.datavisualization.Map.LegendType|string; + + /**width value for legend setting + * @Default {0} + */ + width?: number; +} + +export interface ShapeLayerShapeSettings { + + /**Enables or Disables the auto fill colors for shape layer in map. When this property value set to true, shapes will be filled with palette colors. + * @Default {false} + */ + autoFill?: boolean; + + /**Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: any; + + /**Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. + * @Default {palette1} + */ + colorPalette?: string; + + /**Specifies the shape color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /**Enables or Disables the gradient colors for map shapes. + * @Default {false} + */ + enableGradient?: boolean; + + /**Specifies the shape fill color of the shape layer in map + * @Default {#E5E5E5} + */ + fill?: string; + + /**Specifies the mouse over width of the shape layer in map + * @Default {1} + */ + highlightBorderWidth?: number; + + /**Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + highlightColor?: string; + + /**Specifies the mouse over stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + highlightStroke?: string; + + /**Specifies the shape selection color of the shape layer in map + * @Default {gray} + */ + selectionColor?: string; + + /**Specifies the shape selection stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + selectionStroke?: string; + + /**Specifies the shape selection stroke width of the shape layer in map + * @Default {1} + */ + selectionStrokeWidth?: number; + + /**Specifies the shape stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + stroke?: string; + + /**Specifies the shape stroke thickness value of the shape layer in map + * @Default {0.2} + */ + strokeThickness?: number; + + /**Specifies the shape valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; +} + +export interface ShapeLayer { + + /**to get the type of bing map. + * @Default {aerial} + */ + bingMapType?: ej.datavisualization.Map.BingMapType|string; + + /**Specifies the bubble settings for map + */ + bubbleSettings?: ShapeLayerBubbleSettings; + + /**Specifies the datasource for the shape layer + */ + dataSource?: any; + + /**Enables or disables the animation + * @Default {false} + */ + enableAnimation?: boolean; + + /**Enables or disables the shape mouse hover + * @Default {false} + */ + enableMouseHover?: boolean; + + /**Enables or disables the shape selection + * @Default {true} + */ + enableSelection?: boolean; + + /**to get the key of bing map + * @Default {null} + */ + key?: string; + + /**Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., + */ + labelSettings?: ShapeLayerLabelSettings; + + /**Specifies the map type. + * @Default {'geometry'} + */ + layerType?: ej.datavisualization.Map.LayerType|string; + + /**Options for enabling and configuring legendSettings position, height, width, mode, type etc., + */ + legendSettings?: ShapeLayerLegendSettings; + + /**Specifies the map items template for shapes. + */ + mapItemsTemplate?: string; + + /**Specify markers for shape layer. + * @Default {[]} + */ + markers?: Array; + + /**Specifies the map marker template for map layer. + * @Default {null} + */ + markerTemplate?: string; + + /**Specify selectedMapShapes for shape layer + * @Default {[]} + */ + selectedMapShapes?: Array; + + /**Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.Map.SelectionMode|string; + + /**Specifies the shape data for the shape layer + */ + shapeDataobject?: any; + + /**Specifies the shape settings of map layer + */ + shapeSettings?: ShapeLayerShapeSettings; + + /**Shows or hides the map items. + * @Default {false} + */ + showMapItems?: boolean; + + /**Shows or hides the tooltip for shapes + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the sub shape layers + * @Default {[]} + */ + subLayers?: Array; + + /**Specifies the tooltip template for shapes. + */ + tooltipTemplate?: string; + + /**Specifies the url template for the OSM type map. + * @Default {'http://a.tile.openstreetmap.org/level/tileX/tileY.png'} + */ + urlTemplate?: string; +} +} +module Map +{ +enum Position +{ +//specifies the none position +None, +//specifies the topleft position +Topleft, +//specifies the topcenter position +Topcenter, +//specifies the topright position +Topright, +//specifies the centerleft position +Centerleft, +//specifies the center position +Center, +//specifies the centerright position +Centerright, +//specifies the bottomleft position +Bottomleft, +//specifies the bottomcenter position +Bottomcenter, +//specifies the bottomright position +Bottomright, +} +} +module Map +{ +enum Orientation +{ +//specifies the horizontal position +Horizontal, +//specifies the vertical position +Vertical, +} +} +module Map +{ +enum BingMapType +{ +//specifies the aerial type +Aerial, +//specifies the aerialwithlabel type +Aerialwithlabel, +//specifies the road type +Road, +} +} +module Map +{ +enum LabelSize +{ +//specifies the fixed size +Fixed, +//specifies the default size +Default, +} +} +module Map +{ +enum LayerType +{ +//specifies the geometry type +Geometry, +//specifies the osm type +Osm, +//specifies the bing type +Bing, +} +} +module Map +{ +enum DockPosition +{ +//specifies the top position +Top, +//specifies the bottom position +Bottom, +//specifies the bottom position +Right, +//specifies the left position +Left, +} +} +module Map +{ +enum LegendIcons +{ +//specifies the rectangle position +Rectangle, +//specifies the circle position +Circle, +} +} +module Map +{ +enum LabelOrientation +{ +//specifies the horizontal position +Horizontal, +//specifies the vertical position +Vertical, +} +} +module Map +{ +enum LegendMode +{ +//specifies the default mode +Default, +//specifies the interactive mode +Interactive, +} +} +module Map +{ +enum LegendType +{ +//specifies the layers type +Layers, +//specifies the bubbles type +Bubbles, +} +} +module Map +{ +enum SelectionMode +{ +//specifies the default position +Default, +//specifies the multiple position +Multiple, +} +} + +class TreeMap extends ej.Widget { + static fn: TreeMap; + constructor(element: JQuery, options?: TreeMap.Model); + constructor(element: Element, options?: TreeMap.Model); + model:TreeMap.Model; + defaults:TreeMap.Model; + + /** Method to reload treemap with updated values. + * @returns {void} + */ + refresh(): void; +} +export module TreeMap{ + +export interface Model { + + /**Specifies the border brush color of the treemap + * @Default {white} + */ + borderBrush?: string; + + /**Specifies the border thickness of the treemap + * @Default {1} + */ + borderThickness?: number; + + /**Specifies the colors of the paletteColorMapping + * @Default {[]} + */ + colors?: Array; + + /**Specifies the color valuepath of the treemap + * @Default {null} + */ + colorValuePath?: string; + + /**Specifies the datasource of the treemap + * @Default {null} + */ + dataSource?: any; + + /**Specifies the desaturationColorMapping settings of the treemap + */ + desaturationColorMapping?: any; + + /**Specifies the dockPosition for legend + * @Default {top} + */ + dockPosition?: ej.datavisualization.TreeMap.DockPosition|string; + + /**specifies the drillDown header color + * @Default {'null'} + */ + drillDownHeaderColor?: string; + + /**specifies the drillDown selection color + * @Default {'#000000'} + */ + drillDownSelectionColor?: string; + + /**Enable/Disable the drillDown for treemap + * @Default {false} + */ + enableDrillDown?: boolean; + + /**Specifies whether treemap need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /**Specifies the from value for desaturation color mapping + * @Default {0} + */ + from?: number; + + /**Specifies the group color mapping of the treemap + * @Default {[]} + */ + groupColorMapping?: Array; + + /**Specifies the height for legend + * @Default {30} + */ + height?: number; + + /**Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightBorderBrush?: string; + + /**Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightBorderThickness?: number; + + /**Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightGroupBorderBrush?: string; + + /**Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightGroupBorderThickness?: number; + + /**Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightGroupOnSelection?: boolean; + + /**Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightOnSelection?: boolean; + + /**Specifies the iconHeight for legend + * @Default {15} + */ + iconHeight?: number; + + /**Specifies the iconWidth for legend + * @Default {15} + */ + iconWidth?: number; + + /**Specifies the items layout mode of the treemap. Accepted itemsLayoutMode values are Squarified, SliceAndDiceHorizontal, SliceAndDiceVertical and SliceAndDiceAuto + * @Default {Squarified} + */ + itemsLayoutMode?: ej.datavisualization.TreeMap.ItemsLayoutMode|string; + + /**Specifies the leaf settings of the treemap + */ + leafItemSettings?: LeafItemSettings; + + /**Specifies the legend settings of the treemap + */ + legendSettings?: any; + + /**Specify levels of treemap for grouped visualization of datas + * @Default {[]} + */ + levels?: Array; + + /**Specifies the paletteColorMapping of the treemap + */ + paletteColorMapping?: any; + + /**Specifies the rangeColorMapping settings of the treemap + */ + rangeColorMapping?: Array; + + /**Specifies the rangeMaximum value for desaturation color mapping + * @Default {0} + */ + rangeMaximum?: number; + + /**Specifies the rangeMinimum value for desaturation color mapping + * @Default {0} + */ + rangeMinimum?: number; + + /**Specifies the legend visibility status of the treemap + * @Default {false} + */ + showLegend?: boolean; + + /**Specifies whether treemap tooltip need to be visible + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the template for legendSettings + * @Default {null} + */ + template?: string; + + /**Specifies the to value for desaturation color mapping + * @Default {0} + */ + to?: number; + + /**Specifies the tooltip template of the treemap + * @Default {null} + */ + tooltipTemplate?: string; + + /**Hold the treeMapItems to be displayed in treemap + * @Default {[]} + */ + treeMapItems?: Array; + + /**Hold the Level settings of TreeMap + */ + treeMapLevel?: TreeMapLevel; + + /**Specifies the uniColorMapping settings of the treemap + */ + uniColorMapping?: any; + + /**Specifies the weight valuepath of the treemap + * @Default {null} + */ + weightValuePath?: string; + + /**Specifies the width for legend + * @Default {100} + */ + width?: number; + + /**Triggers on treemap item selected.*/ + treeMapItemSelected? (e: TreeMapItemSelectedEventArgs): void; +} + +export interface TreeMapItemSelectedEventArgs { + + /**Returns selected treeMapItem object. + */ + originalEvent?: any; +} + +export interface LeafItemSettings { + + /**Specifies the border bruch color of the leaf item. + * @Default {white} + */ + borderBrush?: string; + + /**Specifies the border thickness of the leaf item. + * @Default {1} + */ + borderThickness?: number; + + /**Specifies the label template of the leaf item. + * @Default {null} + */ + itemTemplate?: string; + + /**Specifies the label path of the leaf item. + * @Default {null} + */ + labelPath?: string; + + /**Specifies the position of the leaf labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /**Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Shows or hides the label of the leaf item. + * @Default {false} + */ + showLabels?: boolean; +} + +export interface TreeMapLevel { + + /**specifies the group background + * @Default {null} + */ + groupBackground?: string; + + /**Specifies the group border color for tree map level. + * @Default {null} + */ + groupBorderColor?: string; + + /**Specifies the group border thickness for tree map level. + * @Default {1} + */ + groupBorderThickness?: number; + + /**Specifies the group gap for tree map level. + * @Default {1} + */ + groupGap?: number; + + /**Specifies the group padding for tree map level. + * @Default {4} + */ + groupPadding?: number; + + /**Specifies the group path for tree map level. + */ + groupPath?: string; + + /**Specifies the header height for tree map level. + * @Default {0} + */ + headerHeight?: number; + + /**Specifies the header template for tree map level. + * @Default {null} + */ + headerTemplate?: string; + + /**Specifies the mode of header visibility + * @Default {visible} + */ + headerVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Specifies the position of the labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /**Specifies the label template for tree map level. + * @Default {null} + */ + labelTemplate?: string; + + /**Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Shows or hides the header for tree map level. + * @Default {false} + */ + showHeader?: boolean; + + /**Shows or hides the labels for tree map level. + * @Default {false} + */ + showLabels?: boolean; +} +} +module TreeMap +{ +enum DockPosition +{ +//specifies the top position +Top, +//specifies the bottom position +Bottom, +//specifies the bottom position +Right, +//specifies the left position +Left, +} +} +module TreeMap +{ +enum ItemsLayoutMode +{ +//specifies the squarified as layout type position +Squarified, +//specifies the sliceanddicehorizontal as layout type position +Sliceanddicehorizontal, +//specifies the sliceanddicevertical as layout type position +Sliceanddicevertical, +//specifies the sliceanddiceauto as layout type position +Sliceanddiceauto, +} +} +module TreeMap +{ +enum Position +{ +//specifies the none position +None, +//specifies the topleft position +Topleft, +//specifies the topcenter position +Topcenter, +//specifies the topright position +Topright, +//specifies the centerleft position +Centerleft, +//specifies the center position +Center, +//specifies the centerright position +Centerright, +//specifies the bottomleft position +Bottomleft, +//specifies the bottomcenter position +Bottomcenter, +//specifies the bottomright position +Bottomright, +} +} +module TreeMap +{ +enum VisibilityMode +{ +//specifies the visible mode +Top, +//specifies the hideonexceededlength mode +Hideonexceededlength, +} +} +module TreeMap +{ +enum groupSelectionMode +{ +//specifies the default mode +Default, +//specifies the multiple mode +Multiple, +} +} + +class Diagram extends ej.Widget { + static fn: Diagram; + constructor(element: JQuery, options?: Diagram.Model); + constructor(element: Element, options?: Diagram.Model); + model:Diagram.Model; + defaults:Diagram.Model; + + /** Add nodes and connectors to diagram at runtime + * @param {any} a JSON to define a node/connector or an array of nodes and connector + * @returns {void} + */ + add(node: any): void; + + /** Add a label to a node at runtime + * @param {string} name of the node to which label will be added + * @param {any} JSON for the new label to be added + * @returns {void} + */ + addLabel(nodeName: string, newLabel: any): void; + + /** Add a phase to a swimlane at runtime + * @param {string} name of the swimlane to which the phase will be added + * @param {any} JSON object to define the phase to be added + * @returns {void} + */ + addPhase(name: string, options: any): void; + + /** Add a collection of ports to the node specified by name + * @param {string} name of the node to which the ports have to be added + * @param {Array} a collection of ports to be added to the specified node + * @returns {void} + */ + addPorts(name: string, ports: Array): void; + + /** Add the specified node to selection list + * @param {any} the node to be selected + * @param {boolean} to define whether to clear the existing selection or not + * @returns {void} + */ + addSelection(node: any, clearSelection: boolean): void; + + /** Align the selected objects based on the reference object and direction + * @param {string} to specify the direction towards which the selected objects are to be aligned("left","right",top","bottom") + * @returns {void} + */ + align(direction: string): void; + + /** Bring the specified portion of the diagram content to the diagram viewport + * @param {any} the rectangular region that is to be brought into diagram viewport + * @returns {void} + */ + bringIntoView(rect: any): void; + + /** Bring the specified portion of the diagram content to the center of the diagram viewport + * @param {any} the rectangular region that is to be brought to the center of diagram viewport + * @returns {void} + */ + bringToCenter(rect: any): void; + + /** Visually move the selected object over all other intersected objects + * @returns {void} + */ + bringToFront(): void; + + /** Remove all the elements from diagram + * @returns {void} + */ + clear(): void; + + /** Remove the current selection in diagram + * @returns {void} + */ + clearSelection(): void; + + /** Copy the selected object to internal clipboard and get the copied object + * @returns {any} + */ + copy(): any; + + /** Cut the selected object from diagram to diagram internal clipboard + * @returns {void} + */ + cut(): void; + + /** Export the diagram as downloadable files or as data + * @param {Diagram.Options} options to export the desired region of diagram to the desired formats.NameTypeDescriptionfileNamestringname of the file to be downloaded.formatstringformat of the exported file/data. See [File Formats](/js/api/global#fileformats).modestringto set whether to export diagram as a file or as raw data. See [Export Modes](/js/api/global#exportmodes).regionstringto set the region of the diagram to be exported. See [Region](/js/api/global#region).boundsobjectto export any custom region of diagram.marginobjectto set margin to the exported data. + * @returns {string} + */ + exportDiagram(options: Diagram.Options): string; + + /** Read a node/connector object by its name + * @param {string} name of the node/connector that is to be identified + * @returns {any} + */ + findNode(name: string): any; + + /** Fit the diagram content into diagram viewport + * @param {string} to set the mode of fit to command. See [Fit Mode](/js/api/global#fitmode) + * @param {string} to set whether the region to be fit will be based on diagram elements or page settings [Region](/js/api/global#region) + * @param {any} to set the required margin + * @returns {void} + */ + fitToPage(mode: string, region: string, margin: any): void; + + /** Group the selected nodes and connectors + * @returns {void} + */ + group(): void; + + /** Insert a label into a node's label collection at runtime + * @param {string} name of the node to which the label has to be inserted + * @param {any} JSON to define the new label + * @param {number} index to insert the label into the node + * @returns {void} + */ + insertLabel(name: string, label: any, index: number): void; + + /** Refresh the diagram with the specified layout + * @returns {void} + */ + layout(): void; + + /** Load the diagram + * @param {any} JSON data to load the diagram + * @returns {void} + */ + load(data: any): void; + + /** Visually move the selected object over its closest intersected object + * @returns {void} + */ + moveForward(): void; + + /** Move the selected objects by either one pixel or by the pixels specified through argument + * @param {string} specifies the direction to move the selected objects ("left","right",top","bottom") + * @param {number} specifies the number of pixels by which the selected objects have to be moved + * @returns {void} + */ + nudge(direction: string, delta: number): void; + + /** Paste the selected object from internal clipboard to diagram + * @param {any} object to be added to diagram + * @param {boolean} to define whether the specified object is to be renamed or not + * @returns {void} + */ + paste(object: any, rename: boolean): void; + + /** Print the diagram as image + * @returns {void} + */ + print(): void; + + /** Restore the last action that was reverted + * @returns {void} + */ + redo(): void; + + /** Refresh the diagram at runtime + * @returns {void} + */ + refresh(): void; + + /** Remove either the given node/connector or the selected element from diagram + * @param {any} the node/connector to be removed from diagram + * @returns {void} + */ + remove(node: any): void; + + /** Remove a particular object from selection list + * @param {any} the node/connector to be removed from selection list + * @returns {void} + */ + removeSelection(node: any): void; + + /** Scale the selected objects to the height of the first selected object + * @returns {void} + */ + sameHeight(): void; + + /** Scale the selected objects to the size of the first selected object + * @returns {void} + */ + sameSize(): void; + + /** Scale the selected objects to the width of the first selected object + * @returns {void} + */ + sameWidth(): void; + + /** Returns the diagram as serialized JSON + * @returns {any} + */ + save(): any; + + /** Bring the node into view + * @param {any} the node/connector to be brought into view + * @returns {void} + */ + scrollToNode(node: any): void; + + /** Select all nodes and connector in diagram + * @returns {void} + */ + selectAll(): void; + + /** Visually move the selected object behind its closest intersected object + * @returns {void} + */ + sendBackward(): void; + + /** Visually move the selected object behind all other intersected objects + * @returns {void} + */ + sendToBack(): void; + + /** Update the horizontal space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceAcross(): void; + + /** Update the vertical space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceDown(): void; + + /** Move the specified label to edit mode + * @param {any} node/connector that contains the label to be edited + * @param {any} to be edited + * @returns {void} + */ + startLabelEdit(node: any, label: any): void; + + /** Reverse the last action that was performed + * @returns {void} + */ + undo(): void; + + /** Ungroup the selected group + * @returns {void} + */ + ungroup(): void; + + /** Update diagram at runtime + * @param {any} JSON to specify the diagram properties that have to be modified + * @returns {void} + */ + update(options: any): void; + + /** Update Connectors at runtime + * @param {string} name of the connector to be updated + * @param {any} JSON to specify the connector properties that have to be updated + * @returns {void} + */ + updateConnector(name: string, options: any): void; + + /** Update the given label at runtime + * @param {string} the name of node/connector which contains the label to be updated + * @param {any} the label to be modified + * @param {any} JSON to specify the label properties that have to be updated + * @returns {any} + */ + updateLabel(nodeName: string, label: any, options: any): any; + + /** Update nodes at runtime + * @param {string} name of the node that is to be updated + * @param {any} JSON to specify the properties of node that have to be updated + * @returns {void} + */ + updateNode(name: string, options: any): void; + + /** Update a port with its modified properties at runtime + * @param {string} the name of node which contains the port to be updated + * @param {any} the port to be updated + * @param {any} JSON to specify the properties of the port that have to be updated + * @returns {void} + */ + updatePort(nodeName: string, port: any, options: any): void; + + /** Update the specified node as selected object + * @param {string} name of the node to be updated as selected object + * @returns {void} + */ + updateSelectedObject(name: string): void; + + /** Update the selection at runtime + * @param {boolean} to specify whether to show the user handles or not + * @returns {void} + */ + updateSelection(showUserHandles: boolean): void; + + /** Update userhandles with respect to the given node + * @param {any} node/connector with respect to which, the user handles have to be updated + * @returns {void} + */ + updateUserHandles(node: any): void; + + /** Update the diagram viewport at runtime + * @returns {void} + */ + updateViewPort(): void; + + /** Upgrade the diagram from old version + * @param {any} to be upgraded + * @returns {void} + */ + upgrade(data: any): void; + + /** Used to zoomIn/zoomOut diagram + * @param {any} options to zoom the diagram(zoom factor, zoomIn/zoomOut) + * @returns {void} + */ + zoomTo(zoom: any): void; +} +export module Diagram{ + +export interface Options { + + /**name of the file to be downloaded. + */ + fileName?: string; + + /**format of the exported file/data. See [File Formats](/js/api/global#fileformats). + */ + format?: string; + + /**to set whether to export diagram as a file or as raw data. See [Export Modes](/js/api/global#exportmodes). + */ + mode?: string; + + /**to set the region of the diagram to be exported. See [Region](/js/api/global#region). + */ + region?: string; + + /**to export any custom region of diagram. + */ + bounds?: any; + + /**to set margin to the exported data. + */ + margin?: any; +} + +export interface Model { + + /**Defines the background color of diagram elements + * @Default {transparent} + */ + backgroundColor?: string; + + /**Defines the path of the background image of diagram elements + * @Default {null} + */ + backgroundImage?: string; + + /**Sets the direction of line bridges. + * @Default {ej.datavisualization.Diagram.BridgeDirection.Top} + */ + bridgeDirection?: ej.datavisualization.Diagram.BridgeDirection|string; + + /**Defines a set of custom commands and binds them with a set of desired key gestures. + */ + commandManager?: CommandManager; + + /**A collection of JSON objects where each object represents a connector + * @Default {[]} + */ + connectors?: Array; + + /**Binds the custom JSON data with connector properties + * @Default {null} + */ + connectorTemplate?: any; + + /**Enables/Disables the default behaviors of the diagram. + * @Default {ej.datavisualization.Diagram.DiagramConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.DiagramConstraints|string; + + /**An object to customize the context menu of diagram + */ + contextMenu?: ContextMenu; + + /**Configures the data source that is to be bound with diagram + */ + dataSourceSettings?: DataSourceSettings; + + /**Initializes the default values for nodes and connectors + * @Default {{}} + */ + defaultSettings?: DefaultSettings; + + /**Sets the type of Json object to be drawn through drawing tool + * @Default {{}} + */ + drawType?: any; + + /**Enables or disables auto scroll in diagram + * @Default {true} + */ + enableAutoScroll?: boolean; + + /**Enables or disables diagram context menu + * @Default {true} + */ + enableContextMenu?: boolean; + + /**Specifies the height of the diagram + * @Default {null} + */ + height?: string; + + /**Customizes the undo redo functionality + */ + historyManager?: HistoryManager; + + /**Automatically arranges the nodes and connectors in a predefined manner + */ + layout?: Layout; + + /**Defines the current culture of diagram + * @Default {en-US} + */ + locale?: string; + + /**Array of JSON objects where each object represents a node + * @Default {[]} + */ + nodes?: Array; + + /**Binds the custom JSON data with node properties + * @Default {null} + */ + nodeTemplate?: any; + + /**Defines the size and appearance of diagram page + */ + pageSettings?: PageSettings; + + /**Defines the zoom value, zoom factor, scroll status and view port size of the diagram + */ + scrollSettings?: ScrollSettings; + + /**Defines the size and position of selected items and defines the appearance of selector + */ + selectedItems?: SelectedItems; + + /**Enables or disables tooltip of diagram + * @Default {true} + */ + showTooltip?: boolean; + + /**Defines the gridlines and defines how and when the objects have to be snapped + */ + snapSettings?: SnapSettings; + + /**Enables/Disables the interactive behaviors of diagram. + * @Default {ej.datavisualization.Diagram.Tool.All} + */ + tool?: ej.datavisualization.Diagram.Tool|string; + + /**An object that defines the description, appearance and alignments of tooltips + * @Default {null} + */ + tooltip?: Tooltip; + + /**Specifies the width of the diagram + * @Default {null} + */ + width?: string; + + /**Sets the factor by which we can zoom in or zoom out + * @Default {0.2} + */ + zoomFactor?: number; + + /**Triggers When auto scroll is changed*/ + autoScrollChange? (e: AutoScrollChangeEventArgs): void; + + /**Triggers when a node, connector or diagram is clicked*/ + click? (e: ClickEventArgs): void; + + /**Triggers when the connection is changed*/ + connectionChange? (e: ConnectionChangeEventArgs): void; + + /**Triggers when the connector collection is changed*/ + connectorCollectionChange? (e: ConnectorCollectionChangeEventArgs): void; + + /**Triggers when the connectors' source point is changed*/ + connectorSourceChange? (e: ConnectorSourceChangeEventArgs): void; + + /**Triggers when the connectors' target point is changed*/ + connectorTargetChange? (e: ConnectorTargetChangeEventArgs): void; + + /**Triggers before opening the context menu*/ + contextMenuBeforeOpen? (e: ContextMenuBeforeOpenEventArgs): void; + + /**Triggers when a context menu item is clicked*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Triggers when a node, connector or diagram model is clicked twice*/ + doubleClick? (e: DoubleClickEventArgs): void; + + /**Triggers while dragging the elements in diagram*/ + drag? (e: DragEventArgs): void; + + /**Triggers when a symbol is dragged into diagram from symbol palette*/ + dragEnter? (e: DragEnterEventArgs): void; + + /**Triggers when a symbol is dragged outside of the diagram.*/ + dragLeave? (e: DragLeaveEventArgs): void; + + /**Triggers when a symbol is dragged over diagram*/ + dragOver? (e: DragOverEventArgs): void; + + /**Triggers when a symbol is dragged and dropped from symbol palette to drawing area*/ + drop? (e: DropEventArgs): void; + + /**Triggers when a child is added to or removed from a group*/ + groupChange? (e: GroupChangeEventArgs): void; + + /**Triggers when a diagram element is clicked*/ + itemClick? (e: ItemClickEventArgs): void; + + /**Triggers when mouse enters a node/connector*/ + mouseEnter? (e: MouseEnterEventArgs): void; + + /**Triggers when mouse leaves node/connector*/ + mouseLeave? (e: MouseLeaveEventArgs): void; + + /**Triggers when mouse hovers over a node/connector*/ + mouseOver? (e: MouseOverEventArgs): void; + + /**Triggers when node collection is changed*/ + nodeCollectionChange? (e: NodeCollectionChangeEventArgs): void; + + /**Triggers when the node properties(x, y,width and height alone) are changed using nudge commands or updateNode API.*/ + propertyChange? (e: PropertyChangeEventArgs): void; + + /**Triggers when the diagram elements are rotated*/ + rotationChange? (e: RotationChangeEventArgs): void; + + /**Triggers when the diagram is zoomed or panned*/ + scrollChange? (e: ScrollChangeEventArgs): void; + + /**Triggers when a connector segment is edited*/ + segmentChange? (e: SegmentChangeEventArgs): void; + + /**Triggers when the selection is changed in diagram*/ + selectionChange? (e: SelectionChangeEventArgs): void; + + /**Triggers when a node is resized*/ + sizeChange? (e: SizeChangeEventArgs): void; + + /**Triggers when label editing is ended*/ + textChange? (e: TextChangeEventArgs): void; +} + +export interface AutoScrollChangeEventArgs { + + /**Returns the delay between subsequent auto scrolls + */ + delay?: string; +} + +export interface ClickEventArgs { + + /**parameter returns the clicked node, connector or diagram + */ + element?: any; + + /**parameter returns the object that is actually clicked + */ + actualObject?: number; + + /**parameter returns the horizontal coordinate of the mouse pointer, relative to the diagram + */ + offsetX?: number; + + /**parameter returns the vertical coordinate of the mouse pointer, relative to the diagram + */ + offsetY?: number; + + /**parameter returns the count of how many times the mouse button is pressed + */ + count?: number; + + /**parameter returns the actual click event arguments that explains which button is clicked + */ + event?: any; +} + +export interface ConnectionChangeEventArgs { + + /**parameter returns the connection that is changed between nodes, ports or points + */ + element?: any; + + /**parameter returns the new source node or target node of the connector + */ + connection?: string; + + /**parameter returns the new source port or target port of the connector + */ + port?: any; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ConnectorCollectionChangeEventArgs { + + /**parameter returns whether the connector is inserted or removed + */ + changeType?: string; + + /**parameter returns the connector that is to be added or deleted + */ + element?: any; + + /**parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; +} + +export interface ConnectorSourceChangeEventArgs { + + /**returns the connector, the source point of which is being dragged + */ + element?: any; + + /**returns the source node of the element + */ + node?: any; + + /**returns the source point of the element + */ + point?: any; + + /**returns the source port of the element + */ + port?: any; + + /**returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ConnectorTargetChangeEventArgs { + + /**parameter returns the connector, the target point of which is being dragged + */ + element?: any; + + /**returns the target node of the element + */ + node?: any; + + /**returns the target point of the element + */ + point?: any; + + /**returns the target port of the element + */ + port?: any; + + /**returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ContextMenuBeforeOpenEventArgs { + + /**parameter returns the diagram object + */ + diagram?: any; + + /**parameter returns the actual arguments from context menu + */ + contextmenu?: any; + + /**parameter returns the object that was clicked + */ + target?: any; +} + +export interface ContextMenuClickEventArgs { + + /**parameter returns the id of the selected context menu item + */ + id?: string; + + /**parameter returns the text of the selected context menu item + */ + text?: string; + + /**parameter returns the parent id of the selected context menu item + */ + parentId?: string; + + /**parameter returns the parent text of the selected context menu item + */ + parentText?: string; + + /**parameter returns the object that was clicked + */ + target?: any; + + /**parameter defines whether to execute the click event or not + */ + canExecute?: boolean; +} + +export interface DoubleClickEventArgs { + + /**parameter returns the object that is actually clicked + */ + actualObject?: any; + + /**parameter returns the selected object + */ + element?: any; +} + +export interface DragEventArgs { + + /**parameter returns the node or connector that is being dragged + */ + element?: any; + + /**parameter returns the previous position of the node/connector + */ + oldValue?: any; + + /**parameter returns the new position of the node/connector + */ + newValue?: any; + + /**parameter returns the state of drag event (Starting, dragging, completed) + */ + dragState?: string; + + /**parameter returns whether or not to cancel the drag event + */ + cancel?: boolean; +} + +export interface DragEnterEventArgs { + + /**parameter returns the node or connector that is dragged into diagram + */ + element?: any; + + /**parameter returns whether to add or remove the symbol from diagram + */ + cancel?: boolean; +} + +export interface DragLeaveEventArgs { + + /**parameter returns the node or connector that is dragged outside of the diagram + */ + element?: any; +} + +export interface DragOverEventArgs { + + /**parameter returns the node or connector that is dragged over diagram + */ + element?: any; + + /**parameter defines whether the symbol can be dropped at the current mouse position + */ + allowDrop?: boolean; + + /**parameter returns the node/connector over which the symbol is dragged + */ + target?: any; + + /**parameter returns the previous position of the node/connector + */ + oldValue?: any; + + /**parameter returns the new position of the node/connector + */ + newValue?: any; + + /**parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; +} + +export interface DropEventArgs { + + /**parameter returns node or connector that is being dropped + */ + element?: any; + + /**parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; + + /**parameter returns the object from where the element is dragged + */ + source?: any; + + /**parameter returns the object over which the object will be dropped + */ + target?: any; + + /**parameter returns the enum which defines the type of the source + */ + sourceType?: string; +} + +export interface GroupChangeEventArgs { + + /**parameter returns the object that is added to/removed from a group + */ + element?: any; + + /**parameter returns the old parent group(if any) of the object + */ + oldParent?: any; + + /**parameter returns the new parent group(if any) of the object + */ + newParent?: any; + + /**parameter returns the cause of group change("group", unGroup") + */ + cause?: string; +} + +export interface ItemClickEventArgs { + + /**parameter returns the object that was actually clicked + */ + actualObject?: any; + + /**parameter returns the object that is selected + */ + selectedObject?: any; + + /**parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; + + /**parameter returns the actual click event arguments that explains which button is clicked + */ + event?: any; +} + +export interface MouseEnterEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the selected object is dragged + */ + source?: any; + + /**parameter returns the target object over which the selected object is dragged + */ + target?: any; +} + +export interface MouseLeaveEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the selected object is dragged + */ + source?: any; + + /**parameter returns the target object over which the selected object is dragged + */ + target?: any; +} + +export interface MouseOverEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the element is dragged + */ + source?: any; + + /**parameter returns the object over which the element is being dragged. + */ + target?: any; +} + +export interface NodeCollectionChangeEventArgs { + + /**parameter returns whether the node is to be added or removed + */ + changeType?: string; + + /**parameter returns the node which needs to be added or deleted + */ + element?: any; + + /**parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; +} + +export interface PropertyChangeEventArgs { + + /**parameter returns the selected element + */ + element?: any; + + /**parameter returns the action is nudge or not + */ + cause?: string; + + /**parameter returns the new value of the node property that is being changed + */ + newValue?: any; + + /**parameter returns the old value of the property that is being changed + */ + oldValue?: any; + + /**parameter returns the name of the property that is changed + */ + propertyName?: string; +} + +export interface RotationChangeEventArgs { + + /**parameter returns the node that is rotated + */ + element?: any; + + /**parameter returns the previous rotation angle + */ + oldValue?: any; + + /**parameter returns the new rotation angle + */ + newValue?: any; + + /**parameter to specify whether or not to cancel the event + */ + cancel?: boolean; +} + +export interface ScrollChangeEventArgs { + + /**Parameter returns the new zoom value, horizontal and vertical scroll offsets. + */ + newValues?: any; + + /**parameter returns the previous zoom value, horizontal and vertical scroll offsets. + */ + oldValues?: any; +} + +export interface SegmentChangeEventArgs { + + /**Parameter returns the connector that is being edited + */ + element?: any; + + /**parameter returns the state of editing (starting, dragging, completed) + */ + dragState?: string; + + /**parameter returns the current mouse position + */ + point?: any; + + /**parameter to specify whether or not to cancel the event + */ + cancel?: boolean; +} + +export interface SelectionChangeEventArgs { + + /**parameter returns whether the item is selected or removed selection + */ + changeType?: string; + + /**parameter returns the item which is selected or to be selected + */ + element?: any; + + /**parameter returns the collection of nodes and connectors that have to be removed from selection list + */ + oldItems?: Array; + + /**parameter returns the collection of nodes and connectors that have to be added to selection list + */ + newItems?: Array; + + /**parameter returns the collection of nodes and connectors that will be selected after selection change + */ + selectedItems?: Array; + + /**parameter to specify whether or not to cancel the selection change event + */ + cancel?: boolean; +} + +export interface SizeChangeEventArgs { + + /**parameter returns node that was resized + */ + element?: any; + + /**parameter to cancel the size change + */ + cancel?: boolean; + + /**parameter returns the new width, height, offsetX and offsetY values of the element that is being resized + */ + newValue?: any; + + /**parameter returns the previous width,height,offsetX and offsetY values of the element that is being resized + */ + oldValue?: any; + + /**parameter returns the state of resizing(starting,resizing,completed) + */ + resizeState?: string; + + /**parameter returns the difference between new and old value + */ + offset?: any; +} + +export interface TextChangeEventArgs { + + /**parameter returns the node that contains the text being edited + */ + element?: any; + + /**parameter returns the new text + */ + value?: string; + + /**parameter returns the keyCode of the key entered + */ + keyCode?: string; +} + +export interface CommandManagerCommandsGesture { + + /**Sets the key value, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.Keys.None} + */ + key?: ej.datavisualization.Diagram.Keys|string; + + /**Sets a combination of key modifiers, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.KeyModifiers.None} + */ + keyModifiers?: ej.datavisualization.Diagram.KeyModifiers|string; +} + +export interface CommandManagerCommands { + + /**A method that defines whether the command is executable at the moment or not. + */ + canExecute?: Function; + + /**A method that defines what to be executed when the key combination is recognized. + */ + execute?: Function; + + /**Defines a combination of keys and key modifiers, on recognition of which the command will be executed + */ + gesture?: CommandManagerCommandsGesture; + + /**Defines any additional parameters that are required at runtime + * @Default {null} + */ + parameter?: any; +} + +export interface CommandManager { + + /**An object that maps a set of command names with the corresponding command objects + * @Default {{}} + */ + commands?: CommandManagerCommands; +} + +export interface ConnectorsSegments { + + /**Sets the direction of orthogonal segment + */ + direction?: string; + + /**Describes the length of orthogonal segment + * @Default {undefined} + */ + length?: number; + + /**Describes the end point of bezier/straight segment + * @Default {Diagram.Point()} + */ + point?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Defines the first control point of the bezier segment + * @Default {null} + */ + point1?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Defines the second control point of bezier segment + * @Default {null} + */ + point2?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Sets the type of the segment. + * @Default {ej.datavisualization.Diagram.Segments.Straight} + */ + type?: ej.datavisualization.Diagram.Segments|string; + + /**Describes the length and angle between the first control point and the start point of bezier segment + * @Default {null} + */ + vector1?: any; + + /**Describes the length and angle between the second control point and end point of bezier segment + * @Default {null} + */ + vector2?: any; +} + +export interface ConnectorsSourceDecorator { + + /**Sets the border color of the source decorator + * @Default {black} + */ + borderColor?: string; + + /**Sets the border width of the decorator + * @Default {1} + */ + borderWidth?: number; + + /**Sets the fill color of the source decorator + * @Default {black} + */ + fillColor?: string; + + /**Sets the height of the source decorator + * @Default {8} + */ + height?: number; + + /**Defines the custom shape of the source decorator + */ + pathData?: string; + + /**Defines the shape of the source decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /**Defines the width of the source decorator + * @Default {8} + */ + width?: number; +} + +export interface ConnectorsSourcePoint { + + /**Defines the x-coordinate of a position + * @Default {0} + */ + x?: number; + + /**Defines the y-coordinate of a position + * @Default {0} + */ + y?: number; +} + +export interface ConnectorsTargetDecorator { + + /**Sets the border color of the decorator + * @Default {black} + */ + borderColor?: string; + + /**Sets the color with which the decorator will be filled + * @Default {black} + */ + fillColor?: string; + + /**Defines the height of the target decorator + * @Default {8} + */ + height?: number; + + /**Defines the custom shape of the target decorator + */ + pathData?: string; + + /**Defines the shape of the target decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /**Defines the width of the target decorator + * @Default {8} + */ + width?: number; +} + +export interface Connectors { + + /**To maintain additional information about connectors + * @Default {null} + */ + addInfo?: any; + + /**Defines the width of the line bridges + * @Default {10} + */ + bridgeSpace?: number; + + /**Enables or disables the behaviors of connectors. + * @Default {ej.datavisualization.Diagram.ConnectorConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.ConnectorConstraints|string; + + /**Defines the radius of the rounded corner + * @Default {0} + */ + cornerRadius?: number; + + /**Configures the styles of shapes + */ + cssClass?: string; + + /**Sets the horizontal alignment of the connector. Applicable, if the parent of the connector is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**A collection of JSON objects where each object represents a label. For label properties, refer Labels + * @Default {[]} + */ + labels?: Array; + + /**Sets the stroke color of the connector + * @Default {black} + */ + lineColor?: string; + + /**Sets the pattern of dashes and gaps used to stroke the path of the connector + */ + lineDashArray?: string; + + /**Defines the padding value to ease the interaction with connectors + * @Default {10} + */ + lineHitPadding?: number; + + /**Sets the width of the line + * @Default {1} + */ + lineWidth?: number; + + /**Defines the minimum space to be left between the bottom of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /**Defines the minimum space to be left between the left of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /**Defines the minimum space to be left between the right of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /**Defines the minimum space to be left between the top of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /**Sets a unique name for the connector + */ + name?: string; + + /**Defines the transparency of the connector + * @Default {1} + */ + opacity?: number; + + /**Defines the size and preview size of the node to add that to symbol palette. To explore palette item, refer Palette Item + * @Default {null} + */ + paletteItem?: any; + + /**Sets the parent name of the connector. + */ + parent?: string; + + /**An array of JSON objects where each object represents a segment + * @Default {[ { type:straight } ]} + */ + segments?: Array; + + /**Defines the source decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + sourceDecorator?: ConnectorsSourceDecorator; + + /**Sets the source node of the connector + */ + sourceNode?: string; + + /**Defines the space to be left between the source node and the source point of a connector + * @Default {0} + */ + sourcePadding?: number; + + /**Describes the start point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + sourcePoint?: ConnectorsSourcePoint; + + /**Sets the source port of the connector + */ + sourcePort?: string; + + /**Defines the target decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + targetDecorator?: ConnectorsTargetDecorator; + + /**Sets the target node of the connector + */ + targetNode?: string; + + /**Defines the space to be left between the target node and the target point of the connector + * @Default {0} + */ + targetPadding?: number; + + /**Describes the end point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + targetPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Sets the targetPort of the connector + */ + targetPort?: string; + + /**Defines the tooltip that should be shown when the mouse hovers over connector. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /**To set the vertical alignment of connector (Applicable,if the parent is group). + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Enables or disables the visibility of connector + * @Default {true} + */ + visible?: boolean; + + /**Sets the z-index of the connector + * @Default {0} + */ + zOrder?: number; +} + +export interface ContextMenu { + + /**Defines the collection of context menu items + * @Default {[]} + */ + items?: Array; + + /**To set whether to display the default context menu items or not + * @Default {false} + */ + showCustomMenuItemsOnly?: boolean; +} + +export interface DataSourceSettings { + + /**Defines the data source either as a collection of objects or as an instance of ej.DataManager + * @Default {null} + */ + dataSource?: any; + + /**Sets the unique id of the data source items + */ + id?: string; + + /**Defines the parent id of the data source item + * @Default {''} + */ + parent?: string; + + /**Describes query to retrieve a set of data from the specified datasource + * @Default {null} + */ + query?: string; + + /**Sets the unique id of the root data source item + */ + root?: string; + + /**Describes the name of the table on which the specified query has to be executed + * @Default {null} + */ + tableName?: string; +} + +export interface DefaultSettings { + + /**Initializes the default connector properties + * @Default {null} + */ + connector?: any; + + /**Initializes the default properties of groups + * @Default {null} + */ + group?: any; + + /**Initializes the default properties for nodes + * @Default {null} + */ + node?: any; +} + +export interface HistoryManager { + + /**A method that takes a history entry as argument and returns whether the specific entry can be popped or not + */ + canPop?: Function; + + /**A method that ends grouping the changes + */ + closeGroupAction?: Function; + + /**A method that removes the history of a recent change made in diagram + */ + pop?: Function; + + /**A method that allows to track the custom changes made in diagram + */ + push?: Function; + + /**Defines what should be happened while trying to restore a custom change + * @Default {null} + */ + redo?: Function; + + /**A method that starts to group the changes to revert/restore them in a single undo or redo + */ + startGroupAction?: Function; + + /**Defines what should be happened while trying to revert a custom change + */ + undo?: Function; +} + +export interface Layout { + + /**Defines the fixed node with reference to which, the layout will be arranged and fixed node will not be repositioned + */ + fixedNode?: string; + + /**Customizes the orientation of trees/sub trees. For orientations, see Chart Orientations. For chart types, see Chart Types + * @Default {null} + */ + getLayoutInfo?: any; + + /**Sets the space to be horizontally left between nodes + * @Default {30} + */ + horizontalSpacing?: number; + + /**Sets the margin value to be horizontally left between the layout and diagram + * @Default {0} + */ + marginX?: number; + + /**Sets the margin value to be vertically left between layout and diagram + * @Default {0} + */ + marginY?: number; + + /**Sets the orientation/direction to arrange the diagram elements. + * @Default {ej.datavisualization.Diagram.LayoutOrientations.TopToBottom} + */ + orientation?: ej.datavisualization.Diagram.LayoutOrientations|string; + + /**Sets the type of the layout based on which the elements will be arranged. + * @Default {ej.datavisualization.Diagram.LayoutTypes.None} + */ + type?: ej.datavisualization.Diagram.LayoutTypes|string; + + /**Sets the space to be vertically left between nodes + * @Default {30} + */ + verticalSpacing?: number; +} + +export interface NodesContainer { + + /**Defines the orientation of the container. Applicable, if the group is a container. + * @Default {vertical} + */ + orientation?: string; + + /**Sets the type of the container. Applicable if the group is a container. + * @Default {ej.datavisualization.Diagram.ContainerType.Canvas} + */ + type?: ej.datavisualization.Diagram.ContainerType|string; +} + +export interface NodesGradientLinearGradient { + + /**Defines the different colors and the region of color transitions + * @Default {[]} + */ + stops?: Array; + + /**Defines the left most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x1?: number; + + /**Defines the right most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x2?: number; + + /**Defines the top most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y1?: number; + + /**Defines the bottom most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y2?: number; +} + +export interface NodesGradientRadialGradient { + + /**Defines the position of the outermost circle + * @Default {0} + */ + cx?: number; + + /**Defines the outer most circle of the radial gradient + * @Default {0} + */ + cy?: number; + + /**Defines the innermost circle of the radial gradient + * @Default {0} + */ + fx?: number; + + /**Defines the innermost circle of the radial gradient + * @Default {0} + */ + fy?: number; + + /**Defines the different colors and the region of color transitions. + * @Default {[]} + */ + stops?: Array; +} + +export interface NodesGradientStop { + + /**Sets the color to be filled over the specified region + */ + color?: string; + + /**Sets the position where the previous color transition ends and a new color transition starts + * @Default {0} + */ + offset?: number; + + /**Describes the transparency level of the region + * @Default {1} + */ + opacity?: number; +} + +export interface NodesGradient { + + /**Paints the node with linear color transitions + */ + LinearGradient?: NodesGradientLinearGradient; + + /**Paints the node with radial color transitions. A focal point defines the beginning of the gradient, and a circle defines the end point of the gradient. + */ + RadialGradient?: NodesGradientRadialGradient; + + /**Defines the color and a position where the previous color transition ends and a new color transition starts + */ + Stop?: NodesGradientStop; +} + +export interface NodesLabels { + + /**Enables/disables the bold style + * @Default {false} + */ + bold?: boolean; + + /**Sets the border color of the label + * @Default {transparent} + */ + borderColor?: string; + + /**Sets the border width of the label + * @Default {0} + */ + borderWidth?: number; + + /**Sets the fill color of the text area + * @Default {transparent} + */ + fillColor?: string; + + /**Sets the font color of the text + * @Default {black} + */ + fontColor?: string; + + /**Sets the font family of the text + * @Default {Arial} + */ + fontFamily?: string; + + /**Defines the font size of the text + * @Default {12} + */ + fontSize?: number; + + /**Sets the horizontal alignment of the label. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**Enables/disables the italic style + * @Default {false} + */ + italic?: boolean; + + /**To set the margin of the label + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /**Gets whether the label is currently being edited or not. + * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} + */ + mode?: ej.datavisualization.Diagram.LabelEditMode|string; + + /**Sets the unique identifier of the label + */ + name?: string; + + /**Sets the fraction/ratio(relative to node) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + offset?: any; + + /**Defines whether the label is editable or not + * @Default {false} + */ + readOnly?: boolean; + + /**Defines the angle to which the label needs to be rotated + * @Default {0} + */ + rotateAngle?: number; + + /**Defines the label text + */ + text?: string; + + /**Defines how to align the text inside the label. + * @Default {ej.datavisualization.Diagram.TextAlign.Center} + */ + textAlign?: ej.datavisualization.Diagram.TextAlign|string; + + /**Sets how to decorate the label text. + * @Default {ej.datavisualization.Diagram.TextDecorations.None} + */ + textDecoration?: ej.datavisualization.Diagram.TextDecorations|string; + + /**Sets the vertical alignment of the label. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Enables or disables the visibility of the label + * @Default {true} + */ + visible?: boolean; + + /**Sets the width of the label(the maximum value of label width and the node width will be considered as label width) + * @Default {50} + */ + width?: number; + + /**Defines how the label text needs to be wrapped. + * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} + */ + wrapping?: ej.datavisualization.Diagram.TextWrapping|string; +} + +export interface NodesLanes { + + /**Allows to maintain additional information about lane + * @Default {{}} + */ + addInfo?: any; + + /**An array of objects where each object represents a child node of the lane + * @Default {[]} + */ + children?: Array; + + /**Defines the fill color of the lane + * @Default {white} + */ + fillColor?: string; + + /**Defines the header of the lane + * @Default {{ text: Function, fontSize: 11 }} + */ + header?: any; + + /**Defines the object as a lane + * @Default {false} + */ + isLane?: boolean; + + /**Sets the unique identifier of the lane + */ + name?: string; + + /**Sets the orientation of the lane. + * @Default {vertical} + */ + orientation?: string; +} + +export interface NodesPaletteItem { + + /**Defines whether the symbol should be drawn at its actual size regardless of precedence factors or not + * @Default {true} + */ + enableScale?: boolean; + + /**Defines the height of the symbol + * @Default {0} + */ + height?: number; + + /**Defines the margin of the symbol item + * @Default {{ left: 4, right: 4, top: 4, bottom: 4 }} + */ + margin?: any; + + /**Defines the preview height of the symbol + * @Default {undefined} + */ + previewHeight?: number; + + /**Defines the preview width of the symbol + * @Default {undefined} + */ + previewWidth?: number; + + /**Defines the width of the symbol + * @Default {0} + */ + width?: number; +} + +export interface NodesPhases { + + /**Defines the header of the smaller regions + * @Default {null} + */ + label?: any; + + /**Defines the line color of the splitter that splits adjacent phases. + * @Default {#606060} + */ + lineColor?: string; + + /**Sets the dash array that used to stroke the phase splitter + * @Default {3,3} + */ + lineDashArray?: string; + + /**Sets the lineWidth of the phase + * @Default {1} + */ + lineWidth?: number; + + /**Sets the unique identifier of the phase + */ + name?: string; + + /**Sets the length of the smaller region(phase) of a swimlane + * @Default {100} + */ + offset?: number; + + /**Sets the orientation of the phase + * @Default {horizontal} + */ + orientation?: string; + + /**Sets the type of the object as phase + * @Default {phase} + */ + type?: string; +} + +export interface NodesPorts { + + /**Sets the border color of the port + * @Default {#1a1a1a} + */ + borderColor?: string; + + /**Sets the stroke width of the port + * @Default {1} + */ + borderWidth?: number; + + /**Defines the space to be left between the port bounds and its incoming and outgoing connections. + * @Default {0} + */ + connectorPadding?: number; + + /**Defines whether connections can be created with the port + * @Default {ej.datavisualization.Diagram.PortConstraints.Connect} + */ + constraints?: ej.datavisualization.Diagram.PortConstraints|string; + + /**Sets the fill color of the port + * @Default {white} + */ + fillColor?: string; + + /**Sets the unique identifier of the port + */ + name?: string; + + /**Defines the position of the port as fraction/ ratio relative to node + * @Default {ej.datavisualization.Diagram.Point(0, 0)} + */ + offset?: any; + + /**Defines the path data to draw the port. Applicable, if the port shape is path. + */ + pathData?: string; + + /**Defines the shape of the port. + * @Default {ej.datavisualization.Diagram.PortShapes.Square} + */ + shape?: ej.datavisualization.Diagram.PortShapes|string; + + /**Defines the size of the port + * @Default {8} + */ + size?: number; + + /**Defines when the port should be visible. + * @Default {ej.datavisualization.Diagram.PortVisibility.Default} + */ + visibility?: ej.datavisualization.Diagram.PortVisibility|string; +} + +export interface NodesShadow { + + /**Defines the angle of the shadow relative to node + * @Default {45} + */ + angle?: number; + + /**Sets the distance to move the shadow relative to node + * @Default {5} + */ + distance?: number; + + /**Defines the opaque of the shadow + * @Default {0.7} + */ + opacity?: number; +} + +export interface NodesSubProcess { + + /**Defines whether the bpmn sub process is without any prescribed order or not + * @Default {false} + */ + adhoc?: boolean; + + /**Sets the boundary of the BPMN process + * @Default {ej.datavisualization.Diagram.BPMNBoundary.Default} + */ + boundary?: ej.datavisualization.Diagram.BPMNBoundary|string; + + /**Sets whether the bpmn subprocess is triggered as a compensation of a specific activity + * @Default {false} + */ + compensation?: boolean; + + /**Defines the loop type of a sub process. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; +} + +export interface NodesTask { + + /**To set whether the task is a global task or not + * @Default {false} + */ + call?: boolean; + + /**Sets whether the task is triggered as a compensation of another specific activity + * @Default {false} + */ + compensation?: boolean; + + /**Sets the loop type of a bpmn task. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; + + /**Sets the type of the BPMN task. + * @Default {ej.datavisualization.Diagram.BPMNTasks.None} + */ + type?: ej.datavisualization.Diagram.BPMNTasks|string; +} + +export interface Nodes { + + /**Defines the type of BPMN Activity. Applicable, if the node is a bpmn activity. + * @Default {ej.datavisualization.Diagram.BPMNActivity.Task} + */ + activity?: ej.datavisualization.Diagram.BPMNActivity|string; + + /**To maintain additional information about nodes + * @Default {{}} + */ + addInfo?: any; + + /**Sets the border color of node + * @Default {black} + */ + borderColor?: string; + + /**Sets the pattern of dashes and gaps to stroke the border + */ + borderDashArray?: string; + + /**Sets the border width of the node + * @Default {1} + */ + borderWidth?: number; + + /**Defines whether the group can be ungrouped or not + * @Default {true} + */ + canUngroup?: boolean; + + /**Array of JSON objects where each object represents a child node/connector + * @Default {[]} + */ + children?: Array; + + /**Defines whether the BPMN data object is a collection or not + * @Default {false} + */ + collection?: boolean; + + /**Defines the distance to be left between a node and its connections(In coming and out going connections). + * @Default {0} + */ + connectorPadding?: number; + + /**Enables or disables the default behaviors of the node. + * @Default {ej.datavisualization.Diagram.NodeConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.NodeConstraints|string; + + /**Defines how the child objects need to be arranged(Either in any predefined manner or automatically). Applicable, if the node is a group. + * @Default {null} + */ + container?: NodesContainer; + + /**Defines the corner radius of rectangular shapes. + * @Default {0} + */ + cornerRadius?: number; + + /**Configures the styles of shapes + */ + cssClass?: string; + + /**Sets the type of the BPMN Events. Applicable, if the node is a bpmn event. + * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} + */ + event?: ej.datavisualization.Diagram.BPMNEvents|string; + + /**Defines whether the node can be automatically arranged using layout or not + * @Default {false} + */ + excludeFromLayout?: boolean; + + /**Defines the fill color of the node + * @Default {white} + */ + fillColor?: string; + + /**Sets the type of the BPMN Gateway. Applicable, if the node is a bpmn gateway. + * @Default {ej.datavisualization.Diagram.BPMNGateways.None} + */ + gateway?: ej.datavisualization.Diagram.BPMNGateways|string; + + /**Paints the node with a smooth transition from one color to another color + */ + gradient?: NodesGradient; + + /**Defines the header of a swimlane/lane + * @Default {{ text: Title, fontSize: 11 }} + */ + header?: any; + + /**Defines the height of the node + * @Default {0} + */ + height?: number; + + /**Sets the horizontal alignment of the node. Applicable, if the parent of the node is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**A read only collection of the incoming connectors/edges of the node + * @Default {[]} + */ + inEdges?: Array; + + /**Defines whether the sub tree of the node is expanded or collapsed + * @Default {true} + */ + isExpanded?: boolean; + + /**Sets the node as a swimlane + * @Default {false} + */ + isSwimlane?: boolean; + + /**A collection of objects where each object represents a label + * @Default {[]} + */ + labels?: Array; + + /**An array of objects where each object represents a lane. Applicable, if the node is a swimlane. + * @Default {[]} + */ + lanes?: Array; + + /**Defines the minimum space to be left between the bottom of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /**Defines the minimum space to be left between the left of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /**Defines the minimum space to be left between the right of the parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /**Defines the minimum space to be left between the top of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /**Defines the maximum height limit of the node + * @Default {0} + */ + maxHeight?: number; + + /**Defines the maximum width limit of the node + * @Default {0} + */ + maxWidth?: number; + + /**Defines the minimum height limit of the node + * @Default {0} + */ + minHeight?: number; + + /**Defines the minimum width limit of the node + * @Default {0} + */ + minWidth?: number; + + /**Sets the unique identifier of the node + */ + name?: string; + + /**Defines the position of the node on X-Axis + * @Default {0} + */ + offsetX?: number; + + /**Defines the position of the node on Y-Axis + * @Default {0} + */ + offsetY?: number; + + /**Defines the opaque of the node + * @Default {1} + */ + opacity?: number; + + /**Defines the orientation of nodes. Applicable, if the node is a swimlane. + * @Default {vertical} + */ + orientation?: string; + + /**A read only collection of outgoing connectors/edges of the node + * @Default {[]} + */ + outEdges?: Array; + + /**Defines the minimum padding value to be left between the bottom most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingBottom?: number; + + /**Defines the minimum padding value to be left between the left most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingLeft?: number; + + /**Defines the minimum padding value to be left between the right most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingRight?: number; + + /**Defines the minimum padding value to be left between the top most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingTop?: number; + + /**Defines the size and preview size of the node to add that to symbol palette + * @Default {null} + */ + paletteItem?: NodesPaletteItem; + + /**Sets the name of the parent group + */ + parent?: string; + + /**Sets the path geometry that defines the shape of a path node + */ + pathData?: string; + + /**An array of objects, where each object represents a smaller region(phase) of a swimlane. + * @Default {[]} + */ + phases?: Array; + + /**Sets the height of the phase headers + * @Default {0} + */ + phaseSize?: number; + + /**Sets the ratio/ fractional value relative to node, based on which the node will be transformed(positioning, scaling and rotation) + * @Default {ej.datavisualization.Diagram.Points(0.5,0.5)} + */ + pivot?: any; + + /**Defines a collection of points to draw a polygon. Applicable, if the shape is a polygon. + * @Default {[]} + */ + points?: Array; + + /**An array of objects where each object represents a port + * @Default {[]} + */ + ports?: Array; + + /**Sets the angle to which the node should be rotated + * @Default {0} + */ + rotateAngle?: number; + + /**Defines the opacity and the position of shadow + * @Default {ej.datavisualization.Diagram.Shadow()} + */ + shadow?: NodesShadow; + + /**Sets the shape of the node. It depends upon the type of node. + * @Default {ej.datavisualization.Diagram.BasicShapes.Rectangle} + */ + shape?: ej.datavisualization.Diagram.BasicShapes|string; + + /**Sets the source path of the image. Applicable, if the type of the node is image. + */ + source?: string; + + /**Defines the sub process of a BPMN Activity. Applicable, if the type of the bpmn activity is sub process. + * @Default {ej.datavisualization.Diagram.BPMNSubProcess()} + */ + subProcess?: NodesSubProcess; + + /**Defines the task of the bpmn activity. Applicable, if the type of activity is set as task. + * @Default {ej.datavisualization.Diagram.BPMNTask()} + */ + task?: NodesTask; + + /**Sets the id of svg/html templates. Applicable, if the node is html or native. + */ + templateId?: string; + + /**Defines the textBlock of a text node + * @Default {null} + */ + textBlock?: any; + + /**Defines the tooltip that should be shown when the mouse hovers over node. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /**Sets the type of BPMN Event Triggers. + * @Default {ej.datavisualization.Diagram.BPMNTriggers.None} + */ + trigger?: ej.datavisualization.Diagram.BPMNTriggers|string; + + /**Defines the type of the node. + * @Default {ej.datavisualization.Diagram.Shapes.Basic} + */ + type?: ej.datavisualization.Diagram.Shapes|string; + + /**Sets the vertical alignment of a node. Applicable, if the parent of a node is a container. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Defines the visibility of the node + * @Default {true} + */ + visible?: boolean; + + /**Defines the width of the node + * @Default {0} + */ + width?: number; + + /**Defines the z-index of the node + * @Default {0} + */ + zOrder?: number; +} + +export interface PageSettings { + + /**Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling + * @Default {{ left: 15, top: 15, right: 15, bottom: 15 }} + */ + autoScrollBorder?: any; + + /**Sets whether multiple pages can be created to fit all nodes and connectors + * @Default {false} + */ + multiplePage?: boolean; + + /**Defines the background color of diagram pages + * @Default {#ffffff} + */ + pageBackgroundColor?: string; + + /**Defines the page border color + * @Default {#565656} + */ + pageBorderColor?: string; + + /**Sets the border width of diagram pages + * @Default {0} + */ + pageBorderWidth?: number; + + /**Defines the height of a page + * @Default {null} + */ + pageHeight?: number; + + /**Defines the page margin + * @Default {24} + */ + pageMargin?: number; + + /**Sets the orientation of the page. + * @Default {ej.datavisualization.Diagram.PageOrientations.Portrait} + */ + pageOrientation?: ej.datavisualization.Diagram.PageOrientations|string; + + /**Defines the height of a diagram page + * @Default {null} + */ + pageWidth?: number; + + /**Defines the scrollable area of diagram. Applicable, if the scroll limit is "limited". + * @Default {null} + */ + scrollableArea?: any; + + /**Defines the scrollable region of diagram. + * @Default {ej.datavisualization.Diagram.ScrollLimit.Infinite} + */ + scrollLimit?: ej.datavisualization.Diagram.ScrollLimit|string; + + /**Enables or disables the page breaks + * @Default {false} + */ + showPageBreak?: boolean; +} + +export interface ScrollSettings { + + /**Allows to read the zoom value of diagram + * @Default {0} + */ + currentZoom?: number; + + /**Sets the horizontal scroll offset + * @Default {0} + */ + horizontalOffset?: number; + + /**Allows to extend the scrollable region that is based on the scroll limit + * @Default {{left: 0, right: 0, top:0, bottom: 0}} + */ + padding?: any; + + /**Sets the vertical scroll offset + * @Default {0} + */ + verticalOffset?: number; + + /**Allows to read the view port height of the diagram + * @Default {0} + */ + viewPortHeight?: number; + + /**Allows to read the view port width of the diagram + * @Default {0} + */ + viewPortWidth?: number; +} + +export interface SelectedItems { + + /**A read only collection of the selected items + * @Default {[]} + */ + children?: Array; + + /**Controls the visibility of selector. + * @Default {ej.datavisualization.Diagram.SelectorConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.SelectorConstraints|string; + + /**Defines a method that dynamically enables/ disables the interaction with multiple selection. + * @Default {null} + */ + getConstraints?: any; + + /**Sets the height of the selected items + * @Default {0} + */ + height?: number; + + /**Sets the x position of the selector + * @Default {0} + */ + offsetX?: number; + + /**Sets the y position of the selector + * @Default {0} + */ + offsetY?: number; + + /**Sets the angle to rotate the selected items + * @Default {0} + */ + rotateAngle?: number; + + /**Sets the angle to rotate the selected items. For tooltip properties, refer Tooltip + * @Default {ej.datavisualization.Diagram.Tooltip()} + */ + tooltip?: any; + + /**A collection of frequently using commands that have to be added around the selector. + * @Default {[]} + */ + userHandles?: Array; + + /**Sets the width of the selected items + * @Default {0} + */ + width?: number; +} + +export interface SnapSettingsHorizontalGridLines { + + /**Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /**Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /**A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: Array; + + /**Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: Array; +} + +export interface SnapSettingsVerticalGridLines { + + /**Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /**Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /**A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: Array; + + /**Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: Array; +} + +export interface SnapSettings { + + /**Enables or disables snapping nodes/connectors to objects + * @Default {true} + */ + enableSnapToObject?: boolean; + + /**Defines the appearance of horizontal gridlines + */ + horizontalGridLines?: SnapSettingsHorizontalGridLines; + + /**Defines the angle by which the object needs to be snapped + * @Default {5} + */ + snapAngle?: number; + + /**Defines the minimum distance between the selected object and the nearest object + * @Default {5} + */ + snapObjectDistance?: number; + + /**Defines the appearance of horizontal gridlines + */ + verticalGridLines?: SnapSettingsVerticalGridLines; +} + +export interface TooltipAlignment { + + /**Defines the horizontal alignment of tooltip. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontal?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**Defines the vertical alignment of tooltip. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Bottom} + */ + vertical?: ej.datavisualization.Diagram.VerticalAlignment|string; +} + +export interface Tooltip { + + /**Aligns the tooltip around nodes/connectors + */ + alignment?: TooltipAlignment; + + /**Sets the margin of the tooltip + * @Default {{ left: 5, right: 5, top: 5, bottom: 5 }} + */ + margin?: any; + + /**Defines whether the tooltip should be shown at the mouse position or around node. + * @Default {ej.datavisualization.Diagram.RelativeMode.Object} + */ + relativeMode?: ej.datavisualization.Diagram.RelativeMode|string; + + /**Sets the svg/html template to be bound with tooltip + */ + templateId?: string; +} +} +module Diagram +{ +enum BridgeDirection +{ +//Used to set the direction of line bridges as left +Left, +//Used to set the direction of line bridges as right +Right, +//Used to set the direction of line bridges as top +Top, +//Used to set the direction of line bridges as bottom +Bottom, +} +} +module Diagram +{ +enum Keys +{ +//No key pressed. +None, +//The A key. +A, +//The B key. +B, +//The C key. +C, +//The D Key. +D, +//The E key. +E, +//The F key. +F, +//The G key. +G, +//The H Key. +H, +//The I key. +I, +//The J key. +J, +//The K key. +K, +//The L Key. +L, +//The M key. +M, +//The N key. +N, +//The O key. +O, +//The P Key. +P, +//The Q key. +Q, +//The R key. +R, +//The S key. +S, +//The T Key. +T, +//The U key. +U, +//The V key. +V, +//The W key. +W, +//The X key. +X, +//The Y key. +Y, +//The Z key. +Z, +//The 0 key. +Number0, +//The 1 key. +Number1, +//The 2 key. +Number2, +//The 3 key. +Number3, +//The 4 key. +Number4, +//The 5 key. +Number5, +//The 6 key. +Number6, +//The 7 key. +Number7, +//The 8 key. +Number8, +//The 9 key. +Number9, +//The LEFT ARROW key. +Left, +//The UP ARROW key. +Up, +//The RIGHT ARROW key. +Right, +//The DOWN ARROW key. +Down, +//The ESC key. +Escape, +//The DEL key. +Delete, +//The TAB key. +Tab, +//The ENTER key. +Enter, +} +} +module Diagram +{ +enum KeyModifiers +{ +//No modifiers are pressed. +None, +//The ALT key. +Alt, +//The CTRL key. +Control, +//The SHIFT key. +Shift, +} +} +module Diagram +{ +enum ConnectorConstraints +{ +//Disable all connector Constraints +None, +//Enables connector to be selected +Select, +//Enables connector to be Deleted +Delete, +//Enables connector to be Dragged +Drag, +//Enables connectors source end to be selected +DragSourceEnd, +//Enables connectors target end to be selected +DragTargetEnd, +//Enables control point and end point of every segment in a connector for editing +DragSegmentThumb, +//Enables bridging to the connector +Bridging, +//Enables label of node to be Dragged +DragLabel, +//Enables bridging to the connector +InheritBridging, +//Enables all constraints +Default, +} +} +module Diagram +{ +enum HorizontalAlignment +{ +//Used to align text horizontally on left side of node/connector +Left, +//Used to align text horizontally on center of node/connector +Center, +//Used to align text horizontally on right side of node/connector +Right, +} +} +module Diagram +{ +enum Segments +{ +//Used to specify the lines as Straight +Straight, +//Used to specify the lines as Orthogonal +Orthogonal, +//Used to specify the lines as Bezier +Bezier, +} +} +module Diagram +{ +enum DecoratorShapes +{ +//Used to set decorator shape as none +None, +//Used to set decorator shape as Arrow +Arrow, +//Used to set decorator shape as Open Arrow +OpenArrow, +//Used to set decorator shape as Circle +Circle, +//Used to set decorator shape as Diamond +Diamond, +//Used to set decorator shape as path +Path, +} +} +module Diagram +{ +enum VerticalAlignment +{ +//Used to align text Vertically on left side of node/connector +Top, +//Used to align text Vertically on center of node/connector +Center, +//Used to align text Vertically on bottom of node/connector +Bottom, +} +} +module Diagram +{ +enum DiagramConstraints +{ +//Disables all DiagramConstraints +None, +//Enables/Disables PageEditing +PageEditable, +//Enables/Disables Bridging +Bridging, +//Enables/Disables Zooming +Zoomable, +//Enables/Disables panning on horizontal axis +PannableX, +//Enables/Disables panning on vertical axis +PannableY, +//Enables/Disables Panning +Pannable, +//Enables/Disables undo actions +Undoable, +//Enables all Constraints +Default, +} +} +module Diagram +{ +enum LayoutOrientations +{ +//Used to set LayoutOrientation from top to bottom +TopToBottom, +//Used to set LayoutOrientation from bottom to top +BottomToTop, +//Used to set LayoutOrientation from left to right +LeftToRight, +//Used to set LayoutOrientation from right to left +RightToLeft, +} +} +module Diagram +{ +enum LayoutTypes +{ +//Used not to set any specific layout +None, +//Used to set layout type as hierarchical layout +HierarchicalTree, +//Used to set layout type as organnizational chart +OrganizationalChart, +} +} +module Diagram +{ +enum BPMNActivity +{ +//Used to set BPMN Activity as None +None, +//Used to set BPMN Activity as Task +Task, +//Used to set BPMN Activity as SubProcess +SubProcess, +} +} +module Diagram +{ +enum NodeConstraints +{ +//Disable all node Constraints +None, +//Enables node to be selected +Select, +//Enables node to be Deleted +Delete, +//Enables node to be Dragged +Drag, +//Enables node to be Rotated +Rotate, +//Enables node to be connected +Connect, +//Enables node to be resize north east +ResizeNorthEast, +//Enables node to be resize east +ResizeEast, +//Enables node to be resize south east +ResizeSouthEast, +//Enables node to be resize south +ResizeSouth, +//Enables node to be resize south west +ResizeSouthWest, +//Enables node to be resize west +ResizeWest, +//Enables node to be resize north west +ResizeNorthWest, +//Enables node to be resize north +ResizeNorth, +//Enables node to be Resized +Resize, +//Enables shadow +Shadow, +//Enables label of node to be Dragged +DragLabel, +//Enables panning should be done while node dragging +AllowPan, +//Enables Proportional resize for node +AspectRatio, +//Enables all node constraints +Default, +} +} +module Diagram +{ +enum ContainerType +{ +//Sets the container type as Canvas +Canvas, +//Sets the container type as Stack +Stack, +} +} +module Diagram +{ +enum BPMNEvents +{ +//Used to set BPMN Event as Start +Start, +//Used to set BPMN Event as Intermediate +Intermediate, +//Used to set BPMN Event as End +End, +//Used to set BPMN Event as NonInterruptingStart +NonInterruptingStart, +//Used to set BPMN Event as NonInterruptingIntermediate +NonInterruptingIntermediate, +} +} +module Diagram +{ +enum BPMNGateways +{ +//Used to set BPMN Gateway as None +None, +//Used to set BPMN Gateway as Exclusive +Exclusive, +//Used to set BPMN Gateway as Inclusive +Inclusive, +//Used to set BPMN Gateway as Parallel +Parallel, +//Used to set BPMN Gateway as Complex +Complex, +//Used to set BPMN Gateway as EventBased +EventBased, +} +} +module Diagram +{ +enum LabelEditMode +{ +//Used to set label edit mode as edit +Edit, +//Used to set label edit mode as view +View, +} +} +module Diagram +{ +enum TextAlign +{ +//Used to align text on left side of node/connector +Left, +//Used to align text on center of node/connector +Center, +//Used to align text on Right side of node/connector +Right, +} +} +module Diagram +{ +enum TextDecorations +{ +//Used to set text decoration of the label as Underline +Underline, +//Used to set text decoration of the label as Overline +Overline, +//Used to set text decoration of the label as LineThrough +LineThrough, +//Used to set text decoration of the label as None +None, +} +} +module Diagram +{ +enum TextWrapping +{ +//Disables wrapping +NoWrap, +//Enables Line-break at normal word break points +Wrap, +//Enables Line-break at normal word break points with longer word overflows +WrapWithOverflow, +} +} +module Diagram +{ +enum PortConstraints +{ +//Disable all constraints +None, +//Enables connections with connector +Connect, +} +} +module Diagram +{ +enum PortShapes +{ +//Used to set port shape as X +X, +//Used to set port shape as Circle +Circle, +//Used to set port shape as Square +Square, +//Used to set port shape as Path +Path, +} +} +module Diagram +{ +enum PortVisibility +{ +//Set the port visibility as Visible +Visible, +//Set the port visibility as Hidden +Hidden, +//Port get visible when hover connector on node +Hover, +//Port gets visible when connect connector to node +Connect, +//Specifies the port visibility as default +Default, +} +} +module Diagram +{ +enum BasicShapes +{ +//Used to specify node Shape as Rectangle +Rectangle, +//Used to specify node Shape as Ellipse +Ellipse, +//Used to specify node Shape as Path +Path, +//Used to specify node Shape as Polygon +Polygon, +//Used to specify node Shape as Triangle +Triangle, +//Used to specify node Shape as Plus +Plus, +//Used to specify node Shape as Star +Star, +//Used to specify node Shape as Pentagon +Pentagon, +//Used to specify node Shape as Heptagon +Heptagon, +//Used to specify node Shape as Octagon +Octagon, +//Used to specify node Shape as Trapezoid +Trapezoid, +//Used to specify node Shape as Decagon +Decagon, +//Used to specify node Shape as RightTriangle +RightTriangle, +//Used to specify node Shape as Cylinder +Cylinder, +} +} +module Diagram +{ +enum BPMNBoundary +{ +//Used to set BPMN SubProcess's Boundary as Default +Default, +//Used to set BPMN SubProcess's Boundary as Call +Call, +//Used to set BPMN SubProcess's Boundary as Event +Event, +} +} +module Diagram +{ +enum BPMNLoops +{ +//Used to set BPMN Activity's Loop as None +None, +//Used to set BPMN Activity's Loop as Standard +Standard, +//Used to set BPMN Activity's Loop as ParallelMultiInstance +ParallelMultiInstance, +//Used to set BPMN Activity's Loop as SequenceMultiInstance +SequenceMultiInstance, +} +} +module Diagram +{ +enum BPMNTasks +{ +//Used to set BPMN Task Type as None +None, +//Used to set BPMN Task Type as Service +Service, +//Used to set BPMN Task Type as Receive +Receive, +//Used to set BPMN Task Type as Send +Send, +//Used to set BPMN Task Type as InstantiatingReceive +InstantiatingReceive, +//Used to set BPMN Task Type as Manual +Manual, +//Used to set BPMN Task Type as BusinessRule +BusinessRule, +//Used to set BPMN Task Type as User +User, +//Used to set BPMN Task Type as Script +Script, +//Used to set BPMN Task Type as Parallel +Parallel, +} +} +module Diagram +{ +enum BPMNTriggers +{ +//Used to set Event Trigger as None +None, +//Used to set Event Trigger as Message +Message, +//Used to set Event Trigger as Timer +Timer, +//Used to set Event Trigger as Escalation +Escalation, +//Used to set Event Trigger as Link +Link, +//Used to set Event Trigger as Error +Error, +//Used to set Event Trigger as Compensation +Compensation, +//Used to set Event Trigger as Signal +Signal, +//Used to set Event Trigger as Multiple +Multiple, +//Used to set Event Trigger as Parallel +Parallel, +} +} +module Diagram +{ +enum Shapes +{ +//Used to set decorator shape as none +None, +//Used to set decorator shape as Arrow +Arrow, +//Used to set decorator shape as Open Arrow +OpenArrow, +//Used to set decorator shape as Circle +Circle, +//Used to set decorator shape as Diamond +Diamond, +//Used to set decorator shape as path +Path, +} +} +module Diagram +{ +enum PageOrientations +{ +//Used to set orientation as Landscape +Landscape, +//Used to set orientation as portrait +Portrait, +} +} +module Diagram +{ +enum ScrollLimit +{ +//Used to set scrollLimit as Infinite +Infinite, +//Used to set scrollLimit as Diagram +Diagram, +//Used to set scrollLimit as Limited +Limited, +} +} +module Diagram +{ +enum SelectorConstraints +{ +//Hides the selector +None, +//Sets the visibility of rotation handle as visible +Rotator, +//Sets the visibility of resize handles as visible +Resizer, +//Sets the visibility of user handles as visible +UserHandles, +//Sets the visibility of all selection handles as visible +All, +} +} +module Diagram +{ +enum Tool +{ +//Disables all Tools +None, +//Enables/Disables SingleSelect tool +SingleSelect, +//Enables/Disables MultiSelect tool +MultipleSelect, +//Enables/Disables ZoomPan tool +ZoomPan, +//Enables/Disables DrawOnce tool +DrawOnce, +//Enables/Disables ContinuousDraw tool +ContinuesDraw, +} +} +module Diagram +{ +enum RelativeMode +{ +//Shows tooltip around the node +Object, +//Shows tooltip at the mouse position +Mouse, +} +} + +} + +interface JQueryXHR { +} +interface JQueryPromise { +} +interface JQueryDeferred extends JQueryPromise { +} +interface JQueryParam { +} +interface JQuery { + data(key: any): any; +} +interface JQuery { + + ejButton(): JQuery; + ejButton(options?: ej.Button.Model): JQuery; + data(key: "ejButton"): ej.Button; + + ejCaptcha(): JQuery; + ejCaptcha(options?: ej.Captcha.Model): JQuery; + data(key: "ejCaptcha"): ej.Captcha; + + ejAccordion(): JQuery; + ejAccordion(options?: ej.Accordion.Model): JQuery; + data(key: "ejAccordion"): ej.Accordion; + + ejAutocomplete(): JQuery; + ejAutocomplete(options?: ej.Autocomplete.Model): JQuery; + data(key: "ejAutocomplete"): ej.Autocomplete; + + ejDatePicker(): JQuery; + ejDatePicker(options?: ej.DatePicker.Model): JQuery; + data(key: "ejDatePicker"): ej.DatePicker; + + ejDateTimePicker(): JQuery; + ejDateTimePicker(options?: ej.DateTimePicker.Model): JQuery; + data(key: "ejDateTimePicker"): ej.DateTimePicker; + + ejDialog(): JQuery; + ejDialog(options?: ej.Dialog.Model): JQuery; + data(key: "ejDialog"): ej.Dialog; + + ejDropDownList(): JQuery; + ejDropDownList(options?: ej.DropDownList.Model): JQuery; + data(key: "ejDropDownList"): ej.DropDownList; + + ejFileExplorer(): JQuery; + ejFileExplorer(options?: ej.FileExplorer.Model): JQuery; + data(key: "ejFileExplorer"): ej.FileExplorer; + + ejListBox(): JQuery; + ejListBox(options?: ej.ListBox.Model): JQuery; + data(key: "ejListBox"): ej.ListBox; + + ejListView(): JQuery; + ejListView(options?: ej.ListView.Model): JQuery; + data(key: "ejListView"): ej.ListView; + + ejNumericTextbox(): JQuery; + ejNumericTextbox(options?: ej.Editor.Model): JQuery; + data(key: "ejNumericTextbox"): ej.NumericTextbox; + + ejCurrencyTextbox(): JQuery; + ejCurrencyTextbox(options?: ej.Editor.Model): JQuery; + data(key: "ejCurrencyTextbox"): ej.CurrencyTextbox; + + ejPercentageTextbox(): JQuery; + ejPercentageTextbox(options?: ej.Editor.Model): JQuery; + data(key: "ejPercentageTextbox"): ej.PercentageTextbox; + + ejMaskEdit(): JQuery; + ejMaskEdit(options?: ej.MaskEdit.Model): JQuery; + data(key: "ejMaskEdit"): ej.MaskEdit; + + ejMenu(): JQuery; + ejMenu(options?: ej.Menu.Model): JQuery; + data(key: "ejMenu"): ej.Menu; + + ejPager(): JQuery; + ejPager(options?: ej.Pager.Model): JQuery; + data(key: "ejPager"): ej.Pager; + + ejProgressBar(): JQuery; + ejProgressBar(options?: ej.ProgressBar.Model): JQuery; + data(key: "ejProgressBar"): ej.ProgressBar; + + ejRadioButton(): JQuery; + ejRadioButton(options?: ej.RadioButton.Model): JQuery; + data(key: "ejRadioButton"): ej.RadioButton; + + ejCheckBox(): JQuery; + ejCheckBox(options?: ej.CheckBox.Model): JQuery; + data(key: "ejCheckBox"): ej.CheckBox; + + ejRibbon(): JQuery; + ejRibbon(options?: ej.Ribbon.Model): JQuery; + data(key: "ejRibbon"): ej.Ribbon; + + ejKanban(): JQuery; + ejKanban(options?: ej.Kanban.Model): JQuery; + data(key: "ejKanban"): ej.Kanban; + + ejRating(): JQuery; + ejRating(options?: ej.Rating.Model): JQuery; + data(key: "ejRating"): ej.Rating; + + ejRotator(): JQuery; + ejRotator(options?: ej.Rotator.Model): JQuery; + data(key: "ejRotator"): ej.Rotator; + + ejRTE(): JQuery; + ejRTE(options?: ej.RTE.Model): JQuery; + data(key: "ejRTE"): ej.RTE; + + ejSlider(): JQuery; + ejSlider(options?: ej.Slider.Model): JQuery; + data(key: "ejSlider"): ej.Slider; + + ejSplitButton(): JQuery; + ejSplitButton(options?: ej.SplitButton.Model): JQuery; + data(key: "ejSplitButton"): ej.SplitButton; + + ejSplitter(): JQuery; + ejSplitter(options?: ej.Splitter.Model): JQuery; + data(key: "ejSplitter"): ej.Splitter; + + ejTab(): JQuery; + ejTab(options?: ej.Tab.Model): JQuery; + data(key: "ejTab"): ej.Tab; + + ejTagCloud(): JQuery; + ejTagCloud(options?: ej.TagCloud.Model): JQuery; + data(key: "ejTagCloud"): ej.TagCloud; + + ejTimePicker(): JQuery; + ejTimePicker(options?: ej.TimePicker.Model): JQuery; + data(key: "ejTimePicker"): ej.TimePicker; + + ejTile(): JQuery; + ejTile(options?: ej.Tile.Model): JQuery; + data(key: "ejTile"): ej.Tile; + + ejToggleButton(): JQuery; + ejToggleButton(options?: ej.ToggleButton.Model): JQuery; + data(key: "ejToggleButton"): ej.ToggleButton; + + ejToolbar(): JQuery; + ejToolbar(options?: ej.Toolbar.Model): JQuery; + data(key: "ejToolbar"): ej.Toolbar; + + ejNavigationDrawer(): JQuery; + ejNavigationDrawer(options?: ej.NavigationDrawer.Model): JQuery; + data(key: "ejNavigationDrawer"): ej.NavigationDrawer; + + ejRadialMenu(): JQuery; + ejRadialMenu(options?: ej.RadialMenu.Model): JQuery; + data(key: "ejRadialMenu"): ej.RadialMenu; + + ejTreeView(): JQuery; + ejTreeView(options?: ej.TreeView.Model): JQuery; + data(key: "ejTreeView"): ej.TreeView; + + ejUploadbox(): JQuery; + ejUploadbox(options?: ej.Uploadbox.Model): JQuery; + data(key: "ejUploadbox"): ej.Uploadbox; + + ejWaitingPopup(): JQuery; + ejWaitingPopup(options?: ej.WaitingPopup.Model): JQuery; + data(key: "ejWaitingPopup"): ej.WaitingPopup; + + ejSchedule(): JQuery; + ejSchedule(options?: ej.Schedule.Model): JQuery; + data(key: "ejSchedule"): ej.Schedule; + + ejRecurrenceEditor(): JQuery; + ejRecurrenceEditor(options?: ej.RecurrenceEditorOptions): JQuery; + data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; + + ejGrid(): JQuery; + ejGrid(options?: ej.Grid.Model): JQuery; + data(key: "ejGrid"): ej.Grid; + + /*ReportViewer*/ + ejReportViewer(): JQuery; + ejReportViewer(options?: ej.ReportViewer.Model): JQuery; + data(key: "ejReportViewer"): ej.ReportViewer; + /*ReportViewer*/ + + ejLinearGauge(): JQuery; + ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; + data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; + + ejDigitalGauge(): JQuery; + ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; + data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; + + ejCircularGauge(): JQuery; + ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; + data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; + + ejChart(): JQuery; + ejChart(options?: ej.datavisualization.Chart.Model): JQuery; + data(key: "ejChart"): ej.datavisualization.Chart; + + ejRangeNavigator(): JQuery; + ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; + data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; + + ejBulletGraph(): JQuery; + ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; + data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; + + ejGantt(): JQuery; + ejGantt(options?: ej.Gantt.Model): JQuery; + data(key: "ejGantt"): ej.Gantt; + + ejTreeGrid(): JQuery; + ejTreeGrid(options?: ej.TreeGrid.Model): JQuery; + data(key: "ejTreeGrid"): ej.TreeGrid; + + ejMap(): JQuery; + ejMap(options?: ej.datavisualization.Map.Model): JQuery; + data(key: "ejMap"): ej.datavisualization.Map; + + ejTreeMap(): JQuery; + ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; + data(key: "ejTreeMap"): ej.datavisualization.TreeMap; + + ejBarcode(): JQuery; + ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; + data(key: "ejBarcode"): ej.datavisualization.Barcode; + + ejDiagram(): JQuery; + ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; + data(key: "ejDiagram"): ej.datavisualization.Diagram; + + // ejSymbolPalette(): JQuery; + // ejSymbolPalette(options?: ej.datavisualization.SymbolPalette.Model): JQuery; + // data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; + + ejOlapChart(): JQuery; + ejOlapChart(options?: ej.olap.OlapChart.Model): JQuery; + data(key: "ejOlapChart"): ej.olap.OlapChart; + + ejPivotGrid(): JQuery; + ejPivotGrid(options?: ej.PivotGrid.Model): JQuery; + data(key: "ejPivotGrid"): ej.PivotGrid; + + ejPivotSchemaDesigner(): JQuery; + ejPivotSchemaDesigner(options?: ej.PivotSchemaDesigner.Model): JQuery; + data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; + + ejOlapClient(): JQuery; + ejOlapClient(options?: ej.olap.OlapClient.Model): JQuery; + data(key: "ejOlapClient"): ej.olap.OlapClient; + + ejOlapGauge(): JQuery; + ejOlapGauge(options?: ej.olap.OlapGauge.Model): JQuery; + data(key: "ejOlapGauge"): ej.olap.OlapGauge; + + ejPivotPager(): JQuery; + ejPivotPager(options?: ej.PivotPager.Model): JQuery; + data(key: "ejPivotPager"): ej.PivotPager; + + /* Spreadsheet */ + ejSpreadsheet(): JQuery; + ejSpreadsheet(options?: ej.Spreadsheet.Model): JQuery; + data(key: "ejSpreadsheet"): ej.Spreadsheet; + /* Spreadsheet */ + + ejScroller(): JQuery; + ejScroller(options?: ej.Scroller.Model): JQuery; + data(key: "ejScroller"): ej.Scroller; + + ejDraggable(): JQuery; + ejDraggable(options?: ej.DraggableOptions): JQuery; + data(key: "ejDraggable"): ej.Draggable; + + ejDroppable(): JQuery; + ejDroppable(options?: ej.DroppableOptions): JQuery; + data(key: "ejDroppable"): ej.Droppable; + + ejResizable(): JQuery; + ejResizable(options?: ej.ResizableOptions): JQuery; + data(key: "ejResizable"): ej.Resizable; + + ejColorPicker(): JQuery; + ejColorPicker(options?: ej.ColorPicker.Model): JQuery; + data(key: "ejColorPicker"): ej.ColorPicker; + + ejRadialSlider(): JQuery; + ejRadialSlider(options?: ej.RadialSliderOptions): JQuery; + data(key: "ejRadialSlider"): ej.RadialSlider; + +} \ No newline at end of file diff --git a/ej.widgets.all/ej.widgets.all-tests.ts b/ej.widgets.all/ej.widgets.all-tests.ts new file mode 100644 index 0000000000..1f8412ad8d --- /dev/null +++ b/ej.widgets.all/ej.widgets.all-tests.ts @@ -0,0 +1,1260 @@ +/// +/// + +$(document).ready(function () { + + //Properties + $("#draggable1").ejDraggable({ + drag: ondrag1, dragStart: ondragstart1, dragStop: ondragstop1 + }); + $("#droppable1").ejDroppable(); + +}); +//Events + +function ondrag1() { + console.log("The mouse is moved during the dragging."); +} +function ondragstart1() { + console.log("To handle the drag start event as an init option."); +} +function ondragstop1() { + console.log("The mouse is moved during the dragging.."); +} + + + + + +$(document).ready(function () { + + //Properties + $("#draggable1").ejDraggable({ + drag: ondrag2, dragStart: ondragstart2, dragStop: ondragstop2 + }); + $("#droppable1").ejDroppable(); + +}); +//Events + +function ondrag2() { + console.log("The mouse is moved during the dragging."); +} +function ondragstart2() { + console.log("To handle the drag start event as an init option."); +} +function ondragstop2() { + console.log("The mouse is moved during the dragging.."); +} + + + + + +$(document).ready(function () { + + //Properties + $("#resizable1").ejResizable({resizeStart: onresizestart , resizeStop: onresizestop }); + +}); +//Events +function onresizestart() { + console.log("The resizing is start"); +} +function onresizestop() { + console.log("The resizing is stop"); +} + + + + + +$(document).ready(function () { + + //Properties + $("#scroller1").ejScroller({ height: 300, width: 500, create: onScrollCreate }); + $("#scroller2").ejScroller({ height: 300, width: 500,scrollTop:40 }); + +}); +//Events +function onScrollCreate() { + console.log("control created"); +} + +$(document).ready(function () { + + $("#accordion1").ejAccordion({cssClass: "gradient-lime" , create: AccordionCreate }); + $("#accordion2").ejAccordion({ enabled: true , activate: AccordionActivate }); + +}); + +function AccordionCreate() { + console.log("create"); +} +function AccordionActivate(){ + console.log("activate") +} + +$(document).ready(function () { + + $("#Text1").ejButton({ text: "Button", enabled: false , create: onButtoncreate }); + $("#Text2").ejButton({ text: "Button", cssClass: "customclass" , click: onButtonclick }); +}); + +function onButtoncreate() { + console.log("create"); +} +function onButtonclick(){ + console.log("click") +} +$(document).ready(function () { + + //Properties + $("#listbox1").ejListBox({ allowMultiSelection: true, create: onlistBoxcreate }); + $("#listbox2").ejListBox({ showCheckbox: true,checkChange: onlistBoxcheckchange }); + +}); +//Events +function onlistBoxcreate() { + console.log("control created"); +} +function onlistBoxcheckchange() { + console.log("list item is checked or unchecked"); +} + + + + + +$(document).ready(function () { + + $("#checkbox1").ejCheckBox({ enableTriState: true, create: onCheckboxcreate }); + $("#checkbox2").ejCheckBox({ checked: true , change: onCheckboxchange }); + +}); + +function onCheckboxcreate() { + console.log("create"); +} +function onCheckboxchange(){ + console.log("change") +} + + + +$(document).ready(function () { + + $("#colorpicker1").ejColorPicker({ value: "#278787" , open: oncolorPickeropen }); + $("#colorpicker2").ejColorPicker({ enabled: true, create: oncolorPickercreate }); + +}); +function oncolorPickeropen() { + console.log("open"); +} +function oncolorPickercreate(){ + console.log("create") +} + + +$(document).ready(function () { + + $("#fileExplorer").ejFileExplorer({ + isResponsive: true, + fileTypes: "*.png, *.gif, *.jpg, *.jpeg, *.docx", + layout: "largeicons", + path: "http://mvc.syncfusion.com/ODataServices/FileBrowser/", + ajaxAction: "http://mvc.syncfusion.com/OdataServices/fileExplorer/fileoperation/doJSONPAction", + ajaxDataType: "jsonp", + }); +}); + + +$(document).ready(function () { + + $("#datepicker1").ejDatePicker({dateFormat: "dd/MM/yyyy" ,open: ondatePickeropen }); + $("#datepicker3").ejDatePicker({value: "21/2/2010" , select: ondatePickerselect }); + +}); +function ondatePickeropen() { + console.log("open"); +} +function ondatePickerselect(){ + console.log("select") +} + + +$(document).ready(function () { + + $("#datetimepicker1").ejDateTimePicker({width:"100%" , create: ondatetimePickercreate }); + $("#datetimepicker2").ejDateTimePicker({enableRTL: true , open: ondatetimePickeropen }); +}); +function ondatetimePickercreate() { + console.log("create"); +} +function ondatetimePickeropen(){ + console.log("open") +} + + +$(document).ready(function () { + $("#Div1").ejDialog({ enabled: true , open : ondialogOpen }); + $("#Div2").ejDialog({ title: "Low battery" , beforeClose : ondialogbeforeClose }); +}); +function ondialogbeforeClose() { + console.log("beforeClose"); +} +function ondialogOpen() { + console.log("open"); +} +$(document).ready(function () { + + $("#dropdownlist1").ejDropDownList({ targetID: "carsList", create: ondropDowncreate }); + $("#dropdownlist2").ejDropDownList({ watermarkText: "Select a car", change: ondropDownchange }); +}); + +function ondropDowncreate() { + console.log("create"); +} +function ondropDownchange(){ + console.log("change") +} +$(document).ready(function () { + $("#num1").ejNumericTextbox({ value:"35" ,create: onEditorcreate }); + $("#num2").ejNumericTextbox({ width:"100%" , change: onEditorchange }); + + $("#num3").ejPercentageTextbox({ value:"3" ,create: onEditorcreate }); + $("#num4").ejPercentageTextbox({ width:"100%" , change: onEditorchange }); + + $("#num5").ejCurrencyTextbox({ value:"555" ,create: onEditorcreate }); + $("#num6").ejCurrencyTextbox({ width:"100%" , change: onEditorchange }); + +}); + +function onEditorcreate() { + console.log("create"); +} +function onEditorchange(){ + console.log("change") +} + +$(document).ready(function () { + + //Properties + $("#listview1").ejListView({ width: 200,mouseUP: onlistViewmouseup }); + $("#listview2").ejListView({ height: 300, mouseDown: onlistViewmousedown }); + +}); +//Events +function onlistViewmouseup() { + console.log("mouse up happens on the item."); +} +function onlistViewmousedown() { + console.log("mouse down happens on the item."); +} + + + + + + + + + +$(document).ready(function () { + $("#num1").ejMaskEdit({ maskFormat: "99-999-99999" ,create: onmaskEditcreate }); + $("#num2").ejMaskEdit({ watermarkText: "99-999-99999", width:"100%" , change: onmaskEditchange }); +}); + +function onmaskEditcreate() { + console.log("create"); +} +function onmaskEditchange(){ + console.log("change") +} +$(document).ready(function () { + + //Properties + $("#menu1").ejMenu({ enabled: false ,create: onMenucreate }); + $("#menu2").ejMenu({ width: "800px",click: onMenuclick }); + +}); +//Events +function onMenucreate() { + console.log("control created"); +} +function onMenuclick() { + console.log("mouse click on menu items"); +} + + + + + +$(document).ready(function () { + $("#pager1").ejPager({ click : onclickpager }); + $("#pager2").ejPager({ enableRTL: true }); +}); + +function onclickpager(){ + console.log("click") +} +$(document).ready(function () { + + $("#progress1").ejProgressBar({ text: 'loading...' , value: 50 , create: ProgressBarCreate }); + $("#progress2").ejProgressBar({ width: 200, value: 50 , change: ProgressBarChange }); + +}); + +function ProgressBarCreate() { + console.log("create"); +} +function ProgressBarChange(){ + console.log("change"); +} + +$(document).ready(function () { + $("#r1").ejRadioButton({ create: onradioButtoncreate }); + $("#r2").ejRadioButton({ text: "RadioButton",change: onradioButtonchange }); + $("#r3").ejRadioButton({ text: "RadioButton1", enabled: false }); +}); + +function onradioButtonchange() { + console.log("Change triggered"); +} +function onradioButtoncreate() { + console.log("Create triggered"); +} +$(document).ready(function () { + $("#Div1").ejRating({ enabled: true, click: onRatingclick }); + $("#Div2").ejRating({ incrementStep: 1, change: RatingvalueChanged }); +}); + +function RatingvalueChanged() { + console.log("Value changed"); +} +function onRatingclick() { + console.log("Entered"); +} +$(document).ready(function () { + + + $("#test1").ejRibbon({ + allowResizing:true,applicationTab: { + menuSettings: { + openOnClick: false + } + }, + tabs: [{ + id: "home", + text: "HOME", + groups: [{ + text: "New", + type: "custom", + contentID: "btn" + }] + }], + }); + $("#test2").ejRibbon({ + width: "100%", + applicationTab: { + menuSettings: { + openOnClick: false + } + }, + tabs: [{ + id: "home", + text: "HOME", + groups: [{ + text: "New", + type: "custom", + contentID: "btn" + }] + }], tabClick: onRibbonTabClick + }); +}); + +function onRibbonTabClick() { + console.log("Tab Clicked.."); +} + +$(function() { + $("#Kanban").ejKanban( + { + enableRTL: true, + columns: [ + { headerText: "Backlog", key: "Open" }, + { headerText: "In Progress", key: "InProgress" }, + { headerText: "Testing", key: "Testing" }, + { headerText: "Done", key: "Close" } + ], + keyField: "Status", + + + }); + }); + +$(document).ready(function () { + var imageData = [ + { + "imageurl": "../themes/images/rose.jpg", + }, + { + "imageurl": "../themes/images/rose.jpg", + } + + ]; + $("#test1").ejRotator({ + dataSource:imageData, allowKeyboardNavigation : false,create: onRotatorCreate + }); + $("#test2").ejRotator({ + dataSource:imageData, displayItemsCount : "1",pagerClick: onRotatorpagerClick + + }); + + +}); + +function onRotatorCreate() { + console.log("created"); +} +function onRotatorpagerClick() { + console.log("page clicked.."); +} + + +$(document).ready(function () { + $("#rteSample").ejRTE({ allowEditing: false , enableRTL: true }); + $("#rteSample").ejRTE({ change: onRtechange , execute: onRteExecute }); +}); + +function onRtechange() { + console.log("Change triggered"); +} +function onRteExecute() { + console.log("Executed"); +} +$(document).ready(function() { + $("#test1").ejSlider({ showRoundedCorner: true }); + $("#test2").ejSlider({ orientation: ej.Orientation.Vertical }); + $("#test3").ejSlider({ minValue: 20, maxValue: 80 }); + $("#test4").ejSlider({ start: Sliderstart }); + $("#test5").ejSlider({ enabled: false }); + $("#test6").ejSlider({ slide: onSliderslide }); +}); +function Sliderstart() { + console.log("Slider Started"); +} +function onSliderslide() { + console.log("Moving"); +} + +$(document).ready(function () { + $("#sbutton").ejSplitButton({ + width: "120px", + height: "50px", + buttonMode: ej.ButtonMode.Dropdown, + create: splitButtonopen, + targetID: "target", + }); +}); + +function splitButtonopen() +{ +alert("Opened"); +} + + + +$(document).ready(function () { + + $("#splitter1").ejSplitter({ enableRTL: true , create: onSplitterCreate }); + $("#splitter2").ejSplitter({allowKeyboardNavigation: false , expandCollapse: onSplitterExpandCollapse }); + +}); +function onSplitterCreate() { + console.log("Created"); +} +function onSplitterExpandCollapse(){ + console.log("expand and collapsed") +} + +$(document).ready(function () { + + $("#tab1").ejTab({ enableRTL: true , create: onTabCreate }); + $("#tab2").ejTab({ showRoundedCorner: true , ajaxSuccess: onTabAjaxSuccess }); + +}); +function onTabCreate() { + console.log("created"); +} + +function onTabAjaxSuccess() { + console.log("ajaxsuccess"); +} + + +$(function () { + // declaration + var websiteCollection = [ + { text: "Google", url: "http://www.google.com", frequency: 12 }, + { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, + + ]; + $("#tagtest").ejTagCloud({ + titleText: "Tech Sites", + dataSource: websiteCollection, + enableRTL: true, mouseout: onTagMouseout + }); + $("#tagtest1").ejTagCloud({ + titleText: "Tech Sites", + dataSource: websiteCollection, + maxFontSize: "10px", create: onTagCreate + }); + function onTagCreate() { + console.log("created"); + } + function onTagMouseout() { + console.log("mouseout"); + } +}); + + + + $(function () { + $("#time").ejTimePicker({ enabled : true, height : "35",close: TimeClose,create: TimeCreate}); + }); + + function TimeClose() { + console.log("close"); + } + function TimeCreate() { + console.log("create"); + } + + + $(function () { + $("#tbutton").ejToggleButton({ + size: "large", + height: "28px", + click:ToggleClick, + create:ToggleCreate + }); + }); + + function ToggleClick() { + console.log("click"); + } + function ToggleCreate() { + console.log("create"); + } + +$(function () {// document ready + // Toolbar control creation + $("#ToolbarItem").ejToolbar({ + width: "auto", // width of the Toolbar + height: "33px", // height of the Toolbar + create:ToolBarCreate, + click:ToolBarClick + }); + }); + +function ToolBarCreate() { + console.log("click"); +} +function ToolBarClick() { + console.log("create"); +} + +$(document).ready(function () { + + $("#treeView").ejTreeView({ width: 300 , cssClass: 'customclass' , create: TreeViewCreate }); + + $("#treeView1").ejTreeView({ height: 300 , enabled: true , nodeClick: TreeViewClick }); +}); + + +function TreeViewCreate() { + console.log("create"); +} +function TreeViewClick(){ + console.log("click"); +} + +$(document).ready(function () { + + //Properties + $("#uploadbbox1").ejUploadbox({ height: "60px", create: onuploadBoxcreate }); + $("#uploadbbox2").ejUploadbox({ enableRTL: true, fileSelect: onuploadBoxfileselect }); + +}); +//Events +function onuploadBoxcreate() { + console.log("control created"); +} +function onuploadBoxfileselect() { + console.log("file has been selected"); +} + + + + + + + + + +$(document).ready(function () { + + //Properties + $("#waitingpopup1").ejWaitingPopup({ showOnInit: true, create: onwaitingPopupcreate }); + $("#waitingpopup2").ejWaitingPopup({ showOnInit: true, showImage: false }); + +}); +//Events +function onwaitingPopupcreate() { + console.log("control created"); +} + + + + + +$(function () { + $("#Grid").ejGrid({ + allowPaging: true, + allowSorting: true, + rowSelected: onGridRowSelect, + columnSelected: onGridColumnSelect, + rightClick: onGridRightClick, + columns: [ + { field: "OrderID", headerText: "Order ID", width: 75 , textAlign: ej.TextAlign.Right }, + { field: "CustomerID", headerText: "Customer ID", width: 80 }, + { field: "EmployeeID", headerText: "Employee ID", width: 75, textAlign: ej.TextAlign.Right }, + { field: "Freight", width: 75, format: "{0:C}", textAlign: ej.TextAlign.Right }, + { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right }, + { field: "ShipCity", headerText: "Ship City", width: 110 } + ] + }); + }); + +function onGridRowSelect() +{ +console.log("Row Selected"); +} +function onGridRightClick() +{ +console.log("Right Click Button Clicked"); +} +function onGridColumnSelect() +{ +console.log("Column Selected"); +} + + $(function () { + $("#PivotGrid").ejPivotGrid({ + load: PivotGridload, + renderComplete: PivotGridrenderComplete, + url: "/wcf/PivotGridService.svc", + isResponsive: true + + }); + }); + + function PivotGridload() { + console.log("load"); + } + function PivotGridrenderComplete() { + console.log("rendercomplete"); + } + + + $(function () { + $("#PivotSchemaDesigner1").ejPivotSchemaDesigner({ + height: "630px", + url: "/wcf/PivotService.svc" + }); + }); + + + +$(document).ready(function () { + $("#pivotpager1").ejPivotPager({ categoricalCurrentPage: 1 }); + $("#pivotpager2").ejPivotPager({ seriesPageCount: 0 }); +}); + +$(document).ready(function () { + $("#test1").ejSchedule({ + cellHeight:"35px", cellClick: onScheduleCellClick + }); + $("#test2").ejSchedule({ + enableRTL: true, menuItemClick: onScheduleMenuItemClick + }); +}); +function onScheduleCellClick() { + console.log("cell clicked.."); +} +function onScheduleMenuItemClick() { + console.log("Menu Item Clicked.."); +} + + + $(function () { + $("#RecurrenceEditor").ejRecurrenceEditor({ + selectedRecurrenceType: 0, + create: RecurrenceEditorOncreate + }); + + }); + + function RecurrenceEditorOncreate() { + this.element.find("#recurrencetype_wrapper").css("width", "33%"); + } + +$(document).ready(function () { + +$("#GanttContainer").ejGantt({ + allowSelection: true, + allowColumnResize: true, + taskIdMapping: "TaskID", + taskNameMapping: "TaskName", + scheduleStartDate: "02/23/2014", + scheduleEndDate: "03/31/2014", + startDateMapping: "StartDate", + endDateMapping: "EndDate", + progressMapping: "Progress", + childMapping: "Children", + allowGanttChartEditing: false, + treeColumnIndex: 1, + enableResize: true, + expanded: onGanttExpand, + load: onGanttLoad + }); +}); + +function onGanttExpand() +{ +console.log("Expanded"); +} +function onGanttLoad() +{ +console.log("Loading"); +} +$(document).ready(function () { + + + $("#test1").ejReportViewer({ reportServiceUrl: "../api/RDLReport",enablePageCache: false,reportLoaded: onReportReportLoaded }); + $("#test2").ejReportViewer({ + renderMode: ej.ReportViewer.RenderMode.Default,reportServiceUrl: "../api/RDLReport",renderingBegin: onReportRenderingBegin }); +}); +function onReportRenderingBegin() { + console.log("Rendering Begin.."); +} +function onReportReportLoaded() { + console.log("Report Loaded.."); +} + +$(document).ready(function () { + var dataManager = [ + { + taskID: 1, + taskName: "Planning", + startDate: "02/03/2014", + endDate: "02/07/2014", + progress: 100, + duration: 5, + priority: "Normal", + approved: false, + subtasks: [ + { taskID: 2, taskName: "Plan timeline", startDate: "02/03/2014", endDate: "02/07/2014", duration: 5, progress: 100, priority: "Normal", approved: false }, + { taskID: 3, taskName: "Plan budget", startDate: "02/03/2014", endDate: "02/07/2014", duration: 5, progress: 100, approved: true }, + { taskID: 4, taskName: "Allocate resources", startDate: "02/03/2014", endDate: "02/07/2014", duration: 5, progress: 100, priority: "Critical", approved: false }, + { taskID: 5, taskName: "Planning complete", startDate: "02/07/2014", endDate: "02/07/2014", duration: 0, progress: 0, priority: "Low", approved: true } + ] + }]; + +$("#test1").ejTreeGrid({ + dataSource:dataManager,allowColumnResize: true, + columns: [ + { field: "taskID", headerText: "Task Id", editType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker" }, + { field: "endDate", headerText: "End Date", editType: "datepicker" }, + { field: "duration", headerText: "Duration", editType: "numericedit" }, + { field: "progress", headerText: "Progress", editType: "numericedit" } + ],load: onTreeLoad + }); + $("#test2").ejTreeGrid({ + dataSource:dataManager,rowHeight : 30, + columns: [ + { field: "taskID", headerText: "Task Id", editType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker" }, + { field: "endDate", headerText: "End Date", editType: "datepicker" }, + { field: "duration", headerText: "Duration", editType: "numericedit" }, + { field: "progress", headerText: "Progress", editType: "numericedit" } + ],rowSelected: onTreeRowSelected + + }); + + +}); +function onTreeLoad() { + console.log("loaded.."); +} +function onTreeRowSelected() { + console.log("row Selected.."); +} + + +$(document).ready(function () { + $("#navpane").ejNavigationDrawer({ type: "overlay", direction: "left", position: "fixed",open: NavigationDrawerOpen }); +}); + +function NavigationDrawerOpen() +{ + console.log("open"); +} + + + $(function () { + $('#radialmenu').ejRadialMenu({ targetElementId: "radialtarget", "autoOpen":true,select: RadialMenuSelect , mouseUp: RadialMenuMouseUp }); + }); + + function RadialMenuMouseUp() { + console.log("mouseUp"); + } + function RadialMenuSelect() { + console.log("select"); + } + + + +$(function () +{ + $("#tile1").ejTile({ text: "Map", tileSize: "medium", imageUrl: 'http://js.syncfusion.com/ug/web/content/tile/map.png', mouseUp: TileMouseUp, mouseDown: TileMouseDown }); +}); + +function TileMouseUp() { + console.log("mouseUp"); +} + +function TileMouseDown() { + console.log("mousedown"); +} + + + + + $(function () { + $("#radialSlider").ejRadialSlider({ innerCircleImageUrl: "chevron-right.png",autoOpen:true, create: RadialSliderCreate , start: RadialSliderStart }); + }); + + function RadialSliderCreate() { + console.log("create"); + } + function RadialSliderStart() { + console.log("start"); + } + +$(document).ready(function () { + $("#test1").ejSpreadsheet({ + allowDelete: true, cellEdit: onSpreadsheetCellEdit + }); + $("#test2").ejSpreadsheet({ + cssClass: "gradient-lime", drag: onSpreadsheetDrag + }); +}); +function onSpreadsheetDrag() { + console.log("item drag.."); +} +function onSpreadsheetCellEdit() { + console.log("cell edited.."); +} + + + $(function() + { + $("#OlapChart").ejOlapChart( + { + url: "OlapChartService.svc", + renderFailure: OlapChartRenderFailure, + renderSuccess: OlapChartRenderSuccess + }); + }); + + function OlapChartRenderFailure() { + console.log("failure"); + } + function OlapChartRenderSuccess() { + console.log("success"); + } + + + $(function() + { + $("#OlapClient").ejOlapClient( + { + url: "/wcf/OlapClientService.svc", + title: "OLAP Browser", + renderFailure: OlapClientRenderFailure, + renderSuccess: OlapClientRenderSuccess + }); + }); + + function OlapClientRenderFailure() { + console.log("failure"); + } + function OlapClientRenderSuccess() { + console.log("success"); + } + +$(document).ready(function() + { + $("#olapgauge1").ejOlapGauge( + { + url: "../wcf/OlapGaugeService.svc", + enableTooltip: true, + renderFailure: olapGaugerenderFailure, + renderSuccess: olapGaugerenderSuccess + }); + }); +function olapGaugerenderFailure() { + console.log("failure"); + } +function olapGaugerenderSuccess() { + console.log("success"); + } + +$(document).ready(function () { + + $("#CoreLinearGauge").ejLinearGauge({ + labelColor: "#8c8c8c", width: 500, + scales: [{ + width: 4, border: { color: "transparent",width:0 }, showBarPointers: false, showRanges: true, length: 310, + position: { x: 52, y: 50 }, markerPointers: [{ + value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } + }], + labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale:{x: -13} }], + ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], + ranges: [{ + endValue: 60, + startValue: 0, + backgroundColor: "#F6B53F", + border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 + }, { + endValue: 100, + startValue: 60, + backgroundColor: "#E94649", + border: { color: "#E94649" }, startWidth: 4, endWidth: 4 + }] + }], + init:onLinearGaugeinit, + mouseClick:onLinearGaugemouseClick + }); +}); + +function onLinearGaugeinit() +{ + console.log("init"); +} +function onLinearGaugemouseClick() +{ + console.log("mouseClick"); +} + +$(document).ready(function () { + + $("#CoreCircularGauge").ejCircularGauge({ + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7, + pointerCap: { radius: 12 } + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }], + mouseClick:onCircularMouseClick + }); + +}); + +function onCircularMouseClick() +{ + console.log("Mouse click.."); +} + +$(document).ready(function () { + + $("#DigitalCore").ejDigitalGauge({ + width: 525, + height: 305, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "123456789", + position: { x: 52, y: 52 } + }], + init:onDigitalGaugeinit, + itemRendering:onDigitalGaugeItemRendering + }); +}); + +function onDigitalGaugeinit() +{ + console.log("init"); +} +function onDigitalGaugeItemRendering() +{ + console.log("itemRendering"); +} + +$(document).ready(function () { + + $("#container").ejChart( + { + + + + //Initializing Common Properties for all the series + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : {width: 2} + }, + + + + title :{text: 'Efficiency of oil-fired power production'}, + size: { height: "600" }, + legend: { visible: true}, + create:onChartCreate + }); + +}); + +function onChartCreate() +{ + console.log("create"); +} + +$(document).ready(function () { + + $("#scrollcontent").ejRangeNavigator({ + + enableDeferredUpdate: true, + padding: "15", + allowSnapping:true, + selectedRangeSettings: { + start:"2015/5/25", end:"2016/5/25" + }, + + }) +}); + +$(document).ready(function () { + $("#BulletGraph1").ejBulletGraph({ + qualitativeRangeSize: 32, + quantitativeScaleLength: 475, tooltipSettings: {template: "Tooltip", visible: true}, orientation: ej.datavisualization.BulletGraph.Orientation.Horizontal, + flowDirection: ej.datavisualization.BulletGraph.FlowDirection.Forward, + quantitativeScaleSettings: { + location: { x: 110, y: 10 }, + minimum: 0, + maximum: 10, + interval: 1, + minorTicksPerInterval: 4, + majorTickSettings:{ size: 13, width: 1, stroke: 'gray'}, + minorTickSettings:{ size: 5, width: 1, stroke: 'gray'}, + + labelSettings: { + position: ej.datavisualization.BulletGraph.LabelPosition.Below, offset: 14, size: 10 + }, + featuredMeasureSettings: { width: 6 }, + comparativeMeasureSettings:{ + width: 5 + }, + featureMeasures: [{ value: 8, comparativeMeasureValue: 6.7, category: ""}] + }, + qualitativeRanges: [{ + rangeEnd: 4.3 + }, { + rangeEnd: 7.3 + }, { + rangeEnd: 10 + }], + captionSettings: { textAngle: 0, + location: { x: 17, y: 20 }, text: "Revenue YTD", font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1 }, //'#707070' + subTitle: { textAngle: 0, + text: "$ in Thousands", location: { x: 10, y: 35 }, font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1} //'#707070' + } + } + + + + }); + + $("#BulletGraph2").ejBulletGraph({ qualitativeRangeSize: 32, height:140, + quantitativeScaleLength: 475, orientation: ej.datavisualization.BulletGraph.Orientation.Horizontal, + flowDirection: ej.datavisualization.BulletGraph.FlowDirection.Forward, + quantitativeScaleSettings: { + location: { x: 110, y: 10 }, + minimum: -10, + maximum: 10, + interval: 2, + minorTicksPerInterval: 4, + majorTickSettings:{ size: 13, width: 1}, + minorTickSettings:{ size: 5, width: 1}, + + labelSettings: { + position: ej.datavisualization.BulletGraph.LabelPosition.Below, offset: 14, size: 10, labelSuffix: ' %' + }, + featuredMeasureSettings: { width: 6 }, + comparativeMeasureSettings:{ width: 5 }, + featureMeasures: [{ value: 8, comparativeMeasureValue: 6.7}] + }, + qualitativeRanges: [{ + rangeEnd: -4, rangeStroke: "#61a301" + }, { + rangeEnd: 3, rangeStroke: "#fcda21" + }, { + rangeEnd: 10, rangeStroke: "#d61e3f" + }], + captionSettings: { textAngle: 0, + location: { x: 60, y: 25 }, text: "Profit", font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '13px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1 }, //'#707070' + //subTitle: { textAngle: 0, + // text: "profit in %", location: { x: 35, y: 35 }, font: { color: null, fontFamily: 'Segoe UI', fontStyle: ej.datavisualization.BulletGraph.FontStyle.Normal, size: '12px', fontWeight: ej.datavisualization.BulletGraph.FontWeight.Normal, opacity: 1} //'#707070' + //} + }, + drawLabels:onBulletDrawLabel + }); + +}); + + function onBulletDrawLabel() + { + console.log("drawLabel"); + } + + +$(document).ready(function () { + + $("#barcode").ejBarcode({ text: "HTTP://WWW.SYNCFUSION.COM", symbologyType: "qrbarcode", xDimension: 8, displayText: true, load:onBarcodeLoad }); + +}); + +function onBarcodeLoad() + { + console.log("load"); + } + + jQuery(function ($) { + $("#container").ejMap({ + mouseover:MapMouseOver, + onRenderComplete:MapOnRenderComplete, + navigationControl:{enableNavigation:true,orientation:'vertical',absolutePosition:{x:5,y:15},dockPosition: 'none'}, + background:'white', + enableAnimation: true, + layers: [ + { + layerType: "geometry", + enableSelection: false, + enableMouseHover:false, + + showMapItems: false, + markerTemplate: 'template', + shapeSettings: { + fill: "#626171", + strokeThickness: "1", + stroke: "#6F6F79", + highlightStroke:"#6F6F79", + valuePath: "name", + highlightColor: "gray" + + }, + + } + ] + + }); + }); + function MapMouseOver() { + console.log("mouseover"); + } + function MapOnRenderComplete() { + console.log("onRenderComplete"); + } + + + jQuery(function ($) { + $("#treemapContainer").ejTreeMap({ + treeMapItemSelected:onTreeMapItemSelected, + + levels: [ + { groupPath: "Continent", groupGap: 5} + ], + colorValuePath: "Growth", + rangeColorMapping: [ + { color: "#DC562D", from: "0", to: "1" }, + { color: "#FED124", from: "1", to: "1.5" }, + { color: "#487FC1", from: "1.5", to: "2" }, + { color: "#0E9F49", from: "2", to: "3" } + ], + showTooltip:true, + leafItemSettings: { labelPath: "Region" } + }); + }); + function onTreeMapItemSelected() { + console.log("TreeMapItemSelected"); + } + + \ No newline at end of file diff --git a/ej.widgets.all/ej.widgets.all.d.ts b/ej.widgets.all/ej.widgets.all.d.ts new file mode 100644 index 0000000000..bd73834e52 --- /dev/null +++ b/ej.widgets.all/ej.widgets.all.d.ts @@ -0,0 +1,49995 @@ +// Type definitions for ej.widgets.all v14.1.0.41 +// Project: http://help.syncfusion.com/js/typescript +// Definitions by: Syncfusion +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*! +* filename: ej.widgets.all.d.ts +* version : 14.1.0.41 +* Copyright Syncfusion Inc. 2001 - 2016. All rights reserved. +* Use of this code is subject to the terms of our license. +* A copy of the current license can be obtained at any time by e-mailing +* licensing@syncfusion.com. Any infringement will be prosecuted under +* applicable laws. +*/ +declare module ej { + + var dataUtil: dataUtil; + function isMobile(): boolean; + function isIOS(): boolean; + function isAndroid(): boolean; + function isFlat(): boolean; + function isWindows(): boolean; + function isCssCalc(): boolean; + function getCurrentPage(): JQuery; + function isLowerResolution(): boolean; + function browserInfo(): browserInfoOptions; + function isTouchDevice(): boolean; + function addPrefix(style: string): string; + function animationEndEvent(): string; + function blockDefaultActions(e: Object): void; + function buildTag(tag: string, innerHtml: string, styles: Object, attrs: Object): JQuery; + function cancelEvent(): string; + function copyObject(): string; + function createObject(nameSpace: string, value: Object, initIn: string): JQuery; + function defineClass(className: string, constructor:any, proto: Object, replace: boolean): Object; + function destroyWidgets(element: Object): void; + function endEvent(): string; + function event(type: string, data: any, eventProp: Object): Object; + function getAndroidVersion(): Object; + function getAttrVal(ele: Object, val: string, option: Object): Object; + function getBooleanVal(ele: Object, val: string, option: Object): Object; + function getClearString(): string; + function getDimension(element: Object, method: string): Object; + function getFontString(fontObj: Object): string; + function getFontStyle(style: string): string; + function getMaxZindex(): number; + function getNameSpace(className: string): string; + function getObject(nameSpace: string): Object; + function getOffset(ele: string): Object; + function getRenderMode(): string; + function getScrollableParents(element: Object): void; + function getTheme(): string; + function getZindexPartial(element: Object, popupEle: string): number; + function hasRenderMode(element: string): void; + function hasStyle(prop: string): boolean; + function hasTheme(element: string): string; + function hexFromRGB(color: string): string; + function ieClearRemover(element: string): void; + function isAndroidWebView(): string; + function isDevice(): boolean; + function isIOS7(): boolean; + function isIOSWebView(): boolean; + function isLowerAndroid(): boolean; + function isNullOrUndefined(value: Object): boolean; + function isPlainObject(): JQuery; + function isPortrait(): any; + function isTablet(): boolean; + function isWindowsWebView(): string; + function listenEvents(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function listenTouchEvent(selectors:any, eventTypes: any, handlers: any, remove?: any, pluginObj?: any, disableMouse?: boolean): void; + function logBase(val: string, base: string): number; + function measureText(text: string, maxwidth: number, font: string): string; + function moveEvent(): string; + function print(element: string): void; + function proxy(fn: Object, context: string, arg: string): boolean; + function round(value: string, div: string, up: string): any; + function sendAjaxRequest(ajaxOptions: Object): void; + function setCaretToPos(nput: string, pos1: string, pos2: string): void; + function setRenderMode(element: string): void; + function setTheme(): Object; + function startEvent(): string; + function tapEvent(): string; + function tapHoldEvent(): string; + function throwError(): Object; + function transitionEndEvent(): Object; + function userAgent(): boolean; + function widget(pluginName: string, className: string, proto: Object): Object; + function avg(json: Object, filedName: string): any; + function getGuid(prefix: string): number; + function group(jsonArray: any, field: string, agg: string, level: number, groupDs: string): Object; + function isJson(jsonData: string): string; + function max(jsonArray: any, fieldName: string, comparer: string): any; + function min(jsonArray: any, fieldName: string, comparer: string): any; + function merge(first: string, second: string): any; + function mergeshort(jsonArray: any, fieldName: string, comparer: string): any; + function parseJson(jsonText: string): string; + function parseTable(table: number, headerOption: string, headerRowIndex: string): Object; + function select(jsonArray: any, fields: string): any; + function setTransition(): boolean; + function sum(json: string, fieldName: string): string; + function swap(array: any, x: string, y: string): any; + var cssUA: string; + var serverTimezoneOffset: number; + var transform: string; + var transformOrigin: string; + var transformStyle: string; + var transition: string; + var transitionDelay: string; + var transitionDuration: string; + var transitionProperty: string; + var transitionTimingFunction: string; + export module device { + function isAndroid(): boolean; + function isIOS(): boolean; + function isFlat(): boolean; + function isIOS7(): boolean; + function isWindows(): boolean; + } + export module widget { + var autoInit: boolean; + var registeredInstances: Array; + var registeredWidgets: Array; + function register(pluginName: string, className: string, prototype: any): void; + function destroyAll(elements: Element): void; + function init(element: Element): void; + function registerInstance(element: Element, pluginName: string, className: string, prototype: any):void; + } + + interface browserInfoOptions { + name: string; + version: string; + culture: Object; + isMSPointerEnabled: boolean; + } + class WidgetBase { + destroy(): void; + element: JQuery; + setModel(options: Object, forceSet?: boolean):any; + option(prop?: Object, value?: Object, forceSet?: boolean): any; + persistState(): void; + restoreState(silent: boolean): void; + } + + class Widget extends WidgetBase { + constructor(pluginName: string, className: string, proto: any); + static fn: Widget; + static extend(widget: Widget): any; + register(pluginName: string, className: string, prototype: any): void; + destroyAll(elements: Element): void; + model: any; + } + + + interface BaseEvent { + cancel: boolean; + type: string; + } + class DataManager { + constructor(dataSource?: any, query?: ej.Query, adaptor?: any); + setDefaultQuery(query: ej.Query): void; + executeQuery(query?: ej.Query, done?: any, fail?: any, always?: any): JQueryPromise; + executeLocal(query?: ej.Query): ej.DataManager; + saveChanges(changes?: Changes, key?: string, tableName?: string): JQueryDeferred; + insert(data: Object, tableName: string): JQueryPromise; + remove(keyField: string, value: any, tableName: string): Object; + update(keyField: string, value: any, tableName: string): Object; + } + + class Query { + constructor(); + static fn: Query; + static extend(prototype: Object): Query; + key(field: string): ej.Query; + using(dataManager: ej.DataManager): ej.Query; + execute(dataManager: ej.DataManager, done: any, fail?: string, always?: string): any; + executeLocal(dataManager: ej.DataManager): ej.DataManager; + clone(): ej.Query; + from(tableName: any): ej.Query; + addParams(key: string, value: string): ej.Query; + expand(tables: any): ej.Query; + where(fieldName: string, operator: ej.FilterOperators, value: string, ignoreCase?: boolean): ej.Query; + where(predicate:ej.Predicate):ej.Query; + search(searchKey: any, fieldNames?: any, operator?: string, ignoreCase?: boolean): ej.Query; + sortBy(fieldName: string, comparer?: ej.SortOrder, isFromGroup?: boolean): ej.Query; + sortByDesc(fieldName: string): ej.Query; + group(fieldName: string): ej.Query; + page(pageIndex: number, pageSize: number): ej.Query; + take(nos: number): ej.Query; + skip(nos: number): ej.Query; + select(fieldNames: any): ej.Query; + hierarchy(query: ej.Query, selectorFn: any): ej.Query; + foreignKey(key: string): ej.Query; + requiresCount(): ej.Query; + range(start:number, end:number): ej.Query; + } + + class Adaptor { + constructor(ds: any); + pvt: Object; + type: ej.Adaptor; + options: AdaptorOptions; + extend(overrides: any): ej.Adaptor; + processQuery(dm: ej.DataManager, query: ej.Query):any; + processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + convertToQueryString(req: any, query: ej.Query, dm: ej.DataManager): JQueryParam; + } + + interface AdaptorOptions { + from?: string; + requestType?: string; + sortBy?: string; + select?: string; + skip?: string; + group?: string; + take?: string; + search?: string; + count?: string; + where?: string; + aggregates?: string; + } + + class UrlAdaptor extends ej.Adaptor { + constructor(); + processQuery(dm: ej.DataManager, query: ej.Query, hierarchyFilters?: Object): { + type: string; url: string; ejPvtData: Object; contentType?: string; data?: Object; + } + convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; + processResponse(data: Object, ds: any, query: ej.Query, xhr: JQueryXHR, request?: Object, changes?: Changes): Object; + onGroup(e: any): void; + batchRequest(dm: ej.DataManager, changes: Changes, e: any): void; + beforeSend(dm: ej.DataManager, request: any, settings?:any): void; + insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: any }; + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data?: any }; + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { type: string; url: string; data: any }; + getFiltersFrom(data: Object, query: ej.Query): ej.Predicate; + } + + class ODataAdaptor extends ej.UrlAdaptor { + constructor(); + options: UrlAdaptorOptions; + onEachWhere(filter: any, requiresCast: boolean): any; + onPredicate(pred: ej.Predicate, query: ej.Query, requiresCast: boolean): string; + onComplexPredicate(pred: ej.Predicate, requiresCast: boolean): string; + onWhere(filters: Array): string; + onEachSearch(e: Object): void; + onSearch(e: Object): string; + onEachSort(e: Object): string; + onSortBy(e: Object): string; + onGroup(e: Object): string; + onSelect(e: Object): string; + onCount(e: Object): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { + result: Object; count: number + }; + convertToQueryString(req: Object, query: ej.Query, dm: ej.DataManager): JQueryParam; + insert(dm: ej.DataManager, data: Object, tableName: string): { url: string; data: Object; } + remove(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; } + update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: Object; accept: string; } + batchRequest(dm: ej.DataManager, changes: Changes, e: any): { url: string; type: string; data: Object; contentType: string; } + generateDeleteRequest(arr: Array, e: any): string; + generateInsertRequest(arr: Array, e: any): string; + generateUpdateRequest(arr: Array, e: any): string; + } + interface UrlAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class ODataV4Adaptor extends ej.ODataAdaptor { + constructor(); + options: ODataAdaptorOptions; + onCount(e: Object): string; + onEachSearch(e: Object): void; + onSearch(e: Object): string; + beforeSend(dm: ej.DataManager, request: any, settings?: any): void; + processResponse(data: Object, ds: Object, query: ej.Query, xhr:any, request: any, changes: Changes): { + result: Object; count: number + }; + + } + interface ODataAdaptorOptions { + requestType?: string; + accept?: string; + multipartAccept?: string; + sortBy?: string; + select?: string; + skip?: string; + take?: string; + count?: string; + search?: string; + where?: string; + expand?: string; + batch?: string; + changeSet?: string; + batchPre?: string; + contentId?: string; + batchContent?: string; + changeSetContent?: string; + batchChangeSetContentType?: string; + } + + class JsonAdaptor extends ej.Adaptor { + constructor(); + processQuery(ds: Object, query: ej.Query): string; + batchRequest(dm: ej.DataManager, changes: Changes, e:any): Changes; + onWhere(ds: Object, e: any): any; + onSearch(ds: Object, e: any): any + onSortBy(ds: Object, e: any, query: ej.Query): Object; + onGroup(ds: Object, e: any, query: ej.Query): Object; + onPage(ds: Object, e: any, query: ej.Query): Object; + onRange(ds: Object, e: any): Object; + onTake(ds: Object, e: any): Object; + onSkip(ds: Object, e: any): Object; + onSelect(ds: Object, e: any): Object; + insert(dm: ej.DataManager, data: any): Object; + remove(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + update(dm: ej.DataManager, keyField: string, value:any, tableName: string): Object; + } + class TableModel { + constructor(name: string, jsonArray: Array, dataManager: ej.DataManager, modelComputed: any); + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + setDataManager(dataManager: DataManager): void; + saveChanges(): void; + rejectChanges(): void; + insert(json: any): void; + update(value: any): void; + remove(key: string): void; + isDirty(): boolean; + getChanges(): Changes; + toArray(): Array; + setDirty(dirty:any, model:any): void; + get(index: number): void; + length(): number; + bindTo(element: any): void; + } + class Model { + constructor(json: any, table: string, name: string); + formElements: Array; + computes(value: any): void; + on(eventName: string, handler: any): void; + off(eventName: string, handler: any): void; + set(field: string, value: any): void; + get(field: string): any; + revert(suspendEvent: any): void; + save(dm: ej.DataManager, key: string): void; + markCommit(): void; + markDelete(): void; + changeState(state: boolean, args: any): void; + properties(): any; + bindTo(element: any): void; + unbind(element: any): void; + } + interface Changes { + changed?: Array; + added?: Array; + deleted?: Array; + } + class Predicate { + constructor(field: string, operator: ej.FilterOperators, value: any, ignoreCase: boolean); + and(field: string, operator: any, value:any, ignoreCase:boolean): void; + or(field: string, operator: any, value: any, ignoreCase: boolean): void; + validate(record: Object): boolean; + toJSON(): { + isComplex: boolean; + field: string; + operator: string; + value: any; + ignoreCase: boolean; + condition: string; + predicates: any; + }; + } + interface dataUtil { + swap(array: Array, x: number, y: number): void; + mergeSort(jsonArray: Array, fieldName: string, comparer:any): Array; + max(jsonArray: Array, fieldName: string, comparer: string): Array; + min(jsonArray: Array, fieldName: string, comparer: string): Array; + distinct(jsonArray: Array, fieldName: string, requiresCompleteRecord:any): Array; + sum(json:any, fieldName: string): number; + avg(json:any, fieldName: string): number; + select(jsonArray: Array, fieldName: string, fields:string): Array; + group(jsonArray: Array, field: string, /* internal */ level: number): Array; + parseTable(table: string, headerOption: ej.headerOption, headerRowIndex: number): Object; + } + interface AjaxSettings { + type?: string; + cache: boolean; + data?: any; + dataType?: string; + contentType?: any; + async?: boolean; + } + enum FilterOperators { + contains, + endsWith, + equal, + greaterThan, + greaterThanOrEqual, + lessThan, + lessThanOrEqual, + notEqual, + startsWith + } + + enum MatrixDefaults { + m11, + m12, + m21, + m22, + offsetX, + offsetY, + type + } + enum MatrixTypes { + Identity, + Scaling, + Translation, + Unknown + } + + enum Orientation { + Horizontal, + Vertical + } + + enum SliderType { + Default, + MinRange, + Range + } + + enum eventType { + click, + mouseDown, + mouseLeave, + mouseMove, + mouseUp + } + enum headerOption { + row, + tHead + } + + enum filterType{ + StartsWith, + Contains, + EndsWith, + LessThan, + GreaterThan, + LessThanOrEqual , + GreaterThanOrEqual, + Equal, + NotEqual + } + enum Animation{ + Fade, + None, + Slide + } + enum Type{ + Overlay, + Slide + } +class Draggable extends ej.Widget { + static fn: Draggable; + constructor(element: JQuery, options?: DraggableOptions); + constructor(element: Element, options?: DraggableOptions); + model: DraggableOptions; +} + +interface DraggableOptions { + scope?: string; + handle?: Object; + dragArea?: Object; + clone?: boolean; + distance?: number; + helper?: any; + cursorAt?: DragAtPositon; + destroy? (e: DraggableEvent): void; + drag? (e: DraggableDragEvent): void; + dragStart? (e: DraggableDragStartEvent): void; + dragStop? (e: DraggableDragStopEvent): void; + +} + +interface DragAtPositon { + top?: number; + left?: number; +} + +interface DraggableEvent extends ej.BaseEvent { + model: DraggableOptions; +} +interface DraggableDragStartEvent extends ej.BaseEvent, DraggableEvent { + element: Object; + target: Object; +} +interface DraggableDragStopEvent extends ej.BaseEvent, DraggableEvent { + element: Object; + target: Object; +} +interface DraggableDragEvent extends ej.BaseEvent, DraggableEvent { + element: Object; + target: Object; +} +class Droppable extends ej.Widget { + static fn: Droppable; + constructor(element: JQuery, options?: DroppableOptions); + constructor(element: Element, options?: DroppableOptions); + model: DroppableOptions; +} + +interface DroppableOptions { + scope?: string; + accept?: Object; + drop? (e: DroppableDropEvent): void; + over? (e: DroppableOverEvent): void; + out? (e: DroppableOutEvent): void; +} + +interface DroppableEvent extends ej.BaseEvent { + model: DroppableOptions; +} +interface DroppableDropEvent extends ej.BaseEvent, DraggableEvent { + targetElement: Object; +} +interface DroppableOverEvent extends ej.BaseEvent, DraggableEvent { + targetElement: Object; +} +interface DroppableOutEvent extends ej.BaseEvent, DraggableEvent { + targetElement: Object; +} +class Resizable extends ej.Widget { + static fn: Resizable; + constructor(element: JQuery, options?: ResizableOptions); + constructor(element: Element, options?: ResizableOptions); + model: ResizableOptions; +} + +interface ResizableOptions { + scope?: string; + handle?: Object; + distance?: number; + cursorAt?: resizeAtPositon; + helper?: any; + maxHeight?: (number|string); + maxWidth?: (number|string); + minHeight?: (number|string); + minWidth?: (number|string); + destroy? (e: ResizeEvent): void; + resizeStart? (e: ResizableStartEvent): void; + resize? (e: ResizableEvent): void; + resizeStop? (e: ResizableStopEvent): void; +} + +interface resizeAtPositon { + top?: number; + left?: number; +} + +interface ResizeEvent extends ej.BaseEvent { + model: ResizableOptions; +} +interface ResizableStartEvent extends ej.BaseEvent, ResizeEvent { + targetElement: Object; +} +interface ResizableEvent extends ej.BaseEvent, ResizeEvent { + targetElement: Object; +} +interface ResizableStopEvent extends ej.BaseEvent, ResizeEvent { + targetElement: Object; +} + + var globalize:globalize; + var cultures:culture; + function addCulture(name: string, culture ?: any): void; + function preferredCulture(culture ?: string): culture; + function format(value: any, format: string, culture ?: string): string; + function parseInt(value: string, radix?: any, culture ?: string): number; + function parseFloat(value: string, radix?: any, culture ?: string): number; + function parseDate(value: string, format: string, culture ?: string): Date; + function getLocalizedConstants(controlName: string, culture ?: string): any; + +interface globalize { + addCulture(name: string, culture?: any): void; + preferredCulture(culture?: string): culture; + format(value: any, format: string, culture?: string): string; + parseInt(value: string, radix?: any, culture?: string): number; + parseFloat(value: string, radix?: any, culture?: string): number; + parseDate(value: string, format: string, culture?: string): Date; + getLocalizedConstants(controlName: string, culture?: string): any; + } + interface culture { + name?: string; + englishName?: string; + namtiveName?: string; + language?: string; + isRTL: boolean; + numberFormat?: formatSettings; + calendars?: calendarsSettings; + } + interface formatSettings { + pattern: Array; + decimals: number; + groupSizes: Array; + percent: percentSettings; + currency: currencySettings; + } + interface percentSettings { + pattern: Array; + decimals: number; + groupSizes: Array; + symbol: string; + } + interface currencySettings { + pattern: Array; + decimals: number; + groupSizes: Array; + symbol: string; + } + interface calendarsSettings { + standard: standardSettings; + } + interface standardSettings { + firstDay: number; + days: daySettings; + months: monthSettings; + AM: Array; + PM: Array; + twoDigitYearMax: number; + patterns: patternSettings; + } + interface daySettings { + names: Array; + namesAbbr: Array; + namesShort: Array; + } + interface monthSettings { + names: Array; + namesAbbr: Array; + } + interface patternSettings { + d: string; + D: string; + t: string; + T: string; + f: string; + F: string; + M: string; + Y: string; + S: string; + } +class Scroller extends ej.Widget { + static fn: Scroller; + constructor(element: JQuery, options?: Scroller.Model); + constructor(element: Element, options?: Scroller.Model); + model:Scroller.Model; + defaults:Scroller.Model; + + /** destroy the Scroller control, unbind the all ej control related events automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** User disables the Scroller control at any time. + * @returns {void} + */ + disable(): void; + + /** User enables the Scroller control at any time. + * @returns {void} + */ + enable(): void; + + /** Returns true if horizontal scrollbar is shown, else return false. + * @returns {boolean} + */ + isHScroll(): boolean; + + /** Returns true if vertical scrollbar is shown, else return false. + * @returns {boolean} + */ + isVScroll(): boolean; + + /** User refreshes the Scroller control at any time. + * @returns {void} + */ + refresh(): void; + + /** Scroller moves to given pixel in X (left) position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. + * @returns {void} + */ + scrollX(): void; + + /** Scroller moves to given pixel in Y (top) position. We can also specify the animation speed,in which the scroller has to move while re-positioning it. + * @returns {void} + */ + scrollY(): void; +} +export module Scroller{ + +export interface Model { + + /**Set true to hides the scrollbar, when mouseout the content area. + * @Default {false} + */ + autoHide?: boolean; + + /**Specifies the height and width of button in the scrollbar. + * @Default {18} + */ + buttonSize?: number; + + /**Specifies to enable or disable the scroller + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Indicates the Right to Left direction to scroller + * @Default {undefined} + */ + enableRTL?: boolean; + + /**Enables or Disable the touch Scroll + * @Default {true} + */ + enableTouchScroll?: boolean; + + /**Specifies the height of Scroll panel and scrollbars. + * @Default {250} + */ + height?: number; + + /**If the scrollbar has vertical it set as width, else it will set as height of the handler. + * @Default {18} + */ + scrollerSize?: number; + + /**The Scroller content and scrollbars move left with given value. + * @Default {0} + */ + scrollLeft?: number; + + /**While press on the arrow key the scrollbar position added to the given pixel value. + * @Default {57} + */ + scrollOneStepBy?: number; + + /**The Scroller content and scrollbars move to top position with specified value. + * @Default {0} + */ + scrollTop?: number; + + /**Indicates the target area to which scroller have to appear. + * @Default {null} + */ + targetPane?: string; + + /**Specifies the width of Scroll panel and scrollbars. + * @Default {0} + */ + width?: number; + + /**Fires when Scroller control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when Scroller control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the scroller model + */ + model?: ej.Scroller.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the scroller model + */ + model?: ej.Scroller.Model; + + /**returns the name of the event. + */ + type?: string; +} +} + +class Accordion extends ej.Widget { + static fn: Accordion; + constructor(element: JQuery, options?: Accordion.Model); + constructor(element: Element, options?: Accordion.Model); + model:Accordion.Model; + defaults:Accordion.Model; + + /** AddItem method is used to add the panel in dynamically. It receives the following parameters + * @param {string} specify the name of the header + * @param {string} content of the new panel + * @param {number} insertion place of the new panel + * @param {boolean} Enable or disable the ajax request to the added panel + * @returns {void} + */ + addItem(header_name: string, content: string, index: number, isAjaxReq: boolean): void; + + /** This method used to collapse the all the expanded items in accordion at a time. + * @returns {void} + */ + collapseAll(): void; + + /** destroy the Accordion widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Disables the accordion widget includes all the headers and content panels. + * @returns {void} + */ + disable(): void; + + /** Disable the accordion widget item based on specified header index. + * @param {Array} index values to disable the panels + * @returns {void} + */ + disableItems(index: Array): void; + + /** Enable the accordion widget includes all the headers and content panels. + * @returns {void} + */ + enable(): void; + + /** Enable the accordion widget item based on specified header index. + * @param {Array} index values to enable the panels + * @returns {void} + */ + enableItems(index: Array): void; + + /** To expand all the accordion widget items. + * @returns {void} + */ + expandAll(): void; + + /** Returns the total number of panels in the control. + * @returns {number} + */ + getItemsCount(): number; + + /** Hides the visible Accordion control. + * @returns {void} + */ + hide(): void; + + /** The refresh method is used to adjust the control size based on the parent element dimension. + * @returns {void} + */ + refresh(): void; + + /** RemoveItem method is used to remove the specified index panel.It receives the parameter as number. + * @param {number} specify the index value for remove the accordion panel. + * @returns {void} + */ + removeItem( index : number): void; + + /** Shows the hidden Accordion control. + * @returns {void} + */ + show(): void; +} +export module Accordion{ + +export interface Model { + + /**Specifies the ajaxSettings option to load the content to the accordion control. + * @Default {null} + */ + ajaxSettings?: AjaxSettings; + + /**Accordion headers can be expanded and collapsed on keyboard action. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**To set the Accordion headers Collapse Speed. + * @Default {300} + */ + collapseSpeed?: number; + + /**Specifies the collapsible state of accordion control. + * @Default {false} + */ + collapsible?: boolean; + + /**Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /**Allows you to set the custom header Icon. It accepts two key values “header”, ”selectedHeader”. + * @Default {{ header: e-collapse, selectedHeader: e-expand }} + */ + customIcon?: CustomIcon; + + /**Disables the specified indexed items in accordion. + * @Default {[]} + */ + disabledItems?: number[]; + + /**Specifies the animation behavior in accordion. + * @Default {true} + */ + enableAnimation?: boolean; + + /**With this enabled property, you can enable or disable the Accordion. + * @Default {true} + */ + enabled?: boolean; + + /**Used to enable the disabled items in accordion. + * @Default {[]} + */ + enabledItems?: number[]; + + /**Multiple content panels to activate at a time. + * @Default {false} + */ + enableMultipleOpen?: boolean; + + /**Save current model value to browser cookies for maintaining states. When refreshing the accordion control page, the model value is applied from browser cookies or HTML 5local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Display headers and panel text from right-to-left. + * @Default {false} + */ + enableRTL?: boolean; + + /**The events API binds the action for activating the accordion header. Users can activate the header by using mouse actions such as mouse-over, mouse-up, mouse-down, and soon. + * @Default {click} + */ + events?: string; + + /**To set the Accordion headers Expand Speed. + * @Default {300} + */ + expandSpeed?: number; + + /**Sets the height for Accordion items header. + */ + headerSize?: number|string; + + /**Specifies height of the accordion. + * @Default {null} + */ + height?: number|string; + + /**Adjusts the content panel height based on the given option (content, auto, or fill). By default, the panel heights are adjusted based on the content. + * @Default {content} + */ + heightAdjustMode?: ej.Accordion.HeightAdjustMode|string; + + /**It allows to define the characteristics of the Accordion control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**The given index header will activate (open). If collapsible is set to true, and a negative value is given, then all headers are collapsed. Otherwise, the first panel isactivated. + * @Default {0} + */ + selectedItemIndex?: number|string; + + /**Activate the specified indexed items of the accordion + * @Default {[0]} + */ + selectedItems?: number[]; + + /**Used to determines the close button visibility an each accordion items. This close button helps to remove the accordion item from the control. + * @Default {false} + */ + showCloseButton?: boolean; + + /**Displays rounded corner borders on the Accordion control's panels and headers. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies width of the accordion. + * @Default {null} + */ + width?: number|string; + + /**Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value.*/ + activate? (e: ActivateEventArgs): void; + + /**Triggered before the AJAX content is loaded in a content panel. Arguments have location of the content (URL) and current model value.*/ + ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + + /**Triggered after AJAX load failed action. Arguments have URL, error message, and current model value.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**Triggered after the AJAX content loads. Arguments have current model values.*/ + ajaxLoad? (e: AjaxLoadEventArgs): void; + + /**Triggered after AJAX success action. Arguments have URL, content, and current model values.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**Triggered before a tab item is active. Arguments have active index and model values.*/ + beforeActivate? (e: BeforeActivateEventArgs): void; + + /**Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value.*/ + beforeInactivate? (e: BeforeInactivateEventArgs): void; + + /**Triggered after Accordion control creation.*/ + create? (e: CreateEventArgs): void; + + /**Triggered after Accordion control destroy.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered after a Accordion item is active or inactive. Argument values are activeIndex, activeHeader, inActiveHeader, inActiveIndex and current model value.*/ + inActivate? (e: InActivateEventArgs): void; +} + +export interface ActivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + activeIndex ?: number; + + /**returns current active header + */ + activeHeader ?: any; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface AjaxBeforeLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns current ajax content location + */ + url ?: string; +} + +export interface AjaxErrorEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns current ajax content location + */ + url ?: string; + + /**returns the failed data sent. + */ + data ?: string; +} + +export interface AjaxLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the name of the url + */ + url ?: string; +} + +export interface AjaxSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns current ajax content location + */ + url ?: string; + + /**returns the successful data sent. + */ + data ?: string; + + /**returns the ajax content. + */ + content ?: string; +} + +export interface BeforeActivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + activeIndex ?: number; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface BeforeInactivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + inActiveIndex ?: number; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface InActivateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the accordion model + */ + model ?: ej.Accordion.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns active index + */ + inActiveIndex ?: number; + + /**returns in active element + */ + inActiveHeader ?: any; + + /**returns true when the Accordion index activated by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface AjaxSettings { + + /**It specifies, whether to enable or disable asynchronous request. + */ + async?: boolean; + + /**It specifies the page will be cached in the web browser. + */ + cache?: boolean; + + /**It specifies the type of data is send in the query string. + */ + contentType?: string; + + /**It specifies the data as an object, will be passed in the query string. + */ + data?: any; + + /**It specifies the type of data that you're expecting back from the response. + */ + dataType?: string; + + /**It specifies the HTTP request type. + */ + type?: string; +} + +export interface CustomIcon { + + /**This class name set to collapsing header. + */ + header?: string; + + /**This class name set to expanded (active) header. + */ + selectedHeader?: string; +} + +enum HeightAdjustMode{ + + ///Height fit to the content in the panel + Content, + + ///Height set to the largest content in the panel + Auto, + + ///Height filled to the content of the panel + Fill +} + +} + +class Autocomplete extends ej.Widget { + static fn: Autocomplete; + constructor(element: JQuery, options?: Autocomplete.Model); + constructor(element: Element, options?: Autocomplete.Model); + model:Autocomplete.Model; + defaults:Autocomplete.Model; + + /** Clears the text in the Autocomplete textbox. + * @returns {void} + */ + clearText(): void; + + /** Destroys the Autocomplete widget. + * @returns {void} + */ + destroy(): void; + + /** Disables the autocomplete widget. + * @returns {void} + */ + disable(): void; + + /** Enables the autocomplete widget. + * @returns {void} + */ + enable(): void; + + /** Returns objects (data object) of all the selected items in the autocomplete textbox. + * @returns {void} + */ + getSelectedItems(): void; + + /** Returns the current selected value from the Autocomplete textbox. + * @returns {void} + */ + getValue(): void; + + /** Search the entered text and show it in the suggestion list if available. + * @returns {void} + */ + search(): void; + + /** Open up the autocomplete suggestion popup with all list items. + * @returns {void} + */ + open(): void; + + /** Sets the value of the Autocomplete textbox based on the given key value. + * @param {string} The key value of the specific suggestion item. + * @returns {void} + */ + selectValueByKey(Key: string): void; + + /** Sets the value of the Autocomplete textbox based on the given input text value. + * @param {string} The text (label) value of the specific suggestion item. + * @returns {void} + */ + selectValueByText(Text: string): void; +} +export module Autocomplete{ + +export interface Model { + + /**Customize "Add New" text (label) to be added in the autocomplete popup list for the entered text when there are no suggestions for it. + * @Default {Add New} + */ + addNewText?: boolean; + + /**Allows new values to be added to the autocomplete input other than the values in the suggestion list. Normally, when there are no suggestions it will display “No suggestions” label in the popup. + * @Default {false} + */ + allowAddNew?: boolean; + + /**Enables or disables the sorting of suggestion list item. The default sort order is ascending order. You customize sort order. + * @Default {true} + */ + allowSorting?: boolean; + + /**To focus the items in the suggestion list when the popup is shown. By default first item will be focused. + * @Default {false} + */ + autoFocus?: boolean; + + /**Enables or disables the case sensitive search. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**The root class for the Autocomplete textbox widget which helps in customizing its theme. + * @Default {””} + */ + cssClass?: string; + + /**The data source contains the list of data for the suggestions list. It can be a string array or json array. + * @Default {null} + */ + dataSource?: any|Array; + + /**The time delay (in milliseconds) after which the suggestion popup will be shown. + * @Default {200} + */ + delaySuggestionTimeout?: number; + + /**The special character which acts as a separator for the given words for multi-mode search i.e. the text after the delimiter are considered as a separate word or query for search operation. + * @Default {’,’} + */ + delimiterChar?: string; + + /**The text to be displayed in the popup when there are no suggestions available for the entered text. + * @Default {“No suggestions”} + */ + emptyResultText?: string; + + /**Fills the autocomplete textbox with the first matched item from the suggestion list automatically based on the entered text when enabled. + * @Default {false} + */ + enableAutoFill?: boolean; + + /**Enables or disables the Autocomplete textbox widget. + * @Default {true} + */ + enabled?: boolean; + + /**Enables or disables displaying the duplicate names present in the search result. + * @Default {false} + */ + enableDistinct?: boolean; + + /**Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. While refreshing the page, it retains the model value from browser cookies or local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays the Autocomplete widget’s content from right to left when enabled. + * @Default {false} + */ + enableRTL?: boolean; + + /**Mapping fields for the suggestion items of the Autocomplete textbox widget. + * @Default {null} + */ + fields?: any; + + /**Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’. + * @Default {ej.filterType.StartsWith} + */ + filterType?: string; + + /**The height of the Autocomplete textbox. + * @Default {null} + */ + height?: string; + + /**The search text can be highlighted in the AutoComplete suggestion list when enabled. + * @Default {false} + */ + highlightSearch?: boolean; + + /**Number of items to be displayed in the suggestion list. + * @Default {0} + */ + itemsCount?: number; + + /**Minimum number of character to be entered in the Autocomplete textbox to show the suggestion list. + * @Default {1} + */ + minCharacter?: number; + + /**Enables or disables selecting multiple values from the suggestion list. Multiple values can be selected through either of the following options, + * @Default {ej.MultiSelectMode.None} + */ + multiSelectMode?: ej.Autocomplete.MultiSelectMode|string; + + /**The height of the suggestion list. + * @Default {“152px”} + */ + popupHeight?: string; + + /**The width of the suggestion list. + * @Default {“auto”} + */ + popupWidth?: string; + + /**The query to retrieve the data from the data source. + * @Default {null} + */ + query?: ej.Query|string; + + /**Indicates that the autocomplete textbox values can only be readable. + * @Default {false} + */ + readOnly?: boolean; + + /**Enables or disables showing the message when there are no suggestions for the entered text. + * @Default {true} + */ + showEmptyResultText?: boolean; + + /**Enables or disables the loading icon to intimate the searching operation. The loading icon is visible when there is a time delay to perform the search. + * @Default {true} + */ + showLoadingIcon?: boolean; + + /**Enables the showPopup button in autocomplete textbox. When the Showpopup button is clicked, it displays all the available data from the data source. + * @Default {false} + */ + showPopupButton?: boolean; + + /**Enables or disables rounded corner. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Sort order specifies whether the suggestion list values has to be displayed in ascending or descending order. + * @Default {ej.SortOrder.Ascending} + */ + sortOrder?: ej.Autocomplete.SortOrder|string; + + /**The template to display the suggestion list items with customized appearance. + * @Default {null} + */ + template?: string; + + /**The jQuery validation error message to be displayed on form validation. + * @Default {null} + */ + validationMessage?: any; + + /**The jQuery validation rules for form validation. + * @Default {null} + */ + validationRules?: any; + + /**The value to be displayed in the autocomplete textbox. + * @Default {null} + */ + value?: string; + + /**Enables or disables the visibility of the autocomplete textbox. + * @Default {true} + */ + visible?: boolean; + + /**The text to be displayed when the value of the autocomplete textbox is empty. + * @Default {null} + */ + watermarkText?: string; + + /**The width of the Autocomplete textbox. + * @Default {null} + */ + width?: string; + + /**Triggers when the data requested from AJAX will get successfully loaded in the Autocomplete widget.*/ + actionSuccess? (e: ActionSuccessEventArgs): void; + + /**Triggers when the AJAX requests complete. The request may get failed or succeed.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggers when the data requested from AJAX get failed.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Triggers when the text box value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Triggers after the suggestion popup is closed.*/ + close? (e: CloseEventArgs): void; + + /**Triggers when Autocomplete widget is created.*/ + create? (e: CreateEventArgs): void; + + /**Triggers after the Autocomplete widget is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggers after the autocomplete textbox is focused.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Triggers after the Autocomplete textbox gets out of the focus.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Triggers after the suggestion list is opened.*/ + open? (e: OpenEventArgs): void; + + /**Triggers when an item has been selected from the suggestion list.*/ + select? (e: SelectEventArgs): void; +} + +export interface ActionSuccessEventArgs { +} + +export interface ActionCompleteEventArgs { +} + +export interface ActionFailureEventArgs { +} + +export interface ChangeEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; +} + +export interface CloseEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; +} + +export interface OpenEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface SelectEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the autocomplete model object. + */ + model?: ej.Autocomplete.Model; + + /**Name of the event. + */ + type?: string; + + /**Value of the autocomplete textbox. + */ + value?: string; + + /**Text of the selected item. + */ + text?: string; + + /**Key of the selected item. + */ + key?: string; + + /**Data object of the selected item. + */ + Item?: ej.Autocomplete.Model; +} + +enum MultiSelectMode{ + + ///Multiple values are separated using a given special character. + Delimiter, + + ///Each values are displayed in separate box with close button. + VisualMode +} + + +enum SortOrder{ + + ///Items to be displayed in the suggestion list in ascending order. + Ascending, + + ///Items to be displayed in the suggestion list in descending order. + Descending +} + +} + +class Button extends ej.Widget { + static fn: Button; + constructor(element: JQuery, options?: Button.Model); + constructor(element: Element, options?: Button.Model); + model:Button.Model; + defaults:Button.Model; + + /** destroy the button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the button + * @returns {void} + */ + disable(): void; + + /** To enable the button + * @returns {void} + */ + enable(): void; +} +export module Button{ + +export interface Model { + + /**Specifies the contentType of the Button. See below to know available ContentType + * @Default {ej.ContentType.TextOnly} + */ + contentType?: ej.ContentType|string; + + /**Sets the root CSS class for Button theme, which is used customize. + */ + cssClass?: string; + + /**Specifies the button control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the Right to Left direction to button + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the Button. + * @Default {28} + */ + height?: number; + + /**It allows to define the characteristics of the Button control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the image position of the Button. This image position is applicable only with the textandimage contentType property. The images can be positioned in both imageLeft and imageRight options. See below to know about available ImagePosition + * @Default {ej.ImagePosition.ImageLeft} + */ + imagePosition?: ej.ImagePosition|string; + + /**Specifies the primary icon for Button. This icon will be displayed from the left margin of the button. + * @Default {null} + */ + prefixIcon?: string; + + /**Convert the button as repeat button. It raises the 'Click' event repeatedly from the it is pressed until it is released. + * @Default {false} + */ + repeatButton?: boolean; + + /**Displays the Button with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the size of the Button. See below to know available ButtonSize + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /**Specifies the secondary icon for Button. This icon will be displayed from the right margin of the button. + * @Default {null} + */ + suffixIcon?: string; + + /**Specifies the text content for Button. + * @Default {null} + */ + text?: string; + + /**Specified the time interval between two consecutive 'click' event on the button. + * @Default {150} + */ + timeInterval?: string; + + /**Specifies the Type of the Button. See below to know available ButtonType + * @Default {ej.ButtonType.Submit} + */ + type?: ej.ButtonType|string; + + /**Specifies the width of the Button. + * @Default {100} + */ + width?: number; + + /**Fires when Button control is clicked successfully.Consider the scenario to perform any validation,modification of content or any other operations click on button,we can make use of this click event to achieve the scenario.*/ + click? (e: ClickEventArgs): void; + + /**Fires after Button control is created.If the user want to perform any operation after the button control creation then the user can make use of this create event.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the button is destroyed successfully.If the user want to perform any operation after the destroy button control then the user can make use of this destroy event.*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the button model + */ + model?: ej.Button.Model; + + /**returns the name of the event + */ + type?: string; + + /**return the button state + */ + status?: boolean; + + /**return the event model for sever side processing. + */ + e?: any; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the button model + */ + model?: ej.Button.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the button model + */ + model?: ej.Button.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum ContentType +{ +//To display the text content only in button +TextOnly, +//To display the image only in button +ImageOnly, +//Supports to display image for both ends of the button +ImageBoth, +//Supports to display image with the text content +TextAndImage, +//Supports to display image with both ends of the text +ImageTextImage, +} +enum ImagePosition +{ +//support for aligning text in left and image in right +ImageRight, +//support for aligning text in right and image in left +ImageLeft, +//support for aligning text in bottom and image in top. +ImageTop, +//support for aligning text in top and image in bottom +ImageBottom, +} +enum ButtonSize +{ +//Creates button with inbuilt default size height, width specified +Normal, +//Creates button with inbuilt mini size height, width specified +Mini, +//Creates button with inbuilt small size height, width specified +Small, +//Creates button with inbuilt medium size height, width specified +Medium, +//Creates button with inbuilt large size height, width specified +Large, +} +enum ButtonType +{ +//Creates button with inbuilt button type specified +Button, +//Creates button with inbuilt reset type specified +Reset, +//Creates button with inbuilt submit type specified +Submit, +} + +class Captcha extends ej.Widget { + static fn: Captcha; + constructor(element: JQuery, options?: Captcha.Model); + constructor(element: Element, options?: Captcha.Model); + model:Captcha.Model; + defaults:Captcha.Model; +} +export module Captcha{ + +export interface Model { + + /**Specifies the character set of the Captcha that will be used to generate captcha text randomly. + */ + characterSet?: string; + + /**Specifies the error message to be displayed when the Captcha mismatch. + */ + customErrorMessage?: string; + + /**Set the Captcha validation automatically. + */ + enableAutoValidation?: boolean; + + /**Specifies the case sensitivity for the characters typed in the Captcha. + */ + enableCaseSensitivity?: boolean; + + /**Specifies the background patterns for the Captcha. + */ + enablePattern?: boolean; + + /**Sets the Captcha direction as right to left alignment. + */ + enableRTL?: boolean; + + /**Specifies the background apperance for the captcha. + */ + hatchStyle?: ej.HatchStyle|string; + + /**Specifies the height of the Captcha. + */ + height?: number; + + /**Specifies the method with values to be mapped in the Captcha. + */ + mapper?: string; + + /**Specifies the maximum number of characters used in the Captcha. + */ + maximumLength?: number; + + /**Specifies the minimum number of characters used in the Captcha. + */ + minimumLength?: number; + + /**Specifies the method to map values to Captcha. + */ + requestMapper?: string; + + /**Sets the Captcha with audio support, that enables to dictate the captcha text. + */ + showAudioButton?: boolean; + + /**Sets the Captcha with a refresh button. + */ + showRefreshButton?: boolean; + + /**Specifies the target button of the Captcha to validate the entered text and captcha text. + */ + targetButton?: string; + + /**Specifies the target input element that will verify the Captcha. + */ + targetInput?: string; + + /**Specifies the width of the Captcha. + */ + width?: number; + + /**Fires when captch refresh begins.*/ + refreshBegin? (e: RefreshBeginEventArgs): void; + + /**Fires after captch refresh completed.*/ + refreshComplete? (e: RefreshCompleteEventArgs): void; + + /**Fires when captch refresh fails to load.*/ + refreshFailure? (e: RefreshFailureEventArgs): void; + + /**Fires after captch refresh succeeded.*/ + refreshSuccess? (e: RefreshSuccessEventArgs): void; +} + +export interface RefreshBeginEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RefreshCompleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RefreshFailureEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RefreshSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Captcha model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} +} +enum HatchStyle +{ +//Set background as None to Captcha +None, +//Set background as BackwardDiagonal to Captcha +BackwardDiagonal, +//Set background as Cross to Captcha +Cross, +//Set background as DarkDownwardDiagonal to Captcha +DarkDownwardDiagonal, +//Set background as DarkHorizontal to Captcha +DarkHorizontal, +//Set background as DarkUpwardDiagonal to Captcha +DarkUpwardDiagonal, +//Set background as DarkVertical to Captcha +DarkVertical, +//Set background as DashedDownwardDiagonal to Captcha +DashedDownwardDiagonal, +//Set background as DashedHorizontal to Captcha +DashedHorizontal, +//Set background as DashedUpwardDiagonal to Captcha +DashedUpwardDiagonal, +//Set background as DashedVertical to Captcha +DashedVertical, +//Set background as DiagonalBrick to Captcha +DiagonalBrick, +//Set background as DiagonalCross to Captcha +DiagonalCross, +//Set background as Divot to Captcha +Divot, +//Set background as DottedDiamond to Captcha +DottedDiamond, +//Set background as DottedGrid to Captcha +DottedGrid, +//Set background as ForwardDiagonal to Captcha +ForwardDiagonal, +//Set background as Horizontal to Captcha +Horizontal, +//Set background as HorizontalBrick to Captcha +HorizontalBrick, +//Set background as LargeCheckerBoard to Captcha +LargeCheckerBoard, +//Set background as LargeConfetti to Captcha +LargeConfetti, +//Set background as LargeGrid to Captcha +LargeGrid, +//Set background as LightDownwardDiagonal to Captcha +LightDownwardDiagonal, +//Set background as LightHorizontal to Captcha +LightHorizontal, +//Set background as LightUpwardDiagonal to Captcha +LightUpwardDiagonal, +//Set background as LightVertical to Captcha +LightVertical, +//Set background as Max to Captcha +Max, +//Set background as Min to Captcha +Min, +//Set background as NarrowHorizontal to Captcha +NarrowHorizontal, +//Set background as NarrowVertical to Captcha +NarrowVertical, +//Set background as OutlinedDiamond to Captcha +OutlinedDiamond, +//Set background as Percent90 to Captcha +Percent90, +//Set background as Wave to Captcha +Wave, +//Set background as Weave to Captcha +Weave, +//Set background as WideDownwardDiagonal to Captcha +WideDownwardDiagonal, +//Set background as WideUpwardDiagonal to Captcha +WideUpwardDiagonal, +//Set background as ZigZag to Captcha +ZigZag, +} + +class ListBox extends ej.Widget { + static fn: ListBox; + constructor(element: JQuery, options?: ListBox.Model); + constructor(element: Element, options?: ListBox.Model); + model:ListBox.Model; + defaults:ListBox.Model; + + /** Adds a given list items in the ListBox widget at a specified index. It accepts two parameters. + * @param {any|string} This can be a list item object (for JSON binding) or a string (for UL and LI rendering). Also we can the specify this as an array of list item object or an array of strings to add multiple items. + * @param {number} The index value to add the given items at the specified index. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + addItem(listItem: any|string, index: number): void; + + /** Checks all the list items in the ListBox widget. It is dependent on showCheckbox property. + * @returns {void} + */ + checkAll(): void; + + /** Checks a list item by using its index. It is dependent on showCheckbox property. + * @param {number} Index of the listbox item to be checked. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + checkItemByIndex(index: number): void; + + /** Checks multiple list items by using its index values. It is dependent on showCheckbox property. + * @param {number[]} Index/Indices of the listbox items to be checked. If index is not specified, the given items will be added at the end of the list. + * @returns {void} + */ + checkItemsByIndices(indices: number[]): void; + + /** Disables the ListBox widget. + * @returns {void} + */ + disable(): void; + + /** Disables a list item by passing the item text as parameter. + * @param {string} Text of the listbox item to be disabled. + * @returns {void} + */ + disableItem(text: string): void; + + /** Disables a list Item using its index value. + * @param {number} Index of the listbox item to be disabled. + * @returns {void} + */ + disableItemByIndex(index: number): void; + + /** Disables set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be disabled. + * @returns {void} + */ + disableItemsByIndices(Indices: number[]|string): void; + + /** Enables the ListBox widget when it is disabled. + * @returns {void} + */ + enable(): void; + + /** Enables a list Item using its item text value. + * @param {string} Text of the listbox item to be enabled. + * @returns {void} + */ + enableItem(text: string): void; + + /** Enables a list item using its index value. + * @param {number} Index of the listbox item to be enabled. + * @returns {void} + */ + enableItemByIndex(index: number): void; + + /** Enables a set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be enabled. + * @returns {void} + */ + enableItemsByIndices(indices: number[]|string): void; + + /** Returns the list of checked items in the ListBox widget. It is dependent on showCheckbox property. + * @returns {any} + */ + getCheckedItems(): any; + + /** Returns the list of selected items in the ListBox widget. + * @returns {any} + */ + getSelectedItems(): any; + + /** Returns an item’s index based on the given text. + * @param {string} The list item text (label) + * @returns {number} + */ + getIndexByText(text: string): number; + + /** Returns an item’s index based on the value given. + * @param {string} The list item’s value + * @returns {number} + */ + getIndexByValue(indices: string): number; + + /** Returns an item’s text (label) based on the index given. + * @returns {string} + */ + getTextByIndex(): string; + + /** Returns a list item’s object using its index. + * @returns {any} + */ + getItemByIndex(): any; + + /** Returns a list item’s object based on the text given. + * @param {string} The list item text. + * @returns {any} + */ + getItemByText(text: string): any; + + /** Merges the given data with the existing data items in the listbox. + * @param {Array} Data to merge in listbox. + * @returns {void} + */ + mergeData(data: Array): void; + + /** Selects the next item based on the current selection. + * @returns {void} + */ + moveDown(): void; + + /** Selects the previous item based on the current selection. + * @returns {void} + */ + moveUp(): void; + + /** Refreshes the ListBox widget. + * @param {boolean} Refreshes both the datasource and the dimensions of the ListBox widget when the parameter is passed as true, otherwise only the ListBox dimensions will be refreshed. + * @returns {void} + */ + refresh(refreshData: boolean): void; + + /** Removes all the list items from listbox. + * @returns {void} + */ + removeAll(): void; + + /** Removes the selected list items from the listbox. + * @returns {void} + */ + removeSelectedItems(): void; + + /** Removes a list item by using its text. + * @param {string} Text of the listbox item to be removed. + * @returns {void} + */ + removeItemByText(text: string): void; + + /** Removes a list item by using its index value. + * @param {number} Index of the listbox item to be removed. + * @returns {void} + */ + removeItemByIndex(index: number): void; + + /** + * @returns {void} + */ + selectAll(): void; + + /** Selects the list tem using its text value. + * @param {string} Text of the listbox item to be selected. + * @returns {void} + */ + selectItemByText(text: string): void; + + /** Selects list tem using its value property. + * @param {string} Value of the listbox item to be selected. + * @returns {void} + */ + selectItemByValue(value: string): void; + + /** Selects list item using its index value. + * @param {number} Index of the listbox item to be selected. + * @returns {void} + */ + selectItemByIndex(index: number): void; + + /** Selects a set of list items through its index values. + * @param {number|number[]} Index/Indices of the listbox item to be selected. + * @returns {void} + */ + selectItemsByIndices(Indices: number|number[]): void; + + /** Unchecks all the checked list items in the ListBox widget. To use this method showCheckbox property to be set as true. + * @returns {void} + */ + uncheckAll(): void; + + /** Unchecks a checked list item using its index value. To use this method showCheckbox property to be set as true. + * @param {number} Index of the listbox item to be unchecked. + * @returns {void} + */ + uncheckItemByIndex(index: number): void; + + /** Unchecks the set of checked list items using its index values. To use this method showCheckbox property must be set to true. + * @param {number[]|string} Indices of the listbox item to be unchecked. + * @returns {void} + */ + uncheckItemsByIndices(indices: number[]|string): void; + + /** + * @returns {void} + */ + unselectAll(): void; + + /** Unselects a selected list item using its index value + * @param {number} Index of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByIndex(index: number): void; + + /** Unselects a selected list item using its text value. + * @param {string} Text of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByText(text: string): void; + + /** Unselects a selected list item using its value. + * @param {string} Value of the listbox item to be unselected. + * @returns {void} + */ + unselectItemByValue(value: string): void; + + /** Unselects a set of list items using its index values. + * @param {number[]|string} Indices of the listbox item to be unselected. + * @returns {void} + */ + unselectItemsByIndices(indices: number[]|string): void; + + /** Hides all the checked items in the listbox. + * @returns {void} + */ + hideCheckedItems (): void; + + /** Shows a set of hidden list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be shown. + * @returns {void} + */ + showItemByIndices(indices: number[]|string): void; + + /** Hides a set of list Items using its index values. + * @param {number[]|string} Indices of the listbox items to be hidden. + * @returns {void} + */ + hideItemsByIndices(indices: number[]|string): void; + + /** Shows the hidden list items using its values. + * @param {Array} Values of the listbox items to be shown. + * @returns {void} + */ + showItemsByValues(values: Array): void; + + /** Hides the list item using its values. + * @param {Array} Values of the listbox items to be hidden. + * @returns {void} + */ + hideItemsByValues(values: Array): void; + + /** Shows a hidden list item using its value. + * @param {string} Value of the listbox item to be shown. + * @returns {void} + */ + showItemByValue(value: string): void; + + /** Hide a list item using its value. + * @param {string} Value of the listbox item to be hidden. + * @returns {void} + */ + hideItemByValue(value: string): void; + + /** Shows a hidden list item using its index value. + * @param {number} Index of the listbox item to be shown. + * @returns {void} + */ + showItemByIndex(index: number): void; + + /** Hides a list item using its index value. + * @param {number} Index of the listbox item to be hidden. + * @returns {void} + */ + hideItemByIndex (index: number): void; + + /** + * @returns {void} + */ + show(): void; + + /** Hides the listbox. + * @returns {void} + */ + hide(): void; + + /** Hides all the listbox items in the listbox. + * @returns {void} + */ + hideAllItems(): void; + + /** Shows all the listbox items in the listbox. + * @returns {void} + */ + showAllItems(): void; +} +export module ListBox{ + +export interface Model { + + /**Enables/disables the dragging behavior of the items in ListBox widget. + * @Default {false} + */ + allowDrag?: boolean; + + /**Accepts the items which are dropped in to it, when it is set to true. + * @Default {false} + */ + allowDrop?: boolean; + + /**Enables or disables multiple selection. + * @Default {false} + */ + allowMultiSelection?: boolean; + + /**Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property. + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /**Enables or disables the case sensitive search for list item by typing the text (search) value. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**Dynamically populate data of a list box while selecting an item in another list box i.e. rendering child list box based on the item selection in parent list box. This property accepts the id of the child ListBox widget to populate the data. + * @Default {null} + */ + cascadeTo?: string; + + /**Set of list items to be checked by default using its index. It works only when the showCheckbox property is set to true. + * @Default {null} + */ + checkedIndices?: string; + + /**The root class for the ListBox widget to customize the existing theme. + * @Default {“”} + */ + cssClass?: string; + + /**Contains the list of data for generating the list items. + * @Default {null} + */ + dataSource?: any; + + /**Enables or disables the ListBox widget. + * @Default {true} + */ + enabled?: boolean; + + /**Enables or disables the search behavior to find the specific list item by typing the text value. + * @Default {false} + */ + enableIncrementalSearch?: boolean; + + /**Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays the ListBox widget’s content from right to left when enabled. + * @Default {false} + */ + enableRTL?: boolean; + + /**Mapping fields for the data items of the ListBox widget. + * @Default {null} + */ + fields?: any; + + /**Defines the height of the ListBox widget. + * @Default {null} + */ + height?: string; + + /**The number of list items to be shown in the ListBox widget. The remaining list items will be scrollable. + * @Default {null} + */ + itemsCount?: number; + + /**The total number of list items to be rendered in the ListBox widget. + * @Default {null} + */ + totalItemsCount?: number; + + /**The number of list items to be loaded in the list box while enabling virtual scrolling and when virtualScrollMode is set to continuous. + * @Default {5} + */ + itemRequestCount?: number; + + /**Loads data for the listbox by default (i.e. on initialization) when it is set to true. It creates empty ListBox if it is set to false. + */ + loadDataOnInit?: boolean; + + /**The query to retrieve required data from the data source. + * @Default {ej.Query()} + */ + query?: ej.Query|string; + + /**The list item to be selected by default using its index. + * @Default {null} + */ + selectedIndex?: number; + + /**The list items to be selected by default using its indices. To use this property allowMultiSelection should be enabled. + * @Default {[]} + */ + selectedIndices?: Array; + + /**Enables/Disables the multi selection option with the help of checkbox control. + * @Default {false} + */ + showCheckbox?: boolean; + + /**To display the ListBox container with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**The template to display the ListBox widget with customized appearance. + * @Default {null} + */ + template?: string; + + /**Holds the selected items values and used to bind value to the list item using angular and knockout. + * @Default {“”} + */ + value?: number; + + /**Specifies the virtual scroll mode to load the list data on demand via scrolling behavior. There are two types of mode. + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /**Defines the width of the ListBox widget. + * @Default {null} + */ + width?: string; + + /**Specifies the targetID for the listbox items. + */ + targetID?: string; + + /**Triggers before the AJAX request begins to load data in the ListBox widget.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggers after the data requested via AJAX is successfully loaded in the ListBox widget.*/ + actionSuccess? (e: ActionSuccessEventArgs): void; + + /**Triggers when the AJAX requests complete. The request may get failed or succeed.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggers when the data requested from AJAX get failed.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Event will be triggered before the requested data via AJAX once loaded in successfully.*/ + actionBeforeSuccess? (e: ActionBeforeSuccessEventArgs): void; + + /**Triggers when the item selection is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Triggers when the list item is checked or unchecked.*/ + checkChange? (e: CheckChangeEventArgs): void; + + /**Triggers when the ListBox widget is created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Triggers when the ListBox widget is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggers when focus the listbox items.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Triggers when focus out from listbox items.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Triggers when the list item is being dragged.*/ + itemDrag? (e: ItemDragEventArgs): void; + + /**Triggers when the list item is ready to be dragged.*/ + itemDragStart? (e: ItemDragStartEventArgs): void; + + /**Triggers when the list item stops dragging.*/ + itemDragStop? (e: ItemDragStopEventArgs): void; + + /**Triggers when the list item is dropped.*/ + itemDrop? (e: ItemDropEventArgs): void; + + /**Triggers when a list item gets selected.*/ + select? (e: SelectEventArgs): void; + + /**Triggers when a list item gets unselected.*/ + unselect? (e: UnselectEventArgs): void; +} + +export interface ActionBeginEventArgs { +} + +export interface ActionSuccessEventArgs { +} + +export interface ActionCompleteEventArgs { +} + +export interface ActionFailureEventArgs { +} + +export interface ActionBeforeSuccessEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List of actual object. + */ + actual?: any; + + /**Object of ListBox widget which contains DataManager arguments + */ + request?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**List of array object + */ + result?: Array; + + /**ExcuteQuery object of DataManager + */ + xhr?: any; +} + +export interface ChangeEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface CheckChangeEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface CreateEventArgs { + + /**Instance of the listbox model object. + */ + model?: ej.ListBox.Model; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface DestroyEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface FocusInEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface FocusOutEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; +} + +export interface ItemDragEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface ItemDragStartEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface ItemDragStopEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface ItemDropEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on whether the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface SelectEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} + +export interface UnselectEventArgs { + + /**Instance of the listbox model object. + */ + model?: any; + + /**Name of the event. + */ + type?: string; + + /**List item object. + */ + item?: any; + + /**The Datasource of the listbox. + */ + data?: any; + + /**List item’s index. + */ + index?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Boolean value based on whether the list item is checked or not. + */ + isChecked?: boolean; + + /**Boolean value based on whether the list item is selected or not. + */ + isSelected?: boolean; + + /**Boolean value based on the list item is enabled or not. + */ + isEnabled?: boolean; + + /**List item’s text (label). + */ + text?: string; + + /**List item’s value. + */ + value?: string; +} +} + +class Calculate extends ej.Widget { + static fn: Calculate; + constructor(element: JQuery, options?: Calculate.Model); + constructor(element: Element, options?: Calculate.Model); + model:Calculate.Model; + defaults:Calculate.Model; + + /** Add the custom formuls with function in CalcEngine library + * @param {string} pass the formula name + * @param {string} pass the custom function name to call + * @returns {void} + */ + addCustomFunction(FormulaName: string, FunctionName: string): void; + + /** Adds a named range to the NamedRanges collection + * @param {string} pass the namedRange's name + * @param {string} pass the cell range of NamedRange + * @returns {void} + */ + addNamedRange(Name: string, cellRange: string): void; + + /** Accepts a possible parsed formula and returns the calculated value without quotes. + * @param {string} pass the cell range to adjust its range + * @returns {string} + */ + adjustRangeArg(Name: string): string; + + /** When a formula cell changes, call this method to clear it from its dependent cells. + * @param {string} pass the changed cell address + * @returns {void} + */ + clearFormulaDependentCells(Cell: string): void; + + /** Call this method to clear whether an exception was raised during the computation of a library function. + * @returns {void} + */ + clearLibraryComputationException(): void; + + /** Get the column index from a cell reference passed in. + * @param {string} pass the cell address + * @returns {void} + */ + colIndex(Cell: string): void; + + /** Evaluates a parsed formula. + * @param {string} pass the parsed formula + * @returns {string} + */ + computedValue(Formula: string): string; + + /** Evaluates a parsed formula. + * @param {string} pass the parsed formula + * @returns {string} + */ + computeFormula(Formula: string): string; +} +export module Calculate{ + +export interface Model { +} +} + +class CheckBox extends ej.Widget { + static fn: CheckBox; + constructor(element: JQuery, options?: CheckBox.Model); + constructor(element: Element, options?: CheckBox.Model); + model:CheckBox.Model; + defaults:CheckBox.Model; + + /** Destroy the CheckBox widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Disable the CheckBox to prevent all user interactions. + * @returns {void} + */ + disable(): void; + + /** To enable the CheckBox + * @returns {void} + */ + enable(): void; + + /** To Check the status of CheckBox + * @returns {boolean} + */ + isChecked(): boolean; +} +export module CheckBox{ + +export interface Model { + + /**Specifies whether CheckBox has to be in checked or not. We can also specify array of string as value for this property. If any of the value in the specified array matches the value of the textbox, then it will be considered as checked. It will be useful in MVVM binding, specify array type to identify the values of the checked CheckBoxes. + * @Default {false} + */ + checked?: boolean|string[]; + + /**Specifies the State of CheckBox.See below to get available CheckState + * @Default {null} + */ + checkState?: ej.CheckState|string; + + /**Sets the root CSS class for CheckBox theme, which is used customize. + */ + cssClass?: string; + + /**Specifies the checkbox control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the persist property for CheckBox while initialization. The persist API save current model value to browser cookies for state maintains. While refreshing the CheckBox control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left direction to Checkbox + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the enable or disable Tri-State for checkbox control. + * @Default {false} + */ + enableTriState?: boolean; + + /**It allows to define the characteristics of the CheckBox control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specified value to be added an id attribute of the CheckBox. + * @Default {null} + */ + id?: string; + + /**Specify the prefix value of id to be added before the current id of the CheckBox. + * @Default {ej} + */ + idPrefix?: string; + + /**Specifies the name attribute of the CheckBox. + * @Default {null} + */ + name?: string; + + /**Displays rounded corner borders to CheckBox + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the size of the CheckBox.See below to know available CheckboxSize + * @Default {small} + */ + size?: ej.CheckboxSize|string; + + /**Specifies the text content to be displayed for CheckBox. + */ + text?: string; + + /**Set the jQuery validation error message in CheckBox. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jQuery validation rules in CheckBox. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value attribute of the CheckBox. + * @Default {null} + */ + value?: string; + + /**Fires before the CheckBox is going to changed its state successfully*/ + beforeChange? (e: BeforeChangeEventArgs): void; + + /**Fires when the CheckBox state is changed successfully*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the CheckBox state is created successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires when the CheckBox state is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface BeforeChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the event model values + */ + event?: any; + + /**returns the status whether the element is checked or not. + */ + isChecked?: boolean; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the event arguments + */ + event?: any; + + /**returns the status whether the element is checked or not. + */ + isChecked?: boolean; + + /**returns the state of the checkbox + */ + checkState?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the CheckBox model + */ + model?: ej.CheckBox.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum CheckState +{ +//string +Uncheck, +//string +Check, +//string +Indeterminate, +} +enum CheckboxSize +{ +//Displays the CheckBox in medium size +Medium, +//Displays the CheckBox in small size +Small, +} + +class ColorPicker extends ej.Widget { + static fn: ColorPicker; + constructor(element: JQuery, options?: ColorPicker.Model); + constructor(element: Element, options?: ColorPicker.Model); + model:ColorPicker.Model; + defaults:ColorPicker.Model; + + /** Disables the color picker control + * @returns {void} + */ + disable(): void; + + /** Enable the color picker control + * @returns {void} + */ + enable(): void; + + /** Gets the selected color in RGB format + * @returns {any} + */ + getColor(): any; + + /** Gets the selected color value as string + * @returns {string} + */ + getValue(): string; + + /** To Convert color value from hexCode to RGB + * @returns {any} + */ + hexCodeToRGB(): any; + + /** Hides the ColorPicker popup, if in opened state. + * @returns {void} + */ + hide(): void; + + /** Convert color value from HSV to RGB + * @returns {any} + */ + HSVToRGB(): any; + + /** Convert color value from RGB to HEX + * @returns {string} + */ + RGBToHEX(): string; + + /** Convert color value from RGB to HSV + * @returns {any} + */ + RGBToHSV(): any; + + /** Open the ColorPicker popup. + * @returns {void} + */ + show(): void; +} +export module ColorPicker{ + +export interface Model { + + /**The ColorPicker control allows to define the customized text to displayed in button elements. Using the property to achieve the customized culture values. + * @Default {buttonText.apply= Apply, buttonText.cancel= Cancel,buttonText.swatches=Swatches} + */ + buttonText?: any; + + /**Allows to change the mode of the button. Please refer below to know available button mode + * @Default {ej.ButtonMode.Split} + */ + buttonMode?: ej.ButtonMode|string; + + /**Specifies the number of columns to be displayed color palette model. + * @Default {10} + */ + columns?: number; + + /**This property allows you to customize its appearance using user-defined CSS and custom skin options such as colors and backgrounds. + */ + cssClass?: string; + + /**This property allows to define the custom colors in the palette model.Custom palettes are created by passing a comma delimited string of HEX values or an array of colors. + * @Default {empty} + */ + custom?: Array; + + /**This property allows to embed the popup in the order of DOM element flow . When we set the value as true, the color picker popup is always in visible state. + * @Default {false} + */ + displayInline?: boolean; + + /**This property allows to change the control in enabled or disabled state. + * @Default {true} + */ + enabled?: boolean; + + /**This property allows to enable or disable the opacity slider in the color picker control + * @Default {true} + */ + enableOpacity?: boolean; + + /**It allows to define the characteristics of the ColorPicker control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the model type to be rendered initially in the color picker control. See below to get available ModelType + * @Default {ej.ColorPicker.ModelType.Default} + */ + modelType?: ej.ColorPicker.ModelType|string; + + /**This property allows to change the opacity value .The selected color opacity will be adjusted by using this opacity value. + * @Default {100} + */ + opacityValue?: number; + + /**Specifies the palette type to be displayed at initial time in palette model.There two types of palette model available in ColorPicker control. See below available Palette + * @Default {ej.ColorPicker.Palette.BasicPalette} + */ + palette?: ej.ColorPicker.Palette|string; + + /**This property allows to define the preset model to be rendered initially in palette type.It consists of 12 different types of presets. Each presets have 50 colors. See below available Presets + * @Default {ej.ColorPicker.Presets.Basic} + */ + presetType?: ej.ColorPicker.Presets|string; + + /**Allows to show/hides the apply and cancel buttons in ColorPicker control + * @Default {true} + */ + showApplyCancel?: boolean; + + /**Allows to show/hides the clear button in ColorPicker control + * @Default {true} + */ + showClearButton?: boolean; + + /**This property allows to provides live preview support for current cursor selection color and selected color. + * @Default {true} + */ + showPreview?: boolean; + + /**This property allows to store the color values in custom list.The ColorPicker will keep up to 11 colors in a custom list.By clicking the add button, the selected color from picker or palette will get added in the recent color list. + * @Default {false} + */ + showRecentColors?: boolean; + + /**This property allows to shows tooltip to notify the slider value in color picker control. + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the toolIcon to be displayed in dropdown control color area. + * @Default {null} + */ + toolIcon?: string; + + /**This property allows to define the customized text or content to displayed when mouse over the following elements. This property also allows to use the culture values. + * @Default {tooltipText: { switcher: Switcher, addbutton: Add Color, basic: Basic, monochrome: Mono Chrome, flatcolors: Flat Color, seawolf: Sea Wolf, webcolors: Web Colors, sandy: Sandy, pinkshades: Pink Shades, misty: Misty, citrus: Citrus, vintage: Vintage, moonlight: Moon Light, candycrush: Candy Crush, currentcolor: Current Color, selectedcolor: Selected Color }} + */ + tooltipText?: any; + + /**Specifies the color value for color picker control, the value is in hexadecimal form with prefix of "#". + * @Default {null} + */ + value?: string; + + /**Fires after Color value has been changed successfully.If the user want to perform any operation after the color value changed then the user can make use of this change event.*/ + change? (e: ChangeEventArgs): void; + + /**Fires after closing the color picker popup.*/ + close? (e: CloseEventArgs): void; + + /**Fires after Color picker control is created. If the user want to perform any operation after the color picker control creation then the user can make use of this create event.*/ + create? (e: CreateEventArgs): void; + + /**Fires after Color picker control is destroyed. If the user want to perform any operation after the color picker control destroyed then the user can make use of this destroy event.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires after opening the color picker popup*/ + open? (e: OpenEventArgs): void; + + /**Fires after Color value has been selected successfully. If the user want to perform any operation after the color value selected then the user can make use of this select event.*/ + select? (e: SelectEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**return the changed color value + */ + value?: string; +} + +export interface CloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the color picker model + */ + model?: ej.ColorPicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**return the selected color value + */ + value?: string; +} + +enum ModelType{ + + ///support palette type mode in color picker. + Palette, + + ///support palette type mode in color picker. + Picker +} + + +enum Palette{ + + ///used to show the basic palette + BasicPalette, + + ///used to show the custompalette + CustomPalette +} + + +enum Presets{ + + ///used to show the basic presets + Basic, + + ///used to show the CandyCrush colors presets + CandyCrush, + + ///used to show the Citrus colors presets + Citrus, + + ///used to show the FlatColors presets + FlatColors, + + ///used to show the Misty presets + Misty, + + ///used to show the MoonLight presets + MoonLight, + + ///used to show the PinkShades presets + PinkShades, + + ///used to show the Sandy presets + Sandy, + + ///used to show the Seawolf presets + SeaWolf, + + ///used to show the Vintage presets + Vintage, + + ///used to show the WebColors presets + WebColors +} + +} +enum ButtonMode +{ +//Displays the button in split mode +Split, +//Displays the button in Dropdown mode +Dropdown, +} + +class FileExplorer extends ej.Widget { + static fn: FileExplorer; + constructor(element: JQuery, options?: FileExplorer.Model); + constructor(element: Element, options?: FileExplorer.Model); + model:FileExplorer.Model; + defaults:FileExplorer.Model; + + /** Refresh the size of FileExplorer control. + * @returns {void} + */ + adjustSize(): void; + + /** Disable the particular context menu item. + * @param {string|HTMLElement} Id of the menu item/ Menu element to be disabled + * @returns {void} + */ + disableMenuItem(item: string|HTMLElement): void; + + /** Disable the particular toolbar item. + * @param {string|HTMLElement} Id of the toolbar item/ Tool item element to be disabled + * @returns {void} + */ + disableToolbarItem(item: string|HTMLElement): void; + + /** Enable the particular context menu item. + * @param {string|HTMLElement} Id of the menu item/ Menu element to be Enabled + * @returns {void} + */ + enableMenuItem(item: string|HTMLElement): void; + + /** Enable the particular toolbar item + * @param {string|HTMLElement} Id of the tool item/ Tool item element to be Enabled + * @returns {void} + */ + enableToolbarItem(item: string|HTMLElement): void; + + /** Refresh the content of the selected folder in FileExplorer control. + * @returns {void} + */ + refresh(): void; + + /** Remove the particular toolbar item. + * @param {string|HTMLElement} Id of the tool item/ tool item element to be removed + * @returns {void} + */ + removeToolbarItem(item: string|HTMLElement): void; +} +export module FileExplorer{ + +export interface Model { + + /**Sets the URL of server side ajax handling method that handles file operation like Read, Remove, Rename, Create, Upload, Download, Copy and Move in File Explorer. + */ + ajaxAction?: string; + + /**Specifies the data type of server side ajax handling method. + * @Default {json} + */ + ajaxDataType?: string; + + /**By using ajaxSettings property, you can customize the ajax configurations. Normally you can customize the following option in ajax handling data, url, type, async, contentType, dataType and success. For upload, download and getImage API, you can only customize url. + * @Default {{ read: {}, createFolder: {}, remove: {}, rename: {}, paste: {}, getDetails: {}, download: {}, upload: {}, getImage: {}}} + */ + ajaxSettings?: any; + + /**The FileExplorer allows to select multiple files by enabling the allowMultiSelection property. You can perform multi selection by pressing the Ctrl key or Shift key. + * @Default {true} + */ + allowMultiSelection?: boolean; + + /**Sets the root class for FileExplorer theme. This cssClass API allows to use custom skinning option for File Explorer control. By defining the root class by using this API, you have to include this root class in CSS. + */ + cssClass?: string; + + /**Enables or disables the resize support in FileExplorer control. + * @Default {false} + */ + enableResize?: boolean; + + /**Enables or disables the Right to Left alignment support in FileExplorer control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows specified type of files only to display in FileExplorer control. + * @Default {.} + */ + fileTypes?: string; + + /**By using filterSettings property, you can customize the search functionality of the search bar in FileExplorer control. + */ + filterSettings?: FilterSettings; + + /**By using the gridSettings property, you can customize the grid behavior in the FileExplorer control. + */ + gridSettings?: GridSettings; + + /**Specifies the height of FileExplorer control. + * @Default {400} + */ + height?: string|number; + + /**Enables or disables the responsive support for FileExplorer control during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /**Sets the file view type. There are two view types available, such as grid, tile. See layoutType. + * @Default {ej.FileExplorer.layoutType.Grid} + */ + layout?: ej.FileExplorer.layoutType|string; + + /**Sets the culture in FileExplorer. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum height of FileExplorer control. + * @Default {null} + */ + maxHeight?: string|number; + + /**Sets the maximum width of FileExplorer control. + * @Default {null} + */ + maxWidth?: string|number; + + /**Sets the minimum height of FileExplorer control. + * @Default {250} + */ + minHeight?: string|number; + + /**Sets the minimum width of FileExplorer control. + * @Default {400} + */ + minWidth?: string|number; + + /**The property path denotes the filesystem path that are to be explored. The path for the filesystem can be physical path or relative path, but it has to be relevant to where the Web API is hosted. + */ + path?: string; + + /**The selectedFolder is used to select the specified folder of FileExplorer control. + */ + selectedFolder?: string; + + /**The selectedItems is used to select the specified items (file, folder) of FileExplorer control. + */ + selectedItems?: string|Array; + + /**Enables or disables the context menu option in FileExplorer control. + * @Default {true} + */ + showContextMenu?: boolean; + + /**Enables or disables the footer in FileExplorer control. The footer element displays the details of the current selected files and folders. And also the footer having the switcher to change the layout view. + * @Default {true} + */ + showFooter?: boolean; + + /**Shows or disables the toolbar in FileExplorer control. + * @Default {true} + */ + showToolbar?: boolean; + + /**Enables or disables the navigation pane in FileExplorer control. The navigation pane contains a tree view element that displays all the folders from the filesystem in a hierarchical manner. This is useful to a quick navigation of any folder in the filesystem. + * @Default {true} + */ + showNavigationPane?: boolean; + + /**The tools property is used to configure and group required toolbar items in FileExplorer control. + * @Default {{ creation:[NewFolder, Open], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, Paste], getProperties: [Details], searchBar: [Searchbar] }} + */ + tools?: any; + + /**The toolsList property is used to arrange the toolbar items in the FileExplorer control. + * @Default {[creation, navigation, addressBar, editing, copyPaste, getProperties, searchBar]} + */ + toolsList?: Array; + + /**Gets or sets an object that indicates whether to customize the upload behavior in the FileExplorer. + */ + uploadSettings?: UploadSettings; + + /**Specifies the width of FileExplorer control. + * @Default {850} + */ + width?: string|number; + + /**Fires before the ajax request is performed.*/ + beforeAjaxRequest? (e: BeforeAjaxRequestEventArgs): void; + + /**Fires before downloading the files.*/ + beforeDownload? (e: BeforeDownloadEventArgs): void; + + /**Fires before files or folders open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires before uploading the files.*/ + beforeUpload? (e: BeforeUploadEventArgs): void; + + /**Fires when file or folder is copied successfully.*/ + copy? (e: CopyEventArgs): void; + + /**Fires when new folder is created successfully in file system.*/ + createFolder? (e: CreateFolderEventArgs): void; + + /**Fires when file or folder is cut successfully.*/ + cut? (e: CutEventArgs): void; + + /**Fires when the file view type is changed.*/ + layoutChange? (e: LayoutChangeEventArgs): void; + + /**Fires when files are successfully opened.*/ + open? (e: OpenEventArgs): void; + + /**Fires when a file or folder is pasted successfully.*/ + paste? (e: PasteEventArgs): void; + + /**Fires when file or folder is deleted successfully.*/ + remove? (e: RemoveEventArgs): void; + + /**Fires when resizing is performed for FileExplorer.*/ + resize? (e: ResizeEventArgs): void; + + /**Fires when resizing is started for FileExplorer.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Fires this event when the resizing is stopped for FileExplorer.*/ + resizeStop? (e: ResizeStopEventArgs): void; + + /**Fires when the items from grid view or tile view of FileExplorer control is selected.*/ + select? (e: SelectEventArgs): void; +} + +export interface BeforeAjaxRequestEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ajax response data + */ + data?: any; + + /**returns the FileExplorer model + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface BeforeDownloadEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the downloaded file names. + */ + files?: string[]; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeOpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the opened item type. + */ + itemType?: string; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeUploadEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CopyEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of copied file/folder. + */ + name?: string[]; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the source path. + */ + sourcePath?: string; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CreateFolderEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ajax response data + */ + data?: any; + + /**returns the FileExplorer model + */ + model?: ej.FileExplorer.Model; + + /**returns the selected item details + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CutEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of moved file or folder. + */ + name?: string[]; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the source path. + */ + sourcePath?: string; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LayoutChangeEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the current view type. + */ + layoutType?: string; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface OpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the opened item type. + */ + itemType?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the path of currently opened item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface PasteEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of moved file or folder. + */ + name?: string[]; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the target folder item details. + */ + targetFolder?: any; + + /**returns the target path. + */ + targetPath?: string; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RemoveEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ajax response data. + */ + data?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the names of deleted items. + */ + name?: string; + + /**returns the path of deleted item. + */ + path?: string; + + /**returns the selected item details. + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mouse move event args. + */ + event?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeStartEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the mouse down event args. + */ + event?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeStopEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the mouse leave event args. + */ + event?: any; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface SelectEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /**returns the name of clicked item. + */ + name?: string; + + /**returns the path of clicked item. + */ + path?: string; + + /**returns the selected item details + */ + selectedItems?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface FilterSettings { + + /**Enables or disables to perform the filter operation with case sensitive. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**Sets the search filter type. There are several filter types available, such as "startswith", "contains", "endswith". See filterType + * @Default {ej.FileExplorer.filterType.Contains} + */ + filterType?: ej.FilterType|string; +} + +export interface GridSettings { + + /**Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. + * @Default {true} + */ + allowSorting?: boolean; + + /**Gets or sets an object that indicates to render the grid with specified columns. You can use this property same as the column property in Grid control. + * @Default {[{ field: name, headerText: Name, width: 25% }, { field: type, headerText: Type, width: 20% }, { field: dateModified, headerText: Date Modified, width: 35% }, { field: size, headerText: Size, width: 15%, textAlign: right, headerTextAlign: left }]} + */ + columns?: Array; +} + +export interface UploadSettings { + + /**Specifies the maximum file size allowed to upload. It accepts the value in bytes. + * @Default {31457280} + */ + maxFileSize?: number; + + /**Enables or disables the multiple files upload. When it is enabled, you can upload multiple files at a time and when disabled, you can upload only one file at a time. + * @Default {true} + */ + allowMultipleFile?: boolean; + + /**Enables or disables the auto upload option while uploading files in FileExplorer control. + * @Default {false} + */ + autoUpload?: boolean; +} + +enum layoutType{ + + ///Supports to display files in tile view + Tile, + + ///Supports to display files in grid view + Grid, + + ///Supports to display files as large icons + LargeIcons +} + +} + +class DatePicker extends ej.Widget { + static fn: DatePicker; + constructor(element: JQuery, options?: DatePicker.Model); + constructor(element: Element, options?: DatePicker.Model); + model:DatePicker.Model; + defaults:DatePicker.Model; + + /** Disables the DatePicker control. + * @returns {void} + */ + disable(): void; + + /** Enable the DatePicker control, if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Returns the current date value in the DatePicker control. + * @returns {string} + */ + getValue(): string; + + /** Close the DatePicker popup, if it is in opened state. + * @returns {void} + */ + hide(): void; + + /** Opens the DatePicker popup. + * @returns {void} + */ + show(): void; +} +export module DatePicker{ + +export interface Model { + + /**Used to allow or restrict the editing in DatePicker input field directly. By setting false to this API, You can only pick the date from DatePicker popup. + * @Default {true} + */ + allowEdit?: boolean; + + /**allow or restrict the drill down to multiple levels of view (month/year/decade) in DatePicker calendar + * @Default {true} + */ + allowDrillDown?: boolean; + + /**Sets the specified text value to the today button in the DatePicker calendar. + * @Default {Today} + */ + buttonText?: string; + + /**Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /**Formats the value of the DatePicker in to the specified date format. If this API is not specified, dateFormat will be set based on the current culture of DatePicker. + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /**Specifies the header format of days in DatePicker calendar. See below to get available Headers options + * @Default {ej.DatePicker.Header.Min} + */ + dayHeaderFormat?: string | ej.DatePicker.Header; + + /**Specifies the navigation depth level in DatePicker calendar. This option is not applied when start level view option is lower than depth level view. See below to know available levels in DatePicker Calendar + */ + depthLevel?: string | ej.DatePicker.Level; + + /**Allows to embed the DatePicker calendar in the page. Also associates DatePicker with div element instead of input. + * @Default {false} + */ + displayInline?: boolean; + + /**Enables or disables the animation effect with DatePicker calendar. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Enable or disable the DatePicker control. + * @Default {true} + */ + enabled?: boolean; + + /**Sustain the entire widget model of DatePicker even after form post or browser refresh + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays DatePicker calendar along with DatePicker input field in Right to Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows to enter valid or invalid date in input textbox and indicate as error if it is invalid value, when this API value is set to true. For false value, invalid date is not allowed to input field and corrected to valid date automatically, even if invalid date is given. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**Used the required fields for special Dates in DatePicker in order to customize the special dates in a calendar. + * @Default {null} + */ + fields?: Fields; + + /**Specifies the header format to be displayed in the DatePicker calendar. + * @Default {MMMM yyyy} + */ + headerFormat?: string; + + /**Specifies the height of the DatePicker input text. + * @Default {28px} + */ + height?: string; + + /**HighlightSection is used to highlight currently selected date's month/week/workdays. See below to get available HighlightSection options + * @Default {none} + */ + highlightSection?: string | ej.DatePicker.HighlightSection; + + /**Weekend dates will be highlighted when this property is set to true. + * @Default {false} + */ + highlightWeekend?: boolean; + + /**Specifies the HTML Attributes of the DatePicker. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Change the DatePicker calendar and date format based on given culture. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the maximum date in the calendar that the user can select. + * @Default {new Date(2099, 11, 31)} + */ + maxDate?: string|Date; + + /**Specifies the minimum date in the calendar that the user can select. + * @Default {new Date(1900, 00, 01)} + */ + minDate?: string|Date; + + /**Allows to toggles the read only state of the DatePicker. When the widget is readOnly, it doesn't allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /**It allows to display footer in DatePicker calendar. + * @Default {true} + */ + showFooter?: boolean; + + /**It allows to display/hides the other months days from the current month calendar in a DatePicker. + * @Default {true} + */ + showOtherMonths?: boolean; + + /**Shows/hides the date icon button at right side of textbox, which is used to open or close the DatePicker calendar popup. + * @Default {true} + */ + showPopupButton?: boolean; + + /**DatePicker input is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Used to show the tooltip when hovering on the days in the DatePicker calendar. + * @Default {true} + */ + showTooltip?: boolean; + + /**Specifies the special dates in DatePicker. + * @Default {null} + */ + specialDates?: any; + + /**Specifies the start day of the week in DatePicker calendar. + * @Default {0} + */ + startDay?: number; + + /**Specifies the start level view in DatePicker calendar. See below available Levels + * @Default {ej.DatePicker.Level.Month} + */ + startLevel?: string | ej.DatePicker.Level; + + /**Specifies the number of months to be navigate for one click of next and previous button in a DatePicker Calendar. + * @Default {1} + */ + stepMonths?: number; + + /**Provides option to customize the tooltip format. + * @Default {ddd MMM dd yyyy} + */ + tooltipFormat?: string; + + /**Sets the jQuery validation support to DatePicker Date value. See validation + * @Default {null} + */ + validationMessage?: any; + + /**Sets the jQuery validation custom rules to the DatePicker. see validation + * @Default {null} + */ + validationRules?: any; + + /**sets or returns the current value of DatePicker + * @Default {null} + */ + value?: string|Date; + + /**Specifies the water mark text to be displayed in input text. + * @Default {Select date} + */ + watermarkText?: string; + + /**Specifies the width of the DatePicker input text. + * @Default {160px} + */ + width?: string; + + /**Fires before closing the DatePicker popup.*/ + beforeClose? (e: BeforeCloseEventArgs): void; + + /**Fires when each date is created in the DatePicker popup calendar.*/ + beforeDateCreate? (e: BeforeDateCreateEventArgs): void; + + /**Fires before opening the DatePicker popup.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when the DatePicker input value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when DatePicker popup is closed.*/ + close? (e: CloseEventArgs): void; + + /**Fires when the DatePicker is created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the DatePicker is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**NameTypeDescriptioncancelbooleanSet to true when the event has to be canceled, else false.modelobjectreturns the DatePicker model.typestringreturns the name of the event.valuestringreturns the currently selected date value.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when DatePicker input loses the focus.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when DatePicker popup is opened.*/ + open? (e: OpenEventArgs): void; + + /**Fires when a date is selected from the DatePicker popup.*/ + select? (e: SelectEventArgs): void; +} + +export interface BeforeCloseEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the event parameters from DatePicker. + */ + events?: any; + + /**returns the DatePicker popup. + */ + element?: HTMLElement; +} + +export interface BeforeDateCreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the currently created date object. + */ + date?: any; + + /**returns the current DOM object of the date from the Calendar. + */ + element?: HTMLElement; +} + +export interface BeforeOpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the event parameters from DatePicker. + */ + events?: any; + + /**returns the DatePicker popup. + */ + element?: HTMLElement; +} + +export interface ChangeEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the DatePicker input value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; +} + +export interface CloseEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the current date value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; +} + +export interface CreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the currently selected date value. + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the currently selected date value. + */ + value?: string; + + /**returns the previously selected date value. + */ + prevDate?: string; +} + +export interface OpenEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the current date value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; +} + +export interface SelectEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the current date value. + */ + value?: string; + + /**returns the previously selected value. + */ + prevDate?: string; + + /**returns whether the currently selected date is special date or not. + */ + isSpecialDay?: string; +} + +export interface Fields { + + /**Specifies the specials dates + */ + date?: string; + + /**Specifies the icon class to special dates. + */ + iconClass?: string; + + /**Specifies the tooltip to special dates. + */ + tooltip?: string; +} + +enum Header{ + + ///Removes day header in DatePicker + None, + + ///sets the short format of day name (like Sun) in header in DatePicker + Short, + + ///sets the Min format of day name (like su) in header format DatePicker + Min +} + + +enum Level{ + + ///allow navigation upto year level in DatePicker + Year, + + ///allow navigation upto decade level in DatePicker + Decade, + + ///allow navigation upto Century level in DatePicker + Century +} + + +enum HighlightSection{ + + ///Highlight the week of the currently selected date in DatePicker popup calendar + Week, + + ///Highlight the workdays in a currently selected date's week in DatePicker popup calendar + WorkDays, + + ///Nothing will be highlighted, remove highlights from DatePicker popup calendar if already exists + None +} + +} + +class DateTimePicker extends ej.Widget { + static fn: DateTimePicker; + constructor(element: JQuery, options?: DateTimePicker.Model); + constructor(element: Element, options?: DateTimePicker.Model); + model:DateTimePicker.Model; + defaults:DateTimePicker.Model; + + /** Disables the DateTimePicker control. + * @returns {void} + */ + disable(): void; + + /** Enables the DateTimePicker control. + * @returns {void} + */ + enable(): void; + + /** Returns the current datetime value in the DateTimePicker. + * @returns {string} + */ + getValue(): string; + + /** Hides or closes the DateTimePicker popup. + * @returns {void} + */ + hide(): void; + + /** Updates the current system date value and time value to the DateTimePicker. + * @returns {void} + */ + setCurrentDateTime(): void; + + /** Shows or opens the DateTimePicker popup. + * @returns {void} + */ + show(): void; +} +export module DateTimePicker{ + +export interface Model { + + /**Displays the custom text for the buttons inside the DateTimePicker popup. when the culture value changed, we can change the buttons text based on the culture. + * @Default {{ today: Today, timeNow: Time Now, done: Done, timeTitle: Time }} + */ + buttonText?: ButtonText; + + /**Set the root class for DateTimePicker theme. This cssClass API helps to use custom skinning option for DateTimePicker control. + */ + cssClass?: string; + + /**Defines the datetime format displayed in the DateTimePicker. The value should be a combination of date format and time format. + * @Default {M/d/yyyy h:mm tt} + */ + dateTimeFormat?: string; + + /**Specifies the header format of the datepicker inside the DateTimePicker popup. See DatePicker.Header + * @Default {ej.DatePicker.Header.Min} + */ + dayHeaderFormat?: ej.DatePicker.Header|string; + + /**Specifies the drill down level in datepicker inside the DateTimePicker popup. See ej.DatePicker.Level + */ + depthLevel?: ej.DatePicker.Level|string; + + /**Enable or disable the animation effect in DateTimePicker. + * @Default {true} + */ + enableAnimation?: boolean; + + /**When this property is set to false, it disables the DateTimePicker control. + * @Default {false} + */ + enabled?: boolean; + + /**Enables or disables the state maintenance of DateTimePicker. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Sets the DateTimePicker direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**When enableStrictMode true it allows the value outside of the range also but it highlights the textbox with error class, otherwise it internally changed to the correct value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**Specifies the header format to be displayed in the DatePicker calendar inside the DateTimePicker popup. + * @Default {MMMM yyyy} + */ + headerFormat?: string; + + /**Defines the height of the DateTimePicker textbox. + * @Default {30} + */ + height?: string|number; + + /**Specifies the HTML Attributes of the ejDateTimePicker + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the time interval between the two adjacent time values in the time popup. + * @Default {30} + */ + interval?: number; + + /**Defines the localization culture for DateTimePicker. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum value to the DateTimePicker. Beyond the maximum value an error class is added to the wrapper element when we set true to enableStrictMode. + * @Default {new Date(12/31/2099 11:59:59 PM)} + */ + maxDateTime?: string|Date; + + /**Sets the minimum value to the DateTimePicker. Behind the minimum value an error class is added to the wrapper element. + * @Default {new Date(1/1/1900 12:00:00 AM)} + */ + minDateTime?: string|Date; + + /**Specifies the popup position of DateTimePicker.See below to know available popup positions + * @Default {ej.DateTimePicker.Bottom} + */ + popupPosition?: string | ej.popupPosition; + + /**Indicates that the DateTimePicker value can only be read and can’t change. + * @Default {false} + */ + readOnly?: boolean; + + /**It allows showing days in other months of DatePicker calendar inside the DateTimePicker popup. + * @Default {true} + */ + showOtherMonths?: boolean; + + /**Shows or hides the arrow button from the DateTimePicker textbox. When the button disabled, the DateTimePicker popup opens while focus in the textbox and hides while focus out from the textbox. + * @Default {true} + */ + showPopupButton?: boolean; + + /**Changes the sharped edges into rounded corner for the DateTimePicker textbox and popup. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the start day of the week in datepicker inside the DateTimePicker popup. + * @Default {1} + */ + startDay?: number; + + /**Specifies the start level view in datepicker inside the DateTimePicker popup. See DatePicker.Level + * @Default {ej.DatePicker.Level.Month or month} + */ + startLevel?: ej.DatePicker.Level|string; + + /**Specifies the number of months to navigate at one click of next and previous button in datepicker inside the DateTimePicker popup. + * @Default {1} + */ + stepMonths?: number; + + /**Defines the time format displayed in the time dropdown inside the DateTimePicker popup. + * @Default {h:mm tt} + */ + timeDisplayFormat?: string; + + /**We can drill down up to time interval on selected date with meridian details. + * @Default {{ enabled: false, interval: 5, showMeridian: false, autoClose: true }} + */ + timeDrillDown?: TimeDrillDown; + + /**Defines the width of the time dropdown inside the DateTimePicker popup. + * @Default {100} + */ + timePopupWidth?: string|number; + + /**Set the jquery validation error message in DateTimePicker. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jquery validation rules in DateTimePicker. + * @Default {null} + */ + validationRules?: any; + + /**Sets the DateTime value to the control. + */ + value?: string|Date; + + /**Defines the width of the DateTimePicker textbox. + * @Default {143} + */ + width?: string|number; + + /**Fires when the datetime value changed in the DateTimePicker textbox.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when DateTimePicker popup closes.*/ + close? (e: CloseEventArgs): void; + + /**Fires after DateTimePicker control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the DateTimePicker is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the focus-in happens in the DateTimePicker textbox.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when the focus-out happens in the DateTimePicker textbox.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when DateTimePicker popup opens.*/ + open? (e: OpenEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the current value is valid or not + */ + isValidState?: boolean; + + /**returns the modified datetime value + */ + value?: string; + + /**returns the previously selected date time value + */ + prevDateTime?: string; + + /**returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; +} + +export interface CloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the modified datetime value + */ + value?: string; + + /**returns the previously selected date time value + */ + prevDateTime?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DateTimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DateTimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the datetime value, which is in text box + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the datetime value, which is in text box + */ + value?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.DateTimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the modified datetime value + */ + value?: string; + + /**returns the previously selected date time value + */ + prevDateTime?: string; +} + +export interface ButtonText { + + /**Sets the text for the Done button inside the datetime popup. + */ + done?: string; + + /**Sets the text for the Now button inside the datetime popup. + */ + timeNow?: string; + + /**Sets the header text for the Time dropdown. + */ + timeTitle?: string; + + /**Sets the text for the Today button inside the datetime popup. + */ + today?: string; +} + +export interface TimeDrillDown { + + /**This is the field to show/hide the timeDrillDown in DateTimePicker. + */ + enabled?: boolean; + + /**Sets the interval time of minutes on selected date. + */ + interval?: number; + + /**Allows the user to show or hide the meridian with time in DateTimePicker. + */ + showMeridian?: boolean; + + /**After choosing the time, the popup will close automatically if we set it as true, otherwise we focus out the DateTimePicker or choose timeNow button for closing the popup. + */ + autoClose?: boolean; +} +} +enum popupPosition +{ +//Opens the DateTimePicker popup below to the DateTimePicker input box +Bottom, +//Opens the DateTimePicker popup above to the DateTimePicker input box +Top, +} + +class Dialog extends ej.Widget { + static fn: Dialog; + constructor(element: JQuery, options?: Dialog.Model); + constructor(element: Element, options?: Dialog.Model); + model:Dialog.Model; + defaults:Dialog.Model; + + /** Closes the dialog widget dynamically. + * @returns {void} + */ + close(): void; + + /** Collapses the content area when it is expanded. + * @returns {void} + */ + collapse(): void; + + /** Destroys the Dialog widget. + * @returns {void} + */ + destroy(): void; + + /** Expands the content area when it is collapsed. + * @returns {void} + */ + expand(): void; + + /** Checks whether the Dialog widget is opened or not. This methods returns Boolean value. + * @returns {void} + */ + isOpen(): void; + + /** Maximizes the Dialog widget. + * @returns {void} + */ + maximize(): void; + + /** Minimizes the Dialog widget. + * @returns {void} + */ + minimize(): void; + + /** Opens the Dialog widget. + * @returns {void} + */ + open(): void; + + /** Pins the dialog in its current position. + * @returns {void} + */ + pin(): void; + + /** Restores the dialog. + * @returns {void} + */ + restore(): void; + + /** Unpins the Dialog widget. + * @returns {void} + */ + unpin(): void; + + /** Sets the title for the Dialog widget. + * @param {string} The title for the dialog widget. + * @returns {void} + */ + setTitle(Title: string): void; + + /** Sets the content for the Dialog widget dynamically. + * @param {string} The content for the dialog widget. It accepts both string and html string. + * @returns {void} + */ + setContent(content: string): void; + + /** Sets the focus on the Dialog widget. + * @returns {void} + */ + focus(): void; +} +export module Dialog{ + +export interface Model { + + /**Adds action buttons like close, minimize, pin, maximize in the dialog header. + */ + actionButtons?: string[]; + + /**Enables or disables draggable. + */ + allowDraggable?: boolean; + + /**Enables or disables keyboard interaction. + */ + allowKeyboardNavigation?: boolean; + + /**Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. In order to customize animation effects, you need to set “enableAnimation” as true. It contains the following sub properties. + */ + animation?: any; + + /**The tooltip text for the dialog close button. + */ + closeIconTooltip?: string; + + /**Closes the dialog widget on pressing the ESC key when it is set to true. + */ + closeOnEscape?: boolean; + + /**The selector for the container element. If the property is set, then dialog will append to the selected element and it is restricted to move only within the specified container element. + */ + containment?: string; + + /**The content type to load the dialog content at run time. The possible values are null, ajax, iframe and image. When it is null (default value), the content inside dialog element will be displayed as content and when it is not null, the content will be loaded from the URL specified in the contentUrl property. + */ + contentType?: string; + + /**The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’. + */ + contentUrl?: string; + + /**The root class for the Dialog widget to customize the existing theme. + */ + cssClass?: string; + + /**Enable or disables animation when the dialog is opened or closed. + */ + enableAnimation?: boolean; + + /**Enables or disables the Dialog widget. + */ + enabled?: boolean; + + /**Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is closed. + */ + enableModal?: boolean; + + /**Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. + */ + enablePersistence?: boolean; + + /**Allows the dialog to be resized. The dialog cannot be resized less than the minimum height, width values and greater than the maximum height and width. + */ + enableResize?: boolean; + + /**Displays dialog content from right to left when set to true. + */ + enableRTL?: boolean; + + /**The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true since the favicon will be displayed in the dialog header. + */ + faviconCSS?: string; + + /**Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”. + */ + height?: string|number; + + /**Enable or disables responsive behavior. + */ + isResponsive?: boolean; + + /**Default Value:{:.param}“en-US” + */ + locale?: number; + + /**Sets the maximum height for the dialog widget. + */ + maxHeight?: number; + + /**Sets the maximum width for the dialog widget. + */ + maxWidth?: number; + + /**Sets the minimum height for the dialog widget. + */ + minHeight?: number; + + /**Sets the minimum width for the dialog widget. + */ + minWidth?: number; + + /**Displays the Dialog widget at the given X and Y position. + */ + position?: any; + + /**Shows or hides the dialog header. + */ + showHeader?: boolean; + + /**The Dialog widget can be opened by default i.e. on initialization, when it is set to true. + */ + showOnInit?: boolean; + + /**Enables or disables the rounder corner. + */ + showRoundedCorner?: boolean; + + /**The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container. + */ + target?: string; + + /**The title text to be displayed in the dialog header. In order to set title, you need to set showHeader as true since the title will be displayed in the dialog header. + */ + title?: string; + + /**Add or configure the tooltip text for actionButtons in the dialog header. + */ + tooltip?: any; + + /**Sets the height for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”. + */ + width?: string|number; + + /**Sets the z-index value for the Dialog widget. + */ + zIndex?: number; + + /**This event is triggered before the dialog widgets gets open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**This event is triggered whenever the Ajax request fails to retrieve the dialog content.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**This event is triggered whenever the Ajax request to retrieve the dialog content, gets succeed.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**This event is triggered before the dialog widgets get closed.*/ + beforeClose? (e: BeforeCloseEventArgs): void; + + /**This event is triggered after the dialog widget is closed.*/ + close? (e: CloseEventArgs): void; + + /**Triggered after the dialog content is loaded in DOM.*/ + contentLoad? (e: ContentLoadEventArgs): void; + + /**Triggered after the dialog is created successfully*/ + create? (e: CreateEventArgs): void; + + /**Triggered after the dialog widget is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered while the dialog is dragged.*/ + drag? (e: DragEventArgs): void; + + /**Triggered when the user starts dragging the dialog.*/ + dragStart? (e: DragStartEventArgs): void; + + /**Triggered when the user stops dragging the dialog.*/ + dragStop? (e: DragStopEventArgs): void; + + /**Triggered after the dialog is opened.*/ + open? (e: OpenEventArgs): void; + + /**Triggered while the dialog is resized.*/ + resize? (e: ResizeEventArgs): void; + + /**Triggered when the user starts resizing the dialog.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Triggered when the user stops resizing the dialog.*/ + resizeStop? (e: ResizeStopEventArgs): void; + + /**Triggered when the dialog content is expanded.*/ + expand? (e: ExpandEventArgs): void; + + /**Triggered when the dialog content is collapsed.*/ + collapse? (e: CollapseEventArgs): void; +} + +export interface BeforeOpenEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; +} + +export interface AjaxErrorEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**URL of the content. + */ + url?: string; + + /**Error page content. + */ + responseText?: string; + + /**Error code. + */ + status?: number; + + /**The corresponding error description. + */ + statusText?: string; +} + +export interface AjaxSuccessEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**URL of the content. + */ + url?: string; + + /**Response content. + */ + data?: string; +} + +export interface BeforeCloseEventArgs { + + /**Current event object. + */ + event?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface CloseEventArgs { + + /**Current event object. + */ + event?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; +} + +export interface ContentLoadEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**URL of the content. + */ + url?: string; + + /**Content type + */ + contentType?: any; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface DragEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface DragStartEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface DragStopEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface OpenEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface ResizeStartEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface ResizeStopEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event + */ + type?: string; + + /**Current event object. + */ + event?: any; +} + +export interface ExpandEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} + +export interface CollapseEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /**Name of the event. + */ + type?: string; +} +} + +class DropDownList extends ej.Widget { + static fn: DropDownList; + constructor(element: JQuery, options?: DropDownList.Model); + constructor(element: Element, options?: DropDownList.Model); + model:DropDownList.Model; + defaults:DropDownList.Model; + + /** Adding a single item or an array of items into the DropDownList allows you to specify all the field attributes such as value, template, image URL, and html attributes for those items. + * @param {any|Array} this parameter should have field attributes with respect to mapped field attributes and it's corresponding values to fields + * @returns {void} + */ + addItem(data: any|Array): void; + + /** This method is used to select all the items in the DropDownList. + * @returns {void} + */ + checkAll(): void; + + /** Clears the text in the DropDownList textbox. + * @returns {void} + */ + clearText(): void; + + /** Destroys the DropDownList widget. + * @returns {void} + */ + destroy(): void; + + /** This property is used to disable the DropDownList widget. + * @returns {void} + */ + disable(): void; + + /** This property disables the set of items in the DropDownList. + * @param {string|number|Array} disable the given index list items + * @returns {void} + */ + disableItemsByIndices(index: string|number|Array): void; + + /** This property enables the DropDownList control. + * @returns {void} + */ + enable(): void; + + /** Enables an Item or set of Items that are disabled in the DropDownList + * @param {string|number|Array} enable the given index list items if it's disabled + * @returns {void} + */ + enableItemsByIndices(index: string|number|Array): void; + + /** This method retrieves the items using given value. + * @param {string|number|any} Return the whole object of data based on given value + * @returns {any} + */ + getItemDataByValue(value: string|number|any): any; + + /** This method is used to retrieve the items that are bound with the DropDownList. + * @returns {any} + */ + getListData(): any; + + /** This method is used to get the selected items in the DropDownList. + * @returns {HTMLElement} + */ + getSelectedItem(): HTMLElement; + + /** This method is used to retrieve the items value that are selected in the DropDownList. + * @returns {string} + */ + getSelectedValue(): string; + + /** This method hides the suggestion popup in the DropDownList. + * @returns {void} + */ + hidePopup(): void; + + /** This method is used to select the list of items in the DropDownList through the Index of the items. + * @param {string|number|Array} select the given index list items + * @returns {void} + */ + selectItemsByIndices(index: string|number|Array): void; + + /** This method is used to select an item in the DropDownList by using the given text value. + * @param {string|number|Array} select the list items relates to given text + * @returns {void} + */ + selectItemByText(index: string|number|Array): void; + + /** This method is used to select an item in the DropDownList by using the given value. + * @param {string|number|Array} select the list items relates to given values + * @returns {void} + */ + selectItemByValue(index: string|number|Array): void; + + /** This method shows the DropDownList control with the suggestion popup. + * @returns {void} + */ + showPopup(): void; + + /** This method is used to unselect all the items in the DropDownList. + * @returns {void} + */ + unCheckAll(): void; + + /** This method is used to unselect the list of items in the DropDownList through Index of the items. + * @param {string|number|Array} unselect the given index list items + * @returns {void} + */ + unselectItemsByIndices(index: string|number|Array): void; + + /** This method is used to unselect an item in the DropDownList by using the given text value. + * @param {string|number|Array} unselect the list items realtes to given text + * @returns {void} + */ + unselectItemByText(index: string|number|Array): void; + + /** This method is used to unselect an item in the DropDownList by using the given value. + * @param {string|number|Array} unselect the list items realtes to given values + * @returns {void} + */ + unselectItemByValue(index: string|number|Array): void; +} +export module DropDownList{ + +export interface Model { + + /**The cascading DropDownLists is a series of two or more DropDownLists in which each DropDownList is filtered according to the previous DropDownList’s value. + * @Default {null} + */ + cascadeTo?: string; + + /**Sets the case sensitivity of the search operation. It supports both enableFilterSearch and enableIncrementalSearch property. + * @Default {false} + */ + caseSensitiveSearch?: boolean; + + /**Dropdown widget's style and appearance can be controlled based on 13 different default built-in themes.You can customize the appearance of the dropdown by using the cssClass property. You need to specify a class name in the cssClass property and the same class name is used before the class definitions wherever the custom styles are applied. + */ + cssClass?: string; + + /**This property is used to serve data from the data services based on the query provided. To bind the data to the dropdown widget, the dataSource property is assigned with the instance of the ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled with the dropdown. When you enter the delimiter value, the texts after the delimiter are considered as a separate word or query. The delimiter string is a single character and must be a symbol. Mostly, the delimiter symbol is used as comma (,) or semi-colon (;) or any other special character. + * @Default {','} + */ + delimiterChar?: string; + + /**The enabled Animation property uses the easeOutQuad animation to SlideDown and SlideUp the Popup list in 200 and 100 milliseconds, respectively. + * @Default {false} + */ + enableAnimation?: boolean; + + /**This property is used to indicate whether the DropDownList control responds to the user interaction or not. By default, the control is in the enabled mode and you can disable it by setting it to false. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies to perform incremental search for the selection of items from the DropDownList with the help of this property. This helps in selecting the item by using the typed character. + * @Default {true} + */ + enableIncrementalSearch?: boolean; + + /**This property selects the item in the DropDownList when the item is entered in the Search textbox. + * @Default {false} + */ + enableFilterSearch?: boolean; + + /**Saves the current model value to the browser cookies for state maintenance. While refreshing the DropDownList control page, it retains the model value and it is applied from the browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**This enables the resize handler to resize the popup to any size. + * @Default {false} + */ + enablePopupResize?: boolean; + + /**Sets the DropDownList textbox direction from right to left align. + * @Default {false} + */ + enableRTL?: boolean; + + /**This property is used to sort the Items in the DropDownList. By default, it sorts the items in an ascending order. + * @Default {false} + */ + enableSorting?: boolean; + + /**Specifies the mapping fields for the data items of the DropDownList. + * @Default {null} + */ + fields?: Fields; + + /**When the enableFilterSearch property value is set to true, the values in the DropDownList shows the items starting with or containing the key word/letter typed in the Search textbox. + * @Default {ej.FilterType.Contains} + */ + filterType?: ej.FilterType|string; + + /**Used to create visualized header for dropdown items + * @Default {null} + */ + headerTemplate?: string; + + /**Defines the height of the DropDownList textbox. + * @Default {null} + */ + height?: string|number; + + /**It sets the given HTML attributes for the DropDownList control such as ID, name, disabled, etc. + * @Default {null} + */ + htmlAttributes?: any; + + /**Data can be fetched in the DropDownList control by using the DataSource, specifying the number of items. + * @Default {5} + */ + itemsCount?: number; + + /**Defines the maximum height of the suggestion box. This property restricts the maximum height of the popup when resize is enabled. + * @Default {null} + */ + maxPopupHeight?: string|number; + + /**Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. + * @Default {null} + */ + minPopupHeight?: string|number; + + /**Defines the maximum width of the suggestion box. This property restricts the maximum width of the popup when resize is enabled. + * @Default {null} + */ + maxPopupWidth?: string|number; + + /**Defines the minimum height of the suggestion box. This property restricts the minimum height of the popup when resize is enabled. + * @Default {0} + */ + minPopupWidth?: string|number; + + /**With the help of this property, you can make a single or multi selection with the DropDownList and display the text in two modes, delimiter and visual mode. In delimiter mode, you can separate the items by using the delimiter character such as comma (,) or semi-colon (;) or any other special character. In the visual mode, the items are showcased like boxes with close icon in the textbox. + * @Default {ej.MultiSelectMode.None} + */ + multiSelectMode?: ej.MultiSelectMode|string; + + /**Defines the height of the suggestion popup box in the DropDownList control. + * @Default {152px} + */ + popupHeight?: string|number; + + /**Defines the width of the suggestion popup box in the DropDownList control. + * @Default {auto} + */ + popupWidth?: string|number; + + /**Specifies the query to retrieve the data from the DataSource. + * @Default {null} + */ + query?: any; + + /**Specifies that the DropDownList textbox values should be read-only. + * @Default {false} + */ + readOnly?: boolean; + + /**Specifies an item to be selected in the DropDownList. + * @Default {null} + */ + selectedIndex?: number; + + /**Specifies the selectedItems for the DropDownList. + * @Default {[]} + */ + selectedIndices?: Array; + + /**Selects multiple items in the DropDownList with the help of the checkbox control. To achieve this, enable the showCheckbox option to true. + * @Default {false} + */ + showCheckbox?: boolean; + + /**DropDownList control is displayed with the popup seen. + * @Default {false} + */ + showPopupOnLoad?: boolean; + + /**DropDownList textbox displayed with the rounded corner style. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**When the enableSorting property value is set to true, this property helps to sort the items either in ascending or descending order + * @Default {ej.sortOrder.Ascending} + */ + sortOrder?: ej.SortOrder|string; + + /**Specifies the targetID for the DropDownList’s items. + * @Default {null} + */ + targetID?: string; + + /**By default, you can add any text or image to the DropDownList item. To customize the item layout or to create your own visualized elements, you can use this template support. + * @Default {null} + */ + template?: string; + + /**Defines the text value that is displayed in the DropDownList textbox. + * @Default {null} + */ + text?: string; + + /**Sets the jQuery validation error message in the DropDownList + * @Default {null} + */ + validationMessage?: any; + + /**Sets the jquery validation rules in the Dropdownlist. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value (text content) for the DropDownList control. + * @Default {null} + */ + value?: string; + + /**Specifies a short hint that describes the expected value of the DropDownList control. + * @Default {null} + */ + watermarkText?: string; + + /**Defines the width of the DropDownList textbox. + * @Default {null} + */ + width?: string|number; + + /**The Virtual Scrolling feature is used to display a large amount of records in the DropDownList, that is, when scrolling, an Ajax request is sent to fetch some amount of data from the server dynamically. To achieve this scenario with DropDownList, set the allowVirtualScrolling to true. You can set the itemsCount property that represents the number of items to be fetched from the server on every Ajax request. + * @Default {normal} + */ + virtualScrollMode?: ej.VirtualScrollMode|string; + + /**Fires the action before the XHR request.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Fires the action when the list of items is bound to the DropDownList by xhr post calling*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Fires the action when the xhr post calling failed on remote data binding with the DropDownList control.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Fires the action when the xhr post calling succeed on remote data binding with the DropDownList control*/ + actionSuccess? (e: ActionSuccessEventArgs): void; + + /**Fires the action before the popup is ready to hide.*/ + beforePopupHide? (e: BeforePopupHideEventArgs): void; + + /**Fires the action before the popup is ready to be displayed.*/ + beforePopupShown? (e: BeforePopupShownEventArgs): void; + + /**Fires when the cascading happens between two DropDownList exactly after the value changes in the first dropdown and before filtering in the second Dropdown.*/ + cascade? (e: CascadeEventArgs): void; + + /**Fires the action when the DropDownList control’s value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Fires the action when the list item checkbox value is changed.*/ + checkChange? (e: CheckChangeEventArgs): void; + + /**Fires the action once the DropDownList is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires the action when the list items is bound to the DropDownList.*/ + dataBound? (e: DataBoundEventArgs): void; + + /**Fires the action when the DropDownList is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires the action, once the popup is closed*/ + popupHide? (e: PopupHideEventArgs): void; + + /**Fires the action, when the popup is resized.*/ + popupResize? (e: PopupResizeEventArgs): void; + + /**Fires the action, once the popup is opened.*/ + popupShown? (e: PopupShownEventArgs): void; + + /**Fires the action, when resizing a popup starts.*/ + popupResizeStart? (e: PopupResizeStartEventArgs): void; + + /**Fires the action, when the popup resizing is stopped.*/ + popupResizeStop? (e: PopupResizeStopEventArgs): void; + + /**Fires the action before filtering the list items that starts in the DropDownList when the enableFilterSearch is enabled.*/ + search? (e: SearchEventArgs): void; + + /**Fires the action, when the list of item is selected.*/ + select? (e: SelectEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ActionCompleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns number of times trying to fetch the data + */ + count?: number; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the query for data retrieval + */ + query?: any; + + /**Returns the query for data retrieval from the Database + */ + request?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the number of items fetched from remote data + */ + result?: Array; + + /**Returns the requested data + */ + xhr?: any; +} + +export interface ActionFailureEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the error message + */ + error?: any; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the query for data retrieval + */ + query?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ActionSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns number of times trying to fetch the data + */ + count?: number; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the query for data retrieval + */ + query?: any; + + /**Returns the query for data retrieval from the Database + */ + request?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the number of items fetched from remote data + */ + result?: Array; + + /**Returns the requested data + */ + xhr?: any; +} + +export interface BeforePopupHideEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface BeforePopupShownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface CascadeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the cascading dropdown model. + */ + cascadeModel?: any; + + /**returns the current selected value in first dropdown. + */ + cascadeValue?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the default filter action for second dropdown data should happen or not. + */ + requiresDefaultFilter?: boolean; + + /**returns the name of the event + */ + type?: string; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /**Returns the selected item ID. + */ + itemId?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the selected text. + */ + text?: string; + + /**Returns the selected value. + */ + value?: string; +} + +export interface CheckChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /**Returns the selected item ID. + */ + itemId?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the selected text. + */ + text?: string; + + /**Returns the selected value. + */ + value?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface DataBoundEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the data that is bound to DropDownList + */ + data?: any; +} + +export interface DestroyEventArgs { + + /**its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface PopupHideEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface PopupResizeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the data from the resizable plugin. + */ + event?: any; +} + +export interface PopupShownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the selected text + */ + text?: string; + + /**returns the selected value + */ + value?: string; +} + +export interface PopupResizeStartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the data from the resizable plugin. + */ + event?: any; +} + +export interface PopupResizeStopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the DropDownList model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**Returns the data from the resizable plugin. + */ + event?: any; +} + +export interface SearchEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the data bound to the DropDownList. + */ + items?: any; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the search string typed in search box. + */ + searchString?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the selected item with checkbox checked or not. + */ + isChecked?: boolean; + + /**Returns the selected item ID. + */ + itemId?: string; + + /**returns the DropDownList model + */ + model?: any; + + /**Returns the selected item text. + */ + selectedText?: string; + + /**returns the name of the event + */ + type?: string; + + /**Returns the selected text. + */ + text?: string; + + /**Returns the selected value. + */ + value?: string; +} + +export interface Fields { + + /**Used to group the items. + */ + groupBy?: string; + + /**Defines the HTML attributes such as ID, class, and styles for the item. + */ + htmlAttributes?: any; + + /**Defines the ID for the tag. + */ + id?: string; + + /**Defines the image attributes such as height, width, styles, and so on. + */ + imageAttributes?: string; + + /**Defines the imageURL for the image location. + */ + imageUrl?: string; + + /**Defines the tag value to be selected initially. + */ + selected?: boolean; + + /**Defines the sprite css for the image tag. + */ + spriteCssClass?: string; + + /**Defines the table name for tag value or display text while rendering remote data. + */ + tableName?: string; + + /**Defines the text content for the tag. + */ + text?: string; + + /**Defines the tag value. + */ + value?: string; +} +} +enum FilterType +{ +//filter the data wherever contains search key +Contains, +//filter the data based on search key present at start position +StartsWith, +} +enum MultiSelectMode +{ +// can select only single item in DropDownList +None, +//can select multiple items and it's seperated by delimiterChar +Delimiter, +// can select multiple items and it's show's like visual box in textbox +VisualMode, +} +enum SortOrder +{ +// Sort the data in ascending order +Ascending, +//Sort the data in descending order +Descending, +} +enum VirtualScrollMode +{ +// The data is loaded only to the corresponding page (display items). When scrolling some other position, it enables the load on demand with the DropDownList. +Normal, +//The data items are loaded from the remote when scroll handle reaches the end of the scrollbar like infinity scrolling. +Continuous, +} + +class Editor extends ej.Widget { + static fn: Editor; + constructor(element: JQuery, options?: Editor.Model); + constructor(element: Element, options?: Editor.Model); + model:Editor.Model; + defaults:Editor.Model; + + /** destroy the editor widgets all events are unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the corresponding Editors + * @returns {void} + */ + disable(): void; + + /** To enable the corresponding Editors + * @returns {void} + */ + enable(): void; + + /** To get value from corresponding Editors + * @returns {number} + */ + getValue(): number; +} + + class NumericTextbox extends Editor{ +} + + class CurrencyTextbox extends Editor{ +} + + class PercentageTextbox extends Editor{ +} +export module Editor{ + +export interface Model { + + /**Sets the root CSS class for Accordion theme, which is used customize. + */ + cssClass?: string; + + /**DecimalPlaces declares the number of digits to be displayed right side of the value. + * @Default {0} + */ + decimalPlaces?: number; + + /**Specify the editor control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the enablePersistence to editor to save current model value to browser cookies for state maintains + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left Direction to editor. + * @Default {false} + */ + enableRTL?: boolean; + + /**Strict mode option to restrict entering values defined outside the range in the editor. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**It provides the options to get the customized character to separate the digits. If not set, the separator defined by the current culture. + * @Default {null} + */ + groupSeparator?: string; + + /**Specifies the height of the editor. + * @Default {30} + */ + height?: number|string; + + /**It allows to define the characteristics of the Editors control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**The Editor value increment or decrement based an increment step value. + * @Default {1} + */ + incrementStep?: number; + + /**Specifies the Localization info used by the editor. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the maximum value of the editor. + * @Default {Number.MAX_VALUE} + */ + maxValue?: number; + + /**Specifies the minimum value of the editor. + * @Default {-(Number.MAX_VALUE) and 0 for Currency Textbox.} + */ + minValue?: number; + + /**Specifies the name of the editor. + * @Default {Sets id as name if it is null.} + */ + name?: string; + + /**Toggles the readonly state of the editor. When the Editor is readonly it doesn't allow user interactions. + * @Default {false} + */ + readOnly?: boolean; + + /**Specify the rounded corner to editor + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies whether the up and down spin buttons should be displayed in editor. + * @Default {true} + */ + showSpinButton?: boolean; + + /**Enables decimal separator position validation on type . + * @Default {false} + */ + validateOnType?: boolean; + + /**Set the jQuery validation error message in editor. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jQuery validation rules to the editor. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value of the editor. + * @Default {null} + */ + value?: number|string; + + /**Specify the watermark text to editor. + */ + watermarkText?: string; + + /**Specifies the width of the editor. + * @Default {143} + */ + width?: number|string; + + /**Fires after Editor control value is changed.*/ + change? (e: ChangeEventArgs): void; + + /**Fires after Editor control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Editor is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires after Editor control is focused.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires after Editor control is loss the focus.*/ + focusOut? (e: FocusOutEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the corresponding editor model. + */ + model ?: ej.Editor.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the corresponding editor control value. + */ + value ?: number; + + /**returns true when the value changed by user interaction otherwise returns false + */ + isInteraction ?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the editor model + */ + model ?: ej.Editor.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the editor model + */ + model ?: ej.Editor.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the corresponding editor control value. + */ + value?: number; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the corresponding editor model. + */ + model?: ej.Editor.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the corresponding editor control value. + */ + value?: number; +} +} + +class ListView extends ej.Widget { + static fn: ListView; + constructor(element: JQuery, options?: ListView.Model); + constructor(element: Element, options?: ListView.Model); + model:ListView.Model; + defaults:ListView.Model; + + /** To add item in the given index. + * @param {string} Specifies the item to be added in ListView + * @param {number} Specifies the index where item to be added + * @returns {void} + */ + addItem(item: string, index: number): void; + + /** To check all the items. + * @returns {void} + */ + checkAllItem(): void; + + /** To check item in the given index. + * @param {number} Specifies the index of the item to be checked + * @returns {void} + */ + checkItem(index: number): void; + + /** To clear all the list item in the control before updating with new datasource. + * @returns {void} + */ + clear(): void; + + /** To make the item in the given index to be default state. + * @param {number} Specifies the index to make the item to be in default state. + * @returns {void} + */ + deActive(index: number): void; + + /** To disable item in the given index. + * @param {number} Specifies the index value to be disabled. + * @returns {void} + */ + disableItem(index: number): void; + + /** To enable item in the given index. + * @param {number} Specifies the index value to be enabled. + * @returns {void} + */ + enableItem(index: number): void; + + /** To get the active item. + * @returns {HTMLElement} + */ + getActiveItem(): HTMLElement; + + /** To get the text of the active item. + * @returns {string} + */ + getActiveItemText(): string; + + /** To get all the checked items. + * @returns {Array} + */ + getCheckedItems(): Array; + + /** To get the text of all the checked items. + * @returns {Array} + */ + getCheckedItemsText(): Array; + + /** To get the total item count. + * @returns {number} + */ + getItemsCount(): number; + + /** To get the text of the item in the given index. + * @param {string|number} Specifies the index value to get the textvalue. + * @returns {string} + */ + getItemText(index: string|number): string; + + /** To check whether the item in the given index has child item. + * @param {number} Specifies the index value to check the item has child or not. + * @returns {boolean} + */ + hasChild(index: number): boolean; + + /** To hide the list. + * @returns {void} + */ + hide(): void; + + /** To hide item in the given index. + * @param {number} Specifies the index value to hide the item. + * @returns {void} + */ + hideItem(index: number): void; + + /** To check whether item in the given index is checked. + * @returns {boolean} + */ + isChecked(): boolean; + + /** To load the ajax content while selecting the item. + * @param {string} Specifies the item to load the ajax content. + * @returns {void} + */ + loadAjaxContent(item: string): void; + + /** To remove the check mark either for specific item in the given index or for all items. + * @param {number} Specifies the index value to remove the checkbox. + * @returns {void} + */ + removeCheckMark(index: number): void; + + /** To remove item in the given index. + * @param {number} Specifies the index value to remove the item. + * @returns {void} + */ + removeItem(index: number): void; + + /** To select item in the given index. + * @param {number} Specifies the index value to select the item. + * @returns {void} + */ + selectItem(index: number): void; + + /** To make the item in the given index to be active state. + * @param {number} Specifies the index value to make the item in active state. + * @returns {void} + */ + setActive(index: number): void; + + /** To show the list. + * @returns {void} + */ + show(): void; + + /** To show item in the given index. + * @param {number} Specifies the index value to show the hided item. + * @returns {void} + */ + showItem(index: number): void; + + /** To uncheck all the items. + * @returns {void} + */ + unCheckAllItem(): void; + + /** To uncheck item in the given index. + * @param {number} Specifies the index value to uncheck the item. + * @returns {void} + */ + unCheckItem(index: number): void; +} +export module ListView{ + +export interface Model { + + /**Sets the root class for ListView theme. This cssClass API helps to use custom skinning option for ListView control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssClass?: string; + + /**Contains the list of data for generating the ListView items. + * @Default {[]} + */ + dataSource?: Array; + + /**Specifies whether to load ajax content while selecting item. + * @Default {false} + */ + enableAjax?: boolean; + + /**Specifies whether to enable caching the content. + * @Default {false} + */ + enableCache?: boolean; + + /**Specifies whether to enable check mark for the item. + * @Default {false} + */ + enableCheckMark?: boolean; + + /**Specifies whether to enable the filtering feature to filter the item. + * @Default {false} + */ + enableFiltering?: boolean; + + /**Specifies whether to group the list item. + * @Default {false} + */ + enableGroupList?: boolean; + + /**Specifies to maintain the current model value to browser cookies for state maintenance. While refresh the page, the model value will get apply to the control from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specifies the field settings to map the datasource. + */ + fieldSettings?: any; + + /**Specifies the text of the back button in the header. + * @Default {null} + */ + headerBackButtonText?: string; + + /**Specifies the title of the header. + * @Default {Title} + */ + headerTitle?: string; + + /**Specifies the height. + * @Default {null} + */ + height?: number; + + /**Specifies whether to retain the selection of the item. + * @Default {false} + */ + persistSelection?: boolean; + + /**Specifies whether to prevent the selection of the item. + * @Default {false} + */ + preventSelection?: boolean; + + /**Specifies the query to execute with the datasource. + * @Default {null} + */ + query?: any; + + /**Specifies whether need to render the control with the template contents. + * @Default {false} + */ + renderTemplate?: boolean; + + /**Specifies the index of item which need to be in selected state initially while loading. + * @Default {0} + */ + selectedItemIndex?: number; + + /**Specifies whether to show the header. + * @Default {true} + */ + showHeader?: boolean; + + /**Specifies ID of the element contains template contents. + * @Default {false} + */ + templateId?: boolean; + + /**Specifies the width. + * @Default {null} + */ + width?: number; + + /**Event triggers before the ajax request happens.*/ + ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + + /**Event triggers after the ajax content loaded completely.*/ + ajaxComplete? (e: AjaxCompleteEventArgs): void; + + /**Event triggers when the ajax request failed.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**Event triggers after the ajax content loaded successfully.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**Event triggers before the items loaded.*/ + load? (e: LoadEventArgs): void; + + /**Event triggers after the items loaded.*/ + loadComplete? (e: LoadCompleteEventArgs): void; + + /**Event triggers when mouse down happens on the item.*/ + mouseDown? (e: MouseDownEventArgs): void; + + /**Event triggers when mouse up happens on the item.*/ + mouseUP? (e: MouseUPEventArgs): void; +} + +export interface AjaxBeforeLoadEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**returns the ajax settings. + */ + ajaxData?: any; +} + +export interface AjaxCompleteEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; +} + +export interface AjaxErrorEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**returns the error thrown in the ajax post. + */ + errorThrown?: any; + + /**returns the status. + */ + textStatus?: any; + + /**returns the current list item. + */ + item?: any; + + /**returns the current item text. + */ + text?: string; + + /**returns the current item index. + */ + index?: number; +} + +export interface AjaxSuccessEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**returns the ajax current content. + */ + content?: string; + + /**returns the current list item. + */ + item?: any; + + /**returns the current item text. + */ + text?: string; + + /**returns the current item index. + */ + index?: number; + + /**returns the current url of the ajax post. + */ + url?: string; +} + +export interface LoadEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; +} + +export interface LoadCompleteEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; +} + +export interface MouseDownEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**If the child element exist return true; otherwise, false. + */ + hasChild?: boolean; + + /**returns the current list item. + */ + item?: string; + + /**returns the current text of item. + */ + text?: string; + + /**returns the current Index of the item. + */ + index?: number; + + /**If checked return true; otherwise, false. + */ + isChecked?: boolean; + + /**returns the list of checked items. + */ + checkedItems?: number; + + /**returns the current checked item text. + */ + checkedItemsText?: string; +} + +export interface MouseUPEventArgs { + + /**returns true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the name of the event. + */ + type?: string; + + /**returns the model value of the control. + */ + model?: any; + + /**If the child element exist return true; otherwise, false. + */ + hasChild?: boolean; + + /**returns the current list item. + */ + item?: string; + + /**returns the current text of item. + */ + text?: string; + + /**returns the current Index of the item. + */ + index?: number; + + /**If checked return true; otherwise, false. + */ + isChecked?: boolean; + + /**returns the list of checked items. + */ + checkedItems?: number; + + /**returns the current checked item text. + */ + checkedItemsText?: string; +} +} + +class MaskEdit extends ej.Widget { + static fn: MaskEdit; + constructor(element: JQuery, options?: MaskEdit.Model); + constructor(element: Element, options?: MaskEdit.Model); + model:MaskEdit.Model; + defaults:MaskEdit.Model; + + /** To clear the text in mask edit textbox control. + * @returns {void} + */ + clear(): void; + + /** To disable the mask edit textbox control. + * @returns {void} + */ + disable(): void; + + /** To enable the mask edit textbox control. + * @returns {void} + */ + enable(): void; + + /** To obtained the pure value of the text value, removes all the symbols in mask edit textbox control. + * @returns {string} + */ + get_StrippedValue(): string; + + /** To obtained the textbox value as such that, Just replace all '_' to ' '(space) in mask edit textbox control. + * @returns {string} + */ + get_UnstrippedValue(): string; +} +export module MaskEdit{ + +export interface Model { + + /**Specify the cssClass to achieve custom theme. + * @Default {null} + */ + cssClass?: string; + + /**Specify the custom character allowed to entered in mask edit textbox control. + * @Default {null} + */ + customCharacter?: string; + + /**Specify the state of the mask edit textbox control. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the enablePersistence to mask edit textbox to save current model value to browser cookies for state maintains. + */ + enablePersistence?: boolean; + + /**Specifies the height for the mask edit textbox control. + * @Default {28 px} + */ + height?: string; + + /**Specifies whether hide the prompt characters with spaces on blur. Prompt chars will be shown again on focus the textbox. + * @Default {false} + */ + hidePromptOnLeave?: boolean; + + /**Specifies the list of html attributes to be added to mask edit textbox. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specify the inputMode for mask edit textbox control. See InputMode + * @Default {ej.InputMode.Text} + */ + inputMode?: ej.InputMode|string; + + /**Specifies the input mask. + * @Default {null} + */ + maskFormat?: string; + + /**Specifies the name attribute value for the mask edit textbox. + * @Default {null} + */ + name?: string; + + /**Toggles the readonly state of the mask edit textbox. When the mask edit textbox is readonly, it doesn't allow your input. + * @Default {false} + */ + readOnly?: boolean; + + /**Specifies whether the error will show until correct value entered in the mask edit textbox control. + * @Default {false} + */ + showError?: boolean; + + /**MaskEdit input is displayed in rounded corner style when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specify the text alignment for mask edit textbox control.See TextAlign + * @Default {left} + */ + textAlign?: ej.TextAlign|string; + + /**Sets the jQuery validation error message in mask edit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. + * @Default {null} + */ + validationMessage?: any; + + /**Sets the jQuery validation rules to the MaskEdit. This property works when the widget is present inside the form. Include jquery.validate.min.js plugin additionally. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value for the mask edit textbox control. + * @Default {null} + */ + value?: string; + + /**Specifies the water mark text to be displayed in input text. + * @Default {null} + */ + watermarkText?: string; + + /**Specifies the width for the mask edit textbox control. + * @Default {143pixel} + */ + width?: string; + + /**Fires when value changed in mask edit textbox control.*/ + change? (e: ChangeEventArgs): void; + + /**Fires after MaskEdit control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the MaskEdit is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when focused in mask edit textbox control.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when focused out in mask edit textbox control.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when keydown in mask edit textbox control.*/ + keydown? (e: KeydownEventArgs): void; + + /**Fires when key press in mask edit textbox control.*/ + keyPress? (e: KeyPressEventArgs): void; + + /**Fires when keyup in mask edit textbox control.*/ + keyup? (e: KeyupEventArgs): void; + + /**Fires when mouse out in mask edit textbox control.*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Fires when mouse over in mask edit textbox control.*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the MaskEdit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the MaskEdit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface KeydownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface KeyPressEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface KeyupEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface MouseoutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} + +export interface MouseoverEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the mask edit model + */ + model?: ej.MaskEdit.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mask edit value + */ + value?: number; + + /**returns unstripped value in mask edit textbox control. + */ + unmaskedValue?: string; +} +} +enum InputMode +{ +//string +Password, +//string +Text, +} +enum TextAlign +{ +//string +Center, +//string +Justify, +//string +Left, +//string +Right, +} + +class Menu extends ej.Widget { + static fn: Menu; + constructor(element: JQuery, options?: Menu.Model); + constructor(element: Element, options?: Menu.Model); + model:Menu.Model; + defaults:Menu.Model; + + /** Disables the Menu control. + * @returns {void} + */ + disable(): void; + + /** Specifies the Menu Item to be disabled by using the Menu Item Text. + * @param {string} Specifies the Menu Item Text to be disabled. + * @returns {void} + */ + disableItem(itemtext: string): void; + + /** Specifies the Menu Item to be disabled by using the Menu Item Id. + * @param {string|number} Specifies the Menu Item id to be disabled + * @returns {void} + */ + disableItembyID(itemid: string|number): void; + + /** Enables the Menu control. + * @returns {void} + */ + enable(): void; + + /** Specifies the Menu Item to be enabled by using the Menu Item Text. + * @param {string} Specifies the Menu Item Text to be enabled. + * @returns {void} + */ + enableItem(itemtext: string): void; + + /** Specifies the Menu Item to be enabled by using the Menu Item Id. + * @param {string|number} Specifies the Menu Item id to be enabled. + * @returns {void} + */ + enableItembyID(itemid: string|number): void; + + /** Hides the Context Menu control. + * @returns {void} + */ + hide(): void; + + /** Insert the menu item as child of target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insert(item: any, target: string|any): void; + + /** Insert the menu item after the target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insertAfter(item: any, target: string|any): void; + + /** Insert the menu item before the target node. + * @param {any} Information about Menu item. + * @param {string|any} Selector of target node or Object of target node. + * @returns {void} + */ + insertBefore(item: any, target: string|any): void; + + /** Remove Menu item. + * @param {any|Array} Selector of target node or Object of target node. + * @returns {void} + */ + remove(target: any|Array): void; + + /** To show the Menu control. + * @param {number} x co-ordinate position of context menu. + * @param {number} y co-ordinate position of context menu. + * @param {any} target element + * @param {any} name of the event + * @returns {void} + */ + show(locationX: number, locationY: number, targetElement: any, event: any): void; +} +export module Menu{ + +export interface Model { + + /**To enable or disable the Animation while hover or click an menu items.See AnimationType + * @Default {ej.AnimationType.Default} + */ + animationType?: ej.AnimationType|string; + + /**Specifies the target id of context menu. On right clicking the specified contextTarget element, context menu gets shown. + * @Default {null} + */ + contextMenuTarget?: string; + + /**Specify the CSS class to achieve custom theme. + */ + cssClass?: string; + + /**To enable or disable the Animation effect while hover or click an menu items. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the root menu items to be aligned center in horizontal menu. + * @Default {false} + */ + enableCenterAlign?: boolean; + + /**Enable / Disable the Menu control. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the menu items to be displayed in right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**When this property sets to false, the menu items is displayed without any separators. + * @Default {true} + */ + enableSeparator?: boolean; + + /**Specifies the target which needs to be excluded. i.e., The context menu will not be displayed in those specified targets. + * @Default {null} + */ + excludeTarget?: string; + + /**Fields used to bind the data source and it includes following field members to make databind easier. + * @Default {null} + */ + fields?: Fields; + + /**Specifies the height of the root menu. + * @Default {auto} + */ + height?: string|number; + + /**Specifies the list of html attributes to be added to menu control. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the type of the menu. Essential JavaScript Menu consists of two type of menu, they are Normal Menu and Context Menu mode.See MenuType + * @Default {ej.MenuType.NormalMenu} + */ + menuType?: string|ej.MenuType; + + /**Specifies the sub menu items to be show or open only on click. + * @Default {false} + */ + openOnClick?: boolean; + + /**Specifies the orientation of normal menu. Normal menu can rendered in horizontal or vertical direction by using this API. See Orientation + * @Default {ej.Orientation.Horizontal} + */ + orientation?: string|ej.Orientation; + + /**Specifies the main menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showRooltLevelArrows?: boolean; + + /**Specifies the sub menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showSubLevelArrows?: boolean; + + /**Specifies position of pulldown submenus that will appear on mouse over.See Direction + * @Default {ej.Direction.Right} + */ + subMenuDirection?: string|ej.Direction; + + /**Specifies the title to responsive menu. + * @Default {Menu} + */ + titleText?: string; + + /**Specifies the width of the main menu. + * @Default {auto} + */ + width?: string|number; + + /**Fires before context menu gets open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when mouse click on menu items.*/ + click? (e: ClickEventArgs): void; + + /**Fire when context menu on close.*/ + close? (e: CloseEventArgs): void; + + /**Fires when context menu on open.*/ + open? (e: OpenEventArgs): void; + + /**Fires to create menu items.*/ + create? (e: CreateEventArgs): void; + + /**Fires to destroy menu items.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when key down on menu items.*/ + keydown? (e: KeydownEventArgs): void; + + /**Fires when mouse out from menu items.*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Fires when mouse over the Menu items.*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface BeforeOpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target element + */ + target?: any; +} + +export interface ClickEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + text?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; + + /**returns the selected item + */ + selectedItem?: number; +} + +export interface CloseEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target element + */ + target?: any; +} + +export interface OpenEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target element + */ + target?: any; +} + +export interface CreateEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface KeydownEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + menuText?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface MouseoutEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + text?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface MouseoverEventArgs { + + /**returns the menu model + */ + model?: ej.Menu.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns clicked menu item text + */ + text?: string; + + /**returns clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface Fields { + + /**It receives the child data for the inner level. + */ + child?: any; + + /**It receives datasource as Essential DataManager object and JSON object. + */ + dataSource?: any; + + /**Specifies the html attributes to “li” item list. + */ + htmlAttribute?: string; + + /**Specifies the id to menu items list + */ + id?: string; + + /**Specifies the image attribute to “img” tag inside items list. + */ + imageAttribute?: string; + + /**Specifies the image URL to “img” tag inside item list. + */ + imageUrl?: string; + + /**Adds custom attributes like "target" to the anchor tag of the menu items. + */ + linkAttribute?: string; + + /**Specifies the parent id of the table. + */ + parentId?: string; + + /**It receives query to retrieve data from the table (query is same as SQL). + */ + query?: any; + + /**Specifies the sprite CSS class to “li” item list. + */ + spriteCssClass?: string; + + /**It receives table name to execute query on the corresponding table. + */ + tableName?: string; + + /**Specifies the text of menu items list. + */ + text?: string; + + /**Specifies the url to the anchor tag in menu item list. + */ + url?: string; +} +} +enum AnimationType +{ +//string +Default, +//string +None, +} +enum MenuType +{ +//string +ContextMenu, +//string +NormalMenu, +} +enum Direction +{ +//string +Left, +//string +None, +//string +Right, +} + +class Pager extends ej.Widget { + static fn: Pager; + constructor(element: JQuery, options?: Pager.Model); + constructor(element: Element, options?: Pager.Model); + model:Pager.Model; + defaults:Pager.Model; + + /** Send a paging request to specified page through the pagerControl. + * @returns {void} + */ + gotoPage(): void; +} +export module Pager{ + +export interface Model { + + /**Gets or sets a value that indicates whether to define the number of records displayed per page. + * @Default {12} + */ + pageSize?: number; + + /**Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation. + * @Default {10} + */ + pageCount?: number; + + /**Gets or sets a value that indicates whether to define which page to display currently in pager. + * @Default {1} + */ + currentPage?: number; + + /**Get or sets a value of total number of pages in the pager. The totalPages value is calculated based on pagesize and totalrecords. + * @Default {null} + */ + totalPages?: number; + + /**Get the value of total number of records which is bound to a data item. + * @Default {null} + */ + totalRecordsCount?: number; + + /**Gets or sets a value that indicates whether to pass the current page information as a query string along with the url while navigating to other page. + * @Default {false} + */ + enableQueryString?: boolean; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Align content in the pager control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**Triggered when pager numeric item is clicked in pager control.*/ + click? (e: ClickEventArgs): void; +} + +export interface ClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current page index. + */ + currentPage?: number; + + /**Returns the pager model. + */ + model?: any; + + /**Returns the name of event + */ + type?: string; + + /**Returns current action event type and its target. + */ + event?: any; +} +} + +class ProgressBar extends ej.Widget { + static fn: ProgressBar; + constructor(element: JQuery, options?: ProgressBar.Model); + constructor(element: Element, options?: ProgressBar.Model); + model:ProgressBar.Model; + defaults:ProgressBar.Model; + + /** Destroy the progressbar widget + * @returns {void} + */ + destroy(): void; + + /** Disables the progressbar control + * @returns {void} + */ + disable(): void; + + /** Enables the progressbar control + * @returns {void} + */ + enable(): void; + + /** Returns the current progress value in percent. + * @returns {number} + */ + getPercentage(): number; + + /** Returns the current progress value + * @returns {number} + */ + getValue(): number; +} +export module ProgressBar{ + +export interface Model { + + /**Sets the root CSS class for ProgressBar theme, which is used customize. + * @Default {null} + */ + cssClass?: string; + + /**When this property sets to false, it disables the ProgressBar control + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for state maintains. While refresh the progressBar control page retains the model value apply from browser cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /**Sets the ProgressBar direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**Defines the height of the ProgressBar. + * @Default {null} + */ + height?: number|string; + + /**It allows to define the characteristics of the progressBar control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the maximum value of the ProgressBar. + * @Default {100} + */ + maxValue?: number; + + /**Sets the minimum value of the ProgressBar. + * @Default {0} + */ + minValue?: number; + + /**Sets the ProgressBar value in percentage. The value should be in between 0 to 100. + * @Default {0} + */ + percentage?: number; + + /**Displays rounded corner borders on the progressBar control. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Sets the custom text for the ProgressBar. The text placed in the middle of the ProgressBar and it can be customizable using the class 'e-progress-text'. + * @Default {null} + */ + text?: string; + + /**Sets the ProgressBar value. The value should be in between min and max values. + * @Default {0} + */ + value?: number; + + /**Defines the width of the ProgressBar. + * @Default {null} + */ + width?: number|string; + + /**Event triggers when the progress value changed*/ + change? (e: ChangeEventArgs): void; + + /**Event triggers when the process completes (at 100%)*/ + complete? (e: CompleteEventArgs): void; + + /**Event triggers when the progressbar are created*/ + create? (e: CreateEventArgs): void; + + /**Event triggers when the progressbar are destroyed*/ + destroy? (e: DestroyEventArgs): void; + + /**Event triggers when the process starts (from 0%)*/ + start? (e: StartEventArgs): void; +} + +export interface ChangeEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /**returns the current progress percentage + */ + percentage?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the current progress value + */ + value?: string; +} + +export interface CompleteEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /**returns the current progress percentage + */ + percentage?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the current progress value + */ + value?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the progressbar model + */ + model?: ej.ProgressBar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the progressbar model + */ + model?: ej.ProgressBar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface StartEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the ProgressBar model + */ + model?: ej.ProgressBar.Model; + + /**returns the current progress percentage + */ + percentage?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the current progress value + */ + value?: string; +} +} + +class RadioButton extends ej.Widget { + static fn: RadioButton; + constructor(element: JQuery, options?: RadioButton.Model); + constructor(element: Element, options?: RadioButton.Model); + model:RadioButton.Model; + defaults:RadioButton.Model; + + /** To disable the RadioButton + * @returns {void} + */ + disable(): void; + + /** To enable the RadioButton + * @returns {void} + */ + enable(): void; +} +export module RadioButton{ + +export interface Model { + + /**Specifies the check attribute of the Radio Button. + * @Default {false} + */ + checked?: boolean; + + /**Specify the CSS class to RadioButton to achieve custom theme. + */ + cssClass?: string; + + /**Specifies the RadioButton control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the enablePersistence property for RadioButton while initialization. The enablePersistence API save current model value to browser cookies for state maintains. While refreshing the radio button control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left direction to RadioButton + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the HTML Attributes of the Checkbox + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the id attribute for the Radio Button while initialization. + * @Default {null} + */ + id?: string; + + /**Specify the idPrefix value to be added before the current id of the RadioButton. + * @Default {ej} + */ + idPrefix?: string; + + /**Specifies the name attribute for the Radio Button while initialization. + * @Default {Sets id as name if it is null} + */ + name?: string; + + /**Specifies the size of the RadioButton. + * @Default {small} + */ + size?: ej.RadioButtonSize|string; + + /**Specifies the text content for RadioButton. + */ + text?: string; + + /**Set the jquery validation error message in radio button. + * @Default {null} + */ + validationMessage?: any; + + /**Set the jquery validation rules in radio button. + * @Default {null} + */ + validationRules?: any; + + /**Specifies the value attribute of the Radio Button. + * @Default {null} + */ + value?: string; + + /**Fires before the RadioButton is going to changed its state successfully*/ + beforeChange? (e: BeforeChangeEventArgs): void; + + /**Fires when the RadioButton state is changed successfully*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the RadioButton created successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires when the RadioButton destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface BeforeChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns true if element is checked, otherwise returns false + */ + isChecked?: boolean; + + /**returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns true if element is checked, otherwise returns false + */ + isChecked?: boolean; + + /**returns true if change event triggered by interaction, otherwise returns false + */ + isInteraction?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RadioButton model + */ + model?: ej.RadioButton.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum RadioButtonSize +{ +//Shows small size radio button +Small, +//Shows medium size radio button +Medium, +} + +class Rating extends ej.Widget { + static fn: Rating; + constructor(element: JQuery, options?: Rating.Model); + constructor(element: Element, options?: Rating.Model); + model:Rating.Model; + defaults:Rating.Model; + + /** Destroy the Rating widget all events bound will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To get the current value of rating control. + * @returns {number} + */ + getValue(): number; + + /** To hide the rating control. + * @returns {void} + */ + hide(): void; + + /** User can refresh the rating control to identify changes. + * @returns {void} + */ + refresh(): void; + + /** To reset the rating value. + * @returns {void} + */ + reset(): void; + + /** To set the rating value. + * @param {string|number} Specifies the rating value. + * @returns {void} + */ + setValue(value: string|number): void; + + /** To show the rating control + * @returns {void} + */ + show(): void; +} +export module Rating{ + +export interface Model { + + /**Enables the rating control with reset button.It can be used to reset the rating control value. + * @Default {true} + */ + allowReset?: boolean; + + /**Specify the CSS class to achieve custom theme. + */ + cssClass?: string; + + /**When this property is set to false, it disables the rating control. + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for state maintenance. While refresh the page Rating control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specifies the height of the Rating control wrapper. + * @Default {null} + */ + height?: string; + + /**Specifies the value to be increased while navigating between shapes(stars) in Rating control. + * @Default {1} + */ + incrementStep?: number; + + /**Allow to render the maximum number of Rating shape(star). + * @Default {5} + */ + maxValue?: number; + + /**Allow to render the minimum number of Rating shape(star). + * @Default {0} + */ + minValue?: number; + + /**Specifies the orientation of Rating control. See Orientation + * @Default {ej.Rating.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Helps to provide more precise ratings.Rating control supports three precision modes - full, half, and exact. See Precision + * @Default {full} + */ + precision?: ej.Rating.Precision|string; + + /**Interaction with Rating control can be prevented by enabling this API. + * @Default {false} + */ + readOnly?: boolean; + + /**To specify the height of each shape in Rating control. + * @Default {23} + */ + shapeHeight?: number; + + /**To specify the width of each shape in Rating control. + * @Default {23} + */ + shapeWidth?: number; + + /**Enables the tooltip option.Currently selected value will be displayed in tooltip. + * @Default {true} + */ + showTooltip?: boolean; + + /**To specify the number of stars to be selected while rendering. + * @Default {1} + */ + value?: number; + + /**Specifies the width of the Rating control wrapper. + * @Default {null} + */ + width?: string; + + /**Fires when Rating value changes.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when Rating control is clicked successfully.*/ + click? (e: ClickEventArgs): void; + + /**Fires when Rating control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when Rating control is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when mouse hover is removed from Rating control.*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Fires when mouse hovered over the Rating control.*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface ChangeEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; +} + +export interface ClickEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseoutEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; +} + +export interface MouseoverEventArgs { + + /**returns the current value. + */ + value?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rating model + */ + model?: ej.Rating.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the mouse click event args values. + */ + event?: any; + + /**returns the current index value. + */ + index?: any; +} + +enum Precision{ + + ///string + Exact, + + ///string + Full, + + ///string + Half +} + +} + +class Ribbon extends ej.Widget { + static fn: Ribbon; + constructor(element: JQuery, options?: Ribbon.Model); + constructor(element: Element, options?: Ribbon.Model); + model:Ribbon.Model; + defaults:Ribbon.Model; + + /** Adds contextual tab or contextual tab set dynamically in the ribbon control with contextual tabs object and index position. When index is null, ribbon contextual tab or contextual tab set is added at the last index. + * @param {any} contextual tab or contextual tab set object. + * @param {number} index of the contextual tab or contextual tab set, this is optional. + * @returns {void} + */ + addContextualTabs(contextualTabSet: any, index: number): void; + + /** Adds tab dynamically in the ribbon control with given name, tab group array and index position. When index is null, ribbon tab is added at the last index. + * @param {string} ribbon tab display text. + * @param {Array} groups to be displayed in ribbon tab . + * @param {number} index of the ribbon tab,this is optional. + * @returns {void} + */ + addTab(tabText: string, ribbonGroups: Array, index: number): void; + + /** Adds tab group dynamically in the ribbon control with given tab index, tab group object and group index position. When group index is null, ribbon group is added at the last index. + * @param {number} ribbon tab index. + * @param {any} group to be displayed in ribbon tab . + * @param {number} index of the ribbon group,this is optional. + * @returns {void} + */ + addTabGroup(tabIndex: number, tabGroup: any, groupIndex: number): void; + + /** Adds group content dynamically in the ribbon control with given tab index, group index, sub group index, content and content index position. When content index is null, content is added at the last index. + * @param {number} ribbon tab index. + * @param {number} ribbon group index. + * @param {number} sub group index in the ribbon group, + * @param {any} content to be displayed in the ribbon group. + * @param {number} ribbon content index .this is optional. + * @returns {void} + */ + addTabGroupContent(tabIndex: number, groupIndex: number, subGroupIndex: number, content: any, contentIndex: number): void; + + /** Hides the ribbon backstage page. + * @returns {void} + */ + hideBackstage(): void; + + /** Collapses the ribbon tab content. + * @returns {void} + */ + collapse(): void; + + /** Destroys the ribbon widget. All the events bound using this._on are unbound automatically and the ribbon control is moved to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Expands the ribbon tab content. + * @returns {void} + */ + expand(): void; + + /** Gets text of the given index tab in the ribbon control. + * @param {number} index of the tab item. + * @returns {string} + */ + getTabText(index: number): string; + + /** Hides the given text tab in the ribbon control. + * @param {string} text of the tab item. + * @returns {void} + */ + hideTab(string: string): void; + + /** Checks whether the given text tab in the ribbon control is enabled or not. + * @param {string} text of the tab item. + * @returns {boolean} + */ + isEnable(string: string): boolean; + + /** Checks whether the given text tab in the ribbon control is visible or not. + * @param {string} text of the tab item. + * @returns {boolean} + */ + isVisible(string: string): boolean; + + /** Removes the given index tab item from the ribbon control. + * @param {number} index of tab item. + * @returns {void} + */ + removeTab(index: number): void; + + /** Sets new text to the given text tab in the ribbon control. + * @param {string} current text of the tab item. + * @param {string} new text of the tab item. + * @returns {void} + */ + setTabText(tabText: string, newText: string): void; + + /** Displays the ribbon backstage page. + * @returns {void} + */ + showBackstage(): void; + + /** Displays the given text tab in the ribbon control. + * @param {string} text of the tab item. + * @returns {void} + */ + showTab(string: string): void; +} +export module Ribbon{ + +export interface Model { + + /**Enables the ribbon resize feature. + * @Default {false} + */ + allowResizing?: boolean; + + /**Specifies the height, width, enableRTL, showRoundedCorner,enabled,cssClass property to the controls in the ribbon commonly andit will work only when those properties are not defined in buttonSettings and content defaults. + * @Default {object} + */ + buttonDefaults?: any; + + /**Property to enable the ribbon quick access toolbar. + * @Default {false} + */ + showQAT?: boolean; + + /**Sets custom setting to the collapsible pin in the ribbon. + * @Default {Object} + */ + collapsePinSettings?: CollapsePinSettings; + + /**Sets custom setting to the expandable pin in the ribbon. + * @Default {Object} + */ + expandPinSettings?: ExpandPinSettings; + + /**Specifies the application tab to contain application menu or backstage page in the ribbon control. + * @Default {Object} + */ + applicationTab?: ApplicationTab; + + /**Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs into the contextual tab and contextual tab set. + * @Default {array} + */ + contextualTabs?: Array; + + /**Specifies the index or indexes to disable the given index tab or indexes tabs in the ribbon control. + * @Default {0} + */ + disabledItemIndex?: Array; + + /**Specifies the index or indexes to enable the given index tab or indexes tabs in the ribbon control. + * @Default {null} + */ + enabledItemIndex?: Array; + + /**Specifies the index of the ribbon tab to select the given index tab item in the ribbon control. + * @Default {1} + */ + selectedItemIndex?: number; + + /**Specifies the tabs and its groups. Also specifies the control details that has to be placed in the tab area in the ribbon control. + * @Default {array} + */ + tabs?: Array; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region and it will need to use the user's preference. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the width to the ribbon control. You can set width in string or number format. + * @Default {null} + */ + width?: string|number; + + /**Triggered before the ribbon tab item is removed.*/ + beforeTabRemove? (e: BeforeTabRemoveEventArgs): void; + + /**Triggered before the ribbon control is created.*/ + create? (e: CreateEventArgs): void; + + /**Triggered before the ribbon control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered when the control in the group is clicked successfully.*/ + groupClick? (e: GroupClickEventArgs): void; + + /**Triggered when the groupexpander in the group is clicked successfully.*/ + groupExpand? (e: GroupExpandEventArgs): void; + + /**Triggered when an item in the Gallery control is clicked successfully.*/ + galleryItemClick? (e: GalleryItemClickEventArgs): void; + + /**Triggered when a tab or button in the backstage page is clicked successfully.*/ + backstageItemClick? (e: BackstageItemClickEventArgs): void; + + /**Triggered when the ribbon control is collapsed.*/ + collapse? (e: CollapseEventArgs): void; + + /**Triggered when the ribbon control is expanded.*/ + expand? (e: ExpandEventArgs): void; + + /**Triggered after adding the new ribbon tab item.*/ + tabAdd? (e: TabAddEventArgs): void; + + /**Triggered when tab is clicked successfully in the ribbon control.*/ + tabClick? (e: TabClickEventArgs): void; + + /**Triggered before the ribbon tab is created.*/ + tabCreate? (e: TabCreateEventArgs): void; + + /**Triggered after the tab item is removed from the ribbon control.*/ + tabRemove? (e: TabRemoveEventArgs): void; + + /**Triggered after the ribbon tab item is selected in the ribbon control.*/ + tabSelect? (e: TabSelectEventArgs): void; + + /**Triggered when the expand/collapse button is clicked successfully .*/ + toggleButtonClick? (e: ToggleButtonClickEventArgs): void; + + /**Triggered when the QAT menu item is clicked successfully .*/ + qatMenuItemClick? (e: QatMenuItemClickEventArgs): void; +} + +export interface BeforeTabRemoveEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns current tab item index in the ribbon control. + */ + index?: number; +} + +export interface CreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns current ribbon tab item index + */ + deleteIndex?: number; +} + +export interface GroupClickEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the control clicked in the group. + */ + target?: number; +} + +export interface GroupExpandEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the clicked groupexpander. + */ + target?: number; +} + +export interface GalleryItemClickEventArgs { + + /**Set to true when the event has to be cancelled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the gallery model. + */ + galleryModel?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the item clicked in the gallery. + */ + target?: number; +} + +export interface BackstageItemClickEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the item clicked in the gallery. + */ + target?: number; + + /**returns the id of the target item. + */ + id?: string; + + /**returns the text of the target item. + */ + text?: string; +} + +export interface CollapseEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ExpandEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface TabAddEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns new added tab header. + */ + tabHeader?: any; + + /**returns new added tab content panel. + */ + tabContent?: any; +} + +export interface TabClickEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: any; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: any; + + /**returns current active index. + */ + activeIndex?: number; +} + +export interface TabCreateEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns current ribbon tab item index + */ + deleteIndex?: number; +} + +export interface TabRemoveEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the removed index. + */ + removedIndex?: number; +} + +export interface TabSelectEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: any; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: any; + + /**returns current active index. + */ + activeIndex?: number; +} + +export interface ToggleButtonClickEventArgs { + + /**Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the expand/collapse button. + */ + target?: number; +} + +export interface QatMenuItemClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the ribbon model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the clicked menu item text. + */ + text?: string; +} + +export interface CollapsePinSettings { + + /**Sets tooltip for the collapse pin . + * @Default {null} + */ + toolTip?: string; + + /**Specifies the custom tooltip for collapse pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; +} + +export interface ExpandPinSettings { + + /**Sets tooltip for the expand pin. + * @Default {null} + */ + toolTip?: string; + + /**Specifies the custom tooltip for expand pin.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; +} + +export interface ApplicationTabBackstageSettingsPages { + + /**Specifies the id for ribbon backstage page's tab and button elements. + * @Default {null} + */ + id?: string; + + /**Specifies the text for ribbon backstage page's tab header and button elements. + * @Default {null} + */ + text?: string; + + /**Specifies the type for ribbon backstage page's contents. Set "ej.Ribbon.backStageItemType.tab" to render the tab or "ej.Ribbon.backStageItemType.button" to render the button. + * @Default {ej.Ribbon.itemType.tab} + */ + itemType?: ej.Ribbon.itemType|string; + + /**Specifies the id of html elements like div, ul, etc., as ribbon backstage page's tab content. + * @Default {null} + */ + contentID?: string; + + /**Specifies the separator between backstage page's tab and button elements. + * @Default {false} + */ + enableSeparator?: boolean; +} + +export interface ApplicationTabBackstageSettings { + + /**Specifies the display text of application tab. + * @Default {null} + */ + text?: string; + + /**Specifies the height of ribbon backstage page. + * @Default {null} + */ + height?: string|number; + + /**Specifies the width of ribbon backstage page. + * @Default {null} + */ + width?: string|number; + + /**Specifies the ribbon backstage page with its tab and button elements. + * @Default {array} + */ + pages?: Array; + + /**Specifies the width of backstage page header that contains tabs and buttons. + * @Default {null} + */ + headerWidth?: string|number; +} + +export interface ApplicationTab { + + /**Specifies the ribbon backstage page items. + * @Default {object} + */ + backstageSettings?: ApplicationTabBackstageSettings; + + /**Specifies the ID of 'ul' list to create application menu in the ribbon control. + * @Default {null} + */ + menuItemID?: string; + + /**Specifies the menu members, events by using the menu settings for the menu in the application tab. + * @Default {object} + */ + menuSettings?: any; + + /**Specifies the application menu or backstage page. Specify the type of application tab as "ej.Ribbon.applicationTabType.menu" to render the application menu or "ej.Ribbon.applicationTabType.backstage" to render backstage page in the ribbon control. + * @Default {ej.Ribbon.applicationTabType.menu} + */ + type?: ej.Ribbon.applicationTabType|string; +} + +export interface ContextualTabs { + + /**Specifies the backgroundColor of the contextual tabs and tab set in the ribbon control. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor of the contextual tabs and tab set in the ribbon control. + * @Default {null} + */ + borderColor?: string; + + /**Specifies the tabs to present in the contextual tabs and tab set. Refer to the tabs section for adding tabs into the contextual tabs and tab set. + * @Default {array} + */ + tabs?: Array; +} + +export interface TabsGroupsContentGroupsCustomGalleryItems { + + /**Specifies the syncfusion button members, events by using buttonSettings. + * @Default {object} + */ + buttonSettings?: any; + + /**Specifies the type as ej.Ribbon.customItemType.menu or ej.Ribbon.customItemType.button to render Syncfusion button and menu. + * @Default {ej.Ribbon.customItemType.button} + */ + customItemType?: ej.Ribbon.customItemType|string; + + /**Specifies the custom tooltip for gallery extra item's button. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {object} + */ + customToolTip?: any; + + /**Specifies the UL list id to render menu as gallery extra item. + * @Default {null} + */ + menuId?: string; + + /**Specifies the Syncfusion menu members, events by using menuSettings. + * @Default {object} + */ + menuSettings?: any; + + /**Specifies the text for gallery extra item's button. + * @Default {null} + */ + text?: string; + + /**Specifies the tooltip for gallery extra item's button. + * @Default {null} + */ + toolTip?: string; +} + +export interface TabsGroupsContentGroupsCustomToolTip { + + /**Sets content to the custom tooltip. Text and html support are provided for content. + * @Default {null} + */ + content?: string; + + /**Sets icon to the custom tooltip content. + * @Default {null} + */ + prefixIcon?: string; + + /**Sets title to the custom tooltip. Text and html support are provided for title and the title is in bold for text format. + * @Default {null} + */ + title?: string; +} + +export interface TabsGroupsContentGroupsGalleryItems { + + /**Specifies the Syncfusion button members, events by using buttonSettings. + * @Default {object} + */ + buttonSettings?: any; + + /**Specifies the custom tooltip for gallery content. Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {object} + */ + customToolTip?: any; + + /**Sets text for the gallery content. + * @Default {null} + */ + text?: string; + + /**Sets tooltip for the gallery content. + * @Default {null} + */ + toolTip?: string; +} + +export interface TabsGroupsContentGroups { + + /**Specifies the Syncfusion button members, events by using this buttonSettings. + * @Default {object} + */ + buttonSettings?: any; + + /**It is used to set the count of gallery contents in a row. + * @Default {null} + */ + columns?: number; + + /**Specifies the custom items such as div, table, controls as custom controls with the type "ej.Ribbon.type.custom" in the groups. + * @Default {null} + */ + contentID?: string; + + /**Specifies the css class property to apply styles to the button, split, dropdown controls in the groups. + * @Default {null} + */ + cssClass?: string; + + /**Specifies the Syncfusion button and menu as gallery extra items. + * @Default {array} + */ + customGalleryItems?: Array; + + /**Provides custom tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. Text and html support are also provided for title and content. + * @Default {Object} + */ + customToolTip?: TabsGroupsContentGroupsCustomToolTip; + + /**Specifies the Syncfusion dropdown list members, events by using this dropdownSettings. + * @Default {object} + */ + dropdownSettings?: any; + + /**Specifies the separator to the control that is in row type group. The separator separates the control from the next control in the group. Set "true" to enable the separator. + * @Default {false} + */ + enableSeparator?: boolean; + + /**Sets the count of gallery contents in a row, when the gallery is in expanded state. + * @Default {null} + */ + expandedColumns?: number; + + /**Defines each gallery content. + * @Default {array} + */ + galleryItems?: Array; + + /**Specifies the Id for button, split button, dropdown list, toggle button, gallery, custom controls in the sub groups. + * @Default {null} + */ + id?: string; + + /**Specifies the size for button, split button controls. Set "true" for big size and "false" for small size. + * @Default {null} + */ + isBig?: boolean; + + /**Sets the height of each gallery content. + * @Default {null} + */ + itemHeight?: string|number; + + /**Sets the width of each gallery content. + * @Default {null} + */ + itemWidth?: string|number; + + /**Specifies the Syncfusion split button members, events by using this splitButtonSettings. + * @Default {object} + */ + splitButtonSettings?: any; + + /**Specifies the text for button, split button, toggle button controls in the sub groups. + * @Default {null} + */ + text?: string; + + /**Specifies the Syncfusion toggle button members, events by using toggleButtonSettings. + * @Default {object} + */ + toggleButtonSettings?: any; + + /**Specifies the tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. + * @Default {null} + */ + toolTip?: string; + + /**To add,show and hide controls in Quick Access toolbar. + * @Default {ej.Ribbon.quickAccessMode.none} + */ + quickAccessMode?: ej.Ribbon.quickAccessMode|string; + + /**Specifies the type as "ej.Ribbon.type.button" or "ej.Ribbon.type.splitButton" or "ej.Ribbon.type.dropDownList" or "ej.Ribbon.type.toggleButton" or "ej.Ribbon.type.custom" or "ej.Ribbon.type.gallery" to render button, split, dropdown, toggle button, gallery, custom controls. + * @Default {ej.Ribbon.type.button} + */ + type?: ej.Ribbon.type|string; +} + +export interface TabsGroupsContent { + + /**Specifies the height, width, type, isBig property to the controls in the group commonly. + * @Default {object} + */ + defaults?: any; + + /**Specifies the controls such as Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls in the subgroup of the ribbon tab . + * @Default {array} + */ + groups?: Array; +} + +export interface TabsGroupsGroupExpanderSettings { + + /**Sets tooltip for the group expander of the group. + * @Default {null} + */ + toolTip?: string; + + /**Specifies the custom tooltip for group expander.Refer to ejRibbon#tabs->groups->content->groups->customToolTip for its inner properties. + * @Default {Object} + */ + customToolTip?: any; +} + +export interface TabsGroups { + + /**Specifies the alignment of controls in the groups in 'row' type or 'column' type. Value for row type is "ej.Ribbon.alignType.rows" and for column type is "ej.Ribbon.alignType.columns". + * @Default {ej.Ribbon.alignType.rows} + */ + alignType?: ej.Ribbon.alignType|string; + + /**Specifies the Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls to the groups in the ribbon control. + * @Default {array} + */ + content?: Array; + + /**Specifies the ID of custom items to be placed in the groups. + * @Default {null} + */ + contentID?: string; + + /**Specifies the HTML contents to place into the groups. + * @Default {null} + */ + customContent?: string; + + /**Specifies the group expander for groups in the ribbon control. Set "true" to enable the group expander. + * @Default {false} + */ + enableGroupExpander?: boolean; + + /**Sets custom setting to the groups in the ribbon control. + * @Default {Object} + */ + groupExpanderSettings?: TabsGroupsGroupExpanderSettings; + + /**Specifies the text to the groups in the ribbon control. + * @Default {null} + */ + text?: string; + + /**Specifies the custom items such as div, table, controls by using the "custom" type. + * @Default {null} + */ + type?: string; +} + +export interface Tabs { + + /**Specifies single group or multiple groups and its contents to each tab in the ribbon control. + * @Default {array} + */ + groups?: Array; + + /**Specifies the ID for each tab's content panel. + * @Default {null} + */ + id?: string; + + /**Specifies the text of the tab in the ribbon control. + * @Default {null} + */ + text?: string; +} + +enum itemType{ + + ///To render the button for ribbon backstage page’s contents + Button, + + ///To render the tab for ribbon backstage page’s contents + Tab +} + + +enum applicationTabType{ + + ///applicationTab display as menu + Menu, + + ///applicationTab display as backstage + Backstage +} + + +enum alignType{ + + ///To align the group content's in row + Rows, + + ///To align group content's in columns + Columns +} + + +enum customItemType{ + + ///Specifies the button type in customGalleryItems + Button, + + ///Specifies the menu type in customGalleryItems + Menu +} + + +enum quickAccessMode{ + + ///Controls are hidden in Quick Access toolbar + None, + + ///Add controls in toolBar + ToolBar, + + ///Add controls in menu + Menu +} + + +enum type{ + + ///Specifies the button control + Button, + + ///Specifies the split button + SplitButton, + + ///Specifies the dropDown + DropDownList, + + ///To append external element's + Custom, + + ///Specifies the toggle button + ToggleButton, + + ///Specifies the ribbon gallery + Gallery +} + +} + +class Kanban extends ej.Widget { + static fn: Kanban; + constructor(element: JQuery, options?: Kanban.Model); + constructor(element: Element, options?: Kanban.Model); + model:Kanban.Model; + defaults:Kanban.Model; + + /** Add a new card in kanban control.If parameters are not given default dialog will be open + * @param {string} Pass the primary key field Name of the column + * @param {Array} Pass the edited json data of card need to be add. + * @returns {void} + */ + addCard(primaryKey: string, card: Array): void; + + /** Method used for send a clear search request to kanban. + * @returns {void} + */ + clearSearch(): void; + + /** It is used to clear all the card selection. + * @returns {void} + */ + clearSelection(): void; + + /** Collapse all the swimlane rows in kanban. + * @returns {void} + */ + collapseAll(): void; + + /** Add or remove columns in kanban columns collections + * @param {Array|string} Pass array of columns or string of headerText to add/remove the column in kanban + * @param {Array|string} Pass array of columns or string of keyvalue to add/remove the column in kanban + * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform + * @returns {void} + */ + columns(columndetails: Array|string, keyvalue: Array|string, action: string): void; + + /** Send a cancel request of add/edit card in kanban + * @returns {void} + */ + cancelEdit(): void; + + /** Destroy the kanban widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Delete a card in kanban control. + * @param {string|number} Pass the key of card to be delete + * @returns {void} + */ + deleteCard(Key: string|number): void; + + /** Refresh the kanban with new data source. + * @param {Array} Pass new data source to the kanban + * @returns {void} + */ + dataSource(datasource: Array): void; + + /** Send a save request in kanban when any card is in edit/new add card state. + * @returns {void} + */ + endEdit(): void; + + /** toggleColumn based on the headerText in kanban. + * @param {any} Pass the header text of the column to get the corresponding column object + * @returns {void} + */ + toggleColumn( headerText : any): void; + + /** Expand or collapse the card based on the state of target "div" + * @param {string|number} Pass the key of card to be toggle + * @returns {void} + */ + toggleCard( key : string|number): void; + + /** Expand or collapse the swimlane row based on the state of target "div" + * @param {any} Pass the div object to toggleSwimlane row based on its row state + * @returns {void} + */ + toggleSwimlane( $div : any): void; + + /** Expand all the swimlane rows in kanban. + * @returns {void} + */ + expandAll(): void; + + /** used for get the names of all the visible column name collections in kanban. + * @returns {void} + */ + getVisibleColumnNames(): void; + + /** Get the scroller object of kanban. + * @returns {void} + */ + getScrollObject(): void; + + /** Get the column details based on the given header text in kanban. + * @param {string} Pass the header text of the column to get the corresponding column object + * @returns {string} + */ + getColumnByHeaderText( headerText : string): string; + + /** Hide columns from the kanban based on the header text + * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide + * @returns {void} + */ + hideColumns( headerText : Array|string): void; + + /** Refresh the template of the kanban + * @returns {void} + */ + refreshTemplate(): void; + + /** Refresh the kanban contents.The template refreshment is based on the argument passed along with this method + * @param {boolean} optional When templateRefresh is set true, template and kanban contents both are refreshed in kanban else only kanban content is refreshed + * @returns {void} + */ + refresh( templateRefresh : boolean): void; + + /** send a search request to kanban with specified string passed in it. + * @param {string} Pass the string to search in Kanban card + * @returns {void} + */ + searchCards( searchString: string): void; + + /** Method used for set validation to a field during editing. + * @param {string} Specify the name of the column to set validation rules + * @param {any} Specify the validation rules for the field + * @returns {void} + */ + setValidationToField(name: string, rules: any): void; + + /** Send an edit card request in kanban.Parameter will be Html element or primary key + * @param {any} Pass the div selected row element to be edited in kanban + * @returns {void} + */ + startEdit( $div : any): void; + + /** Show columns in the kanban based on the header text. + * @param {Array|string} You can pass either array of header text of various columns or a header text of a column to show + * @returns {void} + */ + showColumns( headerText : Array|string): void; + + /** Update a card in kanban control based on key and json data given. + * @param {string} Pass the key field Name of the column + * @param {Array} Pass the edited json data of card need to be update. + * @returns {void} + */ + updateCard( key : string, data : Array): void; +} +export module Kanban{ + +export interface Model { + + /**Gets or sets a value that indicates whether to enable allowDragAndDrop behavior on kanban. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /**To enable or disable the title of the card. + * @Default {false} + */ + allowTitle?: boolean; + + /**Customize the settings for swimlane. + * @Default {Object} + */ + swimlaneSettings?: SwimlaneSettings; + + /**To enable or disable the column expand /collapse. + * @Default {false} + */ + allowToggleColumn?: boolean; + + /**To enable Searching operation in kanban. + * @Default {false} + */ + allowSearching?: boolean; + + /**Gets or sets a value that indicates whether to enable allowSelection behavior on kanban.User can select card and the selected card will be highlighted on kanban. + * @Default {true} + */ + allowSelection?: boolean; + + /**Gets or sets a value that indicates whether to allow card hover actions. + * @Default {true} + */ + allowHover?: boolean; + + /**To allow keyboard navigation actions. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Gets or sets a value that indicates whether to enable the scrollbar in the kanban and view the card by scroll through the kanban manually. + * @Default {false} + */ + allowScrolling?: boolean; + + /**Gets or sets an object that indicates whether to customize the context menu behavior of the kanban. + * @Default {Object} + */ + contextMenuSettings?: ContextMenuSettings; + + /**Gets or sets an object that indicates to render the kanban with specified columns. + * @Default {array} + */ + columns?: Array; + + /**Gets or sets an object that indicates whether to Customize the card based on the Mapping Fields. + * @Default {Object} + */ + cardSettings?: CardSettings; + + /**Gets or sets a value that indicates to render the kanban with custom theme. + * @Default {null} + */ + cssClass?: string; + + /**Gets or sets the data to render the kanban with card. + * @Default {Object} + */ + dataSource?: any; + + /**Align content in the kanban control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**To show Total count of cards in each column + * @Default {true} + */ + enableTotalCount?: boolean; + + /**Gets or sets a value that indicates whether to enablehover support for performing card hover actions. + * @Default {true} + */ + enableHover?: boolean; + + /**Get or sets an object that indicates whether to customize the editing behavior of the kanban. + * @Default {Object} + */ + editSettings?: EditSettings; + + /**To customize field mappings for card , editing title and control key parameters + * @Default {Object} + */ + fields?: Fields; + + /**To map datasource field for column values mapping + * @Default {null} + */ + keyField?: string; + + /**Gets or sets a value that indicates whether the kanban design has be to made responsive. + * @Default {false} + */ + isResponsive?: boolean; + + /**Gets or sets a value that indicates whether to set the minimum width of the responsive kanban while isResponsive property is true and enableResponsiveRow property is set as false. + * @Default {null} + */ + minWidth?: number; + + /**To customize the filtering behavior based on queries given. + * @Default {array} + */ + filterSettings?: Array; + + /**The primarykey field is get as property of kanban. And this will used for Drag and drop and editing mainly + * @Default {null} + */ + primaryKeyField?: string; + + /**ej Query to query database of kanban. + * @Default {Object} + */ + query?: any; + + /**To change the key in keyboard interaction to kanban control. + * @Default {Object} + */ + keySettings?: KeySettings; + + /**Gets or sets an object that indicates whether to customize the scrolling behavior of the kanban. + * @Default {Object} + */ + scrollSettings?: any; + + /**To customize the searching behavior of the kanban. + * @Default {Object} + */ + searchSettings?: SearchSettings; + + /**To allow customize selection type. Accepting types are "single" and "multiple". + * @Default {ej.Kanban.SelectionType.Single} + */ + selectionType?: ej.Kanban.SelectionType|string; + + /**Gets or sets an object that indicates to managing the collection of stacked header rows for the kanban. + * @Default {Array} + */ + stackedHeaderRows?: Array; + + /**The tooltip allows to display card details in a tooltip while hovering on it. + */ + tooltipSettings?: TooltipSettings; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Triggered for every kanban action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**tiggered for every kanban action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered for every kanban action server failure event.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Triggered before the task is going to be edited.*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered before the task is going to be added*/ + beginAdd? (e: BeginAddEventArgs): void; + + /**triggered before the card is going to be selecting.*/ + beforeCardSelect? (e: BeforeCardSelectEventArgs): void; + + /**Trigger after the card is clicked.*/ + cardClick? (e: CardClickEventArgs): void; + + /**Triggered when the card is being dragged.*/ + cardDrag? (e: CardDragEventArgs): void; + + /**Triggered when card dragging start.*/ + cardDragStart? (e: CardDragStartEventArgs): void; + + /**triggered when card dragging stops.*/ + cardDragStop? (e: CardDragStopEventArgs): void; + + /**Triggered when the card is Drop.*/ + cardDrop? (e: CardDropEventArgs): void; + + /**Triggered after the card is select.*/ + cardSelect? (e: CardSelectEventArgs): void; + + /**Triggered when card is double clicked.*/ + cardDoubleClick? (e: CardDoubleClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the kanban model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current action event type. + */ + originalEventType?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the card object (JSON). + */ + data?: any; + + /**Returns current filtering object field name. + */ + currentFilteringobject?: any; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns kanban element. + */ + target?: any; + + /**Returns the card object (JSON). + */ + data?: any; + + /**Returns the selectedRow index. + */ + selectedRow?: number; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface ActionFailureEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the error return by server. + */ + error?: any; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns kanban element. + */ + target?: any; + + /**Returns the card object (JSON). + */ + data?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns beginedit data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeginAddEventArgs { + + /**Returns the kanban model. + */ + model?: any; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns beginAdd data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeCardSelectEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the select cell index value. + */ + cellIndex?: number; + + /**Returns the select card index value. + */ + cardIndex?: number; + + /**Returns the select cell element + */ + currentCell?: any; + + /**Returns the previously select the card element + */ + previousCard?: any; + + /**Returns the previously select card indexes + */ + previousRowcellindex?: Array; + + /**Returns the Target item. + */ + Target?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns select card data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the current card to the kanban. + */ + currentCard?: string; + + /**Returns kanban element. + */ + target?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns the Header text of the column corresponding to the selected card. + */ + columnName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDragEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns drag data. + */ + data?: any; + + /**Returns drag start element. + */ + dragtarget?: any; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDragStartEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns carddragstart data. + */ + data?: any; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns drag start element. + */ + dragtarget?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDragStopEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns drag stop element. + */ + droptarget?: any; + + /**Returns dragg stop data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDropEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns dragged element. + */ + draggedElement?: any; + + /**Returns dragged data. + */ + data?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns drop element. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardSelectEventArgs { + + /**Returns the select cell index value. + */ + cellIndex?: number; + + /**Returns the select card index value. + */ + cardIndex?: number; + + /**Returns the select cell element + */ + currentCell?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the previously select the card element + */ + previousCard?: any; + + /**Returns the previously select card indexes + */ + previousRowcellindex?: Array; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the kanban model. + */ + model?: any; + + /**Returns select card data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CardDoubleClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current card object (JSON). + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface SwimlaneSettings { + + /**To enable or disable items count in swimlane + * @Default {true} + */ + showCount?: boolean; +} + +export interface ContextMenuSettingsCustomMenuItems { + + /**Sets context menu to target element. + * @Default {ej.Kanban.Target.All} + */ + target?: ej.Kanban.Target|string; + + /**Gets the name to custom menu. + * @Default {null} + */ + text?: string; + + /**Gets the template to render custom menu. + * @Default {null} + */ + template?: string; +} + +export interface ContextMenuSettings { + + /**To enable Context menu , All default context menu will show. + * @Default {false} + */ + enable?: boolean; + + /**Gets or sets a value that indicates the list of items needs to be diable from default context menu + * @Default {array} + */ + disableDefaultItems?: Array; + + /**Gets or sets a value that indicates whether to add custom contextMenu items + * @Default {array} + */ + customMenuItems?: Array; +} + +export interface ColumnsConstraints { + + /**It is used to specify the type whether the constraints based on column or swimlane. + * @Default {null} + */ + type?: string; + + /**It is used to specify the minimum amount of card in particular column cell or swimlane cell can hold. + * @Default {null} + */ + min?: number; + + /**It is used to specify the maximum amount of card in particular column cell or swimlane cell can hold. + * @Default {null} + */ + max?: number; +} + +export interface Columns { + + /**Gets or sets an object that indicates to render the kanban with specified columns headertext. + * @Default {null} + */ + headerText?: string; + + /**Gets or sets an object that indicates to render the kanban with specified columns key. + * @Default {null} + */ + key?: string|number; + + /**To set column collape or expand state + * @Default {false} + */ + isCollapsed?: boolean; + + /**To customize the column constraints whether the constraints contains minimum limit or maximum limit or both. + * @Default {object} + */ + constraints?: ColumnsConstraints; + + /**Gets or sets a value that indicates to add the template within the header element. + * @Default {null} + */ + headerTemplate?: string; + + /**Gets or sets an object that indicates to render the kanban with specified columns width. + * @Default {null} + */ + width?: string|number; + + /**Gets or sets an object that indicates to render the kanban with specified columns visible. + * @Default {true} + */ + visible?: boolean; +} + +export interface CardSettings { + + /**Gets or sets a value that indicates to add the template of card . + * @Default {null} + */ + template?: string; + + /**To customize the card bordercolor based on assinged task. Colors and corresponding values defined here will be mapped with colorField mapped data source column. + * @Default {Object} + */ + colorMapping?: any; +} + +export interface EditSettingsEditItems { + + /**It is used to map editing field in the card. + * @Default {null} + */ + field?: string; + + /**It is used to set the particular editType in the card for editing. + * @Default {ej.Kanban.EditingType.String} + */ + editType?: ej.Kanban.EditingType|string; + + /**Gets or sets a value that indicates to define constraints for saving data to the database. + * @Default {Object} + */ + validationRules?: any; + + /**It is used to set the particular editparams in the card for editing. + * @Default {Object} + */ + editParams?: any; + + /**It is used to specify defaultValue in the card. + * @Default {null} + */ + defaultValue?: string|number; +} + +export interface EditSettings { + + /**Gets or sets a value that indicates whether to enable the editing action in cards of kanban. + * @Default {false} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable the adding action in cards behavior on kanban. + * @Default {false} + */ + allowAdding?: boolean; + + /**This specifies the id of the template.which is require to be edited using the Dialog Box + * @Default {null} + */ + dialogTemplate?: string; + + /**Get or sets an object that indicates whether to customize the editMode of the kanban. + * @Default {ej.Kanban.EditMode.Dialog} + */ + editMode?: ej.Kanban.EditMode|string; + + /**Get or sets an object that indicates whether to customize the editing fields of kanban card. + * @Default {Array} + */ + editItems?: Array; +} + +export interface Fields { + + /**The primarykey field is get as property of kanban. And this will used for Drag and drop and editing mainly. + * @Default {null} + */ + primaryKey?: string; + + /**To enable swimlane grouping based on the given key field. + * @Default {null} + */ + swimlaneKey?: string; + + /**Priority field has been mapped data source field to maintain card priority + * @Default {null} + */ + priority?: string; + + /**ContentField has been Mapped into card text. + * @Default {null} + */ + content?: string; + + /**TagField has been Mapped into card tag. + * @Default {null} + */ + tag?: string; + + /**TitleField has been Mapped to field in datasource for title content. If titlefield specified , card expand/collapse will be enabled with header and content section + * @Default {null} + */ + title?: string; + + /**To customize the card has been Mapped into card colorfield. + * @Default {null} + */ + color?: string; + + /**ImageUrlField has been Mapped into card image. + * @Default {null} + */ + imageUrl?: string; +} + +export interface FilterSettings { + + /**Gets or sets an object of display name to filter queries. + * @Default {null} + */ + text?: string; + + /**Gets or sets an object that Queries to perform filtering + * @Default {Object} + */ + query?: any; + + /**Gets or sets an object of tooltip to filter buttons. + * @Default {null} + */ + description?: string; +} + +export interface KeySettings { + + /**To specify the focus in kanban control. + * @Default {Object} + */ + focus?: any; + + /**To specify the key value to insert the card. + * @Default {null} + */ + insertCard?: string; + + /**To specify the key value to delete the card. + * @Default {null} + */ + deleteCard?: string; + + /**TTo specify the key value to edit the card. + * @Default {null} + */ + editCard?: string; + + /**TTo specify the key value to save request. + * @Default {null} + */ + saveRequest?: string; + + /**To specify the key value to cancel request. + * @Default {null} + */ + cancelRequest?: string; + + /**To specify the key value to first card selection. + * @Default {null} + */ + firstCardSelection?: string; + + /**To specify the key value to last card selection. + * @Default {null} + */ + lastCardSelection?: string; + + /**To specify the key value to upArrow. + * @Default {null} + */ + upArrow?: string; + + /**To specify the key value to downArrow. + * @Default {null} + */ + downArrow?: string; + + /**To specify the key value to rightArrow. + * @Default {null} + */ + rightArrow?: string; + + /**To specify the key value to leftArrow. + * @Default {null} + */ + leftArrow?: string; + + /**To specify the key value to swimlane expand all. + * @Default {null} + */ + swimlaneExpandAll?: string; + + /**To specify the key value to swimlane collapse all. + * @Default {null} + */ + swimlaneCollapseAll?: string; + + /**To specify the key value to selected group expand. + * @Default {null} + */ + selectedGroupExpand?: string; + + /**To specify the key value to selected group collapse. + * @Default {null} + */ + selectedGroupCollapse?: string; + + /**To specify the key value to selected column collapse. + * @Default {null} + */ + selectedColumnCollapse?: string; + + /**To specify the key value to selected column expand. + * @Default {null} + */ + selectedColumnExpand?: string; + + /**To specify the key value to multi selection by up arrow. + * @Default {null} + */ + multiSelectionByUpArrow?: string; + + /**To specify the key value to multi selection by left arrow. + * @Default {null} + */ + multiSelectionByLeftArrow?: string; + + /**To specify the key value to multi selection by right arrow. + * @Default {null} + */ + multiSelectionByRightArrow?: string; +} + +export interface SearchSettings { + + /**To customize the fields the searching operation can be perform. + * @Default {Array} + */ + fields?: Array; + + /**To customize the searching string. + * @Default {null} + */ + key?: string; + + /**To customize the operator based on searching. + * @Default {null} + */ + operator?: string; + + /**To customize the ignorecase based on searching. + * @Default {true} + */ + ignoreCase?: boolean; +} + +export interface StackedHeaderRowsStackedHeaderColumns { + + /**Gets or sets a value that indicates the headerText for the particular stacked header column. + * @Default {null} + */ + headerText?: string; + + /**Gets or sets a value that indicates the column for the particular stacked header column. + * @Default {null} + */ + column?: string; +} + +export interface StackedHeaderRows { + + /**Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows. + * @Default {Array} + */ + stackedHeaderColumns?: Array; +} + +export interface TooltipSettings { + + /**To enable or disable the tooltip display. + * @Default {false} + */ + enable?: boolean; + + /**To customize the tooltip display based on your requirements. + * @Default {null} + */ + template?: string; +} + +enum Target{ + + ///Sets context menu to kanban header + Header, + + ///Sets context menu to kanban content + Content, + + ///Sets context menu to kanban + All +} + + +enum EditMode{ + + ///Creates kanban with editMode as Dialog + Dialog, + + ///Creates kanban with editMode as DialogTemplate + DialogTemplate +} + + +enum EditingType{ + + ///Allows to set edit type as string edit type + String, + + ///Allows to set edit type as numeric edit type + Numeric, + + ///Allows to set edit type as drop down edit type + Dropdown, + + ///Allows to set edit type as date picker edit type + DatePicker, + + ///Allows to set edit type as date time picker edit type + DateTimePicker, + + ///Allows to set edit type as text area edit type + TextArea, + + ///Allows to set edit type as RTE edit type + RTE +} + + +enum SelectionType{ + + ///Support for Single selection in Kanban + Single, + + ///Support for multiple selections in Kanban + Multiple +} + +} + +class Rotator extends ej.Widget { + static fn: Rotator; + constructor(element: JQuery, options?: Rotator.Model); + constructor(element: Element, options?: Rotator.Model); + model:Rotator.Model; + defaults:Rotator.Model; + + /** Disables the Rotator control. + * @returns {void} + */ + disable(): void; + + /** Enables the Rotator control. + * @returns {void} + */ + enable(): void; + + /** This method is used to get the current slide index. + * @returns {number} + */ + getIndex(): number; + + /** This method is used to move a slide to the specified index. + * @param {number} index of an slide + * @returns {void} + */ + gotoIndex(index: number): void; + + /** This method is used to pause autoplay. + * @returns {void} + */ + pause(): void; + + /** This method is used to move slides continuously (or start autoplay) in the specified autoplay direction. + * @returns {void} + */ + play(): void; + + /** This method is used to move to the next slide from the current slide. If the current slide is the last slide, then the first slide will be treated as the next slide. + * @returns {void} + */ + slideNext(): void; + + /** This method is used to move to the previous slide from the current slide. If the current slide is the first slide, then the last slide will be treated as the previous slide. + * @returns {void} + */ + slidePrevious(): void; +} +export module Rotator{ + +export interface Model { + + /**Turns on keyboard interaction with the Rotator items. You must set this property to true to access the following keyboard shortcuts: + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Sets the animationSpeed of slide transition. + * @Default {600} + */ + animationSpeed?: string|number; + + /**Specifies the animationType type for the Rotator Item. animationType options include slide, fastSlide, slowSlide, and other custom easing animationTypes. + * @Default {slide} + */ + animationType?: string; + + /**Enables the circular mode item rotation. + * @Default {true} + */ + circularMode?: boolean; + + /**Specify the CSS class to Rotator to achieve custom theme. + */ + cssClass?: string; + + /**Specify the list of data which contains a set of data fields. Each data value is used to render an item for the Rotator. + * @Default {null} + */ + dataSource?: any; + + /**Sets the delay between the Rotator Items move after the slide transition. + * @Default {500} + */ + delay?: number; + + /**Specifies the number of Rotator Items to be displayed. + * @Default {1} + */ + displayItemsCount?: string|number; + + /**Rotates the Rotator Items continuously without user interference. + * @Default {false} + */ + enableAutoPlay?: boolean; + + /**Enables or disables the Rotator control. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies right to left transition of slides. + * @Default {false} + */ + enableRTL?: boolean; + + /**Defines mapping fields for the data items of the Rotator. + * @Default {null} + */ + fields?: Fields; + + /**Sets the space between the Rotator Items. + */ + frameSpace?: string|number; + + /**Resizes the Rotator when the browser is resized. + * @Default {false} + */ + isResponsive?: boolean; + + /**Specifies the number of Rotator Items to navigate on a single click (next/previous/play buttons). The navigateSteps property value must be less than or equal to the displayItemsCount property value. + * @Default {1} + */ + navigateSteps?: string|number; + + /**Specifies the orientation for the Rotator control, that is, whether it must be rendered horizontally or vertically. See Orientation + * @Default {ej.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Specifies the position of the showPager in the Rotator Item. See PagerPosition + * @Default {outside} + */ + pagerPosition?: string|ej.Rotator.PagerPosition; + + /**Retrieves data from remote data. This property is applicable only when a remote data source is used. + * @Default {null} + */ + query?: string; + + /**If the Rotator Item is an image, you can specify a caption for the Rotator Item. The caption text for each Rotator Item must be set by using the title attribute of the respective tag. The caption cannot be displayed if multiple Rotator Items are present. + * @Default {false} + */ + showCaption?: boolean; + + /**Turns on or off the slide buttons (next and previous) in the Rotator Items. Slide buttons are used to navigate the Rotator Items. + * @Default {true} + */ + showNavigateButton?: boolean; + + /**Turns on or off the pager support in the Rotator control. The Pager is used to navigate the Rotator Items. + * @Default {true} + */ + showPager?: boolean; + + /**Enable play / pause button on rotator. + * @Default {false} + */ + showPlayButton?: boolean; + + /**Turns on or off thumbnail support in the Rotator control. Thumbnail is used to navigate between slides. Thumbnail supports only single slide transition You must specify the source for thumbnail elements through the thumbnailSourceID property. + * @Default {false} + */ + showThumbnail?: boolean; + + /**Sets the height of a Rotator Item. + */ + slideHeight?: string|number; + + /**Sets the width of a Rotator Item. + */ + slideWidth?: string|number; + + /**Sets the index of the slide that must be displayed first. + * @Default {0} + */ + startIndex?: string|number; + + /**Pause the auto play while hover on the rotator content. + * @Default {false} + */ + stopOnHover?: boolean; + + /**Specifies the source for thumbnail elements. + * @Default {null} + */ + thumbnailSourceID?: any; + + /**This event is fired when the Rotator slides are changed.*/ + change? (e: ChangeEventArgs): void; + + /**This event is fired when the Rotator control is initialized.*/ + create? (e: CreateEventArgs): void; + + /**This event is fired when the Rotator control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**This event is fired when a pager is clicked.*/ + pagerClick? (e: PagerClickEventArgs): void; + + /**This event is fired when enableAutoPlay is started.*/ + start? (e: StartEventArgs): void; + + /**This event is fired when autoplay is stopped or paused.*/ + stop? (e: StopEventArgs): void; + + /**This event is fired when a thumbnail pager is clicked.*/ + thumbItemClick? (e: ThumbItemClickEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface PagerClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface StartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface StopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface ThumbItemClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the rotator model + */ + model?: ej.Rotator.Model; + + /**returns the name of the event + */ + type?: string; + + /**the current rotator id. + */ + itemId?: string; + + /**returns the current slide index. + */ + activeItemIndex?: number; +} + +export interface Fields { + + /**Specifies a link for the image. + */ + linkAttribute?: string; + + /**Specifies where to open a given link. + */ + targetAttribute?: string; + + /**Specifies a caption for the image. + */ + text?: string; + + /**Specifies a caption for the thumbnail image. + */ + thumbnailText?: string; + + /**Specifies the URL for an thumbnail image. + */ + thumbnailUrl?: string; + + /**Specifies the URL for an image. + */ + url?: string; +} + +enum PagerPosition{ + + ///string + BottomLeft, + + ///string + BottomRight, + + ///string + Outside, + + ///string + TopCenter, + + ///string + TopLeft, + + ///string + TopRight +} + +} + +class RTE extends ej.Widget { + static fn: RTE; + constructor(element: JQuery, options?: RTE.Model); + constructor(element: Element, options?: RTE.Model); + model:RTE.Model; + defaults:RTE.Model; + + /** Returns the range object. + * @returns {void} + */ + createRange(): void; + + /** Disables the RTE control. + * @returns {void} + */ + disable(): void; + + /** Disables the corresponding tool in the RTE ToolBar. + * @returns {void} + */ + disableToolbarItem(): void; + + /** Enables the RTE control. + * @returns {void} + */ + enable(): void; + + /** Enables the corresponding tool in the toolbar when the tool is disabled. + * @returns {void} + */ + enableToolbarItem(): void; + + /** Performs the action value based on the given command. + * @returns {void} + */ + executeCommand(): void; + + /** Focuses the RTE control. + * @returns {void} + */ + focus(): void; + + /** Gets the command status of the selected text based on the given comment in the RTE control. + * @returns {void} + */ + getCommandStatus(): void; + + /** Gets the HTML string from the RTE control. + * @returns {void} + */ + getDocument(): void; + + /** Gets the HTML string from the RTE control. + * @returns {void} + */ + getHtml(): void; + + /** Gets the selected html string from the RTE control. + * @returns {void} + */ + getSelectedHtml(): void; + + /** Gets the content as string from the RTE control. + * @returns {void} + */ + getText(): void; + + /** Hides the RTE control. + * @returns {void} + */ + hide(): void; + + /** Inserts new item to the target contextmenu node. + * @returns {void} + */ + insertMenuOption(): void; + + /** This method helps to insert/paste the content at the current cursor (caret) position or the selected content to be replaced with our text by passing the value as parameter to the pasteContent method in the Editor. + * @returns {void} + */ + pasteContent(): void; + + /** Refreshes the RTE control. + * @returns {void} + */ + refresh(): void; + + /** Removes the target menu item from the RTE contextmenu. + * @returns {void} + */ + removeMenuOption (): void; + + /** Removes the given tool from the RTE Toolbar. + * @returns {void} + */ + removeToolbarItem(): void; + + /** Selects all the contents within the RTE. + * @returns {void} + */ + selectAll(): void; + + /** Selects the contents in the given range. + * @returns {void} + */ + selectRange(): void; + + /** Sets the color picker model type rendered initially in the RTE control. + * @returns {void} + */ + setColorPickerType(): void; + + /** Sets the HTML string from the RTE control. + * @returns {void} + */ + setHtml(): void; + + /** Displays the RTE control. + * @returns {void} + */ + show(): void; +} +export module RTE{ + +export interface Model { + + /**Enables/disables the editing of the content. + * @Default {True} + */ + allowEditing?: boolean; + + /**RTE control can be accessed through the keyboard shortcut keys. + * @Default {True} + */ + allowKeyboardNavigation?: boolean; + + /**When the property is set to true, it focuses the RTE at the time of rendering. + * @Default {false} + */ + autoFocus?: boolean; + + /**Based on the content size, its height is adjusted instead of adding the scrollbar. + * @Default {false} + */ + autoHeight?: boolean; + + /**Sets the colorCode to display the color of the fontColor and backgroundColor in the font tools of the RTE. + * @Default {[000000, FFFFFF, C4C4C4, ADADAD, 595959, 262626, 4f81bd, dbe5f1, b8cce4, 95b3d7, 366092, 244061, c0504d, f2dcdb, e5b9b7, d99694, 953734,632423, 9bbb59, ebf1dd, d7e3bc, c3d69b, 76923c, 4f6128, 8064a2, e5e0ec, ccc1d9, b2a2c7, 5f497a, 3f3151, f79646, fdeada, fbd5b5, fac08f,e36c09, 974806]} + */ + colorCode?: any; + + /**The number of columns given are rendered in the color palate popup. + * @Default {6} + */ + colorPaletteColumns?: number; + + /**The number of rows given are rendered in the color palate popup. + * @Default {6} + */ + colorPaletteRows?: number; + + /**Sets the root class for the RTE theme. This cssClass API helps the usage of custom skinning option for the RTE control by including this root class in CSS. + */ + cssClass?: string; + + /**Enables/disables the RTE control’s accessibility or interaction. + * @Default {True} + */ + enabled?: boolean; + + /**When the property is set to true, it returns the encrypted text. + * @Default {false} + */ + enableHtmlEncode?: boolean; + + /**Maintain the values of the RTE after page reload. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Shows the resize icon and enables the resize option in the RTE. + * @Default {True} + */ + enableResize?: boolean; + + /**Shows the RTE in the RTL direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Formats the contents based on the XHTML rules. + * @Default {false} + */ + enableXHTML?: boolean; + + /**Enables the tab key action with the RichTextEditor content. + * @Default {True} + */ + enableTabKeyNavigation?: boolean; + + /**Load the external CSS file inside Iframe. + * @Default {null} + */ + externalCSS?: string; + + /**This API allows to enable the file browser support in the RTE control to browse, create, delete and upload the files in the specified current directory. + * @Default {null} + */ + fileBrowser?: FileBrowser; + + /**Sets the fontName in the RTE. + * @Default {{text: Segoe UI, value: Segoe UI },{text: Arial, value: Arial,Helvetica,sans-serif },{text: Courier New, value: Courier New,Courier,Monospace },{text: Georgia, value: Georgia,serif },{text: Impact, value: Impact,Charcoal,sans-serif },{text: Lucida Console, value: Lucida Console,Monaco,Monospace },{text: Tahoma, value: Tahoma,Geneva,sans-serif },{text: Times New Roman, value: Times New Roman },{text: Trebuchet MS, value: Trebuchet MS,Helvetica,sans-serif },{text: Verdana, value: Verdana,Geneva,sans-serif}} + */ + fontName?: any; + + /**Sets the fontSize in the RTE. + * @Default {{ text: 1, value: 1 },{ text: 2 (10pt), value: 2 },{ text: 3 (12pt), value: 3 },{ text: 4 (14pt), value: 4 },{ text: 5 (18pt), value: 5 },{ text: 6 (24pt), value: 6 },{ text: 7 (36pt), value: 7 }} + */ + fontSize?: any; + + /**Sets the format in the RTE. + * @Default {{ text: Paragraph, value: <p>, spriteCssClass: e-paragraph },{ text: Quotation, value: <blockquote>, spriteCssClass: e-quotation },{ text: Heading 1, value: <h1>, spriteCssClass: e-h1 },{ text: Heading 2, value: <h2>, spriteCssClass: e-h2 },{ text: Heading 3, value: <h3>, spriteCssClass: e-h3 },{ text: Heading 4, value: <h4>, spriteCssClass: e-h4 },{ text: Heading 5, value: <h5>, spriteCssClass: e-h5 },{ text: Heading 6, value: <h6>, spriteCssClass: e-h6}} + */ + format?: string; + + /**Defines the height of the RTE textbox. + * @Default {370} + */ + height?: string|number; + + /**Specifies the HTML Attributes of the ejRTE. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the given attributes to the iframe body element. + * @Default {{}} + */ + iframeAttributes?: any; + + /**This API allows the image browser to support in the RTE control to browse, create, delete, and upload the image files to the specified current directory. + * @Default {null} + */ + imageBrowser?: ImageBrowser; + + /**Enables/disables responsive support for the RTE control toolbar items during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /**Sets the culture in the RTE when you set the localization values are needs to be assigned to the corresponding text as follows. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum height for the RTE outer wrapper element. + * @Default {null} + */ + maxHeight?: string|number; + + /**Sets the maximum length for the RTE outer wrapper element. + * @Default {7000} + */ + maxLength?: number; + + /**Sets the maximum width for the RTE outer wrapper element. + * @Default {null} + */ + maxWidth?: string|number; + + /**Sets the minimum height for the RTE outer wrapper element. + * @Default {280} + */ + minHeight?: string|number; + + /**Sets the minimum width for the RTE outer wrapper element. + * @Default {400} + */ + minWidth?: string|number; + + /**Sets the name in the RTE. When the name value is not initialized, the ID value is assigned to the name. + */ + name?: string; + + /**Shows ClearAll icon in the RTE footer. + * @Default {false} + */ + showClearAll?: boolean; + + /**Shows the clear format in the RTE footer. + * @Default {true} + */ + showClearFormat?: boolean; + + /**Shows the Custom Table in the RTE. + * @Default {True} + */ + showCustomTable?: boolean; + + /**Shows custom contextmenu with the RTE. + * @Default {True} + */ + showContextMenu?: boolean; + + /**This API is used to set the default dimensions for the image and video. When this property is set to true, the image and video dialog displays the dimension option. + * @Default {false} + */ + showDimensions?: boolean; + + /**Shows the FontOption in the RTE. + * @Default {True} + */ + showFontOption?: boolean; + + /**Shows footer in the RTE. When the footer is enabled, it displays the html tag, word Count, character count, clear format, resize icon and clear all the content icons, by default. + * @Default {false} + */ + showFooter?: boolean; + + /**Shows the HtmlSource in the RTE footer. + * @Default {false} + */ + showHtmlSource?: boolean; + + /**When the cursor is placed or when the text is selected in the RTE, it displays the tag info in the footer. + * @Default {True} + */ + showHtmlTagInfo?: boolean; + + /**Shows the toolbar in the RTE. + * @Default {True} + */ + showToolbar?: boolean; + + /**Counts the total characters and displays it in the RTE footer. + * @Default {True} + */ + showCharCount?: boolean; + + /**Counts the total words and displays it in the RTE footer. + * @Default {True} + */ + showWordCount?: boolean; + + /**The given number of columns render the insert table pop. + * @Default {10} + */ + tableColumns?: number; + + /**The given number of rows render the insert table pop. + * @Default {8} + */ + tableRows?: number; + + /**Sets the tools in the RTE and gets the inner display order of the corresponding group element. Tools are dependent on the toolsList property. + * @Default {formatStyle: [format],style: [bold, italic, underline, strikethrough],alignment: [justifyLeft, justifyCenter, justifyRight, justifyFull],lists: [unorderedList, orderedList],indenting: [outdent, indent],doAction: [undo, redo],links: [createLink,removeLink],images: [image],media: [video],tables: [createTable, addRowAbove, addRowBelow, addColumnLeft, addColumnRight, deleteRow, deleteColumn, deleteTable]],view:[“fullScreen”,zoomIn,zoomOut],print:[print]} + */ + tools?: Tools; + + /**Specifies the list of groups and order of those groups displayed in the RTE toolbar. The toolsList property is used to get the root group order and tools property is used to get the inner order of the corresponding groups displayed. When the value is not specified, it gets its default display order and tools. + * @Default {[formatStyle, font, style, effects, alignment, lists, indenting, clipboard, doAction, clear, links, images, media, tables, casing,view, customTools,print,edit]} + */ + toolsList?: Array; + + /**Gets the undo stack limit. + * @Default {50} + */ + undoStackLimit?: number; + + /**The given string value is displayed in the editable area. + * @Default {null} + */ + value?: string; + + /**Sets the jquery validation rules to the Rich Text Editor. + * @Default {null} + */ + validationRules?: any; + + /**Sets the jquery validation error message to the Rich Text Editor. + * @Default {null} + */ + validationMessage?: any; + + /**Defines the width of the RTE textbox. + * @Default {786} + */ + width?: string|number; + + /**Increases and decreases the contents zoom range in percentage + * @Default {0.05} + */ + zoomStep?: string|number; + + /**Fires when changed successfully.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the RTE is created successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires when mouse click on menu items.*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Fires before the RTE is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the commands are executed successfully.*/ + execute? (e: ExecuteEventArgs): void; + + /**Fires when the keydown action is successful.*/ + keydown? (e: KeydownEventArgs): void; + + /**Fires when the keyup action is successful.*/ + keyup? (e: KeyupEventArgs): void; + + /**Fires before the RTE Edit area is rendered and after the toolbar is rendered.*/ + preRender? (e: PreRenderEventArgs): void; +} + +export interface ChangeEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the RTE model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface ContextMenuClickEventArgs { + + /**returns clicked menu item text. + */ + text?: string; + + /**returns clicked menu item element. + */ + element?: any; + + /**returns the selected item. + */ + selectedItem?: number; +} + +export interface DestroyEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface ExecuteEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface KeydownEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface KeyupEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface PreRenderEventArgs { + + /**When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /**Returns the RTE model + */ + model?: any; + + /**Returns the name of the event + */ + type?: string; +} + +export interface FileBrowser { + + /**This API is used to receive the server-side handler for file related operations. + */ + ajaxAction?: string; + + /**Specifies the file type extension shown in the file browser window. + */ + extensionAllow?: string; + + /**Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected files to the current directory. + */ + filePath?: string; +} + +export interface ImageBrowser { + + /**This API is used to receive the server-side handler for the file related operations. + */ + ajaxAction?: string; + + /**Specifies the file type extension shown in the image browser window. + */ + extensionAllow?: string; + + /**Specifies the directory to perform operations like create, delete and rename folder and files, and upload the selected images to the current directory. + */ + filePath?: string; +} + +export interface ToolsCustomOrderedList { + + /**Specifies the name for customOrderedList item. + */ + name?: string; + + /**Specifies the title for customOrderedList item. + */ + tooltip?: string; + + /**Specifies the styles for customOrderedList item. + */ + css?: string; + + /**Specifies the text for customOrderedList item. + */ + text?: string; + + /**Specifies the list style for customOrderedList item. + */ + listStyle?: string; + + /**Specifies the image for customOrderedList item. + */ + listImage?: string; +} + +export interface ToolsCustomUnorderedList { + + /**Specifies the name for customUnorderedList item. + */ + name?: string; + + /**Specifies the title for customUnorderedList item. + */ + tooltip?: string; + + /**Specifies the styles for customUnorderedList item. + */ + css?: string; + + /**Specifies the text for customUnorderedList item. + */ + text?: string; + + /**Specifies the list style for customUnorderedList item. + */ + listStyle?: string; + + /**Specifies the image for customUnorderedList item. + */ + listImage?: string; +} + +export interface Tools { + + /**Specifies the alignment tools and the display order of this tool in the RTE toolbar. + */ + alignment?: any; + + /**Specifies the casing tools and the display order of this tool in the RTE toolbar. + */ + casing?: Array; + + /**Specifies the clear tools and the display order of this tool in the RTE toolbar. + */ + clear?: Array; + + /**Specifies the clipboard tools and the display order of this tool in the RTE toolbar. + */ + clipboard?: Array; + + /**Specifies the edit tools and the displays tool in the RTE toolbar. + */ + edit?: Array; + + /**Specifies the doAction tools and the display order of this tool in the RTE toolbar. + */ + doAction?: Array; + + /**Specifies the effect of tools and the display order of this tool in RTE toolbar. + */ + effects?: Array; + + /**Specifies the font tools and the display order of this tool in the RTE toolbar. + */ + font?: Array; + + /**Specifies the formatStyle tools and the display order of this tool in the RTE toolbar. + */ + formatStyle?: Array; + + /**Specifies the image tools and the display order of this tool in the RTE toolbar. + */ + images?: Array; + + /**Specifies the indent tools and the display order of this tool in the RTE toolbar. + */ + indenting?: Array; + + /**Specifies the link tools and the display order of this tool in the RTE toolbar. + */ + links?: Array; + + /**Specifies the list tools and the display order of this tool in the RTE toolbar. + */ + lists?: Array; + + /**Specifies the media tools and the display order of this tool in the RTE toolbar. + */ + media?: Array; + + /**Specifies the style tools and the display order of this tool in the RTE toolbar. + */ + style?: Array; + + /**Specifies the table tools and the display order of this tool in the RTE toolbar. + */ + tables?: Array; + + /**Specifies the view tools and the display order of this tool in the RTE toolbar. + */ + view?: Array; + + /**Specifies the print tools and the display order of this tool in the RTE toolbar. + */ + print?: Array; + + /**Specifies the customOrderedList tools and the display order of this tool in the RTE toolbar. + */ + customOrderedList?: Array; + + /**Specifies the customUnOrderedList tools and the display order of this tool in the RTE toolbar. + */ + customUnorderedList?: Array; +} +} + +class Slider extends ej.Widget { + static fn: Slider; + constructor(element: JQuery, options?: Slider.Model); + constructor(element: Element, options?: Slider.Model); + model:Slider.Model; + defaults:Slider.Model; + + /** To disable the slider + * @returns {void} + */ + disable(): void; + + /** To enable the slider + * @returns {void} + */ + enable(): void; + + /** To get value from slider handle + * @returns {number} + */ + getValue(): number; + + /** To set value to slider handle + * @returns {void} + */ + setValue(): void; +} +export module Slider{ + +export interface Model { + + /**Specifies the animationSpeed of the slider. + * @Default {500} + */ + animationSpeed?: number; + + /**Specify the CSS class to slider to achieve custom theme. + */ + cssClass?: string; + + /**Specifies the animation behavior of the slider. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the state of the slider. + * @Default {true} + */ + enabled?: boolean; + + /**Specify the enablePersistence to slider to save current model value to browser cookies for state maintains + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specifies the Right to Left Direction of the slider. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the slider. + * @Default {14} + */ + height?: string; + + /**Specifies the HTML Attributes of the ejSlider. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the incremental step value of the slider. + * @Default {1} + */ + incrementStep?: number; + + /**Specifies the distance between two major (large) ticks from the scale of the slider. + * @Default {10} + */ + largeStep?: number; + + /**Specifies the ending value of the slider. + * @Default {100} + */ + maxValue?: number; + + /**Specifies the starting value of the slider. + * @Default {0} + */ + minValue?: number; + + /**Specifies the orientation of the slider. + * @Default {ej.orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Specifies the readOnly of the slider. + * @Default {false} + */ + readOnly?: boolean; + + /**Specifies the rounded corner behavior for slider. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Shows/Hide the major (large) and minor (small) ticks in the scale of the slider. + * @Default {false} + */ + showScale?: boolean; + + /**Specifies the small ticks from the scale of the slider. + * @Default {true} + */ + showSmallTicks?: boolean; + + /**Specifies the showTooltip to shows the current Slider value, while moving the Slider handle or clicking on the slider handle of the slider. + * @Default {true} + */ + showTooltip?: boolean; + + /**Specifies the sliderType of the slider. + * @Default {ej.SliderType.Default} + */ + sliderType?: ej.slider.sliderType|string; + + /**Specifies the distance between two minor (small) ticks from the scale of the slider. + * @Default {1} + */ + smallStep?: number; + + /**Specifies the value of the slider. But it's not applicable for range slider. To range slider we can use values property. + * @Default {0} + */ + value?: number; + + /**Specifies the values of the range slider. But it's not applicable for default and minRange sliders. we can use value property for default and minRange sliders. + * @Default {[minValue,maxValue]} + */ + values?: Array; + + /**Specifies the width of the slider. + * @Default {100%} + */ + width?: string; + + /**Fires once Slider control value is changed successfully.*/ + change? (e: ChangeEventArgs): void; + + /**Fires once Slider control has been created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when Slider control has been destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires once Slider control is sliding successfully.*/ + slide? (e: SlideEventArgs): void; + + /**Fires once Slider control is started successfully.*/ + start? (e: StartEventArgs): void; + + /**Fires when Slider control is stopped successfully.*/ + stop? (e: StopEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id. + */ + id?: string; + + /**returns the slider model. + */ + model?: ej.Slider.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the slider value. + */ + value?: number; + + /**returns true if event triggered by interaction else returns false. + */ + isInteraction?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface SlideEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id + */ + id?: string; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the slider value + */ + value?: number; +} + +export interface StartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id + */ + id?: string; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the slider value + */ + value?: number; +} + +export interface StopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns current handle number or index + */ + sliderIndex?: number; + + /**returns slider id + */ + id?: string; + + /**returns the slider model + */ + model?: ej.Slider.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the slider value + */ + value?: number; +} +} +module slider +{ +enum sliderType +{ +//Shows default slider +Default, +//Shows minRange slider +MinRange, +//Shows Range slider +Range, +} +} + +class SplitButton extends ej.Widget { + static fn: SplitButton; + constructor(element: JQuery, options?: SplitButton.Model); + constructor(element: Element, options?: SplitButton.Model); + model:SplitButton.Model; + defaults:SplitButton.Model; + + /** destroy the split button widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To disable the split button + * @returns {void} + */ + disable(): void; + + /** To Enable the split button + * @returns {void} + */ + enable(): void; + + /** To Hide the list content of the split button. + * @returns {void} + */ + hide(): void; + + /** To show the list content of the split button. + * @returns {void} + */ + show(): void; +} +export module SplitButton{ + +export interface Model { + + /**Specifies the arrowPosition of the Split or Dropdown Button.See arrowPosition + * @Default {ej.ArrowPosition.Right} + */ + arrowPosition?: string|ej.ArrowPosition; + + /**Specifies the buttonMode like Split or Dropdown Button.See ButtonMode + * @Default {ej.ButtonMode.Split} + */ + buttonMode?: string|ej.ButtonMode; + + /**Specifies the contentType of the Split Button.See ContentType + * @Default {ej.ContentType.TextOnly} + */ + contentType?: string|ej.ContentType; + + /**Set the root class for Split Button control theme + */ + cssClass?: string; + + /**Specifies the disabling of Split Button if enabled is set to false. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies the enableRTL property for Split Button while initialization. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the Split Button. + * @Default {“”} + */ + height?: string|number; + + /**Specifies the HTML Attributes of the Split Button. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the imagePosition of the Split Button.See imagePositions + * @Default {ej.ImagePosition.ImageRight} + */ + imagePosition?: string|ej.ImagePosition; + + /**Specifies the image content for Split Button while initialization. + */ + prefixIcon?: string; + + /**Specifies the showRoundedCorner property for Split Button while initialization. + * @Default {false} + */ + showRoundedCorner?: string; + + /**Specifies the size of the Button. See ButtonSize + * @Default {ej.ButtonSize.Normal} + */ + size?: string|ej.ButtonSize; + + /**Specifies the image content for Split Button while initialization. + */ + suffixIcon?: string; + + /**Specifies the list content for Split Button while initialization + */ + targetID?: string; + + /**Specifies the text content for Split Button while initialization. + */ + text?: string; + + /**Specifies the width of the Split Button. + * @Default {“”} + */ + width?: string|number; + + /**Fires before menu of the split button control is opened.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when Button control is clicked successfully*/ + click? (e: ClickEventArgs): void; + + /**Fires before the list content of Button control is closed*/ + close? (e: CloseEventArgs): void; + + /**Fires after Split Button control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Split Button is destroyed successfully*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when a menu item is Hovered out successfully*/ + itemMouseOut? (e: ItemMouseOutEventArgs): void; + + /**Fires when a menu item is Hovered in successfully*/ + itemMouseOver? (e: ItemMouseOverEventArgs): void; + + /**Fires when a menu item is clicked successfully*/ + itemSelected? (e: ItemSelectedEventArgs): void; + + /**Fires before the list content of Button control is opened*/ + open? (e: OpenEventArgs): void; +} + +export interface BeforeOpenEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ClickEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**return the button state + */ + status?: boolean; +} + +export interface CloseEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemMouseOutEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface ItemMouseOutEvent { + + /**return the menu item id + */ + ID?: string; + + /**return the clicked menu item text + */ + Text?: string; +} + +export interface ItemMouseOverEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the clicked menu item element + */ + element?: any; + + /**returns the event + */ + event?: any; +} + +export interface ItemMouseOverEvent { + + /**return the menu item id + */ + ID?: string; + + /**return the clicked menu item text + */ + Text?: string; +} + +export interface ItemSelectedEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the clicked menu item element + */ + element?: any; + + /**returns the selected item + */ + selectedItem?: any; + + /**return the menu id + */ + menuId?: string; + + /**return the clicked menu item text + */ + menuText?: string; +} + +export interface OpenEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the split button model + */ + model?: ej.SplitButton.Model; + + /**returns the name of the event + */ + type?: string; +} +} +enum ArrowPosition +{ +//To set Left arrowPosition of the split button +Left, +//To set Right arrowPosition of the split button +Right, +//To set Top arrowPosition of the split button +Top, +//To set Bottom arrowPosition of the split button +Bottom, +} + +class Splitter extends ej.Widget { + static fn: Splitter; + constructor(element: JQuery, options?: Splitter.Model); + constructor(element: Element, options?: Splitter.Model); + model:Splitter.Model; + defaults:Splitter.Model; + + /** To add a new pane to splitter control. + * @param {string} content of pane. + * @param {any} pane properties. + * @param {number} index of pane. + * @returns {HTMLElement} + */ + addItem(content: string, property: any, index: number): HTMLElement; + + /** To collapse the splitter control pane. + * @param {number} index number of pane. + * @returns {void} + */ + collapse(paneIndex: number): void; + + /** To expand the splitter control pane. + * @param {number} index number of pane. + * @returns {void} + */ + expand(paneIndex: number): void; + + /** To refresh the splitter control pane resizing. + * @returns {void} + */ + refresh(): void; + + /** To remove a specified pane from the splitter control. + * @param {number} index of pane. + * @returns {void} + */ + removeItem(index: number): void; +} +export module Splitter{ + +export interface Model { + + /**Turns on keyboard interaction with the Splitter panes. You must set this property to true to access the keyboard shortcuts of ejSplitter. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Specify animation speed for the Splitter pane movement, while collapsing and expanding. + * @Default {300} + */ + animationSpeed?: number; + + /**Specify the CSS class to splitter control to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Specifies the animation behavior of the splitter. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the splitter control to be displayed in right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specify height for splitter control. + * @Default {null} + */ + height?: string; + + /**Specifies the HTML Attributes of the Splitter. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specify window resizing behavior for splitter control. + * @Default {false} + */ + isResponsive?: boolean; + + /**Specify the orientation for spliter control. See orientation + * @Default {ej.orientation.Horizontal or “horizontal”} + */ + orientation?: ej.Orientation|string; + + /**Specify properties for each pane like paneSize, minSize, maxSize, collapsible, resizable. + * @Default {[]} + */ + properties?: Array; + + /**Specify width for splitter control. + * @Default {null} + */ + width?: string; + + /**Fires before expanding / collapsing the split pane of splitter control.*/ + beforeExpandCollapse? (e: BeforeExpandCollapseEventArgs): void; + + /**Fires when splitter control pane has been created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when splitter control pane has been destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when expand / collapse operation in splitter control pane has been performed successfully.*/ + expandCollapse? (e: ExpandCollapseEventArgs): void; + + /**Fires when resize in splitter control pane.*/ + resize? (e: ResizeEventArgs): void; +} + +export interface BeforeExpandCollapseEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns collapsed pane details. + */ + collapsed?: any; + + /**returns expanded pane details. + */ + expanded?: any; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the current split bar index. + */ + splitbarIndex?: number; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ExpandCollapseEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns collapsed pane details. + */ + collapsed?: any; + + /**returns expanded pane details. + */ + expanded?: any; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the current split bar index. + */ + splitbarIndex?: number; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ResizeEventArgs { + + /**if the event should be cancelled; otherwise, false. + */ + cancel?: boolean; + + /**returns previous pane details. + */ + prevPane?: any; + + /**returns next pane details. + */ + nextPane?: any; + + /**returns the splitter model. + */ + model?: ej.Splitter.Model; + + /**returns the current split bar index. + */ + splitbarIndex?: number; + + /**returns the name of the event. + */ + type?: string; +} +} + +class Tab extends ej.Widget { + static fn: Tab; + constructor(element: JQuery, options?: Tab.Model); + constructor(element: Element, options?: Tab.Model); + model:Tab.Model; + defaults:Tab.Model; + + /** Add new tab items with given name, url and given index position, if index null it’s add last item. + * @param {string} URL name / tab id. + * @param {string} Tab Display name. + * @param {number} Index position to placed , this is optional. + * @param {string} specifies cssClass, this is optional. + * @param {string} specifies id of tab, this is optional. + * @returns {void} + */ + addItem(url: string, displayLabel: string, index: number, cssClass: string, id: string): void; + + /** To disable the tab control. + * @returns {void} + */ + disable(): void; + + /** To enable the tab control. + * @returns {void} + */ + enable(): void; + + /** This function get the number of tab rendered + * @returns {number} + */ + getItemsCount(): number; + + /** This function hides the tab control. + * @returns {void} + */ + hide(): void; + + /** This function hides the specified item tab in tab control. + * @param {number} index of tab item. + * @returns {void} + */ + hideItem(index: number): void; + + /** Remove the given index tab item. + * @param {number} index of tab item. + * @returns {void} + */ + removeItem(index: number): void; + + /** This function is to show the tab control. + * @returns {void} + */ + show(): void; + + /** This function helps to show the specified hidden tab item in tab control. + * @param {number} index of tab item. + * @returns {void} + */ + showItem(index: number): void; +} +export module Tab{ + +export interface Model { + + /**Specifies the ajaxSettings option to load the content to the Tab control. + */ + ajaxSettings?: AjaxSettings; + + /**Tab items interaction with keyboard keys, like headers active navigation. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Allow to collapsing the active item, while click on the active header. + * @Default {false} + */ + collapsible?: boolean; + + /**Set the root class for Tab theme. This cssClass API helps to use custom skinning option for Tab control. + */ + cssClass?: string; + + /**Disables the given tab headers and content panels. + * @Default {[]} + */ + disabledItemIndex?: number[]; + + /**Specifies the animation behavior of the tab. + * @Default {true} + */ + enableAnimation?: boolean; + + /**When this property is set to false, it disables the tab control. + * @Default {true} + */ + enabled?: boolean; + + /**Enables the given tab headers and content panels. + * @Default {[]} + */ + enabledItemIndex?: number[]; + + /**Save current model value to browser cookies for state maintains. While refresh the Tab control page the model value apply from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Display Right to Left direction for headers and panels text of tab. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specify to enable scrolling for Tab header. + * @Default {false} + */ + enableTabScroll?: boolean; + + /**The event API to bind the action for active the tab items. + * @Default {click} + */ + events?: string; + + /**Specifies the position of Tab header as top, bottom, left or right. See below to get availanle Position + * @Default {top} + */ + headerPosition?: string | ej.Tab.Position; + + /**Set the height of the tab header element. Default this property value is null, so height take content height. + * @Default {null} + */ + headerSize?: string|number; + + /**Height set the outer panel element. Default this property value is null, so height take content height. + * @Default {null} + */ + height?: string|number; + + /**Adjust the content panel height for given option (content, auto and fill), by default panels height adjust based on the content.See below to get available HeightAdjustMode + * @Default {content} + */ + heightAdjustMode?: string | ej.Tab.HeightAdjustMode; + + /**Specifies to hide a pane of Tab control. + * @Default {[]} + */ + hiddenItemIndex?: Array; + + /**Specifies the HTML Attributes of the Tab. + * @Default {{}} + */ + htmlAttributes?: any; + + /**The idPrefix property appends the given string on the added tab item id’s in runtime. + * @Default {ej-tab-} + */ + idPrefix?: string; + + /**Specifies the Tab header in active for given index value. + * @Default {0} + */ + selectedItemIndex?: number; + + /**Display the close button for each tab items. While clicking on the close icon, particular tab item will be removed. + * @Default {false} + */ + showCloseButton?: boolean; + + /**Display the Reload button for each tab items. + * @Default {false} + */ + showReloadIcon?: boolean; + + /**Tab panels and headers to be displayed in rounded corner style. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Set the width for outer panel element, if not it’s take parent width. + * @Default {null} + */ + width?: string|number; + + /**Triggered after a tab item activated.*/ + itemActive? (e: ItemActiveEventArgs): void; + + /**Triggered before ajax content has been loaded.*/ + ajaxBeforeLoad? (e: AjaxBeforeLoadEventArgs): void; + + /**Triggered if error occurs in Ajax request.*/ + ajaxError? (e: AjaxErrorEventArgs): void; + + /**Triggered after ajax content load action.*/ + ajaxLoad? (e: AjaxLoadEventArgs): void; + + /**Triggered after a tab item activated.*/ + ajaxSuccess? (e: AjaxSuccessEventArgs): void; + + /**Triggered before a tab item activated.*/ + beforeActive? (e: BeforeActiveEventArgs): void; + + /**Triggered before a tab item remove.*/ + beforeItemRemove? (e: BeforeItemRemoveEventArgs): void; + + /**Triggered before a tab item Create.*/ + create? (e: CreateEventArgs): void; + + /**Triggered before a tab item destroy.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered after new tab item add*/ + itemAdd? (e: ItemAddEventArgs): void; + + /**Triggered after tab item removed.*/ + itemRemove? (e: ItemRemoveEventArgs): void; +} + +export interface ItemActiveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface AjaxBeforeLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns the url of ajax request + */ + url?: string; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface AjaxErrorEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns ajax data details. + */ + data?: any; + + /**returns the url of ajax request. + */ + url?: string; +} + +export interface AjaxLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns the url of ajax request + */ + url?: string; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface AjaxSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**return ajax data. + */ + data?: any; + + /**returns ajax url + */ + url?: string; + + /**returns content of ajax request. + */ + content?: any; +} + +export interface BeforeActiveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns previous active tab header. + */ + prevActiveHeader?: HTMLElement; + + /**returns previous active index. + */ + prevActiveIndex?: number; + + /**returns current active tab header . + */ + activeHeader?: HTMLElement; + + /**returns current active index. + */ + activeIndex?: number; + + /**returns, is it triggered by interaction or not. + */ + isInteraction?: boolean; +} + +export interface BeforeItemRemoveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns current tab item index + */ + index?: number; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ItemAddEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns new added tab header. + */ + tabHeader?: HTMLElement; + + /**returns new added tab content panel. + */ + tabContent?: any; +} + +export interface ItemRemoveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tab model. + */ + model?: ej.Tab.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns removed tab header. + */ + removedTab?: HTMLElement; +} + +export interface AjaxSettings { + + /**It specifies, whether to enable or disable asynchronous request. + * @Default {true} + */ + async?: boolean; + + /**It specifies the page will be cached in the web browser. + * @Default {false} + */ + cache?: boolean; + + /**It specifies the type of data is send in the query string. + * @Default {html} + */ + contentType?: string; + + /**It specifies the data as an object, will be passed in the query string. + * @Default {{}} + */ + data?: any; + + /**It specifies the type of data that you're expecting back from the response. + * @Default {html} + */ + dataType?: string; + + /**It specifies the HTTP request type. + * @Default {get} + */ + type?: string; +} + +enum Position{ + + ///Tab headers display to top position + Top, + + ///Tab headers display to bottom position + Bottom, + + ///Tab headers display to left position. + Left, + + ///Tab headers display to right position. + Right +} + + +enum HeightAdjustMode{ + + ///string + None, + + ///string + Content, + + ///string + Auto, + + ///string + Fill +} + +} + +class TagCloud extends ej.Widget { + static fn: TagCloud; + constructor(element: JQuery, options?: TagCloud.Model); + constructor(element: Element, options?: TagCloud.Model); + model:TagCloud.Model; + defaults:TagCloud.Model; + + /** Inserts a new item into the TagCloud + * @param {string} Insert new item into the TagCloud + * @returns {void} + */ + insert(name: string): void; + + /** Inserts a new item into the TagCloud at a particular position. + * @param {string} Inserts a new item into the TagCloud + * @param {number} Inserts a new item into the TagCloud with the specified position + * @returns {void} + */ + insertAt(name: string, position: number): void; + + /** Removes the item from the TagCloud based on the name. It removes all the tags which have the corresponding name + * @param {string} name of the tag. + * @returns {void} + */ + remove(name: string): void; + + /** Removes the item from the TagCloud based on the position. It removes the tags from the the corresponding position only. + * @param {number} position of tag item. + * @returns {void} + */ + removeAt(position: number): void; +} +export module TagCloud{ + +export interface Model { + + /**Specify the CSS class to button to achieve custom theme. + */ + cssClass?: string; + + /**The dataSource contains the list of data to display in a cloud format. Each data contains a link url, frequency to categorize the font size and a display text. + * @Default {null} + */ + dataSource?: any; + + /**Sets the TagCloud and tag items direction as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**Defines the mapping fields for the data items of the TagCloud. + * @Default {null} + */ + fields?: Fields; + + /**Defines the format for the TagCloud to display the tag items.See Format + * @Default {ej.Format.Cloud} + */ + format?: string|ej.Format; + + /**Sets the maximum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. + * @Default {40px} + */ + maxFontSize?: string|number; + + /**Sets the minimum font size value for the tag items. The font size for the tag items will be generated in between the minimum and maximum font size values. + * @Default {10px} + */ + minFontSize?: string|number; + + /**Define the query to retrieve the data from online server. The query is used only when the online dataSource is used. + * @Default {null} + */ + query?: any; + + /**Shows or hides the TagCloud title. When this set to false, it hides the TagCloud header. + * @Default {true} + */ + showTitle?: boolean; + + /**Sets the title image for the TagCloud. To show the title image, the showTitle property should be enabled. + * @Default {null} + */ + titleImage?: string; + + /**Sets the title text for the TagCloud. To show the title text, the showTitle property should be enabled. + * @Default {Title} + */ + titleText?: string; + + /**Event triggers when the TagCloud items are clicked*/ + click? (e: ClickEventArgs): void; + + /**Event triggers when the TagCloud are created*/ + create? (e: CreateEventArgs): void; + + /**Event triggers when the TagCloud are destroyed*/ + destroy? (e: DestroyEventArgs): void; + + /**Event triggers when the cursor leaves out from a tag item*/ + mouseout? (e: MouseoutEventArgs): void; + + /**Event triggers when the cursor hovers on a tag item*/ + mouseover? (e: MouseoverEventArgs): void; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; + + /**return current tag name + */ + text?: string; + + /**return current url link + */ + url?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseoutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; + + /**return current tag name + */ + text?: string; + + /**return current url link + */ + url?: string; +} + +export interface MouseoverEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TagCloud model + */ + model?: ej.TagCloud.Model; + + /**returns the name of the event + */ + type?: string; + + /**return current tag name + */ + text?: string; + + /**return current url link + */ + url?: string; +} + +export interface Fields { + + /**Defines the frequency number to categorize the font size. + */ + frequency?: number; + + /**Defines the html attributes for the anchor elements inside the each tag items. + */ + htmlAttributes?: any; + + /**Defines the tag value or display text. + */ + text?: string; + + /**Defines the url link to navigate while click the tag. + */ + url?: string; +} +} +enum Format +{ +//To render the TagCloud items in cloud format +Cloud, +//To render the TagCloud items in list format +List, +} + +class TimePicker extends ej.Widget { + static fn: TimePicker; + constructor(element: JQuery, options?: TimePicker.Model); + constructor(element: Element, options?: TimePicker.Model); + model:TimePicker.Model; + defaults:TimePicker.Model; + + /** Allows you to disable the TimePicker. + * @returns {void} + */ + disable(): void; + + /** Allows you to enable the TimePicker. + * @returns {void} + */ + enable(): void; + + /** It returns the current time value. + * @returns {string} + */ + getValue(): string; + + /** This method will hide the TimePicker control popup. + * @returns {void} + */ + hide(): void; + + /** Updates the current system time in TimePicker. + * @returns {void} + */ + setCurrentTime(): void; + + /** This method will show the TimePicker control popup. + * @returns {void} + */ + show(): void; +} +export module TimePicker{ + +export interface Model { + + /**Sets the root CSS class for the TimePicker theme, which is used to customize. + */ + cssClass?: string; + + /**Specifies the animation behavior in TimePicker. + * @Default {true} + */ + enableAnimation?: boolean; + + /**When this property is set to false, it disables the TimePicker control. + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for maintaining states. When refreshing the TimePicker control page, the model value is applied from browser cookies or HTML 5local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Displays the TimePicker as right to left alignment. + * @Default {false} + */ + enableRTL?: boolean; + + /**When the enableStrictMode is set as true it allows the value outside of the range and also indicate with red color border, otherwise it internally changed to the min or max range value based an input value. + * @Default {false} + */ + enableStrictMode?: boolean; + + /**Defines the height of the TimePicker textbox. + */ + height?: string|number; + + /**Sets the step value for increment an hour value through arrow keys or mouse scroll. + * @Default {1} + */ + hourInterval?: number; + + /**It allows to define the characteristics of the TimePicker control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Sets the time interval between the two adjacent time values in the popup. + * @Default {30} + */ + interval?: number; + + /**Defines the localization info used by the TimePicker. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum time value to the TimePicker. + * @Default {11:59:59 PM} + */ + maxTime?: string; + + /**Sets the minimum time value to the TimePicker. + * @Default {12:00:00 AM} + */ + minTime?: string; + + /**Sets the step value for increment the minute value through arrow keys or mouse scroll. + * @Default {1} + */ + minutesInterval?: number; + + /**Defines the height of the TimePicker popup. + * @Default {191px} + */ + popupHeight?: string|number; + + /**Defines the width of the TimePicker popup. + * @Default {auto} + */ + popupWidth?: string|number; + + /**Toggles the readonly state of the TimePicker + * @Default {false} + */ + readOnly?: boolean; + + /**Sets the step value for increment the seconds value through arrow keys or mouse scroll. + * @Default {1} + */ + secondsInterval?: number; + + /**shows or hides the drop down button in TimePicker. + * @Default {true} + */ + showPopupButton?: boolean; + + /**TimePicker is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Defines the time format displayed in the TimePicker. + * @Default {h:mm tt} + */ + timeFormat?: string; + + /**Sets a specified time value on the TimePicker. + * @Default {null} + */ + value?: string|Date; + + /**Defines the width of the TimePicker textbox. + */ + width?: string|number; + + /**Fires when the time value changed in the TimePicker.*/ + beforeChange? (e: BeforeChangeEventArgs): void; + + /**Fires when the TimePicker popup before opened.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Fires when the time value changed in the TimePicker.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when the TimePicker popup closed.*/ + close? (e: CloseEventArgs): void; + + /**Fires when create TimePicker successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the TimePicker is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the TimePicker control gets focus.*/ + focusIn? (e: FocusInEventArgs): void; + + /**Fires when the TimePicker control get lost focus.*/ + focusOut? (e: FocusOutEventArgs): void; + + /**Fires when the TimePicker popup opened.*/ + open? (e: OpenEventArgs): void; + + /**Fires when the value is selected from the TimePicker dropdown list.*/ + select? (e: SelectEventArgs): void; +} + +export interface BeforeChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the modified time value + */ + value?: string; +} + +export interface BeforeOpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the time value + */ + value?: string; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns true when the value changed by user interaction otherwise returns false + */ + isInteraction?: boolean; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the modified time value + */ + value?: string; +} + +export interface CloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the time value + */ + value?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface FocusInEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the current time value + */ + value?: string; +} + +export interface FocusOutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the current time value + */ + value?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the time value + */ + value?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TimePicker model + */ + model?: ej.TimePicker.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the previously selected time value + */ + prevTime?: string; + + /**returns the selected time value + */ + value?: string; +} +} + +class ToggleButton extends ej.Widget { + static fn: ToggleButton; + constructor(element: JQuery, options?: ToggleButton.Model); + constructor(element: Element, options?: ToggleButton.Model); + model:ToggleButton.Model; + defaults:ToggleButton.Model; + + /** Allows you to destroy the ToggleButton widget. + * @returns {void} + */ + destroy(): void; + + /** To disable the ToggleButton to prevent all user interactions. + * @returns {void} + */ + disable(): void; + + /** To enable the ToggleButton. + * @returns {void} + */ + enable(): void; +} +export module ToggleButton{ + +export interface Model { + + /**Specify the icon in active state to the toggle button and it will be aligned from left margin of the button. + */ + activePrefixIcon?: string; + + /**Specify the icon in active state to the toggle button and it will be aligned from right margin of the button. + */ + activeSuffixIcon?: string; + + /**Sets the text when ToggleButton is in active state i.e.,checked state. + * @Default {null} + */ + activeText?: string; + + /**Specifies the contentType of the ToggleButton. See ContentType as below + * @Default {ej.ContentType.TextOnly} + */ + contentType?: ej.ContentType|string; + + /**Specify the CSS class to the ToggleButton to achieve custom theme. + */ + cssClass?: string; + + /**Specify the icon in default state to the toggle button and it will be aligned from left margin of the button. + */ + defaultPrefixIcon?: string; + + /**Specify the icon in default state to the toggle button and it will be aligned from right margin of the button. + */ + defaultSuffixIcon?: string; + + /**Specifies the text of the ToggleButton, when the control is a default state. i.e., unChecked state. + * @Default {null} + */ + defaultText?: string; + + /**Specifies the state of the ToggleButton. + * @Default {true} + */ + enabled?: boolean; + + /**Save current model value to browser cookies for maintaining states. When refreshing the ToggleButton control page, the model value is applied from browser cookies or HTML 5local storage. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Specify the Right to Left direction of the ToggleButton. + * @Default {false} + */ + enableRTL?: boolean; + + /**Specifies the height of the ToggleButton. + * @Default {28pixel} + */ + height?: number|string; + + /**It allows to define the characteristics of the ToggleButton control. It will helps to extend the capability of an HTML element. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the image position of the ToggleButton. + * @Default {ej.ImagePosition.ImageLeft} + */ + imagePosition?: ej.ImagePosition|string; + + /**Allows to prevents the control switched to checked (active) state. + * @Default {false} + */ + preventToggle?: boolean; + + /**Displays the ToggleButton with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the size of the ToggleButton. See ButtonSize as below + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /**It allows to define the ToggleButton state to checked(Active) or unchecked(Default) at initial time. + * @Default {false} + */ + toggleState?: boolean; + + /**Specifies the type of the ToggleButton. See ButtonType as below + * @Default {ej.ButtonType.Button} + */ + type?: ej.ButtonType|string; + + /**Specifies the width of the ToggleButton. + * @Default {100pixel} + */ + width?: number|string; + + /**Fires when ToggleButton control state is changed successfully.*/ + change? (e: ChangeEventArgs): void; + + /**Fires when ToggleButton control is clicked successfully.*/ + click? (e: ClickEventArgs): void; + + /**Fires when ToggleButton control is created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when ToggleButton control is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface ChangeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**return the toggle button checked state + */ + isChecked?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**return the toggle button checked state + */ + isChecked?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**return the toggle button state + */ + status?: boolean; + + /**returns the name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the toggle button model + */ + model?: ej.ToggleButton.Model; + + /**returns the name of the event + */ + type?: string; +} +} + +class Toolbar extends ej.Widget { + static fn: Toolbar; + constructor(element: JQuery, options?: Toolbar.Model); + constructor(element: Element, options?: Toolbar.Model); + model:Toolbar.Model; + defaults:Toolbar.Model; + + /** Deselect the specified Toolbar item. + * @param {any} The element need to be deselected + * @returns {void} + */ + deselectItem(element: any): void; + + /** Deselect the Toolbar item based on specified id. + * @param {string} The ID of the element need to be deselected + * @returns {void} + */ + deselectItemByID(ID: string): void; + + /** Allows you to destroy the Toolbar widget. + * @returns {void} + */ + destroy(): void; + + /** To disable all items in the Toolbar control. + * @returns {void} + */ + disable(): void; + + /** Disable the specified Toolbar item. + * @param {any} The element need to be disabled + * @returns {void} + */ + disableItem(element: any): void; + + /** Disable the Toolbar item based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be disabled + * @returns {void} + */ + disableItemByID(ID: string): void; + + /** Enable the Toolbar if it is in disabled state. + * @returns {void} + */ + enable(): void; + + /** Enable the Toolbar item based on specified item. + * @param {any} The element need to be enabled + * @returns {void} + */ + enableItem(element: any): void; + + /** Enable the Toolbar item based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be enabled + * @returns {void} + */ + enableItemByID(ID: string): void; + + /** To hide the Toolbar + * @returns {void} + */ + hide(): void; + + /** Remove the item from toolbar, based on specified item. + * @param {any} The element need to be removed + * @returns {void} + */ + removeItem(element: any): void; + + /** Remove the item from toolbar, based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be removed + * @returns {void} + */ + removeItemByID(ID: string): void; + + /** Selects the item from toolbar, based on specified item. + * @param {any} The element need to be selected + * @returns {void} + */ + selectItem(element: any): void; + + /** Selects the item from toolbar, based on specified item id in the Toolbar. + * @param {string} The ID of the element need to be selected + * @returns {void} + */ + selectItemByID(ID: string): void; + + /** To show the Toolbar. + * @returns {void} + */ + show(): void; +} +export module Toolbar{ + +export interface Model { + + /**Sets the root CSS class for Toolbar control to achieve the custom theme. + */ + cssClass?: string; + + /**Specifies dataSource value for the Toolbar control during initialization. + * @Default {null} + */ + dataSource?: any; + + /**Specifies the Toolbar control state. + * @Default {true} + */ + enabled?: boolean; + + /**Specifies enableRTL property to align the Toolbar control from right to left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows to separate the each UL items in the Toolbar control. + * @Default {false} + */ + enableSeparator?: boolean; + + /**Specifies the mapping fields for the data items of the Toolbar + * @Default {null} + */ + fields?: string; + + /**Specifies the height of the Toolbar. + * @Default {28} + */ + height?: number|string; + + /**Specifies whether the Toolbar control is need to be show or hide. + * @Default {false} + */ + hide?: boolean; + + /**Enables/Disables the responsive support for Toolbar items during the window resizing time. + * @Default {false} + */ + isResponsive?: boolean; + + /**Specifies the Toolbar orientation. See orientation + * @Default {Horizontal} + */ + orientation?: ej.Orientation|string; + + /**Specifies the query to retrieve the data from the online server. The query is used only when the online dataSource is used. + * @Default {null} + */ + query?: any; + + /**Displays the Toolbar with rounded corners. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Specifies the width of the Toolbar. + */ + width?: number|string; + + /**Fires after Toolbar control is clicked.*/ + click? (e: ClickEventArgs): void; + + /**Fires after Toolbar control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Toolbar is destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires after Toolbar control item is hovered.*/ + itemHover? (e: ItemHoverEventArgs): void; + + /**Fires after mouse leave from Toolbar control item.*/ + itemLeave? (e: ItemLeaveEventArgs): void; +} + +export interface ClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**returns the target of the current object. + */ + currentTarget?: any; + + /**return the Toolbar state + */ + status?: boolean; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemHoverEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**returns the target of the current object. + */ + currentTarget?: any; + + /**return the Toolbar state + */ + status?: boolean; +} + +export interface ItemLeaveEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Toolbar model + */ + model?: ej.Toolbar.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the target of the current object. + */ + target?: any; + + /**returns the target of the current object. + */ + currentTarget?: any; + + /**return the Toolbar state + */ + status?: boolean; +} + +export interface Fields { + + /**Defines the group name for the item. + */ + group?: string; + + /**Defines the html attributes such as id, class, styles for the item to extend the capability. + */ + htmlAttributes?: any; + + /**Defines id for the tag. + */ + id?: string; + + /**Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; + + /**Defines the imageURL for the image location. + */ + imageUrl?: string; + + /**Defines the sprite CSS for the image tag. + */ + spriteCssClass?: string; + + /**Defines the text content for the tag. + */ + text?: string; + + /**Defines the tooltip text for the tag. + */ + tooltipText?: string; +} +} + +class TreeView extends ej.Widget { + static fn: TreeView; + constructor(element: JQuery, options?: TreeView.Model); + constructor(element: Element, options?: TreeView.Model); + model:TreeView.Model; + defaults:TreeView.Model; + + /** To add a Node or collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + addNode(newNodeText: string|any, target: string|any): void; + + /** To add a collection of nodes in TreeView. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {any|Array} New node details in JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + addNodes(collection: any|Array, target : string|any): void; + + /** To check all the nodes in TreeView. + * @returns {void} + */ + checkAll(): void; + + /** To check a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + checkNode( element : string|any): void; + + /** To collapse all the TreeView nodes. + * @returns {void} + */ + collapseAll(): void; + + /** To collapse a particular node in TreeView. + * @param {string|any} ID of TreeView node|object of TreeView node + * @returns {void} + */ + collapseNode( element : string|any): void; + + /** To disable the node in the TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + disableNode( element : string|any): void; + + /** To enable the node in the TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + enableNode( element : string|any): void; + + /** To ensure that the TreeView node is visible in the TreeView. This method is useful if we need select a TreeView node dynamically. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + ensureVisible( element : string|any): boolean; + + /** To expand all the TreeView nodes. + * @returns {void} + */ + expandAll(): void; + + /** To expandNode particular node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + expandNode( element : string|any): void; + + /** To get currently checked nodes in TreeView. + * @returns {any} + */ + getCheckedNodes(): any; + + /** To get currently checked nodes indexes in TreeView. + * @returns {Array} + */ + getCheckedNodesIndex(): Array; + + /** To get number of nodes in TreeView. + * @returns {number} + */ + getNodeCount(): number; + + /** To get currently expanded nodes in TreeView. + * @returns {any} + */ + getExpandedNodes(): any; + + /** To get currently expanded nodes indexes in TreeView. + * @returns {Array} + */ + getExpandedNodesIndex(): Array; + + /** To get TreeView node by using index position in TreeView. + * @param {number} Index position of TreeView node + * @returns {any} + */ + getNodeByIndex( index : number): any; + + /** To get TreeView node data such as id, text, parentId, selected, checked, expanded, level, childs and index. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {any} + */ + getNode(element: string|any): any; + + /** To get current index position of TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {number} + */ + getNodeIndex(element : string|any): number; + + /** To get immediate parent TreeView node of particular TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {any} + */ + getParent(element : string|any): any; + + /** To get the currently selected node in TreeView. + * @returns {any} + */ + getSelectedNode(): any; + + /** To get the index position of currently selected node in TreeView. + * @returns {number} + */ + getSelectedNodeIndex(): number; + + /** To get the text of a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {string} + */ + getText( element : string|any): string; + + /** To get the updated datasource of TreeView after performing some operation like drag and drop, node editing, adding and removing node. + * @returns {Array} + */ + getTreeData(): Array; + + /** To get currently visible nodes in TreeView. + * @returns {any} + */ + getVisibleNodes(): any; + + /** To check a node having child or not. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + hasChildNode( element : string|any): boolean; + + /** To show nodes in TreeView. + * @returns {void} + */ + hide(): void; + + /** To hide particular node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + hideNode( element : string|any): void; + + /** To add a Node or collection of nodes after the particular TreeView node. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + insertAfter( newNodeText : string|any, target : string|any): void; + + /** To add a Node or collection of nodes before the particular TreeView node. + * @param {string|any} New node text or JSON object + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + insertBefore( newNodeText : string|any, target : string|any): void; + + /** To check the given TreeView node is checked or unchecked. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isNodeChecked( element : string|any): boolean; + + /** To check whether the child nodes are loaded of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isChildLoaded( element : string|any): boolean; + + /** To check the given TreeView node is disabled or enabled. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isDisabled( element : string|any): boolean; + + /** To check the given node is exist in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isExist( element : string|any): boolean; + + /** To get the expand status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isExpanded( element : string|any): boolean; + + /** To get the select status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isSelected( element : string|any): boolean; + + /** To get the visibility status of the given TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {boolean} + */ + isVisible( element : string|any): boolean; + + /** To load the TreeView nodes from the particular URL. If target tree node is specified, then the given nodes are added as child of target tree node, otherwise nodes are added in TreeView. + * @param {string} URL location, the data returned from the URL will be loaded in TreeView + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + loadData( URL : string, target : string|any): void; + + /** To move the TreeView node with in same TreeView. The new poistion of given TreeView node will be based on destionation node and index position. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {number} New index position of given source node + * @returns {void} + */ + moveNode( sourceNode : string|any, destinationNode : string|any, index : number): void; + + /** To refresh the TreeView + * @returns {void} + */ + refresh(): void; + + /** To remove all the nodes in TreeView. + * @returns {void} + */ + removeAll(): void; + + /** To remove a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + removeNode( element : string|any): void; + + /** To select a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + selectNode( element : string|any): void; + + /** To show nodes in TreeView. + * @returns {void} + */ + show(): void; + + /** To show a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + showNode( element : string|any): void; + + /** To uncheck all the nodes in TreeView. + * @returns {void} + */ + unCheckAll(): void; + + /** To uncheck a node in TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + uncheckNode( element : string|any): void; + + /** To unselect the node in the TreeView. + * @param {string|any} ID of TreeView node/object of TreeView node + * @returns {void} + */ + unselectNode( element : string|any): void; + + /** To edit or update the text of the TreeView node. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {string} New text + * @returns {void} + */ + updateText( target : string|any, newText : string): void; +} +export module TreeView{ + +export interface Model { + + /**Gets or sets a value that indicates whether to enable drag and drop a node within the same tree. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /**Gets or sets a value that indicates whether to enable drag and drop a node in inter ej.TreeView. + * @Default {true} + */ + allowDragAndDropAcrossControl?: boolean; + + /**Gets or sets a value that indicates whether to drop a node to a sibling of particular node. + * @Default {true} + */ + allowDropSibling?: boolean; + + /**Gets or sets a value that indicates whether to drop a node to a child of particular node. + * @Default {true} + */ + allowDropChild?: boolean; + + /**Gets or sets a value that indicates whether to enable node editing support for TreeView. + * @Default {false} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable keyboard support for TreeView actions like nodeSelection, nodeEditing, nodeExpand, nodeCollapse, nodeCut and Paste. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node. + * @Default {true} + */ + autoCheck?: boolean; + + /**Allow us to specify the parent node to be retain in checked or unchecked state instead of going for indeterminate state. + * @Default {false} + */ + autoCheckParentNode?: boolean; + + /**Gets or sets a value that indicates the checkedNodes index collection as an array. The given array index position denotes the nodes, that are checked while rendering TreeView. + * @Default {[]} + */ + checkedNodes?: Array; + + /**Sets the root CSS class for TreeView which allow us to customize the appearance. + */ + cssClass?: string; + + /**Gets or sets a value that indicates whether to enable or disable the animation effect while expanding or collapsing a node. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Gets or sets a value that indicates whether a TreeView can be enabled or disabled. No actions can be performed while this property is set as false + * @Default {true} + */ + enabled?: boolean; + + /**Allow us to prevent multiple nodes to be in expanded state. If it set to false, previously expanded node will be collapsed automatically, while we expand a node. + * @Default {true} + */ + enableMultipleExpand?: boolean; + + /**Sets a value that indicates whether to persist the TreeView model state in page using applicable medium i.e., HTML5 localStorage or cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /**Gets or sets a value that indicates to align content in the TreeView control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**Gets or sets a array of value that indicates the expandedNodes index collection as an array. The given array index position denotes the nodes, that are expanded while rendering TreeView. + * @Default {[]} + */ + expandedNodes?: Array; + + /**Gets or sets a value that indicates the TreeView node can be expand or collapse by using the specified action. + * @Default {dblclick} + */ + expandOn?: string; + + /**Gets or sets a fields object that allow us to map the data members with field properties in order to make the data binding easier. + * @Default {null} + */ + fields?: Fields; + + /**Defines the height of the TreeView. + * @Default {Null} + */ + height?: string|number; + + /**Specifies the HTML Attributes for the TreeView. Using this API we can add custom attributes in TreeView control. + * @Default {{}} + */ + htmlAttributes?: any; + + /**Specifies the child nodes to be loaded on demand + * @Default {false} + */ + loadOnDemand?: boolean; + + /**Gets or Sets a value that indicates the index position of a tree node. The particular index tree node will be selected while rendering the TreeView. + * @Default {-1} + */ + selectedNode?: number; + + /**Gets or sets a value that indicates whether to display or hide checkbox for all TreeView nodes. + * @Default {false} + */ + showCheckbox?: boolean; + + /**By using sortSettings property, you can customize the sorting option in TreeView control. + */ + sortSettings?: SortSettings; + + /**Allow us to use custom template in order to create TreeView. + * @Default {null} + */ + template?: string; + + /**Defines the width of the TreeView. + * @Default {Null} + */ + width?: string|number; + + /**Fires before adding node to TreeView.*/ + beforeAdd? (e: BeforeAddEventArgs): void; + + /**Fires before collapse a node.*/ + beforeCollapse? (e: BeforeCollapseEventArgs): void; + + /**Fires before cut node in TreeView.*/ + beforeCut? (e: BeforeCutEventArgs): void; + + /**Fires before deleting node in TreeView.*/ + beforeDelete? (e: BeforeDeleteEventArgs): void; + + /**Fires before editing the node in TreeView.*/ + beforeEdit? (e: BeforeEditEventArgs): void; + + /**Fires before expanding the node.*/ + beforeExpand? (e: BeforeExpandEventArgs): void; + + /**Fires before loading nodes to TreeView.*/ + beforeLoad? (e: BeforeLoadEventArgs): void; + + /**Fires before paste node in TreeView.*/ + beforePaste? (e: BeforePasteEventArgs): void; + + /**Fires before selecting node in TreeView.*/ + beforeSelect? (e: BeforeSelectEventArgs): void; + + /**Fires when TreeView created successfully.*/ + create? (e: CreateEventArgs): void; + + /**Fires when TreeView destroyed successfully.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires before nodeEdit Successful.*/ + inlineEditValidation? (e: InlineEditValidationEventArgs): void; + + /**Fires when key pressed successfully.*/ + keyPress? (e: KeyPressEventArgs): void; + + /**Fires when data load fails.*/ + loadError? (e: LoadErrorEventArgs): void; + + /**Fires when data loaded successfully.*/ + loadSuccess? (e: LoadSuccessEventArgs): void; + + /**Fires once node added successfully.*/ + nodeAdd? (e: NodeAddEventArgs): void; + + /**Fires once node checked successfully.*/ + nodeCheck? (e: NodeCheckEventArgs): void; + + /**Fires when node clicked successfully.*/ + nodeClick? (e: NodeClickEventArgs): void; + + /**Fires when node collapsed successfully.*/ + nodeCollapse? (e: NodeCollapseEventArgs): void; + + /**Fires when node cut successfully.*/ + nodeCut? (e: NodeCutEventArgs): void; + + /**Fires when node deleted successfully.*/ + nodeDelete? (e: NodeDeleteEventArgs): void; + + /**Fires when node dragging.*/ + nodeDrag? (e: NodeDragEventArgs): void; + + /**Fires once node drag start successfully.*/ + nodeDragStart? (e: NodeDragStartEventArgs): void; + + /**Fires before the dragged node to be dropped.*/ + nodeDragStop? (e: NodeDragStopEventArgs): void; + + /**Fires once node dropped successfully.*/ + nodeDropped? (e: NodeDroppedEventArgs): void; + + /**Fires once node edited successfully.*/ + nodeEdit? (e: NodeEditEventArgs): void; + + /**Fires once node expanded successfully.*/ + nodeExpand? (e: NodeExpandEventArgs): void; + + /**Fires once node pasted successfully.*/ + nodePaste? (e: NodePasteEventArgs): void; + + /**Fires when node selected successfully.*/ + nodeSelect? (e: NodeSelectEventArgs): void; + + /**Fires once node unchecked successfully.*/ + nodeUncheck? (e: NodeUncheckEventArgs): void; +} + +export interface BeforeAddEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the given new node data + */ + data ?: string|any; + + /**returns the parent element, the given new nodes to be appended to the given parent element + */ + targetParent ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface BeforeCollapseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the child nodes are loaded or not + */ + isChildLoaded ?: boolean; + + /**returns the id of currently clicked node + */ + id ?: string; + + /**returns the parent id of currently clicked node + */ + parentId ?: string; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface BeforeCutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be cut + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface BeforeDeleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be deleted + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the current parent element of the target node + */ + parentElement ?: any; + + /**returns the parent node values + */ + parentDetails ?: any; +} + +export interface BeforeEditEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; +} + +export interface BeforeExpandEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**if the child node is ready to expanded state; otherwise, false. + */ + isChildLoaded ?: boolean; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the id of currently clicked node + */ + id ?: string; + + /**returns the parent id of currently clicked node + */ + parentId ?: string; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface BeforeLoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the AJAX settings object + */ + ajaxOptions ?: any; +} + +export interface BeforePasteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be pasted + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface BeforeSelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the target element, the given node to be selected + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; +} + +export interface CreateEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface DestroyEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; +} + +export interface InlineEditValidationEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the new entered text for the node + */ + newText ?: string; + + /**returns the current node element id + */ + id ?: any; + + /**returns the old node text + */ + oldText ?: string; +} + +export interface KeyPressEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns node path from root element + */ + path ?: string; + + /**returns the keypressed keycode value + */ + keyCode ?: number; + + /**it returns when the current node is in expanded state; otherwise, false. + */ + isExpanded ?: boolean; +} + +export interface LoadErrorEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the AJAX error object + */ + error ?: any; +} + +export interface LoadSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the success data from the URL + */ + data ?: any; + + /**returns the target parent element, the data returned from the URL to be appended to the given parent element, else in TreeView + */ + targetParent ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface NodeAddEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the added data, that are given initially + */ + data ?: any; + + /**returns the newly added elements + */ + nodes ?: any; + + /**returns the target parent element of the added element + */ + parentElement ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface NodeCheckEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns the id of the current element of the node clicked + */ + id ?: string; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**it returns true when the node checkbox is checked; otherwise, false. + */ + isChecked ?: boolean; + + /**it returns the currently checked node name + */ + currentNode ?: Array; + + /**it returns the currently checked and its child node details + */ + currentCheckedNodes ?: Array; +} + +export interface NodeClickEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the id of current element + */ + id ?: string; + + /**returns the parentId of current element + */ + parentId ?: string; +} + +export interface NodeCollapseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the id of the current element of the node clicked + */ + id ?: string; + + /**returns the name of the event + */ + type ?: string; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the child nodes are loaded or not + */ + isChildLoaded ?: boolean; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface NodeCutEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current parent element of the cut node + */ + parentElement ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface NodeDeleteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the current parent element of the deleted node + */ + parentElement ?: any; + + /**returns the given parent node details + */ + parentDetails ?: any; +} + +export interface NodeDragEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drag target + */ + dragTarget ?: any; + + /**returns the current target TreeView node + */ + target ?: any; + + /**returns the current target details + */ + targetElementData ?: any; + + /**returns the current parent element of the target node + */ + draggedElement ?: any; + + /**returns the given parent node details + */ + draggedElementData ?: any; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeDragStartEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drag target + */ + dragTarget ?: any; + + /**returns the current dragging parent TreeView node + */ + parentElement ?: any; + + /**returns the current dragging parent TreeView node details + */ + parentElementData ?: any; + + /**returns the current parent element of the dragging node + */ + target ?: any; + + /**returns the given parent node details + */ + targetElementData ?: any; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeDragStopEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drop target + */ + dropTarget ?: any; + + /**returns the current dragged TreeView node + */ + draggedElement ?: any; + + /**returns the current dragged TreeView node details + */ + draggedElementData ?: any; + + /**returns the current parent element of the dragged node + */ + target ?: any; + + /**returns the given parent node details + */ + targetElementData ?: any; + + /**returns the drop position such as before, after or over + */ + position ?: string; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeDroppedEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the original drop target + */ + dropTarget ?: any; + + /**returns the current dropped TreeView node + */ + droppedElement ?: any; + + /**returns the current dropped TreeView node details + */ + droppedElementData ?: any; + + /**returns the current parent element of the dropped node + */ + target ?: any; + + /**returns the given parent node details + */ + targetElementData ?: any; + + /**returns the drop position such as before, after or over + */ + position ?: string; + + /**returns the event object + */ + event ?: any; +} + +export interface NodeEditEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the id of the element + */ + id ?: string; + + /**returns the oldText of the element + */ + oldText ?: string; + + /**returns the newText of the element + */ + newText ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the target element, the given node to be cut + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; +} + +export interface NodeExpandEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the value of the node + */ + value ?: string; + + /**if the child node is ready to expanded state; otherwise, false. + */ + isChildLoaded ?: boolean; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**returns the id of currently clicked node + */ + id ?: string; + + /**returns the parent id of currently clicked node + */ + parentId ?: string; + + /**returns the format asynchronous or synchronous + */ + async ?: boolean; +} + +export interface NodePasteEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the pasted element + */ + target ?: any; + + /**returns the given target node values + */ + nodeDetails ?: any; + + /**returns the keypressed keycode value + */ + keyCode ?: number; +} + +export interface NodeSelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the id of the current element of the node clicked + */ + id ?: any; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; +} + +export interface NodeUncheckEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel ?: boolean; + + /**returns the TreeView model + */ + model ?: ej.TreeView.Model; + + /**returns the name of the event + */ + type ?: string; + + /**returns the event object + */ + event ?: any; + + /**returns the id of the current element of the node clicked + */ + id ?: any; + + /**returns the id of the parent element of current element of the node clicked + */ + parentId ?: any; + + /**returns the value of the node + */ + value ?: string; + + /**returns the current element of the node clicked + */ + currentElement ?: any; + + /**it returns true when the node checkbox is checked; otherwise, false. + */ + isChecked ?: boolean; + + /**it returns currently unchecked node name + */ + currentNode ?: string; + + /**it returns currently unchecked node and its child node details. + */ + currentUncheckedNodes ?: Array; +} + +export interface Fields { + + /**It receives the child level or inner level data source such as Essential DataManager object and JSON object. + */ + child?: any; + + /**It receives Essential DataManager object and JSON object. + */ + dataSource?: any; + + /**Specifies the node to be in expanded state. + */ + expanded?: boolean; + + /**Its allow us to indicate whether the node has child or not in load on demand + */ + hasChild?: boolean; + + /**Specifies the html attributes to “li” item list. + */ + htmlAttribute?: any; + + /**Specifies the id to TreeView node items list. + */ + id?: string; + + /**Specifies the image attribute to “img” tag inside items list + */ + imageAttribute?: any; + + /**Specifies the html attributes to “li” item list. + */ + imageUrl?: string; + + /**If its true Checkbox node will be checked when rendered with checkbox. + */ + isChecked?: boolean; + + /**Specifies the link attribute to “a” tag in item list. + */ + linkAttribute?: any; + + /**Specifies the parent id of the node. The nodes are listed as child nodes of the specified parent node by using its parent id. + */ + parentId?: string; + + /**It receives query to retrieve data from the table (query is same as SQL). + */ + query?: any; + + /**Allow us to specify the node to be in selected state + */ + selected?: boolean; + + /**Specifies the sprite CSS class to “li” item list. + */ + spriteCssClass?: string; + + /**It receives the table name to execute query on the corresponding table. + */ + tableName?: string; + + /**Specifies the text of TreeView node items list. + */ + text?: string; +} + +export interface SortSettings { + + /**Enables or disables the sorting option in TreeView control + * @Default {false} + */ + allowSorting?: boolean; + + /**Sets the sorting order type. There are two sorting types available, such as "ascending", "descending". + * @Default {ej.sortOrder.Ascending} + */ + sortOrder?: ej.sortOrder|string; +} +} +enum sortOrder +{ +//Enum for Ascending sort order +Ascending, +//Enum for Descending sort order +Descending, +} + +class Uploadbox extends ej.Widget { + static fn: Uploadbox; + constructor(element: JQuery, options?: Uploadbox.Model); + constructor(element: Element, options?: Uploadbox.Model); + model:Uploadbox.Model; + defaults:Uploadbox.Model; + + /** The destroy method destroys the control and brings the control to a pre-init state. All the events of the Upload control is bound by using this._on unbinds automatically. + * @returns {void} + */ + destroy(): void; + + /** Disables the Uploadbox control + * @returns {void} + */ + disable(): void; + + /** Enables the Uploadbox control + * @returns {void} + */ + enable(): void; +} +export module Uploadbox{ + +export interface Model { + + /**Enables the file drag and drop support to the Uploadbox control. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /**Uploadbox supports both synchronous and asynchronous upload. This can be achieved by using the asyncUpload property. + * @Default {true} + */ + asyncUpload?: boolean; + + /**Uploadbox supports auto uploading of files after the file selection is done. + * @Default {false} + */ + autoUpload?: boolean; + + /**Sets the text for each action button. + * @Default {{browse: Browse, upload: Upload, cancel: Cancel, close: Close}} + */ + buttonText?: ButtonText; + + /**Sets the root class for the Uploadbox control theme. This cssClass API helps to use custom skinning option for the Uploadbox button and dialog content. + */ + cssClass?: string; + + /**Specifies the custom file details in the dialog popup on initialization. + * @Default {{ title:true, name:true, size:true, status:true, action:true}} + */ + customFileDetails?: CustomFileDetails; + + /**Specifies the actions for dialog popup while initialization. + * @Default {{ modal:false, closeOnComplete:false, content:null, drag:true}} + */ + dialogAction?: DialogAction; + + /**Displays the Uploadbox dialog at the given X and Y positions. X: Dialog sets the left position value. Y: Dialog sets the top position value. + * @Default {null} + */ + dialogPosition?: any; + + /**Property for applying the text to the Dialog title and content headers. + * @Default {{ title: Upload Box, name: Name, size: Size, status: Status}} + */ + dialogText?: DialogText; + + /**The dropAreaText is displayed when the draganddrop support is enabled in the Uploadbox control. + * @Default {Drop files or click to upload} + */ + dropAreaText?: string; + + /**Specifies the dropAreaHeight when the draganddrop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaHeight?: number|string; + + /**Specifies the dropAreaWidth when the draganddrop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaWidth?: number|string; + + /**Based on the property value, Uploadbox is enabled or disabled. + * @Default {true} + */ + enabled?: boolean; + + /**Sets the right-to-left direction property for the Uploadbox control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Only the files with the specified extension is allowed to upload. This is mentioned in the string format. + */ + extensionsAllow?: string; + + /**Only the files with the specified extension is denied for upload. This is mentioned in the string format. + */ + extensionsDeny?: string; + + /**Sets the maximum size limit for uploading the file. This is mentioned in the number format. + * @Default {31457280} + */ + fileSize?: number; + + /**Sets the height of the browse button. + * @Default {35px} + */ + height?: string; + + /**Configures the culture data and sets the culture to the Uploadbox. + * @Default {en-US} + */ + locale?: string; + + /**Enables multiple file selection for upload. + * @Default {true} + */ + multipleFilesSelection?: boolean; + + /**You can push the file to the Uploadbox in the client-side of the XHR supported browsers alone. + * @Default {null} + */ + pushFile?: any; + + /**Specifies the remove action to be performed after the file uploading is completed. Here, mention the server address for removal. + */ + removeUrl?: string; + + /**Specifies the save action to be performed after the file is pushed for uploading. Here, mention the server address to be saved. + */ + saveUrl?: string; + + /**Enables the browse button support to the Uploadbox control. + * @Default {true} + */ + showBrowseButton?: boolean; + + /**Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. + * @Default {true} + */ + showFileDetails?: boolean; + + /**Sets the name for the Uploadbox control. This API helps to Map the action in code behind to retrieve the files. + */ + uploadName?: string; + + /**Sets the width of the browse button. + * @Default {100px} + */ + width?: string; + + /**Fires when the upload progress begins.*/ + begin? (e: BeginEventArgs): void; + + /**Fires when the upload progress is cancelled.*/ + cancel? (e: CancelEventArgs): void; + + /**Fires when the file upload progress is completed.*/ + complete? (e: CompleteEventArgs): void; + + /**Fires when the file upload progress is completed.*/ + success? (e: SuccessEventArgs): void; + + /**Fires when the Uploadbox control is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when the Uploadbox control is destroyed.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires when the Upload process ends in Error.*/ + error? (e: ErrorEventArgs): void; + + /**Fires when the file is selected for upload successfully.*/ + fileSelect? (e: FileSelectEventArgs): void; + + /**Fires when the uploaded file is removed successfully.*/ + remove? (e: RemoveEventArgs): void; +} + +export interface BeginEventArgs { + + /**To pass additional information to the server. + */ + data?: any; + + /**Selected FileList Object. + */ + files?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CancelEventArgs { + + /**Canceled FileList Object. + */ + fileStatus?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CompleteEventArgs { + + /**AJAX event argument for reference. + */ + e?: any; + + /**Uploaded file list. + */ + files?: any; + + /**response from the server. + */ + responseText?: string; + + /**XHR-AJAX Object for reference. + */ + xhr?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface SuccessEventArgs { + + /**response from the server. + */ + responseText?: string; + + /**AJAX event argument for reference. + */ + e?: any; + + /**successfully uploaded files list. + */ + success?: any; + + /**Uploaded file list. + */ + files?: any; + + /**XHR-AJAX Object for reference. + */ + xhr?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ErrorEventArgs { + + /**details about the error information. + */ + error?: string; + + /**returns the name of the event. + */ + type?: string; + + /**error event action details. + */ + action?: string; + + /**returns the file details of the file uploaded + */ + files?: any; +} + +export interface FileSelectEventArgs { + + /**returns Selected FileList objects + */ + files?: any; + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RemoveEventArgs { + + /**returns the Uploadbox model + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the file details of the file object + */ + fileStatus?: any; +} + +export interface ButtonText { + + /**Sets the text for the browse button. + */ + browse?: string; + + /**Sets the text for the cancel button. + */ + cancel?: string; + + /**Sets the text for the close button. + */ + Close?: string; + + /**Sets the text for the Upload button inside the dialog popup. + */ + upload?: string; +} + +export interface CustomFileDetails { + + /**Enables the file upload interactions like remove/cancel in File details of the dialog popup. + */ + action?: boolean; + + /**Enables the name in the File details of the dialog popup. + */ + name?: boolean; + + /**Enables or disables the File size details of the dialog popup. + */ + size?: boolean; + + /**Enables or disables the file uploading status visibility in the dialog file details content. + */ + status?: boolean; + + /**Enables the title in File details for the dialog popup. + */ + title?: boolean; +} + +export interface DialogAction { + + /**Once uploaded successfully, the dialog popup closes immediately. + */ + closeOnComplete?: boolean; + + /**Sets the content container option to the Uploadbox dialog popup. + */ + content?: string; + + /**Enables the drag option to the dialog popup. + */ + drag?: boolean; + + /**Enables or disables the Uploadbox dialog’s modal property to the dialog popup. + */ + modal?: boolean; +} + +export interface DialogText { + + /**Sets the uploaded file’s Name (header text) to the Dialog popup. + */ + name?: string; + + /**Sets the upload file Size (header text) to the dialog popup. + */ + size?: string; + + /**Sets the upload file Status (header text) to the dialog popup. + */ + status?: string; + + /**Sets the title text of the dialog popup. + */ + title?: string; +} +} + +class WaitingPopup extends ej.Widget { + static fn: WaitingPopup; + constructor(element: JQuery, options?: WaitingPopup.Model); + constructor(element: Element, options?: WaitingPopup.Model); + model:WaitingPopup.Model; + defaults:WaitingPopup.Model; + + /** To hide the waiting popup + * @returns {void} + */ + hide(): void; + + /** Refreshes the WaitingPopup control by resetting the pop-up panel position and content position + * @returns {void} + */ + refresh(): void; + + /** To show the waiting popup + * @returns {void} + */ + show(): void; +} +export module WaitingPopup{ + +export interface Model { + + /**Sets the root class for the WaitingPopup control theme + * @Default {null} + */ + cssClass?: string; + + /**Enables or disables the default loading icon. + * @Default {true} + */ + showImage?: boolean; + + /**Enables the visibility of the WaitingPopup control + * @Default {false} + */ + showOnInit?: boolean; + + /**Loads HTML content inside the popup panel instead of the default icon + * @Default {null} + */ + template?: any; + + /**Sets the custom text in the pop-up panel to notify the waiting process + * @Default {null} + */ + text?: string; + + /**Fires after Create WaitingPopup successfully*/ + create? (e: CreateEventArgs): void; + + /**Fires after Destroy WaitingPopup successfully*/ + destroy? (e: DestroyEventArgs): void; +} + +export interface CreateEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the WaitingPopup model + */ + model?: ej.WaitingPopup.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the WaitingPopup model + */ + model?: ej.WaitingPopup.Model; + + /**returns the name of the event + */ + type?: string; +} +} + +class Grid extends ej.Widget { + static fn: Grid; + constructor(element: JQuery, options?: Grid.Model); + constructor(element: Element, options?: Grid.Model); + model:Grid.Model; + defaults:Grid.Model; + + /** Adds a grid model property which is to be ignored upon exporting. + * @returns {void} + */ + addIgnoreOnExport(): void; + + /** Add a new record in grid control when allowAdding is set as true. + * @returns {void} + */ + addRecord(): void; + + /** Cancel the modified changes in grid control when edit mode is "batch". + * @returns {void} + */ + batchCancel(): void; + + /** Save the modified changes to data source in grid control when edit mode is "batch". + * @returns {void} + */ + batchSave(): void; + + /** Send a cancel request in grid. + * @returns {void} + */ + cancelEdit(): void; + + /** Send a cancel request to the edited cell in grid. + * @returns {void} + */ + cancelEditCell(): void; + + /** It is used to clear all the cell selection. + * @returns {boolean} + */ + clearCellSelection(): boolean; + + /** It is used to clear all the row selection or at specific row selection based on the index provided. + * @param {number} optional If index of the column is specified then it will remove the selection from the particular column else it will clears all of the column selection + * @returns {boolean} + */ + clearColumnSelection(index: number): boolean; + + /** It is used to clear all the filtering done. + * @param {string} If field of the column is specified then it will clear the particular filtering column + * @returns {void} + */ + clearFiltering(field: string): void; + + /** Clear the searching from the grid + * @returns {void} + */ + clearSearching(): void; + + /** Clear all the row selection or at specific row selection based on the index provided + * @param {number} optional If index of the row is specified then it will remove the selection from the particular row else it will clears all of the row selection + * @returns {boolean} + */ + clearSelection(index: number): boolean; + + /** Clear the sorting from columns in the grid + * @returns {void} + */ + clearSorting(): void; + + /** Collapse all the group caption rows in grid + * @returns {void} + */ + collapseAll(): void; + + /** Collapse the group drop area in grid + * @returns {void} + */ + collapseGroupDropArea(): void; + + /** Add or remove columns in grid column collections + * @param {Array|string} Pass array of columns or string of field name to add/remove the column in grid + * @param {string} optional Pass add/remove action to be performed. By default "add" action will perform + * @returns {void} + */ + columns(columnDetails: Array|string, action: string): void; + + /** Refresh the grid with new data source + * @param {Array} Pass new data source to the grid + * @returns {void} + */ + dataSource(datasource: Array): void; + + /** Delete a record in grid control when allowDeleting is set as true + * @param {string} Pass the primary key field Name of the column + * @param {Array} Pass the json data of record need to be delete. + * @returns {void} + */ + deleteRecord(fieldName: string, data: Array): void; + + /** Destroy the grid widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Edit a particular cell based on the row index and field name provided in "batch" edit mode. + * @param {number} Pass row index to edit particular cell + * @param {string} Pass the field name of the column to perform batch edit + * @returns {void} + */ + editCell(index: number, fieldName: string): void; + + /** Send a save request in grid. + * @returns {void} + */ + endEdit(): void; + + /** Expand all the group caption rows in grid. + * @returns {void} + */ + expandAll(): void; + + /** Expand or collapse the row based on the row state in grid + * @param {JQuery} Pass the target object to expand/collapse the row based on its row state + * @returns {HTMLElement} + */ + expandCollapse($target: JQuery): HTMLElement; + + /** Expand the group drop area in grid. + * @returns {void} + */ + expandGroupDropArea(): void; + + /** Export the grid content to excel, word or pdf document. + * @param {string} Pass the controller action name corresponding to exporting + * @param {string} optionalASP server event name corresponding to exporting + * @param {boolean} optionalPass the multiple exporting value as true/false + * @param {Array} optionalPass the array of the gridIds to be filtered + * @returns {void} + */ + export(action: string, serverEvent: string, multipleExport: boolean, gridIds: Array): void; + + /** Send a filtering request to filter one column in grid. + * @param {string} Pass the field name of the column + * @param {string} string/integer/dateTime operator + * @param {string|number} Pass the value to be filtered in a column + * @param {string} Pass the predicate as and/or + * @param {boolean} optional Pass the match case value as true/false + * @returns {void} + */ + filterColumn(fieldName: string, filterOperator: string, filterValue: string|number, predicate: string, matchcase: boolean): void; + + /** Send a filtering request to filter single or multiple column in grid. + * @param {Array} Pass array of filterColumn query for performing filter operation + * @returns {void} + */ + filterColumn(filterQueries: Array): void; + + /** Get the batch changes of edit, delete and add operations of grid. + * @returns {any} + */ + getBatchChanges(): any; + + /** Get the browser details + * @returns {any} + */ + getBrowserDetails(): any; + + /** Get the column details based on the given field in grid + * @param {string} Pass the field name of the column to get the corresponding column object + * @returns {any} + */ + getColumnByField(fieldName: string): any; + + /** Get the column details based on the given header text in grid. + * @param {string} Pass the header text of the column to get the corresponding column object + * @returns {any} + */ + getColumnByHeaderText(headerText: string): any; + + /** Get the column details based on the given column index in grid + * @param {number} Pass the index of the column to get the corresponding column object + * @returns {any} + */ + getColumnByIndex(columnIndex: number): any; + + /** Get the list of field names from column collection in grid. + * @returns {Array} + */ + getColumnFieldNames(): Array; + + /** Get the column index of the given field in grid. + * @param {string} Pass the field name of the column to get the corresponding column index + * @returns {number} + */ + getColumnIndexByField(fieldName: string): number; + + /** Get the content div element of grid. + * @returns {HTMLElement} + */ + getContent(): HTMLElement; + + /** Get the content table element of grid + * @returns {HTMLElement} + */ + getContentTable(): HTMLElement; + + /** Get the data of currently edited cell value in "batch" edit mode + * @returns {any} + */ + getCurrentEditCellData(): any; + + /** Get the current page index in grid pager. + * @returns {number} + */ + getCurrentIndex(): number; + + /** Get the current page data source of grid. + * @returns {Array} + */ + getCurrentViewData(): Array; + + /** Get the column field name from the given header text in grid. + * @param {string} Pass header text of the column to get its corresponding field name + * @returns {string} + */ + getFieldNameByHeaderText(headerText: string): string; + + /** Get the filter bar of grid + * @returns {HTMLElement} + */ + getFilterBar(): HTMLElement; + + /** Get the records filtered or searched in Grid + * @returns {Array} + */ + getFilteredRecords(): Array; + + /** Get the footer content of grid. + * @returns {HTMLElement} + */ + getFooterContent(): HTMLElement; + + /** Get the footer table element of grid. + * @returns {HTMLElement} + */ + getFooterTable(): HTMLElement; + + /** Get the header content div element of grid. + * @returns {HTMLElement} + */ + getHeaderContent(): HTMLElement; + + /** Get the header table element of grid + * @returns {HTMLElement} + */ + getHeaderTable(): HTMLElement; + + /** Get the column header text from the given field name in grid. + * @param {string} Pass field name of the column to get its corresponding header text + * @returns {string} + */ + getHeaderTextByFieldName(field: string): string; + + /** Get the names of all the hidden column collections in grid. + * @returns {Array} + */ + getHiddenColumnNames(): Array; + + /** Get the row index based on the given tr element in grid. + * @param {JQuery} Pass the tr element in grid content to get its row index + * @returns {number} + */ + getIndexByRow($tr: JQuery): number; + + /** Get the pager of grid. + * @returns {HTMLElement} + */ + getPager(): HTMLElement; + + /** Get the names of primary key columns in Grid + * @returns {Array} + */ + getPrimaryKeyFieldNames(): Array; + + /** Get the rows(tr element) from the given from and to row index in grid + * @param {number} Pass the from index from which the rows to be returned + * @param {number} Pass the to index to which the rows to be returned + * @returns {HTMLElement} + */ + getRowByIndex(from: number, to: number): HTMLElement; + + /** Get the row height of grid. + * @returns {number} + */ + getRowHeight(): number; + + /** Get the rows(tr element)of grid which is displayed in the current page. + * @returns {HTMLElement} + */ + getRows(): HTMLElement; + + /** Get the scroller object of grid. + * @returns {any} + */ + getScrollObject(): any; + + /** Get the selected records details in grid. + * @returns {void} + */ + getSelectedRecords(): void; + + /** Get the names of all the visible column collections in grid + * @returns {Array} + */ + getVisibleColumnNames(): Array; + + /** Send a paging request to specified page in grid + * @param {number} Pass the page index to perform paging at specified page index + * @returns {void} + */ + gotoPage(pageIndex: number): void; + + /** Send a column grouping request in grid. + * @param {string} Pass the field Name of the column to be grouped in grid control + * @returns {void} + */ + groupColumn(fieldName: string): void; + + /** Hide columns from the grid based on the header text + * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to hide + * @returns {void} + */ + hideColumns(headerText: Array|string): void; + + /** Print the grid control + * @returns {void} + */ + print(): void; + + /** It is used to refresh and reset the changes made in "batch" edit mode + * @returns {void} + */ + refreshBatchEditChanges(): void; + + /** Refresh the grid contents. The template refreshment is based on the argument passed along with this method + * @param {boolean} optional When templateRefresh is set true, template and grid contents both are refreshed in grid else only grid content is refreshed + * @returns {void} + */ + refreshContent(templateRefresh: boolean): void; + + /** Refresh the template of the grid + * @returns {void} + */ + refreshTemplate(): void; + + /** Refresh the toolbar items in grid. + * @returns {void} + */ + refreshToolbar(): void; + + /** Remove a column or collection of columns from a sorted column collections in grid. + * @param {Array|string} Pass array of field names of the columns to remove a collection of sorted columns or pass a string of field name to remove a column from sorted column collections + * @returns {void} + */ + removeSortedColumns(fieldName: Array|string): void; + + /** Creates a grid control + * @returns {void} + */ + render(): void; + + /** Re-order the column in grid + * @param {string} Pass the from field name of the column needs to be changed + * @param {string} Pass the to field name of the column needs to be changed + * @returns {void} + */ + reorderColumns(fromFieldName: string, toFieldName: string): void; + + /** Reset the model collections like pageSettings, groupSettings, filterSettings, sortSettings and summaryRows. + * @returns {void} + */ + resetModelCollections(): void; + + /** Resize the columns by giving column name and width for the corresponding one. + * @param {string} Pass the column name that needs to be changed + * @param {string} Pass the width to resize the particular columns + * @returns {void} + */ + resizeColumns(column: string, width: string): void; + + /** Resolves row height issue when unbound column is used with FrozenColumn + * @returns {void} + */ + rowHeightRefresh(): void; + + /** Save the particular edited cell in grid. + * @returns {boolean} + */ + saveCell(): boolean; + + /** Set dimension for grid with corresponding to grid parent. + * @returns {void} + */ + setDimension(): void; + + /** Send a request to grid to refresh the width set to columns + * @returns {void} + */ + setWidthToColumns(): void; + + /** Send a search request to grid with specified string passed in it + * @param {string} Pass the string to search in Grid records + * @returns {void} + */ + search(searchString: string): void; + + /** Select cells in grid. + * @param {any} It is used to set the starting index of row and indexes of cells for that corresponding row for selecting cells. + * @returns {void} + */ + selectCells(rowCellIndexes: any): void; + + /** Select columns in grid. + * @param {number} It is used to set the starting index of column for selecting columns. + * @returns {void} + */ + selectColumns(fromIndex: number): void; + + /** Select rows in grid. + * @param {number} It is used to set the starting index of row for selecting rows. + * @param {number} It is used to set the ending index of row for selecting rows. + * @returns {void} + */ + selectRows(fromIndex: number, toIndex: number): void; + + /** Select rows in grid. + * @param {Array} Pass array of rowIndexes for selecting rows + * @returns {void} + */ + selectRows(rowIndexes: Array): void; + + /** Used to update a particular cell value.Note: It will work only for Local Data. + * @returns {void} + */ + setCellText(): void; + + /** Used to update a particular cell value based on specified row Index and the fieldName. + * @param {number} It is used to set the index for selecting the row. + * @param {string} It is used to set the field name for selecting column. + * @param {any} It is used to set the value for the selected cell. + * @returns {void} + */ + setCellValue(Index: number, fieldName: string, value: any): void; + + /** Set validation to a field during editing. + * @param {string} Specify the field name of the column to set validation rules + * @param {any} Specify the validation rules for the field + * @returns {void} + */ + setValidationToField(fieldName: string, rules: any): void; + + /** Show columns in the grid based on the header text + * @param {Array|string} you can pass either array of header text of various columns or a header text of a column to show + * @returns {void} + */ + showColumns(headerText: Array|string): void; + + /** Send a sorting request in grid. + * @param {string} Pass the field name of the column as columnName for which sorting have to be performed + * @param {string} optional Pass the sort direction ascending/descending by which the column have to be sort. By default it is sorting in an ascending order + * @returns {void} + */ + sortColumn(columnName: string, sortingDirection: string): void; + + /** Send an edit record request in grid + * @param {JQuery} Pass the tr- selected row element to be edited in grid + * @returns {HTMLElement} + */ + startEdit($tr: JQuery): HTMLElement; + + /** Un-group a column from grouped columns collection in grid + * @param {string} Pass the field Name of the column to be ungrouped from grouped column collection + * @returns {void} + */ + ungroupColumn(fieldName: string): void; + + /** Update a edited record in grid control when allowEditing is set as true. + * @param {string} Pass the primary key field Name of the column + * @param {Array} Pass the edited json data of record need to be update. + * @returns {void} + */ + updateRecord(fieldName: string, data: Array): void; + + /** It adapts grid to its parent element or to the browsers window. + * @returns {void} + */ + windowonresize(): void; +} +export module Grid{ + +export interface Model { + + /**Gets or sets a value that indicates whether to customizing cell based on our needs. + * @Default {false} + */ + allowCellMerging?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic grouping behavior. Grouping can be done by drag on drop desired columns to grid’s GroupDropArea. This can be further customized through “groupSettings” property. + * @Default {false} + */ + allowGrouping?: boolean; + + /**Gets or sets a value that indicates whether to enable keyboard support for performing grid actions. selectionType – Gets or sets a value that indicates whether to enable single row or multiple rows selection behavior in grid. Multiple selection can be done through by holding CTRL and clicking the grid rows + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic filtering behavior on grid. Filtering can be used to limit the records displayed using required criteria and this can be further customized through “filterSettings” property + * @Default {false} + */ + allowFiltering?: boolean; + + /**Gets or sets a value that indicates whether to enable the dynamic sorting behavior on grid data. Sorting can be done through clicking on particular column header. + * @Default {false} + */ + allowSorting?: boolean; + + /**Gets or sets a value that indicates whether to enable multi columns sorting behavior in grid. Sort multiple columns by holding CTRL and click on the corresponding column header. + * @Default {false} + */ + allowMultiSorting?: boolean; + + /**This specifies the grid to show the paginated data. Also enables pager control at the bottom of grid for dynamic navigation through data source. Paging can be further customized through “pageSettings” property. + * @Default {false} + */ + allowPaging?: boolean; + + /**Gets or sets a value that indicates whether to enable the columns reordering behavior in the grid. Reordering can be done through by drag and drop the particular column from one index to another index within the grid. + * @Default {false} + */ + allowReordering?: boolean; + + /**Gets or sets a value that indicates whether the column is non resizable. Column width is set automatically based on the content or header text which is large. + * @Default {false} + */ + allowResizeToFit?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic resizable of columns. Resize the width of the columns by simply click and move the particular column header line + * @Default {false} + */ + allowResizing?: boolean; + + /**Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually + * @Default {false} + */ + allowScrolling?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic searching behavior in grid. Currently search box can be enabled through “toolbarSettings” + * @Default {false} + */ + allowSearching?: boolean; + + /**Gets or sets a value that indicates whether user can select rows on grid. On enabling feature, selected row will be highlighted. + * @Default {true} + */ + allowSelection?: boolean; + + /**Gets or sets a value that indicates whether the Content will wrap to the next line if the content exceeds the boundary of the Column Cells. + * @Default {false} + */ + allowTextWrap?: boolean; + + /**Gets or sets a value that indicates whether to enable the multiple exporting behavior on grid data. + * @Default {false} + */ + allowMultipleExporting?: boolean; + + /**Gets or sets a value that indicates to define common width for all the columns in the grid. + */ + commonWidth?: number; + + /**Gets or sets a value that indicates to enable the visibility of the grid lines. + * @Default {ej.Grid.GridLines.Both} + */ + gridLines?: ej.Grid.GridLines|string; + + /**This specifies the grid to add the grid control inside the grid row of the parent with expand/collapse options + * @Default {null} + */ + childGrid?: any; + + /**Used to enable or disable static width settings for column. If the columnLayout is set as fixed, then column width will be static. + * @Default {ej.Grid.ColumnLayout.Auto} + */ + columnLayout?: ej.Grid.ColumnLayout|string; + + /**Gets or sets an object that indicates to render the grid with specified columns + * @Default {[]} + */ + columns?: Array; + + /**Gets or sets an object that indicates whether to customize the context menu behavior of the grid. + */ + contextMenuSettings?: ContextMenuSettings; + + /**Gets or sets a value that indicates to render the grid with custom theme. allowScrolling – Gets or sets a value that indicates whether to enable the scrollbar in the grid and view the records by scroll through the grid manually + */ + cssClass?: string; + + /**Gets or sets the data to render the grid with records + * @Default {null} + */ + dataSource?: any; + + /**Default Value: + * @Default {null} + */ + detailsTemplate?: string; + + /**Gets or sets an object that indicates whether to customize the editing behavior of the grid. + */ + editSettings?: EditSettings; + + /**Gets or sets a value that indicates whether to enable the alternative rows differentiation in the grid records based on corresponding theme. + * @Default {true} + */ + enableAltRow?: boolean; + + /**Gets or sets a value that indicates whether to enable the save action in the grid through row selection + * @Default {true} + */ + enableAutoSaveOnSelectionChange?: boolean; + + /**Gets or sets a value that indicates whether to enable mouse over effect on the corresponding column header cell of the grid + * @Default {false} + */ + enableHeaderHover?: boolean; + + /**Gets or sets a value that indicates whether to persist the grid model state in page using applicable medium i.e., HTML5 localStorage or cookies + * @Default {false} + */ + enablePersistence?: boolean; + + /**Gets or sets a value that indicates whether the grid rows has to be rendered as detail view in mobile mode + * @Default {false} + */ + enableResponsiveRow?: boolean; + + /**Gets or sets a value that indicates whether to enable mouse over effect on corresponding grid row. + * @Default {true} + */ + enableRowHover?: boolean; + + /**Align content in the grid control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /**To Disable the mouse swipe property as false. + * @Default {true} + */ + enableTouch?: boolean; + + /**Gets or sets an object that indicates whether to customize the filtering behavior of the grid + */ + filterSettings?: FilterSettings; + + /**Gets or sets an object that indicates whether to customize the grouping behavior of the grid. + */ + groupSettings?: GroupSettings; + + /**Gets or sets an object that indicates whether to auto wrap the grid header or content or both + */ + textWrapSettings?: TextWrapSettings; + + /**Gets or sets a value that indicates whether the grid design has be to made responsive. + * @Default {false} + */ + isResponsive?: boolean; + + /**This specifies to change the key in keyboard interaction to grid control + * @Default {null} + */ + keySettings?: any; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Gets or sets a value that indicates whether to set the minimum width of the responsive grid while isResponsive property is true and enableResponsiveRow property is set as false. + * @Default {0} + */ + minWidth?: number; + + /**Gets or sets an object that indicates whether to modify the pager default configuration. + */ + pageSettings?: PageSettings; + + /**Query the dataSource from the table for Grid. + * @Default {null} + */ + query?: any; + + /**Gets or sets a value that indicates to render the grid with template rows. The template row must be a table row. That table row must have the JavaScript render binding format ({{:columnName}}) then the grid data source binds the data to the corresponding table row of the template. + * @Default {null} + */ + rowTemplate?: string; + + /**Gets or sets an object that indicates whether to customize the scrolling behavior of the grid. + */ + scrollSettings?: ScrollSettings; + + /**Gets or sets an object that indicates whether to customize the searching behavior of the grid + */ + searchSettings?: SearchSettings; + + /**Gets a value that indicates whether the grid model to hold multiple selected records . selectedRecords can be used to displayed hold the single or multiple selected records using “selectedRecords” property + * @Default {null} + */ + selectedRecords?: Array; + + /**Gets or sets a value that indicates to select the row while initializing the grid + * @Default {-1} + */ + selectedRowIndex?: number; + + /**This property is used to configure the selection behavior of the grid. + */ + selectionSettings?: SelectionSettings; + + /**The row selection behavior of grid. Accepting types are "single" and "multiple". + * @Default {ej.Grid.SelectionType.Single} + */ + selectionType?: ej.Grid.SelectionType|string; + + /**This specifies to add new editable row dynamically at the either top or bottom of the grid. + * @Default {false} + */ + showAddNewRow?: boolean; + + /**Default Value: + * @Default {false} + */ + showColumnChooser?: boolean; + + /**Default Value: + * @Default {true} + */ + showInColumnChooser?: boolean; + + /**Gets or sets a value that indicates stacked header should be shown on grid layout when the property “stackedHeaderRows” is set. + * @Default {false} + */ + showStackedHeader?: boolean; + + /**Gets or sets a value that indicates summary rows should be shown on grid layout when the property “summaryRows” is set + * @Default {false} + */ + showSummary?: boolean; + + /**Gets or sets a value that indicates whether to customize the sorting behavior of the grid. + */ + sortSettings?: SortSettings; + + /**Gets or sets an object that indicates to managing the collection of stacked header rows for the grid. + * @Default {[]} + */ + stackedHeaderRows?: Array; + + /**Gets or sets an object that indicates to managing the collection of summary rows for the grid. + * @Default {[]} + */ + summaryRows?: Array; + + /**Gets or sets an object that indicates whether to enable the toolbar in the grid and add toolbar items + */ + toolbarSettings?: ToolbarSettings; + + /**Triggered for every grid action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every grid action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered for every grid action server failure event.*/ + actionFailure? (e: ActionFailureEventArgs): void; + + /**Triggered when record batch add.*/ + batchAdd? (e: BatchAddEventArgs): void; + + /**Triggered when record batch delete.*/ + batchDelete? (e: BatchDeleteEventArgs): void; + + /**Triggered before the batch add.*/ + beforeBatchAdd? (e: BeforeBatchAddEventArgs): void; + + /**Triggered before the batch delete.*/ + beforeBatchDelete? (e: BeforeBatchDeleteEventArgs): void; + + /**Triggered before the batch save.*/ + beforeBatchSave? (e: BeforeBatchSaveEventArgs): void; + + /**Triggered before the record is going to be edited.*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered when record cell edit.*/ + cellEdit? (e: CellEditEventArgs): void; + + /**Triggered when record cell save.*/ + cellSave? (e: CellSaveEventArgs): void; + + /**Triggered after the cell is selected.*/ + cellSelected? (e: CellSelectedEventArgs): void; + + /**Triggered before the cell is going to be selected.*/ + cellSelecting? (e: CellSelectingEventArgs): void; + + /**Triggered when the column is being dragged.*/ + columnDrag? (e: ColumnDragEventArgs): void; + + /**Triggered when column dragging begins.*/ + columnDragStart? (e: ColumnDragStartEventArgs): void; + + /**Triggered when the column is dropped.*/ + columnDrop? (e: ColumnDropEventArgs): void; + + /**Triggered after the column is selected.*/ + columnSelected? (e: ColumnSelectedEventArgs): void; + + /**Triggered before the column is going to be selected.*/ + columnSelecting? (e: ColumnSelectingEventArgs): void; + + /**Triggered when context menu item is clicked*/ + contextClick? (e: ContextClickEventArgs): void; + + /**Triggered before the context menu is opened.*/ + contextOpen? (e: ContextOpenEventArgs): void; + + /**Triggered when the grid is rendered completely.*/ + create? (e: CreateEventArgs): void; + + /**Triggered when the grid is bound with data during initial rendering.*/ + dataBound? (e: DataBoundEventArgs): void; + + /**Triggered when grid going to destroy.*/ + destroy? (e: DestroyEventArgs): void; + + /**Triggered when detail template row is clicked to collapse.*/ + detailsCollapse? (e: DetailsCollapseEventArgs): void; + + /**Triggered detail template row is initialized.*/ + detailsDataBound? (e: DetailsDataBoundEventArgs): void; + + /**Triggered when detail template row is clicked to expand.*/ + detailsExpand? (e: DetailsExpandEventArgs): void; + + /**Triggered after the record is added.*/ + endAdd? (e: EndAddEventArgs): void; + + /**Triggered after the record is deleted.*/ + endDelete? (e: EndDeleteEventArgs): void; + + /**Triggered after the record is edited.*/ + endEdit? (e: EndEditEventArgs): void; + + /**Triggered initial load.*/ + load? (e: LoadEventArgs): void; + + /**Triggered every time a request is made to access particular cell information, element and data.*/ + mergeCellInfo? (e: MergeCellInfoEventArgs): void; + + /**Triggered every time a request is made to access particular cell information, element and data.*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggered when record is clicked.*/ + recordClick? (e: RecordClickEventArgs): void; + + /**Triggered when record is double clicked.*/ + recordDoubleClick? (e: RecordDoubleClickEventArgs): void; + + /**Triggered after column resized.*/ + resized? (e: ResizedEventArgs): void; + + /**Triggered when column resize end.*/ + resizeEnd? (e: ResizeEndEventArgs): void; + + /**Triggered when column resize start.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Triggered when right clicked on grid element.*/ + rightClick? (e: RightClickEventArgs): void; + + /**Triggered every time a request is made to access row information, element and data.*/ + rowDataBound? (e: RowDataBoundEventArgs): void; + + /**Triggered after the row is selected.*/ + rowSelected? (e: RowSelectedEventArgs): void; + + /**Triggered before the row is going to be selected.*/ + rowSelecting? (e: RowSelectingEventArgs): void; + + /**Triggered when refresh the template column elements in the Grid.*/ + templateRefresh? (e: TemplateRefreshEventArgs): void; + + /**Triggered when toolbar item is clicked in grid.*/ + toolBarClick? (e: ToolBarClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current selected page number. + */ + currentPage?: number; + + /**Returns the previous selected page number. + */ + previousPage?: number; + + /**Returns the end row index of that current page. + */ + endIndex?: number; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the start row index of that current page. + */ + startIndex?: number; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns the column sort direction. + */ + columnSortDirection?: string; + + /**Returns current edited row. + */ + row?: any; + + /**Returns the current action event type. + */ + originalEventType?: string; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the record object (JSON). + */ + data?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the selected row index. + */ + selectedRow?: number; + + /**Returns selected row for delete. + */ + tr?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: any; + + /**Returns filter details. + */ + filterCollection?: any; + + /**Returns type of the column like number, string and so on. + */ + columnType?: string; + + /**Returns the excel filter model. + */ + filtermodel?: any; + + /**Returns the dataSource. + */ + dataSource?: any; + + /**Returns the query manager. + */ + query?: any; + + /**Returns the customfilter option value. + */ + isCustomFilter?: boolean; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current selected page number. + */ + currentPage?: number; + + /**Returns the previous selected page number. + */ + previousPage?: number; + + /**Returns the end row index of that current page. + */ + endIndex?: number; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns the start row index of the current page. + */ + startIndex?: number; + + /**Returns grid element. + */ + target?: any; + + /**Returns the current sorted column field name. + */ + columnName?: string; + + /**Returns the column sort direction. + */ + columnSortDirection?: string; + + /**Returns current edited row. + */ + row?: any; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the record object (JSON). + */ + data?: any; + + /**Returns the selectedRow index. + */ + selectedRow?: number; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns selected row for delete. + */ + tr?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; + + /**Returns the dataSource. + */ + dataSource?: any; + + /**Returns the excel filter model. + */ + filtermodel?: any; + + /**Returns type of the column like number, string and so on. + */ + columnType?: string; + + /**Returns the customfilter option value. + */ + isCustomFilter?: boolean; +} + +export interface ActionFailureEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the error return by server. + */ + error?: any; + + /**Returns the current selected page number. + */ + currentPage?: number; + + /**Returns the previous selected page number. + */ + previousPage?: number; + + /**Returns the end row index of that current page. + */ + endIndex?: number; + + /**Returns current action event type. + */ + originalEventType?: string; + + /**Returns the start row index of the current page. + */ + startIndex?: number; + + /**Returns grid element. + */ + target?: any; + + /**Returns the current sorted column field name. + */ + columnName?: string; + + /**Returns the column sort direction. + */ + columnSortDirection?: string; + + /**Returns current edited row. + */ + row?: any; + + /**Returns primary key. + */ + primaryKey?: string; + + /**Returns primary key value. + */ + primaryKeyValue?: string; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the record object (JSON). + */ + data?: any; + + /**Returns the selectedRow index. + */ + selectedRow?: number; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns selected row for delete. + */ + tr?: any; + + /**Returns current filtering column field name. + */ + currentFilteringColumn?: string; + + /**Returns filter details. + */ + filterCollection?: any; +} + +export interface BatchAddEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column object. + */ + columnObject?: any; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the row element. + */ + row?: any; + + /**Returns the primaryKey. + */ + primaryKey?: any; + + /**Returns the cell object. + */ + cell?: any; +} + +export interface BatchDeleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the primary key. + */ + primaryKey?: any; + + /**Returns the row Index. + */ + rowIndex?: number; +} + +export interface BeforeBatchAddEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the default data object. + */ + defaultData?: any; + + /**Returns the primaryKey. + */ + primaryKey?: any; +} + +export interface BeforeBatchDeleteEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the primaryKey. + */ + primaryKey?: any; + + /**Returns the row index. + */ + rowIndex?: number; + + /**Returns the row data. + */ + rowData?: any; + + /**Returns the row element. + */ + row?: any; +} + +export interface BeforeBatchSaveEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the changed record object. + */ + batchChanges?: any; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current edited row. + */ + row?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the primary key. + */ + primaryKey?: any; + + /**Returns the primary key value. + */ + primaryKeyValue?: any; + + /**Returns the edited row index. + */ + rowIndex?: number; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellEditEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the validation rules. + */ + validationRules?: any; + + /**Returns the column name. + */ + columnName?: string; + + /**Returns the cell value. + */ + value?: string; + + /**Returns the row data object. + */ + rowData?: any; + + /**Returns the previous value of the cell. + */ + previousValue?: string; + + /**Returns the column object. + */ + columnObject?: any; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns isForeignKey option value. + */ + isForeignKey?: boolean; +} + +export interface CellSaveEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column name. + */ + columnName?: string; + + /**Returns the cell value. + */ + value?: string; + + /**Returns the row data object. + */ + rowData?: any; + + /**Returns the previous value of the cell. + */ + previousValue?: string; + + /**Returns the column object. + */ + columnObject?: any; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns isForeignKey option value. + */ + isForeignKey?: boolean; +} + +export interface CellSelectedEventArgs { + + /**Returns the selected cell index value. + */ + cellIndex?: number; + + /**Returns the previous selected cell index value. + */ + previousRowCellIndex?: number; + + /**Returns the selected cell element. + */ + currentCell?: any; + + /**Returns the previous selected cell element. + */ + previousRowCell?: any; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the selected row cell index values. + */ + selectedRowCellIndex?: Array; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellSelectingEventArgs { + + /**Returns the selected cell index value. + */ + cellIndex?: number; + + /**Returns the previous selected cell index value. + */ + previousRowCellIndex?: number; + + /**Returns the selected cell element. + */ + currentCell?: any; + + /**Returns the previous selected cell element. + */ + previousRowCell?: any; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns whether the ctrl key is pressed while selecting cell + */ + isCtrlKeyPressed?: boolean; + + /**Returns whether the shift key is pressed while selecting cell + */ + isShiftKeyPressed?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDragEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns draggable element type. + */ + draggableType?: any; + + /**Returns the draggable column object. + */ + column?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns target elements based on mouse move position. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDragStartEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns draggable element type. + */ + draggableType?: any; + + /**Returns the draggable column object. + */ + column?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns drag start element. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnDropEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns draggable element type. + */ + draggableType?: string; + + /**Returns the draggable column object. + */ + column?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns dropped dragged element. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnSelectedEventArgs { + + /**Returns the selected cell index value. + */ + columnIndex?: number; + + /**Returns the previous selected column index value. + */ + previousColumnIndex?: number; + + /**Returns the selected header cell element. + */ + headerCell?: any; + + /**Returns the previous selected header cell element. + */ + prevColumnHeaderCell?: any; + + /**Returns corresponding column object (JSON). + */ + column?: any; + + /**Returns the selected columns values. + */ + selectedColumnsIndex?: Array; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ColumnSelectingEventArgs { + + /**Returns the selected column index value. + */ + columnIndex?: number; + + /**Returns the previous selected column index value. + */ + previousColumnIndex?: number; + + /**Returns the selected header cell element. + */ + headerCell?: any; + + /**Returns the previous selected header cell element. + */ + prevColumnHeaderCell?: any; + + /**Returns corresponding column object (JSON). + */ + column?: any; + + /**Returns whether the ctrl key is pressed while selecting cell + */ + isCtrlKeyPressed?: boolean; + + /**Returns whether the shift key is pressed while selecting cell + */ + isShiftKeyPressed?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ContextClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the status of contextmenu item which denotes its enabled state + */ + status?: boolean; + + /**Returns the target item. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ContextOpenEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the status of contextmenu item which denotes its enabled state + */ + status?: boolean; + + /**Returns the target item. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DetailsCollapseEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns detail row element. + */ + detailsRow?: any; + + /**Returns master row of detail row record object (JSON). + */ + masterData?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns master row element. + */ + masterRow?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DetailsDataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns details row element. + */ + detailsElement?: any; + + /**Returns the details row data. + */ + data?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DetailsExpandEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns detail row element. + */ + detailsRow?: any; + + /**Returns master row of detail row record object (JSON). + */ + masterData?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns master row element. + */ + masterRow?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndAddEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns added data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndDeleteEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndEditEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns modified data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface MergeCellInfoEventArgs { + + /**Returns grid cell. + */ + cell?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current row record object (JSON). + */ + data?: any; + + /**Returns the text value in the cell. + */ + text?: string; + + /**Returns the column object. + */ + column?: any; + + /**Method to merge Grid rows. + */ + rowMerge?: void; + + /**Method to merge Grid columns. + */ + colMerge?: void; + + /**Method to merge Grid rows and columns. + */ + merge?: void; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface QueryCellInfoEventArgs { + + /**Returns grid cell. + */ + cell?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current row record object (JSON). + */ + data?: any; + + /**Returns the text value in the cell. + */ + text?: string; + + /**Returns the column object. + */ + column?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RecordClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the jquery object of the current selected row. + */ + row?: any; + + /**Returns the current selected cell. + */ + cell?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the cell index value. + */ + cellIndex?: number; + + /**Returns the corresponding cell value. + */ + cellValue?: string; + + /**Returns the Header text of the column corresponding to the selected cell. + */ + columnName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RecordDoubleClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the jquery object of the current selected row. + */ + row?: any; + + /**Returns the current selected cell. + */ + cell?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the selected cell index value. + */ + cellIndex?: number; + + /**Returns the corresponding cell value. + */ + cellValue?: string; + + /**Returns the Header text of the column corresponding to the selected cell. + */ + columnName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ResizedEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the column object. + */ + column?: any; + + /**Returns the grid object. + */ + target?: any; + + /**Returns the old width value. + */ + oldWidth?: number; + + /**Returns the new width value. + */ + newWidth?: number; +} + +export interface ResizeEndEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the column object. + */ + column?: any; + + /**Returns the grid object. + */ + target?: any; + + /**Returns the old width value. + */ + oldWidth?: number; + + /**Returns the new width value. + */ + newWidth?: number; + + /**Returns the extra width value. + */ + extra?: number; +} + +export interface ResizeStartEventArgs { + + /**Returns the grid model. + */ + model?: any; + + /**Returns deleted data. + */ + data?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the column index. + */ + columnIndex?: number; + + /**Returns the column object. + */ + column?: any; + + /**Returns the grid object. + */ + target?: any; + + /**Returns the old width value. + */ + oldWidth?: number; +} + +export interface RightClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + currentData?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the current selected row. + */ + row?: any; + + /**Returns the selected row data object. + */ + data?: any; + + /**Returns the cell index of the selected cell. + */ + cellIndex?: number; + + /**Returns the cell value. + */ + cellValue?: string; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowDataBoundEventArgs { + + /**Returns grid row. + */ + row?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current row record object (JSON). + */ + data?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowSelectedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the foreign key record object (JSON). + */ + foreignKeyData?: any; + + /**Returns the row index of the selected row. + */ + rowIndex?: number; + + /**Returns the current selected row. + */ + row?: any; + + /**Returns the previous selected row element. + */ + prevRow?: any; + + /**Returns the previous selected row index. + */ + prevRowIndex?: number; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowSelectingEventArgs { + + /**Returns the selected row index value. + */ + rowIndex?: number; + + /**Returns the selected row element. + */ + row?: any; + + /**Returns the previous selected row element. + */ + prevRow?: any; + + /**Returns the previous selected row index. + */ + prevRowIndex?: number; + + /**Returns current record object (JSON). + */ + data?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface TemplateRefreshEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the cell object. + */ + cell?: any; + + /**Returns the column object. + */ + column?: any; + + /**Returns the current row data. + */ + data?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the current row index. + */ + rowIndex?: number; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ToolBarClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the status of toolbar item which denotes its enabled state + */ + status?: boolean; + + /**Returns the target item. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the grid model. + */ + gridModel?: any; + + /**Returns the toolbar object of the selected toolbar element. + */ + toolbarData?: any; +} + +export interface ColumnsCommands { + + /**Gets or sets an object that indicates to define all the button options which are available in ejButton. + */ + buttonOptions?: any; + + /**Gets or sets a value that indicates to add the command column button. See unboundType + */ + type?: ej.Grid.UnboundType|string; +} + +export interface Columns { + + /**Gets or sets a value that indicates whether to enable editing behavior for particular column. + * @Default {true} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic filtering behavior for particular column. + * @Default {true} + */ + allowFiltering?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic grouping behavior for particular column. + * @Default {true} + */ + allowGrouping?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic sorting behavior for particular column. + * @Default {true} + */ + allowSorting?: boolean; + + /**Gets or sets a value that indicates whether to enable dynamic resizable for particular column. + * @Default {true} + */ + allowResizing?: boolean; + + /**Used to hide the particular column in column chooser by giving value as false. + * @Default {true} + */ + showInColumnChooser?: boolean; + + /**Gets or sets an object that indicates to define a command column in the grid. + * @Default {[]} + */ + commands?: Array; + + /**Gets or sets a value that indicates to provide custom css for an individual column. + */ + cssClass?: string; + + /**Gets or sets a value that indicates the attribute values to the td element of a particular column + */ + customAttributes?: any; + + /**Gets or sets a value that indicates to bind the external datasource to the particular column when columnEditType as "dropdownedit" and also it is used to bind the datasource to the foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column. + * @Default {null} + */ + dataSource?: Array; + + /**Gets or sets a value that indicates to display the specified default value while adding a new record to the grid + */ + defaultValue?: string|number|boolean|Date; + + /**Gets or sets a value that indicates to render the grid content and header with an html elements + * @Default {false} + */ + disableHtmlEncode?: boolean; + + /**Gets or sets a value that indicates to display a column value as checkbox or string + * @Default {true} + */ + displayAsCheckBox?: boolean; + + /**Gets or sets a value that indicates to customize ejNumericTextbox of an editable column. See editingType + */ + editParams?: any; + + /**Gets or sets a template that displays a custom editor used to edit column values. See editTemplate + * @Default {null} + */ + editTemplate?: any; + + /**Gets or sets a value that indicates to render the element(based on edit type) for editing the grid record. See editingType + * @Default {ej.Grid.EditingType.String} + */ + editType?: ej.Grid.EditingType|string; + + /**Gets or sets a value that indicates to display the columns in the grid mapping with column name of the dataSource. + */ + field?: string; + + /**Gets or sets a value that indicates to define foreign key field name of the grid datasource. + * @Default {null} + */ + foreignKeyField?: string; + + /**Gets or sets a value that indicates to bind the field which is in foreign column datasource based on the foreignKeyField + * @Default {null} + */ + foreignKeyValue?: string; + + /**Gets or sets a value that indicates the format for the text applied on the column + */ + format?: string; + + /**Gets or sets a value that indicates to add the template within the header element of the particular column. + * @Default {null} + */ + headerTemplateID?: string; + + /**Gets or sets a value that indicates to display the title of that particular column. + */ + headerText?: string; + + /**This defines the text alignment of a particular column header cell value. See headerTextAlign + * @Default {ej.TextAlign.Left} + */ + headerTextAlign?: ej.TextAlign|string; + + /**You can use this property to freeze selected columns in grid at the time of scrolling. + * @Default {false} + */ + isFrozen?: boolean; + + /**Gets or sets a value that indicates the column has an identity in the database. + * @Default {false} + */ + isIdentity?: boolean; + + /**Gets or sets a value that indicates the column is act as a primary key(read-only) of the grid. The editing is performed based on the primary key column + * @Default {false} + */ + isPrimaryKey?: boolean; + + /**Gets or sets a value that indicates whether to bind the column which are not in the datasource + * @Default {false} + */ + isUnbound?: boolean; + + /**Gets or sets a value that indicates whether to enables column template for a particular column. + * @Default {false} + */ + template?: boolean|string; + + /**Gets or sets a value that indicates to add the template as a particular column data . + * @Default {null} + */ + templateID?: string; + + /**Gets or sets a value that indicates to align the text within the column. See textAlign + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + + /**Sets the template for Tooltip in Grid Columns(both header and content) + */ + tooltip?: string; + + /**Sets the clip mode for Grid cell as ellipsis or clipped content(both header and content) + * @Default {ej.Grid.ClipMode.Clip} + */ + clipMode?: ej.Grid.ClipMode|string; + + /**Gets or sets a value that indicates to specify the data type of the specified columns. + */ + type?: string; + + /**Gets or sets a value that indicates to define constraints for saving data to the database. + */ + validationRules?: any; + + /**Gets or sets a value that indicates whether this column is visible in the grid. + * @Default {true} + */ + visible?: boolean; + + /**Gets or sets a value that indicates to define the width for a particular column in the grid. + */ + width?: number; +} + +export interface ContextMenuSettingsSubContextMenu { + + /**Used to get or set the corresponding custom context menu item to which the submenu to be appended. + * @Default {null} + */ + contextMenuItem?: string; + + /**Used to get or set the sub menu items to the custom context menu item. + * @Default {[]} + */ + subMenu?: Array; +} + +export interface ContextMenuSettings { + + /**Gets or sets a value that indicates whether to add the default context menu actions as a context menu items If enableContextMenu is true it will show all the items related to the target, if you want selected items from contextmenu you have to mention in the contextMenuItems + * @Default {[]} + */ + contextMenuItems?: Array; + + /**Gets or sets a value that indicates whether to add custom contextMenu items within the toolbar to perform any action in the grid + * @Default {[]} + */ + customContextMenuItems?: Array; + + /**Gets or sets a value that indicates whether to enable the context menu action in the grid. + * @Default {false} + */ + enableContextMenu?: boolean; + + /**Used to get or set the subMenu to the corresponding custom context menu item. + */ + subContextMenu?: Array; + + /**Gets or sets a value that indicates whether to disable the default context menu items in the grid. + * @Default {false} + */ + disabledefaultitems?: boolean; +} + +export interface EditSettings { + + /**Gets or sets a value that indicates whether to enable insert action in the editing mode. + * @Default {false} + */ + allowAdding?: boolean; + + /**Gets or sets a value that indicates whether to enable the delete action in the editing mode. + * @Default {false} + */ + allowDeleting?: boolean; + + /**Gets or sets a value that indicates whether to enable the edit action in the editing mode. + * @Default {false} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable the editing action while double click on the record + * @Default {true} + */ + allowEditOnDblClick?: boolean; + + /**This specifies the id of the template. This template can be used to display the data that you require to be edited using the Dialog Box + * @Default {null} + */ + dialogEditorTemplateID?: string; + + /**Gets or sets a value that indicates whether to define the mode of editing See editMode + * @Default {ej.Grid.EditMode.Normal} + */ + editMode?: ej.Grid.EditMode|string; + + /**This specifies the id of the template. This template can be used to display the data that you require to be edited using the External edit form + * @Default {null} + */ + externalFormTemplateID?: string; + + /**This specifies to set the position of an External edit form either in the top-right or bottom-left of the grid + * @Default {ej.Grid.FormPosition.BottomLeft} + */ + formPosition?: ej.Grid.FormPosition|string; + + /**This specifies the id of the template. This template can be used to display the data that you require to be edited using the Inline edit form + * @Default {null} + */ + inlineFormTemplateID?: string; + + /**This specifies to set the position of an adding new row either in the top or bottom of the grid + * @Default {ej.Grid.RowPosition.top} + */ + rowPosition?: ej.Grid.RowPosition|string; + + /**Gets or sets a value that indicates whether the confirm dialog has to be shown while saving or discarding the batch changes + * @Default {true} + */ + showConfirmDialog?: boolean; + + /**Gets or sets a value that indicates whether the confirm dialog has to be shown while deleting record + * @Default {false} + */ + showDeleteConfirmDialog?: boolean; + + /**Gets or sets a value that indicates whether the title for edit form is different from the primarykey column. + * @Default {null} + */ + titleColumn?: string; + + /**Gets or sets a value that indicates whether to display the add new form by default in the grid. + * @Default {false} + */ + showAddNewRow?: boolean; +} + +export interface FilterSettingsFilteredColumns { + + /**Gets or sets a value that indicates whether to define the field name of the column to be filter. + */ + field?: string; + + /**Gets or sets a value that indicates whether to define the filter condition to filtered column. + */ + operator?: ej.FilterOperators|string; + + /**Gets or sets a value that indicates whether to define the predicate as and/or. + */ + predicate?: string; + + /**Gets or sets a value that indicates whether to define the value to be filtered in a column. + */ + value?: string|number; +} + +export interface FilterSettings { + + /**Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode + * @Default {false} + */ + enableCaseSensitivity?: boolean; + + /**This specifies the grid to starts the filter action while typing in the filterBar or after pressing the enter key. based on the filterBarMode. See filterBarMode + * @Default {ej.Grid.FilterBarMode.Immediate} + */ + filterBarMode?: ej.Grid.FilterBarMode|string; + + /**Gets or sets a value that indicates whether to define the filtered columns details programmatically at initial load + * @Default {[]} + */ + filteredColumns?: Array; + + /**This specifies the grid to show the filterBar or filterMenu to the grid records. See filterType + * @Default {ej.Grid.FilterType.FilterBar} + */ + filterType?: ej.Grid.FilterType|string; + + /**Gets or sets a value that indicates the maximum number of filter choices that can be showed in the excel styled filter menu. + * @Default {1000} + */ + maxFilterChoices?: number; + + /**This specifies the grid to show the filter text within the grid pager itself. + * @Default {true} + */ + showFilterBarMessage?: boolean; + + /**Gets or sets a value that indicates whether to enable the predicate options in the filtering menu + * @Default {false} + */ + showPredicate?: boolean; +} + +export interface GroupSettings { + + /**Gets or sets a value that customize the group caption format. + * @Default {null} + */ + captionFormat?: string; + + /**Gets or sets a value that indicates whether to enable the animation effects to the group drop area + * @Default {true} + */ + enableDropAreaAnimation?: boolean; + + /**Gets or sets a value that indicates whether to enable animation button option in the group drop area of the grid. + * @Default {false} + */ + enableDropAreaAutoSizing?: boolean; + + /**Gets or sets a value that indicates whether to add grouped columns programmatically at initial load + * @Default {[]} + */ + groupedColumns?: Array; + + /**Gets or sets a value that indicates whether to show the group drop area just above the column header. It can be used to avoid ungrouping the already grouped column using groupsettings. + * @Default {true} + */ + showDropArea?: boolean; + + /**Gets or sets a value that indicates whether to hide the grouped columns from the grid + * @Default {false} + */ + showGroupedColumn?: boolean; + + /**Gets or sets a value that indicates whether to show the group button image(toggle button)in the column header and also in the grouped column in the group drop area . It can be used to group/ungroup the columns by click on the toggle button. + * @Default {false} + */ + showToggleButton?: boolean; + + /**Gets or sets a value that indicates whether to enable the close button in the grouped column which is in the group drop area to ungroup the grouped column + * @Default {false} + */ + showUngroupButton?: boolean; +} + +export interface TextWrapSettings { + + /**This specifies the grid to apply the auto wrap for grid content or header or both. + * @Default {ej.Grid.WrapMode.Both} + */ + wrapMode?: ej.Grid.WrapMode|string; +} + +export interface PageSettings { + + /**Gets or sets a value that indicates whether to define which page to display currently in the grid + * @Default {1} + */ + currentPage?: number; + + /**Gets or sets a value that indicates whether to pass the current page information as a query string along with the url while navigating to other page. + * @Default {false} + */ + enableQueryString?: boolean; + + /**Gets or sets a value that indicates whether to enables pager template for the grid. + * @Default {false} + */ + enableTemplates?: boolean; + + /**Gets or sets a value that indicates whether to define the number of pages displayed in the pager for navigation + * @Default {8} + */ + pageCount?: number; + + /**Gets or sets a value that indicates whether to define the number of records displayed per page + * @Default {12} + */ + pageSize?: number; + + /**Gets or sets a value that indicates whether to enables default pager for the grid. + * @Default {false} + */ + showDefaults?: boolean; + + /**Gets or sets a value that indicates to add the template as a pager template for grid. + * @Default {null} + */ + template?: string; + + /**Get the value of total number of pages in the grid. The totalPages value is calculated based on page size and total records of grid + * @Default {null} + */ + totalPages?: number; + + /**Get the value of total number of records which is bound to the grid. The totalRecordsCount value is calculated based on dataSource bound to the grid. + * @Default {null} + */ + totalRecordsCount?: number; + + /**Gets or sets a value that indicates whether to define the number of pages to print + * @Default {ej.Grid.PrintMode.AllPages} + */ + printMode?: ej.Grid.PrintMode|string; +} + +export interface ScrollSettings { + + /**This specify the grid to to view data that you require without buffering the entire load of a huge database + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /**This specify the grid to enable/disable touch control for scrolling. + * @Default {true} + */ + enableTouchScroll?: boolean; + + /**This specify the grid to freeze particular columns at the time of scrolling. + * @Default {0} + */ + frozenColumns?: number; + + /**This specify the grid to freeze particular rows at the time of scrolling. + * @Default {0} + */ + frozenRows?: number; + + /**This specify the grid to show the vertical scroll bar, to scroll and view the grid contents. + * @Default {0} + */ + height?: number; + + /**This is used to define the mode of virtual scrolling in grid. See virtualScrollMode + * @Default {ej.Grid.VirtualScrollMode.Normal} + */ + virtualScrollMode?: ej.Grid.VirtualScrollMode|string; + + /**This specify the grid to show the horizontal scroll bar, to scroll and view the grid contents + * @Default {250} + */ + width?: number; + + /**This specify the scroll down pixel of mouse wheel, to scroll mouse wheel and view the grid contents. + * @Default {57} + */ + scrollOneStepBy?: number; +} + +export interface SearchSettings { + + /**This specify the grid to search for the value in particular columns that is mentioned in the field. + * @Default {[]} + */ + field?: any; + + /**This specifies the grid to search the particular data that is mentioned in the key. + */ + key?: string; + + /**It specifies the grid to search the records based on operator. + * @Default {contains} + */ + operator?: string; + + /**It enables or disables case-sensitivity while searching the search key in grid. + * @Default {true} + */ + ignoreCase?: boolean; +} + +export interface SelectionSettings { + + /**Gets or sets a value that indicates whether to enable the toggle selction behavior for row, cell and column. + * @Default {false} + */ + enableToggle?: boolean; + + /**Gets or sets a value that indicates whether to add the default selection actions as a seleciton mode.See selectionMode + * @Default {[row]} + */ + selectionMode?: ej.Grid.SelectionMode|string; +} + +export interface SortSettingsSortedColumns { + + /**Gets or sets a value that indicates whether to define the direction to sort the column. + */ + direction?: string; + + /**Gets or sets a value that indicates whether to define the field name of the column to be sort + */ + field?: string; +} + +export interface SortSettings { + + /**Gets or sets a value that indicates whether to define the direction and field to sort the column. + */ + sortedColumns?: Array; +} + +export interface StackedHeaderRowsStackedHeaderColumns { + + /**Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + column?: string; + + /**Gets or sets a value that indicates class to the corresponding stackedHeaderColumn. + * @Default {null} + */ + cssClass?: string; + + /**Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + headerText?: string; + + /**Gets or sets a value that indicates the text alignment of the corresponding headerText. + * @Default {ej.TextAlign.Left} + */ + textAlign?: string; +} + +export interface StackedHeaderRows { + + /**Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows + * @Default {[]} + */ + stackedHeaderColumns?: Array; +} + +export interface SummaryRowsSummaryColumns { + + /**Gets or sets a value that indicates the text displayed in the summary column as a value + * @Default {null} + */ + customSummaryValue?: string; + + /**This specifies summary column used to perform the summary calculation + * @Default {null} + */ + dataMember?: string; + + /**Gets or sets a value that indicates to define the target column at which to display the summary. + * @Default {null} + */ + displayColumn?: string; + + /**Gets or sets a value that indicates the format for the text applied on the column + * @Default {null} + */ + format?: string; + + /**Gets or sets a value that indicates the text displayed before the summary column value + * @Default {null} + */ + prefix?: string; + + /**Gets or sets a value that indicates the text displayed after the summary column value + * @Default {null} + */ + suffix?: string; + + /**Gets or sets a value that indicates the type of calculations to be performed for the corresponding summary column + * @Default {[]} + */ + summaryType?: ej.Grid.SummaryType|string; + + /**Gets or sets a value that indicates to add the template for the summary value of dataMember given. + * @Default {null} + */ + template?: string; +} + +export interface SummaryRows { + + /**Gets or sets a value that indicates whether to show the summary value within the group caption area for the corresponding summary column while grouping the column + * @Default {false} + */ + showCaptionSummary?: boolean; + + /**Gets or sets a value that indicates whether to show the group summary value for the corresponding summary column while grouping a column + * @Default {false} + */ + showGroupSummary?: boolean; + + /**Gets or sets a value that indicates whether to show the total summary value the for the corresponding summary column. The summary row is added after the grid content. + * @Default {true} + */ + showTotalSummary?: boolean; + + /**Gets or sets a value that indicates whether to add summary columns into the summary rows. + * @Default {[]} + */ + summaryColumns?: Array; + + /**This specifies the grid to show the title for the summary rows. + */ + title?: string; + + /**This specifies the grid to show the title of summary row in the specified column. + * @Default {null} + */ + titleColumn?: string; +} + +export interface ToolbarSettings { + + /**Gets or sets a value that indicates whether to add custom toolbar items within the toolbar to perform any action in the grid + * @Default {[]} + */ + customToolbarItems?: Array; + + /**Gets or sets a value that indicates whether to enable toolbar in the grid. + * @Default {false} + */ + showToolbar?: boolean; + + /**Gets or sets a value that indicates whether to add the default editing actions as a toolbar items + * @Default {[]} + */ + toolbarItems?: ej.Grid.ToolBarItems|string; +} + +enum GridLines{ + + ///Displays both the horizontal and vertical grid lines. + Both, + + ///Displays the horizontal grid lines only. + Horizontal, + + ///Displays the vertical grid lines only. + Vertical, + + ///No grid lines are displayed. + None +} + + +enum ColumnLayout{ + + ///Column layout is auto(based on width). + Auto, + + ///Column layout is fixed(based on width). + Fixed +} + + +enum UnboundType{ + + ///Unbound type is edit. + Edit, + + ///Unbound type is save. + Save, + + ///Unbound type is delete. + Delete, + + ///Unbound type is cancel. + Cancel +} + + +enum EditingType{ + + ///Specifies editing type as string edit. + String, + + ///Specifies editing type as boolean edit. + Boolean, + + ///Specifies editing type as numeric edit. + Numeric, + + ///Specifies editing type as dropdown edit. + Dropdown, + + ///Specifies editing type as datepicker. + DatePicker, + + ///Specifies editing type as datetime picker. + DateTimePicker +} + + +enum ClipMode{ + + ///Shows ellipsis for the overflown cell. + Ellipsis, + + ///Truncate the text in the cell + Clip, + + ///Shows ellipsis and tooltip for the overflown cell. + EllipsisWithTooltip +} + + +enum EditMode{ + + ///Edit mode is normal. + Normal, + + ///Truncate the text in the cell + Clip, + + ///Edit mode is dialog. + Dialog, + + ///Edit mode is dialog template. + DialogTemplate, + + ///Edit mode is batch. + Batch, + + ///Edit mode is inline form. + InlineForm, + + ///Edit mode is inline template form. + InlineTemplateForm, + + ///Edit mode is external form. + ExternalForm, + + ///Edit mode is external form template. + ExternalFormTemplate +} + + +enum FormPosition{ + + ///Form position is bottomleft. + BottomLeft, + + ///Form position is topright. + TopRight +} + + +enum RowPosition{ + + ///Specifies position of add new row as top. + Top, + + ///Specifies position of add new row as bottom. + Bottom +} + + +enum FilterBarMode{ + + ///Initiate filter operation on typing the filter query. + Immediate, + + ///Initiate filter operation after Enter key is pressed. + OnEnter +} + + +enum FilterType{ + + ///Specifies the filter type as menu. + Menu, + + ///Specifies the filter type as excel. + Excel, + + ///Specifies the filter type as filterbar. + FilterBar +} + + +enum WrapMode{ + + ///Auto wrap is applied for both content and header. + Both, + + ///Auto wrap is applied only for content. + Content, + + ///Auto wrap is applied only for header. + Header +} + + +enum PrintMode{ + + ///Prints all pages. + AllPages, + + ///Prints curren tpage. + CurrentPage +} + + +enum VirtualScrollMode{ + + ///virtual scroll mode is normal. + Normal, + + ///virtual scroll mode is continuous. + Continuous +} + + +enum SelectionMode{ + + ///Selection is row basis. + Row, + + ///Selection is cell basis. + Cell, + + ///Selection is column basis. + Column +} + + +enum SelectionType{ + + ///Specifies the selection type as single. + Single, + + ///Specifies the selection type as multiple. + Multiple +} + + +enum SummaryType{ + + ///Summary type is average. + Average, + + ///Summary type is minimum. + Minimum, + + ///Summary type is maximum. + Maximum, + + ///Summary type is count. + Count, + + ///Summary type is sum. + Sum, + + ///Summary type is custom. + Custom, + + ///Summary type is true count. + TrueCount, + + ///Summary type is false count. + FalseCount +} + + +enum ToolBarItems{ + + ///Toolbar item is add. + Add, + + ///Toolbar item is edit. + Edit, + + ///Toolbar item is delete. + Delete, + + ///Toolbar item is update. + Update, + + ///Toolbar item is cancel. + Cancel, + + ///Toolbar item is search. + Search, + + ///Toolbar item is pdfExport. + PdfExport, + + ///Toolbar item is printGrid. + PrintGrid, + + ///Toolbar item is wordExport. + WordExport +} + +} + +class PivotGrid extends ej.Widget { + static fn: PivotGrid; + constructor(element: JQuery, options?: PivotGrid.Model); + constructor(element: Element, options?: PivotGrid.Model); + model:PivotGrid.Model; + defaults:PivotGrid.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the PivotGrid to an appropriate format based on the parameter passed. + * @returns {void} + */ + exportPivotGrid(): void; + + /** This function re-renders the PivotGrid on clicking the navigation buttons on PivotPager. + * @returns {void} + */ + refreshPagedPivotGrid(): void; + + /** This function receives the JSON formatted datasource to render the PivotGrid control. + * @returns {void} + */ + renderControlFromJSON(): void; +} +export module PivotGrid{ + +export interface Model { + + /**Sets the mode for the PivotGrid widget for binding either OLAP or relational data source. + * @Default {ej.PivotGrid.AnalysisMode.Olap} + */ + analysisMode?: any; + + /**Specifies the CSS class to PivotGrid to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Contains the serialized OlapReport at that instant. + * @Default {“”} + */ + currentReport?: string; + + /**Initializes the data source for the PivotGrid widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /**Used to bind the drilled members by default through report. + * @Default {[]} + */ + drilledItems?: Array; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {null} + */ + customObject?: any; + + /**Allows the user to access each cell on right-click. + * @Default {false} + */ + enableCellContext?: boolean; + + /**Enables the cell selection for a specified range of value cells. + * @Default {false} + */ + enableCellSelection?: boolean; + + /**Collapses the Pivot Items along rows and columns by default. It works only for relational data source. + * @Default {false} + */ + enableCollapseByDefault?: boolean; + + /**Enables the display of grand total for all the columns. + * @Default {true} + */ + enableColumnGrandTotal?: boolean; + + /**Allows the user to format a specific set of cells based on the condition. + * @Default {false} + */ + enableConditionalFormatting?: boolean; + + /**Allows the user to refresh the control on-demand and not during every UI operation. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /**Enables the display of GroupingBar allowing you to filter, sort and remove fields obtained from relational datasource. + * @Default {false} + */ + enableGroupingBar?: boolean; + + /**Enables the display of grand total for rows and columns. + * @Default {true} + */ + enableGrandTotal?: boolean; + + /**Allows the user to load PivotGrid using JSON data. + * @Default {false} + */ + enableJSONRendering?: boolean; + + /**Enables rendering of PivotGrid widget along with the PivotTable Field List, which allows UI operation. + * @Default {true} + */ + enablePivotFieldList?: boolean; + + /**Enables the display of grand total for all the rows. + * @Default {true} + */ + enableRowGrandTotal?: boolean; + + /**Allows the user to view PivotGrid from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /**Allows the user to enable ToolTip option. + * @Default {false} + */ + enableToolTip?: boolean; + + /**Allows the user to view large amount of data through virtual scrolling. + * @Default {false} + */ + enableVirtualScrolling?: boolean; + + /**Allows the user to configure hyperlink settings of PivotGrid control. + * @Default {{}} + */ + hyperlinkSettings?: HyperlinkSettings; + + /**This is used for identifying whether the member is Named Set or not. + * @Default {false} + */ + isNamedSets?: boolean; + + /**Allows the user to enable PivotGrid’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Contains the serialized JSON string which renders PivotGrid. + * @Default {“”} + */ + jsonRecords?: string; + + /**Sets the summary layout for PivotGrid. Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. + * @Default {ej.PivotGrid.Layout.Normal} + */ + layout?: ej.PivotGrid.Layout|string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Sets the mode for the PivotGrid widget for binding data source either in server-side or client-side. + * @Default {ej.PivotGrid.OperationalMode.ClientMode} + */ + operationalMode?: any; + + /**Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from PivotGrid to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers when right-click action is performed on a cell.*/ + cellContext? (e: CellContextEventArgs): void; + + /**Triggers when a specific range of value cells are selected.*/ + cellSelection? (e: CellSelectionEventArgs): void; + + /**Triggers when the hyperlink of column header is clicked.*/ + columnHeaderHyperlinkClick? (e: ColumnHeaderHyperlinkClickEventArgs): void; + + /**Triggers after performing drill operation in PivotGrid.*/ + drillSuccess? (e: DrillSuccessEventArgs): void; + + /**Triggers when PivotGrid loading is initiated.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when PivotGrid widget completes all operations at client-side after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when PivotGrid successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; + + /**Triggers when the hyperlink of row header is clicked.*/ + rowHeaderHyperlinkClick? (e: RowHeaderHyperlinkClickEventArgs): void; + + /**Triggers when the hyperlink of summary cell is clicked.*/ + summaryCellHyperlinkClick? (e: SummaryCellHyperlinkClickEventArgs): void; + + /**Triggers when the hyperlink of value cell is clicked.*/ + valueCellHyperlinkClick? (e: ValueCellHyperlinkClickEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of PivotGrid control. + */ + action?: string; + + /**return the custom object bounds with PivotGrid control. + */ + customObject?: any; + + /**return the outer HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of PivotGrid control. + */ + action?: string; + + /**return the custom object bounds with PivotGrid control. + */ + customObject?: any; + + /**return the outer HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface CellContextEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface CellSelectionEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**Returns the selected cell values. + */ + cellvalue?: any; + + /**Returns the selected value cells row headers. + */ + rowheaders?: any; + + /**Returns the selected value cells column headers. + */ + colheaders?: any; + + /**Returns the selected value cells measure. + */ + measure?: any; + + /**Return the row and column measure count. + */ + measureValue?: any; +} + +export interface ColumnHeaderHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface DrillSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**returns the error message with error code. + */ + message?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the current action of PivotGrid control. + */ + action?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the HTML of PivotGrid control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotGrid model. + */ + model?: ej.PivotGrid.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RowHeaderHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface SummaryCellHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface ValueCellHyperlinkClickEventArgs { + + /**returns the original event args. + */ + args?: any; + + /**returns the cell position (row index and column index) in table. + */ + cellPosition?: string; + + /**returns the type of the cell. + */ + cellType?: string; + + /**returns the serialized data of the header cells. + */ + rowData?: string; + + /**returns the unique name of levels/members. + */ + uniqueName?: string; +} + +export interface DataSourceValues { + + /**This holds the measures unique names to bind the measures from Cube. + * @Default {[]} + */ + measures?: Array; + + /**To set the axis name in-order to place the measures. + * @Default {“”} + */ + axis?: string; +} + +export interface DataSource { + + /**Contains the database name as string type to fetch the data from the given connection string. + * @Default {“”} + */ + catalog?: string; + + /**Lists out the items to be arranged in column section of PivotGrid. + * @Default {[]} + */ + columns?: Array; + + /**Contains the respective Cube name as string type. + * @Default {“”} + */ + cube?: string; + + /**Provides the raw data source for the PivotGrid. + * @Default {null} + */ + data?: any; + + /**Lists out the items to be arranged in row section of PivotGrid. + * @Default {[]} + */ + rows?: Array; + + /**Lists out the items which supports calculation in PivotGrid. + * @Default {[]} + */ + values?: Array; + + /**Lists out the items which supports filtering of values in PivotGrid. + * @Default {[]} + */ + filters?: Array; +} + +export interface HyperlinkSettings { + + /**Allows the user to enable/disable hyperlink for column header. + * @Default {false} + */ + enableColumnHeaderHyperlink?: boolean; + + /**Allows the user to enable/disable hyperlink for row header. + * @Default {false} + */ + enableRowHeaderHyperlink?: boolean; + + /**Allows the user to enable/disable hyperlink for summary cells. + * @Default {false} + */ + enableSummaryCellHyperlink?: boolean; + + /**Allows the user to enable/disable hyperlink for value cells. + * @Default {false} + */ + enableValueCellHyperlink?: boolean; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that's responsible for drill up/down operation in PivotGrid. + * @Default {DrillGrid} + */ + drillDown?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportPivotGrid?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for performing server-side actions on defer update. + * @Default {DeferUpdate} + */ + deferUpdate?: string; + + /**Allows the user to set the custom name for the service method that’s responsible to getting the values for the tree-view inside filter dialog. + * @Default {FetchMembers} + */ + fetchMembers?: string; + + /**Allows the user to set the custom name for the service method that's responsible for filtering operation in PivotGrid. + * @Default {Filtering} + */ + filtering?: string; + + /**Allows the user to set the custom name for the service method that's responsible for initializing PivotGrid. + * @Default {InitializeGrid} + */ + initialize?: string; + + /**Allows the user to set the custom name for the service method that's responsible for the server-side action, on dropping a node into Field List. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action on changing the checked state of a node in Field List. + * @Default {NodeStateModified} + */ + nodeStateModified?: string; + + /**Allows the user to set the custom name for the service method that's responsible for performing paging operation in PivotGrid. + * @Default {Paging} + */ + paging?: string; + + /**Allows the user to set the custom name for the service method that's responsible for sorting operation in PivotGrid. + * @Default {Sorting} + */ + sorting?: string; +} + +enum Layout{ + + ///To set normal summary layout in PivotGrid. + Normal, + + ///To set layout with summaries at the top in PivotGrid. + NormalTopSummary, + + ///To set layout without summaries in PivotGrid. + NoSummaries, + + ///To set excel-like layout in PivotGrid. + ExcelLikeLayout +} + +} + +class PivotSchemaDesigner extends ej.Widget { + static fn: PivotSchemaDesigner; + constructor(element: JQuery, options?: PivotSchemaDesigner.Model); + constructor(element: Element, options?: PivotSchemaDesigner.Model); + model:PivotSchemaDesigner.Model; + defaults:PivotSchemaDesigner.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; +} +export module PivotSchemaDesigner{ + +export interface Model { + + /**Specifies the CSS class to PivotSchemaDesigner to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**For ASP.NET and MVC Wrapper, Pivots Schema Designer will be initialized and rendered empty initially. Once PivotGrid widget is rendered completely, Pivots Schema Designer will just be populated with data source by setting this property to “true”. + * @Default {false} + */ + enableWrapper?: boolean; + + /**Allows the user to set the list of filters in filter section. + * @Default {newArray()} + */ + filters?: Array; + + /**Sets the height for PivotSchemaDesigner. + * @Default {“”} + */ + height?: string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Allows the user to set list of PivotCalculations in values section. + * @Default {newArray()} + */ + pivotCalculations?: Array; + + /**Allows the user to set the list of PivotItems in column section. + * @Default {newArray()} + */ + pivotColumns?: Array; + + /**Sets the Pivot control bound with this PivotSchemaDesigner. + * @Default {null} + */ + pivotControl?: any; + + /**Allows the user to set the list of PivotItems in row section. + * @Default {newArray()} + */ + pivotRows?: Array; + + /**Allows the user to arrange the fields inside Field List of PivotSchemaDesigner. + * @Default {newArray()} + */ + pivotTableFields?: Array; + + /**Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethod?: ServiceMethod; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Sets the width for PivotSchemaDesigner. + * @Default {“”} + */ + width?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from PivotSchemaDesigner to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of PivotSchemaDesigner control. + */ + action?: string; + + /**return the custom object bounds with PivotSchemaDesigner control. + */ + customObject?: any; + + /**return the outer HTML of PivotSchemaDesigner control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotSchemaDesigner model + */ + model?: ej.PivotSchemaDesigner.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of PivotSchemaDesigner control. + */ + action?: string; + + /**return the custom object bounds with PivotSchemaDesigner control. + */ + customObject?: any; + + /**return the outer HTML of PivotSchemaDesigner control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the PivotSchemaDesigner model + */ + model?: ej.PivotSchemaDesigner.Model; + + /**returns the name of the event + */ + type?: string; +} + +export interface ServiceMethod { + + /**Allows the user to set the custom name for the service method that’s responsible for getting the values for the tree-view inside filter dialog. + * @Default {FetchMembers} + */ + fetchMembers?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for filtering operation in Field List. + * @Default {Filtering} + */ + filtering?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action, on expanding members in Field List. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action, on dropping a node into Field List. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for the server-side action on changing the checked state of a node in Field List. + * @Default {NodeStateModified} + */ + nodeStateModified?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for remove operation in Field List. + * @Default {RemoveButton} + */ + removeButton?: string; +} +} + +class PivotPager extends ej.Widget { + static fn: PivotPager; + constructor(element: JQuery, options?: PivotPager.Model); + constructor(element: Element, options?: PivotPager.Model); + model:PivotPager.Model; + defaults:PivotPager.Model; + + /** This function initializes the page counts and page numbers for the PivotPager. + * @returns {void} + */ + initPagerProperties(): void; +} +export module PivotPager{ + +export interface Model { + + /**Contains the current page number in categorical axis. + * @Default {1} + */ + categoricalCurrentPage?: number; + + /**Contains the total page count in categorical axis. + * @Default {1} + */ + categoricalPageCount?: number; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Sets the pager mode (Only Categorical Pager/Only Series Pager/Both) for the PivotPager. + * @Default {ej.PivotPager.Mode.Both} + */ + mode?: ej.PivotPager.Mode|string; + + /**Contains the current page number in series axis. + * @Default {1} + */ + seriesCurrentPage?: number; + + /**Contains the total page count in series axis. + * @Default {1} + */ + seriesPageCount?: number; + + /**Contains the ID of the target element for which paging needs to be done. + * @Default {“”} + */ + targetControlID?: string; +} + +enum Mode{ + + ///To set both categorical and series pager for paging. + Both, + + ///To set only categorical pager for paging. + Categorical, + + ///To set only series pager for paging. + Series +} + +} + +class Schedule extends ej.Widget { + static fn: Schedule; + constructor(element: JQuery, options?: Schedule.Model); + constructor(element: Element, options?: Schedule.Model); + model:Schedule.Model; + defaults:Schedule.Model; + + /** This method is used to delete the appointment based on the guid value or the appointment data passed to it. + * @param {string|any} GUID value of an appointment element or an appointment object + * @returns {void} + */ + deleteAppointment(data: string|any): void; + + /** Destroys the Schedule widget. All the events bound using this._on are unbound automatically and the control is moved to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** Exports the appointments from the Schedule control. + * @param {string} It refers the controller action name to redirect. (For MVC) + * @param {string} It refers the server event name.(For ASP) + * @param {string|number} Pass the id of an appointment, in case if a single appointment needs to be exported. Otherwise, it takes the null value. + * @returns {void} + */ + exportSchedule(action: string, serverEvent: string, id: string|number): void; + + /** Searches the appointments from appointment list of Schedule control. + * @param {Array} Holds array of one or more conditional objects for filtering the appointments based on it. + * @returns {void} + */ + filterAppointments(filterConditions: Array): void; + + /** Gets the appointment list of Schedule control. + * @returns {void} + */ + getAppointments(): void; + + /** Prints the Scheduler. + * @returns {void} + */ + print(): void; + + /** Refreshes the Scroller within Scheduler while using it with some other controls or application. + * @returns {void} + */ + refreshScroller(): void; + + /** It is used to save the appointment. The appointment obj is based on the argument passed along with this method. + * @param {any} appointment object which includes appointment details + * @returns {void} + */ + saveAppointment(appointmentObject: any): void; + + /** Retrieves the time slot information (start/end time and resource details) of the given element. The parameter is optional - as when no element is passed to it, the currently selected cell information will be retrieved. When multiple cells are selected in the Scheduler, it is not necessary to provide the parameter. + * @param {any} TD element object rendered as Scheduler work cell + * @returns {void} + */ + getSlotByElement(element: any): void; + + /** Searches the appointments from the appointment list of Schedule control. + * @param {any|string} Defines the search word or the filter condition, based on which the appointments are filtered from the list. + * @param {string} Defines the field name on which the search is to be made. + * @param {string|string} Defines the filterOperator value for the search operation. + * @param {boolean} Defines the ignoreCase value for performing the search operation. + * @returns {void} + */ + searchAppointments(searchString: any|string, field: string, operator: string|string, ignoreCase: boolean): void; + + /** To refresh the Schedule control. + * @returns {void} + */ + refresh(): void; + + /** Refreshes only the appointments within the Schedule control. + * @returns {void} + */ + refreshAppointment(): void; +} +export module Schedule{ + +export interface Model { + + /**When set to true, Schedule allows the appointments to be dragged and dropped at required time. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /**When set to true, Scheduler allows interaction through keyboard shortcut keys. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**It includes the dataSource option and the fields related to Schedule appointments. The appointment fields within the appointmentSettings can accept both string and object type values. To apply validation rules on the appointment window fields, then the appointment fields needs to be defined with object type values. + */ + appointmentSettings?: AppointmentSettings; + + /**Default Value + * @Default {null} + */ + appointmentTemplateId?: string; + + /**Default Value + */ + cssClass?: string; + + /**Sets various categorize colors to the Schedule appointments to differentiate it. + */ + categorizeSettings?: CategorizeSettings; + + /**Sets the height for Schedule cells. + * @Default {20px} + */ + cellHeight?: string; + + /**Sets the width for Schedule cells. + */ + cellWidth?: string; + + /**Holds all options related to the context menu settings of the Schedule. + */ + contextMenuSettings?: ContextMenuSettings; + + /**Sets current date of the Schedule. The Schedule displays initially with the date that is provided here. + * @Default {new Date()} + */ + currentDate?: any; + + /**Sets current view of the Schedule. Schedule renders initially with the view that is specified here. The available views are day, week, workweek, month, agenda and custom view - from which any one of the required view can be set to the Schedule. It accepts both string or enum values. The enum values that are accepted by currentView(ej.Schedule.CurrentView) are as follows, + * @Default {ej.Schedule.CurrentView.Week} + */ + currentView?: string|ej.Schedule.CurrentView; + + /**Sets the date format for Schedule. + */ + dateFormat?: string; + + /**When set to true, shows the previous/next appointment navigator button on the Scheduler. + * @Default {true} + */ + showAppointmentNavigator?: boolean; + + /**When set to true, enables the resize behavior of appointments within the Schedule. + * @Default {true} + */ + enableAppointmentResize?: boolean; + + /**When set to true, enables the loading of Schedule appointments based on your demand. With this load on demand concept, the data consumption of the Schedule can be limited. + * @Default {false} + */ + enableLoadOnDemand?: boolean; + + /**Saves the current model value to browser cookies for state maintenance. When the page gets refreshed, Schedule control values are retained. + * @Default {false} + */ + enablePersistence?: boolean; + + /**When set to true, the Schedule layout and behavior changes as per the common RTL conventions. + * @Default {false} + */ + enableRTL?: boolean; + + /**Sets the end hour time limit to be displayed on the Schedule. + * @Default {24} + */ + endHour?: number; + + /**To configure resource grouping on the Schedule. + */ + group?: Group; + + /**Sets the height of the Schedule. Accepts both pixel and percentage values. + * @Default {1120px} + */ + height?: string; + + /**To define the work hours within the Schedule control. + */ + workHours?: WorkHours; + + /**When set to true, enables the Schedule to observe Daylight Saving Time for supported timezones. + * @Default {false} + */ + isDST?: boolean; + + /**When set to true, adapts the Schedule layout to fit the screen size of devices on which it renders. + * @Default {true} + */ + isResponsive?: boolean; + + /**Sets the specific culture to the Schedule. + * @Default {en-US} + */ + locale?: string; + + /**Sets the maximum date limit to display on the Schedule. Setting maxDate with specific date value disallows the Schedule to navigate beyond that date. + * @Default {new Date(2099, 12, 31)} + */ + maxDate?: any; + + /**Sets the minimum date limit to display on the Schedule. Setting minDate with specific date value disallows the Schedule to navigate beyond that date. + * @Default {new Date(1900, 01, 01)} + */ + minDate?: any; + + /**Sets the mode of Schedule rendering either in a vertical or horizontal direction. It accepts either string("vertical" or "horizontal") or enum values. The enum values that are accepted by orientation(ej.Schedule.Orientation) are as follows, + * @Default {ej.Schedule.Orientation.Vertical} + */ + orientation?: string|ej.Schedule.Orientation; + + /**Holds all the options related to priority settings of the Schedule. + */ + prioritySettings?: PrioritySettings; + + /**When set to true, disables the interaction with the Schedule appointments, simply allowing the date and view navigation to occur. + * @Default {false} + */ + readOnly?: boolean; + + /**Holds all the options related to reminder settings of the Schedule. + */ + reminderSettings?: ReminderSettings; + + /**Defines the specific start and end dates to be rendered in the Schedule control. To render such user-specified custom date ranges in the Schedule control, set the currentView property to customview. + * @Default {null} + */ + renderDates?: RenderDates; + + /**Template design that applies on the Schedule resource header. + * @Default {null} + */ + resourceHeaderTemplateId?: string; + + /**Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the Schedule based on the order of the resource data provided within this collection. + * @Default {null} + */ + resources?: Array; + + /**When set to true, displays the all-day row cells on the Schedule. + * @Default {true} + */ + showAllDayRow?: boolean; + + /**When set to true, displays the current time indicator on the Schedule. + * @Default {true} + */ + showCurrentTimeIndicator?: boolean; + + /**When set to true, displays the header bar on the Schedule. + * @Default {true} + */ + showHeaderBar?: boolean; + + /**When set to true, displays the location field additionally on Schedule appointment window. + * @Default {false} + */ + showLocationField?: boolean; + + /**When set to true, displays the quick window for every single click made on the Schedule cells or appointments. + * @Default {true} + */ + showQuickWindow?: boolean; + + /**When set to true, displays the timescale on the left side of the Schedule. + * @Default {true} + */ + showTimeScale?: boolean; + + /**Sets the start hour time range to be displayed on the Schedule. + * @Default {0} + */ + startHour?: number; + + /**Sets either 12 or 24 hour time mode on the Schedule. It accepts either the string value("12" or "24") or the below mentioned enum values. The enum values that are accepted by timeMode(ej.Schedule.TimeMode) are as follows, + * @Default {null} + */ + timeMode?: string|ej.Schedule.TimeMode; + + /**Sets the timezone for the Schedule. + * @Default {null} + */ + timeZone?: string; + + /**Sets the collection of timezone items to be bound to the Schedule. Only the items bound to this property gets listed out in the timezone field of the appointment window. + */ + timeZoneCollection?: TimeZoneCollection; + + /**Defines the view collection to be displayed on the Schedule. By default, it displays all the views namely, Day, Week, WorkWeek and Month. + * @Default {[Day, Week, WorkWeek, Month, Agenda]} + */ + views?: Array; + + /**Sets the width of the Schedule. Accepts both pixel and percentage values. + * @Default {100%} + */ + width?: string; + + /**When set to true, Schedule allows the validation of recurrence pattern to take place before it is being assigned to the appointments. For example, when one of the instance of recurrence appointment is dragged beyond the next or previous instance of the same recurrence appointment, a pop-up is displayed with the validation message disallowing the drag functionality. + * @Default {true} + */ + enableRecurrenceValidation?: boolean; + + /**Sets the week to display more than one week appointment summary. + */ + agendaViewSettings?: AgendaViewSettings; + + /**You can change or set the starting day of the week. + * @Default {null} + */ + firstDayOfWeek?: string; + + /**You can set the workWeek days of the workWeek. + * @Default {[Monday, Tuesday, Wednesday, Thursday, Friday]} + */ + workWeek?: Array; + + /**The tooltip allows to display appointment details in a tooltip while hovering on it. + */ + tooltipSettings?: TooltipSettings; + + /**Holds all the options related to the time scale of Scheduler. The timeslots either major or minor slots can be customized with this property. + */ + timeScale?: TimeScale; + + /**When set to true, shows the delete confirmation dialog before deleting an appointment. + * @Default {true} + */ + showDeleteConfirmationDialog?: boolean; + + /**Accepts the id value of the template layout defined for the all-day cells. + * @Default {null} + */ + allDayCellsTemplateId?: string; + + /**Accepts the id value of the template layout defined for the work cells and month cells. + * @Default {null} + */ + workCellsTemplateId?: string; + + /**Accepts the id value of the template layout defined for the date header cells. + * @Default {null} + */ + dateHeaderTemplateId?: string; + + /**when set to false, allows the height of the work-cells to adjust automatically based on the number of appointment count it has. + * @Default {true} + */ + showOverflowButton?: boolean; + + /**Allows setting draggable area for the Scheduler appointments. Also, turns on the external drag and drop, when set with some specific external drag area name. + */ + appointmentDragArea?: string; + + /**When set to true, displays the other months days from the current month on the Schedule. + * @Default {true} + */ + showNextPrevMonth?: boolean; + + /**Triggers before the action begin of the Schedule.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggers after the completion of action in the Schedule.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggers after the appointment is clicked.*/ + appointmentClick? (e: AppointmentClickEventArgs): void; + + /**Triggers before the appointment is being removed from the Scheduler.*/ + beforeAppointmentRemove? (e: BeforeAppointmentRemoveEventArgs): void; + + /**Triggers before the edited appointment is being saved.*/ + beforeAppointmentChange? (e: BeforeAppointmentChangeEventArgs): void; + + /**Triggers after the appointment is hovered.*/ + appointmentHover? (e: AppointmentHoverEventArgs): void; + + /**Triggers before the appointment gets saved.*/ + beforeAppointmentCreate? (e: BeforeAppointmentCreateEventArgs): void; + + /**Triggers before the appointment window opens.*/ + appointmentWindowOpen? (e: AppointmentWindowOpenEventArgs): void; + + /**Triggers before the context menu opens.*/ + beforeContextMenuOpen? (e: BeforeContextMenuOpenEventArgs): void; + + /**Triggers after the cell is clicked.*/ + cellClick? (e: CellClickEventArgs): void; + + /**Triggers after the cell is clicked twice.*/ + cellDoubleClick? (e: CellDoubleClickEventArgs): void; + + /**Triggers after the cell is hovered.*/ + cellHover? (e: CellHoverEventArgs): void; + + /**Triggers while the appointment is being dragged over the work cells.*/ + drag? (e: DragEventArgs): void; + + /**Triggers when the appointment dragging begins.*/ + dragStart? (e: DragStartEventArgs): void; + + /**Triggers when the appointment is dropped.*/ + dragStop? (e: DragStopEventArgs): void; + + /**Triggers after the context menu is clicked.*/ + menuItemClick? (e: MenuItemClickEventArgs): void; + + /**Triggers after the Schedule view or date is navigated.*/ + navigation? (e: NavigationEventArgs): void; + + /**Triggers every time before the elements of the scheduler such as work cells, time cells or header cells and so on renders or re-renders on a page.*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggers when the reminder is raised for an appointment.*/ + reminder? (e: ReminderEventArgs): void; + + /**Triggers while resizing the appointment.*/ + resize? (e: ResizeEventArgs): void; + + /**Triggers when the appointment resizing begins.*/ + resizeStart? (e: ResizeStartEventArgs): void; + + /**Triggers when appointment resizing stops.*/ + resizeStop? (e: ResizeStopEventArgs): void; + + /**Triggers when the overflow button is clicked.*/ + overflowButtonClick? (e: OverflowButtonClickEventArgs): void; + + /**Triggers while mouse hovering on the overflow button.*/ + overflowButtonHover? (e: OverflowButtonHoverEventArgs): void; + + /**Triggers when any of the keyboard keys are pressed.*/ + keyDown? (e: KeyDownEventArgs): void; + + /**Triggers after the appointment is saved.*/ + appointmentCreated? (e: AppointmentCreatedEventArgs): void; + + /**Triggers after the appointment is edited.*/ + appointmentChanged? (e: AppointmentChangedEventArgs): void; + + /**Triggers after the appointment is deleted.*/ + appointmentRemoved? (e: AppointmentRemovedEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the current date value. + */ + currentDate?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current view value. + */ + currentView?: string; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the action begin request type. + */ + requestType?: string; + + /**Returns the target of the click. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the save appointment value. + */ + data?: any; + + /**Returns the id of delete appointment. + */ + id?: number; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data about view change action. + */ + data?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the action complete request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the appointment data dropped. + */ + appointment?: any; +} + +export interface AppointmentClickEventArgs { + + /**Returns the object of appointmentClick event. + */ + object?: any; + + /**Returns the clicked appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeAppointmentRemoveEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the deleted appointment object. + */ + appointment?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface BeforeAppointmentChangeEventArgs { + + /**Returns the edited appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentHoverEventArgs { + + /**Returns the object of appointmentHover event. + */ + object?: any; + + /**Returns the hovered appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeAppointmentCreateEventArgs { + + /**Returns the appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentWindowOpenEventArgs { + + /**returns the object of appointmentWindowOpen event while selecting the detail option from quick window or edit appointment or edit series option. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the end time of the double clicked cell. + */ + endTime?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the action name that triggers window open. + */ + originalEventType?: string; + + /**Returns the start time of the double clicked cell. + */ + startTime?: any; + + /**Returns the target of the double clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the edit appointment object. + */ + appointment?: any; + + /**Returns the edit occurrence option value. + */ + edit?: boolean; +} + +export interface BeforeContextMenuOpenEventArgs { + + /**Returns the object of beforeContextMenuOpen event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current cell index value. + */ + cellIndex?: number; + + /**Returns the current date value. + */ + currentDate?: any; + + /**Returns the current resource details, when multiple resources are present, otherwise returns null. + */ + resources?: any; + + /**Returns the current appointment details while opening the menu from appointment. + */ + appointment?: any; + + /**Returns the object of before opening menu target. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellClickEventArgs { + + /**Returns the object of cellClick event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the end time of the clicked cell. + */ + endTime?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the start time of the clicked cell. + */ + startTime?: any; + + /**Returns the target of the clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellDoubleClickEventArgs { + + /**Returns the object of cellDoubleClick event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the end time of the double clicked cell. + */ + endTime?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the start time of the double clicked cell. + */ + startTime?: any; + + /**Returns the target of the double clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface CellHoverEventArgs { + + /**Returns the object of cellHover event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the index of the hovered cell. + */ + cellIndex?: any; + + /**Returns the current date of the hovered cell. + */ + currentDate?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the clicked cell. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DragEventArgs { + + /**Returns the object of dragOver event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the drag over appointment. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DragStartEventArgs { + + /**Returns the object of dragStart event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the dragging appointment. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface DragStopEventArgs { + + /**Returns the object of dragDrop event. + */ + object?: any; + + /**Returns the dropped appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface MenuItemClickEventArgs { + + /**Returns the object of menuItemClick event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface NavigationEventArgs { + + /**Returns the current date object. + */ + currentDate?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the current view value. + */ + currentView?: string; + + /**Returns the previous view value. + */ + previousView?: string; + + /**Returns the target of the action. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the previous date of the Schedule. + */ + previousDate?: any; +} + +export interface QueryCellInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the current appontment data. + */ + appointment?: any; + + /**Returns the currently rendering DOM element. + */ + element?: any; + + /**Returns the name of the currently rendering element on the scheduler. + */ + requestType?: string; + + /**Returns the cell type which is currently rendering on the Scheduler. + */ + cellType?: string; + + /**Returns the start date of the currently rendering appointment. + */ + currentAppointmentDate?: any; + + /**Returns the currently rendering cell information. + */ + cell?: any; + + /**Returns the currently rendering resource details. + */ + resource?: any; + + /**Returns the currently rendering date information. + */ + currentDay?: any; +} + +export interface ReminderEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the appointment object for which the reminder is raised. + */ + reminderAppointment?: any; +} + +export interface ResizeEventArgs { + + /**Returns the object of resizing event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the resize element value. + */ + element?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ResizeStartEventArgs { + + /**Returns the object of resizeStart event. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the resize element value. + */ + element?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ResizeStopEventArgs { + + /**Returns the object of resizeStop event. + */ + object?: any; + + /**Returns the resized appointment value. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the target of the resized appointment. + */ + target?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface OverflowButtonClickEventArgs { + + /**Returns the object consisting of starttime, endtime and resource value of the underlying cell on which the clicked overflow button is present. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface OverflowButtonHoverEventArgs { + + /**Returns the object consisting of starttime, endtime and resource value of the underlying cell on which the overflow button is currently hovered. + */ + object?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface KeyDownEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the object of menu item event. + */ + events?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface AppointmentCreatedEventArgs { + + /**Returns the appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentChangedEventArgs { + + /**Returns the edited appointment object. + */ + appointment?: any; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentRemovedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the deleted appointment object. + */ + appointment?: any; + + /**Returns the Schedule model. + */ + model?: ej.Schedule.Model; + + /**Returns the name of the Scheduler event. + */ + type?: string; +} + +export interface AppointmentSettings { + + /**Default Value + * @Default {Array} + */ + dataSource?: any|Array; + + /**Default Value + * @Default {null} + */ + query?: string; + + /**Default Value + * @Default {null} + */ + tableName?: string; + + /**Binds the id field name in dataSource to the id of Schedule appointments. It denotes the unique id assigned to appointments. + */ + id?: string; + + /**Binds the name of startTime field in the dataSource with start time of the Schedule appointments. It indicates the date and Time when Schedule appointment actually starts. + */ + startTime?: string; + + /**Binds the name of endTime field in dataSource with the end time of Schedule appointments. It indicates the date and time when Schedule appointment actually ends. + */ + endTime?: string; + + /**Binds the name of subject field in the dataSource to appointment Subject. Indicates the Subject or title that gets displayed on Schedule appointments. + */ + subject?: string; + + /**Binds the description field name in dataSource. It indicates the appointment description. + */ + description?: string; + + /**Binds the name of recurrence field in dataSource. It indicates whether the appointment is a recurrence appointment or not. + */ + recurrence?: string; + + /**Binds the name of recurrenceRule field in dataSource. It indicates the recurrence pattern associated with appointments. + */ + recurrenceRule?: string; + + /**Binds the name of allDay field in dataSource. It indicates whether the appointment is an allday appointment or not. + * @Default {AllDay} + */ + allDay?: string; + + /**Default Value + * @Default {null} + */ + resourceFields?: string; + + /**Default Value + * @Default {null} + */ + categorize?: string; + + /**Default Value + * @Default {null} + */ + location?: string; + + /**Default Value + * @Default {null} + */ + priority?: string; + + /**Default Value + * @Default {StartTimeZone} + */ + startTimeZone?: string; + + /**Default Value + * @Default {EndTimeZone} + */ + endTimeZone?: string; +} + +export interface CategorizeSettings { + + /**Default Value + * @Default {false} + */ + allowMultiple?: boolean; + + /**Default Value + * @Default {false} + */ + enable?: boolean; + + /**Default Value + * @Default {Array} + */ + dataSource?: Array|any; + + /**Binds id field name in the dataSource to id of category data. + * @Default {id} + */ + id?: string; + + /**Binds text field name in the dataSource to category text. + * @Default {text} + */ + text?: string; + + /**Binds color field name in the dataSource to category color. + * @Default {color} + */ + color?: string; + + /**Binds fontColor field name in the dataSource to category font. + * @Default {fontColor} + */ + fontColor?: string; +} + +export interface ContextMenuSettings { + + /**When set to true, enables the context menu options available for the Schedule cells and appointments. + * @Default {false} + */ + enable?: boolean; + + /**Contains all the default context menu options that are applicable for both Schedule cells and appointments. It also supports adding custom menu items to cells or appointment collection. + * @Default {[]} + */ + menuItems?: any; +} + +export interface Group { + + /**Holds the array of resource names to be grouped on the Schedule. + */ + resources?: any; +} + +export interface WorkHours { + + /**When set to true, highlights the work hours of the Schedule. + * @Default {true} + */ + highlight?: boolean; + + /**Sets the start time to depict the start of working or business hour in a day. + * @Default {null} + */ + start?: number; + + /**Sets the end time to depict the end of working or business hour in a day. + * @Default {null} + */ + end?: number; +} + +export interface PrioritySettings { + + /**When set to true, enables the priority options available for the Schedule appointments. + * @Default {false} + */ + enable?: boolean; + + /**The dataSource option can accept the JSON object collection that contains the priority related data. + * @Default {Array} + */ + dataSource?: any|Array; + + /**Binds text field name in the dataSource to prioritySettings text. These text gets listed out in priority field of the appointment window. + * @Default {text} + */ + text?: string; + + /**Binds value field name in the dataSource to prioritySettings value. These field names usually accepts four priority values by default, high, low, medium and none. + * @Default {value} + */ + value?: string; + + /**Allows priority field customization in the appointment window to add custom icons denoting the priority level for the appointments. + * @Default {null} + */ + template?: string; +} + +export interface ReminderSettings { + + /**When set to true, enables the reminder option available for the Schedule appointments. + * @Default {false} + */ + enable?: boolean; + + /**Sets the timing, when the reminders are to be alerted for the Schedule appointments. + * @Default {5} + */ + alertBefore?: number; +} + +export interface RenderDates { + + /**Sets the start of custom date range to be rendered in the Schedule. + * @Default {null} + */ + start?: any; + + /**Sets the end limit of the custom date range. + * @Default {null} + */ + end?: any; +} + +export interface ResourcesResourceSettings { + + /**The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains the resources related data. + */ + dataSource?: any|Array; + + /**Binds text field name in the dataSource to resourceSettings text. These text gets listed out in resources field of the appointment window. + */ + text?: string; + + /**Binds id field name in the dataSource to resourceSettings id. + */ + id?: string; + + /**Binds groupId field name in the dataSource to resourceSettings groupId. + */ + groupId?: string; + + /**Binds color field name in the dataSource to resourceSettings color. The color specified here gets applied to the Schedule appointments denoting to the resource it belongs. + */ + color?: string; + + /**Binds the starting work hour field name in the dataSource. It's optional, but when provided with some numeric value will set the starting work hour for specific resources. + */ + start?: string; + + /**Binds the end work hour field name in the dataSource. It's optional, but when provided with some numeric value will set the end work hour for specific resources. + */ + end?: string; + + /**Binds the resources working days field name in the dataSource. It's optional, and accepts the array of strings (week day names). When provided with some values (array of day names), only those days will render for the specific resources. + */ + workWeek?: string; + + /**Binds appointmentClass field name in the dataSource. It applies custom CSS class name to appointments depicting to the resource it belongs. + */ + appointmentClass?: string; +} + +export interface Resources { + + /**It holds the name of the resource field to be bound to the Schedule appointments that contains the resource Id. + * @Default {[]} + */ + field?: string; + + /**It holds the title name of the resource field to be displayed on the Schedule appointment window. + * @Default {[]} + */ + title?: string; + + /**A unique resource name that is used for differentiating various resource objects while grouping it in various levels. + * @Default {[]} + */ + name?: string; + + /**When set to true, allows multiple selection of resource names, thus creating multiple instances of same appointment for the selected resources. + * @Default {[]} + */ + allowMultiple?: string; + + /**It holds the field names of the resources to be bound to the Schedule and also the dataSource. + */ + resourceSettings?: ResourcesResourceSettings; +} + +export interface TimeZoneCollection { + + /**Sets the collection of timezone items to the dataSource that accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule timezones. + */ + dataSource?: any; + + /**Binds text field name in the dataSource to timeZoneCollection text. These text gets listed out in the timezone fields of the appointment window. + */ + text?: string; + + /**Binds id field name in the dataSource to timeZoneCollection id. + */ + id?: string; + + /**Binds value field name in the dataSource to timeZoneCollection value. + */ + value?: string; +} + +export interface AgendaViewSettings { + + /**You can display the summary of multiple week's appointment by setting this value. + * @Default {7} + */ + daysInAgenda?: number; + + /**You can customize the Date column display based on the requirement. + * @Default {null} + */ + dateColumnTemplateId?: string; + + /**You can customize the time column display based on the requirement. + * @Default {null} + */ + timeColumnTemplateId?: string; +} + +export interface TooltipSettings { + + /**To enable or disable the tooltip display. + * @Default {false} + */ + enable?: boolean; + + /**To customize the tooltip display based on your requirements. + * @Default {null} + */ + templateId?: string; +} + +export interface TimeScale { + + /**When set to true, displays the timescale on the Scheduler. + * @Default {null} + */ + enable?: boolean; + + /**When set with some specific value, defines the number of time divisions split per hour(as per value given for the majorTimeSlot). Those time divisions are meant to be the minor slots. + * @Default {2} + */ + minorSlotCount?: number; + + /**Accepts the value in minutes. When provided with specific value, displays the appropriate time interval on the Scheduler + * @Default {60} + */ + majorSlot?: number; + + /**Accepts id value of the template defined for minor time slots + * @Default {null} + */ + minorSlotTemplateId?: string; + + /**Accepts id value of the template defined for major time slots. + * @Default {null} + */ + majorSlotTemplateId?: string; +} + +enum CurrentView{ + + ///Set currentView as Day to Scheduler + Day, + + ///Set currentView as Week to Scheduler + Week, + + ///Set currentView as Workweek to Scheduler + Workweek, + + ///Set currentView as Month to Scheduler + Month, + + ///Set currentView as Agenda to Scheduler + Agenda, + + ///Set currentView as CustomView to Scheduler + CustomView +} + + +enum Orientation{ + + ///Set orientation as vertical to Scheduler + Vertical, + + ///Set orientation as horizontal to Scheduler + Horizontal +} + + +enum TimeMode{ + + ///Set timeMode as 12 hours to Scheduler + Hour12, + + ///Set timeMode as 24 hours to Scheduler + Hour24 +} + +} + +class RecurrenceEditor extends ej.Widget { + static fn: RecurrenceEditor; + static Locale:any; + constructor(element: JQuery, options?: RecurrenceEditorOptions); + constructor(element: Element, options?: RecurrenceEditorOptions); + model:RecurrenceEditorOptions; + defaults:RecurrenceEditorOptions; + recurrenceDateGenerator(recurrenceString: string,strDate:Object): string; + closeRecurPublic(): string; + getRecurrenceRule(): void; + recurrenceRuleSplit(recurrenceRule: string, recurrenceExDate?: string): Object; + +} +interface RecurrenceEditorOptions { + frequencies?: Array; + firstDayOfWeek?: string; + name?: string; + enableSpinners?: boolean; + startDate?: Date; + locale?: string; + enableRTL?: boolean; + value?: string; + dateFormat?: string; + selectedRecurrenceType?: number; + enableRecurrenceValidation?: boolean; + minDate?: Date; + maxDate?: Date; + cssClass?: string; + change?(e: RecurrenceEditorChangeEvent): void; + create?(e: RecurrenceEditorBaseEvent): void; +} +interface RecurrenceEditorBaseEvent extends ej.BaseEvent { + model: RecurrenceEditorOptions; +} +interface RecurrenceEditorChangeEvent extends RecurrenceEditorBaseEvent { + requestType?: string; +} +class Gantt extends ej.Widget { + static fn: Gantt; + constructor(element: JQuery, options?: Gantt.Model); + constructor(element: Element, options?: Gantt.Model); + model:Gantt.Model; + defaults:Gantt.Model; + + /** To add item in gantt + * @param {any} Item to add in Gantt row. + * @param {string} Defines in which position the row wants to add + * @returns {void} + */ + addRecord(data: any, rowPosition: string): void; + + /** Positions the splitter by the specified column index. + * @param {number} Set the splitter position based on column index. + * @returns {void} + */ + setSplitterIndex(index: number): void; + + /** To cancel the edited state of an item in gantt + * @returns {void} + */ + cancelEdit(): void; + + /** To collapse all the parent items in gantt + * @returns {void} + */ + collapseAllItems(): void; + + /** To delete a selected item in gantt + * @returns {void} + */ + deleteItem(): void; + + /** destroy the gantt widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To Expand all the parent items in gantt + * @returns {void} + */ + expandAllItems(): void; + + /** To expand and collapse an item in gantt using item's ID + * @param {number} Exapnd or Collapse a record based on task id. + * @returns {void} + */ + expandCollapseRecord(taskId: number): void; + + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide + * @returns {void} + */ + hideColumn(headerText: string): void; + + /** To indent a selected item in gantt + * @returns {void} + */ + indentItem(): void; + + /** To Open the dialog to add new task to the gantt + * @returns {void} + */ + openAddDialog(): void; + + /** To Open the dialog to edit existing task to the gantt + * @returns {void} + */ + openEditDialog(): void; + + /** To outdent a selected item in gantt + * @returns {void} + */ + outdentItem(): void; + + /** To save the edited state of an item in gantt + * @returns {void} + */ + saveEdit(): void; + + /** To search an item with search string provided at the run time + * @param {string} you can pass a text to search in Gantt Control. + * @returns {void} + */ + searchItem(searchString: string): void; + + /** To set the grid width in gantt + * @param {string} you can give either percentage or pixels value + * @returns {void} + */ + setSplitterPosition(width: string): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show + * @returns {void} + */ + showColumn(headerText: string): void; +} +export module Gantt{ + +export interface Model { + + /**Specifies the fields to be included in the add dialog in gantt + * @Default {[]} + */ + addDialogFields?: Array; + + /**Enables or disables the ability to resize column. + * @Default {false} + */ + allowColumnResize?: boolean; + + /**Enables or Disables gantt chart editing in gantt + * @Default {true} + */ + allowGanttChartEditing?: boolean; + + /**Enables or Disables Keyboard navigation in gantt + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Specifies enabling or disabling multiple sorting for Gantt columns + * @Default {false} + */ + allowMultiSorting?: boolean; + + /**Enables or disables the interactive selection of a row. + * @Default {true} + */ + allowSelection?: boolean; + + /**Enables or disables sorting. When enabled, we can sort the column by clicking on the column. + * @Default {false} + */ + allowSorting?: boolean; + + /**Enable or disable predecessor validation. When it is true, all the task's start and end dates are aligned based on its predecessors start and end dates. + * @Default {true} + */ + enablePredecessorValidation?: boolean; + + /**Specifies the baseline background color in gantt + * @Default {#fba41c} + */ + baselineColor?: string; + + /**Specifies the mapping property path for baseline end date in datasource + */ + baselineEndDateMapping?: string; + + /**Specifies the mapping property path for baseline start date of a task in datasource + */ + baselineStartDateMapping?: string; + + /**Specifies the mapping property path for sub tasks in datasource + */ + childMapping?: string; + + /**Specifies the background of connector lines in Gantt + */ + connectorLineBackground?: string; + + /**Specifies the width of the connector lines in gantt + * @Default {1} + */ + connectorlineWidth?: number; + + /**Specify the CSS class for gantt to achieve custom theme. + */ + cssClass?: string; + + /**Collection of data or hierarchical data to represent in gantt + * @Default {null} + */ + dataSource?: Array; + + /**Specifies the dateFormat for gantt , given format is displayed in tooltip , grid . + * @Default {MM/dd/yyyy} + */ + dateFormat?: string; + + /**Specifies the mapping property path for duration of a task in datasource + */ + durationMapping?: string; + + /**Specifies the duration unit for each tasks whether days or hours or minutes + * @Default {ej.Gantt.DurationUnit.Day} + */ + durationUnit?: ej.Gantt.DurationUnit|string; + + /**Specifies the fields to be included in the edit dialog in gantt + * @Default {[]} + */ + editDialogFields?: Array; + + /**Option to configure the splitter position. + */ + splitterSettings?: SplitterSettings; + + /**Specifies the editSettings options in gantt. + */ + editSettings?: EditSettings; + + /**Enables or Disables enableAltRow row effect in gantt + * @Default {true} + */ + enableAltRow?: boolean; + + /**Enables or disables the collapse all records when loading the gantt. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /**Enables or disables the contextmenu for gantt , when enabled contextmenu appears on right clicking gantt + * @Default {false} + */ + enableContextMenu?: boolean; + + /**Indicates whether we can edit the progress of a task interactively in gantt chart. + * @Default {true} + */ + enableProgressBarResizing?: boolean; + + /**Enables or disables the option for dynamically updating the Gantt size on window resizing + * @Default {false} + */ + enableResize?: boolean; + + /**Enables or disables tooltip while editing (dragging/resizing) the taskbar. + * @Default {true} + */ + enableTaskbarDragTooltip?: boolean; + + /**Enables or disables tooltip for taskbar. + * @Default {true} + */ + enableTaskbarTooltip?: boolean; + + /**Enables/Disables virtualization for rendering gantt items. + * @Default {false} + */ + enableVirtualization?: boolean; + + /**Specifies the mapping property path for end Date of a task in datasource + */ + endDateMapping?: string; + + /**Specifies whether to highlight the weekends in gantt . + * @Default {true} + */ + highlightWeekends?: boolean; + + /**Collection of holidays with date, background and label information to be displayed in gantt. + * @Default {[]} + */ + holidays?: Array; + + /**Specifies whether to include weekends while calculating the duration of a task. + * @Default {true} + */ + includeWeekend?: boolean; + + /**Specify the locale for gantt + * @Default {en-US} + */ + locale?: string; + + /**Specifies the mapping property path for milestone in datasource + */ + milestoneMapping?: string; + + /**Specifies the background of parent progressbar in gantt + */ + parentProgressbarBackground?: string; + + /**Specifies the background of parent taskbar in gantt + */ + parentTaskbarBackground?: string; + + /**Specifies the mapping property path for parent task Id in self reference datasource + */ + parentTaskIdMapping?: string; + + /**Specifies the mapping property path for predecessors of a task in datasource + */ + predecessorMapping?: string; + + /**Specifies the background of progressbar in gantt + */ + progressbarBackground?: string; + + /**Specified the height of the progressbar in taskbar + * @Default {100} + */ + progressbarHeight?: number; + + /**Specifies the template for tooltip on resizing progressbar + * @Default {null} + */ + progressbarTooltipTemplate?: string; + + /**Specifies the template ID for customized tooltip for progressbar editing in gantt + * @Default {null} + */ + progressbarTooltipTemplateId?: string; + + /**Specifies the mapping property path for progress percentage of a task in datasource + */ + progressMapping?: string; + + /**It receives query to retrieve data from the table (query is same as SQL). + * @Default {null} + */ + query?: any; + + /**Enables or Disables rendering baselines in Gantt , when enabled baseline is rendered in gantt + * @Default {false} + */ + renderBaseline?: boolean; + + /**Specifies the mapping property name for resource ID in resource Collection in gantt + */ + resourceIdMapping?: string; + + /**Specifies the mapping property path for resources of a task in datasource + */ + resourceInfoMapping?: string; + + /**Specifies the mapping property path for resource name of a task in gantt + */ + resourceNameMapping?: string; + + /**Collection of data regarding resources involved in entire project + * @Default {[]} + */ + resources?: Array; + + /**Specifies whether rounding off the day working time edits + * @Default {true} + */ + roundOffDayworkingTime?: boolean; + + /**Specifies the height of a single row in gantt. Also, we need to set same height in the CSS style with class name e-rowcell. + * @Default {30} + */ + rowHeight?: number; + + /**Specifies end date of the gantt schedule. By default, end date will be rounded to its next Saturday. + * @Default {null} + */ + scheduleEndDate?: string; + + /**Specifies the options for customizing schedule header. + */ + scheduleHeaderSettings?: ScheduleHeaderSettings; + + /**Specifies start date of the gantt schedule. By default, start date will be rounded to its previous Sunday. + * @Default {null} + */ + scheduleStartDate?: string; + + /**Specifies the selected row index in gantt + * @Default {null} + */ + selectedItem?: number; + + /**Specifies the selected row Index in gantt , the row with given index will highlighted + * @Default {-1} + */ + selectedRowIndex?: number; + + /**Enables or disables the column chooser. + * @Default {false} + */ + showColumnChooser?: boolean; + + /**Specifies whether to show grid cell tooltip. + * @Default {true} + */ + showGridCellTooltip?: boolean; + + /**Specifies whether to show grid cell tooltip over expander cell alone. + * @Default {true} + */ + showGridExpandCellTooltip?: boolean; + + /**Specifies whether display task progress inside taskbar. + * @Default {true} + */ + showProgressStatus?: boolean; + + /**Specifies whether to display resource names for a task beside taskbar. + * @Default {true} + */ + showResourceNames?: boolean; + + /**Specifies whether to display task name beside task bar. + * @Default {true} + */ + showTaskNames?: boolean; + + /**Specifies the size option of gantt control. + */ + sizeSettings?: SizeSettings; + + /**Specifies the sorting options for gantt. + */ + sortSettings?: SortSettings; + + /**Specifies splitter position in gantt. + * @Default {null} + */ + splitterPosition?: string; + + /**Specifies the mapping property path for start date of a task in datasource + */ + startDateMapping?: string; + + /**Specifies the options for striplines + * @Default {[]} + */ + stripLines?: Array; + + /**Specifies the background of the taskbar in gantt + */ + taskbarBackground?: string; + + /**Specifies the template script for customized tooltip for taskbar editing in gantt + */ + taskbarEditingTooltipTemplate?: string; + + /**Specifies the template Id for customized tooltip for taskbar editing in gantt + */ + taskbarEditingTooltipTemplateId?: string; + + /**Specifies the template for tooltip on mouse action on taskbars + */ + taskbarTooltipTemplate?: string; + + /**Specifies the template id for tooltip on mouse action on taskbars + */ + taskbarTooltipTemplateId?: string; + + /**Specifies the mapping property path for task Id in datasource + */ + taskIdMapping?: string; + + /**Specifies the mapping property path for task name in datasource + */ + taskNameMapping?: string; + + /**Specifies the toolbarSettings options. + */ + toolbarSettings?: ToolbarSettings; + + /**Specifies the tree expander column in gantt + * @Default {0} + */ + treeColumnIndex?: number; + + /**Specifies the weekendBackground color in gantt + * @Default {#F2F2F2} + */ + weekendBackground?: string; + + /**Specifies the working time schedule of day + * @Default {ej.Gantt.workingTimeScale.TimeScale8Hours} + */ + workingTimeScale?: ej.Gantt.workingTimeScale|string; + + /**Triggered for every gantt action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every gantt action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered while enter the edit mode in the tree grid cell*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered after collapsed the gantt record*/ + collapsed? (e: CollapsedEventArgs): void; + + /**Triggered while collapsing the gantt record*/ + collapsing? (e: CollapsingEventArgs): void; + + /**Triggered while Context Menu is rendered in Gantt control*/ + contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + + /**Triggered after save the modified cellValue in gantt.*/ + endEdit? (e: EndEditEventArgs): void; + + /**Triggered after expand the record*/ + expanded? (e: ExpandedEventArgs): void; + + /**Triggered while expanding the gantt record*/ + expanding? (e: ExpandingEventArgs): void; + + /**Triggered while gantt is loaded*/ + load? (e: LoadEventArgs): void; + + /**Triggered while rendering each cell in the tree grid*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggered while rendering each taskbar in the gantt chart*/ + queryTaskbarInfo? (e: QueryTaskbarInfoEventArgs): void; + + /**Triggered while rendering each row*/ + rowDataBound? (e: RowDataBoundEventArgs): void; + + /**Triggered after the row is selected.*/ + rowSelected? (e: RowSelectedEventArgs): void; + + /**Triggered before the row is going to be selected.*/ + rowSelecting? (e: RowSelectingEventArgs): void; + + /**Triggered after completing the editing operation in taskbar*/ + taskbarEdited? (e: TaskbarEditedEventArgs): void; + + /**Triggered while editing the gantt chart (dragging, resizing the taskbar )*/ + taskbarEditing? (e: TaskbarEditingEventArgs): void; + + /**Triggered when toolbar item is clicked in Gantt.*/ + toolbarClick? (e: ToolbarClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; + + /**Returns the value of searching element. + */ + keyValue?: string; + + /**Returns the data of deleting element. + */ + data?: string; + + /**Returns selected record index + */ + recordIndex?: number; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; + + /**Returns the value of searched element. + */ + keyValue?: string; + + /**Returns the data of deleted element. + */ + data?: string; + + /**Returns selected record index + */ + recordIndex?: number; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column Index of cell belongs. + */ + columnIndex?: number; +} + +export interface CollapsedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsed record. + */ + recordIndex?: number; + + /**Returns the data of collapsed record. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface CollapsingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsing record. + */ + recordIndex?: number; + + /**Returns the data of edited cell record.. + */ + data?: any; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface ContextMenuOpenEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the default context menu items to which we add custom items. + */ + contextMenuItems?: Array; + + /**Returns the gantt model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of edited cell record. + */ + data?: any; + + /**Returns the column name of edited cell belongs. + */ + columnName?: string; + + /**Returns the column object of edited cell belongs. + */ + columnObject?: any; +} + +export interface ExpandedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of record. + */ + recordIndex?: number; + + /**Returns the data of expanded record. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface ExpandingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of record. + */ + recordIndex?: any; + + /**Returns the data of edited cell record.. + */ + data?: any; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface LoadEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the gantt model + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface QueryCellInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting cell element. + */ + cellElement?: any; + + /**Returns the value of cell. + */ + cellValue?: string; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column of cell belongs. + */ + column?: any; +} + +export interface QueryTaskbarInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the taskbar background of current item. + */ + TaskbarBackground?: string; + + /**Returns the progressbar background of current item. + */ + ProgressbarBackground?: string; + + /**Returns the parent taskbar background of current item. + */ + parentTaskbarBackground?: string; + + /**Returns the parent progressbar background of current item. + */ + parentProgressbarBackground?: string; + + /**Returns the data of the record. + */ + data?: any; +} + +export interface RowDataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of rendering row. + */ + rowElement?: any; + + /**Returns the data of rendering row record.. + */ + data?: any; +} + +export interface RowSelectedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting row element. + */ + targetRow?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: number; + + /**Returns the data of selected record. + */ + data?: any; +} + +export interface RowSelectingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data selecting record. + */ + data?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: string; + + /**Returns the selecting row chart element. + */ + targetChartRow?: any; + + /**Returns the selecting row grid element. + */ + targetGridRow?: any; + + /**Returns the previous selected data. + */ + previousData?: any; + + /**Returns the previous selected row index. + */ + previousIndex?: string; + + /**Returns the previous selected row chart element. + */ + previousChartRow?: any; + + /**Returns the previous selected row grid element. + */ + previousGridRow?: any; +} + +export interface TaskbarEditedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data of edited record. + */ + data?: any; + + /**Returns the previous data value of edited record. + */ + previousData?: any; + + /**Returns 'true' if taskbar is dragged. + */ + dragging?: boolean; + + /**Returns 'true' if taskbar is left resized. + */ + leftResizing?: boolean; + + /**Returns 'true' if taskbar is right resized. + */ + rightResizing?: boolean; + + /**Returns 'true' if taskbar is progress resized. + */ + progressResizing?: boolean; + + /**Returns the field values of record being edited. + */ + editingFields?: any; + + /**Returns the gantt model. + */ + model?: any; +} + +export interface TaskbarEditingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the gantt model. + */ + model?: any; + + /**Returns the row object being edited. + */ + rowData?: any; + + /**Returns the field values of record being edited. + */ + editingFields?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface ToolbarClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the Gantt model. + */ + model?: any; + + /**Returns the name of the toolbar item on which mouse click has been performed + */ + itemName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface SplitterSettings { + + /**Specifies position of the splitter in Gantt , splitter can be placed either based on percentage values or pixel values. + */ + position?: string; + + /**Specifies the position of splitter in Gantt, based on column index in Gantt. + */ + index?: string; +} + +export interface EditSettings { + + /**Enables or disables add record icon in gantt toolbar + * @Default {false} + */ + allowAdding?: boolean; + + /**Enables or disables delete icon in gantt toolbar + * @Default {false} + */ + allowDeleting?: boolean; + + /**Specifies the option for enabling or disabling editing in Gantt grid part + * @Default {false} + */ + allowEditing?: boolean; + + /**Specifies the edit mode in Gantt, "normal" is for dialog editing ,"cellEditing" is for cell type editing + * @Default {normal} + */ + editMode?: string; +} + +export interface ScheduleHeaderSettings { + + /**Specified the format for day view in schedule header + * @Default {ddd} + */ + dayHeaderFormat?: string; + + /**Specified the format for Hour view in schedule header + * @Default {HH} + */ + hourHeaderFormat?: string; + + /**Specifies the number of minutes per interval + * @Default {ej.Gantt.minutesPerInterval.Auto} + */ + minutesPerInterval?: ej.Gantt.minutesPerInterval|string; + + /**Specified the format for month view in schedule header + * @Default {MMM} + */ + monthHeaderFormat?: string; + + /**Specifies the schedule mode + * @Default {ej.Gantt.ScheduleHeaderType.Week} + */ + scheduleHeaderType?: ej.Gantt.ScheduleHeaderType|string; + + /**Specified the background for weekends in gantt + * @Default {#F2F2F2} + */ + weekendBackground?: string; + + /**Specified the format for week view in schedule header + * @Default {ddd} + */ + weekHeaderFormat?: string; + + /**Specified the format for year view in schedule header + * @Default {yyyy} + */ + yearHeaderFormat?: string; +} + +export interface SizeSettings { + + /**Specifies the height of gantt control + * @Default {450px} + */ + height?: string; + + /**Specifies the width of gantt control + * @Default {1000px} + */ + width?: string; +} + +export interface SortSettings { + + /**Specifies the sorted columns for gantt + * @Default {[]} + */ + sortedColumns?: Array; +} + +export interface ToolbarSettings { + + /**Specifies the state of enabling or disabling toolbar + * @Default {true} + */ + showToolBar?: boolean; + + /**Specifies the list of toolbar items to rendered in toolbar + * @Default {[]} + */ + toolbarItems?: Array; +} + +enum DurationUnit{ + + ///Sets the Duration Unit as day. + Day, + + ///Sets the Duration Unit as hour. + Hour, + + ///Sets the Duration Unit as minute. + Minute +} + + +enum minutesPerInterval{ + + ///Sets the interval automatically according with schedule start and end date. + Auto, + + ///Sets one minute intervals per hour. + OneMinute, + + ///Sets Five minute intervals per hour. + FiveMinutes, + + ///Sets fifteen minute intervals per hour. + FifteenMinutes, + + ///Sets thirty minute intervals per hour. + ThirtyMinutes +} + + +enum ScheduleHeaderType{ + + ///Sets year Schedule Mode. + Year, + + ///Sets month Schedule Mode. + Month, + + ///Sets week Schedule Mode. + Week, + + ///Sets day Schedule Mode. + Day, + + ///Sets hour Schedule Mode. + Hour +} + + +enum workingTimeScale{ + + ///Sets eight hour timescale. + TimeScale8Hours, + + ///Sets twenty four hour timescale. + TimeScale24Hours +} + +} + +class ReportViewer extends ej.Widget { + static fn: ReportViewer; + constructor(element: JQuery, options?: ReportViewer.Model); + constructor(element: Element, options?: ReportViewer.Model); + model:ReportViewer.Model; + defaults:ReportViewer.Model; + + /** Export the report to the specified format. + * @returns {void} + */ + exportReport(): void; + + /** Fit the report page to the container. + * @returns {void} + */ + fitToPage(): void; + + /** Fit the report page height to the container. + * @returns {void} + */ + fitToPageHeight(): void; + + /** Fit the report page width to the container. + * @returns {void} + */ + fitToPageWidth(): void; + + /** Get the available datasets name of the rdlc report. + * @returns {void} + */ + getDataSetNames(): void; + + /** Get the available parameters of the report. + * @returns {void} + */ + getParameters(): void; + + /** Navigate to first page of report. + * @returns {void} + */ + gotoFirstPage(): void; + + /** Navigate to last page of the report. + * @returns {void} + */ + gotoLastPage(): void; + + /** Navigate to next page from the current page. + * @returns {void} + */ + gotoNextPage(): void; + + /** Go to specific page index of the report. + * @returns {void} + */ + gotoPageIndex(): void; + + /** Navigate to previous page from the current page. + * @returns {void} + */ + gotoPreviousPage(): void; + + /** Print the report. + * @returns {void} + */ + print(): void; + + /** Apply print layout to the report. + * @returns {void} + */ + printLayout(): void; + + /** Refresh the report. + * @returns {void} + */ + refresh(): void; +} +export module ReportViewer{ + +export interface Model { + + /**Gets or sets the list of data sources for the RDLC report. + * @Default {[]} + */ + dataSources?: Array; + + /**Enables or disables the page cache of report. + * @Default {false} + */ + enablePageCache?: boolean; + + /**Specifies the export settings. + */ + exportSettings?: ExportSettings; + + /**When set to true, adapts the report layout to fit the screen size of devices on which it renders. + * @Default {true} + */ + isResponsive?: boolean; + + /**Specifies the locale for report viewer. + * @Default {en-US} + */ + locale?: string; + + /**Specifies the page settings. + */ + pageSettings?: PageSettings; + + /**Gets or sets the list of parameters associated with the report. + * @Default {[]} + */ + parameters?: Array; + + /**Enables and disables the print mode. + * @Default {false} + */ + printMode?: boolean; + + /**Specifies the print option of the report. + * @Default {ej.ReportViewer.PrintOptions.Default} + */ + printOptions?: ej.ReportViewer.PrintOptions|string; + + /**Specifies the processing mode of the report. + * @Default {ej.ReportViewer.ProcessingMode.Remote} + */ + processingMode?: ej.ReportViewer.ProcessingMode|string; + + /**Specifies the render layout. + * @Default {ej.ReportViewer.RenderMode.Default} + */ + renderMode?: ej.ReportViewer.RenderMode|string; + + /**Gets or sets the path of the report file. + * @Default {empty} + */ + reportPath?: string; + + /**Gets or sets the reports server url. + * @Default {empty} + */ + reportServerUrl?: string; + + /**Specifies the report Web API service url. + * @Default {empty} + */ + reportServiceUrl?: string; + + /**Specifies the toolbar settings. + */ + toolbarSettings?: ToolbarSettings; + + /**Gets or sets the zoom factor for report viewer. + * @Default {1} + */ + zoomFactor?: number; + + /**Fires when the report viewer is destroyed successfully.If you want to perform any operation after destroying the reportviewer control,you can make use of the destroy event.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires during drill through action done in report.If you want to perform any operation when a drill through action is performed, you can make use of the drillThrough event.*/ + drillThrough? (e: DrillThroughEventArgs): void; + + /**Fires before report rendering is completed.If you want to perform any operation before the rendering of report,you can make use of the renderingBegin event.*/ + renderingBegin? (e: RenderingBeginEventArgs): void; + + /**Fires after report rendering completed.If you want to perform any operation after the rendering of report,you can make use of this renderingComplete event.*/ + renderingComplete? (e: RenderingCompleteEventArgs): void; + + /**Fires when any error occurred while rendering the report.If you want to perform any operation when an error occurs in the report, you can make use of the reportError event.*/ + reportError? (e: ReportErrorEventArgs): void; + + /**Fires when the report is being exported.If you want to perform any operation before exporting of report, you can make use of the reportExport event.*/ + reportExport? (e: ReportExportEventArgs): void; + + /**Fires when the report is loaded.If you want to perform any operation after the successful loading of report, you can make use of the reportLoaded event.*/ + reportLoaded? (e: ReportLoadedEventArgs): void; + + /**Fires when click the View Report Button.*/ + viewReportClick? (e: ViewReportClickEventArgs): void; +} + +export interface DestroyEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DrillThroughEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the actionInfo's parameters bookmarkLink, hyperLink, reportName, parameters. + */ + actionInfo?: any; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderingBeginEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderingCompleteEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; + + /**returns the collection of parameters. + */ + reportParameters?: any; +} + +export interface ReportErrorEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the error details. + */ + error?: string; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ReportExportEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ReportLoadedEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ViewReportClickEventArgs { + + /**true if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the parameter collection. + */ + parameters?: any; + + /**returns the report model. + */ + model?: any; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DataSources { + + /**Gets or sets the name of the data source. + * @Default {empty} + */ + name?: string; + + /**Gets or sets the values of data source. + * @Default {[]} + */ + values?: Array; +} + +export interface ExportSettings { + + /**Specifies the export formats. + * @Default {ej.ReportViewer.ExportOptions.All} + */ + exportOptions?: ej.ReportViewer.ExportOptions|string; + + /**Specifies the excel export format. + * @Default {ej.ReportViewer.ExcelFormats.Excel97to2003} + */ + excelFormat?: ej.ReportViewer.ExcelFormats|string; + + /**Specifies the word export format. + * @Default {ej.ReportViewer.WordFormats.Doc} + */ + wordFormat?: ej.ReportViewer.WordFormats|string; +} + +export interface PageSettings { + + /**Specifies the print layout orientation. + * @Default {null} + */ + orientation?: ej.ReportViewer.Orientation|string; + + /**Specifies the paper size of print layout. + * @Default {null} + */ + paperSize?: ej.ReportViewer.PaperSize|string; +} + +export interface Parameters { + + /**Gets or sets the parameter labels. + * @Default {null} + */ + labels?: Array; + + /**Gets or sets the name of the parameter. + * @Default {empty} + */ + name?: string; + + /**Gets or sets whether the parameter allows nullable value or not. + * @Default {false} + */ + nullable?: boolean; + + /**Gets or sets the prompt message associated with the specified parameter. + * @Default {empty} + */ + prompt?: string; + + /**Gets or sets the parameter values. + * @Default {[]} + */ + values?: Array; +} + +export interface ToolbarSettings { + + /**Fires when user click on toolbar item in the toolbar. + * @Default {empty} + */ + click?: string; + + /**Specifies the toolbar items. + * @Default {ej.ReportViewer.ToolbarItems.All} + */ + items?: ej.ReportViewer.ToolbarItems|string; + + /**Shows or hides the toolbar. + * @Default {true} + */ + showToolbar?: boolean; + + /**Shows or hides the tooltip of toolbar items. + * @Default {true} + */ + showTooltip?: boolean; + + /**Specifies the toolbar template ID. + * @Default {empty} + */ + templateId?: string; +} + +enum ExportOptions{ + + ///Specifies the All property in ExportOptions to get all availble options. + All, + + ///Specifies the Pdf property in ExportOptions to get Pdf option. + Pdf, + + ///Specifies the Word property in ExportOptions to get Word option. + Word, + + ///Specifies the Excel property in ExportOptions to get Excel option. + Excel, + + ///Specifies the Html property in ExportOptions to get Html option. + Html +} + + +enum ExcelFormats{ + + ///Specifies the Excel97to2003 property in ExcelFormats to get specified version of exported format. + Excel97to2003, + + ///Specifies the Excel2007 property in ExcelFormats to get specified version of exported format. + Excel2007, + + ///Specifies the Excel2010 property in ExcelFormats to get specified version of exported format. + Excel2010, + + ///Specifies the Excel2013 property in ExcelFormats to get specified version of exported format. + Excel2013 +} + + +enum WordFormats{ + + ///Specifies the Doc property in WordFormats to get specified version of exported format. + Doc, + + ///Specifies the Dot property in WordFormats to get specified version of exported format. + Dot, + + ///Specifies the Docx property in WordFormats to get specified version of exported format. + Docx, + + ///Specifies the Word2007 property in WordFormats to get specified version of exported format. + Word2007, + + ///Specifies the Word2010 property in WordFormats to get specified version of exported format. + Word2010, + + ///Specifies the Word2013 property in WordFormats to get specified version of exported format. + Word2013, + + ///Specifies the Word2007Dotx property in WordFormats to get specified version of exported format. + Word2007Dotx, + + ///Specifies the Word2010Dotx property in WordFormats to get specified version of exported format. + Word2010Dotx, + + ///Specifies the Word2013Dotx property in WordFormats to get specified version of exported format. + Word2013Dotx, + + ///Specifies the Word2007Docm property in WordFormats to get specified version of exported format. + Word2007Docm, + + ///Specifies the Word2010Docm property in WordFormats to get specified version of exported format. + Word2010Docm, + + ///Specifies the Word2013Docm property in WordFormats to get specified version of exported format. + Word2013Docm, + + ///Specifies the Word2007Dotm property in WordFormats to get specified version of exported format. + Word2007Dotm, + + ///Specifies the Word2010Dotm property in WordFormats to get specified version of exported format. + Word2010Dotm, + + ///Specifies the Word2013Dotm property in WordFormats to get specified version of exported format. + Word2013Dotm, + + ///Specifies the Rtf property in WordFormats to get specified version of exported format. + Rtf, + + ///Specifies the Txt property in WordFormats to get specified version of exported format. + Txt, + + ///Specifies the EPub property in WordFormats to get specified version of exported format. + EPub, + + ///Specifies the Html property in WordFormats to get specified version of exported format. + Html, + + ///Specifies the Xml property in WordFormats to get specified version of exported format. + Xml, + + ///Specifies the Automatic property in WordFormats to get specified version of exported format. + Automatic +} + + +enum Orientation{ + + ///Specifies the Landscape property in pageSettings.orientation to get specified layout. + Landscape, + + ///Specifies the portrait property in pageSettings.orientation to get specified layout. + Portrait +} + + +enum PaperSize{ + + ///Specifies the A3 as value in pageSettings.paperSize to get specified size. + A3, + + ///Specifies the A4 as value in pageSettings.paperSize to get specified size. + Portrait, + + ///Specifies the B4(JIS) as value in pageSettings.paperSize to get specified size. + B4_JIS, + + ///Specifies the B5(JIS) as value in pageSettings.paperSize to get specified size. + B5_JIS, + + ///Specifies the Envelope #10 as value in pageSettings.paperSize to get specified size. + Envelope_10, + + ///Specifies the Envelope as value in pageSettings.paperSize to get specified size. + Envelope_Monarch, + + ///Specifies the Executive as value in pageSettings.paperSize to get specified size. + Executive, + + ///Specifies the Legal as value in pageSettings.paperSize to get specified size. + Legal, + + ///Specifies the Letter as value in pageSettings.paperSize to get specified size. + Letter, + + ///Specifies the Tabloid as value in pageSettings.paperSize to get specified size. + Tabloid, + + ///Specifies the Custom as value in pageSettings.paperSize to get specified size. + Custom +} + + +enum PrintOptions{ + + ///Specifies the Default property in printOptions. + Default, + + ///Specifies the NewTab property in printOptions. + NewTab, + + ///Specifies the None property in printOptions. + None +} + + +enum ProcessingMode{ + + ///Specifies the Remote property in processingMode. + Remote, + + ///Specifies the Local property in processingMode. + Local +} + + +enum RenderMode{ + + ///Specifies the Default property in RenderMode to get default output. + Default, + + ///Specifies the Mobile property in RenderMode to get specified output. + Mobile, + + ///Specifies the Desktop property in RenderMode to get specified output. + Desktop +} + + +enum ToolbarItems{ + + ///Specifies the Print as value in ToolbarItems to get specified item. + Print, + + ///Specifies the Refresh as value in ToolbarItems to get specified item. + Refresh, + + ///Specifies the Zoom as value in ToolbarItems to get specified item. + Zoom, + + ///Specifies the FittoPage as value in ToolbarItems to get specified item. + FittoPage, + + ///Specifies the Export as value in ToolbarItems to get specified item. + Export, + + ///Specifies the PageNavigation as value in ToolbarItems to get specified item. + PageNavigation, + + ///Specifies the Parameters as value in ToolbarItems to get specified item. + Parameters, + + ///Specifies the PrintLayout as value in ToolbarItems to get specified item. + PrintLayout, + + ///Specifies the PageSetup as value in ToolbarItems to get specified item. + PageSetup +} + +} + +class TreeGrid extends ej.Widget { + static fn: TreeGrid; + constructor(element: JQuery, options?: TreeGrid.Model); + constructor(element: Element, options?: TreeGrid.Model); + model:TreeGrid.Model; + defaults:TreeGrid.Model; + + /** To clear all the selection in TreeGrid + * @param {number} you can pass a row index to clear the row selection. + * @returns {void} + */ + clearSelection(index: number): void; + + /** To collapse all the parent items in tree grid + * @returns {void} + */ + collapseAll(): void; + + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide. + * @returns {void} + */ + hideColumn(headerText: string): void; + + /** To refresh the changes in tree grid + * @param {Array} Pass which data source you want to show in tree grid + * @param {any} Pass which data you want to show in tree grid + * @returns {void} + */ + refresh(dataSource: Array, query: any): void; + + /** Freeze all the columns preceding to the column specified by the field name. + * @param {string} Freeze all Columns before this field column. + * @returns {void} + */ + freezePrecedingColumns (field: string): void; + + /** Freeze/unfreeze the specified column. + * @param {string} Freeze/Unfreeze this field column. + * @param {boolean} Decides to Freeze/Unfreeze this field column. + * @returns {void} + */ + freezeColumn (field: string, isFrozen: boolean): void; + + /** To save the edited cell in TreeGrid + * @returns {void} + */ + saveCell(): void; + + /** To search an item with search string provided at the run time + * @param {string} you can pass a searchString to search the tree grid + * @returns {void} + */ + search(searchString: string): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show. + * @returns {void} + */ + showColumn(headerText: string): void; + + /** To sorting the data based on the particular fields + * @param {string} you can pass a name of column to sort. + * @param {string} you can pass a sort direction to sort the column. + * @returns {void} + */ + sortColumn(columnName: string, columnSortDirection: string): void; +} +export module TreeGrid{ + +export interface Model { + + /**Enables or disables the ability to resize the column width interactively. + * @Default {false} + */ + allowColumnResize?: boolean; + + /**Enables or disables the ability to drag and drop the row interactively to reorder the rows. + * @Default {false} + */ + allowDragAndDrop?: boolean; + + /**Enables or disables the ability to filter the data on all the columns. Enabling this property will display a row with editor controls corresponding to each column. You can restrict filtering on particular column by disabling this property directly on that column instance itself. + * @Default {false} + */ + allowFiltering?: boolean; + + /**Enables or disables keyboard navigation. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Enables or disables the ability to sort the rows based on multiple columns/fields by clicking on each column header. Rows will be sorted recursively on clicking the column headers. + * @Default {false} + */ + allowMultiSorting?: boolean; + + /**Enables or disables the ability to select a row interactively. + * @Default {true} + */ + allowSelection?: boolean; + + /**Enables or disables the ability to sort the rows based on a single field/column by clicking on that column header. When enabled, rows can be sorted only by single field/column. + * @Default {false} + */ + allowSorting?: boolean; + + /**Specifies the id of the template that has to be applied for alternate rows. + */ + altRowTemplateID?: string; + + /**Specifies the mapping property path for sub tasks in datasource + */ + childMapping?: string; + + /**Option for adding columns; each column has the option to bind to a field in the dataSource. + */ + columns?: Array; + + /**Options for displaying and customizing context menu items. + */ + contextMenuSettings?: ContextMenuSettings; + + /**Specifies hierarchical or self-referential data to populate the TreeGrid. + * @Default {null} + */ + dataSource?: Array; + + /**Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. + * @Default {none} + */ + headerTextOverflow?: string; + + /**Options for displaying and customizing the tooltip. This tooltip will show the preview of the row that is being dragged. + */ + dragTooltip?: DragTooltip; + + /**Options for enabling and configuring the editing related operations. + */ + editSettings?: EditSettings; + + /**Specifies whether to render alternate rows in different background colors. + * @Default {true} + */ + enableAltRow?: boolean; + + /**Specifies whether to load all the rows in collapsed state when the TreeGrid is rendered for the first time. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /**Specifies whether to resize TreeGrid whenever window size changes. + * @Default {false} + */ + enableResize?: boolean; + + /**Specifies whether to render only the visual elements that are visible in the UI. When you enable this property, it will reduce the loading time for loading large number of records. + * @Default {false} + */ + enableVirtualization?: boolean; + + /**Specifies if the filtering should happen immediately on each key press or only on pressing enter key. + * @Default {immediate} + */ + filterBarMode?: string; + + /**Specifies the name of the field in the dataSource, which contains the id of that row. + */ + idMapping?: string; + + /**Specifies the name of the field in the dataSource, which contains the parent’s id. This is necessary to form a parent-child hierarchy, if the dataSource contains self-referential data. + */ + parentIdMapping?: string; + + /**Specifies ej.Query to select data from the dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /**Specifies the height of a single row in tree grid. Also, we need to set same height in the CSS style with class name e-rowcell. + * @Default {30} + */ + rowHeight?: number; + + /**Specifies the id of the template to be applied for all the rows. + */ + rowTemplateID?: string; + + /**Specifies the index of the selected row. + * @Default {-1} + */ + selectedRowIndex?: number; + + /**Specifies the type of selection whether to select single row or multiple rows. + * @Default {ej.TreeGrid.SelectionType.Single} + */ + selectionType?: ej.Gantt.SelectionType|string; + + /**Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose “Columns” item from this popup, a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. + * @Default {false} + */ + showColumnChooser?: boolean; + + /**Specifies whether to show tooltip when mouse is hovered on the cell. + * @Default {true} + */ + showGridCellTooltip?: boolean; + + /**Specifies whether to show tooltip for the cells, which has expander button. + * @Default {true} + */ + showGridExpandCellTooltip?: boolean; + + /**Options for setting width and height for TreeGrid. + */ + sizeSettings?: SizeSettings; + + /**Options for sorting the rows. + */ + sortSettings?: SortSettings; + + /**Options for displaying and customizing the toolbar items. + */ + toolbarSettings?: ToolbarSettings; + + /**Specifies the index of the column that needs to have the expander button. By default, cells in the first column contain the expander button. + * @Default {0} + */ + treeColumnIndex?: number; + + /**Triggered before every success event of TreeGrid action.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every TreeGrid action success event.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered while enter the edit mode in the TreeGrid cell*/ + beginEdit? (e: BeginEditEventArgs): void; + + /**Triggered after collapsed the TreeGrid record*/ + collapsed? (e: CollapsedEventArgs): void; + + /**Triggered while collapsing the TreeGrid record*/ + collapsing? (e: CollapsingEventArgs): void; + + /**Triggered while Context Menu is rendered in TreeGrid control*/ + contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + + /**Triggered after saved the modified cellValue in TreeGrid*/ + endEdit? (e: EndEditEventArgs): void; + + /**Triggered after expand the record*/ + expanded? (e: ExpandedEventArgs): void; + + /**Triggered while expanding the TreeGrid record*/ + expanding? (e: ExpandingEventArgs): void; + + /**Triggered while Treegrid is loaded*/ + load? (e: LoadEventArgs): void; + + /**Triggered while rendering each cell in the TreeGrid*/ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /**Triggered while rendering each row*/ + rowDataBound? (e: RowDataBoundEventArgs): void; + + /**Triggered while dragging a row in TreeGrid control*/ + rowDrag? (e: RowDragEventArgs): void; + + /**Triggered while start to drag row in TreeGrid control*/ + rowDragStart? (e: RowDragStartEventArgs): void; + + /**Triggered while drop a row in TreeGrid control*/ + rowDragStop? (e: RowDragStopEventArgs): void; + + /**Triggered after the row is selected.*/ + rowSelected? (e: RowSelectedEventArgs): void; + + /**Triggered before the row is going to be selected.*/ + rowSelecting? (e: RowSelectingEventArgs): void; + + /**Triggered when toolbar item is clicked in TreeGrid.*/ + toolbarClick? (e: ToolbarClickEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the direction of sorting ascending or descending. + */ + columnSortDirection?: string; + + /**Returns the value of expanding parent element. + */ + keyValue?: string; + + /**Returns the data or deleting element. + */ + data?: string; +} + +export interface ActionCompleteEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the grid model. + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the current grouped column field name. + */ + columnName?: string; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the direction of sorting ascending or descending + */ + columnSortDirection?: string; + + /**Returns the value of searched element. + */ + keyValue?: string; + + /**Returns the data of deleted element. + */ + data?: string; + + /**Returns selected record index + */ + recordIndex?: number; +} + +export interface BeginEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column Index of cell belongs. + */ + columnIndex?: number; +} + +export interface CollapsedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsed record. + */ + recordIndex?: number; + + /**Returns the data of collpsed record.. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; + + /**Returns the event type. + */ + type?: string; +} + +export interface CollapsingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of collapsing record. + */ + recordIndex?: number; + + /**Returns the data of collapsing record.. + */ + data?: any; + + /**Returns the event Type. + */ + type?: string; + + /**Returns state of a record whether it is in expanded or collapsing state. + */ + expanded?: boolean; +} + +export interface ContextMenuOpenEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the default context menu items to which we add custom items. + */ + contextMenuItems?: Array; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface EndEditEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of editing cell. + */ + rowElement?: any; + + /**Returns the Element of editing cell. + */ + cellElement?: any; + + /**Returns the data of edited cell record. + */ + data?: any; + + /**Returns the column name of edited cell belongs. + */ + columnName?: string; + + /**Returns the column object of edited cell belongs. + */ + columnObject?: any; +} + +export interface ExpandedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of expanded record. + */ + recordIndex?: number; + + /**Returns the data of expanded record.. + */ + data?: any; + + /**Returns Request Type. + */ + requestType?: string; + + /**Returns state of a record whether it is in expanded or expanded state. + */ + expanded?: boolean; + + /**Returns the event type. + */ + type?: string; +} + +export interface ExpandingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row index of expanding record. + */ + recordIndex?: number; + + /**Returns the data of expanding record.. + */ + data?: any; + + /**Returns the event Type. + */ + type?: string; + + /**Returns state of a record whether it is in expanded or collapsed state. + */ + expanded?: boolean; +} + +export interface LoadEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the TreeGrid model + */ + model?: any; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface QueryCellInfoEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting cell element. + */ + cellElement?: any; + + /**Returns the value of cell. + */ + cellValue?: string; + + /**Returns the data of current cell record. + */ + data?: any; + + /**Returns the column of cell belongs. + */ + column?: any; +} + +export interface RowDataBoundEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row element of rendering row. + */ + rowElement?: any; + + /**Returns the data of rendering row record. + */ + data?: any; +} + +export interface RowDragEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row which we start to drag. + */ + draggedRow?: any; + + /**Returns the row index which we start to drag. + */ + draggedRowIndex?: number; + + /**Returns the row on which we are dragging. + */ + targetRow?: any; + + /**Returns the row index on which we are dragging. + */ + targetRowIndex?: number; + + /**Returns that we can drop over that record or not. + */ + canDrop?: boolean; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowDragStartEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row which we start to drag. + */ + draggedRow?: any; + + /**Returns the row index which we start to drag. + */ + draggedRowIndex?: boolean; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowDragStopEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the row which we start to drag. + */ + draggedRow?: any; + + /**Returns the row index which we start to drag. + */ + draggedRowIndex?: number; + + /**Returns the row which we are dropped to row. + */ + targetRow?: any; + + /**Returns the row index which we are dropped to row. + */ + targetRowIndex?: number; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns request type. + */ + requestType?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface RowSelectedEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the selecting row element. + */ + targetRow?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: number; + + /**Returns the data of selected record. + */ + data?: any; + + /**Returns the event type. + */ + type?: string; +} + +export interface RowSelectingEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the data selecting record. + */ + data?: any; + + /**Returns the index of selecting row record. + */ + recordIndex?: string; + + /**Returns the selecting row element. + */ + targetRow?: any; + + /**Returns the previous selected data. + */ + previousData?: any; + + /**Returns the previous selected row index. + */ + previousIndex?: string; + + /**Returns the previous selected row element. + */ + previousTreeGridRow?: any; +} + +export interface ToolbarClickEventArgs { + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the current item. + */ + currentTarget?: any; + + /**Returns the TreeGrid model. + */ + model?: any; + + /**Returns the name of the toolbar item on which mouse click has been performed + */ + itemName?: string; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface Columns { + + /**Enables or disables the ability to filter the rows based on this column. + * @Default {false} + */ + allowFiltering?: boolean; + + /**Enables or disables the ability to sort the rows based on this column/field. + * @Default {false} + */ + allowSorting?: boolean; + + /**Specifies the edit type of the column. + * @Default {ej.TreeGrid.EditingType.String} + */ + editType?: ej.TreeGrid.EditingType|string; + + /**Specifies the name of the field from the dataSource to bind with this column. + */ + field?: string; + + /**Specifies the type of the editor control to be used to filter the rows. + * @Default {ej.TreeGrid.EditingType.String} + */ + filterEditType?: ej.TreeGrid.EditingType|string; + + /**Header text of the column. + * @Default {null} + */ + headerText?: string; + + /**Controls the visibility of the column. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the header template value for the column header + */ + headerTemplateID?: string; + + /**Specifies whether the column is frozen + * @Default {false} + */ + isFrozen?: boolean; + + /**Enables or disables the ability to freeze/unfreeze the columns + * @Default {false} + */ + allowFreezing?: boolean; +} + +export interface ContextMenuSettings { + + /**Option for adding items to context menu. + * @Default {[]} + */ + contextMenuItems?: Array; + + /**Shows/hides the context menu. + * @Default {false} + */ + showContextMenu?: boolean; +} + +export interface DragTooltip { + + /**Specifies whether to show tooltip while dragging a row. + * @Default {true} + */ + showTooltip?: boolean; + + /**Option to add field names whose corresponding values in the dragged row needs to be shown in the preview tooltip. + * @Default {[]} + */ + tooltipItems?: Array; + + /**Custom template for that tooltip that is shown while dragging a row. + * @Default {null} + */ + tooltipTemplate?: string; +} + +export interface EditSettings { + + /**Enables or disables the button to add new row in context menu as well as in toolbar. + * @Default {true} + */ + allowAdding?: boolean; + + /**Enables or disables the button to delete the selected row in context menu as well as in toolbar. + * @Default {true} + */ + allowDeleting?: boolean; + + /**Enables or disables the ability to edit a row or cell. + * @Default {false} + */ + allowEditing?: boolean; + + /**specifies the edit mode in TreeGrid , "cellEditing" is for cell type editing and "rowEditing" is for entire row. + * @Default {ej.TreeGrid.EditMode.CellEditing} + */ + editMode?: ej.TreeGrid.EditMode|string; + + /**Specifies the position where the new row has to be added. + * @Default {top} + */ + rowPosition?: ej.TreeGrid.RowPosition|string; +} + +export interface SizeSettings { + + /**Height of the TreeGrid. + * @Default {null} + */ + height?: string; + + /**Width of the TreeGrid. + * @Default {null} + */ + width?: string; +} + +export interface SortSettings { + + /**Option to add columns based on which the rows have to be sorted recursively. + * @Default {[]} + */ + sortedColumns?: Array; +} + +export interface ToolbarSettings { + + /**Shows/hides the toolbar. + * @Default {false} + */ + showToolBar?: boolean; + + /**Option to add items to the toolbar. + * @Default {[]} + */ + toolbarItems?: Array; +} + +enum EditingType{ + + ///It Specifies String edit type. + String, + + ///It Specifies Boolean edit type. + Boolean, + + ///It Specifies Numeric edit type. + Numeric, + + ///It Specifies Dropdown edit type. + Dropdown, + + ///It Specifies DatePicker edit type. + DatePicker, + + ///It Specifies DateTimePicker edit type. + DateTimePicker, + + ///It Specifies Maskedit edit type. + Maskedit +} + + +enum EditMode{ + + ///you can edit a cell. + CellEditing, + + ///you can edit a row. + RowEditing +} + + +enum RowPosition{ + + ///you can add a new row at top. + Top, + + ///you can add a new row at bottom. + Bottom, + + ///you can add a new row to above selected row. + Above, + + ///you can add a new row to below selected row. + Below, + + ///you can add a new row as a child for selected row. + Child +} + +} +module Gantt +{ +enum SelectionType +{ +//you can select a single row. +Single, +//you can select a multiple row. +Multiple, +} +} + +class NavigationDrawer extends ej.Widget { + static fn: NavigationDrawer; + constructor(element: JQuery, options?: NavigationDrawer.Model); + constructor(element: Element, options?: NavigationDrawer.Model); + model:NavigationDrawer.Model; + defaults:NavigationDrawer.Model; + + /** To close the navigation drawer control + * @returns {void} + */ + close(): void; + + /** To open the navigation drawer control + * @returns {void} + */ + open(): void; + + /** To Toggle the navigation drawer control + * @returns {void} + */ + toggle(): void; +} +export module NavigationDrawer{ + +export interface Model { + + /**Specifies the contentId for navigation drawer, where the ajax content need to updated + * @Default {null} + */ + contentid?: string; + + /**Sets the root class for NavigationDrawer theme. This cssClass API helps to use custom skinning option for NavigationDrawer control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssclass?: string; + + /**Sets the Direction for the control. See Direction + * @Default {left} + */ + direction?: ej.Direction|string; + + /**Sets the listview to be enabled or not + * @Default {false} + */ + enablelistview?: boolean; + + /**Specifies the listview items as an array of object. + * @Default {[]} + */ + items?: Array; + + /**Sets all the properties of listview to render in navigation drawer + */ + listviewsettings?: any; + + /**Specifies position whether it is in fixed or relative to the page. See Position + * @Default {normal} + */ + position?: string; + + /**Specifies the targetId for navigation drawer + */ + targetid?: string; + + /**Sets the rendering type of the control. See Type + * @Default {overlay} + */ + type?: string; + + /**Specifies the width of the control + * @Default {auto} + */ + width?: number; + + /**Event triggers before the control gets closed.*/ + beforeclose? (e: BeforecloseEventArgs): void; + + /**Event triggers when the control open.*/ + open? (e: OpenEventArgs): void; + + /**Event triggers when the Swipe happens.*/ + swipe? (e: SwipeEventArgs): void; +} + +export interface BeforecloseEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface OpenEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface SwipeEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Navigation Drawer model + */ + model?: ej.NavigationDrawer.Model; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} +} + +class RadialMenu extends ej.Widget { + static fn: RadialMenu; + constructor(element: JQuery, options?: RadialMenu.Model); + constructor(element: Element, options?: RadialMenu.Model); + model:RadialMenu.Model; + defaults:RadialMenu.Model; + + /** To hide the redialmenu + * @returns {void} + */ + hide(): void; + + /** To hide the redialmenu items + * @returns {void} + */ + menuHide(): void; + + /** To Show the redialmenu + * @returns {void} + */ + show(): void; +} +export module RadialMenu{ + +export interface Model { + + /**To show the Radial in intial render. + */ + autoOpen?: boolean; + + /**Renders the back button Image for Radial using class. + */ + backImageClass?: string; + + /**Sets the root class for RadialMenu theme. This cssClass API helps to use custom skinning option for RadialMenu control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssClass?: string; + + /**To enable Animation for Radial Menu. + */ + enableAnimation?: boolean; + + /**Renders the Image for Radial using Class. + */ + imageClass?: string; + + /**Specifies the radius of radial menu + */ + radius?: number; + + /**To show the Radial while clicking given target element. + */ + targetElementId?: string; + + /**Event triggers when the mouse down happens.*/ + mouseDown? (e: MouseDownEventArgs): void; + + /**Event triggers when the mouse up happens.*/ + mouseUp? (e: MouseUpEventArgs): void; + + /**Event triggers when we select an item.*/ + select? (e: SelectEventArgs): void; +} + +export interface MouseDownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Radialmenu model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface MouseUpEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Radialmenu model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} + +export interface SelectEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the Radialmenu model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**returns the item of element + */ + item?: any; + + /**returns the name of item + */ + itemName?: string; +} +} + +class Tile extends ej.Widget { + static fn: Tile; + constructor(element: JQuery, options?: Tile.Model); + constructor(element: Element, options?: Tile.Model); + model:Tile.Model; + defaults:Tile.Model; + + /** Update the image template of tile item to another one. + * @param {string} UpdateTemplate by using id + * @returns {void} + */ + updateTemplate(name: string): void; +} +export module Tile{ + +export interface Model { + + /**Section for badge specific functionalities and it represents the notification for tile items. + */ + badge?: Badge; + + /**Specifies the tile caption in outside of template content. + * @Default {null} + */ + captionTemplateId?: string; + + /**Sets the root class for Tile theme. This cssClass API helps to use custom skinning option for Tile control. By defining the root class using this API, we need to include this root class in CSS. + */ + cssClass?: string; + + /**Saves current model value to browser cookies for state maintains. While refreshing the page retains the model value applies from browser cookies. + * @Default {false} + */ + enablePersistence?: boolean; + + /**Customize the tile size height. + * @Default {null} + */ + height?: number; + + /**Specifies Tile imageClass, using this property we can give images for each tile through css classes. + * @Default {null} + */ + imageClass?: string; + + /**Specifies the position of tile image. See imagePosition + * @Default {center} + */ + imagePosition?: ej.Tile.ImagePosition|string; + + /**Specifies the tile image in outside of template content. + * @Default {null} + */ + imageTemplateId?: string; + + /**Specifies the url of tile image. + * @Default {null} + */ + imageUrl?: string; + + /**Section for livetile specific functionalities. + */ + livetile?: Livetile; + + /**Specifies whether the tile text to be shown or hidden. + * @Default {true} + */ + showText?: boolean; + + /**Changes the text of a tile. + * @Default {Text} + */ + text?: string; + + /**Aligns the text of a tile. See textAlignment + * @Default {normal} + */ + textAlignment?: ej.Tile.TextAlignment|string; + + /**Specifies the size of a tile. See tileSize + * @Default {small} + */ + tileSize?: ej.Tile.TileSize|string; + + /**Customize the tile size width. + * @Default {null} + */ + width?: number; + + /**Sets the rounded corner to tile. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /**Sets allowSelection to tile. + * @Default {false} + */ + allowSelection?: boolean; + + /**Sets the background color to tile. + * @Default {false} + */ + backgroundColor?: string; + + /**Event triggers when the mouse down happens in the tile*/ + mouseDown? (e: MouseDownEventArgs): void; + + /**Event triggers when the mouse up happens in the tile*/ + mouseUp? (e: MouseUpEventArgs): void; +} + +export interface MouseDownEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tile model + */ + model?: boolean; + + /**returns the name of the event + */ + type?: boolean; + + /**returns the current tile text + */ + text?: string; + + /**returns the index of current tile item + */ + index?: number; +} + +export interface MouseUpEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the tile model + */ + model?: boolean; + + /**returns the name of the event + */ + type?: boolean; + + /**returns the current tile text + */ + text?: boolean; + + /**returns the index of current tile item + */ + index?: number; +} + +export interface Badge { + + /**Specifies whether to enable badge or not. + * @Default {false} + */ + enabled?: boolean; + + /**Specifies maximum value for tile badge. + * @Default {100} + */ + maxValue?: number; + + /**Specifies minimum value for tile badge. + * @Default {1} + */ + minValue?: number; + + /**Specifies text instead of number for tile badge. + * @Default {null} + */ + text?: string; + + /**Sets value for tile badge. + * @Default {1} + */ + value?: number; + + /**Sets position for tile badge. + * @Default {“bottomright”} + */ + position?: ej.Tile.BadgePosition|string; +} + +export interface Livetile { + + /**Specifies whether to enable livetile or not. + * @Default {false} + */ + enabled?: boolean; + + /**Specifies liveTile images in css classes. + * @Default {null} + */ + imageClass?: string; + + /**Specifies liveTile images in templates. + * @Default {null} + */ + imageTemplateId?: string; + + /**Specifies liveTile images in css classes. + * @Default {null} + */ + imageUrl?: string; + + /**Specifies liveTile type for Tile. See orientation + * @Default {flip} + */ + type?: ej.Tile.LiveTileType|string; + + /**Specifies time interval between two successive livetile animation + * @Default {2000} + */ + updateInterval?: number; + + /**Sets the text to each living tile + * @Default {Null} + */ + text?: Array; +} + +enum BadgePosition{ + + ///To set the topright position of tile badge + Topright, + + ///To set the bottomright of tile image + Bottomright +} + + +enum ImagePosition{ + + ///To set the center position of tile image + Center, + + ///To set the top position of tile image + Top, + + ///To set the bottom position of tile image + Bottom, + + ///To set the right position of tile image + Right, + + ///To set the left position of tile image + Left, + + ///To set the topleft position of tile image + TopLeft, + + ///To set the topright position of tile image + TopRight, + + ///To set the bottomright position of tile image + BottomRight, + + ///To set the bottomleft position of tile image + BottomLeft, + + ///To set the fill position of tile image + Fill +} + + +enum LiveTileType{ + + ///To set flip type of liveTile for tile control + Flip, + + ///To set slide type of liveTile for tile control + Slide, + + ///To set carousel type of liveTile for tile control + Carousel +} + + +enum TextAlignment{ + + ///To set the normal alignment of text for tile control + Normal, + + ///To set the left alignment of text for tile control + Left, + + ///To set the right alignment of text for tile control + Right, + + ///To set the center alignment of text for tile control + Center +} + + +enum TextPosition{ + + ///To set the innertop position of the tile text + Innertop, + + ///To set the innerbottom position of the tile text + Innerbottom, + + ///To set the outer position of the tile text + Outer +} + + +enum TileSize{ + + ///To set the medium size for tile control + Medium, + + ///To set the small size for tile control + Small, + + ///To set the large size for tile control + Large, + + ///To set the wide size for tile control + Wide +} + +} + +class RadialSlider extends ej.Widget { + static fn: RadialSlider; + element: JQuery; + constructor(element: JQuery, options?: RadialSliderOptions); + constructor(element: Element, options?: RadialSliderOptions); + model:RadialSliderOptions; + defaults:RadialSliderOptions; + show(): void; + hide(): void; +} + +interface RadialSliderOptions { + radius?: number; + endAngle?: number; + startAngle?: number; + ticks?: Int32Array; + enableRoundOff?: boolean; + value?: number; + strokeWidth?: number; + autoOpen?: boolean; + enableAnimation?: boolean; + cssClass?: string; + innerCircleImageClass?: string; + innerCircleImageUrl?: string; + showInnerCircle?: boolean; + inline?: boolean; + stop? (e: RadialSliderStopEventArgs): void; + start? (e: RadialSliderStartEventArgs): void; + slide? (e: RadialSliderSlideEventArgs): void; + change? (e: RadialSliderChangeEventArgs): void; + mouseover? (e: RadialSliderMouseOverEventArgs): void; + create? (e: RadialSliderCreateEventArgs): void; + destory? (e: RadialSliderDestroyEventArgs): void; +} +interface RadialSliderCreateEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; +} +interface RadialSliderDestroyEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; +} +interface RadialSliderStopEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; +} + +interface RadialSliderStartEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; +} +interface RadialSliderSlideEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; + selectedValue: number; +} +interface RadialSliderChangeEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; + oldValue: number; +} +interface RadialSliderMouseOverEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; + value: number; + selectedValue: number; +} +class Spreadsheet extends ej.Widget { + static fn: Spreadsheet; + constructor(element: JQuery, options?: Spreadsheet.Model); + constructor(element: Element, options?: Spreadsheet.Model); + model:Spreadsheet.Model; + defaults:Spreadsheet.Model; + + /** This method is used to add a new sheet in the last position of the sheet container. + * @returns {void} + */ + addNewSheet(): void; + + /** It is used to clear all the data and format in the specified range of cells in Spreadsheet. + * @param {string} Optional. If range is specified, then it will clear all content in the specified range else it will use the current selected range. + * @returns {void} + */ + clearAll(range: string): void; + + /** This property is used to clear all the formats applied in the specified range in Spreadsheet. + * @param {string} Optional. If range is specified, then it will clear all format in the specified range else it will use the current selected range. + * @returns {void} + */ + clearAllFormat(range: string): void; + + /** Used to clear the applied border in the specified range in Spreadsheet. + * @param {string} Optional. If range is specified, then it will clear border in the specified range else it will use the current selected range. + * @returns {void} + */ + clearBorder(range: string): void; + + /** This property is used to clear the contents in the specified range in Spreadsheet. + * @param {string} Optional. If the range is specified, then it will clear the content in the specified range else it will use the current selected range. + * @returns {void} + */ + clearContents(range: string): void; + + /** This method is used to remove only the data in the range denoted by the specified range name. + * @param {string} Pass the defined rangeSettings property name. + * @returns {void} + */ + clearRange(rangeName: string): void; + + /** It is used to remove data in the specified range of cells based on the defined property. + * @param {Array|string} Optional. If range is specified, it will clear data for the specified range else it will use the current selected range. + * @param {string} Optional. If property is specified, it will remove the specified property in the range else it will remove default properties + * @param {boolean} Optional. If pass true, if you want to skip the hidden rows + * @returns {void} + */ + clearRangeData(range: Array|string, property: string, skipHiddenRow: boolean): void; + + /** This method is used to copy sheets in Spreadsheet. + * @param {number} Pass the sheet index that you want to copy. + * @param {number} Pass the position index where you want to copy. + * @returns {void} + */ + copySheet(fromIdx: number, toIdx: number): void; + + /** This method is used to delete the entire column which is selected. + * @param {number} Pass the start column index. + * @param {number} Pass the end column index. + * @returns {void} + */ + deleteEntireColumn(startCol: number, endCol: number): void; + + /** This method is used to delete the entire row which is selected. + * @param {number} Pass the start row index. + * @param {number} Pass the end row index. + * @returns {void} + */ + deleteEntireRow(startRow: number, endRow: number): void; + + /** This method is used to delete a particular sheet in the Spreadsheet. + * @param {number} Pass the sheet index to perform delete action. + * @returns {void} + */ + deleteSheet(idx: number): void; + + /** This method is used to delete the selected cells and shift the remaining cells to left. + * @param {any} Row index and column index of the starting cell. + * @param {any} Row index and column index of the ending cell. + * @returns {void} + */ + deleteShiftLeft(startCell: any, endCell: any): void; + + /** This method is used to delete the selected cells and shift the remaining cells up. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + deleteShiftUp(startCell: any, endCell: any): void; + + /** This method is used to edit data in the specified range of cells based on its corresponding rangeSettings. + * @param {string} Pass the defined rangeSettings property name. + * @param {Function} Pass the function that you want to perform range edit. + * @returns {void} + */ + editRange(rangeName: string, fn: Function): void; + + /** This method is used to get the activation panel in the Spreadsheet. + * @returns {HTMLElement} + */ + getActivationPanel(): HTMLElement; + + /** This method is used to get the active cell object in Spreadsheet. It will returns object which contains rowIndex and colIndex of the active cell. + * @param {number} Optional. If sheetIdx is specified, it will return the active cell object in specified sheet index else it will use the current sheet index + * @returns {any} + */ + getActiveCell(sheetIdx: number): any; + + /** This method is used to get the active cell element based on the given sheet index in the Spreadsheet. + * @param {number} Optional. If sheetIndex is specified, it will return the active cell element in specified sheet index else it will use the current active sheet index. + * @returns {HTMLElement} + */ + getActiveCellElem(sheetIdx: number): HTMLElement; + + /** This method is used to get the current active sheet index in Spreadsheet. + * @returns {number} + */ + getActiveSheetIndex(): number; + + /** This method is used to get the auto fill element in Spreadsheet. + * @returns {HTMLElement} + */ + getAutoFillElem(): HTMLElement; + + /** This method is used to get the cell element based on specified row and column index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @param {number} Optional. Pass the sheet index that you want to get cell. + * @returns {HTMLElement} + */ + getCell(rowIdx: number, colIdx: number, sheetIdx: number): HTMLElement; + + /** This method is used to get the frozen columns index in the Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getFrozenColumns(sheetIdx: number): number; + + /** This method is used to get the frozen row’s index in Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getFrozenRows(sheetIdx: number): number; + + /** This method is used to get the hyperlink data as object from the specified cell in Spreadsheet. + * @param {HTMLElement} Pass the DOM element to get hyperlink + * @returns {any} + */ + getHyperlink(cell: HTMLElement): any; + + /** This method is used to get all cell elements in the specified range. + * @param {number} Pass the row index of the start cell. + * @param {number} Pass the column index of the start cell. + * @param {number} Pass the row index of the end cell. + * @param {number} Pass the column index of the end cell. + * @param {number} Pass the index of the sheet. + * @returns {HTMLElement} + */ + getRange(startRIndex: number, startCIndex: number, endRIndex: number, endCIndex: number, sheetIdx: number): HTMLElement; + + /** This method is used to get the data in specified range in Spreadsheet. + * @param {Array|string} Optional. If range is specified, it will get range data for the specified range else it will use the current selected range. + * @param {boolean} Pass 'true' if you want cell values alone. + * @param {Array|string} Optional. If property is specified, it will get the specified property in the range else it will get default properties. + * @param {number} Optional. Pass the index of the sheet. + * @param {boolean} Optional. When skipDateTime is set as true, it return 'value2' cell value (cell type as 'datetime') + * @param {boolean} Optional. Pass true, if you want to get the calculated formula value else it return formula string. + * @param {boolean} Optional. Pass true, if you want to skip the hidden rows data. + * @param {number} Optional. Pass virtual row index of sheet. + * @param {number} Optional. Pass virtual row count of sheet. + * @returns {Array} + */ + getRangeData(range: Array|string, valueOnly: boolean, property: Array|string, sheetIdx: number, skipDateTime: boolean, skipFormula: boolean, skipHiddenRow: boolean, virtualRowIdx: number, virtualRowCount: number): Array; + + /** This method is used to get the range indices array based on the specified alpha range in Spreadsheet. + * @param {string} Pass the alpha range that you want to get range indices. + * @returns {Array} + */ + getRangeIndices(range: string): Array; + + /** This method is used to get the sheet details based on the given sheet index in Spreadsheet. + * @param {number} Pass the sheet index to get the sheet object. + * @returns {any} + */ + getSheet(sheetIdx: number): any; + + /** This method is used to get the sheet content div element of Spreadsheet. + * @param {number} Pass the sheet index to get the sheet content. + * @returns {HTMLElement} + */ + getSheetElement(sheetIdx: number): HTMLElement; + + /** This method is used to send a paging request to the specified sheet Index in the Spreadsheet. + * @param {number} Pass the sheet index to perform paging at specified sheet index + * @param {boolean} Pass 'true' to create a new sheet. If the specified sheet index is already exist, it navigate to that sheet else it create a new sheet. + * @returns {void} + */ + gotoPage(sheetIdx: number, newSheet: boolean): void; + + /** This method is used to hide the entire columns from the specified range (startCol, endCol) in Spreadsheet. + * @param {number} Index of the start column. + * @param {number} Index of the end column. + * @returns {void} + */ + hideColumn(startCol: number, endCol: number): void; + + /** This method is used to hide the formula bar in Spreadsheet. + * @returns {void} + */ + hideFormulaBar(): void; + + /** This method is used to hide the rows, based on the specified row index in Spreadsheet. + * @param {number} Index of the start row. + * @param {number} Index of the end row. + * @returns {void} + */ + hideRow(startRow: number, endRow: number): void; + + /** This method is used to hide the sheet based on the specified sheetIndex or sheet name in the Spreadsheet. + * @param {string|number} Pass the sheet name or index that you want to hide. + * @returns {void} + */ + hideSheet(sheetIdx: string|number): void; + + /** This method is used to hide the displayed waiting pop-up in Spreadsheet. + * @returns {void} + */ + hideWaitingPopUp(): void; + + /** This method is used to insert a column before the active cell's column in the Spreadsheet. + * @param {number} Pass start column. + * @param {number} Pass end column. + * @returns {void} + */ + insertEntireColumn(startCol: number, endCol: number): void; + + /** This method is used to insert a row before the active cell's row in the Spreadsheet. + * @param {number} Pass start row. + * @param {number} Pass end row. + * @returns {void} + */ + insertEntireRow(startRow: number, endRow: number): void; + + /** This method is used to insert a new sheet to the left of the current active sheet. + * @returns {void} + */ + insertSheet(): void; + + /** This method is used to insert cells in the selected or specified range and shift remaining cells to bottom. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + insertShiftBottom(startCell: any, endCell: any): void; + + /** This method is used to insert cells in the selected or specified range and shift remaining cells to right. + * @param {any} Row index and column index of the start cell. + * @param {any} Row index and column index of the end cell. + * @returns {void} + */ + insertShiftRight(startCell: any, endCell: any): void; + + /** This method is used to import excel file manually by using form data. + * @param {any} Pass the form data object to import files manually. + * @returns {void} + */ + import(importRequest: any): void; + + /** This method is used to lock/unlock the range of cells in active sheet. Lock cells are activated only after the sheet is protected. Once the sheet is protected it is unable to lock/unlock cells. + * @param {string|Array} Pass the alpha range cells or array range of cells. + * @param {string} Optional. By default is true. If it is false locked cells are unlocked. + * @returns {void} + */ + lockCells(range: string|Array, isLocked: string): void; + + /** This method is used to merge cells by across in the Spreadsheet. + * @param {string} Optional. To pass the cell range or selected cells are process. + * @param {boolean} Optional. If pass true it does not show alert. + * @returns {void} + */ + mergeAcrossCells(range: string, alertStatus: boolean): void; + + /** This method is used to merge the selected cells in the Spreadsheet. + * @param {string} Optional. To pass the cell range or selected cells are process. + * @param {boolean} Optional. If pass true it does not show alert. + * @returns {void} + */ + mergeCells(range: string, alertStatus: boolean): void; + + /** This method is used to move sheets in Spreadsheet. + * @param {number} Pass the sheet index that you want to move. + * @param {number} Pass the position index where you want to move. + * @returns {void} + */ + moveSheet(fromIdx: number, toIdx: number): void; + + /** This method is used to protect or unprotect active sheet. + * @param {boolean} Optional. By default is true. If it is false active sheet is unprotected. + * @returns {void} + */ + protectSheet(isProtected: boolean): void; + + /** This method is used to remove the hyperlink from selected cells of current sheet. + * @param {string} Hyperlink remove from the specified range. + * @param {boolean} Optional. If it is true, It will clear link only not format. + * @returns {void} + */ + removeHyperlink(range: string, isClearHLink: boolean): void; + + /** This method is used to remove the range data and its defined rangeSettings property based on the specified range name. + * @param {string} Pass the defined rangeSetting property name. + * @returns {void} + */ + removeRange(rangeName: string): void; + + /** This method is used to set the active cell in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @param {number} Pass the index of the sheet. + * @returns {void} + */ + setActiveCell(rowIdx: number, colIdx: number, sheetIdx: number): void; + + /** This method is used to set active sheet index for the Spreadsheet. + * @param {number} Pass the active sheet index for Spreadsheet. + * @returns {void} + */ + setActiveSheetIndex(sheetIdx: number): void; + + /** This method is used to set border for the specified range of cells in the Spreadsheet. + * @param {any} Pass the border properties that you want to set. + * @param {string} Optional. If range is specified, it will set border for the specified range else it will use the selected range. + * @returns {void} + */ + setBorder(property: any, range: string): void; + + /** This method is used to set the hyperlink in selected cells of the current sheet. + * @param {string} If range is specified, it will set the hyperlink in range of the cells. + * @param {any} Pass cellAddress or webAddress + * @param {number} If we pass cellAddress then which sheet to be navigate in the applied link. + * @returns {void} + */ + setHyperlink(range: string, link: any, sheetIdx: number): void; + + /** This method is used to set the focus to the Spreadsheet. + * @returns {void} + */ + setSheetFocus(): void; + + /** This method is used to set the width for the columns in the Spreadsheet. + * @param {Array|any} Pass the cell index and width of the cells. + * @returns {void} + */ + setWidthToColumns(widthColl: Array|any): void; + + /** This method is used to rename the active sheet. + * @param {string} Pass the sheet name that you want to change the current active sheet name. + * @returns {void} + */ + sheetRename(sheetName: string): void; + + /** This method is used to display the activationPanel for the specified range name. + * @param {string} Pass the range name that you want to display the activation panel. + * @returns {void} + */ + showActivationPanel(rangeName: string): void; + + /** This method is used to show the hidden columns within the specified range in the Spreadsheet. + * @param {number} Index of the start column. + * @param {number} Index of the end column. + * @returns {void} + */ + showColumn(startColIdx: number, endColIdx: number): void; + + /** This method is used to show the formula bar in Spreadsheet. + * @returns {void} + */ + showFormulaBar(): void; + + /** This method is used to show the hidden rows in the specified range in the Spreadsheet. + * @param {number} Index of the start row. + * @param {number} Index of the end row. + * @returns {void} + */ + showRow(startRow: number, endRow: number): void; + + /** This method is used to show waiting pop-up in Spreadsheet. + * @returns {void} + */ + showWaitingPopUp(): void; + + /** This method is used to unfreeze the frozen rows and columns in the Spreadsheet. + * @returns {void} + */ + unfreezePanes(): void; + + /** This method is used to unhide the sheet based on specified sheet name or sheet index. + * @param {string|number} Pass the sheet name or index that you want to unhide. + * @returns {void} + */ + unhideSheet(sheetInfo: string|number): void; + + /** This method is used to unmerge the selected range of cells in the Spreadsheet. + * @param {string} Optional. If the range is specified, then it will un merge the specified range else it will use the current selected range. + * @returns {void} + */ + unmergeCells(range: string): void; + + /** This method is used to unwrap the selected range of cells in the Spreadsheet. + * @param {Array|string} Optional. If the range is specified, then it will update unwrap in the specified range else it will use the current selected range. + * @returns {void} + */ + unWrapText(range: Array|string): void; + + /** This method is used to update the data for the specified range of cells in the Spreadsheet. + * @param {any} Pass the cells data that you want to update. + * @param {Array} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. + * @returns {void} + */ + updateData(data: any, range: Array): void; + + /** This method is used to update the formula bar in the Spreadsheet. + * @returns {void} + */ + updateFormulaBar(): void; + + /** This method is used to update the range of cells based on the specified settings which we want to update in the Spreadsheet. + * @param {number} Pass the sheet index that you want to update. + * @param {any} Pass the dataSource, startCell and showHeader values as settings. + * @returns {void} + */ + updateRange(sheetIdx: number, settings: any): void; + + /** This method is used to update the unique data for the specified range of cells in Spreadsheet. + * @param {any} Pass the data that you want to update in the particular range + * @param {Array|string} Optional. If range is specified, it will update data for the specified range else it will use the current selected range. + * @returns {void} + */ + updateUniqueData(data: any, range: Array|string): void; + + /** This method is used to wrap the selected range of cells in the Spreadsheet. + * @param {Array|string} Optional. If the range is specified, then it will update wrap in the specified range else it will use the current selected range. + * @returns {void} + */ + wrapText(range: Array|string): void; + + XLCellType: Spreadsheet.XLCellType; + + XLCFormat: Spreadsheet.XLCFormat; + + XLChart: Spreadsheet.XLChart; + + XLClipboard: Spreadsheet.XLClipboard; + + XLComment: Spreadsheet.XLComment; + + XLDragDrop: Spreadsheet.XLDragDrop; + + XLDragFill: Spreadsheet.XLDragFill; + + XLEdit: Spreadsheet.XLEdit; + + XLExport: Spreadsheet.XLExport; + + XLFilter: Spreadsheet.XLFilter; + + XLFormat: Spreadsheet.XLFormat; + + XLFreeze: Spreadsheet.XLFreeze; + + XLPrint: Spreadsheet.XLPrint; + + XLResize: Spreadsheet.XLResize; + + XLRibbon: Spreadsheet.XLRibbon; + + XLSearch: Spreadsheet.XLSearch; + + XLSelection: Spreadsheet.XLSelection; + + XLSort: Spreadsheet.XLSort; + + XLValidate: Spreadsheet.XLValidate; +} +export module Spreadsheet{ + +export interface XLCellType { + + /** This method is used to set a cell type from the specified range of cells in the spreadsheet. + * @param {string} Pass the range where you want apply cell type. + * @param {any} Pass type of cell type and its settings. + * @param {number} Optional. Pass sheet index. + * @returns {void} + */ + addCellTypes(range: string,settings: any,sheetIdx: number): void; + + /** This method is used to remove cell type from the specified range of cells in the Spreadsheet. + * @param {string} Pass the range where you want remove cell type. + * @param {number} Optional. Pass sheet index. + * @returns {void} + */ + removeCellTypes(range: string,sheetIdx: number): void; +} + +export interface XLCFormat { + + /** This method is used to clear the applied conditional formatting rules in the Spreadsheet. + * @param {boolean} Pass true if you want to clear rules from selected cells else it will clear rules from entire sheet. + * @param {Array|string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + clearCF(isSelected: boolean,range: Array|string): void; + + /** This method is used to get the applied conditional formatting rules as array of objects based on the specified row Index and column Index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the column index. + * @returns {Array} + */ + getCFRule(rowIdx: number,colIdx: number): Array; + + /** This method is used to set the conditional formatting rule in the Spreadsheet. + * @param {any} Pass the rule to set. + * @returns {void} + */ + setCFRule(rule: any): void; +} + +export interface XLChart { + + /** This method is used to create a chart for specified range in Spreadsheet. + * @param {string} Optional. If range is specified, it will create chart for the specified range else it will use the current selected range. + * @param {any} To pass the type of chart and chart name. + * @returns {void} + */ + createChart(range: string,options: any): void; + + /** This method is used to refresh the chart in the Spreadsheet. + * @param {string} To pass the chart Id. + * @param {any} To pass the type of chart and chart name. + * @returns {void} + */ + refreshChart(id: string,options: any): void; + + /** This method is used to resize the chart of specified id in the Spreadsheet. + * @param {string} To pass the chart id. + * @param {number} To pass height value. + * @param {number} To pass the width value. + * @returns {void} + */ + resizeChart(id: string,height: number,width: number): void; +} + +export interface XLClipboard { + + /** This method is used to copy the selected cells in the Spreadsheet. + * @returns {void} + */ + copy(): void; + + /** This method is used to cut the selected cells in the Spreadsheet. + * @returns {void} + */ + cut(): void; + + /** This method is used to paste the cut or copied cells data in the Spreadsheet. + * @returns {void} + */ + paste(): void; +} + +export interface XLComment { + + /** This method is used to delete the comment in the specified range in Spreadsheet. + * @param {Array|string} Optional. If range is specified, it will delete comments for the specified range else it will use the current selected range. + * @param {number} Optional. If sheetIdx is specified, it will delete comment in specified sheet else it will use active sheet. + * @param {boolean} Optional. Pass true, if you want to skip the hidden rows data. + * @returns {void} + */ + deleteComment(range: Array|string,sheetIdx: number,skipHiddenRow: boolean): void; + + /** This method is used to edit the comment in the target Cell in Spreadsheet. + * @param {any} Optional. Pass the row index and column index of the cell which contains comment. + * @returns {void} + */ + editComment(targetCell: any): void; + + /** This method is used to find the next comment from the active cell in Spreadsheet. + * @returns {boolean} + */ + findNextComment(): boolean; + + /** This method is used to find the previous comment from the active cell in Spreadsheet. + * @returns {boolean} + */ + findPrevComment(): boolean; + + /** This method is used to get comment data for the specified cell. + * @param {HTMLElement} Pass the DOM element to get comment data as object. + * @returns {any} + */ + getComment(cell: HTMLElement): any; + + /** This method is used to set new comment in Spreadsheet. + * @param {string|Array} Optional. If we pass the range comment will set in the range otherwise it will set with selected cells. + * @param {string} Pass the comment data. + * @param {boolean} Optional. Pass true to show comment in edit mode + * @returns {void} + */ + setComment(range: string|Array,data: string,showEditPanel: boolean): void; + + /** This method is used to show all the comments in the Spreadsheet. + * @returns {void} + */ + showAllComments(): void; + + /** This method is used to show or hide the specific comment in the Spreadsheet. + * @param {HTMLElement} Optional. Pass the cell DOM element to show or hide its comment. If pass empty argument active cell will processed. + * @returns {void} + */ + showHideComment(targetCell: HTMLElement): void; +} + +export interface XLDragDrop { + + /** This method is used to drag and drop the selected range of cells to destination range in the Spreadsheet. + * @param {any|Array} Pass the source range to perform drag and drop. + * @param {any|Array} Pass the destination range to drop the dragged cells. + * @returns {void} + */ + moveRangeTo(sourceRange: any|Array,destinationRange: any|Array): void; +} + +export interface XLDragFill { + + /** This method is used to perform auto fill in Spreadsheet. + * @param {any} Pass the options to perform auto fill in Spreadsheet. + * @returns {void} + */ + autoFill(options: any): void; + + /** This method is used to hide the auto fill element in the Spreadsheet. + * @returns {void} + */ + hideAutoFillElement(): void; + + /** This method is used to hide the auto fill options in the Spreadsheet. + * @returns {void} + */ + hideAutoFillOptions(): void; + + /** This method is used to set position of the auto fill element in the Spreadsheet. + * @param {boolean} Pass the drag fill status as boolean value for show auto fill options in Spreadsheet. + * @returns {void} + */ + positionAutoFillElement(isDragFill: boolean): void; +} + +export interface XLEdit { + + /** This method is used to calculate formulas in the specified sheet. + * @param {number} Optional. If sheet index is specified, then it will calculate formulas in the specified sheet only else it will calculate formulas in all sheets. + * @returns {void} + */ + calcNow(sheetIdx: number): void; + + /** This method is used to edit a particular cell based on the row index and column index in the Spreadsheet. + * @param {number} Pass the row index to edit particular cell. + * @param {number} Pass the column index to edit particular cell. + * @param {boolean} Pass true, if you want to maintain previous cell value. + * @returns {void} + */ + editCell(rowIdx: number,colIdx: number,oldData: boolean): void; + + /** This method is used to get the property value of particular cell, based on the row and column index in the Spreadsheet. + * @param {number} Pass the row index to get the property value. + * @param {number} Pass the column index to get the property value. + * @param {string} Optional. Pass the property name that you want("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", "cellType"). + * @param {number} Optional. Pass the index of the sheet. + * @returns {any|string|Array} + */ + getPropertyValue(rowIdx: number,colIdx: number,prop: string,sheetIdx: number): any|string|Array; + + /** This method is used to get the property value in specified cell in Spreadsheet. + * @param {HTMLElement} Pass the cell element to get property value. + * @param {string} Pass the property name that you want ("value", "value2", "type", "cFormatRule", "range", "thousandSeparator", "rule", "format", "border", "picture", "chart", "calcValue", "align", "hyperlink", "formats", "borders", "tformats", "tborders", "isFilterHeader", "filterState", "tableName", "comment", "formatStr", "decimalPlaces", "cellType"). + * @param {number} Pass the index of sheet. + * @returns {void} + */ + getPropertyValueByElem(elem: HTMLElement,property: string,sheetIdx: number): void; + + /** This method is used to save the edited cell value in the Spreadsheet. + * @returns {void} + */ + saveCell(): void; + + /** This method is used to update a particular cell value in the Spreadsheet. + * @param {any} Pass row index and column index of the cell. + * @param {string|number} Pass the cell value. + * @returns {void} + */ + updateCell(cell: any,value: string|number): void; + + /** This method is used to update a particular cell value and its format in the Spreadsheet. + * @param {any} Pass row index and column index of the cell. + * @param {string|number} Pass the cell value. + * @param {string} Pass the class name to update format. + * @param {number} Pass sheet index. + * @returns {void} + */ + updateCellValue(cellIdx: any,val: string|number,formatClass: string,sheetIdx: number): void; +} + +export interface XLExport { + + /** This method is used to save the sheet data as Excel or CSV document (.xls, .xlsx and .csv) in Spreadsheet. + * @param {string} Pass the export type that you want. + * @returns {void} + */ + export(type: string): void; +} + +export interface XLFilter { + + /** This method is used to clear the filter in filtered columns in the Spreadsheet. + * @returns {void} + */ + clearFilter(): void; + + /** This method is used to apply filter for the selected range of cells in the Spreadsheet. + * @param {string} Pass the range of the selected cells. + * @returns {void} + */ + filter(range: string): void; + + /** This method is used to apply filter for the column by active cell's value in the Spreadsheet. + * @returns {void} + */ + filterByActiveCell(): void; +} + +export interface XLFormat { + + /** This method is used to create a table for the selected range of cells in the Spreadsheet. + * @param {any} Pass the table object. + * @param {string} Optional. If the range is specified, then it will create table in the specified range else it will use the current selected range. + * @returns {void} + */ + createTable(tableObject: any,range: string): void; + + /** This method is used to set format style and values in a cell or range of cells. + * @param {any} Pass the formatObject which contains style, type, format, groupSeparator and decimalPlaces. + * @param {string} Pass the range indices to format cells. + * @returns {void} + */ + format(formatObj: any,range: string): void; + + /** This method is used to remove table with specified tableId in the Spreadsheet. + * @param {number} Pass the tableId that you want to remove. + * @returns {void} + */ + removeTable(tableId: number): void; + + /** This method is used to update the decimal places for numeric value for the selected range of cells in the Spreadsheet. + * @param {string} Pass the decimal places type in increment/decrement. + * @param {string} Pass the range indices. + * @returns {void} + */ + updateDecimalPlaces(type: string,range: string): void; + + /** This method is used to update the format for the selected range of cells in the Spreadsheet. + * @param {any} Pass the format object that you want to update. + * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. + * @returns {void} + */ + updateFormat(formatObj: any,range: Array): void; + + /** This method is used to update the unique format for selected range of cells in the Spreadsheet. + * @param {string} Pass the unique format class. + * @param {Array} Optional. If the range is specified, then it will update format in the specified range else it will use the current selected range. + * @returns {void} + */ + updateUniqueFormat(formatClass: string,range: Array): void; +} + +export interface XLFreeze { + + /** This method is used to freeze columns upto the specified column index in the Spreadsheet. + * @param {number} Index of the column to be freeze. + * @returns {void} + */ + freezeColumns(colIdx: number): void; + + /** This method is used to freeze the first column in the Spreadsheet. + * @returns {void} + */ + freezeLeftColumn(): void; + + /** This method is used to freeze rows and columns before the specified cell in the Spreadsheet. + * @param {any} Row index and column index of the cell which you want to freeze. + * @returns {void} + */ + freezePanes(cell: any): void; + + /** This method is used to freeze rows upto the specified row index in the Spreadsheet. + * @param {number} Index of the row to be freeze. + * @returns {void} + */ + freezeRows(rowIdx: number): void; + + /** This method is used to freeze the top row in the Spreadsheet. + * @returns {void} + */ + freezeTopRow(): void; +} + +export interface XLPrint { + + /** This method is used to print the selected contents in the Spreadsheet. + * @returns {void} + */ + printSelection(): void; + + /** This method is used to print the entire contents in the active sheet. + * @returns {void} + */ + printSheet(): void; +} + +export interface XLResize { + + /** This method is used to get the column width of the specified column index in the Spreadsheet. + * @param {number} Pass the column index. + * @returns {number} + */ + getColWidth(colIdx: number): number; + + /** This method is used to get the row height of the specified row index in the Spreadsheet. + * @param {number} Pass the row index which you want to find its height. + * @returns {number} + */ + getRowHeight(rowIdx: number): number; + + /** This method is used to set the column width of the specified column index in the Spreadsheet. + * @param {number} Pass the column index. + * @param {number} Pass the width value that you want to set. + * @returns {void} + */ + setColWidth(colIdx: number,size: number): void; + + /** This method is used to set the row height of the specified row index in the Spreadsheet. + * @param {number} Pass the row index. + * @param {number} Pass the height value that you want to set. + * @returns {void} + */ + setRowHeight(rowIdx: number,size: number): void; +} + +export interface XLRibbon { + + /** This method is used to add a new name in the Spreadsheet name manager. + * @param {string} Pass the name that you want to define in name manager. + * @param {string} Pass the cell reference. + * @param {string} Optional. Pass comment, if you want. + * @param {number} Optional. Pass the sheet index. + * @returns {void} + */ + addNamedRange(name: string,refersTo: string,comment: string,sheetIdx: number): void; + + /** This method is used to insert the few type (SUM, MAX, MIN, AVG, COUNT) of formulas in the selected range of cells in the Spreadsheet. + * @param {string} To pass the type("SUM","MAX","MIN","AVG","COUNT"). + * @param {string} If range is specified, it will apply auto sum for the specified range else it will use the current selected range. + * @returns {void} + */ + autoSum(type: string,range: string): void; + + /** This method is used to delete the defined name in the Spreadsheet name manager. + * @param {string} Pass the defined name that you want to remove from name manager. + * @returns {void} + */ + removeNamedRange(name: string): void; +} + +export interface XLSearch { + + /** This method is used to find and replace all data by workbook in the Spreadsheet. + * @param {string} Pass the search data. + * @param {string} Pass the replace data. + * @param {boolean} Pass true, if you want to match with case-sensitive. + * @param {boolean} Pass true, if you want to match with entire cell contents. + * @returns {void} + */ + replaceAllByBook(findData: string,replaceData: string,isCSen: boolean,isEMatch: boolean): void; + + /** This method is used to find and replace all data by sheet in Spreadsheet. + * @param {string} Pass the search data. + * @param {string} Pass the replace data. + * @param {boolean} Pass true, if you want to match with case-sensitive. + * @param {boolean} Pass true, if you want to match with entire cell contents. + * @returns {void} + */ + replaceAllBySheet(findData: string,replaceData: string,isCSen: boolean,isEMatch: boolean): void; +} + +export interface XLSelection { + + /** This method is used to get the selected cells element based on specified sheet index in the Spreadsheet. + * @param {number} Pass the sheet index to get the cells element. + * @returns {HTMLElement} + */ + getSelectedCells(sheetIdx: number): HTMLElement; + + /** This method is used to refresh the selection in the Spreadsheet. + * @param {Array} Optional. Pass range to refresh selection. + * @returns {void} + */ + refreshSelection(range: Array): void; + + /** This method is used to select a single column in the Spreadsheet. + * @param {number} Pass the column index value. + * @returns {void} + */ + selectColumn(colIdx: number): void; + + /** This method is used to select entire columns in a specified range (start index and end index) in the Spreadsheet. + * @param {number} Pass the column start index. + * @param {number} Pass the column end index. + * @returns {void} + */ + selectColumns(startIdx: number,endIdx: number): void; + + /** This method is used to select the specified range of cells in the Spreadsheet. + * @param {string} Pass range which want to select. + * @param {any} Pass the row and column index of the end cell. + * @returns {void} + */ + selectRange(range: string,endCell: any): void; + + /** This method is used to select a single row in the Spreadsheet. + * @param {number} Pass the row index value. + * @returns {void} + */ + selectRow(rowIdx: number): void; + + /** This method is used to select entire rows in a specified range (start index and end index) in the Spreadsheet. + * @param {number} Pass the start row index. + * @param {number} Pass the end row index. + * @returns {void} + */ + selectRows(startIdx: number,endIdx: number): void; + + /** This method is used to select all cells in active sheet. + * @returns {void} + */ + selectSheet(): void; +} + +export interface XLSort { + + /** This method is used to sort a particular range of cells based on its cell or font color in the Spreadsheet. + * @param {string} Pass 'PutCellColor' to sort by cell color or 'PutFontColor' for by font color. + * @param {any} Pass the HEX color code to sort. + * @param {string} Pass the range + * @returns {void} + */ + sortByColor(operation: string,color: any,range: string): void; + + /** This method is used to sort a particular range of cells based on its values in the Spreadsheet. + * @param {Array|string} Pass the range to sort. + * @param {string} Pass the column name. + * @param {any} Pass the direction to sort (ascending or descending). + * @returns {void} + */ + sortByRange(range: Array|string,columnName: string,direction: any): void; +} + +export interface XLValidate { + + /** This method is used to apply data validation rules in a selected range of cells based on the defined condition in the Spreadsheet. + * @param {string} If range is specified, it will apply rules for the specified range else it will use the current selected range. + * @param {Array} Pass the validation condition, value1 and value2. + * @param {string} Pass the data type. + * @param {boolean} Pass 'true' if you ignore blank values. + * @param {boolean} Pass 'true' if you want to show an error alert. + * @returns {void} + */ + applyDVRules(range: string,values: Array,type: string,required: boolean,showErrorAlert: boolean): void; + + /** This method is used to clear the applied validation rules in a specified range of cells in the Spreadsheet. + * @param {string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + clearDV(range: string): void; + + /** This method is used to highlight invalid data in a specified range of cells in the Spreadsheet. + * @param {string} Optional. If range is specified, it will clear rules for the specified range else it will use the current selected range. + * @returns {void} + */ + highlightInvalidData(range: string): void; +} + +export interface Model { + + /**Gets or sets an active sheet index in the Spreadsheet. By defining this value, you can specify which sheet should be active in workbook. + * @Default {1} + */ + activeSheetIndex?: number; + + /**Gets or sets a value that indicates whether to enable or disable auto rendering of cell type in the Spreadsheet. + * @Default {false} + */ + allowAutoCellType?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable auto fill feature in the Spreadsheet. + * @Default {true} + */ + allowAutoFill?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable auto sum feature in the Spreadsheet. + * @Default {true} + */ + allowAutoSum?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable cell format feature in the Spreadsheet. By enabling this, you can customize styles and number formats. + * @Default {true} + */ + allowCellFormatting?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable cell type feature in the Spreadsheet. + * @Default {false} + */ + allowCellType?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable chart feature in the Spreadsheet. By enabling this feature, you can create and customize charts in Spreadsheet. + * @Default {true} + */ + allowCharts?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable clipboard feature in the Spreadsheet. By enabling this feature, you can perform cut/copy and paste operations in Spreadsheet. + * @Default {true} + */ + allowClipboard?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable comment feature in the Spreadsheet. By enabling this, you can add/delete/modify comments in Spreadsheet. + * @Default {true} + */ + allowComments?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable Conditional Format feature in the Spreadsheet. By enabling this, you can apply formatting to the selected range of cells based on the provided conditions (Greater than, Less than, Equal, Between, Contains, etc.).Note: allowCellFormatting must be true while using conditional formatting. + * @Default {true} + */ + allowConditionalFormats?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable data validation feature in the Spreadsheet. + * @Default {true} + */ + allowDataValidation?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the delete action in the Spreadsheet. By enabling this feature, you can delete existing rows, columns, cells and sheet. + * @Default {true} + */ + allowDelete?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable drag and drop feature in the Spreadsheet. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the edit action in the Spreadsheet. + * @Default {true} + */ + allowEditing?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable filtering feature in the Spreadsheet. Filtering can be used to limit the data displayed using required criteria. + * @Default {true} + */ + allowFiltering?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable table feature in the Spreadsheet. By enabling this, you can render table in selected range. + * @Default {true} + */ + allowFormatAsTable?: boolean; + + /**Get or sets a value that indicates whether to enable or disable format painter feature in the Spreadsheet. By enabling this feature, you can copy the format from the selected range and apply it to another range. + * @Default {true} + */ + allowFormatPainter?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable formula bar in the Spreadsheet. + * @Default {true} + */ + allowFormulaBar?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable freeze pane support in Spreadsheet. After enabling this feature, you can use freeze top row, freeze first column and freeze panes options. + * @Default {true} + */ + allowFreezing?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable hyperlink feature in the Spreadsheet. By enabling this feature, you can add hyperlink which is used to easily navigate to the cell reference from one sheet to another or a web page. + * @Default {true} + */ + allowHyperlink?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable import feature in the Spreadsheet. By enabling this feature, you can open existing Spreadsheet documents. + * @Default {true} + */ + allowImport?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the insert action in the Spreadsheet. By enabling this feature, you can insert new rows, columns, cells and sheet. + * @Default {true} + */ + allowInsert?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable keyboard navigation feature in the Spreadsheet. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable lock cell feature in the Spreadsheet. + * @Default {true} + */ + allowLockCell?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable merge feature in the Spreadsheet. + * @Default {true} + */ + allowMerging?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable resizing feature in the Spreadsheet. By enabling this feature, you can change the column width and row height by dragging its header boundaries. + * @Default {true} + */ + allowResizing?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable find and replace feature in the Spreadsheet. By enabling this, you can easily find and replace a specific value in the sheet or workbook. By using goto behavior, you can select and highlight all cells that contains specific data or data types. + * @Default {true} + */ + allowSearching?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable selection in the Spreadsheet. By enabling this feature, selected items will be highlighted. + * @Default {true} + */ + allowSelection?: boolean; + + /**Gets or sets a value that indicates whether to enable the sorting feature in the Spreadsheet. + * @Default {true} + */ + allowSorting?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable undo and redo feature in the Spreadsheet. + * @Default {true} + */ + allowUndoRedo?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable wrap text feature in the Spreadsheet. By enabling this, cell content can wrap to the next line, if the cell content exceeds the boundary of the cell. + * @Default {true} + */ + allowWrap?: boolean; + + /**Gets or sets a value that indicates to define the width of the activation panel in Spreadsheet. + * @Default {200} + */ + apWidth?: number; + + /**Gets or sets an object that indicates to customize the auto fill behavior in the Spreadsheet. + */ + autoFillSettings?: AutoFillSettings; + + /**Gets or sets an object that indicates to customize the chart behavior in the Spreadsheet. + */ + chartSettings?: ChartSettings; + + /**Gets or sets a value that defines the number of columns displayed in the sheet. + * @Default {21} + */ + columnCount?: number; + + /**Gets or sets a value that indicates to define the common width for each column in the Spreadsheet. + * @Default {60} + */ + columnWidth?: number; + + /**Gets or sets a value that indicates to render the spreadsheet with custom theme. + */ + cssClass?: string; + + /**Gets or sets a value that indicates whether to enable or disable context menu in the Spreadsheet. + * @Default {true} + */ + enableContextMenu?: boolean; + + /**Gets or sets an object that indicates to customize the exporting behavior in Spreadsheet. + */ + exportSettings?: ExportSettings; + + /**Gets or sets an object that indicates to customize the format behavior in the Spreadsheet. + */ + formatSettings?: FormatSettings; + + /**Gets or sets an object that indicates to customize the import behavior in the Spreadsheet. + */ + importSettings?: ImportSettings; + + /**Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data (i.e.) in a language and culture specific to a particular country or region. + * @Default {en-US} + */ + locale?: string; + + /**Gets or sets an object that indicates to customize the picture behavior in the Spreadsheet. + */ + pictureSettings?: PictureSettings; + + /**Gets or sets an object that indicates to customize the print option in Spreadsheet. + */ + printSettings?: PrintSettings; + + /**Gets or sets a value that indicates whether to define the number of rows to be displayed in the sheet. + * @Default {20} + */ + rowCount?: number; + + /**Gets or sets a value that indicates to define the common height for each row in the sheet. + * @Default {20} + */ + rowHeight?: number; + + /**Gets or sets an object that indicates to customize the scroll options in the Spreadsheet. + */ + scrollSettings?: ScrollSettings; + + /**Gets or sets an object that indicates to customize the selection options in the Spreadsheet. + */ + selectionSettings?: SelectionSettings; + + /**Gets or sets a value that indicates to define the number of sheets to be created at the initial load. + * @Default {1} + */ + sheetCount?: number; + + /**Gets or sets an object that indicates to customize the sheet behavior in Spreadsheet. + */ + sheets?: Array; + + /**Gets or sets a value that indicates whether to show or hide ribbon in the Spreadsheet. + * @Default {true} + */ + showRibbon?: boolean; + + /**This is used to set the number of undo-redo steps in the Spreadsheet. + * @Default {20} + */ + undoRedoStep?: number; + + /**Define the username for the Spreadsheet which is displayed in comment. + * @Default {User Name} + */ + userName?: string; + + /**Triggered for every action before its starts.*/ + actionBegin? (e: ActionBeginEventArgs): void; + + /**Triggered for every action complete.*/ + actionComplete? (e: ActionCompleteEventArgs): void; + + /**Triggered when the auto fill operation begins.*/ + autoFillBegin? (e: AutoFillBeginEventArgs): void; + + /**Triggered when the auto fill operation completes.*/ + autoFillComplete? (e: AutoFillCompleteEventArgs): void; + + /**Triggered before the cells to be formatted.*/ + beforeCellFormat? (e: BeforeCellFormatEventArgs): void; + + /**Triggered before the cell selection.*/ + beforeCellSelect? (e: BeforeCellSelectEventArgs): void; + + /**Triggered before the selected cells are dropped.*/ + beforeDrop? (e: BeforeDropEventArgs): void; + + /**Triggered before the contextmenu is open.*/ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /**Triggered before the activation panel is open.*/ + beforePanelOpen? (e: BeforePanelOpenEventArgs): void; + + /**Triggered when click on sheet cell.*/ + cellClick? (e: CellClickEventArgs): void; + + /**Triggered when the cell is edited.*/ + cellEdit? (e: CellEditEventArgs): void; + + /**Triggered when mouse hover on cell in sheets.*/ + cellHover? (e: CellHoverEventArgs): void; + + /**Triggered when save the edited cell.*/ + cellSave? (e: CellSaveEventArgs): void; + + /**Triggered when click the contextmenu items.*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Triggered when the selected cells are being dragged.*/ + drag? (e: DragEventArgs): void; + + /**Triggered when the selected cells are initiated to drag.*/ + dragStart? (e: DragStartEventArgs): void; + + /**Triggered when the selected cells are dropped.*/ + drop? (e: DropEventArgs): void; + + /**Triggered before the range editing starts.*/ + editRangeBegin? (e: EditRangeBeginEventArgs): void; + + /**Triggered after range editing completes.*/ + editRangeComplete? (e: EditRangeCompleteEventArgs): void; + + /**Triggered before the sheet is loaded.*/ + load? (e: LoadEventArgs): void; + + /**Triggered after the sheet is loaded.*/ + loadComplete? (e: LoadCompleteEventArgs): void; + + /**Triggered every click of the menu item.*/ + menuClick? (e: MenuClickEventArgs): void; + + /**Triggered when import sheet is failed to open.*/ + openFailure? (e: OpenFailureEventArgs): void; + + /**Triggered when pager item is clicked in the Spreadsheet.*/ + pagerClick? (e: PagerClickEventArgs): void; + + /**Triggered when click on the ribbon.*/ + ribbonClick? (e: RibbonClickEventArgs): void; + + /**Triggered when the chart series rendering.*/ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /**Triggered when click the ribbon tab.*/ + tabClick? (e: TabClickEventArgs): void; + + /**Triggered when select the ribbon tab.*/ + tabSelect? (e: TabSelectEventArgs): void; +} + +export interface ActionBeginEventArgs { + + /**Returns the applied style format object. + */ + afterFormat?: any; + + /**Returns the applied style format object. + */ + beforeFormat?: any; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the cell range. + */ + range?: Array; + + /**Returns the action format. + */ + reqType?: string; + + /**Returns goto index while paging. + */ + gotoIdx?: number; + + /**Returns boolean value. If create new sheet it returns true. + */ + newSheet?: boolean; + + /**Return column name while sorting. + */ + columnName?: string; + + /**Returns selected columns while sorting or filtering begins. + */ + colSelected?: number; + + /**Returns sort direction while sort action begins. + */ + sortDirection?: string; +} + +export interface ActionCompleteEventArgs { + + /**Returns Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the applied cell format object. + */ + selectedCell?: Array|any; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the request type. + */ + reqType?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface AutoFillBeginEventArgs { + + /**Returns auto fill begin cell range. + */ + dataRange?: Array; + + /**Returns which direction drag the auto fill. + */ + direction?: string; + + /**Returns fill cells range. + */ + fillRange?: Array; + + /**Returns the auto fill type. + */ + fillType?: string; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface AutoFillCompleteEventArgs { + + /**Returns auto fill begin cell range. + */ + dataRange?: Array; + + /**Returns which direction to drag the auto fill. + */ + direction?: string; + + /**Returns fill cells range. + */ + fillRange?: Array; + + /**Returns the auto fill type. + */ + fillType?: string; + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforeCellFormatEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the applied style format object. + */ + format?: any; + + /**Returns the selected cells. + */ + cells?: Array|any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the name of the event. + */ + type?: string; +} + +export interface BeforeCellSelectEventArgs { + + /**Returns the previous cell range. + */ + prevRange?: Array; + + /**Returns the current cell range. + */ + currRange?: Array; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforeDropEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the cell Overwriting alert option value. + */ + preventAlert?: boolean; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforeOpenEventArgs { + + /**Returns the target element. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface BeforePanelOpenEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the activation panel element. + */ + activationPanel?: any; + + /**Returns the range option value. + */ + range?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellClickEventArgs { + + /**Returns the click cell element. + */ + cell?: HTMLElement; + + /**Returns the column index of clicked cell. + */ + columnIndex?: number; + + /**Returns the row index of clicked cell. + */ + rowIndex?: number; + + /**Returns the column name of clicked cell. + */ + columnName?: string; + + /**Returns the column information. + */ + columnObject?: any; +} + +export interface CellEditEventArgs { + + /**Returns the click cell element. + */ + cell?: HTMLElement; + + /**Returns the columnName of clicked cell. + */ + columnName?: string; + + /**Returns the column field information. + */ + columnObject?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellHoverEventArgs { + + /**Returns the target element. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellSaveEventArgs { + + /**Returns the save cell element. + */ + cell?: HTMLElement; + + /**Returns the columnName of clicked cell. + */ + columnName?: string; + + /**Returns the column field information. + */ + columnObject?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cell previous value. + */ + pValue?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the cell value. + */ + value?: string; +} + +export interface ContextMenuClickEventArgs { + + /**Returns target element Id. + */ + Id?: string; + + /**Returns the target element. + */ + element?: HTMLElement; + + /**Returns event information. + */ + event?: any; + + /**Returns target element and event information. + */ + events?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns target element parent Id. + */ + parentId?: string; + + /**Returns target element parent text. + */ + parentText?: string; + + /**Returns target element text. + */ + text?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface DragEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface DragStartEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface DropEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the current cell row and column index. + */ + currentCell?: any; + + /**Returns the drag cells range object. + */ + dragAndDropRange?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the target item. + */ + target?: HTMLElement; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface EditRangeBeginEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the range option value. + */ + range?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface EditRangeCompleteEventArgs { + + /**Returns the sheet index. + */ + sheetIdx?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the range option value. + */ + range?: any; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface LoadEventArgs { + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the cancel option value. + */ + cancel?: boolean; + + /**Returns the active sheet index. + */ + sheetIndex?: number; +} + +export interface LoadCompleteEventArgs { + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface MenuClickEventArgs { + + /**Returns menu click element. + */ + element?: HTMLElement; + + /**Returns the event information. + */ + event?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns target element parent Id. + */ + parentId?: string; + + /**Returns target element parent text. + */ + parentText?: string; + + /**Returns target element text. + */ + text?: string; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface OpenFailureEventArgs { + + /**Returns the failure type. + */ + failureType?: string; + + /**Returns the status index. + */ + status?: number; + + /**Returns the status in text. + */ + statusText?: string; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface PagerClickEventArgs { + + /**Returns the active sheet index. + */ + activeSheet?: number; + + /**Returns the new sheet index. + */ + gotoSheet?: number; + + /**Returns whether new sheet icon is clicked. + */ + newSheet?: boolean; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface RibbonClickEventArgs { + + /**Returns element Id. + */ + Id?: string; + + /**Returns target information. + */ + prop?: any; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns status. + */ + status?: boolean; + + /**Returns isChecked in boolean. + */ + isChecked?: boolean; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface SeriesRenderingEventArgs { + + /**Returns chart data and chart information. + */ + data?: any; + + /**Returns the chart model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface TabClickEventArgs { + + /**Returns the active tab index. + */ + activeIndex?: number; + + /**Returns active tab header element. + */ + activeHeader?: any; + + /**Returns previous active tab header element. + */ + prevActiveHeader?: any; + + /**Returns previous active tab index. + */ + prevActiveIndex?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface TabSelectEventArgs { + + /**Returns the active tab index. + */ + activeIndex?: number; + + /**Returns active tab header element. + */ + activeHeader?: any; + + /**Returns previous active tab header element. + */ + prevActiveHeader?: any; + + /**Returns previous active tab index. + */ + prevActiveIndex?: number; + + /**Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /**Returns the name of the event. + */ + type?: string; + + /**Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface AutoFillSettings { + + /**This property is used to set fillType unit in Spreadsheet. It has five types which are CopyCells, FillSeries, FillFormattingOnly, FillWithoutFormatting and FlashFill. + * @Default {ej.Spreadsheet.AutoFillOptions.FillSeries} + */ + fillType?: ej.Spreadsheet.AutoFillOptions|string; + + /**Gets or sets a value that indicates to enable or disable auto fill options in the Spreadsheet. + * @Default {true} + */ + showFillOptions?: boolean; +} + +export interface ChartSettings { + + /**Gets or sets a value that defines the chart height in Spreadsheet. + * @Default {220} + */ + height?: number; + + /**Gets or sets a value that defines the chart width in the Spreadsheet. + * @Default {440} + */ + width?: number; +} + +export interface ExportSettings { + + /**Gets or sets a value that indicates whether to enable or disable save feature in Spreadsheet. By enabling this feature, you can save existing Spreadsheet. + * @Default {true} + */ + allowExporting?: boolean; + + /**Gets or sets a value that indicates to define csvUrl for export to csv format. + * @Default {null} + */ + csvUrl?: string; + + /**Gets or sets a value that indicates to define excelUrl for export to excel format.Note: User must specify allowExporting true while use this property. + * @Default {null} + */ + excelUrl?: string; + + /**Gets or sets a value that indicates to define password while export to excel format. + * @Default {null} + */ + password?: string; +} + +export interface FormatSettings { + + /**Gets or sets a value that indicates whether to enable or disable cell border feature in the Spreadsheet. + * @Default {true} + */ + allowCellBorder?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable decimal places in the Spreadsheet. + * @Default {true} + */ + allowDecimalPlaces?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable font family feature in Spreadsheet. + * @Default {true} + */ + allowFontFamily?: boolean; +} + +export interface ImportSettings { + + /**Sets import mapper to perform import feature in Spreadsheet. + */ + importMapper?: string; + + /**Sets import Url to access the online files in the Spreadsheet. + */ + importUrl?: string; + + /**Gets or sets a value that indicates to define password while importing in the Spreadsheet. + */ + password?: string; +} + +export interface PictureSettings { + + /**Gets or sets a value that indicates whether to enable or disable picture feature in Spreadsheet. By enabling this, you can add pictures in Spreadsheet. + * @Default {true} + */ + allowPictures?: boolean; + + /**Gets or sets a value that indicates to define height to picture in the Spreadsheet. + * @Default {220} + */ + height?: number; + + /**Gets or sets a value that indicates to define width to picture in the Spreadsheet. + * @Default {440} + */ + width?: number; +} + +export interface PrintSettings { + + /**Gets or sets a value that indicates whether to enable or disable page setup support for printing in Spreadsheet. + * @Default {true} + */ + allowPageSetup?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable page size support for printing in Spreadsheet. + * @Default {false} + */ + allowPageSize?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable print feature in the Spreadsheet. + * @Default {true} + */ + allowPrinting?: boolean; +} + +export interface ScrollSettings { + + /**Gets or sets a value that indicates whether to enable or disable scrolling in Spreadsheet. + * @Default {true} + */ + allowScrolling?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable sheet on demand. By enabling this, it render only the active sheet element while paging remaining sheets are created one by one. + * @Default {false} + */ + allowSheetOnDemand?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable virtual scrolling feature in the Spreadsheet. + * @Default {true} + */ + allowVirtualScrolling?: boolean; + + /**Gets or sets the value that indicates to define the height of spreadsheet. + * @Default {550} + */ + height?: number|string; + + /**Gets or sets the value that indicates whether to enable or disable responsive mode in the Spreadsheet. + * @Default {false} + */ + isResponsive?: boolean; + + /**Gets or sets a value that indicates to set scroll mode in Spreadsheet. It has two scroll modes, Normal and Infinite. + * @Default {ej.Spreadsheet.scrollMode.Infinite} + */ + scrollMode?: ej.Spreadsheet.scrollMode|string; + + /**Gets or sets the value that indicates to define the height off spreadsheet. + * @Default {1200} + */ + width?: number|string; +} + +export interface SelectionSettings { + + /**Gets or sets a value that indicates to define active cell in spreadsheet. + */ + activeCell?: string; + + /**Gets or sets a value that indicates to define animation time while selection in the Spreadsheet. + * @Default {0.001} + */ + animationTime?: number; + + /**Gets or sets a value that indicates to enable or disable animation while selection.Note: allowSelection must be true while using this property. + * @Default {false} + */ + enableAnimation?: boolean; + + /**Gets or sets a value that indicates to set selection type in Spreadsheet. It has three types which are Column, Row and default. + * @Default {ej.Spreadsheet.SelectionType.Default} + */ + selectionType?: ej.Spreadsheet.SelectionType|string; + + /**Gets or sets a value that indicates to set selection unit in Spreadsheet. It has three types which are Single, Range and MultiRange. + * @Default {ej.Spreadsheet.SelectionUnit.MultiRange} + */ + selectionUnit?: ej.Spreadsheet.SelectionUnit|string; +} + +export interface SheetsRangeSettings { + + /**Gets or sets the data to render the Spreadsheet. + */ + dataSource?: any; + + /**Specifies the header styles for the datasource range in Spreadsheet. + * @Default {null} + */ + headerStyles?: any; + + /**Specifies the primary key for the datasource in Spreadsheet. + */ + primaryKey?: string; + + /**Specifies the query for the datasource in Spreadsheet. + * @Default {null} + */ + query?: any; + + /**Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. + * @Default {false} + */ + showHeader?: boolean; + + /**Specifies the start cell for the datasource range in Spreadsheet. + * @Default {A1} + */ + startCell?: string; +} + +export interface Sheets { + + /**Gets or sets a value that indicates to define column count in the Spreadsheet. + * @Default {21} + */ + colCount?: number; + + /**Gets or sets a value that indicates to define column width in the Spreadsheet. + * @Default {64} + */ + columnWidth?: number; + + /**Gets or sets the data to render the Spreadsheet. + */ + dataSource?: any; + + /**Gets or sets a value that indicates whether to enable or disable field as column header in the Spreadsheet. + * @Default {false} + */ + fieldAsColumnHeader?: boolean; + + /**Specifies the header styles for the datasource range in Spreadsheet. + * @Default {null} + */ + headerStyles?: any; + + /**Specifies the primary key for the datasource in Spreadsheet. + */ + primaryKey?: string; + + /**Specifies the query for the datasource in Spreadsheet. + * @Default {null} + */ + query?: any; + + /**Specifies single range or multiple range settings for a sheet in Spreadsheet. + */ + rangeSettings?: Array; + + /**Gets or sets a value that indicates to define row count in the Spreadsheet. + * @Default {20} + */ + rowCount?: number; + + /**Gets or sets a value that indicates whether to show or hide grid lines in the Spreadsheet. + * @Default {true} + */ + showGridlines?: boolean; + + /**Gets or sets a value that indicates whether to enable or disable the datasource header in Spreadsheet. + * @Default {false} + */ + showHeader?: boolean; + + /**Gets or sets a value that indicates whether to show or hide headings in the Spreadsheet. + * @Default {true} + */ + showHeadings?: boolean; + + /**Specifies the start cell for the datasource range in Spreadsheet. + * @Default {A1} + */ + startCell?: string; +} + +enum AutoFillOptions{ + + ///Specifies the CopyCells property in AutoFillOptions. + CopyCells, + + ///Specifies the FillSeries property in AutoFillOptions. + FillSeries, + + ///Specifies the FillFormattingOnly property in AutoFillOptions. + FillFormattingOnly, + + ///Specifies the FillWithoutFormatting property in AutoFillOptions. + FillWithoutFormatting, + + ///Specifies the FlashFill property in AutoFillOptions. + FlashFill +} + + +enum scrollMode{ + + ///To enable Infinite scroll mode for Spreadsheet. + Infinite, + + ///To enable Normal scroll mode for Spreadsheet. + Normal +} + + +enum SelectionType{ + + ///To select only Column in Spreadsheet. + Column, + + ///To select only Row in Spreadsheet. + Row, + + ///To select both Column/Row in Spreadsheet. + Default +} + + +enum SelectionUnit{ + + ///To enable Single selection in Spreadsheet. + Single, + + ///To enable Range selection in Spreadsheet. + Range, + + ///To enable MultiRange selection in Spreadsheet. + MultiRange +} + +} + +} +declare module ej.olap { + +class OlapChart extends ej.Widget { + static fn: OlapChart; + constructor(element: JQuery, options?: OlapChart.Model); + constructor(element: Element, options?: OlapChart.Model); + model:OlapChart.Model; + defaults:OlapChart.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the OlapChart to an appropriate format based on the parameter passed. + * @returns {void} + */ + exportOlapChart(): void; + + /** This function receives the JSON formatted datasource to render the OlapChart control. + * @returns {void} + */ + renderChartFromJSON(): void; + + /** This function receives the update from service-end, which would be utilized for rendering the widget. + * @returns {void} + */ + renderControlSuccess(): void; +} +export module OlapChart{ + +export interface Model { + + /**Specifies the CSS class to OlapChart to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Contains the serialized OlapReport at that instant, that is, current OlapReport. + * @Default {“”} + */ + currentReport?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**Allows the user to enable 3D view of OlapChart. + * @Default {false} + */ + enable3D?: boolean; + + /**Allows the user to enable OlapChart’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Allows the user to rotate the angle of OlapChart in 3D view. + * @Default {0} + */ + rotation?: number; + + /**Allows the user to set custom name for the methods at service-end, communicated on AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from OlapChart to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers when drill up/down happens in OlapChart control.*/ + drillSuccess? (e: DrillSuccessEventArgs): void; + + /**Triggers when OlapChart widget completes all operations at client-side after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when OlapChart successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DrillSuccessEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the error stack trace of the original exception. + */ + message?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapChart.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportOlapChart?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for drilling up/down operation in OlapChart. + * @Default {DrillChart} + */ + drillDown?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for initializing OlapChart. + * @Default {InitializeChart} + */ + initialize?: string; +} +} + +class OlapClient extends ej.Widget { + static fn: OlapClient; + constructor(element: JQuery, options?: OlapClient.Model); + constructor(element: Element, options?: OlapClient.Model); + model:OlapClient.Model; + defaults:OlapClient.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; +} +export module OlapClient{ + +export interface Model { + + /**Allows the user to set the specific chart type for OlapChart. + * @Default {ej.olap.OlapChart.ChartTypes.Column} + */ + chartType?: ej.olap.OlapChart.ChartTypes|string; + + /**Sets the mode to export the OLAP visualization components such as OlapChart and PivotGrid in OlapClient. Based on the option, either Chart or Grid or both gets exported. + * @Default {ej.olap.OlapClient.ClientExportMode.ChartAndGrid} + */ + clientExportMode?: string; + + /**Specifies the CSS class to OlapClient to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**Allows the user to customize the widgets layout and appearance. + * @Default {{}} + */ + displaySettings?: DisplaySettings; + + /**Allows the user to refresh the control on-demand and not during every UI operation. + * @Default {false} + */ + enableDeferUpdate?: boolean; + + /**Enables/disables the visibility of measure group selector drop-down in Cube Browser. + * @Default {false} + */ + enableMeasureGroups?: boolean; + + /**Sets the summary layout for PivotGrid. Following are the ways in which summary can be positioned: normal summary (bottom), top summary, no summary and excel-like summary. + * @Default {ej.PivotGrid.Layout.Normal} + */ + gridLayout?: ej.PivotGrid.Layout|string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Allows the user to set custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Sets the title for OlapClient widget. + * @Default {null} + */ + title?: string; + + /**Connects the service using the specified URL for any server updates. + * @Default {null} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from OlapClient to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers before rendering the OlapChart.*/ + chartLoad? (e: ChartLoadEventArgs): void; + + /**Triggers while we initiate loading of the widget.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when OlapClient widget completes all operations at client-end after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when OlapClient successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of OlapClient control. + */ + action?: string; + + /**return the custom object bounds with OlapClient control. + */ + customObject?: any; + + /**return the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of OlapClient control. + */ + action?: string; + + /**return the custom object bounds with OlapClient control. + */ + customObject?: any; + + /**return the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface ChartLoadEventArgs { + + /**return the current action of OlapChart control. + */ + action?: string; + + /**return the custom object bounds with OlapChart control. + */ + customObject?: any; + + /**return the outer HTML of OlapChart control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapChart model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the outer HTML of OlapClient component. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the outer HTML of OlapClient control. + */ + element?: string; + + /**returns the error message with error code. + */ + message?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the outer HTML of OlapClient control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapClient model. + */ + model?: ej.olap.OlapClient.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface DisplaySettings { + + /**Let’s the user to customize the display of OlapChart and PivotGrid widgets, either in tab view or in tile view. + * @Default {ej.olap.OlapClient.ControlPlacement.Tab} + */ + controlPlacement?: ej.olap.OlapClient.ControlPlacement|string; + + /**Let’s the user to set either Chart or Grid as the start-up widget. + * @Default {ej.olap.OlapClient.DefaultView.Grid} + */ + defaultView?: ej.olap.OlapClient.DefaultView|string; + + /**Enables/disables the full screen view of OlapChart and PivotGrid in OlapClient. + * @Default {false} + */ + enableFullScreen?: boolean; + + /**Enhances the space for PivotGrid and OlapChart, by hiding Cube Browser and Axis Element Builder. + * @Default {false} + */ + enableTogglePanel?: boolean; + + /**Allows the user to enable OlapClient’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Sets the display mode (Only Chart/Only Grid/Both) in OlapClient. + * @Default {ej.olap.OlapClient.DisplayMode.ChartAndGrid} + */ + mode?: ej.olap.OlapClient.DisplayMode|string; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that’s responsible for updating the entire report and widget, while changing the Cube. + * @Default {CubeChanged} + */ + cubeChanged?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportOlapClient?: string; + + /**Allows the user to set the custom name for the service method that’s responsible to get the members, for the tree-view inside member-editor dialog. + * @Default {FetchMemberTreeNodes} + */ + fetchMemberTreeNodes?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for fetching the report names from the database. + * @Default {FetchReportListFromDB} + */ + fetchReportList?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report while filtering members. + * @Default {FilterElement} + */ + filterElement?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for initializing OlapClient. + * @Default {InitializeClient} + */ + initialize?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for loading the report collection from the database. + * @Default {LoadReportFromDB} + */ + loadReport?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for retrieving the MDX query for the current report. + * @Default {GetMDXQuery} + */ + mdxQuery?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating the tree-view inside Cube Browser, while changing the measure group. + * @Default {MeasureGroupChanged} + */ + measureGroupChanged?: string; + + /**Allows the user to set the custom name for the service method that’s responsible to get the child members, on tree-view node expansion. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report while dropping a node/SplitButton inside Axis Element Builder. + * @Default {NodeDropped} + */ + nodeDropped?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report while removing SplitButton from Axis Element Builder. + * @Default {RemoveSplitButton} + */ + removeSplitButton?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for saving the report collection to database. + * @Default {SaveReportToDB} + */ + saveReport?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for toggling the elements in row and column axes. + * @Default {ToggleAxis} + */ + toggleAxis?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for any toolbar operation. + * @Default {ToolbarOperations} + */ + toolbarServices?: string; + + /**Allows the user to set the custom name for the service method that’s responsible for updating report collection. + * @Default {UpdateReport} + */ + updateReport?: string; +} +} +module OlapChart +{ +enum ChartTypes +{ +//To render a Line type for OlapChart. +Line, +//To render a Spline type for OlapChart. +Spline, +//To render a Column type for OlapChart. +Column, +//To render a Area type for OlapChart. +Area, +//To render a SplineArea type for OlapChart. +SplineArea, +//To render a StepLine type for OlapChart. +StepLine, +//To render a StepArea type for OlapChart. +StepArea, +//To render a Pie type for OlapChart. +Pie, +//To render a Bar type for OlapChart. +Bar, +//To render a StackingArea type for OlapChart. +StackingArea, +//To render a StackingColumn type for OlapChart. +StackingColumn, +//To render a StackingBar type for OlapChart. +StackingBar, +//To render a Pyramid type for OlapChart. +Pyramid, +//To render a Funnel type for OlapChart. +Funnel, +//To render a Doughnut type for OlapChart. +Doughnut, +//To render a Scatter type for OlapChart. +Scatter, +//To render a Bubble type for OlapChart. +Bubble, +} +} +module OlapClient +{ +enum ControlPlacement +{ +//To display OlapChart and PivotGrid widgets in tab view. +Tab, +//To display OlapChart and PivotGrid widgets within the same view, one below the other. +Tile, +} +} +module OlapClient +{ +enum DefaultView +{ +//To set OlapChart as a default control in view when the OlapClient widget is loaded for the first time. +Chart, +//To set PivotGrid as a default control in view when the OlapClient widget is loaded for the first time. +Grid, +} +} +module OlapClient +{ +enum DisplayMode +{ +//To display only OlapChart widget. +ChartOnly, +//To display only PivotGrid widget. +GridOnly, +//To display both OlapChart and PivotGrid widgets. +ChartAndGrid, +} +} + +class OlapGauge extends ej.Widget { + static fn: OlapGauge; + constructor(element: JQuery, options?: OlapGauge.Model); + constructor(element: Element, options?: OlapGauge.Model); + model:OlapGauge.Model; + defaults:OlapGauge.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** This function is used to refresh the OlapGauge at client-side itself. + * @returns {void} + */ + refresh(): void; + + /** This function removes the KPI related images from OlapGauge. + * @returns {void} + */ + removeImg(): void; + + /** This function receives the JSON formatted datasource to render the OlapGauge control. + * @returns {void} + */ + renderControlFromJSON(): void; +} +export module OlapGauge{ + +export interface Model { + + /**Sets the number of column count to arrange the OlapGauge's. + * @Default {0} + */ + columnsCount?: number; + + /**Specify the CSS class to OlapGauge to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /**Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /**Enables/disables tooltip visibility in OlapGauge. + * @Default {false} + */ + enableTooltip?: boolean; + + /**Allows the user to enable OlapGauge’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /**Allows the user to change the format of the label values in OlapGauge. + * @Default {ej.olap.OlapGauge.NumberFormat.Default} + */ + labelFormatSettings?: ej.olap.OlapGauge.NumberFormat|string; + + /**Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /**Sets the number of row count to arrange the OlapGauge's. + * @Default {0} + */ + rowsCount?: number; + + /**Sets the scale values such as pointers, indicators, etc... for OlapGauge. + * @Default {{}} + */ + scales?: any; + + /**Allows the user to set the custom name for the methods at service-end, communicated during AJAX post. + * @Default {{}} + */ + serviceMethodSettings?: ServiceMethodSettings; + + /**Enables/disables the header labels in OlapGauge. + * @Default {true} + */ + showHeaderLabel?: boolean; + + /**Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /**Triggers when it reaches client-side after any AJAX request.*/ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /**Triggers before any AJAX request is passed from OlapGauge to service methods.*/ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /**Triggers when OlapGauge started loading at client-side.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when OlapGauge widget completes all operations at client-side after any AJAX request.*/ + renderComplete? (e: RenderCompleteEventArgs): void; + + /**Triggers when any error occurred during AJAX request.*/ + renderFailure? (e: RenderFailureEventArgs): void; + + /**Triggers when OlapGauge successfully reaches client-side after any AJAX request.*/ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /**return the current action of OlapGauge control. + */ + action?: string; + + /**return the custom object bounds with OlapGauge control. + */ + customObject?: any; + + /**return the outer HTML of OlapGauge control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /**return the current action of OlapGauge control. + */ + action?: string; + + /**return the custom object bounds with OlapGauge control. + */ + customObject?: any; + + /**return the outer HTML of OlapGauge control. + */ + element?: string; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the outer HTML of OlapGauge control. + */ + element?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /**returns the outer HTML of OlapGauge control. + */ + element?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**returns the error message with error code. + */ + message?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; + + /**returns the JSON formatted response while error occurs. + */ + responseJSON?: any; +} + +export interface RenderSuccessEventArgs { + + /**returns the outer HTML of OlapGauge control. + */ + element?: string; + + /**returns the custom object bounded with the control. + */ + customObject?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the OlapGauge model. + */ + model?: ej.olap.OlapGauge.Model; + + /**returns the name of the event. + */ + type?: string; +} + +export interface LabelFormatSettings { + + /**Allows the user to change the number format of the label values in OlapGauge. + * @Default {ej.olap.OlapGauge.NumberFormat.Default} + */ + numberFormat?: ej.olap.OlapGauge.NumberFormat|string; + + /**Allows you to change the position of a digit on the right-hand side of the decimal point for label value. + * @Default {5} + */ + decimalPlaces?: number; + + /**Allows you to add a text at the beginning of the label. + */ + prefixText?: string; + + /**Allows you to add text at the end of the label. + */ + suffixText?: string; +} + +export interface ServiceMethodSettings { + + /**Allows the user to set the custom name for the service method that’s responsible for initializing OlapGauge. + * @Default {InitializeGauge} + */ + initialize?: string; +} +} +module OlapGauge +{ +enum NumberFormat +{ +//To set default format for label values. +Default, +//To set currency format for label values. +Currency, +//To set percentage format for label values. +Percentage, +//To set fraction format for label values. +Fraction, +//To set scientific format for label values. +Scientific, +//To set text format for label values. +Text, +//To set notation format for label values. +Notation, +} +} + +} +declare module App { + +var addMetaTags: boolean; + var allowPopState: boolean; + var allowPushState: boolean; + var activePage: JQuery; + var waitingPopUp: JQuery; + var hashMonitoring: boolean; + var pageTransition: string; + var renderEJMControlByDef: boolean; + function createPage(element: JQuery): void; + function getLoaction(): string; + function initPage(): void; + function loadView(url: string): void; + function transferPage(fromPage: Object, toPage: Object, options?: any, isFromAjax?: boolean): void; + function userAgent(): void; + + var pageHistory: { + activeHistory(): string; + add(url: string, options?: PageOption): void; + clearForward(): void; + find(url: string): number; + lastHistory(): string; + nextHistory(): string; + prevHistory(): string; + makeUrlAbsolute(hashString: string): void; + } + //Pageoption type for appview page + interface PageOption { + title?: string; + href?: string; + hash?: string; + } + var route: { + convertToRelativeUrl(): void; + hasProtocol(url: string): boolean; + setPageRenderMode(element: JQuery): void; + splitUrl(url: string): any; + } +} +declare module ej.mobile { + + //Global Interface + interface windowsOption { + renderDefault?: boolean; + } + enum RenderMode{ + Auto, + IOS7, + Android, + Windows, + Flat + } + enum Theme{ + Auto, + Dark, + Light + } +class Accordion extends ej.Widget { + static fn: Accordion; + constructor(element: JQuery, options?: AccordionOptions); + model: AccordionOptions; + validTags: Array; + defaults: AccordionOptions; + collapseAll(): void; + disableItems(itemIndexes: Array): void; + enableItems(itemIndexes: Array): void; + selectItems(activeList: Array): void; + deselectItems(activeList: Array): void; + expandAll(): void; + hide(): void; + show(): void; + destroy(): void; + getItemsCount(): number; +} +//ejmAccordion Option +interface AccordionOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + enableCache?: boolean; + allowMultipleOpen?: boolean; + collapsible?: boolean; + enabled?: boolean; + enableMultipleOpen?: boolean; + heightAdjustMode?: ej.mobile.Accordion.HeightAdjustMode; + windows?: windowsOption; + enablePersistence?: boolean; + selectedItems?: Array; + disabledItems?: Array; + showHeaderIcon?: boolean; + spinnerText?: string; + items?: Array; + active? (e: AccordionActiveEventArgs): void; + ajaxBeforeLoad? (e: AccordionAjaxBeforeLoadEventArgs): void; + ajaxError? (e: AccordionAjaxErrorEventArgs): void; + ajaxLoad? (e: AccordionAjaxLoadEventArgs): void; + ajaxSuccess? (e: AccordionAjaxSuccessEventArgs): void; + beforeActive? (e: AccordionBeforeActiveEventArgs): void; + destroy? (e: AccordionEventArgs): void; + create? (e: AccordionEventArgs): void; +} + +interface itemCollection { + ajaxUrl?: string; + logoClass?: string; +} +//ejmejmAccordionEvent Arugument +interface AccordionEventArgs { + cancel: boolean; + type: string; + model: AccordionOptions; +} +interface AccordionActiveEventArgs extends AccordionEventArgs { + items: string; + lastSelectedItemIndices: number; + selectedItemIndices: number; +} +interface AccordionAjaxBeforeLoadEventArgs extends AccordionEventArgs { + url: string; +} +interface AccordionAjaxErrorEventArgs extends AccordionEventArgs { + title: string; + data: Object; + url: string; +} +interface AccordionAjaxLoadEventArgs extends AccordionEventArgs { +} +interface AccordionAjaxSuccessEventArgs extends AccordionEventArgs { + content: Object; + data: Object; + url: string; +} +interface AccordionBeforeActiveEventArgs extends AccordionEventArgs { + activeItemIndex?: number; +} +export module Accordion { + enum HeightAdjustMode { + Content, + Auto, + Fill + } +} +class Autocomplete extends ej.Widget { + static fn: Autocomplete; + element: JQuery; + constructor(element: JQuery, options?: AutocompleteOptions); + model: AutocompleteOptions; + defaults: AutocompleteOptions; + disable(): void; + enable(): void; + destroy(): void; + clearText(): void; + getSelectedItems(): Array; + getValue(): string; + +} +interface AutocompleteOptions { + allowScrolling?: boolean; + filterType?: ej.mobile.Autocomplete.FilterType; + caseSensitiveSearch?: boolean; + cssClass?: string; + enableAutoFill?: boolean; + delimiterChar?: string; + enableMultiSelect?: boolean; + enableCheckbox?: boolean; + dataSource?: any; + filterMode?: string; + itemsCount?: string|number; + templateId?: string; + fields?: fieldOptions; + imageField?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + mapper?: string; + watermarkText?: string; + imageClass?: string; + allowSorting?: boolean; + value?: string; + sortOrder?: ej.mobile.Autocomplete.SortOrder; + emptyResultText?: string; + showEmptyResultText?: boolean; + minCharacter?: number; + enableDistinct?: boolean; + enablePersistence?: boolean; + enabled?: boolean; + mode?: ej.mobile.Autocomplete.Mode; + selectedKeys?: string; + windows?: windowsOption; + touchEnd? (e: AutocompleteTouchEndEventArgs): void; + keyPress? (e: AutocompleteKeyPressEventArgs): void; + select? (e: AutocompleteSelectEventArgs): void; + change? (e: AutocompleteChangeEventArgs): void; + focusIn? (e: AutocompleteFocusInEventArgs): void; + focusOut? (e: AutocompleteFocusOutEventArgs): void; + destroy? (e: AutocompleteEventArgs): void; + create? (e: AutocompleteEventArgs): void; +} +interface fieldOptions { + text?: string; + key?: string; +} +interface AutocompleteEventArgs { + cancel: boolean; + model: AutocompleteOptions; + type: string; +} +interface AutocompleteTouchEndEventArgs extends AutocompleteEventArgs { + text: string; + isChecked: boolean; + checkedItemsText: Object; + value: string; +} +interface AutocompleteKeyPressEventArgs extends AutocompleteEventArgs { + value: string; +} +interface AutocompleteSelectEventArgs extends AutocompleteEventArgs { + text: string; + isChecked: boolean; + checkedItemsText: Object; + value: string; +} +interface AutocompleteChangeEventArgs extends AutocompleteEventArgs { + text: string; + isChecked: boolean; + checkedItemsText: Object; + value: string; +} +interface AutocompleteFocusInEventArgs extends AutocompleteEventArgs { + value: string; +} +interface AutocompleteFocusOutEventArgs extends AutocompleteEventArgs { + value: string; +} +export module Autocomplete { + enum FilterType { + StartsWith, + Contains + } + enum Mode { + Search, + Default + } + enum SortOrder { + Ascending, + Descending + } +} +class Button extends ej.Widget { + static fn: Button; + element: JQuery; + constructor(element: JQuery, options?: ButtonOptions); + model: ButtonOptions; + validTags: Array; + defaults: ButtonOptions; + disable(): void; + enable(): void; +} +class Actionlink extends ej.Widget { + static fn: Actionlink; + element: JQuery; + constructor(element: Element, options?: ButtonOptions); + model: Object; + validTags: Array; + defaults: ButtonOptions; + disable(): void; + enable(): void; +} +interface ButtonOptions { + touchStart?(e: ButtonEventArgs): void; + touchEnd?(e: ButtonEventArgs): void; + cssClass?: string; + enabled?: (boolean | string); + inline?: (boolean | string); + renderMode?: (ej.mobile.RenderMode | string); + text?: string; + theme?: (ej.mobile.Theme | string); + imageClass?: string; + imagePosition?: (ej.mobile.Button.ImagePosition | string); + contentType?: (ej.mobile.Button.ContentType | string); + ios7?: ios7ButtonOptions; + android?: androidButtonOption; + windows?: windowsButtonOptions; + flat?: flatButtonOption; +} +interface ButtonEventArgs { + element: Object; + text: string; +} +interface ios7ButtonOptions { + style?: (ej.mobile.Button.IOS7.Style | string); + color?: (ej.mobile.Button.IOS7.Color | string); +} +interface androidButtonOption { + style?: (ej.mobile.Button.Android.Style | string); +} +interface windowsButtonOptions extends windowsOption { + style?: (ej.mobile.Button.Windows.Style | string); +} +interface flatButtonOption { + style?: (ej.mobile.Button.Flat.Style | string); +} +export module Button{ +export module IOS7{ + enum Style{ + Normal, + Back, + Header, + Dialog + } + enum Color{ + Gray, + Black, + Blue, + Green, + Red + } + } +export module Android{ + enum Style{ + Normal, + Small, + Dialog + } + +} +export module Windows{ + enum Style{ + Normal, + Back + } +} +export module Flat{ + enum Style{ + Normal, + Back, + Header + } +} + enum ImagePosition{ + Left, + Right + } + enum ContentType{ + Text, + Image, + Both + } +} +class DatePicker extends ej.Widget { + static fn: DatePicker; + static Locale:any; + element: JQuery; + constructor(element: JQuery, options?: DatePickerOptions); + model: DatePickerOptions; + defaults: DatePickerOptions; + disable(): void; + enable(): void; + hide(): void; + show(): void; + setCurrentDate(date:string): void; + getValue(): string; + destroy(): void; +} + +//ejmDatePicker Options +interface DatePickerOptions { + cssClass?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + culture?: string; + dateFormat?: string; + value?: string; + enabled?: boolean; + enablePersistence?: boolean; + ios7?: ios7Option; + windows?: windowsOption; + maxDate?: string; + minDate?: string; + load? (e: DatePickerEventArgs): void; + select? (e: DatePickerEventArgs): void; + focusIn? (e: DatePickerEventArgs): void; + focusOut? (e: DatePickerEventArgs): void; + open? (e: DatePickerEventArgs): void; + close? (e: DatePickerEventArgs): void; + change? (e: DatePickerEventArgs): void; + destroy? (e: DatePickerArgs): void; + create? (e: DatePickerArgs): void; +} + +interface DatePickerArgs { + type: string; + model: DatePickerOptions; + value: string; +} +//ejmDatePickerEvent Arugument +interface DatePickerEventArgs extends DatePickerArgs { + cancel: boolean; + +} + +interface ios7Option { + renderDefault: boolean; +} + + +//Class ejmDropDownList +class DropDownList extends ej.Widget { + static fn: DropDownList; + constructor(element: JQuery, options?: DropDownListOptions); + model: DropDownListOptions; + defaults: DropDownListOptions; + show(): void; + hide(): void; + getValue():string; + selectItemByIndex(index:(number|string)): void; + unselectItemByIndex(index:(number|string)): void; + selectItemByIndices(indices:Array): void; + unselectItemByIndices(indices: Array): void; + destroy(): void; + getSelectedItemsValue(): Array; + getSelectedItemValue(): string; +} + +//ejmDropDownList WindowsOption +interface windowsDropDownListOption extends windowsOption { + type?: ej.mobile.DropDownList.WindowsType; +} + +interface androidDropDownListOption { + popUpHeight?: number|string; +} + +interface fieldsDropDownListOption { + text?: string; + groupBy?: string; + imageClass?: string; + imageUrl?: string; + checkBy?: string; + enableTemplate?: string; + templateID?: string; + value?: string; +} + +//ejmDropDownList Option +interface DropDownListOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + readOnly?: boolean; + targetID?: string; + selectedItemIndex?: number|string; + dataSource?: any; + fields?: fieldsDropDownListOption; + query?: string; + allowVirtualScrolling?: boolean; + virtualScrollMode?: ej.mobile.DropDownList.VirtualScrollingMode; + itemRequestCount?: number|string; + enabled?: boolean; + enableMultiSelect?: boolean; + delimiterChar?: string; + enableGrouping?: boolean; + mode?: ej.mobile.DropDownList.Mode; + enableTemplate?: boolean; + enablePersistence?: boolean; + windows?: windowsDropDownListOption; + android?: androidDropDownListOption; + items?: Array; + focusIn? (e: DropDownArgs): void; + focusOut? (e: DropDownArgs): void; + select? (e: DropDownSelectArgs): void; + change? (e: DropDownSelectArgs): void; + checkChange? (e: DropDownListEventArgs): void; +} + +interface DropDownArgs { + cancel: boolean; + type: string; + model: DropDownListOptions; +} +//ejmDropDownListEvent Arugument +interface DropDownListEventArgs extends DropDownArgs { + checked: boolean; +} + +interface DropDownSelectArgs extends DropDownArgs { + selectedText: string; + value: string; + selectedItem: Object; +} + +export module DropDownList{ + enum VirtualScrollingMode{ + Continuous, + Normal + } + enum WindowsType{ + ComboBox, + List + } + enum Mode { + Normal, + Native + } +} + +class Numeric extends ej.Widget { + static fn: Numeric; + element: JQuery; + constructor(element: JQuery, options?: EditorOptions); + model: EditorOptions; + ValidTags: Array; + defaults: EditorOptions; + disable(): void; + enable(): void; + getValue(): any; + setValue(value:number): void; + +} + +interface EditorOptions { + cssClass?: string; + enableStrictMode?: boolean; + enabled?: boolean; + showBorder?: boolean; + showSpinButton?: boolean; + incrementStep?: number; + maxValue?: number; + minValue?: number; + name?: string; + enablePersistence?: boolean; + readOnly?: boolean; + renderMode?: ej.mobile.RenderMode; + decimalPlaces?: number; + theme?: ej.mobile.Theme; + value?: number; + watermarkText?: string; + windows?: windowsOption; + change? (e: EditorEventArgs): void; + focusIn? (e: EditorEventArgs): void; + focusOut? (e: EditorEventArgs): void; + destroy?(e:EditorBaseArgs):void; + create?(e:EditorBaseArgs):void; +} + +interface EditorBaseArgs{ + cancel: boolean; + type: string; + model: EditorOptions; +} + +interface EditorEventArgs extends EditorBaseArgs { + value: number; + element: Object; +} + + +class Grid extends ej.Widget { + static fn: Grid; + element: JQuery; + constructor(element: JQuery, options?: GridOptions); + model: GridOptions; + validTags: Array; + defaults: GridOptions; + disable(): void; + enable(): void; + destroy(): void; + getColumnByField(field:string): void; + getColumnByHeaderText(headerText:string): void; + getColumnByIndex(index:number): void; + getColumnFieldNames(): void; + getColumnIndexByField(field:string): void; + getColumnMemberByIndex(colIdx:number): void; + hideColumns(col:string): void; + refreshContent(requestType:string): void; + showColumns(col:string): void; +} +interface GridOptions { + cssClass?: string; + allowPaging?: boolean; + allowSorting?: boolean; + allowFiltering?: boolean; + allowScrolling?: boolean; + allowSelection?: boolean; + dataSource: any; + caption?: string; + enablePersistence?: boolean; + selectedRowIndex?: number; + showCaption?: boolean; + allowColumnSelector?: boolean; + transition?: string; + columns?: Array; + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + rowSelecting? (e: GridEventArgs): void; + rowSelected? (e: GridEventArgs): void; + actionBegin? (e: GridEventArgs): void; + actionComplete? (e: GridEventArgs): void; + actionSuccess? (e: GridEventArgs): void; + actionFailure? (e: GridEventArgs): void; + queryCellInfo? (e: GridEventArgs): void; + rowDataBound? (e: GridEventArgs): void; + modelChange? (e: GridEventArgs): void; + load? (e: GridEventArgs): void; + pageSettings?: PageSettings; + scrollSettings?: ScrollSettings; + sortSettings?: SortSettings; + filterSettings?: FilterSettings; +} + +interface PageSettings { + pageSize?: number; + currentPage?: number; + display?: ej.mobile.Grid.PagerDisplay; + type?: ej.mobile.Grid.PagerType; + totalRecordsCount?: number; +} +interface ScrollSettings { + enableColumnScrolling?: boolean; + height?: any; + width?: any; + enableRowScrolling?: boolean; + enableNativeScrolling?: boolean; +} +interface SortSettings { + allowMultiSorting?: boolean; + sortedColumns?: Array; +} +interface FilterSettings { + isCaseSensitive?: boolean; + filterBarMode?: ej.mobile.Grid.FilterBarMode; + interval?: number; + filteredColumns?: Array; +} + +//ejmGridEvent Arugument +interface GridEventArgs { + cancel: boolean; + type: string; + model: GridOptions; +} + +export module Grid +{ +enum PagerDisplay +{ +Normal, +Fixed +} + +enum PagerType +{ +Normal, +Scrollable +} + +enum FilterBarMode +{ +Immediate, +OnEnter +} +enum Actions +{ +Paging, +Sorting, +Filtering, +Refresh +} +} +class Header extends ej.Widget { + static fn: Header; + element: JQuery; + constructor(element: JQuery, options?: HeaderOptions); + model: HeaderOptions; + defaults: HeaderOptions; + getTitle(): string; + destroy(): void; +} + +interface HeaderOptions { + hideForUnSupportedDevice?: boolean; + leftButtonNavigationUrl?: string; + leftButtonImageClass: string; + leftButtonImageUrl: string; + rightButtonNavigationUrl?: string; + rightButtonImageClass?:string; + rightButtonImageUrl?:string; + cssClass?: string; + title?: string; + showTitle?: boolean; + position?: ej.mobile.Header.Position; + leftButtonCaption?: string; + rightButtonCaption?: string; + leftButtonStyle?:ej.mobile.Header.HeaderLeftButtonStyle; + rightButtonStyle?:ej.mobile.Header.HeaderRightButtonStyle; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + showLeftButton?: boolean; + showRightButton?: boolean; + enablePersistence?:boolean; + templateId?: string; + ios7?: Headerios7Options; + flat?: HeaderFlatOptions; + windows?: HeaderWindowsOptions; + android?: HeaderAndroidOptions; + leftButtonTap? (e: HeaderLeftButtonTapEventArgs): void; + rightButtonTap? (e: HeaderRightButtonTapEventArgs): void; + destroy?(e:HeaderBaseArgs):void; + create?(e:HeaderBaseArgs):void; +} +interface HeaderWindowsOptions extends windowsOption { + enableCustomText?: boolean; + renderDefault?: boolean; + rightButtonStyle?: ej.mobile.Header.Windows.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.Windows.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface HeaderAndroidOptions { + backButtonImageClass?: string; + rightButtonStyle?: ej.mobile.Header.Android.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.Android.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface Headerios7Options { + rightButtonStyle?: ej.mobile.Header.IOS7.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.IOS7.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface HeaderFlatOptions { + rightButtonStyle?: ej.mobile.Header.Flat.HeaderRightButtonStyle; + leftButtonStyle?: ej.mobile.Header.Flat.HeaderLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} + +interface HeaderBaseArgs{ + cancel: boolean; + type: string; + model: FooterOptions; +} +interface HeaderLeftButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} +interface HeaderRightButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} + +export module Header +{ +enum Position +{ + Normal, + Fixed +} +enum HeaderLeftButtonStyle +{ + Back, + Header, + Normal + +} +enum HeaderRightButtonStyle +{ + Header, + Normal +} + +export module IOS7 +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Header, + Normal +} +enum HeaderRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Flat +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum HeaderRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Android +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum HeaderRightButtonStyle +{ + Auto, + Normal, + Header +} +} + +export module Windows +{ +enum HeaderLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum HeaderRightButtonStyle +{ + Auto, + Normal, + Header +} +} +} + + + +/* ListView - Start*/ +interface ajaxSettingsOptions { + type?: string; + cache?: boolean; + async?: boolean; + dataType?: string; + contentType?: string; + url?: string; + data?: Array; +} +//Class ejmListView +class ListView extends ej.Widget { + static fn: ListView; + constructor(element: JQuery, options?: ListViewOptions); + model: ListViewOptions; + defaults: ListViewOptions; + addItem(list?:Object, index?:number,groupid?:any): void; + checkAllItem(): void; + checkItem(index:number,childId?:any): void; + deActive(index:number,childId?:any): void; + disableItem(index:number,childId?:any): void; + enableItem(index:number,childId?:any): void; + getActiveItem(): void; + getActiveItemText(): void; + getCheckedItems(): void; + getCheckedItemsText(): void; + getItemsCount(): void; + getItemText(index:number,childId?:any): void; + hasChild(index:number,childId?:any): boolean; + hide(): void; + hideItem(index:number,childId?:any): void; + isChecked(index:number,childId?:any): boolean; + loadAjaxContent(): void; + removeCheckMark(index:number,childId?:any): void; + removeItem(index:number,childId?:any): void; + selectItem(index:number,childId?:any): void; + setActive(index:number,childId?:any): void; + show(): void; + showItem(index:number,childId?:any): void; + unCheckAllItem(): void; + unCheckItem(index: number, childId?: any): void; + clear(): void; + append(data: Object): void; + getActiveItemData(): void; + getSelectedItemValue(): void; + getSelectedItemsValue(): void; + destroy(): void; +} +//ejmListView IOS7Option +interface Ios7Option { + inline?: boolean; +} +//ejmListView IOS7Option +interface windowsListViewOption extends windowsOption { + preventSkew?: boolean; + enableHeaderCustomText?: boolean; +} + +//ejmListView Option +interface ListViewOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + enablePullToRefresh?: boolean; + refreshThreshold?: number; + pullToRefreshSettings?: pullToRefreshSettings; + mode?: ej.mobile.ListView.Mode + cssClass?: string; + ios7?: Ios7Option; + windows?: windowsListViewOption; + adjustFixedPosition?: boolean; + ajaxSettings?: ajaxSettingsOptions; + enableCache?: boolean; + allowScrolling?: boolean; + checkDOMChanges?: boolean; + dataBinding?: boolean; + dataSource?: any; + enableAjax?: boolean; + enableCheckMark?: boolean; + enableFiltering?: boolean; + showHeader?: boolean; + showHeaderBackButton?: boolean; + enableNativeScrolling?: boolean; + showScrollbars?: boolean; + fieldSettings?: fieldSettings; + enableGroupList?: boolean; + headerBackButtonText?: string; + hideHeaderForUnSupportedDevice?: boolean; + headerTitle?: string; + height?: number; + persistSelection?: boolean; + preventSelection?: boolean; + query?: string; + renderTemplate?: boolean; + selectedItemIndex?: number; + autoAdjustHeight?: boolean; + autoAdjustScrollHeight?: boolean; + templateId?: string; + transition?: string; + width?: number; + items?: Array; + enablePersistence?: boolean; + create? (e: ListViewBaseEventArgs): void; + destroy? (e: ListViewBaseEventArgs): void; + ajaxComplete? (e: ListViewEventArgs): void; + ajaxError? (e: ListViewEventArgs): void; + ajaxSuccess? (e: ListViewEventArgs): void; + headerBackButtonTap? (e: ListViewEventArgs): void; + load? (e: ListViewBaseEventArgs): void; + loadComplete? (e: ListViewBaseEventArgs): void; + touchEnd? (e: ListViewEventArgs): void; + touchStart? (e: ListViewEventArgs): void; + refreshBegin? (e: ListViewBaseEventArgs): void; + refreshSuccess? (e: ListViewEventArgs): void; + refreshError? (e: ListViewBaseEventArgs): void; + refreshComplete? (e: ListViewBaseEventArgs): void; + ajaxBeforeLoad? (e: ListViewEventArgs): void; +} +interface pullToRefreshSettings{ + pullText?:string; + releaseText?:string; + refreshText?:string; + errorText?:string; + appendData?:boolean; + appendPosition?:ej.mobile.ListView.AppendPosition; +} +interface fieldSettings{ + navigateUrl?:string; + href?:string; + enableAjax?:string; + preventSelection?:string; + persistSelection?:string; + text?:string; + enableCheckMark?:string; + checked?:string; + primaryKey?:string; + parentPrimaryKey?:string; + imageClass?:string; + imageUrl?:string; + childHeaderTitle?:string; + childId?:string; + childHeaderBackButtonText?:string; + renderTemplate?:string; + templateId?:string; + touchStart?:string; + touchEnd?:string; + attributes?:string; + groupID?:string; + id?:string; + value?: string; +} +//ejmListViewEvent Arugument +interface ListViewBaseEventArgs { + cancel: boolean; + type: string; + model: ListViewOptions; +} +interface ListViewEventArgs extends ListViewBaseEventArgs { + ajaxData?: Object; + data?: Object; + errorData?: Object; + successData?: Object; + text?: string; + element?: Object; + id?: string; + hasChild?: boolean; + currentItem?: string; + currentText?: string; + currentItemIndex?: number; + isChecked?: boolean; + checkedItems?: number; + checkedItemsText?: string; +} +export module ListView{ + enum AppendPosition{ + Bottom, + Top + } + enum Mode { + Page, + Container + } +} + +class Menu extends ej.Widget { + static fn: Menu; + element: JQuery; + constructor(element: JQuery, options?: MenuOptions); + model: MenuOptions; + defaults: MenuOptions; + addItem(menu: any, index: number): void; + disable(): void; + disableItem(index: number): void; + disableOverFlow(): void; + disableOverFlowItem(index: number): void; + enable(): void; + enableItem(index: number): void; + enableOverFlow(): void; + enableOverFlowItem(index: number): void; + hide(): void; + removeItem(index: number): void; + show(e: any, existing?: boolean): void; + destroy(): void; +} +//ejmMenu Option +interface MenuOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + allowScrolling?: boolean; + showScrollbars?: boolean; + height?: (number|string); + renderTemplate?: boolean; + showOn?: ej.mobile.Menu.ShowOn; + targetId?: string; + target?: any; + enablePersistence?: boolean; + templateId?: string; + width?: (number|string); + items?: Array; + android?: AndroidOptions; + ios7?: Ios7Options; + windows?: WindowsOptions; + hide? (e: MenuEvent): void; + load? (e: MenuEvent): void; + loadComplete? (e: MenuEvent): void; + show? (e: MenuEvent): void; + touchStart? (e: MenuTouchEventArgs): void; + touchEnd? (e: MenuTouchEventArgs): void; + create? (e: MenuEvent): void; + destroy? (e: MenuEvent): void; +} +//ejmMenu IOS7 Option +interface Ios7Options { + cancelButtonColor?: ej.mobile.Menu.IOS7.CancelButtonColor; + cancelButtonText?: string; + cancelButtonTouchEnd? (e: MenuCancelButtonTouchEndEventArgs): void; + type?: ej.mobile.Menu.IOS7.Type; + title?: string; + showTitle?: boolean; + showCancelButton?: boolean; +} + +//ejmMenu Android Option +interface AndroidOptions { + type?: ej.mobile.Menu.Android.Type; +} +interface WindowsOptions { + type?: ej.mobile.Menu.Windows.Type; + renderDefault?: boolean; +} +//ejmMenu Event Arugument +interface MenuEvent { + cancel: boolean; + type: string; + model: MenuOptions; +} +interface MenuTouchEventArgs { + item: Object; + text: string; +} +interface MenuCancelButtonTouchEndEventArgs extends MenuEvent { + item: Object; + text: string; +} + +export module Menu { + export module IOS7 { + enum Type { + Auto, + Animate, + Normal + } + enum CancelButtonColor { + Blue, + Gray, + Black, + Green, + Red + } + } + + export module Android { + enum Type { + Contextual, + Popup, + OptionsList, + OptionsMenu + } + } + export module Windows { + enum Type { + Contextual, + Popup + } + } + enum ShowOn { + Tap, + TapHold + } +} + + + +//Class ejmProgress +class Progress extends ej.Widget { + static fn: Progress; + element: JQuery; + constructor(element: JQuery, options?: ProgressOptions); + model: ProgressOptions; + defaults: ProgressOptions; + getValue(): number; + getPercentage(): number; + setCustomText(text: string): void; + destroy(): void; +} + +//ejmProgressbar Option +interface ProgressOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + enableCustomText?: boolean; + enabled?: boolean; + height?: number; + incrementStep?: number; + maxValue?: number; + minValue?: number; + orientation?: ej.mobile.Progress.Orientation; + percentage?: number; + enablePersistence?: boolean; + text?: string; + value?: number; + width?: number; + create? (e: ProgressEvent): void; + destroy? (e: ProgressEvent): void; + start? (e: ProgressStartEventArgs): void; + change? (e: ProgressChangeEvent): void; + complete? (e: ProgressCompleteEvent): void; +} +//ejmProgressbarEvent Arugument +interface ProgressEvent { + cancel: boolean; + type: string; + model: ProgressOptions; +} +interface ProgressStartEventArgs extends ProgressEvent { + value: number; + percentage: number; +} +interface ProgressChangeEvent extends ProgressEvent { + value: number; + element: Object; + text: string; + percentage: number; +} +interface ProgressCompleteEvent extends ProgressEvent { + value: number; + text: string; + percentage: number; +} +export module Progress { + enum Orientation { + Horizontal, + Vertical + } +} + +//Class ejmRadioButton +class RadioButton extends ej.Widget { + static fn: RadioButton; + element: JQuery; + constructor(element: JQuery, options?: RadioButtonOptions); + model: RadioButtonOptions; + defaults: RadioButtonOptions; + destroy(): void; + enable(): void; + disable(): void; +} + +//ejmRadioButton Options +interface RadioButtonOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + checked?: boolean; + text?: string; + enabled?: boolean; + enablePersistence?: boolean; + create? (e: RadioButtonBaseEventArgs): void; + destroy? (e: RadioButtonBaseEventArgs): void; + touchStart? (e: RadioButtonEventArgs): void; + touchEnd? (e: RadioButtonEventArgs): void; + change? (e: RadioButtonEventArgs): void; +} +//ejmRadioButtonEvent Arugument +interface RadioButtonBaseEventArgs { + model: RadioButtonOptions; + cancel: boolean; + type: string; +} +interface RadioButtonEventArgs extends RadioButtonBaseEventArgs { + value: string; + isChecked: boolean; +} + class Rating extends ej.Widget { + static fn: Rating; + element: JQuery; + constructor(element?: JQuery, options?: RatingOptions); + model: RatingOptions; + defaults: RatingOptions; + show(): void; + hide(): void; + getValue(): void + reset(): void; + enable(): void; + disable(): void; + setValue(value: number): void; + destroy(): void; + } + + interface RatingOptions { + maxValue?: number; + minValue?: number; + value?: number; + incrementStep?: number; + precision?: ej.mobile.Rating.Precision; + enabled?: boolean; + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + shape?: ej.mobile.Rating.Shape; + shapeWidth?: number; + shapeHeight?: number; + spaceBetweenShapes?: number; + orientation?: ej.mobile.Rating.Orientation; + readOnly?: boolean; + backgroundColor?: any; + selectionColor?: any; + borderColor?: any; + hoverColor?: any; + enablePersistence?: boolean; + create? (e: RatingBaseEventArgs): void; + destroy? (e: RatingBaseEventArgs): void; + tap? (e: RatingEventArgs): void; + change? (e: RatingEventArgs): void; + touchMove? (e: RatingEventArgs): void; + } + interface RatingBaseEventArgs { + cancel: boolean; + type: string; + model: RatingOptions; + } + interface RatingEventArgs extends RatingBaseEventArgs { + value: number; + } +export module Rating{ + enum Precision{ + Full, + Exact, + Half + } + enum Shape{ + Star, + Circle, + Diamond, + Heart, + Pentagon, + Square, + Triangle + } + enum Orientation{ + Horizontal, + Vertical + } + +} + class Rotator extends ej.Widget { + static fn: Rotator; + element: JQuery; + constructor(element: JQuery, options?: RotatorOptions); + model: RotatorOptions; + validTags: Array; + defaults: RotatorOptions; + renderDatasource(data: any): void; + destroy(): void; + } + interface RotatorOptions { + create? (e: RotatorBaseEventArgs): void; + destroy? (e: RotatorBaseEventArgs): void; + swipeLeft? (e: RotatorEventArgs): void; + swipeRight? (e: RotatorEventArgs): void; + swipeUp? (e: RotatorEventArgs): void; + swipeDown? (e: RotatorEventArgs): void; + change? (e: RotatorEventArgs): void; + pagerSelect? (e: RotatorEventArgs): void; + adjustFixedPosition?: boolean; + targetId?: string; + cssClass?:string; + windows?:windowsOption; + items?:Array; + renderMode?: ej.mobile.RenderMode; + targetHeight?: (number|string); + targetWidth?: (number|string); + enablePersistence?:boolean; + theme?: ej.mobile.Theme; + currentItemIndex?: number; + showPager?: boolean; + showHeader?: boolean; + headerTitle?: string; + dataBinding?: boolean; + dataSource?: any; + orientation?: ej.mobile.Rotator.Orientation; + pagerPosition?: PagerPosition; + } + interface PagerPosition { + horizontal?: ej.mobile.Rotator.PagerPositionHorizontal; + vertical?: ej.mobile.Rotator.PagerPositionVertical; + } + interface RotatorBaseEventArgs { + cancel: boolean; + model: RotatorOptions; + type: string; + } + interface RotatorEventArgs extends RotatorBaseEventArgs { + targetElement: Object; + element: number; + } +export module Rotator{ + enum Orientation{ + Horizontal, + Vertical + } + enum PagerPositionHorizontal{ + Bottom, + Top, + } + enum PagerPositionVertical{ + Right, + Left + } + +} + class Slider extends ej.Widget { + static fn: Slider; + element: JQuery; + constructor(element: JQuery, options?: SliderOptions); + model: SliderOptions; + defaults: SliderOptions; + getValue(): void; + dispose(): void; + destroy(): void; + } + //ejmSlider Option + interface SliderOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + minValue?: number; + maxValue?: number; + value?: number; + values?: Array; + orientation?: ej.mobile.Slider.Orientation; + enableRange?: boolean; + readOnly?: boolean; + incrementStep?: number; + enablePersistence?: boolean; + enabled?: boolean; + enableAnimation?: boolean; + animationSpeed?: number; + ios7?: Ios7Option; + windows?: windowsOption; + create? (e: SliderBaseEventArgs): void; + destroy? (e: SliderBaseEventArgs): void; + touchStart? (e: SliderEventArgs): void; + touchEnd? (e: SliderEventArgs): void; + load? (e: SliderEventArgs): void; + change? (e: SliderEventArgs): void; + slide? (e: SliderEventArgs): void; + } + + //ejmSlider IOS7 Option + interface Ios7Option { + thumbStyle?: ej.mobile.Slider.ThumbStyle; + } + //ejmSlider Slide Event Arugument + interface SliderBaseEventArgs { + cancel: boolean; + model: SliderOptions; + type: string; + } + interface SliderEventArgs extends SliderBaseEventArgs { + value?: number; + values?: Array; + } +export module Slider{ + enum Orientation{ + Horizontal, + Vertical + } + enum ThumbStyle{ + Normal, + Small + + } + +} +class Tab extends ej.Widget { + static fn: Tab; + constructor(element: JQuery, options?: TabOptions); + model:TabOptions; + defaults: TabOptions; + showBadge(index: (number|string)): void; + hideBadge(index: (number|string)): void; + updateBadgeValue(index: (number|string), value: (number|string)): void; + selectItem(index?: (number|string)): void; + enableItem(index?: (number|string)): void; + disableItem(index?: (number|string)): void; + enableContent(index?: (number|string)): void; + disableContent(index?: (number|string)): void; + addItem(tab: Object, index: (number|string)): void; + addOverflowItem(tab: Object, index: (number|string)): void; + removeItem(index: (number|string)): void; + removeOverflowItem(index: (number|string)): void; + getItemsCount(): number; + getOverflowItemCount(): number; + getActiveItemText(): string; + getActiveItem(): Object; + destroy(): void; +} + +interface TabOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + allowScrolling?: boolean; + enableNativeScrolling?: boolean; + showScrollbars?: boolean; + enableAjax?: boolean; + showAjaxPopup?: boolean; + badge?: badgeTabOptions; + ios7?: ios7TabOptions; + enableCache?: boolean; + selectedItemIndex?: (number|string); + enabled?: boolean; + enablePersistence?: boolean; + prefetchAjaxContent?: boolean; + items?: Array; + overflowBadge?: overflowBadgeTabOptions; + android?: androidTabOptions; + windows?: windowsTabOptions; + flat?: flatTabOptions; + ajaxSettings?: ajaxSettingsTabOptions; + prefetchContentLoaded? (e: TabPrefetchEventArgs): void; + load? (e: TabEventArgs): void; + loadComplete? (e: TabLoadCompleteEventArgs): void; + touchStart? (e: TabEventArgs): void; + touchEnd? (e: TabEventArgs): void; + ajaxSuccess? (e: TabAjaxLoadSuccessEventArgs): void; + ajaxError? (e: TabAjaxLoadErrorEventArgs): void; + ajaxComplete? (e: TabEventArgs): void; + create? (e: TabEventArgs): void; + destroy? (e: TabEventArgs): void; + ajaxBeforeLoad? (e: TabAjaxBeforeLoadEventArgs): void; +} + +interface TabItemOptions { + text?: string; + href?: string; + enableAjax?: boolean; + badge?: badgeTabOptions; + touchStart? (e: TabEventArgs): void; + touchEnd? (e: TabEventArgs): void; + ios7?: ios7TabOptions; + android?: ios7TabOptions; +} + +interface TabEventArgs { + cancel: boolean; + type: string; + model: TabOptions; +} +interface TabAjaxBeforeLoadEventArgs extends TabEventArgs { + content?: any; + item?: any; + index?: number; + text?: string; + url?: string; +} +interface TabLoadCompleteEventArgs extends TabEventArgs { + element: Object; + id: string; +} +interface TabPrefetchEventArgs extends TabEventArgs { + item: Object; + content: string; + text: string; + url: string; + index: number; +} +interface TabAjaxLoadSuccessEventArgs extends TabEventArgs { + element: Object; + currentContent: string; +} + +interface TabAjaxLoadErrorEventArgs extends TabEventArgs { + status: boolean; + error: string; +} +interface badgeTabOptions { + enabled?: boolean; + value?: (number|string); + maxValue?: (number|string); + minValue?: (number|string); +} +interface ios7TabOptions { + imageClass?: string; +} +interface overflowBadgeTabOptions { + enabled?: boolean; + value?: (number|string); + maxValue?: (number|string); + minValue?: (number|string); +} +interface androidTabOptions { + contentType?: ej.mobile.Tab.Android.ContentType; + imageClass?: string; + position?: ej.mobile.Tab.Position; +} +interface windowsTabOptions extends windowsOption { + enableCustomText?: boolean; + position?: ej.mobile.Tab.Position; + enableTouchMove?: boolean; + preventContentSwipe?: boolean; +} +interface flatTabOptions { + position?: ej.mobile.Tab.Position; +} +interface ajaxSettingsTabOptions { + type?: string; + cache?: boolean; + async?: boolean; + dataType?: string; + contentType?: string; + url?: string; + data?: {}; +} + +export module Tab{ +export module Android{ +enum ContentType{ +Text, +Image, +Both +} +} +enum Position{ +Fixed, +Normal +} +} + +class Tile extends ej.Widget { + static fn: Tile; + constructor(element: JQuery, options?: TileOptions); + model: TileOptions; + defaults: TileOptions; + updateTemplate(id: string, index: (number|string)): void; + destroy(): void; +} + +interface TileOptions { + android?: androidTileOptions; + badge?: tileBadgeOptions; + cssClass?: string; + captionTemplateId?: string; + enablePersistence?: boolean; + imageClass?: string; + imagePath?: string; + imagePosition?: ej.mobile.Tile.ImagePosition; + imageTemplateId?: string; + imageUrl?: string; + backgroundColor?: string; + ios7?: ios7TileOptions; + liveTile?: liveTileOptions; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + showText?: boolean; + text?: string; + textAlignment?: ej.mobile.Tile.TextAlignment; + tileSize?: ej.mobile.Tile.TileSize; + width?: (number|string); + height?: (number|string); + touchEnd? (e: tileTouchEventArgs): void; + touchStart? (e: tileTouchEventArgs): void; + create? (e: TileEventArgs): void; + destroy? (e: TileEventArgs): void; +} +interface TileEventArgs { + cancel?: boolean; + model?: TileOptions; + type?: string; +} +interface tileBadgeOptions { + enabled?: boolean; + value?: (number|string); + maxValue?: (number|string); + minValue?: (number|string); + text?: string; +} + +interface liveTileOptions { + enabled?: boolean; + imageClass?: string; + imageTemplateId?: string; + imageUrl?: string[]; + type?: string; + updateInterval?: number; +} + +interface ios7TileOptions { + textPosition?: ej.mobile.Tile.TextPosition; +} + +interface androidTileOptions { + textPosition?: ej.mobile.Tile.TextPosition; +} + +interface tileTouchEventArgs extends TileEventArgs { + text?: string; +} + +export module Tile +{ +enum TextPosition +{ + Inner, + Outer +} +enum TileSize +{ + Medium, + Small, + Large, + Wide +} +enum TextAlignment +{ + + Normal, + Left, + Right, + Center +} +enum ImagePosition +{ + Center, + Top, + Bottom, + Right, + Left, + TopLeft, + TopRight, + BottomRight, + BottomLeft, + Fill +} +} + + +class TimePicker extends ej.Widget { + static fn: TimePicker; + static Locale:any; + constructor(element: JQuery, options?: TimePickerOptions); + model: TimePickerOptions; + defaults: TimePickerOptions; + show(e?:any): void; + hide(e?:any): void; + enable(): void; + disable(): void; + getValue(): string; + setCurrentTime(time: any): void; + destroy(): void; +} +interface TimePickerOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + hourFormat?: ej.mobile.TimePicker.HourFormat; + value?: string; + culture?: string; + timeFormat?: string; + enabled?: boolean; + enablePersistence?:boolean; + ios7?: ios7TimepickerOptions; + windows?: windowsOption; + select? (e: TimepickerEventArgs): void; + load? (e: TimepickerEventArgs): void; + focusIn? (e: TimepickerEventArgs): void; + focusOut? (e: TimepickerEventArgs): void; + open? (e: TimepickerEventArgs): void; + close? (e: TimepickerEventArgs): void; + change? (e: TimepickerEventArgs): void; + create? (e: TimePickerCommonEventArgs): void; + destroy? (e: TimePickerCommonEventArgs): void; +} +interface TimePickerCommonEventArgs { + cancel: boolean; + type: string; + model: TimePickerOptions; +} +interface TimepickerEventArgs extends TimePickerCommonEventArgs { + value: string; +} +interface ios7TimepickerOptions { + renderDefault?: boolean; +} + +export module TimePicker{ +enum HourFormat{ + TwentyFour, + Twelve +} +} + +//Class ejmToggleButton +class ToggleButton extends ej.Widget { + static fn: ToggleButton; + constructor(element: JQuery, options?: ToggleButtonOptions); + model: ToggleButtonOptions; + defaults: ToggleButtonOptions; + enable(): void; + disable(): void; + destroy(): void; +} + +//ejmToggleButton Option +interface ToggleButtonOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + animate?: boolean; + toggleState?: boolean; + windows?: windowsOption; + enablePersistence?: boolean; + enabled?: boolean; + change? (e: ToggleButtonEventArgs): void; + touchStart? (e: ToggleButtonEventArgs): void; + touchEnd? (e: ToggleButtonEventArgs): void; + create? (e: ToggleButtonCommonEventArgs): void; + destroy? (e: ToggleButtonCommonEventArgs): void; +} + +interface ToggleButtonCommonEventArgs { + cancel: boolean; + type: string; + model: ToggleButtonOptions; +} +//ToggleButtonEvent Arugument +interface ToggleButtonEventArgs extends ToggleButtonCommonEventArgs { + state: boolean; +} +//Class ejmToolbar +class Toolbar extends ej.Widget { + static fn: Toolbar; + constructor(element: JQuery, options?: ToolbarOptions); + model: ToolbarOptions; + validTags: Array; + defaults: ToolbarOptions; + removeItem(index:number): void; + addItem(newitem:string): void; + showEllipsis(): void; + disableItem(disableIcon:string): void; + enableItem(enableIcon:string): void; + hideItem(iconName:string): void; + hideEllipsis(): void; + showItem(iconName:string): void; + hideMenu(): void; + showMenu(): void; + destroy(): void; +} + +//ejmToolbar Android Options +interface ToolbarAndroidOptions { + title?: string; + titleIconUrl?: string; + showBackNavigator?: boolean; + showTitleIcon?: boolean; + enableSplitView?: boolean; + showEllipsis?: boolean; + position?: ej.mobile.Toolbar.Position; + +} +//ejmToolbar IOS7 Options +interface ToolbarIOS7Options { + position?: ej.mobile.Toolbar.Position; +} +//ejmToolbar Flat Options +interface ToolbarFlatOptions { + position?: ej.mobile.Toolbar.Position; +} +//ejmToolbar Windows Options +interface ToolbarWindowsOptions { + position?: ej.mobile.Toolbar.Position; +} +//ejmToolbar Option +interface ToolbarOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + items?: Array; + enabled?: boolean; + enablePersistence?:boolean; + hide?: boolean; + position?: ej.mobile.Toolbar.Position; + android?: ToolbarAndroidOptions; + windows?: windowsOption; + ios7?: ToolbarIOS7Options; + Flat?: ToolbarFlatOptions; + templateId?: any; + titleIconUrl?: any; + touchStart? (e: ToolbarEventArgs): void; + touchEnd? (e: ToolbarEventArgs): void; + create? (e: ToolbarEventArgs): void; + destroy? (e: ToolbarEventArgs): void; + +} +interface ToolbarItems{ + iconName?: ej.mobile.Toolbar.IconName; + iconUrl?: string; +} +//ejmToolbarEvent Arugument +interface ToolbarEventArgs { + cancel: boolean; + type: string; + model: ToolbarOptions; +} + +export module Toolbar{ + enum Position{ + Normal, + Fixed + } + enum IconName{ + Add, + Back, + Bookmark, + Close, + Compose, + Copy, + Cut, + Delete, + Done, + Edit, + Mail, + Next, + Refresh, + Overflow, + Paste, + Reply, + Save, + Search, + Settings, + Share + } +} +/*Group button*/ +class GroupButton extends ej.Widget { + static fn: GroupButton; + element: JQuery; + constructor(element?: JQuery, options?: GroupButtonOptions); + model: GroupButtonOptions; + defaults: GroupButtonOptions; + destroy(): void; + //add public functions +} +interface GroupButtonOptions { + selectedItemIndex?: (number|string); + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + enablePersistence?: boolean; + items?: Array; + windows?: windowsOption; + touchStart? (e: GroupButtonEventArgs): void; + touchEnd? (e: GroupButtonEventArgs): void; + destroy? (e: GroupButtonEventArgs): void; + create? (e: GroupButtonEventArgs): void; +} +interface GroupButtonItemsOptions { + text?: string; + type?: string; + imageClass?: string; + imageUrl?: string; +} +interface GroupButtonEventArgs { + cancel: boolean; + type: string; + model: GroupButtonOptions; +} +/* SplitPane */ +class SplitPane extends ej.Widget { + static fn: SplitPane; + constructor(element: JQuery, options?: SplitPaneOptions); + model:SplitPaneOptions; + defaults: SplitPaneOptions; + loadContent(toPage: string, options?: any): void; + transferPage(toPage: any, options: any, existing: any, newPage: any): void; + refreshRightScroller(): void; + refreshLeftScroller(): void; + destroy(): void; +} +interface SplitPaneOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + allowLeftPaneScrolling?: boolean; + allowRightPaneScrolling?: boolean; + android?: SplitPaneAndroidOptions; + windows?: SplitPaneWindowsOptions; + ios7?: SplitPaneIOS7Options; + flat?: SplitPaneFlatOptions; + enablePersistence?: boolean; + enableSwipe?: boolean; + overlayLeftPane?: boolean; + overlayDirection?: ej.mobile.SplitPane.OverlayDirection; + leftPaneScrollSettings?: Object; + rightPaneScrollSettings?: Object; + leftHeaderSettings?: Object; + rightHeaderSettings?: Object; + toolbarSettings?: Object; + create? (e: SplitPaneBaseEventArgs): void; + destroy? (e: SplitPaneBaseEventArgs): void; + beforeTransfer? (e: SplitPaneEventArgs): void; + afterLoadSuccess? (e: SplitPaneEventArgs): void; +} +interface SplitPaneBaseEventArgs { + cancel: boolean; + type: string; + model: SplitPaneOptions; +} +interface SplitPaneEventArgs extends SplitPaneBaseEventArgs { + element: Object; + toPage: Object; + leftPaneheader: Object; + rightPaneheader: Object; + toolbar: Object; +} +interface SplitPaneAndroidOptions { + showToolbar?: boolean; +} +interface SplitPaneWindowsOptions { + showLeftPaneHeader?: boolean; + showRightPaneHeader?: boolean; +} +interface SplitPaneIOS7Options { + showLeftPaneHeader?: boolean; + showRightPaneHeader?: boolean; +} +interface SplitPaneFlatOptions { + showLeftPaneHeader?: boolean; + showRightPaneHeader?: boolean; +} + +export module SplitPane{ +enum OverlayDirection{ +Left, +Right +} +} + +class Dialog extends ej.Widget { + static fn: Dialog; + element: JQuery; + constructor(element: JQuery, options?: DialogOptions); + model: DialogOptions; + defaults: DialogOptions; + open(): void; + close(): void; + isOpened(): boolean; + destroy(): void; +} +interface DialogOptions { + cssClass?: string; + enableAutoOpen?: boolean; + title?: string; + beforeClose? (e: DialogBeforeClose): void; + open? (e: DialogOpen): void; + close? (e: DialogClose): void; + buttonTap? (e: DialogButtonTap): void; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + enableModal?: boolean; + showButtons?: boolean; + allowScrolling?: boolean; + enableNativeScrolling?: boolean; + mode?: ej.mobile.Dialog.Mode; + leftButtonCaption?: string; + rightButtonCaption?: string; + checkDOMChanges?: boolean; + templateId?: string; + targetHeight?: string|number; + enablePersistence?: boolean; + enableAnimation?: boolean; + windows?: windowsOption; + destroy? (e: DialogEventArgs): void; + create? (e: DialogEventArgs): void; +} +interface DialogEventArgs { + cancel: boolean; + type: string; + model: DialogOptions; +} +interface DialogBeforeClose extends DialogEventArgs{ + title: string; +} +interface DialogOpen extends DialogEventArgs { + element: Object; + title: string; +} +interface DialogClose extends DialogEventArgs { + title: string; + element: Object; +} +interface DialogButtonTap extends DialogEventArgs { + text: string; +} + +export module Dialog{ +enum Mode{ + Alert, + Confirm, + Normal, + FullView +} +} + +class TextboxCommon extends ej.Widget { + model: TextBoxOptions; + disable(): void; + enable(): void; + getStrippedValue(): string; + getUnstrippedValue(): string; + getValue(): string; + getWatermarkText(): string; + refresh(): void; + destroy(): void; +} +class TextBox extends TextboxCommon { + static fn: TextBox; + constructor(element: JQuery, options?: TextBoxOptions); + defaults: TextBoxOptions; +} +/* Password */ +class Password extends TextboxCommon { + static fn: Password; + constructor(element: JQuery, options?: TextBoxOptions); + defaults: TextBoxOptions; +} +/* MaskEdit */ +class MaskEdit extends TextboxCommon { + static fn: MaskEdit; + constructor(element: JQuery, options?: MaskEditOptions); + defaults: MaskEditOptions; + +} +/* TextArea */ +class TextArea extends TextboxCommon { + static fn: TextArea; + constructor(element: JQuery, options?: TextBoxOptions); + defaults: TextBoxOptions; + +} +interface TextBoxOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + cssClass?: string; + showBorder?: boolean; + windows?: WindowsTextBoxOptions; + value?: string; + watermarkText?: string; + change? (e: TextBoxChangeEventArgs): void; + create? (e: TextBoxEventArgs): void; + destroy? (e: TextBoxEventArgs): void; + enabled?: boolean; + enablePersistence?: boolean; + readOnly?: boolean; +} +interface TextBoxEventArgs { + cancel: boolean; + type: string; + model: TextBoxOptions; +} +interface MaskEditOptions extends TextBoxOptions { + mask?: string; +} +interface WindowsTextBoxOptions extends windowsOption { + allowReset?: boolean; +} +interface TextBoxChangeEventArgs extends TextBoxEventArgs { + element: Object; + value: string; + isChecked: boolean; +} +class Footer extends ej.Widget { + static fn: Footer; + element: JQuery; + constructor(element: JQuery, options?: FooterOptions); + model: FooterOptions; + defaults: FooterOptions; + getTitle(): string; + destroy(): void; + +} + +interface FooterOptions { + hideForUnSupportedDevice?: boolean; + leftButtonNavigationUrl?: string; + rightButtonNavigationUrl?: string; + title?: string; + cssClass?: string; + showTitle?: boolean; + position?: ej.mobile.Footer.Position; + leftButtonCaption?: string; + rightButtonCaption?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + showLeftButton?: boolean; + showRightButton?: boolean; + enablePersistence?:boolean; + leftButtonStyle?:ej.mobile.Footer.FooterLeftButtonStyle; + rightButtonStyle?:ej.mobile.Footer.FooterRightButtonStyle; + ios7?: Footerios7Options; + flat?: FooterFlatOptions; + android?: FooterAndroidOptions; + templateId?: string; + windows?: FooterWindowsOptions; + leftButtonTap? (e: FooterLeftButtonTapEventArgs): void; + rightButtonTap? (e: FooterRightButtonTapEventArgs): void; + destroy?(e:FooterBaseArgs):void; + create?(e:FooterBaseArgs):void; +} + +interface FooterWindowsOptions extends windowsOption { + renderDefault?: boolean; + rightButtonStyle?: ej.mobile.Footer.Windows.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.Windows.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface Footerios7Options { + rightButtonStyle?: ej.mobile.Footer.IOS7.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.IOS7.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface FooterFlatOptions { + rightButtonStyle?: ej.mobile.Footer.Flat.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.Flat.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} +interface FooterAndroidOptions { + rightButtonStyle?: ej.mobile.Footer.Android.FooterRightButtonStyle; + leftButtonStyle?: ej.mobile.Footer.Android.FooterLeftButtonStyle; + showLeftButton?: boolean; + showRightButton?: boolean; +} + +interface FooterBaseArgs{ + cancel: boolean; + type: string; + model: FooterOptions; +} + +interface FooterLeftButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} +interface FooterRightButtonTapEventArgs { + text: string; + cancel: boolean; + model: Object; + type: string; + status: boolean; +} + +export module Footer{ +export module IOS7 +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Header, + Normal +} +enum FooterRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Flat +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum FooterRightButtonStyle +{ + Auto, + Header, + Normal +} +} + +export module Android +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum FooterRightButtonStyle +{ + Auto, + Normal, + Header +} +} + +export module Windows +{ +enum FooterLeftButtonStyle +{ + Auto, + Back, + Normal, + Header +} +enum FooterRightButtonStyle +{ + Auto, + Normal, + Header +} +} +enum Position{ + Normal, + Fixed +} +enum FooterLeftButtonStyle{ +Back, +Header, +Normal +} +enum FooterRightButtonStyle{ +Header, +Normal +} +} + +class CheckBox extends ej.Widget { + static fn: CheckBox; + constructor(element: JQuery, options?: CheckBoxOptions); + model: CheckBoxOptions; + defaults: CheckBoxOptions; + isChecked(): boolean; + destroy(): void; + +} +interface CheckBoxOptions { + touchStart? (e: CheckBoxTouchStart): void; + touchEnd? (e: CheckBoxTouchEnd): void; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + preventDefault?: boolean; + theme?: ej.mobile.Theme; + enabled?: boolean; + checked?: boolean; + enableTriState?: boolean; + checkState?: ej.mobile.CheckBox.CheckState; + windows?: windowsOption; + enablePersistence?: boolean; + text?: string; + destroy? (e: checkBoxEventArgs): void; + create? (e: checkBoxEventArgs): void; +} +interface checkBoxEventArgs { + cancel: boolean; + type: string; + model: CheckBoxOptions; +} +interface CheckBoxTouchStart extends checkBoxEventArgs{ + element: Object; + value: string; + isChecked: boolean; +} +interface CheckBoxTouchEnd extends checkBoxEventArgs{ + element: Object; + value: string; + isChecked: boolean; +} +export module CheckBox{ + enum CheckState{ + Uncheck, + Check, + Indeterminate + } +} +class ScrollPanel extends ej.Widget { + static fn: ScrollPanel; + constructor(element: JQuery, target: any, options?: ScrollPanelOptions); + model: ScrollPanelOptions; + defaults: ScrollPanelOptions; + refresh(): void; + disable(): void; + enable(): void; + getComputedPosition(): void; + stop(): void; + getScrollPosition(): void; + destroy(): void; + } + interface ScrollPanelOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + enableResize?: boolean; + targetHeight?: number; + targetWidth?: number; + scrollHeight?: number; + scrollWidth?: number; + target: any; + enableFade?: boolean; + enableShrink?: (boolean|string); + autoAdjustHeight?: boolean; + isRelative?: boolean; + wheelSpeed?: number; + enableInteraction?: boolean; + enabled?: boolean; + eventPassthrough?:any; + translateZ?:string; + mode?:ej.mobile.ScrollPanel.Mode; + checkDOMChanges?: boolean; + enableHrScroll?: boolean; + enableVrScroll?: boolean; + zoomMin?: number; + zoomMax?: number; + adjustFixedPosition?: boolean; + startZoom?: number; + startX?: number; + startY?: number; + bounceEasing?:string; + enableDisplacement?:boolean; + displacementValue?:number; + displacementTime?:number; + preventDefaultException?:{tagName?:any} + deceleration?:any; + disablePointer?: boolean; + disableMouse?: boolean; + disableTouch?: boolean; + directionLockThreshold?: number; + momentum?: boolean; + enableBounce?: boolean; + bounceTime?: number; + preventDefault?: boolean; + enableTransform?: boolean; + enableTransition?: boolean; + showScrollbars?: boolean; + enableMouseWheel?: boolean; + enableKeys?: boolean; + enableZoom?: boolean; + enableNativeScrolling?: boolean; + invertWheel?: boolean; + enablePersistence?: boolean; + create? (e: ScrollPanelBaseEventArgs): void; + destroy? (e: ScrollPanelBaseEventArgs): void; + scrollStart? (e: ScrollPanelEventArgs): void; + scroll? (e: ScrollPanelEventArgs): void; + scrollEnd? (e: ScrollPanelEventArgs): void; + zoomStart? (e: ScrollPanelEventArgs): void; + zoomEnd? (e: ScrollPanelEventArgs): void; + } +interface ScrollPanelBaseEventArgs { + cancel: boolean; + type: string; + model: ScrollPanelOptions; +} +interface ScrollPanelEventArgs extends ScrollPanelBaseEventArgs { + x: number; + y: number; + object: Object; +} +export module ScrollPanel{ + enum Mode{ + Page, + Container + } +} +class NavigationDrawer extends ej.Widget { + static fn: NavigationDrawer; + element: JQuery; + constructor(element: JQuery, options?: NavigationDrawerOptions); + model: NavigationDrawerOptions; + defaults: NavigationDrawerOptions; + open(e: any): void; + close(e: any): void; + toggle(e: any): void; + destroy(): void; +} +//ejmNavigationDrawer Option +interface NavigationDrawerOptions { + theme?: ej.mobile.Theme; + renderMode?: ej.mobile.RenderMode; + cssClass?: string; + contentId?: string; + allowScrolling?: boolean; + scrollSettings?: {}; + considerSubPage?: boolean; + direction?: ej.mobile.NavigationDrawer.Direction; + showScrollbars?: boolean; + targetId?: string; + position?: ej.mobile.NavigationDrawer.Position; + enableListView?: boolean; + listViewSettings?: {}; + type?: ej.mobile.NavigationDrawer.Type; + width?: string; + items?: Array; + swipe? (e: NavigationDrawerSwipeEventArgs): void; + open? (e: NavigationDrawerOpenBeforeCloseEventArgs): void; + beforeClose? (e: NavigationDrawerOpenBeforeCloseEventArgs): void; + create? (e: NavigationDrawerEvent): void; + destroy? (e: NavigationDrawerEvent): void; +} + +interface NavigationDrawerEvent { + type: string; + cancel: boolean; + model: NavigationDrawerOptions; +} + +//ejmNavigationDrawer Swipe Event Arugument +interface NavigationDrawerSwipeEventArgs extends NavigationDrawerEvent { + element: Object; + targetElement: Object; + direction: string; +} +//ejmNavigationDrawer Open and BeforeClose Event Arugument +interface NavigationDrawerOpenBeforeCloseEventArgs extends NavigationDrawerEvent { + element: Object; +} + +export module NavigationDrawer { + enum Direction { + Left, + Right + } + enum Position { + Normal, + Fixed + } + enum Type { + Overlay, + Slide + } +} + + +class RadialMenu extends ej.Widget { + static fn: RadialMenu; + constructor(element: JQuery, options?: RadialMenuOptions); + model: RadialMenuOptions; + defaults: RadialMenuOptions; + show(): void; + hide(): void; + menuHide(): void; + hideMenu(): void; + showMenu(): void; + enableItemByIndex(index: number): void; + enableItemsByIndices(itemIndices: Array): void; + disableItemByIndex(itemIndex: number): void; + disableItemsByIndices(itemIndices: Array): void; + updateBadgeValue(index: number, value: number): void; + showBadge(index: number): void; + hideBadge(index: number): void; +} + +interface RadialMenuOptions { + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + radius?: number; + cssClass?: string; + imageClass?: string; + backImageClass?: string; + position?: ej.mobile.RadialMenu.Position; + enableAnimation?: boolean; + windows?: windowsOption; + items?: any; + touch? (e: RadialMenuEventArgs): void; + open? (e: RadialMenuEventArgs): void; + close? (e: RadialMenuEventArgs): void; + select? (e: RadialMenuEventArgs): void; +} +interface RadialMenuEventArgs { + cancel: boolean; + model: RadialMenuOptions; + type: string; + index: number; + childIndex: number; +} +export module RadialMenu{ + enum Position{ + RightCenter, + RightTop, + RightBottom, + LeftCenter, + LeftTop, + LeftBottom + } +} + + +class RadialSlider extends ej.Widget { + static fn: RadialSlider; + constructor(element: JQuery, options?: RadialSliderOptions); + constructor(element: Element, options?: RadialSliderOptions); + model:RadialSliderOptions; + defaults:RadialSliderOptions; + show(): void; + hide(): void; + destroy(): void; +} + +interface RadialSliderOptions { + radius?: number; + endAngle?: number; + startAngle?: number; + ticks?: Array; + enableRoundOff?: boolean; + value?: number|string; + strokeWidth?: number; + autoOpen?: boolean; + enableAnimation?: boolean; + cssClass?: string; + renderMode?: ej.mobile.RenderMode; + theme?: ej.mobile.Theme; + position?: ej.mobile.RadialSlider.Position; + labelSpace?: string|number; + innerCircleImageClass?: string; + innerCircleImageUrl?: string; + showInnerCircle?: boolean; + inline?: boolean; + stop? (e: RadialSliderStopEventArgs): void; + start? (e: RadialSliderStartEventArgs): void; + slide? (e: RadialSliderSlideEventArgs): void; + change? (e: RadialSliderChangeEventArgs): void; + mouseover? (e: RadialSliderMouseOverEventArgs): void; + create? (e: RadialSliderCreateEventArgs): void; + destroy? (e: RadialSliderCreateEventArgs): void; +} +interface RadialSliderCreateEventArgs { + cancel: boolean; + model: RadialSliderOptions; + type: string; +} +interface RadialSliderStopEventArgs extends RadialSliderCreateEventArgs { + value: number; +} + +interface RadialSliderStartEventArgs extends RadialSliderCreateEventArgs { + value: number; +} +interface RadialSliderSlideEventArgs extends RadialSliderCreateEventArgs { + value: number; + selectedValue: number; +} +interface RadialSliderChangeEventArgs extends RadialSliderCreateEventArgs { + value: number; + oldValue: number; +} +interface RadialSliderMouseOverEventArgs extends RadialSliderCreateEventArgs { + value: number; + selectedValue: number; +} +export module RadialSlider { + enum Position { + RightCenter, + RightTop, + RightBottom, + LeftCenter, + LeftTop, + LeftBottom, + TopLeft, + TopRight, + TopCenter, + BottomLeft, + BottomRight, + BottomCenter + } +} +} +declare module ej.datavisualization { + +class LinearGauge extends ej.Widget { + static fn: LinearGauge; + constructor(element: JQuery, options?: LinearGauge.Model); + constructor(element: Element, options?: LinearGauge.Model); + model:LinearGauge.Model; + defaults:LinearGauge.Model; + + /** destroy the linear gauge all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get Bar Distance From Scale in number + * @returns {void} + */ + getBarDistanceFromScale(): void; + + /** To get Bar Pointer Value in number + * @returns {void} + */ + getBarPointerValue(): void; + + /** To get Bar Width in number + * @returns {void} + */ + getBarWidth(): void; + + /** To get CustomLabel Angle in number + * @returns {void} + */ + getCustomLabelAngle(): void; + + /** To get CustomLabel Value in string + * @returns {void} + */ + getCustomLabelValue(): void; + + /** To get Label Angle in number + * @returns {void} + */ + getLabelAngle(): void; + + /** To get LabelPlacement in number + * @returns {void} + */ + getLabelPlacement(): void; + + /** To get LabelStyle in number + * @returns {void} + */ + getLabelStyle(): void; + + /** To get Label XDistance From Scale in number + * @returns {void} + */ + getLabelXDistanceFromScale(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getLabelYDistanceFromScale(): void; + + /** To get Major Interval Value in number + * @returns {void} + */ + getMajorIntervalValue(): void; + + /** To get MarkerStyle in number + * @returns {void} + */ + getMarkerStyle(): void; + + /** To get Maximum Value in number + * @returns {void} + */ + getMaximumValue(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getMinimumValue(): void; + + /** To get Minor Interval Value in number + * @returns {void} + */ + getMinorIntervalValue(): void; + + /** To get Pointer Distance From Scale in number + * @returns {void} + */ + getPointerDistanceFromScale(): void; + + /** To get PointerHeight in number + * @returns {void} + */ + getPointerHeight(): void; + + /** To get Pointer Placement in String + * @returns {void} + */ + getPointerPlacement(): void; + + /** To get PointerValue in number + * @returns {void} + */ + getPointerValue(): void; + + /** To get PointerWidth in number + * @returns {void} + */ + getPointerWidth(): void; + + /** To get Range Border Width in number + * @returns {void} + */ + getRangeBorderWidth(): void; + + /** To get Range Distance From Scale in number + * @returns {void} + */ + getRangeDistanceFromScale(): void; + + /** To get Range End Value in number + * @returns {void} + */ + getRangeEndValue(): void; + + /** To get Range End Width in number + * @returns {void} + */ + getRangeEndWidth(): void; + + /** To get Range Position in number + * @returns {void} + */ + getRangePosition(): void; + + /** To get Range Start Value in number + * @returns {void} + */ + getRangeStartValue(): void; + + /** To get Range Start Width in number + * @returns {void} + */ + getRangeStartWidth(): void; + + /** To get ScaleBarLength in number + * @returns {void} + */ + getScaleBarLength(): void; + + /** To get Scale Bar Size in number + * @returns {void} + */ + getScaleBarSize(): void; + + /** To get Scale Border Width in number + * @returns {void} + */ + getScaleBorderWidth(): void; + + /** To get Scale Direction in number + * @returns {void} + */ + getScaleDirection(): void; + + /** To get Scale Location in object + * @returns {void} + */ + getScaleLocation(): void; + + /** To get Scale Style in string + * @returns {void} + */ + getScaleStyle(): void; + + /** To get Tick Angle in number + * @returns {void} + */ + getTickAngle(): void; + + /** To get Tick Height in number + * @returns {void} + */ + getTickHeight(): void; + + /** To get getTickPlacement in number + * @returns {void} + */ + getTickPlacement(): void; + + /** To get Tick Style in string + * @returns {void} + */ + getTickStyle(): void; + + /** To get Tick Width in number + * @returns {void} + */ + getTickWidth(): void; + + /** To get get Tick XDistance From Scale in number + * @returns {void} + */ + getTickXDistanceFromScale(): void; + + /** To get Tick YDistance From Scale in number + * @returns {void} + */ + getTickYDistanceFromScale(): void; + + /** Specifies the scales. + * @returns {void} + */ + scales(): void; + + /** To set setBarDistanceFromScale + * @returns {void} + */ + setBarDistanceFromScale(): void; + + /** To set setBarPointerValue + * @returns {void} + */ + setBarPointerValue(): void; + + /** To set setBarWidth + * @returns {void} + */ + setBarWidth(): void; + + /** To set setCustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set setCustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set setLabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set setLabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set setLabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set setLabelXDistanceFromScale + * @returns {void} + */ + setLabelXDistanceFromScale(): void; + + /** To set setLabelYDistanceFromScale + * @returns {void} + */ + setLabelYDistanceFromScale(): void; + + /** To set setMajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set setMarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set setMaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set setMinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set setMinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set setPointerDistanceFromScale + * @returns {void} + */ + setPointerDistanceFromScale(): void; + + /** To set PointerHeight + * @returns {void} + */ + setPointerHeight(): void; + + /** To set setPointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set setRangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set setRangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set setRangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set setRangeEndWidth + * @returns {void} + */ + setRangeEndWidth(): void; + + /** To set setRangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set setRangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set setRangeStartWidth + * @returns {void} + */ + setRangeStartWidth(): void; + + /** To set setScaleBarLength + * @returns {void} + */ + setScaleBarLength(): void; + + /** To set setScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set setScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set setScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set setScaleLocation + * @returns {void} + */ + setScaleLocation(): void; + + /** To set setScaleStyle + * @returns {void} + */ + setScaleStyle(): void; + + /** To set setTickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set setTickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set setTickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set setTickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set setTickWidth + * @returns {void} + */ + setTickWidth(): void; + + /** To set setTickXDistanceFromScale + * @returns {void} + */ + setTickXDistanceFromScale(): void; + + /** To set setTickYDistanceFromScale + * @returns {void} + */ + setTickYDistanceFromScale(): void; +} +export module LinearGauge{ + +export interface Model { + + /**Specifies the animationSpeed + * @Default {500} + */ + animationSpeed?: number; + + /**Specifies the backgroundColor for Linear gauge. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor for Linear gauge. + * @Default {null} + */ + borderColor?: string; + + /**Specifies the animate state + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specifies the animate state for marker pointer + * @Default {true} + */ + enableMarkerPointerAnimation?: boolean; + + /**Specifies the can resize state. + * @Default {false} + */ + enableResize?: boolean; + + /**Specify frame of linear gauge + * @Default {null} + */ + frame?: Frame; + + /**Specifies the height of Linear gauge. + * @Default {400} + */ + height?: number; + + /**Specifies the labelColor for Linear gauge. + * @Default {null} + */ + labelColor?: string; + + /**Specifies the maximum value of Linear gauge. + * @Default {100} + */ + maximum?: number; + + /**Specifies the minimum value of Linear gauge. + * @Default {0} + */ + minimum?: number; + + /**Specifies the orientation for Linear gauge. + * @Default {Vertical} + */ + orientation?: string; + + /**Specify labelPosition value of Linear gauge See OuterCustomLabelPosition + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.LinearGauge.OuterCustomLabelPosition|string; + + /**Specifies the pointerGradient1 for Linear gauge. + * @Default {null} + */ + pointerGradient1?: any; + + /**Specifies the pointerGradient2 for Linear gauge. + * @Default {null} + */ + pointerGradient2?: any; + + /**Specifies the read only state. + * @Default {true} + */ + readOnly?: boolean; + + /**Specifies the scales + * @Default {null} + */ + scales?: Scales; + + /**Specifies the theme for Linear gauge. See LinearGauge.Themes + * @Default {flatlight} + */ + theme?: ej.datavisualization.LinearGauge.Themes|string; + + /**Specifies the tick Color for Linear gauge. + * @Default {null} + */ + tickColor?: string; + + /**Specify tooltip options of linear gauge + * @Default {false} + */ + tooltip?: Tooltip; + + /**Specifies the value of the Gauge. + * @Default {0} + */ + value?: number; + + /**Specifies the width of Linear gauge. + * @Default {150} + */ + width?: number; + + /**Triggers while the bar pointer are being drawn on the gauge.*/ + drawBarPointers? (e: DrawBarPointersEventArgs): void; + + /**Triggers while the customLabel are being drawn on the gauge.*/ + drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + + /**Triggers while the Indicator are being drawn on the gauge.*/ + drawIndicators? (e: DrawIndicatorsEventArgs): void; + + /**Triggers while the label are being drawn on the gauge.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Triggers while the marker are being drawn on the gauge.*/ + drawMarkerPointers? (e: DrawMarkerPointersEventArgs): void; + + /**Triggers while the range are being drawn on the gauge.*/ + drawRange? (e: DrawRangeEventArgs): void; + + /**Triggers while the ticks are being drawn on the gauge.*/ + drawTicks? (e: DrawTicksEventArgs): void; + + /**Triggers when the gauge is initialized.*/ + init? (e: InitEventArgs): void; + + /**Triggers while the gauge start to Load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the left mouse button is clicked.*/ + mouseClick? (e: MouseClickEventArgs): void; + + /**Triggers when clicking and dragging the mouse pointer over the gauge pointer.*/ + mouseClickMove? (e: MouseClickMoveEventArgs): void; + + /**Triggers when the mouse click is released.*/ + mouseClickUp? (e: MouseClickUpEventArgs): void; + + /**Triggers while the rendering of the gauge completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface DrawBarPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the current Bar pointer element. + */ + barElement?: any; + + /**returns the index of the bar pointer. + */ + barPointerIndex?: number; + + /**returns the value of the bar pointer. + */ + PointerValue?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawCustomLabelEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the customLabel + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the customLabel style + */ + style?: any; + + /**returns the current customLabel element. + */ + customLabelElement?: any; + + /**returns the index of the customLabel. + */ + customLabelIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawIndicatorsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the Indicator + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the Indicator style + */ + style?: string; + + /**returns the current Indicator element. + */ + IndicatorElement?: any; + + /**returns the index of the Indicator. + */ + IndicatorIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the label + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; + + /**returns the label style + */ + style?: string; + + /**returns the angle of the label. + */ + angle?: number; + + /**returns the current label element. + */ + element?: any; + + /**returns the index of the label. + */ + index?: number; + + /**returns the label value of the label. + */ + value?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawMarkerPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the current marker pointer element. + */ + markerElement?: any; + + /**returns the index of the marker pointer. + */ + markerPointerIndex?: number; + + /**returns the value of the marker pointer. + */ + pointerValue?: number; + + /**returns the angle of the marker pointer. + */ + pointerAngle?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawRangeEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the range + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the range style + */ + style?: string; + + /**returns the current range element. + */ + rangeElement?: any; + + /**returns the index of the range. + */ + rangeIndex?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface DrawTicksEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the ticks + */ + position?: any; + + /**returns the gauge model + */ + Model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the angle of the tick. + */ + angle?: number; + + /**returns the current tick element. + */ + element?: any; + + /**returns the index of the tick. + */ + index?: number; + + /**returns the tick value of the tick. + */ + value?: number; + + /**returns the name of the event + */ + type?: any; +} + +export interface InitEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: any; +} + +export interface MouseClickEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + markerpointerindex?: number; + + /**returns the pointer element. + */ + markerpointerelement?: any; + + /**returns the value of the pointer. + */ + markerpointervalue?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickMoveEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickUpEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element* @param {Object} args.markerpointer returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + markerpointerIndex?: number; + + /**returns the pointer element. + */ + markerpointerElement?: any; + + /**returns the value of the pointer. + */ + markerpointerValue?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: any; +} + +export interface Frame { + + /**Specifies the frame background image url of linear gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the frame InnerWidth + * @Default {8} + */ + innerWidth?: number; + + /**Specifies the frame OuterWidth + * @Default {12} + */ + outerWidth?: number; +} + +export interface ScalesBarPointersBorder { + + /**Specifies the border Color of bar pointer + * @Default {null} + */ + color?: string; + + /**Specifies the border Width of bar pointer + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesBarPointers { + + /**Specifies the backgroundColor of bar pointer + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border of bar pointer + * @Default {null} + */ + border?: ScalesBarPointersBorder; + + /**Specifies the distanceFromScale of bar pointer + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the scaleBar Gradient of bar pointer + * @Default {null} + */ + gradients?: any; + + /**Specifies the opacity of bar pointer + * @Default {1} + */ + opacity?: number; + + /**Specifies the value of bar pointer + * @Default {null} + */ + value?: number; + + /**Specifies the pointer Width of bar pointer + * @Default {width=30} + */ + width?: number; +} + +export interface ScalesBorder { + + /**Specifies the border color of the Scale. + * @Default {null} + */ + color?: string; + + /**Specifies the border width of the Scale. + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesCustomLabelsFont { + + /**Specifies the fontFamily in customLabels + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle in customLabels. See FontStyle + * @Default {Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the font size in customLabels + * @Default {11px} + */ + size?: string; +} + +export interface ScalesCustomLabelsPosition { + + /**Specifies the position x in customLabels + * @Default {0} + */ + x?: number; + + /**Specifies the y in customLabels + * @Default {0} + */ + y?: number; +} + +export interface ScalesCustomLabels { + + /**Specifies the label Color in customLabels + * @Default {null} + */ + color?: number; + + /**Specifies the font in customLabels + * @Default {null} + */ + font?: ScalesCustomLabelsFont; + + /**Specifies the opacity in customLabels + * @Default {0} + */ + opacity?: string; + + /**Specifies the position in customLabels + * @Default {null} + */ + position?: ScalesCustomLabelsPosition; + + /**Specifies the positionType in customLabels.See CustomLabelPositionType + * @Default {null} + */ + positionType?: any; + + /**Specifies the textAngle in customLabels + * @Default {0} + */ + textAngle?: number; + + /**Specifies the label Value in customLabels + */ + value?: string; +} + +export interface ScalesIndicatorsBorder { + + /**Specifies the border Color in bar indicators + * @Default {null} + */ + color?: string; + + /**Specifies the border Width in bar indicators + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesIndicatorsFont { + + /**Specifies the fontFamily of font in bar indicators + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle of font in bar indicators. See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the size of font in bar indicators + * @Default {11px} + */ + size?: string; +} + +export interface ScalesIndicatorsPosition { + + /**Specifies the x position in bar indicators + * @Default {0} + */ + x?: number; + + /**Specifies the y position in bar indicators + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicatorsStateRanges { + + /**Specifies the backgroundColor in bar indicators state ranges + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the borderColor in bar indicators state ranges + * @Default {null} + */ + borderColor?: string; + + /**Specifies the endValue in bar indicators state ranges + * @Default {60} + */ + endValue?: number; + + /**Specifies the startValue in bar indicators state ranges + * @Default {50} + */ + startValue?: number; + + /**Specifies the text in bar indicators state ranges + */ + text?: string; + + /**Specifies the textColor in bar indicators state ranges + * @Default {null} + */ + textColor?: string; +} + +export interface ScalesIndicatorsTextLocation { + + /**Specifies the textLocation position in bar indicators + * @Default {0} + */ + x?: number; + + /**Specifies the Y position in bar indicators + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicators { + + /**Specifies the backgroundColor in bar indicators + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border in bar indicators + * @Default {null} + */ + border?: ScalesIndicatorsBorder; + + /**Specifies the font of bar indicators + * @Default {null} + */ + font?: ScalesIndicatorsFont; + + /**Specifies the indicator Height of bar indicators + * @Default {30} + */ + height?: number; + + /**Specifies the opacity in bar indicators + * @Default {NaN} + */ + opacity?: number; + + /**Specifies the position in bar indicators + * @Default {null} + */ + position?: ScalesIndicatorsPosition; + + /**Specifies the state ranges in bar indicators + * @Default {Array} + */ + stateRanges?: Array; + + /**Specifies the textLocation in bar indicators + * @Default {null} + */ + textLocation?: ScalesIndicatorsTextLocation; + + /**Specifies the indicator Style of font in bar indicators + * @Default {ej.datavisualization.LinearGauge.IndicatorType.Rectangle} + */ + type?: ej.datavisualization.LinearGauge.IndicatorTypes|string; + + /**Specifies the indicator Width in bar indicators + * @Default {30} + */ + width?: number; +} + +export interface ScalesLabelsDistanceFromScale { + + /**Specifies the xDistanceFromScale of labels. + * @Default {-10} + */ + x?: number; + + /**Specifies the yDistanceFromScale of labels. + * @Default {0} + */ + y?: number; +} + +export interface ScalesLabelsFont { + + /**Specifies the fontFamily of font. + * @Default {Arial} + */ + fontFamily?: string; + + /**Specifies the fontStyle of font.See FontStyle + * @Default {ej.datavisualization.LinearGauge.FontStyle.Bold} + */ + fontStyle?: ej.datavisualization.LinearGauge.FontStyle|string; + + /**Specifies the size of font. + * @Default {11px} + */ + size?: string; +} + +export interface ScalesLabels { + + /**Specifies the angle of labels. + * @Default {0} + */ + angle?: number; + + /**Specifies the DistanceFromScale of labels. + * @Default {null} + */ + distanceFromScale?: ScalesLabelsDistanceFromScale; + + /**Specifies the font of labels. + * @Default {null} + */ + font?: ScalesLabelsFont; + + /**need to includeFirstValue. + * @Default {true} + */ + includeFirstValue?: boolean; + + /**Specifies the opacity of label. + * @Default {0} + */ + opacity?: number; + + /**Specifies the label Placement of label. See LabelPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the textColor of font. + * @Default {null} + */ + textColor?: string; + + /**Specifies the label Style of label. See LabelType + * @Default {ej.datavisualization.LinearGauge.LabelType.Major} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /**Specifies the unitText of label. + */ + unitText?: string; + + /**Specifies the unitText Position of label.See UnitTextPlacement + * @Default {Back} + */ + unitTextPlacement?: ej.datavisualization.LinearGauge.UnitTextPlacement|string; +} + +export interface ScalesMarkerPointersBorder { + + /**Specifies the border color of marker pointer + * @Default {null} + */ + color?: string; + + /**Specifies the border of marker pointer + * @Default {number} + */ + width?: number; +} + +export interface ScalesMarkerPointers { + + /**Specifies the backgroundColor of marker pointer + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border of marker pointer + * @Default {null} + */ + border?: ScalesMarkerPointersBorder; + + /**Specifies the distanceFromScale of marker pointer + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the pointer Gradient of marker pointer + * @Default {null} + */ + gradients?: any; + + /**Specifies the pointer Length of marker pointer + * @Default {30} + */ + length?: number; + + /**Specifies the opacity of marker pointer + * @Default {1} + */ + opacity?: number; + + /**Specifies the pointer Placement of marker pointer See PointerPlacement + * @Default {Far} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the marker Style of marker pointerSee MarkerType + * @Default {Triangle} + */ + type?: ej.datavisualization.LinearGauge.MarkerType|string; + + /**Specifies the value of marker pointer + * @Default {null} + */ + value?: number; + + /**Specifies the pointer Width of marker pointer + * @Default {30} + */ + width?: number; +} + +export interface ScalesPosition { + + /**Specifies the Horizontal position + * @Default {50} + */ + x?: number; + + /**Specifies the vertical position + * @Default {50} + */ + y?: number; +} + +export interface ScalesRangesBorder { + + /**Specifies the border color in the ranges. + * @Default {null} + */ + color?: string; + + /**Specifies the border width in the ranges. + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesRanges { + + /**Specifies the backgroundColor in the ranges. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the border in the ranges. + * @Default {null} + */ + border?: ScalesRangesBorder; + + /**Specifies the distanceFromScale in the ranges. + * @Default {0} + */ + distanceFromScale?: number; + + /**Specifies the endValue in the ranges. + * @Default {60} + */ + endValue?: number; + + /**Specifies the endWidth in the ranges. + * @Default {10} + */ + endWidth?: number; + + /**Specifies the range Gradient in the ranges. + * @Default {null} + */ + gradients?: any; + + /**Specifies the opacity in the ranges. + * @Default {null} + */ + opacity?: number; + + /**Specifies the range Position in the ranges. See RangePlacement + * @Default {Center} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the startValue in the ranges. + * @Default {20} + */ + startValue?: number; + + /**Specifies the startWidth in the ranges. + * @Default {10} + */ + startWidth?: number; +} + +export interface ScalesTicksDistanceFromScale { + + /**Specifies the xDistanceFromScale in the tick. + * @Default {0} + */ + x?: number; + + /**Specifies the yDistanceFromScale in the tick. + * @Default {0} + */ + y?: number; +} + +export interface ScalesTicks { + + /**Specifies the angle in the tick. + * @Default {0} + */ + angle?: number; + + /**Specifies the tick Color in the tick. + * @Default {null} + */ + color?: string; + + /**Specifies the DistanceFromScale in the tick. + * @Default {null} + */ + distanceFromScale?: ScalesTicksDistanceFromScale; + + /**Specifies the tick Height in the tick. + * @Default {10} + */ + height?: number; + + /**Specifies the opacity in the tick. + * @Default {0} + */ + opacity?: number; + + /**Specifies the tick Placement in the tick. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.LinearGauge.PointerPlacement|string; + + /**Specifies the tick Style in the tick. See TickType + * @Default {MajorInterval} + */ + type?: ej.datavisualization.LinearGauge.TicksType|string; + + /**Specifies the tick Width in the tick. + * @Default {3} + */ + width?: number; +} + +export interface Scales { + + /**Specifies the backgroundColor of the Scale. + * @Default {null} + */ + backgroundColor?: string; + + /**Specifies the scaleBar Gradient of bar pointer + * @Default {Array} + */ + barPointers?: Array; + + /**Specifies the border of the Scale. + * @Default {null} + */ + border?: ScalesBorder; + + /**Specifies the customLabel + * @Default {Array} + */ + customLabels?: Array; + + /**Specifies the scale Direction of the Scale. See Directions + * @Default {CounterClockwise} + */ + direction?: ej.datavisualization.LinearGauge.Direction|string; + + /**Specifies the indicator + * @Default {Array} + */ + indicators?: Array; + + /**Specifies the labels. + * @Default {Array} + */ + labels?: Array; + + /**Specifies the scaleBar Length. + * @Default {290} + */ + length?: number; + + /**Specifies the majorIntervalValue of the Scale. + * @Default {10} + */ + majorIntervalValue?: number; + + /**Specifies the markerPointers + * @Default {Array} + */ + markerPointers?: Array; + + /**Specifies the maximum of the Scale. + * @Default {null} + */ + maximum?: number; + + /**Specifies the minimum of the Scale. + * @Default {null} + */ + minimum?: number; + + /**Specifies the minorIntervalValue of the Scale. + * @Default {2} + */ + minorIntervalValue?: number; + + /**Specifies the opacity of the Scale. + * @Default {NaN} + */ + opacity?: number; + + /**Specifies the position + * @Default {null} + */ + position?: ScalesPosition; + + /**Specifies the ranges in the tick. + * @Default {Array} + */ + ranges?: Array; + + /**Specifies the shadowOffset. + * @Default {0} + */ + shadowOffset?: number; + + /**Specifies the showBarPointers state. + * @Default {true} + */ + showBarPointers?: boolean; + + /**Specifies the showCustomLabels state. + * @Default {false} + */ + showCustomLabels?: boolean; + + /**Specifies the showIndicators state. + * @Default {false} + */ + showIndicators?: boolean; + + /**Specifies the showLabels state. + * @Default {true} + */ + showLabels?: boolean; + + /**Specifies the showMarkerPointers state. + * @Default {true} + */ + showMarkerPointers?: boolean; + + /**Specifies the showRanges state. + * @Default {false} + */ + showRanges?: boolean; + + /**Specifies the showTicks state. + * @Default {true} + */ + showTicks?: boolean; + + /**Specifies the ticks in the scale. + * @Default {Array} + */ + ticks?: Array; + + /**Specifies the scaleBar type .See ScaleType + * @Default {Rectangle} + */ + type?: ej.datavisualization.LinearGauge.ScaleType|string; + + /**Specifies the scaleBar width. + * @Default {30} + */ + width?: number; +} + +export interface Tooltip { + + /**Specify showCustomLabelTooltip value of linear gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /**Specify showLabelTooltip value of linear gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /**Specify templateID value of linear gauge + * @Default {false} + */ + templateID?: string; +} +} +module LinearGauge +{ +enum OuterCustomLabelPosition +{ +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +module LinearGauge +{ +enum FontStyle +{ +//string +Bold, +//string +Italic, +//string +Regular, +//string +Strikeout, +//string +Underline, +} +} +module LinearGauge +{ +enum Direction +{ +//string +Clockwise, +//string +CounterClockwise, +} +} +module LinearGauge +{ +enum IndicatorTypes +{ +//string +Rectangle, +//string +Circle, +//string +RoundedRectangle, +//string +Text, +} +} +module LinearGauge +{ +enum PointerPlacement +{ +//string +Near, +//string +Far, +//string +Center, +} +} +module LinearGauge +{ +enum ScaleType +{ +//string +Major, +//string +Minor, +} +} +module LinearGauge +{ +enum UnitTextPlacement +{ +//string +Back, +//string +From, +} +} +module LinearGauge +{ +enum MarkerType +{ +//string +Rectangle, +//string +Triangle, +//string +Ellipse, +//string +Diamond, +//string +Pentagon, +//string +Circle, +//string +Star, +//string +Slider, +//string +Pointer, +//string +Wedge, +//string +Trapezoid, +//string +RoundedRectangle, +} +} +module LinearGauge +{ +enum TicksType +{ +//string +Majorinterval, +//string +Minorinterval, +} +} +module LinearGauge +{ +enum Themes +{ +//string +FlatLight, +//string +FlatDark, +} +} + +class CircularGauge extends ej.Widget { + static fn: CircularGauge; + constructor(element: JQuery, options?: CircularGauge.Model); + constructor(element: Element, options?: CircularGauge.Model); + model:CircularGauge.Model; + defaults:CircularGauge.Model; + + /** destroy the circular gauge widget. all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + + /** To export Image + * @returns {void} + */ + exportImage(): void; + + /** To get BackNeedleLength + * @returns {void} + */ + getBackNeedleLength(): void; + + /** To get CustomLabelAngle + * @returns {void} + */ + getCustomLabelAngle(): void; + + /** To get CustomLabelValue + * @returns {void} + */ + getCustomLabelValue(): void; + + /** To get LabelAngle + * @returns {void} + */ + getLabelAngle(): void; + + /** To get LabelDistanceFromScale + * @returns {void} + */ + getLabelDistanceFromScale(): void; + + /** To get LabelPlacement + * @returns {void} + */ + getLabelPlacement(): void; + + /** To get LabelStyle + * @returns {void} + */ + getLabelStyle(): void; + + /** To get MajorIntervalValue + * @returns {void} + */ + getMajorIntervalValue(): void; + + /** To get MarkerDistanceFromScale + * @returns {void} + */ + getMarkerDistanceFromScale(): void; + + /** To get MarkerStyle + * @returns {void} + */ + getMarkerStyle(): void; + + /** To get MaximumValue + * @returns {void} + */ + getMaximumValue(): void; + + /** To get MinimumValue + * @returns {void} + */ + getMinimumValue(): void; + + /** To get MinorIntervalValue + * @returns {void} + */ + getMinorIntervalValue(): void; + + /** To get NeedleStyle + * @returns {void} + */ + getNeedleStyle(): void; + + /** To get PointerCapBorderWidth + * @returns {void} + */ + getPointerCapBorderWidth(): void; + + /** To get PointerCapRadius + * @returns {void} + */ + getPointerCapRadius(): void; + + /** To get PointerLength + * @returns {void} + */ + getPointerLength(): void; + + /** To get PointerNeedleType + * @returns {void} + */ + getPointerNeedleType(): void; + + /** To get PointerPlacement + * @returns {void} + */ + getPointerPlacement(): void; + + /** To get PointerValue + * @returns {void} + */ + getPointerValue(): void; + + /** To get PointerWidth + * @returns {void} + */ + getPointerWidth(): void; + + /** To get RangeBorderWidth + * @returns {void} + */ + getRangeBorderWidth(): void; + + /** To get RangeDistanceFromScale + * @returns {void} + */ + getRangeDistanceFromScale(): void; + + /** To get RangeEndValue + * @returns {void} + */ + getRangeEndValue(): void; + + /** To get RangePosition + * @returns {void} + */ + getRangePosition(): void; + + /** To get RangeSize + * @returns {void} + */ + getRangeSize(): void; + + /** To get RangeStartValue + * @returns {void} + */ + getRangeStartValue(): void; + + /** To get ScaleBarSize + * @returns {void} + */ + getScaleBarSize(): void; + + /** To get ScaleBorderWidth + * @returns {void} + */ + getScaleBorderWidth(): void; + + /** To get ScaleDirection + * @returns {void} + */ + getScaleDirection(): void; + + /** To get ScaleRadius + * @returns {void} + */ + getScaleRadius(): void; + + /** To get StartAngle + * @returns {void} + */ + getStartAngle(): void; + + /** To get SubGaugeLocation + * @returns {void} + */ + getSubGaugeLocation(): void; + + /** To get SweepAngle + * @returns {void} + */ + getSweepAngle(): void; + + /** To get TickAngle + * @returns {void} + */ + getTickAngle(): void; + + /** To get TickDistanceFromScale + * @returns {void} + */ + getTickDistanceFromScale(): void; + + /** To get TickHeight + * @returns {void} + */ + getTickHeight(): void; + + /** To get TickPlacement + * @returns {void} + */ + getTickPlacement(): void; + + /** To get TickStyle + * @returns {void} + */ + getTickStyle(): void; + + /** To get TickWidth + * @returns {void} + */ + getTickWidth(): void; + + /** To set includeFirstValue + * @returns {void} + */ + includeFirstValue(): void; + + /** Switching the redraw option for the gauge + * @returns {void} + */ + redraw(): void; + + /** To set BackNeedleLength + * @returns {void} + */ + setBackNeedleLength(): void; + + /** To set CustomLabelAngle + * @returns {void} + */ + setCustomLabelAngle(): void; + + /** To set CustomLabelValue + * @returns {void} + */ + setCustomLabelValue(): void; + + /** To set LabelAngle + * @returns {void} + */ + setLabelAngle(): void; + + /** To set LabelDistanceFromScale + * @returns {void} + */ + setLabelDistanceFromScale(): void; + + /** To set LabelPlacement + * @returns {void} + */ + setLabelPlacement(): void; + + /** To set LabelStyle + * @returns {void} + */ + setLabelStyle(): void; + + /** To set MajorIntervalValue + * @returns {void} + */ + setMajorIntervalValue(): void; + + /** To set MarkerDistanceFromScale + * @returns {void} + */ + setMarkerDistanceFromScale(): void; + + /** To set MarkerStyle + * @returns {void} + */ + setMarkerStyle(): void; + + /** To set MaximumValue + * @returns {void} + */ + setMaximumValue(): void; + + /** To set MinimumValue + * @returns {void} + */ + setMinimumValue(): void; + + /** To set MinorIntervalValue + * @returns {void} + */ + setMinorIntervalValue(): void; + + /** To set NeedleStyle + * @returns {void} + */ + setNeedleStyle(): void; + + /** To set PointerCapBorderWidth + * @returns {void} + */ + setPointerCapBorderWidth(): void; + + /** To set PointerCapRadius + * @returns {void} + */ + setPointerCapRadius(): void; + + /** To set PointerLength + * @returns {void} + */ + setPointerLength(): void; + + /** To set PointerNeedleType + * @returns {void} + */ + setPointerNeedleType(): void; + + /** To set PointerPlacement + * @returns {void} + */ + setPointerPlacement(): void; + + /** To set PointerValue + * @returns {void} + */ + setPointerValue(): void; + + /** To set PointerWidth + * @returns {void} + */ + setPointerWidth(): void; + + /** To set RangeBorderWidth + * @returns {void} + */ + setRangeBorderWidth(): void; + + /** To set RangeDistanceFromScale + * @returns {void} + */ + setRangeDistanceFromScale(): void; + + /** To set RangeEndValue + * @returns {void} + */ + setRangeEndValue(): void; + + /** To set RangePosition + * @returns {void} + */ + setRangePosition(): void; + + /** To set RangeSize + * @returns {void} + */ + setRangeSize(): void; + + /** To set RangeStartValue + * @returns {void} + */ + setRangeStartValue(): void; + + /** To set ScaleBarSize + * @returns {void} + */ + setScaleBarSize(): void; + + /** To set ScaleBorderWidth + * @returns {void} + */ + setScaleBorderWidth(): void; + + /** To set ScaleDirection + * @returns {void} + */ + setScaleDirection(): void; + + /** To set ScaleRadius + * @returns {void} + */ + setScaleRadius(): void; + + /** To set StartAngle + * @returns {void} + */ + setStartAngle(): void; + + /** To set SubGaugeLocation + * @returns {void} + */ + setSubGaugeLocation(): void; + + /** To set SweepAngle + * @returns {void} + */ + setSweepAngle(): void; + + /** To set TickAngle + * @returns {void} + */ + setTickAngle(): void; + + /** To set TickDistanceFromScale + * @returns {void} + */ + setTickDistanceFromScale(): void; + + /** To set TickHeight + * @returns {void} + */ + setTickHeight(): void; + + /** To set TickPlacement + * @returns {void} + */ + setTickPlacement(): void; + + /** To set TickStyle + * @returns {void} + */ + setTickStyle(): void; + + /** To set TickWidth + * @returns {void} + */ + setTickWidth(): void; +} +export module CircularGauge{ + +export interface Model { + + /**Specifies animationSpeed of circular gauge + * @Default {500} + */ + animationSpeed?: number; + + /**Specifies the background color of circular gauge. + * @Default {null} + */ + backgroundColor?: string; + + /**Specify distanceFromCorner value of circular gauge + * @Default {center} + */ + distanceFromCorner?: number; + + /**Specify animate value of circular gauge + * @Default {true} + */ + enableAnimation?: boolean; + + /**Specify enableResize value of circular gauge + * @Default {false} + */ + enableResize?: boolean; + + /**Specify the frame of circular gauge + * @Default {Object} + */ + frame?: Frame; + + /**Specify gaugePosition value of circular gauge See GaugePosition + * @Default {center} + */ + gaugePosition?: ej.datavisualization.CircularGauge.gaugePosition|string; + + /**Specifies the height of circular gauge. + * @Default {360} + */ + height?: number; + + /**Specifies the interiorGradient of circular gauge. + * @Default {null} + */ + interiorGradient?: any; + + /**Specify isRadialGradient value of circular gauge + * @Default {false} + */ + isRadialGradient?: boolean; + + /**Specifies the maximum value of circular gauge. + * @Default {100} + */ + maximum?: number; + + /**Specifies the minimum value of circular gauge. + * @Default {0} + */ + minimum?: number; + + /**Specify outerCustomLabelPosition value of circular gauge See OuterCustomLabelPosition + * @Default {bottom} + */ + outerCustomLabelPosition?: ej.datavisualization.CircularGauge.CustomLabelPositionType|string; + + /**Specifies the radius of circular gauge. + * @Default {180} + */ + radius?: number; + + /**Specify readonly value of circular gauge + * @Default {true} + */ + readOnly?: boolean; + + /**Specify the pointers, ticks, labels, indicators, ranges of circular gauge + * @Default {null} + */ + scales?: Scales; + + /**Specify the theme of circular gauge. + * @Default {flatlight} + */ + theme?: string; + + /**Specify tooltip option of circular gauge + * @Default {object} + */ + tooltip?: Tooltip; + + /**Specifies the value of circular gauge. + * @Default {0} + */ + value?: number; + + /**Specifies the width of circular gauge. + * @Default {360} + */ + width?: number; + + /**Triggers while the custom labels are being drawn on the gauge.*/ + drawCustomLabel? (e: DrawCustomLabelEventArgs): void; + + /**Triggers while the indicators are being started to drawn on the gauge.*/ + drawIndicators? (e: DrawIndicatorsEventArgs): void; + + /**Triggers while the labels are being drawn on the gauge.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Triggers while the pointer cap is being drawn on the gauge.*/ + drawPointerCap? (e: DrawPointerCapEventArgs): void; + + /**Triggers while the pointers are being drawn on the gauge.*/ + drawPointers? (e: DrawPointersEventArgs): void; + + /**Triggers when the ranges begin to be getting drawn on the gauge.*/ + drawRange? (e: DrawRangeEventArgs): void; + + /**Triggers while the ticks are being drawn on the gauge.*/ + drawTicks? (e: DrawTicksEventArgs): void; + + /**Triggers while the gauge start to Load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the left mouse button is clicked.*/ + mouseClick? (e: MouseClickEventArgs): void; + + /**Triggers when clicking and dragging the mouse pointer over the gauge pointer.*/ + mouseClickMove? (e: MouseClickMoveEventArgs): void; + + /**Triggers when the mouse click is released.*/ + mouseClickUp? (e: MouseClickUpEventArgs): void; + + /**Triggers when the rendering of the gauge is completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface DrawCustomLabelEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the custom label + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the custom label belongs. + */ + scaleIndex?: number; + + /**returns the custom label style + */ + style?: string; + + /**returns the current custom label element. + */ + customLabelElement?: any; + + /**returns the index of the custom label. + */ + customLabelIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawIndicatorsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the indicator + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the indicator belongs. + */ + scaleIndex?: number; + + /**returns the indicator style + */ + style?: string; + + /**returns the current indicator element. + */ + indicatorElement?: any; + + /**returns the index of the indicator. + */ + indicatorIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the labels + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the label belongs. + */ + scaleIndex?: number; + + /**returns the label style + */ + style?: string; + + /**returns the angle of the labels. + */ + angle?: number; + + /**returns the current label element. + */ + element?: any; + + /**returns the index of the label. + */ + index?: number; + + /**returns the value of the label. + */ + pointerValue?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawPointerCapEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the startX and startY of the pointer cap. + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the pointer cap style + */ + style?: string; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawPointersEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the pointer + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the current pointer element. + */ + element?: any; + + /**returns the index of the pointer. + */ + index?: number; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawRangeEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the range + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the range belongs. + */ + scaleIndex?: number; + + /**returns the range style + */ + style?: string; + + /**returns the current range element. + */ + rangeElement?: any; + + /**returns the index of the range. + */ + rangeIndex?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface DrawTicksEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the startX and startY of the ticks + */ + position?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the options of the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the tick belongs. + */ + scaleIndex?: number; + + /**returns the ticks style + */ + style?: string; + + /**returns the angle of the tick. + */ + angle?: number; + + /**returns the current tick element. + */ + element?: any; + + /**returns the index of the tick. + */ + index?: number; + + /**returns the label value of the tick. + */ + pointerValue?: number; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + Model?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the context element + */ + context?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface MouseClickEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickMoveEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface MouseClickUpEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: any; + + /**returns the scale element. + */ + scaleElement?: any; + + /**returns the scaleIndex to which the pointer belongs. + */ + scaleIndex?: number; + + /**returns the context element + */ + context?: any; + + /**returns the pointer Index + */ + index?: number; + + /**returns the pointer element. + */ + element?: any; + + /**returns the value of the pointer. + */ + value?: number; + + /**returns the angle of the pointer. + */ + angle?: number; + + /**returns the pointer style + */ + style?: string; + + /**returns the startX and startY of the pointer. + */ + position?: any; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the context element + */ + context?: any; + + /**returns the entire scale element. + */ + scaleElement?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface Frame { + + /**Specify the url of the frame background image for circular gauge + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the frameType of circular gauge. See Frame + * @Default {FullCircle} + */ + frameType?: ej.datavisualization.CircularGauge.FrameType|string; + + /**Specifies the end angle for the half circular frame. + * @Default {360} + */ + halfCircleFrameEndAngle?: number; + + /**Specifies the start angle for the half circular frame. + * @Default {180} + */ + halfCircleFrameStartAngle?: number; +} + +export interface ScalesBorder { + + /**Specify border color for scales of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify border width of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesIndicatorsPosition { + + /**Specify x-axis of position of circular gauge + * @Default {0} + */ + x?: number; + + /**Specify y-axis of position of circular gauge + * @Default {0} + */ + y?: number; +} + +export interface ScalesIndicatorsStateRanges { + + /**Specify backgroundColor for indicator of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify borderColor for indicator of circular gauge + * @Default {null} + */ + borderColor?: string; + + /**Specify end value for each specified state of circular gauge + * @Default {0} + */ + endValue?: number; + + /**Specify value of the font as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + font?: any; + + /**Specify start value for each specified state of circular gauge + * @Default {0} + */ + startValue?: number; + + /**Specify value of the text as the indicator when the indicator style is set with the value "text" of circular gauge + */ + text?: string; + + /**Specify value of the textColor as the indicator when the indicator style is set with the value "text" of circular gauge + * @Default {null} + */ + textColor?: string; +} + +export interface ScalesIndicators { + + /**Specify indicator height of circular gauge + * @Default {15} + */ + height?: number; + + /**Specify imageUrl of circular gauge + * @Default {null} + */ + imageUrl?: string; + + /**Specify position of circular gauge + * @Default {Object} + */ + position?: ScalesIndicatorsPosition; + + /**Specify the various states of circular gauge + * @Default {Array} + */ + stateRanges?: Array; + + /**Specify indicator style of circular gauge. See IndicatorType + * @Default {Circle} + */ + type?: ej.datavisualization.CircularGauge.IndicatorTypes|string; + + /**Specify indicator width of circular gauge + * @Default {15} + */ + width?: number; +} + +export interface ScalesLabelsFont { + + /**Specify font fontFamily for labels of circular gauge + * @Default {Arial} + */ + fontFamily?: string; + + /**Specify font Style for labels of circular gauge + * @Default {Bold} + */ + fontStyle?: string; + + /**Specify font size for labels of circular gauge + * @Default {11px} + */ + size?: string; +} + +export interface ScalesLabels { + + /**Specify the angle for the labels of circular gauge + * @Default {0} + */ + angle?: number; + + /**Specify labels autoAngle value of circular gauge + * @Default {false} + */ + autoAngle?: boolean; + + /**Specify label color of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify distanceFromScale value for labels of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify font for labels of circular gauge + * @Default {Object} + */ + font?: ScalesLabelsFont; + + /**Specify includeFirstValue of circular gauge + * @Default {true} + */ + includeFirstValue?: boolean; + + /**Specify opacity value for labels of circular gauge + * @Default {null} + */ + opacity?: number; + + /**Specify label placement of circular gauge. See LabelPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify label Style of circular gauge. See LabelType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /**Specify unitText of circular gauge + */ + unitText?: string; + + /**Specify unitTextPosition of circular gauge. See UnitTextPosition + * @Default {Back} + */ + unitTextPosition?: ej.datavisualization.CircularGauge.UnitTextPlacement|string; +} + +export interface ScalesPointerCap { + + /**Specify cap backgroundColor of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify cap borderColor of circular gauge + * @Default {null} + */ + borderColor?: string; + + /**Specify pointerCap borderWidth value of circular gauge + * @Default {3} + */ + borderWidth?: number; + + /**Specify cap interiorGradient value of circular gauge + * @Default {null} + */ + interiorGradient?: any; + + /**Specify pointerCap Radius value of circular gauge + * @Default {7} + */ + radius?: number; +} + +export interface ScalesPointersBorder { + + /**Specify border color for pointer of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify border width for pointers of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesPointersPointerValueTextFont { + + /**Specify pointer value text font family of circular gauge. + * @Default {Arial} + */ + fontFamily?: string; + + /**Specify pointer value text font style of circular gauge. + * @Default {Bold} + */ + fontStyle?: string; + + /**Specify pointer value text size of circular gauge. + * @Default {11px} + */ + size?: string; +} + +export interface ScalesPointersPointerValueText { + + /**Specify pointer text angle of circular gauge. + * @Default {0} + */ + angle?: number; + + /**Specify pointer text auto angle of circular gauge. + * @Default {false} + */ + autoAngle?: boolean; + + /**Specify pointer value text color of circular gauge. + * @Default {#8c8c8c} + */ + color?: string; + + /**Specify pointer value text distance from pointer of circular gauge. + * @Default {20} + */ + distance?: number; + + /**Specify pointer value text font option of circular gauge. + * @Default {object} + */ + font?: ScalesPointersPointerValueTextFont; + + /**Specify pointer value text opacity of circular gauge. + * @Default {1} + */ + opacity?: number; + + /**enable pointer value text visibility of circular gauge. + * @Default {false} + */ + showValue?: boolean; +} + +export interface ScalesPointers { + + /**Specify backgroundColor for the pointer of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify backNeedleLength of circular gauge + * @Default {10} + */ + backNeedleLength?: number; + + /**Specify the border for pointers of circular gauge + * @Default {Object} + */ + border?: ScalesPointersBorder; + + /**Specify distanceFromScale value for pointers of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify pointer gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /**Specify pointer image of circular gauge.It is applicable for both marker as well as needle type pointers. + * @Default {NULL} + */ + imageUrl?: string; + + /**Specify pointer length of circular gauge + * @Default {150} + */ + length?: number; + + /**Specify marker Style value of circular gauge. See MarkerType + * @Default {Rectangle} + */ + markerType?: ej.datavisualization.CircularGauge.MarkerType|string; + + /**Specify needle Style value of circular gauge. See NeedleType + * @Default {Triangle} + */ + needleType?: ej.datavisualization.CircularGauge.NeedleType|string; + + /**Specify opacity value for pointer of circular gauge + * @Default {1} + */ + opacity?: number; + + /**Specify pointer Placement value of circular gauge. See PointerPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify pointer value text of circular gauge. + * @Default {Object} + */ + pointerValueText?: ScalesPointersPointerValueText; + + /**Specify showBackNeedle value of circular gauge + * @Default {false} + */ + showBackNeedle?: boolean; + + /**Specify pointer type value of circular gauge. See PointerType + * @Default {Needle} + */ + type?: ej.datavisualization.CircularGauge.PointerType|string; + + /**Specify value of the pointer of circular gauge + * @Default {null} + */ + value?: number; + + /**Specify pointer width of circular gauge + * @Default {7} + */ + width?: number; +} + +export interface ScalesRangesBorder { + + /**Specify border color for ranges of circular gauge + * @Default {#32b3c6} + */ + color?: string; + + /**Specify border width for ranges of circular gauge + * @Default {1.5} + */ + width?: number; +} + +export interface ScalesRanges { + + /**Specify backgroundColor for the ranges of circular gauge + * @Default {#32b3c6} + */ + backgroundColor?: string; + + /**Specify border for ranges of circular gauge + * @Default {Object} + */ + border?: ScalesRangesBorder; + + /**Specify distanceFromScale value for ranges of circular gauge + * @Default {25} + */ + distanceFromScale?: number; + + /**Specify endValue for ranges of circular gauge + * @Default {null} + */ + endValue?: number; + + /**Specify endWidth for ranges of circular gauge + * @Default {10} + */ + endWidth?: number; + + /**Specify range gradients of circular gauge + * @Default {null} + */ + gradients?: any; + + /**Specify opacity value for ranges of circular gauge + * @Default {null} + */ + opacity?: number; + + /**Specify placement of circular gauge. See RangePlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify size of the range value of circular gauge + * @Default {5} + */ + size?: number; + + /**Specify startValue for ranges of circular gauge + * @Default {null} + */ + startValue?: number; + + /**Specify startWidth of circular gauge + * @Default {[Array.number] scale.ranges.startWidth = 10} + */ + startWidth?: number; +} + +export interface ScalesSubGaugesPosition { + + /**Specify x-axis position for sub-gauge of circular gauge + * @Default {0} + */ + x?: number; + + /**Specify y-axis position for sub-gauge of circular gauge + * @Default {0} + */ + y?: number; +} + +export interface ScalesSubGauges { + + /**Specify subGauge Height of circular gauge + * @Default {150} + */ + height?: number; + + /**Specify position for sub-gauge of circular gauge + * @Default {Object} + */ + position?: ScalesSubGaugesPosition; + + /**Specify subGauge Width of circular gauge + * @Default {150} + */ + width?: number; +} + +export interface ScalesTicks { + + /**Specify the angle for the ticks of circular gauge + * @Default {0} + */ + angle?: number; + + /**Specify tick color of circular gauge + * @Default {null} + */ + color?: string; + + /**Specify distanceFromScale value for ticks of circular gauge + * @Default {0} + */ + distanceFromScale?: number; + + /**Specify tick height of circular gauge + * @Default {16} + */ + height?: number; + + /**Specify tick placement of circular gauge. See TickPlacement + * @Default {Near} + */ + placement?: ej.datavisualization.CircularGauge.Placement|string; + + /**Specify tick Style of circular gauge. See TickType + * @Default {Major} + */ + type?: ej.datavisualization.CircularGauge.LabelType|string; + + /**Specify tick width of circular gauge + * @Default {3} + */ + width?: number; +} + +export interface Scales { + + /**Specify backgroundColor for the scale of circular gauge + * @Default {null} + */ + backgroundColor?: string; + + /**Specify border for scales of circular gauge + * @Default {Object} + */ + border?: ScalesBorder; + + /**Specify scale direction of circular gauge. See Directions + * @Default {Clockwise} + */ + direction?: ej.datavisualization.CircularGauge.Direction|string; + + /**Specify representing state of circular gauge + * @Default {Array} + */ + indicators?: Array; + + /**Specify the text values displayed in a meaningful manner alongside the ticks of circular gauge + * @Default {Array} + */ + labels?: Array; + + /**Specify majorIntervalValue of circular gauge + * @Default {10} + */ + majorIntervalValue?: number; + + /**Specify maximum scale value of circular gauge + * @Default {null} + */ + maximum?: number; + + /**Specify minimum scale value of circular gauge + * @Default {null} + */ + minimum?: number; + + /**Specify minorIntervalValue of circular gauge + * @Default {2} + */ + minorIntervalValue?: number; + + /**Specify opacity value of circular gauge + * @Default {1} + */ + opacity?: number; + + /**Specify pointer cap of circular gauge + * @Default {Object} + */ + pointerCap?: ScalesPointerCap; + + /**Specify pointers value of circular gauge + * @Default {Array} + */ + pointers?: Array; + + /**Specify scale radius of circular gauge + * @Default {170} + */ + radius?: number; + + /**Specify ranges value of circular gauge + * @Default {Array} + */ + ranges?: Array; + + /**Specify shadowOffset value of circular gauge + * @Default {0} + */ + shadowOffset?: number; + + /**Specify showIndicators of circular gauge + * @Default {false} + */ + showIndicators?: boolean; + + /**Specify showLabels of circular gauge + * @Default {true} + */ + showLabels?: boolean; + + /**Specify showPointers of circular gauge + * @Default {true} + */ + showPointers?: boolean; + + /**Specify showRanges of circular gauge + * @Default {false} + */ + showRanges?: boolean; + + /**Specify showScaleBar of circular gauge + * @Default {false} + */ + showScaleBar?: boolean; + + /**Specify showTicks of circular gauge + * @Default {true} + */ + showTicks?: boolean; + + /**Specify scaleBar size of circular gauge + * @Default {6} + */ + size?: number; + + /**Specify startAngle of circular gauge + * @Default {115} + */ + startAngle?: number; + + /**Specify subGauge of circular gauge + * @Default {Array} + */ + subGauges?: Array; + + /**Specify sweepAngle of circular gauge + * @Default {310} + */ + sweepAngle?: number; + + /**Specify ticks of circular gauge + * @Default {Array} + */ + ticks?: Array; +} + +export interface Tooltip { + + /**enable showCustomLabelTooltip of circular gauge + * @Default {false} + */ + showCustomLabelTooltip?: boolean; + + /**enable showLabelTooltip of circular gauge + * @Default {false} + */ + showLabelTooltip?: boolean; + + /**Specify tooltip templateID of circular gauge + * @Default {false} + */ + templateID?: string; +} +} +module CircularGauge +{ +enum FrameType +{ +//string +FullCircle, +//string +HalfCircle, +} +} +module CircularGauge +{ +enum gaugePosition +{ +//string +TopLeft, +//string +TopRight, +//string +TopCenter, +//string +MiddleLeft, +//string +MiddleRight, +//string +Center, +//string +BottomLeft, +//string +BottomRight, +//string +BottomCenter, +} +} +module CircularGauge +{ +enum CustomLabelPositionType +{ +//string +Top, +//string +Bottom, +//string +Right, +//string +Left, +} +} +module CircularGauge +{ +enum Direction +{ +//string +Clockwise, +//string +CounterClockwise, +} +} +module CircularGauge +{ +enum IndicatorTypes +{ +//string +Rectangle, +//string +Circle, +//string +Text, +//string +RoundedRectangle, +//string +Image, +} +} +module CircularGauge +{ +enum Placement +{ +//string +Near, +//string +Far, +} +} +module CircularGauge +{ +enum LabelType +{ +//string +Major, +//string +Minor, +} +} +module CircularGauge +{ +enum UnitTextPlacement +{ +//string +Back, +//string +Front, +} +} +module CircularGauge +{ +enum MarkerType +{ +//string +Rectangle, +//string +Circle, +//string +Triangle, +//string +Ellipse, +//string +Diamond, +//string +Pentagon, +//string +Slider, +//string +Pointer, +//string +Wedge, +//string +Trapezoid, +//string +RoundedRectangle, +//string +Image, +} +} +module CircularGauge +{ +enum NeedleType +{ +//string +Triangle, +//string +Rectangle, +//string +Arrow, +//string +Image, +//string +Trapezoid, +} +} +module CircularGauge +{ +enum PointerType +{ +//string +Needle, +//string +Marker, +} +} + +class DigitalGauge extends ej.Widget { + static fn: DigitalGauge; + constructor(element: JQuery, options?: DigitalGauge.Model); + constructor(element: Element, options?: DigitalGauge.Model); + model:DigitalGauge.Model; + defaults:DigitalGauge.Model; + + /** To destroy the digital gauge + * @returns {void} + */ + destroy(): void; + + /** To export Digital Gauge as Image + * @param {string} fileName for the Image + * @param {string} fileType for the Image + * @returns {void} + */ + exportImage(fileName: string, fileType: string): void; + + /** Gets the location of an item that is displayed on the gauge. + * @param {number} Position value of an item that is displayed on the gauge. + * @returns {void} + */ + getPosition(itemIndex: number): void; + + /** ClientSideMethod getValue Gets the value of an item that is displayed on the gauge + * @param {number} Index value of an item that displayed on the gauge + * @returns {void} + */ + getValue(itemIndex: number): void; + + /** Refresh the digital gauge widget + * @returns {void} + */ + refresh(): void; + + /** ClientSideMethod Set Position Sets the location of an item to be displayed in the gauge + * @param {number} Index value of the digital gauge item + * @param {any} Location value of the digital gauge + * @returns {void} + */ + setPosition(itemIndex: number, value: any): void; + + /** ClientSideMethod SetValue Sets the value of an item to be displayed in the gauge. + * @param {number} Index value of the digital gauge item + * @param {string} Text value to be displayed in the gaugeS + * @returns {void} + */ + setValue(itemIndex: number, value: string): void; +} +export module DigitalGauge{ + +export interface Model { + + /**Specifies the resize option of the DigitalGauge. + * @Default {false} + */ + enableResize?: boolean; + + /**Specifies the frame of the Digital gauge. + * @Default {{backgroundImageUrl: null, innerWidth: 6, outerWidth: 10}} + */ + frame?: Frame; + + /**Specifies the height of the DigitalGauge. + * @Default {150} + */ + height?: number; + + /**Specifies the items for the DigitalGauge. + * @Default {null} + */ + items?: Items; + + /**Specifies the matrixSegmentData for the DigitalGauge. + */ + matrixSegmentData?: any; + + /**Specifies the segmentData for the DigitalGauge. + */ + segmentData?: any; + + /**Specifies the themes for the Digital gauge. See Themes + * @Default {flatlight} + */ + themes?: string; + + /**Specifies the value to the DigitalGauge. + * @Default {text} + */ + value?: string; + + /**Specifies the width for the Digital gauge. + * @Default {400} + */ + width?: number; + + /**Triggers when the gauge is initialized.*/ + init? (e: InitEventArgs): void; + + /**Triggers when the gauge item rendering.*/ + itemRendering? (e: ItemRenderingEventArgs): void; + + /**Triggers when the gauge is start to load.*/ + load? (e: LoadEventArgs): void; + + /**Triggers when the gauge render is completed.*/ + renderComplete? (e: RenderCompleteEventArgs): void; +} + +export interface InitEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface ItemRenderingEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /**returns the object of the gauge. + */ + object?: any; + + /**returns the cancel option value + */ + cancel?: boolean; + + /**returns the all the options of the items. + */ + items?: any; + + /**returns the context element + */ + context?: any; + + /**returns the gauge model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface Frame { + + /**Specifies the url of an image to be displayed as background of the Digital gauge. + * @Default {null} + */ + backgroundImageUrl?: string; + + /**Specifies the inner width for the frame, when the background image has been set for the Digital gauge.. + * @Default {6} + */ + innerWidth?: number; + + /**Specifies the outer width of the frame, when the background image has been set for the Digital gauge. + * @Default {10} + */ + outerWidth?: number; +} + +export interface ItemsCharacterSettings { + + /**Specifies the CharacterCount value for the DigitalGauge. + * @Default {4} + */ + count?: number; + + /**Specifies the opacity value for the DigitalGauge. + * @Default {1} + */ + opacity?: number; + + /**Specifies the value for spacing between the characters + * @Default {2} + */ + spacing?: number; + + /**Specifies the character type for the text to be displayed. + * @Default {ej.datavisualization.DigitalGauge.CharacterType.EightCrossEightDotMatrix} + */ + type?: ej.datavisualization.DigitalGauge.CharacterType|string; +} + +export interface ItemsFont { + + /**Set the font family value + * @Default {Arial} + */ + fontFamily?: string; + + /**Set the font style for the font + * @Default {italic} + */ + fontStyle?: ej.datavisualization.DigitalGauge.FontStyle|string; + + /**Set the font size value + * @Default {11px} + */ + size?: string; +} + +export interface ItemsPosition { + + /**Set the horizontal location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + x?: number; + + /**Set the vertical location for the text, where it needs to be placed within the gauge. + * @Default {0} + */ + y?: number; +} + +export interface ItemsSegmentSettings { + + /**Set the color for the text segments. + * @Default {null} + */ + color?: string; + + /**Set the gradient for the text segments. + * @Default {null} + */ + gradient?: any; + + /**Set the length for the text segments. + * @Default {2} + */ + length?: number; + + /**Set the opacity for the text segments. + * @Default {0} + */ + opacity?: number; + + /**Set the spacing for the text segments. + * @Default {1} + */ + spacing?: number; + + /**Set the width for the text segments. + * @Default {1} + */ + width?: number; +} + +export interface Items { + + /**Specifies the Character settings for the DigitalGauge. + * @Default {null} + */ + characterSettings?: ItemsCharacterSettings; + + /**Enable/Disable the custom font to be applied to the text in the gauge. + * @Default {false} + */ + enableCustomFont?: boolean; + + /**Set the specific font for the text, when the enableCustomFont is set to true + * @Default {null} + */ + font?: ItemsFont; + + /**Set the location for the text, where it needs to be placed within the gauge. + * @Default {null} + */ + position?: ItemsPosition; + + /**Set the segment settings for the digital gauge. + * @Default {null} + */ + segmentSettings?: ItemsSegmentSettings; + + /**Set the value for enabling/disabling the blurring effect for the shadows of the text + * @Default {0} + */ + shadowBlur?: number; + + /**Specifies the color of the text shadow. + * @Default {null} + */ + shadowColor?: string; + + /**Set the x offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetX?: number; + + /**Set the y offset value for the shadow of the text, indicating the location where it needs to be displayed. + * @Default {1} + */ + shadowOffsetY?: number; + + /**Set the alignment of the text that is displayed within the gauge.See TextAlign + * @Default {left} + */ + textAlign?: string; + + /**Specifies the color of the text. + * @Default {null} + */ + textColor?: string; + + /**Specifies the text value. + * @Default {null} + */ + value?: string; +} +} +module DigitalGauge +{ +enum CharacterType +{ +//string +SevenSegment, +//string +FourteenSegment, +//string +SixteenSegment, +//string +EightCrossEightDotMatrix, +//string +EightCrossEightSquareMatrix, +} +} +module DigitalGauge +{ +enum FontStyle +{ +//string +Normal, +//string +Bold, +//string +Italic, +//string +Underline, +//string +Strikeout, +} +} + +class Chart extends ej.Widget { + static fn: Chart; + constructor(element: JQuery, options?: Chart.Model); + constructor(element: Element, options?: Chart.Model); + model:Chart.Model; + defaults:Chart.Model; + + /** Animates the series and/or indicators in Chart. When parameter is not passed to this method, then all the series and indicators present in Chart are animated. + * @param {Array} Series and indicator objects passed in the array collection are animated.Example + * @param {any} Series or indicator object passed to this method are animated.Example, + * @returns {void} + */ + animate(options: Array, option: any): void; + + /** Exports chart as an image or to an excel file. Chart can be exported as an image only when exportCanvasRendering option is set to true. + * @param {string} Type of the export operation to be performed. Following are the two export types that are supported now,1. 'image'2. 'excel'Example + * @param {string} URL of the service, where the chart will be exported to excel.Example, + * @param {boolean} When this parameter is true, all the chart objects initialized to the same document are exported to a single excel file. This is an optional parameter. By default, it is false.Example, + * @returns {void} + */ + export(type: string, url: string, exportMultipleChart: boolean): void; + + /** Redraws the entire chart. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI. + * @returns {void} + */ + redraw(): void; +} +export module Chart{ + +export interface Model { + + /**Options for adding and customizing annotations in Chart. + */ + annotations?: Array; + + /**Url of the image to be used as chart background. + * @Default {null} + */ + backGroundImageUrl?: string; + + /**Options for customizing the color, opacity and width of the chart border. + */ + border?: Border; + + /**Controls whether Chart has to be responsive or not. + * @Default {false} + */ + canResize?: boolean; + + /**Options for configuring the border and background of the plot area. + */ + chartArea?: ChartArea; + + /**Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. + */ + columnDefinitions?: Array; + + /**Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. + */ + commonSeriesOptions?: CommonSeriesOptions; + + /**Options for displaying and customizing the crosshair. + */ + crosshair?: Crosshair; + + /**Depth of the 3D Chart from front view of series to background wall. This property is applicable only for 3D view. + * @Default {100} + */ + depth?: number; + + /**Controls whether 3D view has to be enabled or not. 3D view is supported only for column, bar. Stacking column, stacking bar, pie and doughnut series types. + * @Default {false} + */ + enable3D?: boolean; + + /**Controls whether Chart has to be rendered as Canvas or SVG. Canvas rendering supports all functionalities in SVG rendering except 3D Charts. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /**Controls whether 3D view has to be rotated on dragging. This property is applicable only for 3D view. + * @Default {false} + */ + enableRotation?: boolean; + + /**Options to customize the technical indicators. + */ + indicators?: Array; + + /**Options to customize the legend items and legend title. + */ + legend?: Legend; + + /**Name of the culture based on which chart should be localized. Number and date time values are localized with respect to the culture name.String type properties like title text are not localized automatically. Provide localized text as value to string type properties. + * @Default {en-US} + */ + locale?: string; + + /**Palette is used to store the series fill color in array and apply the color to series collection in the order of series index. + * @Default {null} + */ + palette?: Array; + + /**Options to customize the left, right, top and bottom margins of chart area. + */ + Margin?: any; + + /**Perspective angle of the 3D view. Chart appears closer when perspective angle is decreased, and distant when perspective angle is increased.This property is applicable only when 3D view is enabled + * @Default {90} + */ + perspectiveAngle?: number; + + /**This is a horizontal axis that contains options to configure axis and it is the primary x axis for all the series in series array. To override x axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s xAxisName property to link both axis and series. + */ + primaryXAxis?: PrimaryXAxis; + + /**This is a vertical axis that contains options to configure axis. This is the primary y axis for all the series in series array. To override y axis for particular series, create an axis object by providing unique name by using name property and add it to axes array. Then, assign the name to the series’s yAxisName property to link both axis and series. + */ + primaryYAxis?: PrimaryYAxis; + + /**Rotation angle of the 3D view. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + rotation?: number; + + /**Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. + */ + rowDefinitions?: Array; + + /**Specifies the properties used for customizing the series. + */ + series?: Array; + + /**Controls whether data points has to be displayed side by side or along the depth of the axis. + * @Default {false} + */ + sideBySideSeriesPlacement?: boolean; + + /**Options to customize the Chart size. + */ + size?: Size; + + /**Specifies the theme for Chart. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Chart.Theme|string; + + /**Slope angle of 3D Chart. This property is applicable only when 3D view is enabled. + * @Default {0} + */ + tilt?: number; + + /**Options for customizing the title and subtitle of Chart. + */ + title?: Title; + + /**Width of the wall used in 3D Chart. Wall is present only in Cartesian type 3D series and not in 3D pie or Doughnut series. This property is applicable only when 3D view is enabled. + * @Default {2} + */ + wallSize?: number; + + /**Options for enabling zooming feature of chart. + */ + zooming?: Zooming; + + /**Fires after the series animation is completed. This event will be triggered for each series when animation is enabled.*/ + animationComplete? (e: AnimationCompleteEventArgs): void; + + /**Fires before rendering the labels. This event is fired for each label in axis. You can use this event to add custom text to axis labels.*/ + axesLabelRendering? (e: AxesLabelRenderingEventArgs): void; + + /**Fires during the initialization of axis labels.*/ + axesLabelsInitialize? (e: AxesLabelsInitializeEventArgs): void; + + /**Fires during axes range calculation. This event is fired for each axis present in Chart. You can use this event to customize axis range as required.*/ + axesRangeCalculate? (e: AxesRangeCalculateEventArgs): void; + + /**Fires before rendering the axis title. This event is triggered for each axis with title. You can use this event to add custom text to axis title.*/ + axesTitleRendering? (e: AxesTitleRenderingEventArgs): void; + + /**Fires during the calculation of chart area bounds. You can use this event to customize the bounds of chart area.*/ + chartAreaBoundsCalculate? (e: ChartAreaBoundsCalculateEventArgs): void; + + /**Fires after chart is created.*/ + create? (e: CreateEventArgs): void; + + /**Fires when chart is destroyed completely.*/ + destroy? (e: DestroyEventArgs): void; + + /**Fires before rendering the data labels. This event is triggered for each data label in the series. You can use this event to add custom text in data labels.*/ + displayTextRendering? (e: DisplayTextRenderingEventArgs): void; + + /**Fires during the calculation of legend bounds. You can use this event to customize the bounds of legend.*/ + legendBoundsCalculate? (e: LegendBoundsCalculateEventArgs): void; + + /**Fires on clicking the legend item.*/ + legendItemClick? (e: LegendItemClickEventArgs): void; + + /**Fires when moving mouse over legend item. You can use this event for hit testing on legend items.*/ + legendItemMouseMove? (e: LegendItemMouseMoveEventArgs): void; + + /**Fires before rendering the legend item. This event is fired for each legend item in Chart. You can use this event to customize legend item shape or add custom text to legend item.*/ + legendItemRendering? (e: LegendItemRenderingEventArgs): void; + + /**Fires before loading the chart.*/ + load? (e: LoadEventArgs): void; + + /**Fires on clicking a point in chart. You can use this event to handle clicks made on points.*/ + pointRegionClick? (e: PointRegionClickEventArgs): void; + + /**Fires when mouse is moved over a point.*/ + pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + + /**Fires before rendering chart.*/ + preRender? (e: PreRenderEventArgs): void; + + /**Fires after selecting a series. This event is triggered after selecting a series only if selection mode is series.*/ + seriesRegionClick? (e: SeriesRegionClickEventArgs): void; + + /**Fires before rendering a series. This event is fired for each series in Chart.*/ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /**Fires before rendering the marker symbols. This event is triggered for each marker in Chart.*/ + symbolRendering? (e: SymbolRenderingEventArgs): void; + + /**Fires before rendering the Chart title. You can use this event to add custom text in Chart title.*/ + titleRendering? (e: TitleRenderingEventArgs): void; + + /**Fires before rendering the tooltip. This event is fired when tooltip is enabled and mouse is hovered on a Chart point. You can use this event to customize tooltip before rendering.*/ + toolTipInitialize? (e: ToolTipInitializeEventArgs): void; + + /**Fires before rendering crosshair tooltip in axis. This event is fired for each axis with crosshair label enabled. You can use this event to customize crosshair label before rendering*/ + trackAxisToolTip? (e: TrackAxisToolTipEventArgs): void; + + /**Fires before rendering trackball tooltip. This event is fired for each series in Chart because trackball tooltip is displayed for all the series. You can use this event to customize the text displayed in trackball tooltip.*/ + trackToolTip? (e: TrackToolTipEventArgs): void; + + /**Fires, on clicking the axis label.*/ + axisLabelClick? (e: AxisLabelClickEventArgs): void; + + /**Fires on moving mouse over the axis label.*/ + axisLabelMouseMove? (e: AxisLabelMouseMoveEventArgs): void; + + /**Fires, on the clicking the chart.*/ + chartClick? (e: ChartClickEventArgs): void; + + /**Fires on moving mouse over the chart.*/ + chartMouseMove? (e: ChartMouseMoveEventArgs): void; + + /**Fires, on double clicking the chart.*/ + chartDoubleClick? (e: ChartDoubleClickEventArgs): void; + + /**Fires on clicking the annotation.*/ + annotationClick? (e: AnnotationClickEventArgs): void; + + /**Fires, after the chart is resized.*/ + afterResize? (e: AfterResizeEventArgs): void; + + /**Fires, when chart size is changing.*/ + beforeResize? (e: BeforeResizeEventArgs): void; + + /**Fires, when error bar is rendering.*/ + errorBarRendering? (e: ErrorBarRenderingEventArgs): void; +} + +export interface AnimationCompleteEventArgs { + + /**Instance of the series that completed has animation. + */ + series?: any; + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesLabelRenderingEventArgs { + + /**Instance of the corresponding axis. + */ + Axis?: any; + + /**Formatted text of the respective label. You can also add custom text to the label. + */ + LabelText?: string; + + /**Actual value of the label. + */ + LabelValue?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesLabelsInitializeEventArgs { + + /**Collection of axes in Chart + */ + dataAxes?: any; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesRangeCalculateEventArgs { + + /**Difference between minimum and maximum value of axis range. + */ + delta?: number; + + /**Interval value of axis range. Grid lines, tick lines and axis labels are drawn based on this interval value. + */ + interval?: number; + + /**Maximum value of axis range. + */ + max?: number; + + /**Minimum value of axis range. + */ + min?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface AxesTitleRenderingEventArgs { + + /**Instance of the axis whose title is being rendered + */ + axes?: any; + + /**X-coordinate of title location + */ + locationX?: number; + + /**Y-coordinate of title location + */ + locationY?: number; + + /**Axis title text. You can add custom text to the title. + */ + title?: string; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface ChartAreaBoundsCalculateEventArgs { + + /**Height of the chart area. + */ + areaBoundsHeight?: number; + + /**Width of the chart area. + */ + areaBoundsWidth?: number; + + /**X-coordinate of the chart area. + */ + areaBoundsX?: number; + + /**Y-coordinate of the chart area. + */ + areaBoundsY?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface CreateEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface DisplayTextRenderingEventArgs { + + /**Text displayed in data label. You can add custom text to the data label + */ + text?: string; + + /**X-coordinate of data label location + */ + locationX?: number; + + /**Y-coordinate of data label location + */ + locationY?: number; + + /**Index of the series in series Collection whose data label is being rendered + */ + seriesIndex?: number; + + /**Index of the point in series whose data label is being rendered + */ + pointIndex?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface LegendBoundsCalculateEventArgs { + + /**Height of the legend. + */ + legendBoundsHeight?: number; + + /**Width of the legend. + */ + legendBoundsWidth?: number; + + /**Number of rows to display the legend items + */ + legendBoundsRows?: number; + + /**Set this option to true to cancel the event. + */ + cancel?: boolean; + + /**Instance of the chart model object. + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface LegendItemClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + LegendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + style?: any; + + /**Instance that holds information about legend bounds and legend item bounds. + */ + Bounds?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; + + /**Instance of the series object corresponding to the legend item + */ + series?: any; +} + +export interface LegendItemMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + LegendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + style?: any; + + /**Options to customize the legend item styles such as border, color, size, etc…, + */ + Bounds?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; + + /**Instance of the series object corresponding to the legend item + */ + series?: any; +} + +export interface LegendItemRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of legend item in pixel + */ + startX?: number; + + /**Y-coordinate of legend item in pixel + */ + startY?: number; + + /**Instance of the legend item object that is about to be rendered + */ + legendItem?: any; + + /**Options to customize the legend item styles such as border, color, size, etc. + */ + style?: any; + + /**Name of the legend item shape. Use this option to customize legend item shape before rendering + */ + symbolShape?: string; +} + +export interface LoadEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface PointRegionClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of point in pixel + */ + locationX?: number; + + /**Y-coordinate of point in pixel + */ + locationY?: number; + + /**Index of the point in series + */ + pointIndex?: number; + + /**Index of the series in series collection to which the point belongs + */ + seriesIndex?: number; +} + +export interface PointRegionMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X-coordinate of point in pixel + */ + locationX?: number; + + /**Y-coordinate of point in pixel + */ + locationY?: number; + + /**Index of the point in series + */ + pointIndex?: number; + + /**Index of the series in series collection to which the point belongs + */ + seriesIndex?: number; +} + +export interface PreRenderEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; +} + +export interface SeriesRegionClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance of the selected series + */ + series?: any; + + /**Index of the selected series + */ + seriesIndex?: number; +} + +export interface SeriesRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance of the series which is about to get rendered + */ + series?: any; +} + +export interface SymbolRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Instance that holds the location of marker symbol + */ + location?: any; + + /**Options to customize the marker style such as color, border and size + */ + style?: any; +} + +export interface TitleRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Option to customize the title location in pixels + */ + location?: any; + + /**Read-only option to find the size of the title + */ + size?: any; + + /**Use this option to add custom text in title + */ + title?: string; +} + +export interface ToolTipInitializeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Text to be displayed in tooltip. Set this option to customize the text displayed in tooltip + */ + currentText?: string; + + /**Index of the point on which mouse is hovered + */ + pointIndex?: number; + + /**Index of the series in series collection whose point is hovered by mouse + */ + seriesIndex?: number; +} + +export interface TrackAxisToolTipEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Location of the crosshair label in pixels + */ + location?: any; + + /**Index of the axis for which crosshair label is displayed + */ + axisIndex?: number; + + /**Instance of the chart axis object for which cross hair label is displayed + */ + crossAxis?: number; + + /**Text to be displayed in crosshair label. Use this option to add custom text in crosshair label + */ + currentTrackText?: string; +} + +export interface TrackToolTipEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Location of the trackball tooltip in pixels + */ + location?: any; + + /**Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; + + /**Index of the series in series collection + */ + seriesIndex?: number; + + /**Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; + + /**Instance of the series object for which trackball tooltip is displayed. + */ + series?: any; +} + +export interface AxisLabelClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the labels in chart area. + */ + location?: any; + + /**Index of the label. + */ + index?: number; + + /**Instance of the corresponding axis. + */ + axis?: any; + + /**Label that is clicked. + */ + text?: string; +} + +export interface AxisLabelMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the labels in chart area. + */ + location?: any; + + /**Index of the label. + */ + index?: number; + + /**Instance of the corresponding axis. + */ + axis?: any; + + /**Label that is hovered. + */ + text?: string; +} + +export interface ChartClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface ChartMouseMoveEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface ChartDoubleClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the points with respect to chart area. + */ + location?: any; + + /**ID of the target element. + */ + id?: string; + + /**Width and height of the chart. + */ + size?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface AnnotationClickEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**X and Y co-ordinate of the annotation in chart area. + */ + location?: any; + + /**Information about the annotation, like Coordinate unit, Region, content + */ + contentData?: any; + + /**x-coordinate of the pointer, relative to the page + */ + pageX?: number; + + /**y-coordinate of the pointer, relative to the page + */ + pageY?: number; +} + +export interface AfterResizeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Chart width, after resize + */ + width?: number; + + /**Chart height, after resize + */ + height?: number; + + /**Chart width, before resize + */ + prevWidth?: number; + + /**Chart height, before resize + */ + prevHeight?: number; + + /**Chart width, when the chart was first rendered + */ + originalWidth?: number; + + /**Chart height, when the chart was first rendered + */ + originalHeight?: number; +} + +export interface BeforeResizeEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Chart width, before resize + */ + currentWidth?: number; + + /**Chart height, before resize + */ + currentHeight?: number; + + /**Chart width, after resize + */ + newWidth?: number; + + /**Chart height, after resize + */ + newHeight?: number; +} + +export interface ErrorBarRenderingEventArgs { + + /**Set this option to true to cancel the event + */ + cancel?: boolean; + + /**Instance of the chart model object + */ + model?: any; + + /**Name of the event + */ + type?: string; + + /**Error bar Object + */ + errorbar?: any; +} + +export interface AnnotationsMargin { + + /**Annotation is placed at the specified value above its original position. + * @Default {0} + */ + bottom?: number; + + /**Annotation is placed at the specified value from left side of its original position. + * @Default {0} + */ + left?: number; + + /**Annotation is placed at the specified value from the right side of its original position. + * @Default {0} + */ + right?: number; + + /**Annotation is placed at the specified value under its original position. + * @Default {0} + */ + top?: number; +} + +export interface Annotations { + + /**Angle to rotate the annotation in degrees. + * @Default {'0'} + */ + angle?: number; + + /**Text content or id of a HTML element to be displayed as annotation. + */ + content?: string; + + /**Specifies how annotations have to be placed in Chart. + * @Default {none. See CoordinateUnit} + */ + coordinateUnit?: ej.datavisualization.Chart.CoordinateUnit|string; + + /**Specifies the horizontal alignment of the annotation. + * @Default {middle. See HorizontalAlignment} + */ + horizontalAlignment?: ej.datavisualization.Chart.HorizontalAlignment|string; + + /**Options to customize the margin of annotation. + */ + margin?: AnnotationsMargin; + + /**Controls the opacity of the annotation. + * @Default {1} + */ + opacity?: number; + + /**Specifies whether annotation has to be placed with respect to chart or series. + * @Default {chart. See Region} + */ + region?: ej.datavisualization.Chart.Region|string; + + /**Specifies the vertical alignment of the annotation. + * @Default {middle. See VerticalAlignment} + */ + verticalAlignment?: ej.datavisualization.Chart.VerticalAlignment|string; + + /**Controls the visibility of the annotation. + * @Default {false} + */ + visible?: boolean; + + /**Represents the horizontal offset when coordinateUnit is pixels.when coordinateUnit is points, it represents the x-coordinate of axis bounded with xAxisName property or primary X axis when xAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + x?: number; + + /**Name of the horizontal axis to be used for positioning the annotation. This property is applicable only when coordinateUnit is points. + */ + xAxisName?: string; + + /**Represents the vertical offset when coordinateUnit is pixels.When coordinateUnit is points, it represents the y-coordinate of axis bounded with yAxisName property or primary Y axis when yAxisName is not provided.This property is not applicable when coordinateUnit is none. + * @Default {0} + */ + y?: number; + + /**Name of the vertical axis to be used for positioning the annotation.This property is applicable only when coordinateUnit is points. + */ + yAxisName?: string; +} + +export interface Border { + + /**Border color of the chart. + * @Default {null} + */ + color?: string; + + /**Opacity of the chart border. + * @Default {0.3} + */ + opacity?: number; + + /**Width of the Chart border. + * @Default {0} + */ + width?: number; +} + +export interface ChartAreaBorder { + + /**Border color of the plot area. + * @Default {Gray} + */ + color?: string; + + /**Opacity of the plot area border. + * @Default {0.3} + */ + opacity?: number; + + /**Border width of the plot area. + * @Default {0.5} + */ + width?: number; +} + +export interface ChartArea { + + /**Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /**Options for customizing the border of the plot area. + */ + border?: ChartAreaBorder; +} + +export interface ColumnDefinitions { + + /**Specifies the unit to measure the width of the column in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /**Width of the column in plotting area. Width is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + columnWidth?: number; + + /**Color of the line that indicates the starting point of the column in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /**Width of the line that indicates the starting point of the column in plot area. + * @Default {1} + */ + lineWidth?: number; +} + +export interface CommonSeriesOptionsBorder { + + /**Border color of all series. + * @Default {transparent} + */ + color?: string; + + /**DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; + + /**Border width of all series. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsFont { + + /**Font color of the text in all series. + * @Default {#707070} + */ + color?: string; + + /**Font Family for all the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the font Style for all the series. + * @Default {normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Specifies the font weight for all the series. + * @Default {regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity for text in all the series. + * @Default {1} + */ + opacity?: number; + + /**Font size for text in all the series. + * @Default {12px} + */ + size?: string; +} + +export interface CommonSeriesOptionsMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface CommonSeriesOptionsMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface CommonSeriesOptionsMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: CommonSeriesOptionsMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: CommonSeriesOptionsMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: CommonSeriesOptionsMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: CommonSeriesOptionsMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {none. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Name of a field in data source, where datalabel text is displayed. + */ + textMappingName?: string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {center} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface CommonSeriesOptionsMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: CommonSeriesOptionsMarkerBorder; + + /**Options for displaying and customizing data labels. + */ + dataLabel?: CommonSeriesOptionsMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: CommonSeriesOptionsMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsTooltipBorder { + + /**Border color of the tooltip. + * @Default {null} + */ + color?: string; + + /**Border width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsTooltip { + + /**Options for customizing the border of the tooltip. + */ + border?: CommonSeriesOptionsTooltipBorder; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /**Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the animation of the tooltip when moving from one point to other. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /**Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Opacity of the tooltip. + * @Default {0.5} + */ + opacity?: number; + + /**Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /**Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface CommonSeriesOptionsEmptyPointSettingsStyleBorder { + + /**Border color of the empty point. + */ + color?: string; + + /**Border width of the empty point. + * @Default {1} + */ + width?: number; +} + +export interface CommonSeriesOptionsEmptyPointSettingsStyle { + + /**Color of the empty point. + */ + color?: string; + + /**Options for customizing border of the empty point in the series. + */ + border?: CommonSeriesOptionsEmptyPointSettingsStyleBorder; +} + +export interface CommonSeriesOptionsEmptyPointSettings { + + /**Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /**Options for customizing the color and border of the empty point in the series. + */ + style?: CommonSeriesOptionsEmptyPointSettingsStyle; +} + +export interface CommonSeriesOptionsConnectorLine { + + /**Width of the connector line. + * @Default {1} + */ + width?: number; + + /**Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /**DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /**DashArray of the connector line. + * @Default {1} + */ + opacity?: number; +} + +export interface CommonSeriesOptionsErrorBarCap { + + /**Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /**Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /**Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /**Color of the error bar cap. + * @Default {“#000000”} + */ + fill?: string; +} + +export interface CommonSeriesOptionsErrorBar { + + /**Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /**Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /**Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /**Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /**Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /**Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /**Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /**Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /**Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /**Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /**Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /**Width of the error bar. + * @Default {1} + */ + width?: number; + + /**Options for customizing the error bar cap. + */ + cap?: CommonSeriesOptionsErrorBarCap; +} + +export interface CommonSeriesOptionsTrendlines { + + /**Show/hides the trendline. + */ + visibility?: boolean; + + /**Specifies the type of the trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /**Name for the trendlines that is to be displayed in the legend text. + * @Default {trendline} + */ + name?: string; + + /**Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /**Width of the trendlines. + * @Default {1} + */ + width?: number; + + /**Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /**Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /**Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /**Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /**Specifies the order of the polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /**Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; +} + +export interface CommonSeriesOptionsHighlightSettingsBorder { + + /**Border color of the series/point on highlight. + */ + color?: string; + + /**Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; +} + +export interface CommonSeriesOptionsHighlightSettings { + + /**Enables/disables the ability to highlight the series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether the series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on highlight. + */ + color?: string; + + /**Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on highlight. + */ + border?: CommonSeriesOptionsHighlightSettingsBorder; + + /**Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on highlight. + */ + customPattern?: string; +} + +export interface CommonSeriesOptionsSelectionSettingsBorder { + + /**Border color of the series/point on selection. + */ + color?: string; + + /**Border width of the series/point on selection. + * @Default {2} + */ + width?: string; +} + +export interface CommonSeriesOptionsSelectionSettings { + + /**Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /**Specifies whether the series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on selection. + */ + color?: string; + + /**Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of the series on selection. + */ + border?: CommonSeriesOptionsSelectionSettingsBorder; + + /**Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on selection. + */ + customPattern?: string; +} + +export interface CommonSeriesOptions { + + /**Options to customize the border of all the series. + */ + border?: CommonSeriesOptionsBorder; + + /**Pattern of dashes and gaps used to stroke all the line type series. + */ + dashArray?: string; + + /**Set the dataSource for all series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Controls the size of the hole in doughnut series. Value ranges from 0 to 1 + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /**Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /**Specifies the type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: ej.datavisualization.Chart.DrawType|string; + + /**Enable/disable the animation for all the series. + * @Default {true} + */ + enableAnimation?: boolean; + + /**To avoid overlapping of data labels smartly. + * @Default {true} + */ + enableSmartLabels?: boolean; + + /**Start angle of pie/doughnut series. + * @Default {null} + */ + endAngle?: number; + + /**Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /**Explodes all the slice of pie/doughnut on render. + * @Default {false} + */ + explodeAll?: boolean; + + /**Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /**Specifies the distance of the slice from the center, when it is exploded. + * @Default {0.4} + */ + explodeOffset?: number; + + /**Fill color for all the series. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the font of all the series. + */ + font?: CommonSeriesOptionsFont; + + /**Sets the height of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /**Sets the width of the funnel in funnel series. Values can be either pixel or percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /**Gap between the slices in pyramid and funnel series. + * @Default {0} + */ + gapRatio?: number; + + /**Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /**Specifies whether to stack the column series in polar/radar charts. + * @Default {false} + */ + isStacking?: boolean; + + /**Renders the chart vertically. This is applicable only for cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /**Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Specifies the line cap of the series. + * @Default {butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /**Specifies the type of shape to be used where two lines meet. + * @Default {round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /**Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: CommonSeriesOptionsMarker; + + /**Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /**Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /**Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /**Specifies the mode of the pyramid series. + * @Default {linear. See PyramidMode} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /**Start angle from where the pie/doughnut series renders. By default it starts from 0. + * @Default {null} + */ + startAngle?: number; + + /**Options for customizing the tooltip of chart. + */ + tooltip?: CommonSeriesOptionsTooltip; + + /**Specifies the type of the series to render in chart. + * @Default {column. See Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /**Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /**Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /**Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /**Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /**Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /**Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /**Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /**Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /**Options for customizing the empty point in the series. + */ + emptyPointSettings?: CommonSeriesOptionsEmptyPointSettings; + + /**Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /**Options for customizing the waterfall connector line. + */ + connectorLine?: CommonSeriesOptionsConnectorLine; + + /**Options to customize the error bar in series. + */ + errorBar?: CommonSeriesOptionsErrorBar; + + /**Option to add the trendlines to chart. + */ + trendlines?: Array; + + /**Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: CommonSeriesOptionsHighlightSettings; + + /**Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: CommonSeriesOptionsSelectionSettings; +} + +export interface CrosshairMarkerBorder { + + /**Border width of the marker. + * @Default {3} + */ + width?: number; +} + +export interface CrosshairMarkerSize { + + /**Height of the marker. + * @Default {10} + */ + height?: number; + + /**Width of the marker. + * @Default {10} + */ + width?: number; +} + +export interface CrosshairMarker { + + /**Options for customizing the border. + */ + border?: CrosshairMarkerBorder; + + /**Opacity of the marker. + * @Default {true} + */ + opacity?: boolean; + + /**Options for customizing the size of the marker. + */ + size?: CrosshairMarkerSize; + + /**Show/hides the marker. + * @Default {true} + */ + visible?: boolean; +} + +export interface Crosshair { + + /**Options for customizing the marker in crosshair. + */ + marker?: CrosshairMarker; + + /**Specifies the type of the crosshair. It can be trackball or crosshair + * @Default {crosshair. See CrosshairType} + */ + type?: ej.datavisualization.Chart.CrosshairType|string; + + /**Show/hides the crosshair/trackball visibility. + * @Default {false} + */ + visible?: boolean; +} + +export interface IndicatorsHistogramBorder { + + /**Color of the histogram border in MACD indicator. + * @Default {#9999ff} + */ + color?: string; + + /**Controls the width of histogram border line in MACD indicator. + * @Default {1} + */ + width?: number; +} + +export interface IndicatorsHistogram { + + /**Options to customize the histogram border in MACD indicator. + */ + border?: IndicatorsHistogramBorder; + + /**Color of histogram columns in MACD indicator. + * @Default {#ccccff} + */ + fill?: string; + + /**Opacity of histogram columns in MACD indicator. + * @Default {1} + */ + opacity?: number; +} + +export interface IndicatorsLowerLine { + + /**Color of lower line. + * @Default {#008000} + */ + fill?: string; + + /**Width of the lower line. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsMacdLine { + + /**Color of MACD line. + * @Default {#ff9933} + */ + fill?: string; + + /**Width of the MACD line. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsPeriodLine { + + /**Color of period line in indicator. + * @Default {blue} + */ + fill?: string; + + /**Width of the period line in indicators. + * @Default {2} + */ + width?: number; +} + +export interface IndicatorsTooltipBorder { + + /**Border color of indicator tooltip. + * @Default {null} + */ + color?: string; + + /**Border width of indicator tooltip. + * @Default {1} + */ + width?: number; +} + +export interface IndicatorsTooltip { + + /**Option to customize the border of indicator tooltip. + */ + border?: IndicatorsTooltipBorder; + + /**Specifies the animation duration of indicator tooltip. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the tooltip animation. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Format of indicator tooltip. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Background color of indicator tooltip. + * @Default {null} + */ + fill?: string; + + /**Opacity of indicator tooltip. + * @Default {0.95} + */ + opacity?: number; + + /**Controls the visibility of indicator tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface IndicatorsUpperLine { + + /**Fill color of the upper line in indicators + * @Default {#ff9933} + */ + fill?: string; + + /**Width of the upper line in indicators. + * @Default {2} + */ + width?: number; +} + +export interface Indicators { + + /**The dPeriod value for stochastic indicator. + * @Default {3} + */ + dPeriod?: number; + + /**Enables/disables the animation. + * @Default {false} + */ + enableAnimation?: boolean; + + /**Color of the technical indicator. + * @Default {#00008B} + */ + fill?: string; + + /**Options to customize the histogram in MACD indicator. + */ + histogram?: IndicatorsHistogram; + + /**Specifies the k period in stochastic indicator. + * @Default {3} + */ + kPeriod?: number; + + /**Specifies the long period in MACD indicator. + * @Default {26} + */ + longPeriod?: number; + + /**Options to customize the lower line in indicators. + */ + lowerLine?: IndicatorsLowerLine; + + /**Options to customize the MACD line. + */ + macdLine?: IndicatorsMacdLine; + + /**Specifies the type of the MACD indicator. + * @Default {line. See MACDType} + */ + macdType?: string; + + /**Specifies period value in indicator. + * @Default {14} + */ + period?: number; + + /**Options to customize the period line in indicators. + */ + periodLine?: IndicatorsPeriodLine; + + /**Name of the series for which indicator has to be drawn. + */ + seriesName?: string; + + /**Specifies the short period in MACD indicator. + * @Default {13} + */ + shortPeriod?: number; + + /**Specifies the standard deviation value for Bollinger band indicator. + * @Default {2} + */ + standardDeviations?: number; + + /**Options to customize the tooltip. + */ + tooltip?: IndicatorsTooltip; + + /**Trigger value of MACD indicator. + * @Default {9} + */ + trigger?: number; + + /**Specifies the visibility of indicator. + * @Default {visible} + */ + visibility?: string; + + /**Specifies the type of indicator that has to be rendered. + * @Default {sma. See IndicatorsType} + */ + type?: string; + + /**Options to customize the upper line in indicators + */ + upperLine?: IndicatorsUpperLine; + + /**Width of the indicator line. + * @Default {2} + */ + width?: number; + + /**Name of the horizontal axis used for indicator. Primary X axis is used when x axis name is not specified. + */ + xAxisName?: string; + + /**Name of the vertical axis used for indicator. Primary Y axis is used when y axis name is not specified + */ + yAxisName?: string; +} + +export interface LegendBorder { + + /**Border color of the legend. + * @Default {transparent} + */ + color?: string; + + /**Border width of the legend. + * @Default {1} + */ + width?: number; +} + +export interface LegendFont { + + /**Font family for legend item text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for legend item text. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for legend item text. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Font size for legend item text. + * @Default {12px} + */ + size?: string; +} + +export interface LegendItemStyleBorder { + + /**Border color of the legend items. + * @Default {transparent} + */ + color?: string; + + /**Border width of the legend items. + * @Default {1} + */ + width?: number; +} + +export interface LegendItemStyle { + + /**Options for customizing the border of legend items. + */ + border?: LegendItemStyleBorder; + + /**Height of the shape in legend items. + * @Default {10} + */ + height?: number; + + /**Width of the shape in legend items. + * @Default {10} + */ + width?: number; +} + +export interface LegendLocation { + + /**X value or horizontal offset to position the legend in chart. + * @Default {0} + */ + x?: number; + + /**Y value or vertical offset to position the legend. + * @Default {0} + */ + y?: number; +} + +export interface LegendSize { + + /**Height of the legend. Height can be specified in either pixel or percentage. + * @Default {null} + */ + height?: string; + + /**Width of the legend. Width can be specified in either pixel or percentage. + * @Default {null} + */ + width?: string; +} + +export interface LegendTitleFont { + + /**Font family for the text in legend title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for legend title. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for legend title. + * @Default {normal. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Font size for legend title. + * @Default {12px} + */ + size?: string; +} + +export interface LegendTitle { + + /**Options to customize the font used for legend title + */ + font?: LegendTitleFont; + + /**Text to be displayed in legend title. + */ + text?: string; + + /**Alignment of the legend title. + * @Default {center. See Alignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Legend { + + /**Horizontal alignment of the legend. + * @Default {Center. See Alignment} + */ + alignment?: ej.datavisualization.Chart.Alignment|string; + + /**Background for the legend. Use this property to add a background image or background color for the legend. + */ + background?: string; + + /**Options for customizing the legend border. + */ + border?: LegendBorder; + + /**Number of columns to arrange the legend items. + * @Default {null} + */ + columnCount?: number; + + /**Controls whether legend has to use scrollbar or not. When enabled, scroll bar appears depending upon size and position properties of legend. + * @Default {true} + */ + enableScrollbar?: boolean; + + /**Fill color for the legend items. By using this property, it displays all legend item shapes in same color.Legend items representing invisible series is displayed in gray color. + * @Default {null} + */ + fill?: string; + + /**Options to customize the font used for legend item text. + */ + font?: LegendFont; + + /**Gap or padding between the legend items. + * @Default {10} + */ + itemPadding?: number; + + /**Options to customize the style of legend items. + */ + itemStyle?: LegendItemStyle; + + /**Options to customize the location of chart legend. Legend is placed in provided location only when value of position property is custom + */ + location?: LegendLocation; + + /**Opacity of the legend. + * @Default {1} + */ + opacity?: number; + + /**Places the legend at specified position. Legend can be placed at left, right, top or bottom of the chart area.To manually specify the location of legend, set custom as value to this property. + * @Default {Bottom. See Position} + */ + position?: ej.datavisualization.Chart.Position|string; + + /**Number of rows to arrange the legend items. + * @Default {null} + */ + rowCount?: number; + + /**Shape of the legend items. Default shape for pie and doughnut series is circle and all other series uses rectangle. + * @Default {None. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options to customize the size of the legend. + */ + size?: LegendSize; + + /**Options to customize the legend title. + */ + title?: LegendTitle; + + /**Specifies the action taken when the legend width is more than the textWidth. + * @Default {none. See textOverflow} + */ + textOverflow?: ej.datavisualization.Chart.TextOverflow|string; + + /**Text width for legend item. + * @Default {34} + */ + textWidth?: number; + + /**Controls the visibility of the legend. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryXAxisAlternateGridBandEven { + + /**Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryXAxisAlternateGridBandOdd { + + /**Fill color of the odd grid bands + * @Default {transparent} + */ + fill?: string; + + /**Opacity of odd grid band + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryXAxisAlternateGridBand { + + /**Options for customizing even grid band. + */ + even?: PrimaryXAxisAlternateGridBandEven; + + /**Options for customizing odd grid band. + */ + odd?: PrimaryXAxisAlternateGridBandOdd; +} + +export interface PrimaryXAxisAxisLine { + + /**Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /**Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /**Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /**Width of axis line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisCrosshairLabel { + + /**Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; +} + +export interface PrimaryXAxisFont { + + /**Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis labels. + * @Default {13px} + */ + size?: string; +} + +export interface PrimaryXAxisMajorGridLines { + + /**Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /**Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major grid lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMajorTickLines { + + /**Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major tick lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMinorGridLines { + + /**Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minorGridLines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisMinorTickLines { + + /**Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minor tick line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryXAxisRange { + + /**Minimum value of the axis range. + * @Default {null} + */ + minimum?: number; + + /**Maximum value of the axis range. + * @Default {null} + */ + maximum?: number; + + /**Interval of the axis range. + * @Default {null} + */ + interval?: number; +} + +export interface PrimaryXAxisStripLineFont { + + /**Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /**Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /**Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the strip line text. + * @Default {12px} + */ + size?: string; +} + +export interface PrimaryXAxisStripLine { + + /**Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /**Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /**End value of the strip line. + * @Default {null} + */ + end?: number; + + /**Options for customizing the font of the text. + */ + font?: PrimaryXAxisStripLineFont; + + /**Start value of the strip line. + * @Default {null} + */ + start?: number; + + /**Indicates whether to render the strip line from the minimum/start value of the axis. This property does not work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /**Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /**Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /**Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /**Width of the strip line. + * @Default {0} + */ + width?: number; + + /**Specifies the order where the strip line and the series have to be rendered. When zOrder is “behind”, strip line is rendered under the series and when it is “over”, it is rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; +} + +export interface PrimaryXAxisTitleFont { + + /**Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis title. + * @Default {16px} + */ + size?: string; +} + +export interface PrimaryXAxisTitle { + + /**Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the title font. + */ + font?: PrimaryXAxisTitleFont; + + /**Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {34} + */ + maximumTitleWidth?: number; + + /**Title for the axis. + */ + text?: string; + + /**Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryXAxis { + + /**Options for customizing horizontal axis alternate grid band. + */ + alternateGridBand?: PrimaryXAxisAlternateGridBand; + + /**Options for customizing the axis line. + */ + axisLine?: PrimaryXAxisAxisLine; + + /**Specifies the index of the column where the axis is associated, when the chart area is divided into multiple plot areas by using columnDefinitions. + * @Default {null} + */ + columnIndex?: number; + + /**Specifies the number of columns or plot areas an axis has to span horizontally. + * @Default {null} + */ + columnSpan?: number; + + /**Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryXAxisCrosshairLabel; + + /**With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /**Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /**Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the font of the axis Labels. + */ + font?: PrimaryXAxisFont; + + /**Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /**Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /**Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /**Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None. See LabelIntersectAction} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /**Specifies the position of the axis labels. + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Angle in degrees to rotate the axis labels. + * @Default {null} + */ + labelRotation?: number; + + /**Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /**Options for customizing major gird lines. + */ + majorGridLines?: PrimaryXAxisMajorGridLines; + + /**Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryXAxisMajorTickLines; + + /**Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /**Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {34} + */ + maximumLabelWidth?: number; + + /**Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryXAxisMinorGridLines; + + /**Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryXAxisMinorTickLines; + + /**Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /**Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /**Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /**Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /**Options to customize the range of the axis. + */ + range?: PrimaryXAxisRange; + + /**Specifies the padding for the axis range. + * @Default {None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /**Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /**Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: Array; + + /**Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /**Options for customizing the axis title. + */ + title?: PrimaryXAxisTitle; + + /**Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /**Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /**The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Value ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /**Position of the zoomed axis. Value ranges from 0 to 1. + * @Default {0} + */ + zoomPosition?: number; +} + +export interface PrimaryYAxisAlternateGridBandEven { + + /**Fill color for the even grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of the even grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryYAxisAlternateGridBandOdd { + + /**Fill color of the odd grid bands. + * @Default {transparent} + */ + fill?: string; + + /**Opacity of odd grid band. + * @Default {1} + */ + opacity?: number; +} + +export interface PrimaryYAxisAlternateGridBand { + + /**Options for customizing even grid band. + */ + even?: PrimaryYAxisAlternateGridBandEven; + + /**Options for customizing odd grid band. + */ + odd?: PrimaryYAxisAlternateGridBandOdd; +} + +export interface PrimaryYAxisAxisLine { + + /**Pattern of dashes and gaps to be applied to the axis line. + * @Default {null} + */ + dashArray?: string; + + /**Padding for axis line. Normally, it is used along with plotOffset to pad the plot area. + * @Default {null} + */ + offset?: number; + + /**Show/hides the axis line. + * @Default {true} + */ + visible?: boolean; + + /**Width of axis line. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisCrosshairLabel { + + /**Show/hides the crosshair label associated with this axis. + * @Default {false} + */ + visible?: boolean; +} + +export interface PrimaryYAxisFont { + + /**Font family of labels. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of labels. + * @Default {ej.datavisualization.Chart.FontStyle.Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the label. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis labels. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis labels. + * @Default {13px} + */ + size?: string; +} + +export interface PrimaryYAxisMajorGridLines { + + /**Pattern of dashes and gaps used to stroke the major grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Opacity of major grid lines. + * @Default {1} + */ + opacity?: number; + + /**Show/hides the major grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major grid lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMajorTickLines { + + /**Length of the major tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the major tick lines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMinorGridLines { + + /**Patterns of dashes and gaps used to stroke the minor grid lines. + * @Default {null} + */ + dashArray?: string; + + /**Show/hides the minor grid lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minorGridLines. + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisMinorTickLines { + + /**Length of the minor tick lines. + * @Default {5} + */ + size?: number; + + /**Show/hides the minor tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Width of the minor tick line + * @Default {1} + */ + width?: number; +} + +export interface PrimaryYAxisStripLineFont { + + /**Font color of the strip line text. + * @Default {black} + */ + color?: string; + + /**Font family of the strip line text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the strip line text. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the strip line text. + * @Default {regular} + */ + fontWeight?: string; + + /**Opacity of the strip line text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the strip line text. + * @Default {12px} + */ + size?: string; +} + +export interface PrimaryYAxisStripLine { + + /**Border color of the strip line. + * @Default {gray} + */ + borderColor?: string; + + /**Background color of the strip line. + * @Default {gray} + */ + color?: string; + + /**End value of the strip line. + * @Default {null} + */ + end?: number; + + /**Options for customizing the font of the text. + */ + font?: PrimaryYAxisStripLineFont; + + /**Start value of the strip line. + * @Default {null} + */ + start?: number; + + /**Indicates whether to render the strip line from the minimum/start value of the axis. This property won’t work when start property is set. + * @Default {false} + */ + startFromAxis?: boolean; + + /**Specifies text to be displayed inside the strip line. + * @Default {stripLine} + */ + text?: string; + + /**Specifies the alignment of the text inside the strip line. + * @Default {middlecenter. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.TextAlignment|string; + + /**Show/hides the strip line. + * @Default {false} + */ + visible?: boolean; + + /**Width of the strip line. + * @Default {0} + */ + width?: number; + + /**Specifies the order in which strip line and the series have to be rendered. When zOrder is “behind”, strip line is rendered below the series and when it is “over”, it is rendered above the series. + * @Default {over. See ZIndex} + */ + zIndex?: ej.datavisualization.Chart.ZIndex|string; +} + +export interface PrimaryYAxisTitleFont { + + /**Font family of the title text. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the title text. + * @Default {ej.datavisualization.Chart.FontStyle.Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the title text. + * @Default {ej.datavisualization.Chart.FontWeight.Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the axis title text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the axis title. + * @Default {16px} + */ + size?: string; +} + +export interface PrimaryYAxisTitle { + + /**Specifies whether to trim the axis title when it exceeds the chart area or the maximum width of the title. + * @Default {ej.datavisualization.Chart.enableTrim} + */ + enableTrim?: boolean; + + /**Options for customizing the title font. + */ + font?: PrimaryYAxisTitleFont; + + /**Maximum width of the title, when the title exceeds this width, the title gets trimmed, when enableTrim is true. + * @Default {ej.datavisualization.Chart.maximumTitleWidth.null} + */ + maximumTitleWidth?: number; + + /**Title for the axis. + */ + text?: string; + + /**Controls the visibility of axis title. + * @Default {true} + */ + visible?: boolean; +} + +export interface PrimaryYAxis { + + /**Options for customizing vertical axis alternate grid band. + */ + alternateGridBand?: PrimaryYAxisAlternateGridBand; + + /**Options for customizing the axis line. + */ + axisLine?: PrimaryYAxisAxisLine; + + /**Options to customize the crosshair label. + */ + crosshairLabel?: PrimaryYAxisCrosshairLabel; + + /**With this setting, you can request axis to calculate intervals approximately equal to your desired interval. + * @Default {null} + */ + desiredIntervals?: number; + + /**Specifies the position of labels at the edge of the axis. + * @Default {ej.datavisualization.Chart.EdgeLabelPlacement.None. See EdgeLabelPlacement} + */ + edgeLabelPlacement?: ej.datavisualization.Chart.EdgeLabelPlacement|string; + + /**Specifies whether to trim the axis label when the width of the label exceeds the maximumLabelWidth. + * @Default {false} + */ + enableTrim?: boolean; + + /**Options for customizing the font of the axis Labels. + */ + font?: PrimaryYAxisFont; + + /**Specifies the type of interval in date time axis. + * @Default {null. See IntervalType} + */ + intervalType?: ej.datavisualization.Chart.IntervalType|string; + + /**Specifies whether to inverse the axis. + * @Default {false} + */ + isInversed?: boolean; + + /**Custom formatting for axis label and supports all standard formatting type of numerical and date time values. + * @Default {null} + */ + labelFormat?: string; + + /**Specifies the action to take when the axis labels are overlapping with each other. + * @Default {ej.datavisualization.Chart.LabelIntersectAction.None} + */ + labelIntersectAction?: ej.datavisualization.Chart.LabelIntersectAction|string; + + /**Default Value + * @Default {outside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Logarithmic base value. This is applicable only for logarithmic axis. + * @Default {10} + */ + logBase?: number; + + /**Options for customizing major gird lines. + */ + majorGridLines?: PrimaryYAxisMajorGridLines; + + /**Options for customizing the major tick lines. + */ + majorTickLines?: PrimaryYAxisMajorTickLines; + + /**Maximum number of labels to be displayed in every 100 pixels. + * @Default {3} + */ + maximumLabels?: number; + + /**Maximum width of the axis label. When the label exceeds the width, the label gets trimmed when the enableTrim is set to true. + * @Default {ej.datavisualization.Chart.maximumLabelWidth type {int}} + */ + maximumLabelWidth?: number; + + /**Options for customizing the minor grid lines. + */ + minorGridLines?: PrimaryYAxisMinorGridLines; + + /**Options for customizing the minor tick lines. + */ + minorTickLines?: PrimaryYAxisMinorTickLines; + + /**Specifies the number of minor ticks per interval. + * @Default {null} + */ + minorTicksPerInterval?: number; + + /**Unique name of the axis. To associate an axis with the series, you have to set this name to the xAxisName/yAxisName property of the series. + * @Default {null} + */ + name?: string; + + /**Specifies whether to render the axis at the opposite side of its default position. + * @Default {false} + */ + opposedPosition?: boolean; + + /**Specifies the padding for the plot area. + * @Default {10} + */ + plotOffset?: number; + + /**Specifies the padding for the axis range. + * @Default {ej.datavisualization.Chart.RangePadding.None. See RangePadding} + */ + rangePadding?: ej.datavisualization.Chart.RangePadding|string; + + /**Rounds the number to the given number of decimals. + * @Default {null} + */ + roundingPlaces?: number; + + /**Specifies the index of the row to which the axis is associated, when the chart area is divided into multiple plot areas by using rowDefinitions. + * @Default {null} + */ + rowIndex?: number; + + /**Specifies the number of row or plot areas an axis has to span vertically. + * @Default {null} + */ + rowSpan?: number; + + /**Options for customizing the strip lines. + * @Default {[ ]} + */ + stripLine?: Array; + + /**Specifies the position of the axis tick lines. + * @Default {outside. See TickLinesPosition} + */ + tickLinesPosition?: ej.datavisualization.Chart.TickLinesPosition|string; + + /**Options for customizing the axis title. + */ + title?: PrimaryYAxisTitle; + + /**Specifies the type of data the axis is handling. + * @Default {null. See ValueType} + */ + valueType?: ej.datavisualization.Chart.ValueType|string; + + /**Show/hides the axis. + * @Default {true} + */ + visible?: boolean; + + /**The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis. Values ranges from 0 to 1. + * @Default {1} + */ + zoomFactor?: number; + + /**Position of the zoomed axis. Value ranges from 0 to 1 + * @Default {0} + */ + zoomPosition?: number; +} + +export interface RowDefinitions { + + /**Specifies the unit to measure the height of the row in plotting area. + * @Default {'pixel'. See Unit} + */ + unit?: ej.datavisualization.Chart.Unit|string; + + /**Height of the row in plotting area. Height is measured in either pixel or percentage based on the value of unit property. + * @Default {50} + */ + rowHeight?: number; + + /**Color of the line that indicates the starting point of the row in plotting area. + * @Default {transparent} + */ + lineColor?: string; + + /**Width of the line that indicates the starting point of the row in plot area. + * @Default {1} + */ + lineWidth?: number; +} + +export interface SeriesBorder { + + /**Border color of the series. + * @Default {transparent} + */ + color?: string; + + /**Border width of the series. + * @Default {1} + */ + width?: number; + + /**DashArray for border of the series. + * @Default {null} + */ + dashArray?: string; +} + +export interface SeriesFont { + + /**Font color of the series text. + * @Default {#707070} + */ + color?: string; + + /**Font Family of the series. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font Style of the series. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the series. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of series text. + * @Default {1} + */ + opacity?: number; + + /**Size of the series text. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface SeriesMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface SeriesMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: SeriesMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: SeriesMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Name of a field in data source where datalabel text is displayed. + */ + textMappingName?: string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /**Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /**Moves the label vertically by some offset. + * @Default {0} + */ + offset?: number; +} + +export interface SeriesMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface SeriesMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: SeriesMarkerBorder; + + /**Options for displaying and customizing data labels. + */ + dataLabel?: SeriesMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: SeriesMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesEmptyPointSettingsStyleBorder { + + /**Border color of the empty point. + */ + color?: string; + + /**Border width of the empty point. + * @Default {1} + */ + width?: number; +} + +export interface SeriesEmptyPointSettingsStyle { + + /**Color of the empty point. + */ + color?: string; + + /**Options for customizing border of the empty point in the series. + */ + border?: SeriesEmptyPointSettingsStyleBorder; +} + +export interface SeriesEmptyPointSettings { + + /**Controls the visibility of the empty point. + * @Default {true} + */ + visible?: boolean; + + /**Specifies the mode of empty point. + * @Default {gap} + */ + displayMode?: ej.datavisualization.Chart.EmptyPointMode|string; + + /**Options for customizing the color and border of the empty point in the series. + */ + style?: SeriesEmptyPointSettingsStyle; +} + +export interface SeriesConnectorLine { + + /**Width of the connector line. + * @Default {1} + */ + width?: number; + + /**Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /**DashArray of the connector line. + * @Default {null} + */ + dashArray?: string; + + /**DashArray of the connector line. + * @Default {1} + */ + opacity?: number; +} + +export interface SeriesErrorBarCap { + + /**Show/Hides the error bar cap. + * @Default {true} + */ + visible?: boolean; + + /**Width of the error bar cap. + * @Default {1} + */ + width?: number; + + /**Length of the error bar cap. + * @Default {1} + */ + length?: number; + + /**Color of the error bar cap. + * @Default {#000000} + */ + fill?: string; +} + +export interface SeriesErrorBar { + + /**Show/hides the error bar + * @Default {visible} + */ + visibility?: boolean; + + /**Specifies the type of error bar. + * @Default {FixedValue} + */ + type?: ej.datavisualization.Chart.ErrorBarType|string; + + /**Specifies the mode of error bar. + * @Default {vertical} + */ + mode?: ej.datavisualization.Chart.ErrorBarMode|string; + + /**Specifies the direction of error bar. + * @Default {both} + */ + direction?: ej.datavisualization.Chart.ErrorBarDirection|string; + + /**Value of vertical error bar. + * @Default {3} + */ + verticalErrorValue?: number; + + /**Value of horizontal error bar. + * @Default {1} + */ + horizontalErrorValue?: number; + + /**Value of positive horizontal error bar. + * @Default {1} + */ + horizontalPositiveErrorValue?: number; + + /**Value of negative horizontal error bar. + * @Default {1} + */ + horizontalNegativeErrorValue?: number; + + /**Value of positive vertical error bar. + * @Default {5} + */ + verticalPositiveErrorValue?: number; + + /**Value of negative vertical error bar. + * @Default {5} + */ + verticalNegativeErrorValue?: number; + + /**Fill color of the error bar. + * @Default {#000000} + */ + fill?: string; + + /**Width of the error bar. + * @Default {1} + */ + width?: number; + + /**Options for customizing the error bar cap. + */ + cap?: SeriesErrorBarCap; +} + +export interface SeriesPointsBorder { + + /**Border color of the point. + * @Default {null} + */ + color?: string; + + /**Border width of the point. + * @Default {null} + */ + width?: number; +} + +export interface SeriesPointsMarkerBorder { + + /**Border color of the marker shape. + * @Default {white} + */ + color?: string; + + /**Border width of the marker shape. + * @Default {3} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelBorder { + + /**Border color of the data label. + * @Default {null} + */ + color?: string; + + /**Border width of the data label. + * @Default {0.1} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelConnectorLine { + + /**Specifies when the connector has to be drawn as Bezier curve or straight line. This is applicable only for Pie and Doughnut chart types. + * @Default {line. See ConnectorLineType} + */ + type?: ej.datavisualization.Chart.ConnectorLineType|string; + + /**Width of the connector. + * @Default {0.5} + */ + width?: number; +} + +export interface SeriesPointsMarkerDataLabelFont { + + /**Font family of the data label. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style of the data label. + * @Default {normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight of the data label. + * @Default {regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the text. + * @Default {1} + */ + opacity?: number; + + /**Font size of the data label. + * @Default {12px} + */ + size?: string; +} + +export interface SeriesPointsMarkerDataLabelMargin { + + /**Bottom margin of the text. + * @Default {5} + */ + bottom?: number; + + /**Left margin of the text. + * @Default {5} + */ + left?: number; + + /**Right margin of the text. + * @Default {5} + */ + right?: number; + + /**Top margin of the text. + * @Default {5} + */ + top?: number; +} + +export interface SeriesPointsMarkerDataLabel { + + /**Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate. + * @Default {null} + */ + angle?: number; + + /**Options for customizing the border of the data label. + */ + border?: SeriesPointsMarkerDataLabelBorder; + + /**Options for displaying and customizing the line that connects point and data label. + */ + connectorLine?: SeriesPointsMarkerDataLabelConnectorLine; + + /**Background color of the data label. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the data label font. + */ + font?: SeriesPointsMarkerDataLabelFont; + + /**Horizontal alignment of the data label. + * @Default {center} + */ + horizontalTextAlignment?: ej.datavisualization.Chart.HorizontalTextAlignment|string; + + /**Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text. + */ + margin?: SeriesPointsMarkerDataLabelMargin; + + /**Opacity of the data label. + * @Default {1} + */ + opacity?: number; + + /**Background shape of the data label. + * @Default {No shape is rendered by default, so its value is ‘none’. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Specifies the position of the data label. This property can be used only for the series such as column, bar, stacked column, stacked bar, 100% stacked column, 100% stacked bar, candle and OHLC. + * @Default {top. See TextPosition} + */ + textPosition?: ej.datavisualization.Chart.TextPosition|string; + + /**Vertical alignment of the data label. + * @Default {'center'} + */ + verticalTextAlignment?: ej.datavisualization.Chart.VerticalTextAlignment|string; + + /**Controls the visibility of the data labels. + * @Default {false} + */ + visible?: boolean; + + /**Custom template to format the data label content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + */ + template?: string; + + /**Moves the label vertically by specified offset. + * @Default {0} + */ + offset?: number; +} + +export interface SeriesPointsMarkerSize { + + /**Height of the marker. + * @Default {6} + */ + height?: number; + + /**Width of the marker. + * @Default {6} + */ + width?: number; +} + +export interface SeriesPointsMarker { + + /**Options for customizing the border of the marker shape. + */ + border?: SeriesPointsMarkerBorder; + + /**Options for displaying and customizing data label. + */ + dataLabel?: SeriesPointsMarkerDataLabel; + + /**Color of the marker shape. + * @Default {null} + */ + fill?: string; + + /**The URL for the Image that is to be displayed as marker. In order to display image as marker, set series.marker.shape as ‘image’. + */ + imageUrl?: string; + + /**Opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of the marker. + * @Default {circle. See Shape} + */ + shape?: ej.datavisualization.Chart.Shape|string; + + /**Options for customizing the size of the marker shape. + */ + size?: SeriesPointsMarkerSize; + + /**Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesPoints { + + /**Options for customizing the border of a point. This is applicable only for column type series and accumulation type series. + */ + border?: SeriesPointsBorder; + + /**To show/hide the intermediate summary from the last intermediate point. + * @Default {false} + */ + showIntermediateSum?: boolean; + + /**To show/hide the total summary of the waterfall series. + * @Default {false} + */ + showTotalSum?: boolean; + + /**Close value of the point. Close value is applicable only for financial type series. + * @Default {null} + */ + close?: number; + + /**Size of a bubble in the bubble series. This is applicable only for the bubble series. + * @Default {null} + */ + size?: number; + + /**Background color of the point. This is applicable only for column type series and accumulation type series. + * @Default {null} + */ + fill?: string; + + /**High value of the point. High value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + high?: number; + + /**Low value of the point. Low value is applicable only for financial type series, range area series and range column series. + * @Default {null} + */ + low?: number; + + /**Options for displaying and customizing marker for a data point. Marker contains shapes and/or data labels. + */ + marker?: SeriesPointsMarker; + + /**Open value of the point. This is applicable only for financial type series. + * @Default {null} + */ + open?: number; + + /**Datalabel text for the point. + * @Default {null} + */ + text?: string; + + /**X value of the point. + * @Default {null} + */ + x?: number; + + /**Y value of the point. + * @Default {null} + */ + y?: number; +} + +export interface SeriesTooltipBorder { + + /**Border Color of the tooltip. + * @Default {null} + */ + color?: string; + + /**Border Width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface SeriesTooltip { + + /**Options for customizing the border of the tooltip. + */ + border?: SeriesTooltipBorder; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + rx?: number; + + /**Customize the corner radius of the tooltip rectangle. + * @Default {0} + */ + ry?: number; + + /**Specifies the duration, the tooltip has to be displayed. + * @Default {500ms} + */ + duration?: string; + + /**Enables/disables the animation of the tooltip when moving from one point to another. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Background color of the tooltip. + * @Default {null} + */ + fill?: string; + + /**Format of the tooltip content. + * @Default {#point.x# : #point.y#} + */ + format?: string; + + /**Opacity of the tooltip. + * @Default {0.95} + */ + opacity?: number; + + /**Custom template to format the tooltip content. Use “point.x” and “point.y” as a placeholder text to display the corresponding data point’s x and y value. + * @Default {null} + */ + template?: string; + + /**Controls the visibility of the tooltip. + * @Default {false} + */ + visible?: boolean; +} + +export interface SeriesTrendlines { + + /**Show/hides the trendline. + */ + visibility?: boolean; + + /**Specifies the type of trendline for the series. + * @Default {linear. See TrendlinesType} + */ + type?: string; + + /**Name for the trendlines that is to be displayed in legend text. + * @Default {Trendline} + */ + name?: string; + + /**Fill color of the trendlines. + * @Default {#0000FF} + */ + fill?: string; + + /**Width of the trendlines. + * @Default {1} + */ + width?: number; + + /**Opacity of the trendline. + * @Default {1} + */ + opacity?: number; + + /**Pattern of dashes and gaps used to stroke the trendline. + */ + dashArray?: string; + + /**Future trends of the current series. + * @Default {0} + */ + forwardForecast?: number; + + /**Past trends of the current series. + * @Default {0} + */ + backwardForecast?: number; + + /**Specifies the order of polynomial trendlines. + * @Default {0} + */ + polynomialOrder?: number; + + /**Specifies the moving average starting period value. + * @Default {2} + */ + period?: number; +} + +export interface SeriesHighlightSettingsBorder { + + /**Border color of the series/point on highlight. + */ + color?: string; + + /**Border width of the series/point on highlight. + * @Default {2} + */ + width?: string; +} + +export interface SeriesHighlightSettings { + + /**Enables/disables the ability to highlight series or data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether series or data point has to be highlighted. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Color of the series/point on highlight. + */ + color?: string; + + /**Opacity of the series/point on highlight. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on highlight. + */ + border?: SeriesHighlightSettingsBorder; + + /**Specifies the pattern for the series/point on highlight. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on highlight. + */ + customPattern?: string; +} + +export interface SeriesSelectionSettingsBorder { + + /**Border color of the series/point on selection. + */ + color?: string; + + /**Border width of the series/point on selection. + * @Default {2} + */ + width?: string; +} + +export interface SeriesSelectionSettings { + + /**Enables/disables the ability to select a series/data point interactively. + * @Default {false} + */ + enable?: boolean; + + /**Specifies whether series or data point has to be selected. + * @Default {series. See Mode} + */ + mode?: ej.datavisualization.Chart.Mode|string; + + /**Specifies the type of selection. + * @Default {single} + */ + type?: ej.datavisualization.Chart.SelectionType|string; + + /**Color of the series/point on selection. + */ + color?: string; + + /**Opacity of the series/point on selection. + * @Default {0.6} + */ + opacity?: number; + + /**Options for customizing the border of series on selection. + */ + border?: SeriesSelectionSettingsBorder; + + /**Specifies the pattern for the series/point on selection. + * @Default {none. See Pattern} + */ + pattern?: string; + + /**Custom pattern for the series on selection. + */ + customPattern?: string; +} + +export interface Series { + + /**Color of the point, where the close is up in financial chart. + * @Default {null} + */ + bearFillColor?: string; + + /**Options for customizing the border of the series. + */ + border?: SeriesBorder; + + /**Color of the point, where the close is down in financial chart. + * @Default {null} + */ + bullFillColor?: string; + + /**Pattern of dashes and gaps used to stroke the line type series. + */ + dashArray?: string; + + /**Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /**Controls the size of the hole in doughnut series. Value ranges from 0 to 1. + * @Default {0.4} + */ + doughnutCoefficient?: number; + + /**Controls the size of the doughnut series. Value ranges from 0 to 1. + * @Default {0.8} + */ + doughnutSize?: number; + + /**Type of series to be drawn in radar or polar series. + * @Default {line. See DrawType} + */ + drawType?: boolean; + + /**Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /**To avoid overlapping of data labels smartly. + * @Default {null} + */ + enableSmartLabels?: number; + + /**End angle of pie/doughnut series. For a complete circle, it has to be 360, by default. + * @Default {null} + */ + endAngle?: number; + + /**Explodes the pie/doughnut slices on mouse move. + * @Default {false} + */ + explode?: boolean; + + /**Explodes all the slice of pie/doughnut on render. + * @Default {null} + */ + explodeAll?: boolean; + + /**Index of the point to be exploded from pie/doughnut/pyramid/funnel. + * @Default {null} + */ + explodeIndex?: number; + + /**Specifies the distance of the slice from the center, when it is exploded. + * @Default {25} + */ + explodeOffset?: number; + + /**Fill color of the series. + * @Default {null} + */ + fill?: string; + + /**Options for customizing the series font. + */ + font?: SeriesFont; + + /**Specifies the height of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {32.7%} + */ + funnelHeight?: string; + + /**Specifies the width of the funnel in funnel series. Values can be in both pixel and percentage. + * @Default {11.6%} + */ + funnelWidth?: string; + + /**Gap between the slices of pyramid/funnel series. + * @Default {0} + */ + gapRatio?: number; + + /**Specifies whether to join start and end point of a line/area series used in polar/radar chart to form a closed path. + * @Default {true} + */ + isClosed?: boolean; + + /**Specifies whether to stack the column series in polar/radar charts. + * @Default {true} + */ + isStacking?: boolean; + + /**Renders the chart vertically. This is applicable only for cartesian type series. + * @Default {false} + */ + isTransposed?: boolean; + + /**Position of the data label in pie/doughnut/pyramid/funnel series. OutsideExtended position is not applicable for pyramid/funnel. + * @Default {inside. See LabelPosition} + */ + labelPosition?: ej.datavisualization.Chart.LabelPosition|string; + + /**Specifies the line cap of the series. + * @Default {Butt. See LineCap} + */ + lineCap?: ej.datavisualization.Chart.LineCap|string; + + /**Specifies the type of shape to be used where two lines meet. + * @Default {Round. See LineJoin} + */ + lineJoin?: ej.datavisualization.Chart.LineJoin|string; + + /**Options for displaying and customizing marker for individual point in a series. Marker contains shapes and/or data labels. + */ + marker?: SeriesMarker; + + /**Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /**Name of a field in data source where fill color for all the data points is generated. + */ + palette?: string; + + /**Controls the size of pie series. Value ranges from 0 to 1. + * @Default {0.8} + */ + pieCoefficient?: number; + + /**Options for customizing the empty point in the series. + */ + emptyPointSettings?: SeriesEmptyPointSettings; + + /**Fill color for the positive column of the waterfall. + * @Default {null} + */ + positiveFill?: string; + + /**Options for customizing the waterfall connector line. + */ + connectorLine?: SeriesConnectorLine; + + /**Options to customize the error bar in series. + */ + errorBar?: SeriesErrorBar; + + /**Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. + */ + points?: Array; + + /**Specifies the mode of the pyramid series. + * @Default {linear} + */ + pyramidMode?: ej.datavisualization.Chart.PyramidMode|string; + + /**Specifies ej.Query to select data from dataSource. This property is applicable only when the dataSource is ej.DataManager. + * @Default {null} + */ + query?: any; + + /**Start angle from where the pie/doughnut series renders. It starts from 0, by default. + * @Default {null} + */ + startAngle?: number; + + /**Options for customizing the tooltip of chart. + */ + tooltip?: SeriesTooltip; + + /**Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.Chart.Type|string; + + /**Controls the visibility of the series. + * @Default {visible} + */ + visibility?: string; + + /**Specifies the name of the x-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + xAxisName?: string; + + /**Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /**Specifies the name of the y-axis that has to be associated with this series. Add an axis instance with this name to axes collection. + * @Default {null} + */ + yAxisName?: string; + + /**Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /**Name of the property in the datasource that contains high value for the series. + * @Default {null} + */ + high?: string; + + /**Name of the property in the datasource that contains low value for the series. + * @Default {null} + */ + low?: string; + + /**Name of the property in the datasource that contains open value for the series. + * @Default {null} + */ + open?: string; + + /**Name of the property in the datasource that contains close value for the series. + * @Default {null} + */ + close?: string; + + /**Name of the property in the datasource that contains the size value for the bubble series. + * @Default {null} + */ + size?: string; + + /**Option to add trendlines to chart. + */ + trendlines?: Array; + + /**Options for customizing the appearance of the series or data point while highlighting. + */ + highlightSettings?: SeriesHighlightSettings; + + /**Options for customizing the appearance of the series/data point on selection. + */ + selectionSettings?: SeriesSelectionSettings; +} + +export interface Size { + + /**Height of the Chart. Height can be specified in either pixel or percentage. + * @Default {'450'} + */ + height?: string; + + /**Width of the Chart. Width can be specified in either pixel or percentage. + * @Default {'450'} + */ + width?: string; +} + +export interface TitleBorder { + + /**Width of the title border. + * @Default {1} + */ + width?: number; + + /**color of the title border. + * @Default {transparent} + */ + color?: string; + + /**opacity of the title border. + * @Default {0.8} + */ + opacity?: number; + + /**opacity of the title border. + * @Default {0.8} + */ + cornerRadius?: number; +} + +export interface TitleFont { + + /**Font family for Chart title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for Chart title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for Chart title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the Chart title. + * @Default {0.5} + */ + opacity?: number; + + /**Font size for Chart title. + * @Default {20px} + */ + size?: string; +} + +export interface TitleSubTitleFont { + + /**Font family of sub title. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Font style for sub title. + * @Default {Normal. See FontStyle} + */ + fontStyle?: ej.datavisualization.Chart.FontStyle|string; + + /**Font weight for sub title. + * @Default {Regular. See FontWeight} + */ + fontWeight?: ej.datavisualization.Chart.FontWeight|string; + + /**Opacity of the sub title. + * @Default {1} + */ + opacity?: number; + + /**Font size for sub title. + * @Default {12px} + */ + size?: string; +} + +export interface TitleSubTitleBorder { + + /**Width of the subtitle border. + * @Default {1} + */ + width?: number; + + /**color of the subtitle border. + * @Default {transparent} + */ + color?: string; + + /**opacity of the subtitle border. + * @Default {0.8} + */ + opacity?: number; + + /**opacity of the subtitle border. + * @Default {0.8} + */ + cornerRadius?: number; +} + +export interface TitleSubTitle { + + /**Options for customizing the font of sub title. + */ + font?: TitleSubTitleFont; + + /**Background color for the chart subtitle. + * @Default {transparent} + */ + background?: string; + + /**Options to customize the border of the title. + */ + border?: TitleSubTitleBorder; + + /**Text to be displayed in sub title. + */ + text?: string; + + /**Alignment of sub title text. + * @Default {far. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Title { + + /**Background color for the chart title. + * @Default {transparent} + */ + background?: string; + + /**Options to customize the border of the title. + */ + border?: TitleBorder; + + /**Options for customizing the font of Chart title. + */ + font?: TitleFont; + + /**Options to customize the sub title of Chart. + */ + subTitle?: TitleSubTitle; + + /**Text to be displayed in Chart title. + */ + text?: string; + + /**Alignment of the title text. + * @Default {Center. See TextAlignment} + */ + textAlignment?: ej.datavisualization.Chart.Alignment|string; +} + +export interface Zooming { + + /**Enables or disables zooming. + * @Default {false} + */ + enable?: boolean; + + /**Enable or disables the differed zooming. When it is enabled, chart is updated only on mouse up action while zooming and panning. + * @Default {false} + */ + enableDeferredZoom?: boolean; + + /**Enables/disables the ability to zoom the chart on moving the mouse wheel. + * @Default {false} + */ + enableMouseWheel?: boolean; + + /**Specifies whether to allow zooming the chart vertically or horizontally or in both ways. + * @Default {'x,y'} + */ + type?: string; + + /**To display user specified buttons in zooming toolbar. + * @Default {[zoomIn, zoomOut, zoom, pan, reset]} + */ + toolbarItems?: Array; +} +} +module Chart +{ +enum CoordinateUnit +{ +//string +None, +//string +Pixels, +//string +Points, +} +} +module Chart +{ +enum HorizontalAlignment +{ +//string +Left, +//string +Right, +//string +Middle, +} +} +module Chart +{ +enum Region +{ +//string +Chart, +//string +Series, +} +} +module Chart +{ +enum VerticalAlignment +{ +//string +Top, +//string +Bottom, +//string +Middle, +} +} +module Chart +{ +enum Unit +{ +//string +Percentage, +//string +Pixel, +} +} +module Chart +{ +enum DrawType +{ +//string +Line, +//string +Area, +//string +Column, +} +} +module Chart +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +} +} +module Chart +{ +enum FontWeight +{ +//string +Regular, +//string +Bold, +//string +Lighter, +} +} +module Chart +{ +enum LabelPosition +{ +//string +Inside, +//string +Outside, +//string +OutsideExtended, +} +} +module Chart +{ +enum LineCap +{ +//string +Butt, +//string +Round, +//string +Square, +} +} +module Chart +{ +enum LineJoin +{ +//string +Round, +//string +Bevel, +//string +Miter, +} +} +module Chart +{ +enum ConnectorLineType +{ +//string +Line, +//string +Bezier, +} +} +module Chart +{ +enum HorizontalTextAlignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum Shape +{ +//string +None, +//string +LeftArrow, +//string +RightArrow, +//string +Circle, +//string +Cross, +//string +HorizLine, +//string +VertLine, +//string +Diamond, +//string +Rectangle, +//string +Triangle, +//string +Hexagon, +//string +Pentagon, +//string +Star, +//string +Ellipse, +//string +Trapezoid, +//string +UpArrow, +//string +DownArrow, +//string +Image, +//string +SeriesType, +} +} +module Chart +{ +enum TextPosition +{ +//string +Top, +//string +Bottom, +//string +Middle, +} +} +module Chart +{ +enum VerticalTextAlignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum PyramidMode +{ +//string +Linear, +//string +Surface, +} +} +module Chart +{ +enum Type +{ +//string +Area, +//string +Line, +//string +Spline, +//string +Column, +//string +Scatter, +//string +Bubble, +//string +SplineArea, +//string +StepArea, +//string +StepLine, +//string +Pie, +//string +Hilo, +//string +HiloOpenClose, +//string +Candle, +//string +Bar, +//string +StackingArea, +//string +StackingArea100, +//string +RangeColumn, +//string +StackingColumn, +//string +StackingColumn100, +//string +StackingBar, +//string +StackingBar100, +//string +Pyramid, +//string +Funnel, +//string +Doughnut, +//string +Polar, +//string +Radar, +//string +RangeArea, +} +} +module Chart +{ +enum EmptyPointMode +{ +//string +Gap, +//string +Zero, +//string +Average, +} +} +module Chart +{ +enum ErrorBarType +{ +//string +FixedValue, +//string +Percentage, +//string +StandardDeviation, +//string +StandardError, +} +} +module Chart +{ +enum ErrorBarMode +{ +//string +Both, +//string +Vertical, +//string +Horizontal, +} +} +module Chart +{ +enum ErrorBarDirection +{ +//string +Both, +//string +Plus, +//string +Minus, +} +} +module Chart +{ +enum Mode +{ +//string +Series, +//string +Point, +//string +Cluster, +} +} +module Chart +{ +enum SelectionType +{ +//string +Single, +//string +Multiple, +} +} +module Chart +{ +enum CrosshairType +{ +//string +Crosshair, +//string +Trackball, +} +} +module Chart +{ +enum Alignment +{ +//string +Center, +//string +Near, +//string +Far, +} +} +module Chart +{ +enum Position +{ +//string +Left, +//string +Right, +//string +Top, +//string +Bottom, +} +} +module Chart +{ +enum TextOverflow +{ +//string +None, +//string +Trim, +//string +Wrap, +//string +WrapAndTrim, +} +} +module Chart +{ +enum EdgeLabelPlacement +{ +//string +None, +//string +Shift, +//string +Hide, +} +} +module Chart +{ +enum IntervalType +{ +//string +Days, +//string +Hours, +//string +Seconds, +//string +Milliseconds, +//string +Minutes, +//string +Months, +//string +Years, +} +} +module Chart +{ +enum LabelIntersectAction +{ +//string +None, +//string +Rotate90, +//string +Rotate45, +//string +Wrap, +//string +WrapByword, +//string +Trim, +//string +Hide, +//string +MultipleRows, +} +} +module Chart +{ +enum RangePadding +{ +//string +Additional, +//string +Normal, +//string +None, +//string +Round, +} +} +module Chart +{ +enum TextAlignment +{ +//string +MiddleTop, +//string +MiddleCenter, +//string +MiddleBottom, +} +} +module Chart +{ +enum ZIndex +{ +//string +Inside, +//string +Over, +} +} +module Chart +{ +enum TickLinesPosition +{ +//string +Inside, +//string +Outside, +} +} +module Chart +{ +enum ValueType +{ +//string +Double, +//string +Category, +//string +DateTime, +//string +Logarithmic, +} +} +module Chart +{ +enum Theme +{ +//string +Azure, +//string +FlatLight, +//string +FlatDark, +//string +Azuredark, +//string +Lime, +//string +LimeDark, +//string +Saffron, +//string +SaffronDark, +//string +GradientLight, +//string +GradientDark, +} +} + +class RangeNavigator extends ej.Widget { + static fn: RangeNavigator; + constructor(element: JQuery, options?: RangeNavigator.Model); + constructor(element: Element, options?: RangeNavigator.Model); + model:RangeNavigator.Model; + defaults:RangeNavigator.Model; + + /** destroy the range navigator widget + * @returns {void} + */ + _destroy (): void; +} +export module RangeNavigator{ + +export interface Model { + + /**Toggles the placement of slider exactly on the place it left or on the nearest interval. + * @Default {false} + */ + allowSnapping?: boolean; + + /**Specifies the data source for range navigator. + */ + dataSource?: any; + + /**Sets a value whether to make the range navigator responsive on resize. + * @Default {false} + */ + enableAutoResizing?: boolean; + + /**Toggles the redrawing of chart on moving the sliders. + * @Default {true} + */ + enableDeferredUpdate?: boolean; + + /**Toggles the direction of rendering the range navigator control. + * @Default {false} + */ + enableRTL?: boolean; + + /**Options for customizing the labels colors, font, style, size, horizontalAlignment and opacity. + */ + labelSettings?: LabelSettings; + + /**This property is to specify the localization of range navigator. + * @Default {en-US} + */ + locale?: string; + + /**Options for customizing the range navigator. + */ + navigatorStyleSettings?: NavigatorStyleSettings; + + /**Padding specifies the gap between the container and the range navigator. + * @Default {0} + */ + padding?: string; + + /**If the range is not given explicitly, range will be calculated automatically. + * @Default {none} + */ + rangePadding?: ej.datavisualization.RangeNavigator.RangePadding|string; + + /**Options for customizing the starting and ending ranges. + */ + rangeSettings?: RangeSettings; + + /**selectedData is for getting the data when the "rangeChanged" event trigger from client side. + */ + selectedData?: any; + + /**Options for customizing the start and end range values. + */ + selectedRangeSettings?: SelectedRangeSettings; + + /**Contains property to customize the hight and width of range navigator. + */ + sizeSettings?: SizeSettings; + + /**By specifying this property the user can change the theme of the range navigator. + * @Default {null} + */ + theme?: string; + + /**Options for customizing the tooltip in range navigator. + */ + tooltipSettings?: TooltipSettings; + + /**Options for configuring minor grid lines, major grid lines, axis line of axis. + */ + valueAxisSettings?: ValueAxisSettings; + + /**You can plot data of type date time or numeric. This property determines the type of data that this axis will handle. + * @Default {datetime} + */ + valueType?: ej.datavisualization.RangeNavigator.ValueType|string; + + /**Specifies the xName for dataSource. This is used to take the x values from dataSource + */ + xName?: any; + + /**Specifies the yName for dataSource. This is used to take the y values from dataSource + */ + yName?: any; + + /**Fires on load of range navigator.*/ + load? (e: LoadEventArgs): void; + + /**Fires after range navigator is loaded.*/ + loaded? (e: LoadedEventArgs): void; + + /**Fires on changing the range of range navigator.*/ + rangeChanged? (e: RangeChangedEventArgs): void; +} + +export interface LoadEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface RangeChangedEventArgs { + + /**parameters from range navigator + */ + Data?: any; + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the range navigator model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; +} + +export interface LabelSettingsHigherLevelBorder { + + /**Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /**Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; +} + +export interface LabelSettingsHigherLevelGridLineStyle { + + /**Specifies the color of grid lines in higher level. + * @Default {#B5B5B5} + */ + color?: string; + + /**Specifies the dashArray of grid lines in higher level. + * @Default {20 5 0} + */ + dashArray?: string; + + /**Specifies the width of grid lines in higher level. + * @Default {#B5B5B5} + */ + width?: string; +} + +export interface LabelSettingsHigherLevelStyleFont { + + /**Specifies the label font color. Labels render with the specified font color. + * @Default {black} + */ + color?: string; + + /**Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the label font style. Labels render with the specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /**Specifies the label font weight. Labels render with the specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /**Specifies the label opacity. Labels render with the specified opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the label font size. Labels render with the specified font size. + * @Default {12px} + */ + size?: string; +} + +export interface LabelSettingsHigherLevelStyle { + + /**Options for customizing the font properties. + */ + font?: LabelSettingsHigherLevelStyleFont; + + /**Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; +} + +export interface LabelSettingsHigherLevel { + + /**Options for customizing the border of grid lines in higher level. + */ + border?: LabelSettingsHigherLevelBorder; + + /**Specifies the fill color of higher level labels. + * @Default {transparent} + */ + fill?: string; + + /**Options for customizing the grid line colors, width, dashArray, border. + */ + gridLineStyle?: LabelSettingsHigherLevelGridLineStyle; + + /**Specifies the intervalType for higher level labels. See IntervalType + * @Default {years} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /**Specifies the position of the labels to render either inside or outside of plot area + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /**Specifies the position of the labels in higher level + * @Default {top} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /**Options for customizing the style of higher level labels. + */ + style?: LabelSettingsHigherLevelStyle; + + /**Toggles the visibility of higher level labels. + * @Default {true} + */ + visible?: boolean; +} + +export interface LabelSettingsLowerLevelBorder { + + /**Specifies the border color of grid lines. + * @Default {transparent} + */ + color?: string; + + /**Specifies the border width of grid lines. + * @Default {0.5} + */ + width?: string; +} + +export interface LabelSettingsLowerLevelGridLineStyle { + + /**Specifies the color of grid lines in lower level. + * @Default {#B5B5B5} + */ + color?: string; + + /**Specifies the dashArray of gridLines in lowerLevel. + * @Default {20 5 0} + */ + dashArray?: string; + + /**Specifies the width of grid lines in lower level. + * @Default {#B5B5B5} + */ + width?: string; +} + +export interface LabelSettingsLowerLevelStyleFont { + + /**Specifies the color of labels. Label text render in this specified color. + * @Default {black} + */ + color?: string; + + /**Specifies the font family of labels. Label text render in this specified font family. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the font style of labels. Label text render in this specified font style. + * @Default {Normal} + */ + fontStyle?: string; + + /**Specifies the font weight of labels. Label text render in this specified font weight. + * @Default {regular} + */ + fontWeight?: string; + + /**Specifies the opacity of labels. Label text render in this specified opacity. + * @Default {12px} + */ + opacity?: string; + + /**Specifies the size of labels. Label text render in this specified size. + * @Default {12px} + */ + size?: string; +} + +export interface LabelSettingsLowerLevelStyle { + + /**Options for customizing the font of labels. + */ + font?: LabelSettingsLowerLevelStyleFont; + + /**Specifies the horizontal text alignment of the text in label. + * @Default {middle} + */ + horizontalAlignment?: string; +} + +export interface LabelSettingsLowerLevel { + + /**Options for customizing the border of grid lines in lower level. + */ + border?: LabelSettingsLowerLevelBorder; + + /**Specifies the fill color of labels in lower level. + * @Default {transparent} + */ + fill?: string; + + /**Options for customizing the grid lines in lower level. + */ + gridLineStyle?: LabelSettingsLowerLevelGridLineStyle; + + /**Specifies the intervalType of the labels in lower level.See IntervalType + * @Default {years} + */ + intervalType?: ej.datavisualization.RangeNavigator.IntervalType|string; + + /**Specifies the position of the labels to render either inside or outside of plot area. See LabelPlacement + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.RangeNavigator.LabelPlacement|string; + + /**Specifies the position of the labels in lower level.See Position + * @Default {bottom} + */ + position?: ej.datavisualization.RangeNavigator.Position|string; + + /**Options for customizing the style of labels. + */ + style?: LabelSettingsLowerLevelStyle; + + /**Toggles the visibility of labels in lower level. + * @Default {true} + */ + visible?: boolean; +} + +export interface LabelSettingsStyleFont { + + /**Specifies the label color. This color is applied to the labels in range navigator. + * @Default {#FFFFFF} + */ + color?: string; + + /**Specifies the label font family. Labels render with the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /**Specifies the label font opacity. Labels render with the specified font opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the label font size. Labels render with the specified font size. + * @Default {1px} + */ + size?: string; + + /**Specifies the label font style. Labels render with the specified font style.. + * @Default {Normal} + */ + style?: ej.datavisualization.RangeNavigator.FontStyle|string; + + /**Specifies the lable font weight + * @Default {regular} + */ + weight?: ej.datavisualization.RangeNavigator.FontWeight|string; +} + +export interface LabelSettingsStyle { + + /**Options for customizing the font of labels in range navigator. + */ + font?: LabelSettingsStyleFont; + + /**Specifies the horizontalAlignment of the label in RangeNavigator + * @Default {middle} + */ + horizontalAlignment?: ej.datavisualization.RangeNavigator.HorizontalAlignment|string; +} + +export interface LabelSettings { + + /**Options for customizing the higher level labels in range navigator. + */ + higherLevel?: LabelSettingsHigherLevel; + + /**Options for customizing the labels in lower level. + */ + lowerLevel?: LabelSettingsLowerLevel; + + /**Options for customizing the style of labels in range navigator. + */ + style?: LabelSettingsStyle; +} + +export interface NavigatorStyleSettingsBorder { + + /**Specifies the border color of range navigator. + * @Default {transparent} + */ + color?: string; + + /**Specifies the dash array of range navigator. + * @Default {null} + */ + dashArray?: string; + + /**Specifies the border width of range navigator. + * @Default {0.5} + */ + width?: number; +} + +export interface NavigatorStyleSettingsMajorGridLineStyle { + + /**Specifies the color of major grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /**Toggles the visibility of major grid lines. + * @Default {true} + */ + visible?: boolean; +} + +export interface NavigatorStyleSettingsMinorGridLineStyle { + + /**Specifies the color of minor grid lines in range navigator. + * @Default {#B5B5B5} + */ + color?: string; + + /**Toggles the visibility of minor grid lines. + * @Default {true} + */ + visible?: boolean; +} + +export interface NavigatorStyleSettings { + + /**Specifies the background color of range navigator. + * @Default {#dddddd} + */ + background?: string; + + /**Options for customizing the border color and width of range navigator. + */ + border?: NavigatorStyleSettingsBorder; + + /**Specifies the left side thumb template in range navigator we can give either div id or html string + * @Default {null} + */ + leftThumbTemplate?: string; + + /**Options for customizing the major grid lines. + */ + majorGridLineStyle?: NavigatorStyleSettingsMajorGridLineStyle; + + /**Options for customizing the minor grid lines. + */ + minorGridLineStyle?: NavigatorStyleSettingsMinorGridLineStyle; + + /**Specifies the opacity of RangeNavigator. + * @Default {1} + */ + opacity?: number; + + /**Specifies the right side thumb template in range navigator we can give either div id or html string + * @Default {null} + */ + rightThumbTemplate?: string; + + /**Specifies the color of the selected region in range navigator. + * @Default {#EFEFEF} + */ + selectedRegionColor?: string; + + /**Specifies the opacity of Selected Region. + * @Default {0} + */ + selectedRegionOpacity?: number; + + /**Specifies the color of the thumb in range navigator. + * @Default {#2382C3} + */ + thumbColor?: string; + + /**Specifies the radius of the thumb in range navigator. + * @Default {10} + */ + thumbRadius?: number; + + /**Specifies the stroke color of the thumb in range navigator. + * @Default {#303030} + */ + thumbStroke?: string; + + /**Specifies the color of the unselected region in range navigator. + * @Default {#5EABDE} + */ + unselectedRegionColor?: string; + + /**Specifies the opacity of Unselected Region. + * @Default {0.3} + */ + unselectedRegionOpacity?: number; +} + +export interface RangeSettings { + + /**Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /**Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; +} + +export interface SelectedRangeSettings { + + /**Specifies the ending range of range navigator. + * @Default {null} + */ + end?: string; + + /**Specifies the starting range of range navigator. + * @Default {null} + */ + start?: string; +} + +export interface SizeSettings { + + /**Specifies height of the range navigator. + * @Default {null} + */ + height?: string; + + /**Specifies width of the range navigator. + * @Default {null} + */ + width?: string; +} + +export interface TooltipSettingsFont { + + /**Specifies the color of text in tooltip. Tooltip text render in the specified color. + * @Default {#FFFFFF} + */ + color?: string; + + /**Specifies the font family of text in tooltip. Tooltip text render in the specified font family. + * @Default {Segoe UI} + */ + family?: string; + + /**Specifies the font style of text in tooltip. Tooltip text render in the specified font style. + * @Default {ej.datavisualization.RangeNavigator.fontStyle.Normal} + */ + fontStyle?: string; + + /**Specifies the opacity of text in tooltip. Tooltip text render in the specified opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of text in tooltip. Tooltip text render in the specified size. + * @Default {10px} + */ + size?: string; + + /**Specifies the weight of text in tooltip. Tooltip text render in the specified weight. + * @Default {ej.datavisualization.RangeNavigator.weight.Regular} + */ + weight?: string; +} + +export interface TooltipSettings { + + /**Specifies the background color of tooltip. + * @Default {#303030} + */ + backgroundColor?: string; + + /**Options for customizing the font in tooltip. + */ + font?: TooltipSettingsFont; + + /**Specifies the format of text to be displayed in tooltip. + * @Default {MM/dd/yyyy} + */ + labelFormat?: string; + + /**Specifies the mode of displaying the tooltip. Neither to display the tooltip always nor on demand. + * @Default {null} + */ + tooltipDisplayMode?: string; + + /**Toggles the visibility of tooltip. + * @Default {true} + */ + visible?: boolean; +} + +export interface ValueAxisSettingsAxisLine { + + /**Toggles the visibility of axis line. + * @Default {none} + */ + visible?: string; +} + +export interface ValueAxisSettingsFont { + + /**Text in axis render with the specified size. + * @Default {0px} + */ + size?: string; +} + +export interface ValueAxisSettingsMajorGridLines { + + /**Toggles the visibility of major grid lines. + * @Default {false} + */ + visible?: boolean; +} + +export interface ValueAxisSettingsMajorTickLines { + + /**Specifies the size of the majorTickLines in range navigator + * @Default {0} + */ + size?: number; + + /**Toggles the visibility of major tick lines. + * @Default {true} + */ + visible?: boolean; + + /**Specifies width of the major tick lines. + * @Default {0} + */ + width?: number; +} + +export interface ValueAxisSettings { + + /**Options for customizing the axis line. + */ + axisLine?: ValueAxisSettingsAxisLine; + + /**Options for customizing the font of the axis. + */ + font?: ValueAxisSettingsFont; + + /**Options for customizing the major grid lines. + */ + majorGridLines?: ValueAxisSettingsMajorGridLines; + + /**Options for customizing the major tick lines in axis. + */ + majorTickLines?: ValueAxisSettingsMajorTickLines; + + /**If the range is not given explicitly, range will be calculated automatically. You can customize the automatic range calculation using rangePadding. + * @Default {none} + */ + rangePadding?: string; + + /**Toggles the visibility of axis in range navigator. + * @Default {false} + */ + visible?: boolean; +} +} +module RangeNavigator +{ +enum IntervalType +{ +//string +Years, +//string +Quarters, +//string +Months, +//string +Weeks, +//string +Days, +//string +Hours, +} +} +module RangeNavigator +{ +enum LabelPlacement +{ +//string +Inside, +//string +Outside, +} +} +module RangeNavigator +{ +enum Position +{ +//string +Top, +//string +Bottom, +} +} +module RangeNavigator +{ +enum FontStyle +{ +//string +Normal, +//string +Bold, +//string +Italic, +} +} +module RangeNavigator +{ +enum FontWeight +{ +//string +Regular, +//string +Lighter, +} +} +module RangeNavigator +{ +enum HorizontalAlignment +{ +//string +Middle, +//string +Left, +//string +Right, +} +} +module RangeNavigator +{ +enum RangePadding +{ +//string +Additional, +//string +Normal, +//string +None, +//string +Round, +} +} +module RangeNavigator +{ +enum ValueType +{ +//string +Numeric, +//string +DateTime, +} +} + +class BulletGraph extends ej.Widget { + static fn: BulletGraph; + constructor(element: JQuery, options?: BulletGraph.Model); + constructor(element: Element, options?: BulletGraph.Model); + model:BulletGraph.Model; + defaults:BulletGraph.Model; + + /** To destroy the bullet graph + * @returns {void} + */ + destroy (): void; + + /** To redraw the bulet graph + * @returns {void} + */ + redraw(): void; + + /** To set the value for comparative measure in bullet graph. + * @returns {void} + */ + setComparativeMeasureSymbol(): void; + + /** To set the value for feature measure bar. + * @returns {void} + */ + setFeatureMeasureBarValue(): void; +} +export module BulletGraph{ + +export interface Model { + + /**Toggles the visibility of the range stroke color of the labels. + * @Default {false} + */ + applyRangeStrokeToLabels?: boolean; + + /**Toggles the visibility of the range stroke color of the ticks. + * @Default {false} + */ + applyRangeStrokeToTicks?: boolean; + + /**Contains property to customize the caption in bullet graph. + */ + captionSettings?: CaptionSettings; + + /**Comparative measure bar in bullet graph render till the specified value. + * @Default {0} + */ + comparativeMeasureValue?: number; + + /**Toggles the animation of bullet graph. + * @Default {true} + */ + enableAnimation?: boolean; + + /**Sets a value whether to make the bullet graph responsive on resize. + * @Default {true} + */ + enableResizing?: boolean; + + /**Specifies the direction of flow in bullet graph. Neither it may be backward nor forward. + * @Default {forward} + */ + flowDirection?: ej.datavisualization.BulletGraph.FlowDirection|string; + + /**Specifies the height of the bullet graph. + * @Default {90} + */ + height?: number; + + /**Bullet graph will render in the specified orientation. + * @Default {horizontal} + */ + orientation?: ej.datavisualization.BulletGraph.Orientation|string; + + /**Contains property to customize the qualitative ranges. + */ + qualitativeRanges?: Array; + + /**Size of the qualitative range depends up on the specified value. + * @Default {32} + */ + qualitativeRangeSize?: number; + + /**Length of the quantitative range depends up on the specified value. + * @Default {475} + */ + quantitativeScaleLength?: number; + + /**Contains all the properties to customize quantitative scale. + */ + quantitativeScaleSettings?: QuantitativeScaleSettings; + + /**By specifying this property the user can change the theme of the bullet graph. + * @Default {flatlight} + */ + theme?: string; + + /**Contains all the properties to customize tooltip. + */ + tooltipSettings?: TooltipSettings; + + /**Feature measure bar in bullet graph render till the specified value. + * @Default {0} + */ + value?: number; + + /**Specifies the width of the bullet graph. + * @Default {595} + */ + width?: number; + + /**Fires on rendering the caption of bullet graph.*/ + drawCaption? (e: DrawCaptionEventArgs): void; + + /**Fires on rendering the category.*/ + drawCategory? (e: DrawCategoryEventArgs): void; + + /**Fires on rendering the comparative measure symbol.*/ + drawComparativeMeasureSymbol? (e: DrawComparativeMeasureSymbolEventArgs): void; + + /**Fires on rednering the feature measure bar.*/ + drawFeatureMeasureBar? (e: DrawFeatureMeasureBarEventArgs): void; + + /**Fires on rendering the indicator of bullet graph.*/ + drawIndicator? (e: DrawIndicatorEventArgs): void; + + /**Fires on rendering the labels.*/ + drawLabels? (e: DrawLabelsEventArgs): void; + + /**Fires on rendering the qualitative ranges.*/ + drawQualitativeRanges? (e: DrawQualitativeRangesEventArgs): void; + + /**Fires on loading bullet graph.*/ + load? (e: LoadEventArgs): void; +} + +export interface DrawCaptionEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the current captionSettings element. + */ + captionElement?: HTMLElement; + + /**returns the type of the captionSettings. + */ + captionType?: string; +} + +export interface DrawCategoryEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of category element. + */ + categoryElement?: HTMLElement; + + /**returns the text value of the category that is drawn. + */ + Value?: string; +} + +export interface DrawComparativeMeasureSymbolEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of comparative measure element. + */ + targetElement?: HTMLElement; + + /**returns the value of the comparative measure symbol. + */ + Value?: number; +} + +export interface DrawFeatureMeasureBarEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the options of feature measure element. + */ + currentElement?: HTMLElement; + + /**returns the value of the feature measure bar. + */ + Value?: number; +} + +export interface DrawIndicatorEventArgs { + + /**returns an object to customize bullet graph indicator text and symbol before rendering it. + */ + indicatorSettings?: any; + + /**returns the object of bullet graph. + */ + model?: any; + + /**returns the type of event. + */ + type?: string; + + /**for cancelling the event. + */ + cancel?: boolean; +} + +export interface DrawLabelsEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the options of the scale element. + */ + scaleElement?: HTMLElement; + + /**returns the current label element. + */ + tickElement?: HTMLElement; + + /**returns the label type. + */ + labelType?: string; +} + +export interface DrawQualitativeRangesEventArgs { + + /**returns the object of the bullet graph. + */ + Object?: any; + + /**returns the index of current range. + */ + rangeIndex?: number; + + /**returns the settings for current range. + */ + rangeOptions?: any; + + /**returns the end value of current range. + */ + rangeEndValue?: number; +} + +export interface LoadEventArgs { +} + +export interface CaptionSettingsFont { + + /**Specifies the color of the text in caption. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of caption. Caption text render with this fontFamily + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of caption + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of caption + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of caption. Caption text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of caption. Caption text render with this size + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsIndicatorFont { + + /**Specifies the color of the indicator's text. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of indicator. Indicator text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of indicator. Indicator text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of indicator. Indicator text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of indicator text. Indicator text render with this Opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of indicator. Indicator text render with this size. + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsIndicatorLocation { + + /**Specifies the horizontal position of the indicator. + * @Default {10} + */ + x?: number; + + /**Specifies the vertical position of the indicator. + * @Default {60} + */ + y?: number; +} + +export interface CaptionSettingsIndicatorSymbolBorder { + + /**Specifies the border color of indicator symbol. + * @Default {null} + */ + color?: string; + + /**Specifies the border width of indicator symbol. + * @Default {1} + */ + width?: number; +} + +export interface CaptionSettingsIndicatorSymbolSize { + + /**Specifies the height of indicator symbol. + * @Default {10} + */ + height?: number; + + /**Specifies the width of indicator symbol. + * @Default {10} + */ + width?: number; +} + +export interface CaptionSettingsIndicatorSymbol { + + /**Contains property to customize the border of indicator symbol. + */ + border?: CaptionSettingsIndicatorSymbolBorder; + + /**Specifies the color of indicator symbol. + * @Default {null} + */ + color?: string; + + /**Specifies the url of image that represents indicator symbol. + */ + imageURL?: string; + + /**Specifies the opacity of indicator symbol. + * @Default {1} + */ + opacity?: number; + + /**Specifies the shape of indicator symbol. + */ + shape?: string; + + /**Contains property to customize the size of indicator symbol. + */ + size?: CaptionSettingsIndicatorSymbolSize; +} + +export interface CaptionSettingsIndicator { + + /**Contains property to customize the font of indicator. + */ + font?: CaptionSettingsIndicatorFont; + + /**Contains property to customize the location of indicator. + */ + location?: CaptionSettingsIndicatorLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {2} + */ + padding?: number; + + /**Contains property to customize the symbol of indicator. + */ + symbol?: CaptionSettingsIndicatorSymbol; + + /**Specifies the text to be displayed as indicator text. By default difference between current value and target will be displayed + */ + text?: string; + + /**Specifies the alignement of indicator with respect to scale based on text position + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies where indicator text should be anchored when indicator overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**indicator text render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /**Specifies where indicator should be placed + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; + + /**Specifies the space between indicator symbol and text. + * @Default {3} + */ + textSpacing?: number; + + /**Specifies whether indicator will be visible or not. + * @Default {false} + */ + visibile?: boolean; +} + +export interface CaptionSettingsLocation { + + /**Specifies the position in horizontal direction + * @Default {17} + */ + x?: number; + + /**Specifies the position in horizontal direction + * @Default {30} + */ + y?: number; +} + +export interface CaptionSettingsSubTitleFont { + + /**Specifies the color of the subtitle's text. + * @Default {null} + */ + color?: string; + + /**Specifies the fontFamily of subtitle. Subtitle text render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of subtitle. Subtitle text render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of subtitle. Subtitle text render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of subtitle. Subtitle text render with this opacity. + * @Default {1} + */ + opacity?: number; + + /**Specifies the size of subtitle. Subtitle text render with this size. + * @Default {12px} + */ + size?: string; +} + +export interface CaptionSettingsSubTitleLocation { + + /**Specifies the horizontal position of the subtitle. + * @Default {10} + */ + x?: number; + + /**Specifies the vertical position of the subtitle. + * @Default {45} + */ + y?: number; +} + +export interface CaptionSettingsSubTitle { + + /**Contains property to customize the font of subtitle. + */ + font?: CaptionSettingsSubTitleFont; + + /**Contains property to customize the location of subtitle. + */ + location?: CaptionSettingsSubTitleLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /**Specifies the text to be displayed as subtitle. + */ + text?: string; + + /**Specifies the alignment of sub title text with respect to scale. Alignment will not be applied in float position. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies where subtitle text should be anchored when sub title text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**Subtitle render in the specified angle. + * @Default {0} + */ + textAngle?: number; + + /**Specifies where sub title text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; +} + +export interface CaptionSettings { + + /**Specifies whether trim the labels will be true or false. + * @Default {true} + */ + enableTrim?: boolean; + + /**Contains property to customize the font of caption. + */ + font?: CaptionSettingsFont; + + /**Contains property to customize the indicator. + */ + indicator?: CaptionSettingsIndicator; + + /**Contains property to customize the location. + */ + location?: CaptionSettingsLocation; + + /**Specifies the padding to be applied when text position is used. + * @Default {5} + */ + padding?: number; + + /**Contains property to customize the subtitle. + */ + subTitle?: CaptionSettingsSubTitle; + + /**Specifies the text to be displayed on bullet graph. + */ + text?: string; + + /**Specifies the alignment of caption text with respect to scale. This property will not be applied when text position is float. + * @Default {'Near'} + */ + textAlignment?: ej.datavisualization.BulletGraph.TextAlignment|string; + + /**Specifies caption text anchoring when caption text overlaps with other caption group text. Text will be anchored when overlapping caption group text are at same position. Anchoring is not applicable for float position. + * @Default {'start'} + */ + textAnchor?: ej.datavisualization.BulletGraph.TextAnchor|string; + + /**Specifies the angel in which the caption is rendered. + * @Default {0} + */ + textAngle?: number; + + /**Specifies how caption text should be placed. + * @Default {'float'} + */ + textPosition?: ej.datavisualization.BulletGraph.TextPosition|string; +} + +export interface QualitativeRanges { + + /**Specifies the ending range to which the qualitative ranges will render. + * @Default {3} + */ + rangeEnd?: number; + + /**Specifies the opacity for the qualitative ranges. + * @Default {1} + */ + rangeOpacity?: number; + + /**Specifies the stroke for the qualitative ranges. + * @Default {null} + */ + rangeStroke?: string; +} + +export interface QuantitativeScaleSettingsComparativeMeasureSettings { + + /**Specifies the stroke of the comparative measure. + * @Default {null} + */ + stroke?: number; + + /**Specifies the width of the comparative measure. + * @Default {5} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsFeaturedMeasureSettings { + + /**Specifies the Stroke of the featured measure in bullet graph. + * @Default {null} + */ + stroke?: number; + + /**Specifies the width of the featured measure in bullet graph. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsFeatureMeasures { + + /**Specifies the category of feature measure. + * @Default {null} + */ + category?: string; + + /**Comparative measure render till the specified value. + * @Default {null} + */ + comparativeMeasureValue?: number; + + /**Feature measure render till the specified value. + * @Default {null} + */ + value?: number; +} + +export interface QuantitativeScaleSettingsFields { + + /**Specifies the category of the bullet graph. + * @Default {null} + */ + category?: string; + + /**Comparative measure render based on the values in the specified field. + * @Default {null} + */ + comparativeMeasure?: string; + + /**Specifies the dataSource for the bullet graph. + * @Default {null} + */ + dataSource?: any; + + /**Feature measure render based on the values in the specified field. + * @Default {null} + */ + featureMeasures?: string; + + /**Specifies the query for fetching the values form data source to render the bullet graph. + * @Default {null} + */ + query?: string; + + /**Specifies the name of the table. + * @Default {null} + */ + tableName?: string; +} + +export interface QuantitativeScaleSettingsLabelSettingsFont { + + /**Specifies the fontFamily of labels in bullet graph. Labels render with this fontFamily. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /**Specifies the fontStyle of labels in bullet graph. Labels render with this fontStyle. See FontStyle + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.BulletGraph.FontStyle|string; + + /**Specifies the fontWeight of labels in bullet graph. Labels render with this fontWeight. See FontWeight + * @Default {regular} + */ + fontWeight?: ej.datavisualization.BulletGraph.FontWeight|string; + + /**Specifies the opacity of labels in bullet graph. Labels render with this opacity + * @Default {1} + */ + opacity?: number; +} + +export interface QuantitativeScaleSettingsLabelSettings { + + /**Contains property to customize the font of the labels in bullet graph. + */ + font?: QuantitativeScaleSettingsLabelSettingsFont; + + /**Specifies the placement of labels in bullet graph scale. + * @Default {outside} + */ + labelPlacement?: ej.datavisualization.BulletGraph.LabelPlacement|string; + + /**Specifies the prefix to be added with labels in bullet graph. + * @Default {Empty string} + */ + labelPrefix?: string; + + /**Specifies the suffix to be added after labels in bullet graph. + * @Default {Empty string} + */ + labelSuffix?: string; + + /**Specifies the horizontal/vertical padding of labels. + * @Default {15} + */ + offset?: number; + + /**Specifies the position of the labels to render either above or below the graph. See Position + * @Default {below} + */ + position?: ej.datavisualization.BulletGraph.LabelPosition|string; + + /**Specifies the Size of the labels. + * @Default {12} + */ + size?: number; + + /**Specifies the stroke color of the labels in bullet graph. + * @Default {null} + */ + stroke?: string; +} + +export interface QuantitativeScaleSettingsLocation { + + /**This property specifies the x position for rendering quantitative scale. + * @Default {10} + */ + x?: number; + + /**This property specifies the y position for rendering quantitative scale. + * @Default {10} + */ + y?: number; +} + +export interface QuantitativeScaleSettingsMajorTickSettings { + + /**Specifies the size of the major ticks. + * @Default {13} + */ + size?: number; + + /**Specifies the stroke color of the major tick lines. + * @Default {null} + */ + stroke?: string; + + /**Specifies the width of the major tick lines. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettingsMinorTickSettings { + + /**Specifies the size of minor ticks. + * @Default {7} + */ + size?: number; + + /**Specifies the stroke color of minor ticks in bullet graph. + * @Default {null} + */ + stroke?: string; + + /**Specifies the width of the minor ticks in bullet graph. + * @Default {2} + */ + width?: number; +} + +export interface QuantitativeScaleSettings { + + /**Contains property to customize the comparative measure. + */ + comparativeMeasureSettings?: QuantitativeScaleSettingsComparativeMeasureSettings; + + /**Contains property to customize the featured measure. + */ + featuredMeasureSettings?: QuantitativeScaleSettingsFeaturedMeasureSettings; + + /**Contains property to customize the featured measure. + */ + featureMeasures?: Array; + + /**Contains property to customize the fields. + */ + fields?: QuantitativeScaleSettingsFields; + + /**Specifies the interval for the Graph. + * @Default {1} + */ + interval?: number; + + /**Contains property to customize the labels. + */ + labelSettings?: QuantitativeScaleSettingsLabelSettings; + + /**Contains property to customize the position of the quantitative scale + */ + location?: QuantitativeScaleSettingsLocation; + + /**Contains property to customize the major tick lines. + */ + majorTickSettings?: QuantitativeScaleSettingsMajorTickSettings; + + /**Specifies the maximum value of the Graph. + * @Default {10} + */ + maximum?: number; + + /**Specifies the minimum value of the Graph. + * @Default {0} + */ + minimum?: number; + + /**Contains property to customize the minor ticks. + */ + minorTickSettings?: QuantitativeScaleSettingsMinorTickSettings; + + /**The specified number of minor ticks will be rendered per interval. + * @Default {4} + */ + minorTicksPerInterval?: number; + + /**Specifies the placement of ticks to render either inside or outside the scale. + * @Default {ej.datavisualization.BulletGraph.TickPlacement.Outside} + */ + tickPlacement?: ej.datavisualization.BulletGraph.TickPlacement|string; + + /**Specifies the position of the ticks to render either above,below or inside + * @Default {ej.datavisualization.BulletGraph.TickPosition.Far} + */ + tickPosition?: ej.datavisualization.BulletGraph.TickPosition|string; +} + +export interface TooltipSettings { + + /**Specifies template for caption tooltip + * @Default {null} + */ + captionTemplate?: string; + + /**Toggles the visibility of caption tooltip + * @Default {false} + */ + enableCaptionTooltip?: boolean; + + /**Specifies the ID of a div, which is to be displayed as tooltip. + * @Default {null} + */ + template?: string; + + /**Toggles the visibility of tooltip + * @Default {true} + */ + visible?: boolean; +} +} +module BulletGraph +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +//string +Oblique, +} +} +module BulletGraph +{ +enum FontWeight +{ +//string +Normal, +//string +Bold, +//string +Bolder, +//string +Lighter, +} +} +module BulletGraph +{ +enum TextAlignment +{ +//string +Near, +//string +Far, +//string +Center, +} +} +module BulletGraph +{ +enum TextAnchor +{ +//string +Start, +//string +Middle, +//string +End, +} +} +module BulletGraph +{ +enum TextPosition +{ +//string +Top, +//string +Right, +//string +Left, +//string +Bottom, +//string +Float, +} +} +module BulletGraph +{ +enum FlowDirection +{ +//string +Forward, +//string +Backward, +} +} +module BulletGraph +{ +enum Orientation +{ +//string +Horizontal, +//string +Vertical, +} +} +module BulletGraph +{ +enum LabelPlacement +{ +//string +Inside, +//string +Outside, +} +} +module BulletGraph +{ +enum LabelPosition +{ +//string +Above, +//string +Below, +} +} +module BulletGraph +{ +enum TickPlacement +{ +//string +Inside, +//string +Outside, +} +} +module BulletGraph +{ +enum TickPosition +{ +//string +Below, +//string +Above, +//string +Cross, +} +} + +class Barcode extends ej.Widget { + static fn: Barcode; + constructor(element: JQuery, options?: Barcode.Model); + constructor(element: Element, options?: Barcode.Model); + model:Barcode.Model; + defaults:Barcode.Model; + + /** To disable the barcode + * @returns {void} + */ + disable(): void; + + /** To enable the barcode + * @returns {void} + */ + enable(): void; +} +export module Barcode{ + +export interface Model { + + /**Specifies the distance between the barcode and text below it. + */ + barcodeToTextGapHeight?: number; + + /**Specifies the height of bars in the Barcode. By modifying the barHeight, the entire barcode height can be customized. Please refer to xDimension for two dimensional barcode height customization. + */ + barHeight?: number; + + /**Specifies the dark bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + darkBarColor?: any; + + /**Specifies whether the text below the barcode is visible or hidden. + */ + displayText?: boolean; + + /**Specifies whether the control is enabled. + */ + enabled?: boolean; + + /**Specifies the start and stop encode symbol in the Barcode. In one dimensional barcodes, an additional character is added as start and stop delimiters. These symbols are optional and the unique of the symbol allows the reader to determine the direction of the barcode being scanned. + */ + encodeStartStopSymbol?: number; + + /**Specifies the light bar color of the Barcode. One dimensional barcode contains a series of dark and light bars which are usually colored as black and white respectively. + */ + lightBarColor?: any; + + /**Specifies the width of the narrow bars in the barcode. The dark bars in the one dimensional barcode contains random narrow and wide bars based on the provided input which can be specified during initialization. + */ + narrowBarWidth?: number; + + /**Specifies the width of the quiet zone. In barcode, a quiet zone is the blank margin on either side of a barcode which informs the reader where a barcode's symbology starts and stops. The purpose of a quiet zone is to prevent the reader from picking up unrelated information. + */ + quietZone?: QuietZone; + + /**Specifies the type of the Barcode. See SymbologyType + */ + symbologyType?: ej.datavisualization.Barcode.SymbologyType|string; + + /**Specifies the text to be encoded in the barcode. + */ + text?: string; + + /**Specifies the color of the text/data at the bottom of the barcode. + */ + textColor?: any; + + /**Specifies the width of the wide bars in the barcode. One dimensional barcode usually contains random narrow and wide bars based on the provided which can be customized during initialization. + */ + wideBarWidth?: number; + + /**Specifies the width of the narrowest element(bar or space) in a barcode. The greater the x dimension, the more easily a barcode reader will scan. + */ + xDimension?: number; + + /**Fires after Barcode control is loaded.*/ + load? (e: LoadEventArgs): void; +} + +export interface LoadEventArgs { + + /**if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /**returns the barcode model + */ + model?: any; + + /**returns the name of the event + */ + type?: string; + + /**return the barcode state + */ + status?: boolean; +} + +export interface QuietZone { + + /**Specifies the quiet zone around the Barcode. + */ + all?: number; + + /**Specifies the bottom quiet zone of the Barcode. + */ + bottom?: number; + + /**Specifies the left quiet zone of the Barcode. + */ + left?: number; + + /**Specifies the right quiet zone of the Barcode. + */ + right?: number; + + /**Specifies the top quiet zone of the Barcode. + */ + top?: number; +} +} +module Barcode +{ +enum SymbologyType +{ +//Represents the QR code +QRBarcode, +//Represents the Data Matrix barcode +DataMatrix, +//Represents the Code 39 barcode +Code39, +//Represents the Code 39 Extended barcode +Code39Extended, +//Represents the Code 11 barcode +Code11, +//Represents the Codabar barcode +Codabar, +//Represents the Code 32 barcode +Code32, +//Represents the Code 93 barcode +Code93, +//Represents the Code 93 Extended barcode +Code93Extended, +//Represents the Code 128 A barcode +Code128A, +//Represents the Code 128 B barcode +Code128B, +//Represents the Code 128 C barcode +Code128C, +} +} + +class Map extends ej.Widget { + static fn: Map; + constructor(element: JQuery, options?: Map.Model); + constructor(element: Element, options?: Map.Model); + model:Map.Model; + defaults:Map.Model; + + /** Method for navigating to specific shape based on latitude, longitude and zoomlevel. + * @param {number} Pass the latitude value for map + * @param {number} Pass the longitude value for map + * @param {number} Pass the zoom level for map + * @returns {void} + */ + navigateTo(latitude: number, longitude: number, level: number): void; + + /** Method to perform map panning + * @param {string} Pass the direction in which map should be panned + * @returns {void} + */ + pan(direction: string): void; + + /** Method to reload the map. + * @returns {void} + */ + refresh(): void; + + /** Method to reload the shapeLayers with updated values + * @returns {void} + */ + refreshLayers(): void; + + /** Method to reload the navigation control with updated values. + * @param {any} Pass the navigation control instance + * @returns {void} + */ + refreshNavigationControl(navigation: any): void; + + /** Method to perform map zooming. + * @param {number} Pass the zoom level for map to be zoomed + * @param {boolean} Pass the boolean value to enable or disable animation while zooming + * @returns {void} + */ + zoom(level: number, isAnimate: boolean): void; +} +export module Map{ + +export interface Model { + + /**Specifies the background color for map + * @Default {white} + */ + background?: string; + + /**Specifies the base map-index of the map to determine the shapelayer to be displayed + * @Default {0} + */ + baseMapIndex?: number; + + /**Specify the center position where map should be displayed + * @Default {[0,0]} + */ + centerPosition?: any; + + /**Enables or Disables the map animation + * @Default {false} + */ + enableAnimation?: boolean; + + /**Enables or Disables the animation for layer change in map + * @Default {false} + */ + enableLayerChangeAnimation?: boolean; + + /**Enables or Disables the map panning + * @Default {true} + */ + enablePan?: boolean; + + /**Determines whether map need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /**Enables or Disables the zooming of map + * @Default {true} + */ + enableZoom?: boolean; + + /**Enables or Disables the zoom on selecting the map shape + * @Default {false} + */ + enableZoomOnSelection?: boolean; + + /**Specifies the zoom factor for map zoom value. + * @Default {1} + */ + factor?: number; + + /**Hold the shapelayers to be displayed in map + * @Default {[]} + */ + layers?: Array; + + /**Specifies the zoom level value for which map to be zoomed + * @Default {1} + */ + level?: number; + + /**Specifies the maximum zoom level of the map + * @Default {100} + */ + maxValue?: number; + + /**Specifies the minimum zoomSettings level of the map + * @Default {1} + */ + minValue?: number; + + /**Enables or Disables the navigation control for map to perform zooming and panning on map shapes. + */ + navigationControl?: any; + + /**Layer for holding the map shapes + */ + shapeLayer?: ShapeLayer; + + /**Enables or Disables the Zooming for map. + */ + zoomSettings?: any; + + /**Triggered on selecting the map markers.*/ + markerSelected? (e: MarkerSelectedEventArgs): void; + + /**Triggers while leaving the hovered map shape*/ + mouseleave? (e: MouseleaveEventArgs): void; + + /**Triggers while hovering the map shape.*/ + mouseover? (e: MouseoverEventArgs): void; + + /**Triggers once map render completed.*/ + onRenderComplete? (e: OnRenderCompleteEventArgs): void; + + /**Triggers when map panning ends.*/ + panned? (e: PannedEventArgs): void; + + /**Triggered on selecting the map shapes.*/ + shapeSelected? (e: ShapeSelectedEventArgs): void; + + /**Triggered when map is zoomed-in.*/ + zoomedIn? (e: ZoomedInEventArgs): void; + + /**Triggers when map is zoomed out.*/ + zoomedOut? (e: ZoomedOutEventArgs): void; +} + +export interface MarkerSelectedEventArgs { + + /**Returns marker object. + */ + originalEvent?: any; +} + +export interface MouseleaveEventArgs { + + /**Returns hovered map shape object. + */ + originalEvent?: any; +} + +export interface MouseoverEventArgs { + + /**Returns hovered map shape object. + */ + originalEvent?: any; +} + +export interface OnRenderCompleteEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; +} + +export interface PannedEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; +} + +export interface ShapeSelectedEventArgs { + + /**Returns selected shape object. + */ + originalEvent?: any; +} + +export interface ZoomedInEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; + + /**Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; +} + +export interface ZoomedOutEventArgs { + + /**Event parameters from map + */ + originalEvent?: any; + + /**Returns zoom level value for which the map is zoomed. + */ + zoomLevel?: any; +} + +export interface ShapeLayerBubbleSettings { + + /**Specifies the bubble Opacity value of bubbles for shape layer in map + * @Default {0.9} + */ + bubbleOpacity?: number; + + /**Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + color?: string; + + /**Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: any; + + /**Specifies the bubble color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /**Specifies the maximum size value of bubbles for shape layer in map + * @Default {20} + */ + maxValue?: number; + + /**Specifies the minimum size value of bubbles for shape layer in map + * @Default {10} + */ + minValue?: number; + + /**Specifies the showBubble visibility status map + * @Default {true} + */ + showBubble?: boolean; + + /**Specifies the tooltip visibility status of the shape layer in map + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the bubble tooltip template of the shape layer in map + * @Default {null} + */ + tooltipTemplate?: string; + + /**Specifies the bubble valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; +} + +export interface ShapeLayerLabelSettings { + + /**enable or disable the enableSmartLabel property + * @Default {false} + */ + enableSmartLabel?: boolean; + + /**set the labelLength property + * @Default {'2'} + */ + labelLength?: number; + + /**set the labelPath property + * @Default {null} + */ + labelPath?: string; + + /**enable or disable the showlabel property + * @Default {false} + */ + showLabels?: boolean; + + /**set the smartLabelSize property + * @Default {fixed} + */ + smartLabelSize?: ej.datavisualization.Map.LabelSize|string; +} + +export interface ShapeLayerLegendSettings { + + /**Determines whether the legend should be placed outside or inside the map bounds + * @Default {false} + */ + dockOnMap?: boolean; + + /**Determines the legend placement and it is valid only when dockOnMap is true + * @Default {top} + */ + dockPosition?: ej.datavisualization.Map.DockPosition|string; + + /**height value for legend setting + * @Default {0} + */ + height?: number; + + /**to get icon value for legend setting + * @Default {rectangle} + */ + icon?: ej.datavisualization.Map.LegendIcons|string; + + /**icon height value for legend setting + * @Default {20} + */ + iconHeight?: number; + + /**icon Width value for legend setting + * @Default {20} + */ + iconWidth?: number; + + /**set the orientation of legend labels + * @Default {vertical} + */ + labelOrientation?: ej.datavisualization.Map.LabelOrientation|string; + + /**to get leftLabel value for legend setting + * @Default {null} + */ + leftLabel?: string; + + /**to get mode of legend setting + * @Default {default} + */ + mode?: ej.datavisualization.Map.LegendMode|string; + + /**set the position of legend settings + * @Default {topleft} + */ + position?: ej.datavisualization.Map.Position|string; + + /**x position value for legend setting + * @Default {0} + */ + positionX?: number; + + /**y position value for legend setting + * @Default {0} + */ + positionY?: number; + + /**to get rightLabel value for legend setting + * @Default {null} + */ + rightLabel?: string; + + /**Enables or Disables the showLabels + * @Default {false} + */ + showLabels?: boolean; + + /**Enables or Disables the showLegend + * @Default {false} + */ + showLegend?: boolean; + + /**to get title of legend setting + * @Default {null} + */ + title?: string; + + /**to get type of legend setting + * @Default {layers} + */ + type?: ej.datavisualization.Map.LegendType|string; + + /**width value for legend setting + * @Default {0} + */ + width?: number; +} + +export interface ShapeLayerShapeSettings { + + /**Enables or Disables the auto fill colors for shape layer in map. When this property value set to true, shapes will be filled with palette colors. + * @Default {false} + */ + autoFill?: boolean; + + /**Specifies the colorMappings of the shape layer in map + * @Default {null} + */ + colorMappings?: any; + + /**Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. + * @Default {palette1} + */ + colorPalette?: string; + + /**Specifies the shape color valuePath of the shape layer in map + * @Default {null} + */ + colorValuePath?: string; + + /**Enables or Disables the gradient colors for map shapes. + * @Default {false} + */ + enableGradient?: boolean; + + /**Specifies the shape fill color of the shape layer in map + * @Default {#E5E5E5} + */ + fill?: string; + + /**Specifies the mouse over width of the shape layer in map + * @Default {1} + */ + highlightBorderWidth?: number; + + /**Specifies the mouse hover color of the shape layer in map + * @Default {gray} + */ + highlightColor?: string; + + /**Specifies the mouse over stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + highlightStroke?: string; + + /**Specifies the shape selection color of the shape layer in map + * @Default {gray} + */ + selectionColor?: string; + + /**Specifies the shape selection stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + selectionStroke?: string; + + /**Specifies the shape selection stroke width of the shape layer in map + * @Default {1} + */ + selectionStrokeWidth?: number; + + /**Specifies the shape stroke color of the shape layer in map + * @Default {#C1C1C1} + */ + stroke?: string; + + /**Specifies the shape stroke thickness value of the shape layer in map + * @Default {0.2} + */ + strokeThickness?: number; + + /**Specifies the shape valuePath of the shape layer in map + * @Default {null} + */ + valuePath?: string; +} + +export interface ShapeLayer { + + /**to get the type of bing map. + * @Default {aerial} + */ + bingMapType?: ej.datavisualization.Map.BingMapType|string; + + /**Specifies the bubble settings for map + */ + bubbleSettings?: ShapeLayerBubbleSettings; + + /**Specifies the datasource for the shape layer + */ + dataSource?: any; + + /**Enables or disables the animation + * @Default {false} + */ + enableAnimation?: boolean; + + /**Enables or disables the shape mouse hover + * @Default {false} + */ + enableMouseHover?: boolean; + + /**Enables or disables the shape selection + * @Default {true} + */ + enableSelection?: boolean; + + /**to get the key of bing map + * @Default {null} + */ + key?: string; + + /**Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., + */ + labelSettings?: ShapeLayerLabelSettings; + + /**Specifies the map type. + * @Default {'geometry'} + */ + layerType?: ej.datavisualization.Map.LayerType|string; + + /**Options for enabling and configuring legendSettings position, height, width, mode, type etc., + */ + legendSettings?: ShapeLayerLegendSettings; + + /**Specifies the map items template for shapes. + */ + mapItemsTemplate?: string; + + /**Specify markers for shape layer. + * @Default {[]} + */ + markers?: Array; + + /**Specifies the map marker template for map layer. + * @Default {null} + */ + markerTemplate?: string; + + /**Specify selectedMapShapes for shape layer + * @Default {[]} + */ + selectedMapShapes?: Array; + + /**Specifies the selection mode of the map. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.Map.SelectionMode|string; + + /**Specifies the shape data for the shape layer + */ + shapeDataobject?: any; + + /**Specifies the shape settings of map layer + */ + shapeSettings?: ShapeLayerShapeSettings; + + /**Shows or hides the map items. + * @Default {false} + */ + showMapItems?: boolean; + + /**Shows or hides the tooltip for shapes + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the sub shape layers + * @Default {[]} + */ + subLayers?: Array; + + /**Specifies the tooltip template for shapes. + */ + tooltipTemplate?: string; + + /**Specifies the url template for the OSM type map. + * @Default {'http://a.tile.openstreetmap.org/level/tileX/tileY.png'} + */ + urlTemplate?: string; +} +} +module Map +{ +enum Position +{ +//specifies the none position +None, +//specifies the topleft position +Topleft, +//specifies the topcenter position +Topcenter, +//specifies the topright position +Topright, +//specifies the centerleft position +Centerleft, +//specifies the center position +Center, +//specifies the centerright position +Centerright, +//specifies the bottomleft position +Bottomleft, +//specifies the bottomcenter position +Bottomcenter, +//specifies the bottomright position +Bottomright, +} +} +module Map +{ +enum Orientation +{ +//specifies the horizontal position +Horizontal, +//specifies the vertical position +Vertical, +} +} +module Map +{ +enum BingMapType +{ +//specifies the aerial type +Aerial, +//specifies the aerialwithlabel type +Aerialwithlabel, +//specifies the road type +Road, +} +} +module Map +{ +enum LabelSize +{ +//specifies the fixed size +Fixed, +//specifies the default size +Default, +} +} +module Map +{ +enum LayerType +{ +//specifies the geometry type +Geometry, +//specifies the osm type +Osm, +//specifies the bing type +Bing, +} +} +module Map +{ +enum DockPosition +{ +//specifies the top position +Top, +//specifies the bottom position +Bottom, +//specifies the bottom position +Right, +//specifies the left position +Left, +} +} +module Map +{ +enum LegendIcons +{ +//specifies the rectangle position +Rectangle, +//specifies the circle position +Circle, +} +} +module Map +{ +enum LabelOrientation +{ +//specifies the horizontal position +Horizontal, +//specifies the vertical position +Vertical, +} +} +module Map +{ +enum LegendMode +{ +//specifies the default mode +Default, +//specifies the interactive mode +Interactive, +} +} +module Map +{ +enum LegendType +{ +//specifies the layers type +Layers, +//specifies the bubbles type +Bubbles, +} +} +module Map +{ +enum SelectionMode +{ +//specifies the default position +Default, +//specifies the multiple position +Multiple, +} +} + +class TreeMap extends ej.Widget { + static fn: TreeMap; + constructor(element: JQuery, options?: TreeMap.Model); + constructor(element: Element, options?: TreeMap.Model); + model:TreeMap.Model; + defaults:TreeMap.Model; + + /** Method to reload treemap with updated values. + * @returns {void} + */ + refresh(): void; +} +export module TreeMap{ + +export interface Model { + + /**Specifies the border brush color of the treemap + * @Default {white} + */ + borderBrush?: string; + + /**Specifies the border thickness of the treemap + * @Default {1} + */ + borderThickness?: number; + + /**Specifies the colors of the paletteColorMapping + * @Default {[]} + */ + colors?: Array; + + /**Specifies the color valuepath of the treemap + * @Default {null} + */ + colorValuePath?: string; + + /**Specifies the datasource of the treemap + * @Default {null} + */ + dataSource?: any; + + /**Specifies the desaturationColorMapping settings of the treemap + */ + desaturationColorMapping?: any; + + /**Specifies the dockPosition for legend + * @Default {top} + */ + dockPosition?: ej.datavisualization.TreeMap.DockPosition|string; + + /**specifies the drillDown header color + * @Default {'null'} + */ + drillDownHeaderColor?: string; + + /**specifies the drillDown selection color + * @Default {'#000000'} + */ + drillDownSelectionColor?: string; + + /**Enable/Disable the drillDown for treemap + * @Default {false} + */ + enableDrillDown?: boolean; + + /**Specifies whether treemap need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /**Specifies the from value for desaturation color mapping + * @Default {0} + */ + from?: number; + + /**Specifies the group color mapping of the treemap + * @Default {[]} + */ + groupColorMapping?: Array; + + /**Specifies the height for legend + * @Default {30} + */ + height?: number; + + /**Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightBorderBrush?: string; + + /**Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightBorderThickness?: number; + + /**Specifies the highlight border brush of treemap + * @Default {gray} + */ + highlightGroupBorderBrush?: string; + + /**Specifies the border thickness when treemap items is highlighted in the treemap + * @Default {5} + */ + highlightGroupBorderThickness?: number; + + /**Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightGroupOnSelection?: boolean; + + /**Specifies whether treemap item need to highlighted on selection + * @Default {false} + */ + highlightOnSelection?: boolean; + + /**Specifies the iconHeight for legend + * @Default {15} + */ + iconHeight?: number; + + /**Specifies the iconWidth for legend + * @Default {15} + */ + iconWidth?: number; + + /**Specifies the items layout mode of the treemap. Accepted itemsLayoutMode values are Squarified, SliceAndDiceHorizontal, SliceAndDiceVertical and SliceAndDiceAuto + * @Default {Squarified} + */ + itemsLayoutMode?: ej.datavisualization.TreeMap.ItemsLayoutMode|string; + + /**Specifies the leaf settings of the treemap + */ + leafItemSettings?: LeafItemSettings; + + /**Specifies the legend settings of the treemap + */ + legendSettings?: any; + + /**Specify levels of treemap for grouped visualization of datas + * @Default {[]} + */ + levels?: Array; + + /**Specifies the paletteColorMapping of the treemap + */ + paletteColorMapping?: any; + + /**Specifies the rangeColorMapping settings of the treemap + */ + rangeColorMapping?: Array; + + /**Specifies the rangeMaximum value for desaturation color mapping + * @Default {0} + */ + rangeMaximum?: number; + + /**Specifies the rangeMinimum value for desaturation color mapping + * @Default {0} + */ + rangeMinimum?: number; + + /**Specifies the legend visibility status of the treemap + * @Default {false} + */ + showLegend?: boolean; + + /**Specifies whether treemap tooltip need to be visible + * @Default {false} + */ + showTooltip?: boolean; + + /**Specifies the template for legendSettings + * @Default {null} + */ + template?: string; + + /**Specifies the to value for desaturation color mapping + * @Default {0} + */ + to?: number; + + /**Specifies the tooltip template of the treemap + * @Default {null} + */ + tooltipTemplate?: string; + + /**Hold the treeMapItems to be displayed in treemap + * @Default {[]} + */ + treeMapItems?: Array; + + /**Hold the Level settings of TreeMap + */ + treeMapLevel?: TreeMapLevel; + + /**Specifies the uniColorMapping settings of the treemap + */ + uniColorMapping?: any; + + /**Specifies the weight valuepath of the treemap + * @Default {null} + */ + weightValuePath?: string; + + /**Specifies the width for legend + * @Default {100} + */ + width?: number; + + /**Triggers on treemap item selected.*/ + treeMapItemSelected? (e: TreeMapItemSelectedEventArgs): void; +} + +export interface TreeMapItemSelectedEventArgs { + + /**Returns selected treeMapItem object. + */ + originalEvent?: any; +} + +export interface LeafItemSettings { + + /**Specifies the border bruch color of the leaf item. + * @Default {white} + */ + borderBrush?: string; + + /**Specifies the border thickness of the leaf item. + * @Default {1} + */ + borderThickness?: number; + + /**Specifies the label template of the leaf item. + * @Default {null} + */ + itemTemplate?: string; + + /**Specifies the label path of the leaf item. + * @Default {null} + */ + labelPath?: string; + + /**Specifies the position of the leaf labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /**Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Shows or hides the label of the leaf item. + * @Default {false} + */ + showLabels?: boolean; +} + +export interface TreeMapLevel { + + /**specifies the group background + * @Default {null} + */ + groupBackground?: string; + + /**Specifies the group border color for tree map level. + * @Default {null} + */ + groupBorderColor?: string; + + /**Specifies the group border thickness for tree map level. + * @Default {1} + */ + groupBorderThickness?: number; + + /**Specifies the group gap for tree map level. + * @Default {1} + */ + groupGap?: number; + + /**Specifies the group padding for tree map level. + * @Default {4} + */ + groupPadding?: number; + + /**Specifies the group path for tree map level. + */ + groupPath?: string; + + /**Specifies the header height for tree map level. + * @Default {0} + */ + headerHeight?: number; + + /**Specifies the header template for tree map level. + * @Default {null} + */ + headerTemplate?: string; + + /**Specifies the mode of header visibility + * @Default {visible} + */ + headerVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Specifies the position of the labels. + * @Default {center} + */ + labelPosition?: ej.datavisualization.TreeMap.Position|string; + + /**Specifies the label template for tree map level. + * @Default {null} + */ + labelTemplate?: string; + + /**Specifies the mode of label visibility + * @Default {visible} + */ + labelVisibilityMode?: ej.datavisualization.TreeMap.VisibilityMode|string; + + /**Shows or hides the header for tree map level. + * @Default {false} + */ + showHeader?: boolean; + + /**Shows or hides the labels for tree map level. + * @Default {false} + */ + showLabels?: boolean; +} +} +module TreeMap +{ +enum DockPosition +{ +//specifies the top position +Top, +//specifies the bottom position +Bottom, +//specifies the bottom position +Right, +//specifies the left position +Left, +} +} +module TreeMap +{ +enum ItemsLayoutMode +{ +//specifies the squarified as layout type position +Squarified, +//specifies the sliceanddicehorizontal as layout type position +Sliceanddicehorizontal, +//specifies the sliceanddicevertical as layout type position +Sliceanddicevertical, +//specifies the sliceanddiceauto as layout type position +Sliceanddiceauto, +} +} +module TreeMap +{ +enum Position +{ +//specifies the none position +None, +//specifies the topleft position +Topleft, +//specifies the topcenter position +Topcenter, +//specifies the topright position +Topright, +//specifies the centerleft position +Centerleft, +//specifies the center position +Center, +//specifies the centerright position +Centerright, +//specifies the bottomleft position +Bottomleft, +//specifies the bottomcenter position +Bottomcenter, +//specifies the bottomright position +Bottomright, +} +} +module TreeMap +{ +enum VisibilityMode +{ +//specifies the visible mode +Top, +//specifies the hideonexceededlength mode +Hideonexceededlength, +} +} +module TreeMap +{ +enum groupSelectionMode +{ +//specifies the default mode +Default, +//specifies the multiple mode +Multiple, +} +} + +class Diagram extends ej.Widget { + static fn: Diagram; + constructor(element: JQuery, options?: Diagram.Model); + constructor(element: Element, options?: Diagram.Model); + model:Diagram.Model; + defaults:Diagram.Model; + + /** Add nodes and connectors to diagram at runtime + * @param {any} a JSON to define a node/connector or an array of nodes and connector + * @returns {void} + */ + add(node: any): void; + + /** Add a label to a node at runtime + * @param {string} name of the node to which label will be added + * @param {any} JSON for the new label to be added + * @returns {void} + */ + addLabel(nodeName: string, newLabel: any): void; + + /** Add a phase to a swimlane at runtime + * @param {string} name of the swimlane to which the phase will be added + * @param {any} JSON object to define the phase to be added + * @returns {void} + */ + addPhase(name: string, options: any): void; + + /** Add a collection of ports to the node specified by name + * @param {string} name of the node to which the ports have to be added + * @param {Array} a collection of ports to be added to the specified node + * @returns {void} + */ + addPorts(name: string, ports: Array): void; + + /** Add the specified node to selection list + * @param {any} the node to be selected + * @param {boolean} to define whether to clear the existing selection or not + * @returns {void} + */ + addSelection(node: any, clearSelection: boolean): void; + + /** Align the selected objects based on the reference object and direction + * @param {string} to specify the direction towards which the selected objects are to be aligned("left","right",top","bottom") + * @returns {void} + */ + align(direction: string): void; + + /** Bring the specified portion of the diagram content to the diagram viewport + * @param {any} the rectangular region that is to be brought into diagram viewport + * @returns {void} + */ + bringIntoView(rect: any): void; + + /** Bring the specified portion of the diagram content to the center of the diagram viewport + * @param {any} the rectangular region that is to be brought to the center of diagram viewport + * @returns {void} + */ + bringToCenter(rect: any): void; + + /** Visually move the selected object over all other intersected objects + * @returns {void} + */ + bringToFront(): void; + + /** Remove all the elements from diagram + * @returns {void} + */ + clear(): void; + + /** Remove the current selection in diagram + * @returns {void} + */ + clearSelection(): void; + + /** Copy the selected object to internal clipboard and get the copied object + * @returns {any} + */ + copy(): any; + + /** Cut the selected object from diagram to diagram internal clipboard + * @returns {void} + */ + cut(): void; + + /** Export the diagram as downloadable files or as data + * @param {Diagram.Options} options to export the desired region of diagram to the desired formats.NameTypeDescriptionfileNamestringname of the file to be downloaded.formatstringformat of the exported file/data. See [File Formats](/js/api/global#fileformats).modestringto set whether to export diagram as a file or as raw data. See [Export Modes](/js/api/global#exportmodes).regionstringto set the region of the diagram to be exported. See [Region](/js/api/global#region).boundsobjectto export any custom region of diagram.marginobjectto set margin to the exported data. + * @returns {string} + */ + exportDiagram(options: Diagram.Options): string; + + /** Read a node/connector object by its name + * @param {string} name of the node/connector that is to be identified + * @returns {any} + */ + findNode(name: string): any; + + /** Fit the diagram content into diagram viewport + * @param {string} to set the mode of fit to command. See [Fit Mode](/js/api/global#fitmode) + * @param {string} to set whether the region to be fit will be based on diagram elements or page settings [Region](/js/api/global#region) + * @param {any} to set the required margin + * @returns {void} + */ + fitToPage(mode: string, region: string, margin: any): void; + + /** Group the selected nodes and connectors + * @returns {void} + */ + group(): void; + + /** Insert a label into a node's label collection at runtime + * @param {string} name of the node to which the label has to be inserted + * @param {any} JSON to define the new label + * @param {number} index to insert the label into the node + * @returns {void} + */ + insertLabel(name: string, label: any, index: number): void; + + /** Refresh the diagram with the specified layout + * @returns {void} + */ + layout(): void; + + /** Load the diagram + * @param {any} JSON data to load the diagram + * @returns {void} + */ + load(data: any): void; + + /** Visually move the selected object over its closest intersected object + * @returns {void} + */ + moveForward(): void; + + /** Move the selected objects by either one pixel or by the pixels specified through argument + * @param {string} specifies the direction to move the selected objects ("left","right",top","bottom") + * @param {number} specifies the number of pixels by which the selected objects have to be moved + * @returns {void} + */ + nudge(direction: string, delta: number): void; + + /** Paste the selected object from internal clipboard to diagram + * @param {any} object to be added to diagram + * @param {boolean} to define whether the specified object is to be renamed or not + * @returns {void} + */ + paste(object: any, rename: boolean): void; + + /** Print the diagram as image + * @returns {void} + */ + print(): void; + + /** Restore the last action that was reverted + * @returns {void} + */ + redo(): void; + + /** Refresh the diagram at runtime + * @returns {void} + */ + refresh(): void; + + /** Remove either the given node/connector or the selected element from diagram + * @param {any} the node/connector to be removed from diagram + * @returns {void} + */ + remove(node: any): void; + + /** Remove a particular object from selection list + * @param {any} the node/connector to be removed from selection list + * @returns {void} + */ + removeSelection(node: any): void; + + /** Scale the selected objects to the height of the first selected object + * @returns {void} + */ + sameHeight(): void; + + /** Scale the selected objects to the size of the first selected object + * @returns {void} + */ + sameSize(): void; + + /** Scale the selected objects to the width of the first selected object + * @returns {void} + */ + sameWidth(): void; + + /** Returns the diagram as serialized JSON + * @returns {any} + */ + save(): any; + + /** Bring the node into view + * @param {any} the node/connector to be brought into view + * @returns {void} + */ + scrollToNode(node: any): void; + + /** Select all nodes and connector in diagram + * @returns {void} + */ + selectAll(): void; + + /** Visually move the selected object behind its closest intersected object + * @returns {void} + */ + sendBackward(): void; + + /** Visually move the selected object behind all other intersected objects + * @returns {void} + */ + sendToBack(): void; + + /** Update the horizontal space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceAcross(): void; + + /** Update the vertical space between the selected objects as equal and within the selection boundary + * @returns {void} + */ + spaceDown(): void; + + /** Move the specified label to edit mode + * @param {any} node/connector that contains the label to be edited + * @param {any} to be edited + * @returns {void} + */ + startLabelEdit(node: any, label: any): void; + + /** Reverse the last action that was performed + * @returns {void} + */ + undo(): void; + + /** Ungroup the selected group + * @returns {void} + */ + ungroup(): void; + + /** Update diagram at runtime + * @param {any} JSON to specify the diagram properties that have to be modified + * @returns {void} + */ + update(options: any): void; + + /** Update Connectors at runtime + * @param {string} name of the connector to be updated + * @param {any} JSON to specify the connector properties that have to be updated + * @returns {void} + */ + updateConnector(name: string, options: any): void; + + /** Update the given label at runtime + * @param {string} the name of node/connector which contains the label to be updated + * @param {any} the label to be modified + * @param {any} JSON to specify the label properties that have to be updated + * @returns {any} + */ + updateLabel(nodeName: string, label: any, options: any): any; + + /** Update nodes at runtime + * @param {string} name of the node that is to be updated + * @param {any} JSON to specify the properties of node that have to be updated + * @returns {void} + */ + updateNode(name: string, options: any): void; + + /** Update a port with its modified properties at runtime + * @param {string} the name of node which contains the port to be updated + * @param {any} the port to be updated + * @param {any} JSON to specify the properties of the port that have to be updated + * @returns {void} + */ + updatePort(nodeName: string, port: any, options: any): void; + + /** Update the specified node as selected object + * @param {string} name of the node to be updated as selected object + * @returns {void} + */ + updateSelectedObject(name: string): void; + + /** Update the selection at runtime + * @param {boolean} to specify whether to show the user handles or not + * @returns {void} + */ + updateSelection(showUserHandles: boolean): void; + + /** Update userhandles with respect to the given node + * @param {any} node/connector with respect to which, the user handles have to be updated + * @returns {void} + */ + updateUserHandles(node: any): void; + + /** Update the diagram viewport at runtime + * @returns {void} + */ + updateViewPort(): void; + + /** Upgrade the diagram from old version + * @param {any} to be upgraded + * @returns {void} + */ + upgrade(data: any): void; + + /** Used to zoomIn/zoomOut diagram + * @param {any} options to zoom the diagram(zoom factor, zoomIn/zoomOut) + * @returns {void} + */ + zoomTo(zoom: any): void; +} +export module Diagram{ + +export interface Options { + + /**name of the file to be downloaded. + */ + fileName?: string; + + /**format of the exported file/data. See [File Formats](/js/api/global#fileformats). + */ + format?: string; + + /**to set whether to export diagram as a file or as raw data. See [Export Modes](/js/api/global#exportmodes). + */ + mode?: string; + + /**to set the region of the diagram to be exported. See [Region](/js/api/global#region). + */ + region?: string; + + /**to export any custom region of diagram. + */ + bounds?: any; + + /**to set margin to the exported data. + */ + margin?: any; +} + +export interface Model { + + /**Defines the background color of diagram elements + * @Default {transparent} + */ + backgroundColor?: string; + + /**Defines the path of the background image of diagram elements + * @Default {null} + */ + backgroundImage?: string; + + /**Sets the direction of line bridges. + * @Default {ej.datavisualization.Diagram.BridgeDirection.Top} + */ + bridgeDirection?: ej.datavisualization.Diagram.BridgeDirection|string; + + /**Defines a set of custom commands and binds them with a set of desired key gestures. + */ + commandManager?: CommandManager; + + /**A collection of JSON objects where each object represents a connector + * @Default {[]} + */ + connectors?: Array; + + /**Binds the custom JSON data with connector properties + * @Default {null} + */ + connectorTemplate?: any; + + /**Enables/Disables the default behaviors of the diagram. + * @Default {ej.datavisualization.Diagram.DiagramConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.DiagramConstraints|string; + + /**An object to customize the context menu of diagram + */ + contextMenu?: ContextMenu; + + /**Configures the data source that is to be bound with diagram + */ + dataSourceSettings?: DataSourceSettings; + + /**Initializes the default values for nodes and connectors + * @Default {{}} + */ + defaultSettings?: DefaultSettings; + + /**Sets the type of Json object to be drawn through drawing tool + * @Default {{}} + */ + drawType?: any; + + /**Enables or disables auto scroll in diagram + * @Default {true} + */ + enableAutoScroll?: boolean; + + /**Enables or disables diagram context menu + * @Default {true} + */ + enableContextMenu?: boolean; + + /**Specifies the height of the diagram + * @Default {null} + */ + height?: string; + + /**Customizes the undo redo functionality + */ + historyManager?: HistoryManager; + + /**Automatically arranges the nodes and connectors in a predefined manner + */ + layout?: Layout; + + /**Defines the current culture of diagram + * @Default {en-US} + */ + locale?: string; + + /**Array of JSON objects where each object represents a node + * @Default {[]} + */ + nodes?: Array; + + /**Binds the custom JSON data with node properties + * @Default {null} + */ + nodeTemplate?: any; + + /**Defines the size and appearance of diagram page + */ + pageSettings?: PageSettings; + + /**Defines the zoom value, zoom factor, scroll status and view port size of the diagram + */ + scrollSettings?: ScrollSettings; + + /**Defines the size and position of selected items and defines the appearance of selector + */ + selectedItems?: SelectedItems; + + /**Enables or disables tooltip of diagram + * @Default {true} + */ + showTooltip?: boolean; + + /**Defines the gridlines and defines how and when the objects have to be snapped + */ + snapSettings?: SnapSettings; + + /**Enables/Disables the interactive behaviors of diagram. + * @Default {ej.datavisualization.Diagram.Tool.All} + */ + tool?: ej.datavisualization.Diagram.Tool|string; + + /**An object that defines the description, appearance and alignments of tooltips + * @Default {null} + */ + tooltip?: Tooltip; + + /**Specifies the width of the diagram + * @Default {null} + */ + width?: string; + + /**Sets the factor by which we can zoom in or zoom out + * @Default {0.2} + */ + zoomFactor?: number; + + /**Triggers When auto scroll is changed*/ + autoScrollChange? (e: AutoScrollChangeEventArgs): void; + + /**Triggers when a node, connector or diagram is clicked*/ + click? (e: ClickEventArgs): void; + + /**Triggers when the connection is changed*/ + connectionChange? (e: ConnectionChangeEventArgs): void; + + /**Triggers when the connector collection is changed*/ + connectorCollectionChange? (e: ConnectorCollectionChangeEventArgs): void; + + /**Triggers when the connectors' source point is changed*/ + connectorSourceChange? (e: ConnectorSourceChangeEventArgs): void; + + /**Triggers when the connectors' target point is changed*/ + connectorTargetChange? (e: ConnectorTargetChangeEventArgs): void; + + /**Triggers before opening the context menu*/ + contextMenuBeforeOpen? (e: ContextMenuBeforeOpenEventArgs): void; + + /**Triggers when a context menu item is clicked*/ + contextMenuClick? (e: ContextMenuClickEventArgs): void; + + /**Triggers when a node, connector or diagram model is clicked twice*/ + doubleClick? (e: DoubleClickEventArgs): void; + + /**Triggers while dragging the elements in diagram*/ + drag? (e: DragEventArgs): void; + + /**Triggers when a symbol is dragged into diagram from symbol palette*/ + dragEnter? (e: DragEnterEventArgs): void; + + /**Triggers when a symbol is dragged outside of the diagram.*/ + dragLeave? (e: DragLeaveEventArgs): void; + + /**Triggers when a symbol is dragged over diagram*/ + dragOver? (e: DragOverEventArgs): void; + + /**Triggers when a symbol is dragged and dropped from symbol palette to drawing area*/ + drop? (e: DropEventArgs): void; + + /**Triggers when a child is added to or removed from a group*/ + groupChange? (e: GroupChangeEventArgs): void; + + /**Triggers when a diagram element is clicked*/ + itemClick? (e: ItemClickEventArgs): void; + + /**Triggers when mouse enters a node/connector*/ + mouseEnter? (e: MouseEnterEventArgs): void; + + /**Triggers when mouse leaves node/connector*/ + mouseLeave? (e: MouseLeaveEventArgs): void; + + /**Triggers when mouse hovers over a node/connector*/ + mouseOver? (e: MouseOverEventArgs): void; + + /**Triggers when node collection is changed*/ + nodeCollectionChange? (e: NodeCollectionChangeEventArgs): void; + + /**Triggers when the node properties(x, y,width and height alone) are changed using nudge commands or updateNode API.*/ + propertyChange? (e: PropertyChangeEventArgs): void; + + /**Triggers when the diagram elements are rotated*/ + rotationChange? (e: RotationChangeEventArgs): void; + + /**Triggers when the diagram is zoomed or panned*/ + scrollChange? (e: ScrollChangeEventArgs): void; + + /**Triggers when a connector segment is edited*/ + segmentChange? (e: SegmentChangeEventArgs): void; + + /**Triggers when the selection is changed in diagram*/ + selectionChange? (e: SelectionChangeEventArgs): void; + + /**Triggers when a node is resized*/ + sizeChange? (e: SizeChangeEventArgs): void; + + /**Triggers when label editing is ended*/ + textChange? (e: TextChangeEventArgs): void; +} + +export interface AutoScrollChangeEventArgs { + + /**Returns the delay between subsequent auto scrolls + */ + delay?: string; +} + +export interface ClickEventArgs { + + /**parameter returns the clicked node, connector or diagram + */ + element?: any; + + /**parameter returns the object that is actually clicked + */ + actualObject?: number; + + /**parameter returns the horizontal coordinate of the mouse pointer, relative to the diagram + */ + offsetX?: number; + + /**parameter returns the vertical coordinate of the mouse pointer, relative to the diagram + */ + offsetY?: number; + + /**parameter returns the count of how many times the mouse button is pressed + */ + count?: number; + + /**parameter returns the actual click event arguments that explains which button is clicked + */ + event?: any; +} + +export interface ConnectionChangeEventArgs { + + /**parameter returns the connection that is changed between nodes, ports or points + */ + element?: any; + + /**parameter returns the new source node or target node of the connector + */ + connection?: string; + + /**parameter returns the new source port or target port of the connector + */ + port?: any; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ConnectorCollectionChangeEventArgs { + + /**parameter returns whether the connector is inserted or removed + */ + changeType?: string; + + /**parameter returns the connector that is to be added or deleted + */ + element?: any; + + /**parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; +} + +export interface ConnectorSourceChangeEventArgs { + + /**returns the connector, the source point of which is being dragged + */ + element?: any; + + /**returns the source node of the element + */ + node?: any; + + /**returns the source point of the element + */ + point?: any; + + /**returns the source port of the element + */ + port?: any; + + /**returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ConnectorTargetChangeEventArgs { + + /**parameter returns the connector, the target point of which is being dragged + */ + element?: any; + + /**returns the target node of the element + */ + node?: any; + + /**returns the target point of the element + */ + point?: any; + + /**returns the target port of the element + */ + port?: any; + + /**returns the state of connection end point dragging(starting, dragging, completed) + */ + dragState?: string; + + /**parameter defines whether to cancel the change or not + */ + cancel?: boolean; +} + +export interface ContextMenuBeforeOpenEventArgs { + + /**parameter returns the diagram object + */ + diagram?: any; + + /**parameter returns the actual arguments from context menu + */ + contextmenu?: any; + + /**parameter returns the object that was clicked + */ + target?: any; +} + +export interface ContextMenuClickEventArgs { + + /**parameter returns the id of the selected context menu item + */ + id?: string; + + /**parameter returns the text of the selected context menu item + */ + text?: string; + + /**parameter returns the parent id of the selected context menu item + */ + parentId?: string; + + /**parameter returns the parent text of the selected context menu item + */ + parentText?: string; + + /**parameter returns the object that was clicked + */ + target?: any; + + /**parameter defines whether to execute the click event or not + */ + canExecute?: boolean; +} + +export interface DoubleClickEventArgs { + + /**parameter returns the object that is actually clicked + */ + actualObject?: any; + + /**parameter returns the selected object + */ + element?: any; +} + +export interface DragEventArgs { + + /**parameter returns the node or connector that is being dragged + */ + element?: any; + + /**parameter returns the previous position of the node/connector + */ + oldValue?: any; + + /**parameter returns the new position of the node/connector + */ + newValue?: any; + + /**parameter returns the state of drag event (Starting, dragging, completed) + */ + dragState?: string; + + /**parameter returns whether or not to cancel the drag event + */ + cancel?: boolean; +} + +export interface DragEnterEventArgs { + + /**parameter returns the node or connector that is dragged into diagram + */ + element?: any; + + /**parameter returns whether to add or remove the symbol from diagram + */ + cancel?: boolean; +} + +export interface DragLeaveEventArgs { + + /**parameter returns the node or connector that is dragged outside of the diagram + */ + element?: any; +} + +export interface DragOverEventArgs { + + /**parameter returns the node or connector that is dragged over diagram + */ + element?: any; + + /**parameter defines whether the symbol can be dropped at the current mouse position + */ + allowDrop?: boolean; + + /**parameter returns the node/connector over which the symbol is dragged + */ + target?: any; + + /**parameter returns the previous position of the node/connector + */ + oldValue?: any; + + /**parameter returns the new position of the node/connector + */ + newValue?: any; + + /**parameter returns whether or not to cancel the dragOver event + */ + cancel?: boolean; +} + +export interface DropEventArgs { + + /**parameter returns node or connector that is being dropped + */ + element?: any; + + /**parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; + + /**parameter returns the object from where the element is dragged + */ + source?: any; + + /**parameter returns the object over which the object will be dropped + */ + target?: any; + + /**parameter returns the enum which defines the type of the source + */ + sourceType?: string; +} + +export interface GroupChangeEventArgs { + + /**parameter returns the object that is added to/removed from a group + */ + element?: any; + + /**parameter returns the old parent group(if any) of the object + */ + oldParent?: any; + + /**parameter returns the new parent group(if any) of the object + */ + newParent?: any; + + /**parameter returns the cause of group change("group", unGroup") + */ + cause?: string; +} + +export interface ItemClickEventArgs { + + /**parameter returns the object that was actually clicked + */ + actualObject?: any; + + /**parameter returns the object that is selected + */ + selectedObject?: any; + + /**parameter returns whether or not to cancel the drop event + */ + cancel?: boolean; + + /**parameter returns the actual click event arguments that explains which button is clicked + */ + event?: any; +} + +export interface MouseEnterEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the selected object is dragged + */ + source?: any; + + /**parameter returns the target object over which the selected object is dragged + */ + target?: any; +} + +export interface MouseLeaveEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the selected object is dragged + */ + source?: any; + + /**parameter returns the target object over which the selected object is dragged + */ + target?: any; +} + +export interface MouseOverEventArgs { + + /**parameter returns the target node or connector + */ + element?: any; + + /**parameter returns the object from where the element is dragged + */ + source?: any; + + /**parameter returns the object over which the element is being dragged. + */ + target?: any; +} + +export interface NodeCollectionChangeEventArgs { + + /**parameter returns whether the node is to be added or removed + */ + changeType?: string; + + /**parameter returns the node which needs to be added or deleted + */ + element?: any; + + /**parameter defines whether to cancel the collection change or not + */ + cancel?: boolean; +} + +export interface PropertyChangeEventArgs { + + /**parameter returns the selected element + */ + element?: any; + + /**parameter returns the action is nudge or not + */ + cause?: string; + + /**parameter returns the new value of the node property that is being changed + */ + newValue?: any; + + /**parameter returns the old value of the property that is being changed + */ + oldValue?: any; + + /**parameter returns the name of the property that is changed + */ + propertyName?: string; +} + +export interface RotationChangeEventArgs { + + /**parameter returns the node that is rotated + */ + element?: any; + + /**parameter returns the previous rotation angle + */ + oldValue?: any; + + /**parameter returns the new rotation angle + */ + newValue?: any; + + /**parameter to specify whether or not to cancel the event + */ + cancel?: boolean; +} + +export interface ScrollChangeEventArgs { + + /**Parameter returns the new zoom value, horizontal and vertical scroll offsets. + */ + newValues?: any; + + /**parameter returns the previous zoom value, horizontal and vertical scroll offsets. + */ + oldValues?: any; +} + +export interface SegmentChangeEventArgs { + + /**Parameter returns the connector that is being edited + */ + element?: any; + + /**parameter returns the state of editing (starting, dragging, completed) + */ + dragState?: string; + + /**parameter returns the current mouse position + */ + point?: any; + + /**parameter to specify whether or not to cancel the event + */ + cancel?: boolean; +} + +export interface SelectionChangeEventArgs { + + /**parameter returns whether the item is selected or removed selection + */ + changeType?: string; + + /**parameter returns the item which is selected or to be selected + */ + element?: any; + + /**parameter returns the collection of nodes and connectors that have to be removed from selection list + */ + oldItems?: Array; + + /**parameter returns the collection of nodes and connectors that have to be added to selection list + */ + newItems?: Array; + + /**parameter returns the collection of nodes and connectors that will be selected after selection change + */ + selectedItems?: Array; + + /**parameter to specify whether or not to cancel the selection change event + */ + cancel?: boolean; +} + +export interface SizeChangeEventArgs { + + /**parameter returns node that was resized + */ + element?: any; + + /**parameter to cancel the size change + */ + cancel?: boolean; + + /**parameter returns the new width, height, offsetX and offsetY values of the element that is being resized + */ + newValue?: any; + + /**parameter returns the previous width,height,offsetX and offsetY values of the element that is being resized + */ + oldValue?: any; + + /**parameter returns the state of resizing(starting,resizing,completed) + */ + resizeState?: string; + + /**parameter returns the difference between new and old value + */ + offset?: any; +} + +export interface TextChangeEventArgs { + + /**parameter returns the node that contains the text being edited + */ + element?: any; + + /**parameter returns the new text + */ + value?: string; + + /**parameter returns the keyCode of the key entered + */ + keyCode?: string; +} + +export interface CommandManagerCommandsGesture { + + /**Sets the key value, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.Keys.None} + */ + key?: ej.datavisualization.Diagram.Keys|string; + + /**Sets a combination of key modifiers, on recognition of which the command will be executed. + * @Default {ej.datavisualization.Diagram.KeyModifiers.None} + */ + keyModifiers?: ej.datavisualization.Diagram.KeyModifiers|string; +} + +export interface CommandManagerCommands { + + /**A method that defines whether the command is executable at the moment or not. + */ + canExecute?: Function; + + /**A method that defines what to be executed when the key combination is recognized. + */ + execute?: Function; + + /**Defines a combination of keys and key modifiers, on recognition of which the command will be executed + */ + gesture?: CommandManagerCommandsGesture; + + /**Defines any additional parameters that are required at runtime + * @Default {null} + */ + parameter?: any; +} + +export interface CommandManager { + + /**An object that maps a set of command names with the corresponding command objects + * @Default {{}} + */ + commands?: CommandManagerCommands; +} + +export interface ConnectorsSegments { + + /**Sets the direction of orthogonal segment + */ + direction?: string; + + /**Describes the length of orthogonal segment + * @Default {undefined} + */ + length?: number; + + /**Describes the end point of bezier/straight segment + * @Default {Diagram.Point()} + */ + point?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Defines the first control point of the bezier segment + * @Default {null} + */ + point1?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Defines the second control point of bezier segment + * @Default {null} + */ + point2?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Sets the type of the segment. + * @Default {ej.datavisualization.Diagram.Segments.Straight} + */ + type?: ej.datavisualization.Diagram.Segments|string; + + /**Describes the length and angle between the first control point and the start point of bezier segment + * @Default {null} + */ + vector1?: any; + + /**Describes the length and angle between the second control point and end point of bezier segment + * @Default {null} + */ + vector2?: any; +} + +export interface ConnectorsSourceDecorator { + + /**Sets the border color of the source decorator + * @Default {black} + */ + borderColor?: string; + + /**Sets the border width of the decorator + * @Default {1} + */ + borderWidth?: number; + + /**Sets the fill color of the source decorator + * @Default {black} + */ + fillColor?: string; + + /**Sets the height of the source decorator + * @Default {8} + */ + height?: number; + + /**Defines the custom shape of the source decorator + */ + pathData?: string; + + /**Defines the shape of the source decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /**Defines the width of the source decorator + * @Default {8} + */ + width?: number; +} + +export interface ConnectorsSourcePoint { + + /**Defines the x-coordinate of a position + * @Default {0} + */ + x?: number; + + /**Defines the y-coordinate of a position + * @Default {0} + */ + y?: number; +} + +export interface ConnectorsTargetDecorator { + + /**Sets the border color of the decorator + * @Default {black} + */ + borderColor?: string; + + /**Sets the color with which the decorator will be filled + * @Default {black} + */ + fillColor?: string; + + /**Defines the height of the target decorator + * @Default {8} + */ + height?: number; + + /**Defines the custom shape of the target decorator + */ + pathData?: string; + + /**Defines the shape of the target decorator. + * @Default {ej.datavisualization.Diagram.DecoratorShapes.Arrow} + */ + shape?: ej.datavisualization.Diagram.DecoratorShapes|string; + + /**Defines the width of the target decorator + * @Default {8} + */ + width?: number; +} + +export interface Connectors { + + /**To maintain additional information about connectors + * @Default {null} + */ + addInfo?: any; + + /**Defines the width of the line bridges + * @Default {10} + */ + bridgeSpace?: number; + + /**Enables or disables the behaviors of connectors. + * @Default {ej.datavisualization.Diagram.ConnectorConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.ConnectorConstraints|string; + + /**Defines the radius of the rounded corner + * @Default {0} + */ + cornerRadius?: number; + + /**Configures the styles of shapes + */ + cssClass?: string; + + /**Sets the horizontal alignment of the connector. Applicable, if the parent of the connector is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**A collection of JSON objects where each object represents a label. For label properties, refer Labels + * @Default {[]} + */ + labels?: Array; + + /**Sets the stroke color of the connector + * @Default {black} + */ + lineColor?: string; + + /**Sets the pattern of dashes and gaps used to stroke the path of the connector + */ + lineDashArray?: string; + + /**Defines the padding value to ease the interaction with connectors + * @Default {10} + */ + lineHitPadding?: number; + + /**Sets the width of the line + * @Default {1} + */ + lineWidth?: number; + + /**Defines the minimum space to be left between the bottom of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /**Defines the minimum space to be left between the left of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /**Defines the minimum space to be left between the right of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /**Defines the minimum space to be left between the top of parent bounds and the connector. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /**Sets a unique name for the connector + */ + name?: string; + + /**Defines the transparency of the connector + * @Default {1} + */ + opacity?: number; + + /**Defines the size and preview size of the node to add that to symbol palette. To explore palette item, refer Palette Item + * @Default {null} + */ + paletteItem?: any; + + /**Sets the parent name of the connector. + */ + parent?: string; + + /**An array of JSON objects where each object represents a segment + * @Default {[ { type:straight } ]} + */ + segments?: Array; + + /**Defines the source decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + sourceDecorator?: ConnectorsSourceDecorator; + + /**Sets the source node of the connector + */ + sourceNode?: string; + + /**Defines the space to be left between the source node and the source point of a connector + * @Default {0} + */ + sourcePadding?: number; + + /**Describes the start point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + sourcePoint?: ConnectorsSourcePoint; + + /**Sets the source port of the connector + */ + sourcePort?: string; + + /**Defines the target decorator of the connector + * @Default {{ shape:arrow, width: 8, height:8, borderColor:black, fillColor:black }} + */ + targetDecorator?: ConnectorsTargetDecorator; + + /**Sets the target node of the connector + */ + targetNode?: string; + + /**Defines the space to be left between the target node and the target point of the connector + * @Default {0} + */ + targetPadding?: number; + + /**Describes the end point of the connector + * @Default {ej.datavisualization.Diagram.Point()} + */ + targetPoint?: ej.datavisualization.Diagram.ConnectorsSourcePoint|string; + + /**Sets the targetPort of the connector + */ + targetPort?: string; + + /**Defines the tooltip that should be shown when the mouse hovers over connector. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /**To set the vertical alignment of connector (Applicable,if the parent is group). + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Enables or disables the visibility of connector + * @Default {true} + */ + visible?: boolean; + + /**Sets the z-index of the connector + * @Default {0} + */ + zOrder?: number; +} + +export interface ContextMenu { + + /**Defines the collection of context menu items + * @Default {[]} + */ + items?: Array; + + /**To set whether to display the default context menu items or not + * @Default {false} + */ + showCustomMenuItemsOnly?: boolean; +} + +export interface DataSourceSettings { + + /**Defines the data source either as a collection of objects or as an instance of ej.DataManager + * @Default {null} + */ + dataSource?: any; + + /**Sets the unique id of the data source items + */ + id?: string; + + /**Defines the parent id of the data source item + * @Default {''} + */ + parent?: string; + + /**Describes query to retrieve a set of data from the specified datasource + * @Default {null} + */ + query?: string; + + /**Sets the unique id of the root data source item + */ + root?: string; + + /**Describes the name of the table on which the specified query has to be executed + * @Default {null} + */ + tableName?: string; +} + +export interface DefaultSettings { + + /**Initializes the default connector properties + * @Default {null} + */ + connector?: any; + + /**Initializes the default properties of groups + * @Default {null} + */ + group?: any; + + /**Initializes the default properties for nodes + * @Default {null} + */ + node?: any; +} + +export interface HistoryManager { + + /**A method that takes a history entry as argument and returns whether the specific entry can be popped or not + */ + canPop?: Function; + + /**A method that ends grouping the changes + */ + closeGroupAction?: Function; + + /**A method that removes the history of a recent change made in diagram + */ + pop?: Function; + + /**A method that allows to track the custom changes made in diagram + */ + push?: Function; + + /**Defines what should be happened while trying to restore a custom change + * @Default {null} + */ + redo?: Function; + + /**A method that starts to group the changes to revert/restore them in a single undo or redo + */ + startGroupAction?: Function; + + /**Defines what should be happened while trying to revert a custom change + */ + undo?: Function; +} + +export interface Layout { + + /**Defines the fixed node with reference to which, the layout will be arranged and fixed node will not be repositioned + */ + fixedNode?: string; + + /**Customizes the orientation of trees/sub trees. For orientations, see Chart Orientations. For chart types, see Chart Types + * @Default {null} + */ + getLayoutInfo?: any; + + /**Sets the space to be horizontally left between nodes + * @Default {30} + */ + horizontalSpacing?: number; + + /**Sets the margin value to be horizontally left between the layout and diagram + * @Default {0} + */ + marginX?: number; + + /**Sets the margin value to be vertically left between layout and diagram + * @Default {0} + */ + marginY?: number; + + /**Sets the orientation/direction to arrange the diagram elements. + * @Default {ej.datavisualization.Diagram.LayoutOrientations.TopToBottom} + */ + orientation?: ej.datavisualization.Diagram.LayoutOrientations|string; + + /**Sets the type of the layout based on which the elements will be arranged. + * @Default {ej.datavisualization.Diagram.LayoutTypes.None} + */ + type?: ej.datavisualization.Diagram.LayoutTypes|string; + + /**Sets the space to be vertically left between nodes + * @Default {30} + */ + verticalSpacing?: number; +} + +export interface NodesContainer { + + /**Defines the orientation of the container. Applicable, if the group is a container. + * @Default {vertical} + */ + orientation?: string; + + /**Sets the type of the container. Applicable if the group is a container. + * @Default {ej.datavisualization.Diagram.ContainerType.Canvas} + */ + type?: ej.datavisualization.Diagram.ContainerType|string; +} + +export interface NodesGradientLinearGradient { + + /**Defines the different colors and the region of color transitions + * @Default {[]} + */ + stops?: Array; + + /**Defines the left most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x1?: number; + + /**Defines the right most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + x2?: number; + + /**Defines the top most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y1?: number; + + /**Defines the bottom most position(relative to node) of the rectangular region that needs to be painted + * @Default {0} + */ + y2?: number; +} + +export interface NodesGradientRadialGradient { + + /**Defines the position of the outermost circle + * @Default {0} + */ + cx?: number; + + /**Defines the outer most circle of the radial gradient + * @Default {0} + */ + cy?: number; + + /**Defines the innermost circle of the radial gradient + * @Default {0} + */ + fx?: number; + + /**Defines the innermost circle of the radial gradient + * @Default {0} + */ + fy?: number; + + /**Defines the different colors and the region of color transitions. + * @Default {[]} + */ + stops?: Array; +} + +export interface NodesGradientStop { + + /**Sets the color to be filled over the specified region + */ + color?: string; + + /**Sets the position where the previous color transition ends and a new color transition starts + * @Default {0} + */ + offset?: number; + + /**Describes the transparency level of the region + * @Default {1} + */ + opacity?: number; +} + +export interface NodesGradient { + + /**Paints the node with linear color transitions + */ + LinearGradient?: NodesGradientLinearGradient; + + /**Paints the node with radial color transitions. A focal point defines the beginning of the gradient, and a circle defines the end point of the gradient. + */ + RadialGradient?: NodesGradientRadialGradient; + + /**Defines the color and a position where the previous color transition ends and a new color transition starts + */ + Stop?: NodesGradientStop; +} + +export interface NodesLabels { + + /**Enables/disables the bold style + * @Default {false} + */ + bold?: boolean; + + /**Sets the border color of the label + * @Default {transparent} + */ + borderColor?: string; + + /**Sets the border width of the label + * @Default {0} + */ + borderWidth?: number; + + /**Sets the fill color of the text area + * @Default {transparent} + */ + fillColor?: string; + + /**Sets the font color of the text + * @Default {black} + */ + fontColor?: string; + + /**Sets the font family of the text + * @Default {Arial} + */ + fontFamily?: string; + + /**Defines the font size of the text + * @Default {12} + */ + fontSize?: number; + + /**Sets the horizontal alignment of the label. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**Enables/disables the italic style + * @Default {false} + */ + italic?: boolean; + + /**To set the margin of the label + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /**Gets whether the label is currently being edited or not. + * @Default {ej.datavisualization.Diagram.LabelEditMode.Edit} + */ + mode?: ej.datavisualization.Diagram.LabelEditMode|string; + + /**Sets the unique identifier of the label + */ + name?: string; + + /**Sets the fraction/ratio(relative to node) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + offset?: any; + + /**Defines whether the label is editable or not + * @Default {false} + */ + readOnly?: boolean; + + /**Defines the angle to which the label needs to be rotated + * @Default {0} + */ + rotateAngle?: number; + + /**Defines the label text + */ + text?: string; + + /**Defines how to align the text inside the label. + * @Default {ej.datavisualization.Diagram.TextAlign.Center} + */ + textAlign?: ej.datavisualization.Diagram.TextAlign|string; + + /**Sets how to decorate the label text. + * @Default {ej.datavisualization.Diagram.TextDecorations.None} + */ + textDecoration?: ej.datavisualization.Diagram.TextDecorations|string; + + /**Sets the vertical alignment of the label. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Enables or disables the visibility of the label + * @Default {true} + */ + visible?: boolean; + + /**Sets the width of the label(the maximum value of label width and the node width will be considered as label width) + * @Default {50} + */ + width?: number; + + /**Defines how the label text needs to be wrapped. + * @Default {ej.datavisualization.Diagram.TextWrapping.WrapWithOverflow} + */ + wrapping?: ej.datavisualization.Diagram.TextWrapping|string; +} + +export interface NodesLanes { + + /**Allows to maintain additional information about lane + * @Default {{}} + */ + addInfo?: any; + + /**An array of objects where each object represents a child node of the lane + * @Default {[]} + */ + children?: Array; + + /**Defines the fill color of the lane + * @Default {white} + */ + fillColor?: string; + + /**Defines the header of the lane + * @Default {{ text: Function, fontSize: 11 }} + */ + header?: any; + + /**Defines the object as a lane + * @Default {false} + */ + isLane?: boolean; + + /**Sets the unique identifier of the lane + */ + name?: string; + + /**Sets the orientation of the lane. + * @Default {vertical} + */ + orientation?: string; +} + +export interface NodesPaletteItem { + + /**Defines whether the symbol should be drawn at its actual size regardless of precedence factors or not + * @Default {true} + */ + enableScale?: boolean; + + /**Defines the height of the symbol + * @Default {0} + */ + height?: number; + + /**Defines the margin of the symbol item + * @Default {{ left: 4, right: 4, top: 4, bottom: 4 }} + */ + margin?: any; + + /**Defines the preview height of the symbol + * @Default {undefined} + */ + previewHeight?: number; + + /**Defines the preview width of the symbol + * @Default {undefined} + */ + previewWidth?: number; + + /**Defines the width of the symbol + * @Default {0} + */ + width?: number; +} + +export interface NodesPhases { + + /**Defines the header of the smaller regions + * @Default {null} + */ + label?: any; + + /**Defines the line color of the splitter that splits adjacent phases. + * @Default {#606060} + */ + lineColor?: string; + + /**Sets the dash array that used to stroke the phase splitter + * @Default {3,3} + */ + lineDashArray?: string; + + /**Sets the lineWidth of the phase + * @Default {1} + */ + lineWidth?: number; + + /**Sets the unique identifier of the phase + */ + name?: string; + + /**Sets the length of the smaller region(phase) of a swimlane + * @Default {100} + */ + offset?: number; + + /**Sets the orientation of the phase + * @Default {horizontal} + */ + orientation?: string; + + /**Sets the type of the object as phase + * @Default {phase} + */ + type?: string; +} + +export interface NodesPorts { + + /**Sets the border color of the port + * @Default {#1a1a1a} + */ + borderColor?: string; + + /**Sets the stroke width of the port + * @Default {1} + */ + borderWidth?: number; + + /**Defines the space to be left between the port bounds and its incoming and outgoing connections. + * @Default {0} + */ + connectorPadding?: number; + + /**Defines whether connections can be created with the port + * @Default {ej.datavisualization.Diagram.PortConstraints.Connect} + */ + constraints?: ej.datavisualization.Diagram.PortConstraints|string; + + /**Sets the fill color of the port + * @Default {white} + */ + fillColor?: string; + + /**Sets the unique identifier of the port + */ + name?: string; + + /**Defines the position of the port as fraction/ ratio relative to node + * @Default {ej.datavisualization.Diagram.Point(0, 0)} + */ + offset?: any; + + /**Defines the path data to draw the port. Applicable, if the port shape is path. + */ + pathData?: string; + + /**Defines the shape of the port. + * @Default {ej.datavisualization.Diagram.PortShapes.Square} + */ + shape?: ej.datavisualization.Diagram.PortShapes|string; + + /**Defines the size of the port + * @Default {8} + */ + size?: number; + + /**Defines when the port should be visible. + * @Default {ej.datavisualization.Diagram.PortVisibility.Default} + */ + visibility?: ej.datavisualization.Diagram.PortVisibility|string; +} + +export interface NodesShadow { + + /**Defines the angle of the shadow relative to node + * @Default {45} + */ + angle?: number; + + /**Sets the distance to move the shadow relative to node + * @Default {5} + */ + distance?: number; + + /**Defines the opaque of the shadow + * @Default {0.7} + */ + opacity?: number; +} + +export interface NodesSubProcess { + + /**Defines whether the bpmn sub process is without any prescribed order or not + * @Default {false} + */ + adhoc?: boolean; + + /**Sets the boundary of the BPMN process + * @Default {ej.datavisualization.Diagram.BPMNBoundary.Default} + */ + boundary?: ej.datavisualization.Diagram.BPMNBoundary|string; + + /**Sets whether the bpmn subprocess is triggered as a compensation of a specific activity + * @Default {false} + */ + compensation?: boolean; + + /**Defines the loop type of a sub process. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; +} + +export interface NodesTask { + + /**To set whether the task is a global task or not + * @Default {false} + */ + call?: boolean; + + /**Sets whether the task is triggered as a compensation of another specific activity + * @Default {false} + */ + compensation?: boolean; + + /**Sets the loop type of a bpmn task. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; + + /**Sets the type of the BPMN task. + * @Default {ej.datavisualization.Diagram.BPMNTasks.None} + */ + type?: ej.datavisualization.Diagram.BPMNTasks|string; +} + +export interface Nodes { + + /**Defines the type of BPMN Activity. Applicable, if the node is a bpmn activity. + * @Default {ej.datavisualization.Diagram.BPMNActivity.Task} + */ + activity?: ej.datavisualization.Diagram.BPMNActivity|string; + + /**To maintain additional information about nodes + * @Default {{}} + */ + addInfo?: any; + + /**Sets the border color of node + * @Default {black} + */ + borderColor?: string; + + /**Sets the pattern of dashes and gaps to stroke the border + */ + borderDashArray?: string; + + /**Sets the border width of the node + * @Default {1} + */ + borderWidth?: number; + + /**Defines whether the group can be ungrouped or not + * @Default {true} + */ + canUngroup?: boolean; + + /**Array of JSON objects where each object represents a child node/connector + * @Default {[]} + */ + children?: Array; + + /**Defines whether the BPMN data object is a collection or not + * @Default {false} + */ + collection?: boolean; + + /**Defines the distance to be left between a node and its connections(In coming and out going connections). + * @Default {0} + */ + connectorPadding?: number; + + /**Enables or disables the default behaviors of the node. + * @Default {ej.datavisualization.Diagram.NodeConstraints.Default} + */ + constraints?: ej.datavisualization.Diagram.NodeConstraints|string; + + /**Defines how the child objects need to be arranged(Either in any predefined manner or automatically). Applicable, if the node is a group. + * @Default {null} + */ + container?: NodesContainer; + + /**Defines the corner radius of rectangular shapes. + * @Default {0} + */ + cornerRadius?: number; + + /**Configures the styles of shapes + */ + cssClass?: string; + + /**Sets the type of the BPMN Events. Applicable, if the node is a bpmn event. + * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} + */ + event?: ej.datavisualization.Diagram.BPMNEvents|string; + + /**Defines whether the node can be automatically arranged using layout or not + * @Default {false} + */ + excludeFromLayout?: boolean; + + /**Defines the fill color of the node + * @Default {white} + */ + fillColor?: string; + + /**Sets the type of the BPMN Gateway. Applicable, if the node is a bpmn gateway. + * @Default {ej.datavisualization.Diagram.BPMNGateways.None} + */ + gateway?: ej.datavisualization.Diagram.BPMNGateways|string; + + /**Paints the node with a smooth transition from one color to another color + */ + gradient?: NodesGradient; + + /**Defines the header of a swimlane/lane + * @Default {{ text: Title, fontSize: 11 }} + */ + header?: any; + + /**Defines the height of the node + * @Default {0} + */ + height?: number; + + /**Sets the horizontal alignment of the node. Applicable, if the parent of the node is a container. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Left} + */ + horizontalAlign?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**A read only collection of the incoming connectors/edges of the node + * @Default {[]} + */ + inEdges?: Array; + + /**Defines whether the sub tree of the node is expanded or collapsed + * @Default {true} + */ + isExpanded?: boolean; + + /**Sets the node as a swimlane + * @Default {false} + */ + isSwimlane?: boolean; + + /**A collection of objects where each object represents a label + * @Default {[]} + */ + labels?: Array; + + /**An array of objects where each object represents a lane. Applicable, if the node is a swimlane. + * @Default {[]} + */ + lanes?: Array; + + /**Defines the minimum space to be left between the bottom of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginBottom?: number; + + /**Defines the minimum space to be left between the left of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginLeft?: number; + + /**Defines the minimum space to be left between the right of the parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginRight?: number; + + /**Defines the minimum space to be left between the top of parent bounds and the node. Applicable, if the parent is a container. + * @Default {0} + */ + marginTop?: number; + + /**Defines the maximum height limit of the node + * @Default {0} + */ + maxHeight?: number; + + /**Defines the maximum width limit of the node + * @Default {0} + */ + maxWidth?: number; + + /**Defines the minimum height limit of the node + * @Default {0} + */ + minHeight?: number; + + /**Defines the minimum width limit of the node + * @Default {0} + */ + minWidth?: number; + + /**Sets the unique identifier of the node + */ + name?: string; + + /**Defines the position of the node on X-Axis + * @Default {0} + */ + offsetX?: number; + + /**Defines the position of the node on Y-Axis + * @Default {0} + */ + offsetY?: number; + + /**Defines the opaque of the node + * @Default {1} + */ + opacity?: number; + + /**Defines the orientation of nodes. Applicable, if the node is a swimlane. + * @Default {vertical} + */ + orientation?: string; + + /**A read only collection of outgoing connectors/edges of the node + * @Default {[]} + */ + outEdges?: Array; + + /**Defines the minimum padding value to be left between the bottom most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingBottom?: number; + + /**Defines the minimum padding value to be left between the left most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingLeft?: number; + + /**Defines the minimum padding value to be left between the right most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingRight?: number; + + /**Defines the minimum padding value to be left between the top most position of a group and its children. Applicable, if the group is a container. + * @Default {0} + */ + paddingTop?: number; + + /**Defines the size and preview size of the node to add that to symbol palette + * @Default {null} + */ + paletteItem?: NodesPaletteItem; + + /**Sets the name of the parent group + */ + parent?: string; + + /**Sets the path geometry that defines the shape of a path node + */ + pathData?: string; + + /**An array of objects, where each object represents a smaller region(phase) of a swimlane. + * @Default {[]} + */ + phases?: Array; + + /**Sets the height of the phase headers + * @Default {0} + */ + phaseSize?: number; + + /**Sets the ratio/ fractional value relative to node, based on which the node will be transformed(positioning, scaling and rotation) + * @Default {ej.datavisualization.Diagram.Points(0.5,0.5)} + */ + pivot?: any; + + /**Defines a collection of points to draw a polygon. Applicable, if the shape is a polygon. + * @Default {[]} + */ + points?: Array; + + /**An array of objects where each object represents a port + * @Default {[]} + */ + ports?: Array; + + /**Sets the angle to which the node should be rotated + * @Default {0} + */ + rotateAngle?: number; + + /**Defines the opacity and the position of shadow + * @Default {ej.datavisualization.Diagram.Shadow()} + */ + shadow?: NodesShadow; + + /**Sets the shape of the node. It depends upon the type of node. + * @Default {ej.datavisualization.Diagram.BasicShapes.Rectangle} + */ + shape?: ej.datavisualization.Diagram.BasicShapes|string; + + /**Sets the source path of the image. Applicable, if the type of the node is image. + */ + source?: string; + + /**Defines the sub process of a BPMN Activity. Applicable, if the type of the bpmn activity is sub process. + * @Default {ej.datavisualization.Diagram.BPMNSubProcess()} + */ + subProcess?: NodesSubProcess; + + /**Defines the task of the bpmn activity. Applicable, if the type of activity is set as task. + * @Default {ej.datavisualization.Diagram.BPMNTask()} + */ + task?: NodesTask; + + /**Sets the id of svg/html templates. Applicable, if the node is html or native. + */ + templateId?: string; + + /**Defines the textBlock of a text node + * @Default {null} + */ + textBlock?: any; + + /**Defines the tooltip that should be shown when the mouse hovers over node. For tooltip properties, refer Tooltip + * @Default {null} + */ + tooltip?: any; + + /**Sets the type of BPMN Event Triggers. + * @Default {ej.datavisualization.Diagram.BPMNTriggers.None} + */ + trigger?: ej.datavisualization.Diagram.BPMNTriggers|string; + + /**Defines the type of the node. + * @Default {ej.datavisualization.Diagram.Shapes.Basic} + */ + type?: ej.datavisualization.Diagram.Shapes|string; + + /**Sets the vertical alignment of a node. Applicable, if the parent of a node is a container. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Top} + */ + verticalAlign?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /**Defines the visibility of the node + * @Default {true} + */ + visible?: boolean; + + /**Defines the width of the node + * @Default {0} + */ + width?: number; + + /**Defines the z-index of the node + * @Default {0} + */ + zOrder?: number; +} + +export interface PageSettings { + + /**Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling + * @Default {{ left: 15, top: 15, right: 15, bottom: 15 }} + */ + autoScrollBorder?: any; + + /**Sets whether multiple pages can be created to fit all nodes and connectors + * @Default {false} + */ + multiplePage?: boolean; + + /**Defines the background color of diagram pages + * @Default {#ffffff} + */ + pageBackgroundColor?: string; + + /**Defines the page border color + * @Default {#565656} + */ + pageBorderColor?: string; + + /**Sets the border width of diagram pages + * @Default {0} + */ + pageBorderWidth?: number; + + /**Defines the height of a page + * @Default {null} + */ + pageHeight?: number; + + /**Defines the page margin + * @Default {24} + */ + pageMargin?: number; + + /**Sets the orientation of the page. + * @Default {ej.datavisualization.Diagram.PageOrientations.Portrait} + */ + pageOrientation?: ej.datavisualization.Diagram.PageOrientations|string; + + /**Defines the height of a diagram page + * @Default {null} + */ + pageWidth?: number; + + /**Defines the scrollable area of diagram. Applicable, if the scroll limit is "limited". + * @Default {null} + */ + scrollableArea?: any; + + /**Defines the scrollable region of diagram. + * @Default {ej.datavisualization.Diagram.ScrollLimit.Infinite} + */ + scrollLimit?: ej.datavisualization.Diagram.ScrollLimit|string; + + /**Enables or disables the page breaks + * @Default {false} + */ + showPageBreak?: boolean; +} + +export interface ScrollSettings { + + /**Allows to read the zoom value of diagram + * @Default {0} + */ + currentZoom?: number; + + /**Sets the horizontal scroll offset + * @Default {0} + */ + horizontalOffset?: number; + + /**Allows to extend the scrollable region that is based on the scroll limit + * @Default {{left: 0, right: 0, top:0, bottom: 0}} + */ + padding?: any; + + /**Sets the vertical scroll offset + * @Default {0} + */ + verticalOffset?: number; + + /**Allows to read the view port height of the diagram + * @Default {0} + */ + viewPortHeight?: number; + + /**Allows to read the view port width of the diagram + * @Default {0} + */ + viewPortWidth?: number; +} + +export interface SelectedItems { + + /**A read only collection of the selected items + * @Default {[]} + */ + children?: Array; + + /**Controls the visibility of selector. + * @Default {ej.datavisualization.Diagram.SelectorConstraints.All} + */ + constraints?: ej.datavisualization.Diagram.SelectorConstraints|string; + + /**Defines a method that dynamically enables/ disables the interaction with multiple selection. + * @Default {null} + */ + getConstraints?: any; + + /**Sets the height of the selected items + * @Default {0} + */ + height?: number; + + /**Sets the x position of the selector + * @Default {0} + */ + offsetX?: number; + + /**Sets the y position of the selector + * @Default {0} + */ + offsetY?: number; + + /**Sets the angle to rotate the selected items + * @Default {0} + */ + rotateAngle?: number; + + /**Sets the angle to rotate the selected items. For tooltip properties, refer Tooltip + * @Default {ej.datavisualization.Diagram.Tooltip()} + */ + tooltip?: any; + + /**A collection of frequently using commands that have to be added around the selector. + * @Default {[]} + */ + userHandles?: Array; + + /**Sets the width of the selected items + * @Default {0} + */ + width?: number; +} + +export interface SnapSettingsHorizontalGridLines { + + /**Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /**Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /**A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: Array; + + /**Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: Array; +} + +export interface SnapSettingsVerticalGridLines { + + /**Defines the line color of horizontal grid lines + * @Default {lightgray} + */ + lineColor?: string; + + /**Specifies the pattern of dashes and gaps used to stroke horizontal grid lines + */ + lineDashArray?: string; + + /**A pattern of lines and gaps that defines a set of horizontal gridlines + * @Default {[1.25, 18.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75, 0.25, 19.75]} + */ + linesInterval?: Array; + + /**Specifies a set of intervals to snap the objects + * @Default {[20]} + */ + snapInterval?: Array; +} + +export interface SnapSettings { + + /**Enables or disables snapping nodes/connectors to objects + * @Default {true} + */ + enableSnapToObject?: boolean; + + /**Defines the appearance of horizontal gridlines + */ + horizontalGridLines?: SnapSettingsHorizontalGridLines; + + /**Defines the angle by which the object needs to be snapped + * @Default {5} + */ + snapAngle?: number; + + /**Defines the minimum distance between the selected object and the nearest object + * @Default {5} + */ + snapObjectDistance?: number; + + /**Defines the appearance of horizontal gridlines + */ + verticalGridLines?: SnapSettingsVerticalGridLines; +} + +export interface TooltipAlignment { + + /**Defines the horizontal alignment of tooltip. + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontal?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /**Defines the vertical alignment of tooltip. + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Bottom} + */ + vertical?: ej.datavisualization.Diagram.VerticalAlignment|string; +} + +export interface Tooltip { + + /**Aligns the tooltip around nodes/connectors + */ + alignment?: TooltipAlignment; + + /**Sets the margin of the tooltip + * @Default {{ left: 5, right: 5, top: 5, bottom: 5 }} + */ + margin?: any; + + /**Defines whether the tooltip should be shown at the mouse position or around node. + * @Default {ej.datavisualization.Diagram.RelativeMode.Object} + */ + relativeMode?: ej.datavisualization.Diagram.RelativeMode|string; + + /**Sets the svg/html template to be bound with tooltip + */ + templateId?: string; +} +} +module Diagram +{ +enum BridgeDirection +{ +//Used to set the direction of line bridges as left +Left, +//Used to set the direction of line bridges as right +Right, +//Used to set the direction of line bridges as top +Top, +//Used to set the direction of line bridges as bottom +Bottom, +} +} +module Diagram +{ +enum Keys +{ +//No key pressed. +None, +//The A key. +A, +//The B key. +B, +//The C key. +C, +//The D Key. +D, +//The E key. +E, +//The F key. +F, +//The G key. +G, +//The H Key. +H, +//The I key. +I, +//The J key. +J, +//The K key. +K, +//The L Key. +L, +//The M key. +M, +//The N key. +N, +//The O key. +O, +//The P Key. +P, +//The Q key. +Q, +//The R key. +R, +//The S key. +S, +//The T Key. +T, +//The U key. +U, +//The V key. +V, +//The W key. +W, +//The X key. +X, +//The Y key. +Y, +//The Z key. +Z, +//The 0 key. +Number0, +//The 1 key. +Number1, +//The 2 key. +Number2, +//The 3 key. +Number3, +//The 4 key. +Number4, +//The 5 key. +Number5, +//The 6 key. +Number6, +//The 7 key. +Number7, +//The 8 key. +Number8, +//The 9 key. +Number9, +//The LEFT ARROW key. +Left, +//The UP ARROW key. +Up, +//The RIGHT ARROW key. +Right, +//The DOWN ARROW key. +Down, +//The ESC key. +Escape, +//The DEL key. +Delete, +//The TAB key. +Tab, +//The ENTER key. +Enter, +} +} +module Diagram +{ +enum KeyModifiers +{ +//No modifiers are pressed. +None, +//The ALT key. +Alt, +//The CTRL key. +Control, +//The SHIFT key. +Shift, +} +} +module Diagram +{ +enum ConnectorConstraints +{ +//Disable all connector Constraints +None, +//Enables connector to be selected +Select, +//Enables connector to be Deleted +Delete, +//Enables connector to be Dragged +Drag, +//Enables connectors source end to be selected +DragSourceEnd, +//Enables connectors target end to be selected +DragTargetEnd, +//Enables control point and end point of every segment in a connector for editing +DragSegmentThumb, +//Enables bridging to the connector +Bridging, +//Enables label of node to be Dragged +DragLabel, +//Enables bridging to the connector +InheritBridging, +//Enables all constraints +Default, +} +} +module Diagram +{ +enum HorizontalAlignment +{ +//Used to align text horizontally on left side of node/connector +Left, +//Used to align text horizontally on center of node/connector +Center, +//Used to align text horizontally on right side of node/connector +Right, +} +} +module Diagram +{ +enum Segments +{ +//Used to specify the lines as Straight +Straight, +//Used to specify the lines as Orthogonal +Orthogonal, +//Used to specify the lines as Bezier +Bezier, +} +} +module Diagram +{ +enum DecoratorShapes +{ +//Used to set decorator shape as none +None, +//Used to set decorator shape as Arrow +Arrow, +//Used to set decorator shape as Open Arrow +OpenArrow, +//Used to set decorator shape as Circle +Circle, +//Used to set decorator shape as Diamond +Diamond, +//Used to set decorator shape as path +Path, +} +} +module Diagram +{ +enum VerticalAlignment +{ +//Used to align text Vertically on left side of node/connector +Top, +//Used to align text Vertically on center of node/connector +Center, +//Used to align text Vertically on bottom of node/connector +Bottom, +} +} +module Diagram +{ +enum DiagramConstraints +{ +//Disables all DiagramConstraints +None, +//Enables/Disables PageEditing +PageEditable, +//Enables/Disables Bridging +Bridging, +//Enables/Disables Zooming +Zoomable, +//Enables/Disables panning on horizontal axis +PannableX, +//Enables/Disables panning on vertical axis +PannableY, +//Enables/Disables Panning +Pannable, +//Enables/Disables undo actions +Undoable, +//Enables all Constraints +Default, +} +} +module Diagram +{ +enum LayoutOrientations +{ +//Used to set LayoutOrientation from top to bottom +TopToBottom, +//Used to set LayoutOrientation from bottom to top +BottomToTop, +//Used to set LayoutOrientation from left to right +LeftToRight, +//Used to set LayoutOrientation from right to left +RightToLeft, +} +} +module Diagram +{ +enum LayoutTypes +{ +//Used not to set any specific layout +None, +//Used to set layout type as hierarchical layout +HierarchicalTree, +//Used to set layout type as organnizational chart +OrganizationalChart, +} +} +module Diagram +{ +enum BPMNActivity +{ +//Used to set BPMN Activity as None +None, +//Used to set BPMN Activity as Task +Task, +//Used to set BPMN Activity as SubProcess +SubProcess, +} +} +module Diagram +{ +enum NodeConstraints +{ +//Disable all node Constraints +None, +//Enables node to be selected +Select, +//Enables node to be Deleted +Delete, +//Enables node to be Dragged +Drag, +//Enables node to be Rotated +Rotate, +//Enables node to be connected +Connect, +//Enables node to be resize north east +ResizeNorthEast, +//Enables node to be resize east +ResizeEast, +//Enables node to be resize south east +ResizeSouthEast, +//Enables node to be resize south +ResizeSouth, +//Enables node to be resize south west +ResizeSouthWest, +//Enables node to be resize west +ResizeWest, +//Enables node to be resize north west +ResizeNorthWest, +//Enables node to be resize north +ResizeNorth, +//Enables node to be Resized +Resize, +//Enables shadow +Shadow, +//Enables label of node to be Dragged +DragLabel, +//Enables panning should be done while node dragging +AllowPan, +//Enables Proportional resize for node +AspectRatio, +//Enables all node constraints +Default, +} +} +module Diagram +{ +enum ContainerType +{ +//Sets the container type as Canvas +Canvas, +//Sets the container type as Stack +Stack, +} +} +module Diagram +{ +enum BPMNEvents +{ +//Used to set BPMN Event as Start +Start, +//Used to set BPMN Event as Intermediate +Intermediate, +//Used to set BPMN Event as End +End, +//Used to set BPMN Event as NonInterruptingStart +NonInterruptingStart, +//Used to set BPMN Event as NonInterruptingIntermediate +NonInterruptingIntermediate, +} +} +module Diagram +{ +enum BPMNGateways +{ +//Used to set BPMN Gateway as None +None, +//Used to set BPMN Gateway as Exclusive +Exclusive, +//Used to set BPMN Gateway as Inclusive +Inclusive, +//Used to set BPMN Gateway as Parallel +Parallel, +//Used to set BPMN Gateway as Complex +Complex, +//Used to set BPMN Gateway as EventBased +EventBased, +} +} +module Diagram +{ +enum LabelEditMode +{ +//Used to set label edit mode as edit +Edit, +//Used to set label edit mode as view +View, +} +} +module Diagram +{ +enum TextAlign +{ +//Used to align text on left side of node/connector +Left, +//Used to align text on center of node/connector +Center, +//Used to align text on Right side of node/connector +Right, +} +} +module Diagram +{ +enum TextDecorations +{ +//Used to set text decoration of the label as Underline +Underline, +//Used to set text decoration of the label as Overline +Overline, +//Used to set text decoration of the label as LineThrough +LineThrough, +//Used to set text decoration of the label as None +None, +} +} +module Diagram +{ +enum TextWrapping +{ +//Disables wrapping +NoWrap, +//Enables Line-break at normal word break points +Wrap, +//Enables Line-break at normal word break points with longer word overflows +WrapWithOverflow, +} +} +module Diagram +{ +enum PortConstraints +{ +//Disable all constraints +None, +//Enables connections with connector +Connect, +} +} +module Diagram +{ +enum PortShapes +{ +//Used to set port shape as X +X, +//Used to set port shape as Circle +Circle, +//Used to set port shape as Square +Square, +//Used to set port shape as Path +Path, +} +} +module Diagram +{ +enum PortVisibility +{ +//Set the port visibility as Visible +Visible, +//Set the port visibility as Hidden +Hidden, +//Port get visible when hover connector on node +Hover, +//Port gets visible when connect connector to node +Connect, +//Specifies the port visibility as default +Default, +} +} +module Diagram +{ +enum BasicShapes +{ +//Used to specify node Shape as Rectangle +Rectangle, +//Used to specify node Shape as Ellipse +Ellipse, +//Used to specify node Shape as Path +Path, +//Used to specify node Shape as Polygon +Polygon, +//Used to specify node Shape as Triangle +Triangle, +//Used to specify node Shape as Plus +Plus, +//Used to specify node Shape as Star +Star, +//Used to specify node Shape as Pentagon +Pentagon, +//Used to specify node Shape as Heptagon +Heptagon, +//Used to specify node Shape as Octagon +Octagon, +//Used to specify node Shape as Trapezoid +Trapezoid, +//Used to specify node Shape as Decagon +Decagon, +//Used to specify node Shape as RightTriangle +RightTriangle, +//Used to specify node Shape as Cylinder +Cylinder, +} +} +module Diagram +{ +enum BPMNBoundary +{ +//Used to set BPMN SubProcess's Boundary as Default +Default, +//Used to set BPMN SubProcess's Boundary as Call +Call, +//Used to set BPMN SubProcess's Boundary as Event +Event, +} +} +module Diagram +{ +enum BPMNLoops +{ +//Used to set BPMN Activity's Loop as None +None, +//Used to set BPMN Activity's Loop as Standard +Standard, +//Used to set BPMN Activity's Loop as ParallelMultiInstance +ParallelMultiInstance, +//Used to set BPMN Activity's Loop as SequenceMultiInstance +SequenceMultiInstance, +} +} +module Diagram +{ +enum BPMNTasks +{ +//Used to set BPMN Task Type as None +None, +//Used to set BPMN Task Type as Service +Service, +//Used to set BPMN Task Type as Receive +Receive, +//Used to set BPMN Task Type as Send +Send, +//Used to set BPMN Task Type as InstantiatingReceive +InstantiatingReceive, +//Used to set BPMN Task Type as Manual +Manual, +//Used to set BPMN Task Type as BusinessRule +BusinessRule, +//Used to set BPMN Task Type as User +User, +//Used to set BPMN Task Type as Script +Script, +//Used to set BPMN Task Type as Parallel +Parallel, +} +} +module Diagram +{ +enum BPMNTriggers +{ +//Used to set Event Trigger as None +None, +//Used to set Event Trigger as Message +Message, +//Used to set Event Trigger as Timer +Timer, +//Used to set Event Trigger as Escalation +Escalation, +//Used to set Event Trigger as Link +Link, +//Used to set Event Trigger as Error +Error, +//Used to set Event Trigger as Compensation +Compensation, +//Used to set Event Trigger as Signal +Signal, +//Used to set Event Trigger as Multiple +Multiple, +//Used to set Event Trigger as Parallel +Parallel, +} +} +module Diagram +{ +enum Shapes +{ +//Used to set decorator shape as none +None, +//Used to set decorator shape as Arrow +Arrow, +//Used to set decorator shape as Open Arrow +OpenArrow, +//Used to set decorator shape as Circle +Circle, +//Used to set decorator shape as Diamond +Diamond, +//Used to set decorator shape as path +Path, +} +} +module Diagram +{ +enum PageOrientations +{ +//Used to set orientation as Landscape +Landscape, +//Used to set orientation as portrait +Portrait, +} +} +module Diagram +{ +enum ScrollLimit +{ +//Used to set scrollLimit as Infinite +Infinite, +//Used to set scrollLimit as Diagram +Diagram, +//Used to set scrollLimit as Limited +Limited, +} +} +module Diagram +{ +enum SelectorConstraints +{ +//Hides the selector +None, +//Sets the visibility of rotation handle as visible +Rotator, +//Sets the visibility of resize handles as visible +Resizer, +//Sets the visibility of user handles as visible +UserHandles, +//Sets the visibility of all selection handles as visible +All, +} +} +module Diagram +{ +enum Tool +{ +//Disables all Tools +None, +//Enables/Disables SingleSelect tool +SingleSelect, +//Enables/Disables MultiSelect tool +MultipleSelect, +//Enables/Disables ZoomPan tool +ZoomPan, +//Enables/Disables DrawOnce tool +DrawOnce, +//Enables/Disables ContinuousDraw tool +ContinuesDraw, +} +} +module Diagram +{ +enum RelativeMode +{ +//Shows tooltip around the node +Object, +//Shows tooltip at the mouse position +Mouse, +} +} + +} + +interface JQueryXHR { +} +interface JQueryPromise { +} +interface JQueryDeferred extends JQueryPromise { +} +interface JQueryParam { +} +interface JQuery { + data(key: any): any; +} +interface JQuery { + + ejButton(): JQuery; + ejButton(options?: ej.Button.Model): JQuery; + data(key: "ejButton"): ej.Button; + + ejCaptcha(): JQuery; + ejCaptcha(options?: ej.Captcha.Model): JQuery; + data(key: "ejCaptcha"): ej.Captcha; + + ejAccordion(): JQuery; + ejAccordion(options?: ej.Accordion.Model): JQuery; + data(key: "ejAccordion"): ej.Accordion; + + ejAutocomplete(): JQuery; + ejAutocomplete(options?: ej.Autocomplete.Model): JQuery; + data(key: "ejAutocomplete"): ej.Autocomplete; + + ejDatePicker(): JQuery; + ejDatePicker(options?: ej.DatePicker.Model): JQuery; + data(key: "ejDatePicker"): ej.DatePicker; + + ejDateTimePicker(): JQuery; + ejDateTimePicker(options?: ej.DateTimePicker.Model): JQuery; + data(key: "ejDateTimePicker"): ej.DateTimePicker; + + ejDialog(): JQuery; + ejDialog(options?: ej.Dialog.Model): JQuery; + data(key: "ejDialog"): ej.Dialog; + + ejDropDownList(): JQuery; + ejDropDownList(options?: ej.DropDownList.Model): JQuery; + data(key: "ejDropDownList"): ej.DropDownList; + + ejFileExplorer(): JQuery; + ejFileExplorer(options?: ej.FileExplorer.Model): JQuery; + data(key: "ejFileExplorer"): ej.FileExplorer; + + ejListBox(): JQuery; + ejListBox(options?: ej.ListBox.Model): JQuery; + data(key: "ejListBox"): ej.ListBox; + + ejListView(): JQuery; + ejListView(options?: ej.ListView.Model): JQuery; + data(key: "ejListView"): ej.ListView; + + ejNumericTextbox(): JQuery; + ejNumericTextbox(options?: ej.Editor.Model): JQuery; + data(key: "ejNumericTextbox"): ej.NumericTextbox; + + ejCurrencyTextbox(): JQuery; + ejCurrencyTextbox(options?: ej.Editor.Model): JQuery; + data(key: "ejCurrencyTextbox"): ej.CurrencyTextbox; + + ejPercentageTextbox(): JQuery; + ejPercentageTextbox(options?: ej.Editor.Model): JQuery; + data(key: "ejPercentageTextbox"): ej.PercentageTextbox; + + ejMaskEdit(): JQuery; + ejMaskEdit(options?: ej.MaskEdit.Model): JQuery; + data(key: "ejMaskEdit"): ej.MaskEdit; + + ejMenu(): JQuery; + ejMenu(options?: ej.Menu.Model): JQuery; + data(key: "ejMenu"): ej.Menu; + + ejPager(): JQuery; + ejPager(options?: ej.Pager.Model): JQuery; + data(key: "ejPager"): ej.Pager; + + ejProgressBar(): JQuery; + ejProgressBar(options?: ej.ProgressBar.Model): JQuery; + data(key: "ejProgressBar"): ej.ProgressBar; + + ejRadioButton(): JQuery; + ejRadioButton(options?: ej.RadioButton.Model): JQuery; + data(key: "ejRadioButton"): ej.RadioButton; + + ejCheckBox(): JQuery; + ejCheckBox(options?: ej.CheckBox.Model): JQuery; + data(key: "ejCheckBox"): ej.CheckBox; + + ejRibbon(): JQuery; + ejRibbon(options?: ej.Ribbon.Model): JQuery; + data(key: "ejRibbon"): ej.Ribbon; + + ejKanban(): JQuery; + ejKanban(options?: ej.Kanban.Model): JQuery; + data(key: "ejKanban"): ej.Kanban; + + ejRating(): JQuery; + ejRating(options?: ej.Rating.Model): JQuery; + data(key: "ejRating"): ej.Rating; + + ejRotator(): JQuery; + ejRotator(options?: ej.Rotator.Model): JQuery; + data(key: "ejRotator"): ej.Rotator; + + ejRTE(): JQuery; + ejRTE(options?: ej.RTE.Model): JQuery; + data(key: "ejRTE"): ej.RTE; + + ejSlider(): JQuery; + ejSlider(options?: ej.Slider.Model): JQuery; + data(key: "ejSlider"): ej.Slider; + + ejSplitButton(): JQuery; + ejSplitButton(options?: ej.SplitButton.Model): JQuery; + data(key: "ejSplitButton"): ej.SplitButton; + + ejSplitter(): JQuery; + ejSplitter(options?: ej.Splitter.Model): JQuery; + data(key: "ejSplitter"): ej.Splitter; + + ejTab(): JQuery; + ejTab(options?: ej.Tab.Model): JQuery; + data(key: "ejTab"): ej.Tab; + + ejTagCloud(): JQuery; + ejTagCloud(options?: ej.TagCloud.Model): JQuery; + data(key: "ejTagCloud"): ej.TagCloud; + + ejTimePicker(): JQuery; + ejTimePicker(options?: ej.TimePicker.Model): JQuery; + data(key: "ejTimePicker"): ej.TimePicker; + + ejTile(): JQuery; + ejTile(options?: ej.Tile.Model): JQuery; + data(key: "ejTile"): ej.Tile; + + ejToggleButton(): JQuery; + ejToggleButton(options?: ej.ToggleButton.Model): JQuery; + data(key: "ejToggleButton"): ej.ToggleButton; + + ejToolbar(): JQuery; + ejToolbar(options?: ej.Toolbar.Model): JQuery; + data(key: "ejToolbar"): ej.Toolbar; + + ejNavigationDrawer(): JQuery; + ejNavigationDrawer(options?: ej.NavigationDrawer.Model): JQuery; + data(key: "ejNavigationDrawer"): ej.NavigationDrawer; + + ejRadialMenu(): JQuery; + ejRadialMenu(options?: ej.RadialMenu.Model): JQuery; + data(key: "ejRadialMenu"): ej.RadialMenu; + + ejTreeView(): JQuery; + ejTreeView(options?: ej.TreeView.Model): JQuery; + data(key: "ejTreeView"): ej.TreeView; + + ejUploadbox(): JQuery; + ejUploadbox(options?: ej.Uploadbox.Model): JQuery; + data(key: "ejUploadbox"): ej.Uploadbox; + + ejWaitingPopup(): JQuery; + ejWaitingPopup(options?: ej.WaitingPopup.Model): JQuery; + data(key: "ejWaitingPopup"): ej.WaitingPopup; + + ejSchedule(): JQuery; + ejSchedule(options?: ej.Schedule.Model): JQuery; + data(key: "ejSchedule"): ej.Schedule; + + ejRecurrenceEditor(): JQuery; + ejRecurrenceEditor(options?: ej.RecurrenceEditorOptions): JQuery; + data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; + + ejGrid(): JQuery; + ejGrid(options?: ej.Grid.Model): JQuery; + data(key: "ejGrid"): ej.Grid; + + /*ReportViewer*/ + ejReportViewer(): JQuery; + ejReportViewer(options?: ej.ReportViewer.Model): JQuery; + data(key: "ejReportViewer"): ej.ReportViewer; + /*ReportViewer*/ + + ejLinearGauge(): JQuery; + ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; + data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; + + ejDigitalGauge(): JQuery; + ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; + data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; + + ejCircularGauge(): JQuery; + ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; + data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; + + ejChart(): JQuery; + ejChart(options?: ej.datavisualization.Chart.Model): JQuery; + data(key: "ejChart"): ej.datavisualization.Chart; + + ejRangeNavigator(): JQuery; + ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; + data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; + + ejBulletGraph(): JQuery; + ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; + data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; + + ejGantt(): JQuery; + ejGantt(options?: ej.Gantt.Model): JQuery; + data(key: "ejGantt"): ej.Gantt; + + ejTreeGrid(): JQuery; + ejTreeGrid(options?: ej.TreeGrid.Model): JQuery; + data(key: "ejTreeGrid"): ej.TreeGrid; + + ejMap(): JQuery; + ejMap(options?: ej.datavisualization.Map.Model): JQuery; + data(key: "ejMap"): ej.datavisualization.Map; + + ejTreeMap(): JQuery; + ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; + data(key: "ejTreeMap"): ej.datavisualization.TreeMap; + + ejBarcode(): JQuery; + ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; + data(key: "ejBarcode"): ej.datavisualization.Barcode; + + ejDiagram(): JQuery; + ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; + data(key: "ejDiagram"): ej.datavisualization.Diagram; + + // ejSymbolPalette(): JQuery; + // ejSymbolPalette(options?: ej.datavisualization.SymbolPalette.Model): JQuery; + // data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; + + ejOlapChart(): JQuery; + ejOlapChart(options?: ej.olap.OlapChart.Model): JQuery; + data(key: "ejOlapChart"): ej.olap.OlapChart; + + ejPivotGrid(): JQuery; + ejPivotGrid(options?: ej.PivotGrid.Model): JQuery; + data(key: "ejPivotGrid"): ej.PivotGrid; + + ejPivotSchemaDesigner(): JQuery; + ejPivotSchemaDesigner(options?: ej.PivotSchemaDesigner.Model): JQuery; + data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; + + ejOlapClient(): JQuery; + ejOlapClient(options?: ej.olap.OlapClient.Model): JQuery; + data(key: "ejOlapClient"): ej.olap.OlapClient; + + ejOlapGauge(): JQuery; + ejOlapGauge(options?: ej.olap.OlapGauge.Model): JQuery; + data(key: "ejOlapGauge"): ej.olap.OlapGauge; + + ejPivotPager(): JQuery; + ejPivotPager(options?: ej.PivotPager.Model): JQuery; + data(key: "ejPivotPager"): ej.PivotPager; + + /* Spreadsheet */ + ejSpreadsheet(): JQuery; + ejSpreadsheet(options?: ej.Spreadsheet.Model): JQuery; + data(key: "ejSpreadsheet"): ej.Spreadsheet; + /* Spreadsheet */ + + ejScroller(): JQuery; + ejScroller(options?: ej.Scroller.Model): JQuery; + data(key: "ejScroller"): ej.Scroller; + +} +interface JQuery { + + /*Accordion*/ + ejmAccordion(): JQuery; + ejmAccordion(options?: ej.mobile.AccordionOptions): JQuery; + data(key: "ejmAccordion"): ej.mobile.Accordion; + /*Accordion*/ + + /*AutoComplete*/ + ejmAutocomplete(): JQuery; + ejmAutocomplete(options?: ej.mobile.AutocompleteOptions): JQuery; + data(key: "ejmAutocomplete"): ej.mobile.Autocomplete; + /*AutoComplete*/ + + /*Button*/ + ejmButton(): JQuery; + ejmButton(options?: ej.mobile.ButtonOptions): JQuery; + data(key: "ejmButton"): ej.mobile.Button; + + ejmActionlink(): JQuery; + ejmActionlink(options?: ej.mobile.ButtonOptions): JQuery; + data(key: "ejmActionlink"): ej.mobile.Button; + /*Button*/ + + /* DatePicker */ + ejmDatePicker(): JQuery; + ejmDatePicker(options?: ej.mobile.DatePickerOptions): JQuery; + data(key: "ejmDatePicker"): ej.mobile.DatePicker; + /* DatePicker */ + + /*Editor*/ + ejmNumeric(): JQuery; + ejmNumeric(options?: ej.mobile.EditorOptions): JQuery; + data(key: "ejmNumeric"): ej.mobile.Numeric; + /*Editor*/ + + /* Grid Start */ + ejmGrid(): JQuery; + ejmGrid(options?: ej.mobile.GridOptions): JQuery; + data(key: "ejmGrid"): ej.mobile.Grid; + /* Grid End */ + + /*Header*/ + ejmHeader(): JQuery; + ejmHeader(options?: ej.mobile.HeaderOptions): JQuery; + data(key: "ejmHeader"): ej.mobile.Header; + /*Header*/ + + /*ListView*/ + ejmListView(): JQuery; + ejmListView(options?: ej.mobile.ListViewOptions): JQuery; + data(key: "ejmListView"): ej.mobile.ListView; + /*ListView*/ + + /*Menu*/ + ejmMenu(): JQuery; + ejmMenu(options?: ej.mobile.MenuOptions): JQuery; + data(key: "ejmMenu"): ej.mobile.Menu; + /*Menu*/ + + /* ProgressBar */ + ejmProgress(): JQuery; + ejmProgress(options?: ej.mobile.ProgressOptions): JQuery; + data(key: "ejmProgress"): ej.mobile.Progress; + /* ProgressBar */ + + /*Radio Button*/ + ejmRadioButton(): JQuery; + ejmRadioButton(options?: ej.mobile.RadioButtonOptions): JQuery; + data(key: "ejmRadioButton"): ej.mobile.RadioButton; + /*Radio Button*/ + + /*Rating*/ + ejmRating(): JQuery; + ejmRating(options?: ej.mobile.RatingOptions): JQuery; + data(key: "ejmRating"): ej.mobile.Rating; + /*Rating*/ + + + /*Rotator*/ + ejmRotator(): JQuery; + ejmRotator(options?: ej.mobile.RotatorOptions): JQuery; + data(key: "ejmRotator"): ej.mobile.Rotator; + /*Rotator*/ + + /*Slider*/ + ejmSlider(): JQuery; + ejmSlider(options?: ej.mobile.SliderOptions): JQuery; + data(key: "ejmSlider"): ej.mobile.Slider; + /*Slider*/ + + /* Tab */ + ejmTab(): JQuery; + ejmTab(options?: ej.mobile.TabOptions): JQuery; + data(key: "ejmTab"): ej.mobile.Tab; + /* Tab */ + + /*Tile*/ + ejmTile(): JQuery; + ejmTile(options?: ej.mobile.TileOptions): JQuery; + data(key: "ejmTile"): ej.mobile.Tile; + /*Tile*/ + + /* TimePicker */ + ejmTimePicker(): JQuery; + ejmTimePicker(options?: ej.mobile.TimePickerOptions): JQuery; + data(key: "ejmTimePicker"): ej.mobile.TimePicker; + /* TimePicker */ + + /*ToggleButton*/ + ejmToggleButton(): JQuery; + ejmToggleButton(options?: ej.mobile.ToggleButtonOptions): JQuery; + data(key: "ejmToggleButton"): ej.mobile.ToggleButton; + /*ToggleButton*/ + + /*Toolbar*/ + ejmToolbar(): JQuery; + ejmToolbar(options?: ej.mobile.ToolbarOptions): JQuery; + data(key: "ejmToolbar"): ej.mobile.Toolbar; + /*Toolbar*/ + + /*GroupButton*/ + ejmGroupButton(): JQuery; + ejmGroupButton(options?: ej.mobile.GroupButtonOptions): JQuery; + data(key: "ejmGroupButton"): ej.mobile.GroupButton; + /*GroupButton*/ + + /* SplitPane */ + ejmSplitPane(): JQuery; + ejmSplitPane(options?: ej.mobile.SplitPaneOptions): JQuery; + data(key: "ejmSplitPane"): ej.mobile.SplitPane; + /* SplitPane */ + + /* Dialog */ + ejmDialog(): JQuery; + ejmDialog(options?: ej.mobile.DialogOptions): JQuery; + data(key: "ejmDialog"): ej.mobile.Dialog; + /* Dialog */ + + /* TextBox */ + ejmTextBox(): JQuery; + ejmTextBox(options?: ej.mobile.TextBoxOptions): JQuery; + data(key: "ejmTextBox"): ej.mobile.TextBox; + /* TextBox */ + + /* Password */ + ejmPassword(): JQuery; + ejmPassword(options?: ej.mobile.TextBoxOptions): JQuery; + data(key: "ejmPassword"): ej.mobile.TextBox; + /* Password */ + + /* MaskEdit */ + ejmMaskEdit(): JQuery; + ejmMaskEdit(options?: ej.mobile.MaskEditOptions): JQuery; + data(key: "ejmMaskEdit"): ej.mobile.MaskEdit; + /* MaskEdit */ + + /* TextArea */ + ejmTextArea(): JQuery; + ejmTextArea(options?: ej.mobile.TextBoxOptions): JQuery; + data(key: "ejmTextArea"): ej.mobile.TextBox; + /* MaskEdit */ + + /* Footer */ + ejmFooter(): JQuery; + ejmFooter(options?: ej.mobile.FooterOptions): JQuery; + data(key: "ejmFooter"): ej.mobile.Footer; + /* Footer */ + + /* CheckBox */ + ejmCheckBox(): JQuery; + ejmCheckBox(options?: ej.mobile.CheckBoxOptions): JQuery; + data(key: "ejmCheckBox"): ej.mobile.CheckBox; + /* CheckBox */ + + /* ScrollPanel */ + ejmScrollPanel(): JQuery; + ejmScrollPanel(options: ej.mobile.ScrollPanelOptions): JQuery; + data(key: "ejmScrollPanel"): ej.mobile.ScrollPanel; + /* ScrollPanel */ + + /* NavigationDrawer */ + ejmNavigationDrawer(): JQuery; + ejmNavigationDrawer(options: ej.mobile.NavigationDrawerOptions): JQuery; + data(key: "ejmNavigationDrawer"): ej.mobile.NavigationDrawer; + /* NavigationDrawer */ + + /* RadialMenu */ + ejmRadialMenu(): JQuery; + ejmRadialMenu(options?: ej.mobile.RadialMenuOptions): JQuery; + data(key: "ejmRadialMenu"): ej.mobile.RadialMenu; + /* RadialMenu */ + + ejLinearGauge(): JQuery; + ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; + data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; + + ejDigitalGauge(): JQuery; + ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; + data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; + + ejCircularGauge(): JQuery; + ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; + data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; + + ejChart(): JQuery; + ejChart(options?: ej.datavisualization.Chart.Model): JQuery; + data(key: "ejChart"): ej.datavisualization.Chart; + + ejRangeNavigator(): JQuery; + ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; + data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; + + ejBulletGraph(): JQuery; + ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; + data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; + + ejMap(): JQuery; + ejMap(options?: ej.datavisualization.Map.Model): JQuery; + data(key: "ejMap"): ej.datavisualization.Map; + + ejTreeMap(): JQuery; + ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; + data(key: "ejTreeMap"): ej.datavisualization.TreeMap; + + ejBarcode(): JQuery; + ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; + data(key: "ejBarcode"): ej.datavisualization.Barcode; + + ejDraggable(): JQuery; + ejDraggable(options?: ej.DraggableOptions): JQuery; + data(key: "ejDraggable"): ej.Draggable; + + ejDroppable(): JQuery; + ejDroppable(options?: ej.DroppableOptions): JQuery; + data(key: "ejDroppable"): ej.Droppable; + + ejResizable(): JQuery; + ejResizable(options?: ej.ResizableOptions): JQuery; + data(key: "ejResizable"): ej.Resizable; + + ejColorPicker(): JQuery; + ejColorPicker(options?: ej.ColorPicker.Model): JQuery; + data(key: "ejColorPicker"): ej.ColorPicker; + + ejRadialSlider(): JQuery; + ejRadialSlider(options?: ej.RadialSliderOptions): JQuery; + data(key: "ejRadialSlider"): ej.RadialSlider; + +} \ No newline at end of file From 3db3624fa3efc1052af5932312badf0fbdeb1482 Mon Sep 17 00:00:00 2001 From: Markus Wagner Date: Thu, 5 May 2016 18:23:44 +0200 Subject: [PATCH 0187/1506] Definitions for angular-deferred-bootstrap added (#9178) --- .../angular-deferred-bootstrap-tests.ts | 11 ++++++++++ .../angular-deferred-bootstrap.d.ts | 20 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts create mode 100644 angular-deferred-bootstrap/angular-deferred-bootstrap.d.ts diff --git a/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts b/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts new file mode 100644 index 0000000000..d8a07444d1 --- /dev/null +++ b/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts @@ -0,0 +1,11 @@ +/// +/// + +deferredBootstrapper.bootstrap( + { + element: window.document, + module: "myApp", + resolve: { + configuration: ["$http", ($http: ng.IHttpService) => $http.get("config.json")] + } + }); diff --git a/angular-deferred-bootstrap/angular-deferred-bootstrap.d.ts b/angular-deferred-bootstrap/angular-deferred-bootstrap.d.ts new file mode 100644 index 0000000000..a76226761c --- /dev/null +++ b/angular-deferred-bootstrap/angular-deferred-bootstrap.d.ts @@ -0,0 +1,20 @@ +// Type definitions for angular-deferred-bootstrap v0.1.9 +// Project: https://github.com/philippd/angular-deferred-bootstrap +// Definitions by: Markus Wagner +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare var deferredBootstrapper: angular.IDeferredBootstrapperStatic; + +declare module angular { + interface IDeferredBootstrapperStatic { + bootstrap(configParam: IConfigParam): ng.IPromise + } + + interface IConfigParam { + element?: Node, + module?: string, + resolve: any + } +} \ No newline at end of file From d35cd79f88ece319800750441515c5d1c82d54b2 Mon Sep 17 00:00:00 2001 From: my-name-is-sascha Date: Thu, 5 May 2016 18:24:38 +0200 Subject: [PATCH 0188/1506] add resolveClientLocale() to angular-translate (#9179) --- angular-translate/angular-translate.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/angular-translate/angular-translate.d.ts b/angular-translate/angular-translate.d.ts index c4eca39a95..045f2f5994 100644 --- a/angular-translate/angular-translate.d.ts +++ b/angular-translate/angular-translate.d.ts @@ -68,6 +68,7 @@ declare namespace angular.translate { loaderCache(): any; isReady(): boolean; onReady(): angular.IPromise; + resolveClientLocale():string; } interface ITranslateProvider extends angular.IServiceProvider { @@ -111,6 +112,7 @@ declare namespace angular.translate { registerAvailableLanguageKeys(): string[]; registerAvailableLanguageKeys(languageKeys: string[], aliases?: ILanguageKeyAlias): ITranslateProvider; useLoaderCache(cache?: any): ITranslateProvider; + resolveClientLocale():string; } } From b7e92198bb4e75b1ca4d8df87dc61445ed4953a3 Mon Sep 17 00:00:00 2001 From: Rajab Shakirov Date: Thu, 5 May 2016 19:25:01 +0300 Subject: [PATCH 0189/1506] Added type definitions for react-calendar-timeline (#9158) * Added type definitions for react-calendar-timeline * fix not implicit any in react-calendar-timeline.d.ts * add reference to react * add react-calendar-timeline-tests.tsx --- .../react-calendar-timeline-tests.tsx | 33 +++++++++ .../react-calendar-timeline.d.ts | 68 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 react-calendar-timeline/react-calendar-timeline-tests.tsx create mode 100644 react-calendar-timeline/react-calendar-timeline.d.ts diff --git a/react-calendar-timeline/react-calendar-timeline-tests.tsx b/react-calendar-timeline/react-calendar-timeline-tests.tsx new file mode 100644 index 0000000000..ab477ec6e7 --- /dev/null +++ b/react-calendar-timeline/react-calendar-timeline-tests.tsx @@ -0,0 +1,33 @@ +/// +/// +/// + +import * as React from "react"; +import * as moment from 'moment'; +import * as Timeline from 'react-calendar-timeline'; + +const groups = [ + {id: 1, title: 'group 1'}, + {id: 2, title: 'group 2'} +] + +const items = [ + {id: 1, group: 1, title: 'item 1', start_time: moment(), end_time: moment().add(1, 'hour')}, + {id: 2, group: 2, title: 'item 2', start_time: moment().add(-0.5, 'hour'), end_time: moment().add(0.5, 'hour')}, + {id: 3, group: 1, title: 'item 3', start_time: moment().add(2, 'hour'), end_time: moment().add(3, 'hour')} +] + +class ReactCalendarTimeline extends React.Component<{}, {}> { + render(){ + return( +
+ Rendered by react! + +
+ ); + } +}; \ No newline at end of file diff --git a/react-calendar-timeline/react-calendar-timeline.d.ts b/react-calendar-timeline/react-calendar-timeline.d.ts new file mode 100644 index 0000000000..c44b70a59d --- /dev/null +++ b/react-calendar-timeline/react-calendar-timeline.d.ts @@ -0,0 +1,68 @@ +// Type definitions for react-calendar-timeline v0.7.9 +// Project: https://github.com/namespace-ee/react-calendar-timeline +// Definitions by: Rajab Shakirov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-calendar-timeline" { + interface ReactCalendarTimeline { + groups?:any; + items?:{ + id: number; + group: number; + title?: string; + start_time: any; + end_time: any; + canMove?: boolean; + canResize?: boolean; + canChangeGroup?: boolean; + className?: string; + }[]; + keys?:{ + groupIdKey: string; + groupTitleKey: string; + itemIdKey: string; + itemTitleKey: string; + itemGroupKey: string; + itemTimeStartKey: string; + itemTimeEndKey: string; + }; + sidebarWidth?: number; + dragSnap?: number; + minResizeWidth?: number; + fixedHeader?: "fixed" | "none"; + zIndexStart?: number; + lineHeight?: number; + headerLabelGroupHeight?: number; + headerLabelHeight?: number; + itemHeightRatio?: number; + minZoom?: number; + maxZoom?: number; + canMove?: boolean; + canChangeGroup?: boolean; + canResize?: boolean; + useResizeHandle?: boolean; + stackItems?: boolean; + traditionalZoom?: boolean; + itemTouchSendsClick?: boolean; + onItemMove?(itemId:any, dragTime:any, newGroupOrder:any): any; + onItemResize?(itemId:any, newResizeEnd:any): any; + onItemSelect?(itemId:any): any; + onItemClick?(itemId:any): any; + onCanvasClick?(groupId:any, time:any, e:any): any; + onItemDoubleClick?(itemId:any): any; + moveResizeValidator?(action:any, itemId:any, time:any): any; + defaultTimeStart: any; + defaultTimeEnd: any; + visibleTimeStart?: any; + visibleTimeEnd?: any; + onTimeChange?(visibleTimeStart:any, visibleTimeEnd:any): any; + onTimeInit?(visibleTimeStart:any, visibleTimeEnd:any): any; + onBoundsChange?(canvasTimeStart:any, canvasTimeEnd:any): any; + children?: any; + } + + let ReactCalendarTimeline: __React.ClassicComponentClass; + export = ReactCalendarTimeline; +} From ceb795ce89fa18768b3075c8d8a7e32d4b066dde Mon Sep 17 00:00:00 2001 From: Michael Zlatkovsky Date: Thu, 5 May 2016 09:47:25 -0700 Subject: [PATCH 0190/1506] Remove password parameter from workbook protect/unprotect (#9072) It is not possible to use a password for protection/unprotection via the API. --- office-js/office-js.d.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/office-js/office-js.d.ts b/office-js/office-js.d.ts index 6761ab646c..e1f44f26bb 100644 --- a/office-js/office-js.d.ts +++ b/office-js/office-js.d.ts @@ -1743,20 +1743,17 @@ declare namespace Excel { * Protect a worksheet. It throws if the worksheet has been protected. * * @param options sheet protection options. - * @param password sheet protection password. * * [Api set: ExcelApi 1.2] */ - protect(options?: Excel.WorksheetProtectionOptions, password?: string): void; + protect(options?: Excel.WorksheetProtectionOptions): void; /** * * Unprotect a worksheet * - * @param password sheet protection password. - * * [Api set: ExcelApi 1.2] */ - unprotect(password?: string): void; + unprotect(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ @@ -8566,7 +8563,6 @@ declare namespace Excel { } namespace ErrorCodes { var accessDenied: string; - var badPassword: string; var generalException: string; var insertDeleteConflict: string; var invalidArgument: string; From 6d5af489f805b5033b77b213d39c2a7196f98b48 Mon Sep 17 00:00:00 2001 From: Christian Beilschmidt Date: Thu, 5 May 2016 18:49:08 +0200 Subject: [PATCH 0191/1506] Fixed `dagre-d3` and extended `dagre` (#9143) * added the `options` field to dagre's `setEdge` * added a test as well * changed some style issues according to linter (var -> let) * exported `dagre-d3` so it is possible to import it with SystemJS * Atom's TypeScript package now accepts the import * changed some style issues according to linter (var -> let) * changed `let` to `const` whenever it is possible. * changed `let` to `const` whenever it is possible. * `const` is possible here as well because the object reference does not change. --- dagre-d3/dagre-d3-tests.ts | 15 +++++++-------- dagre-d3/dagre-d3.d.ts | 4 ++++ dagre/dagre-tests.ts | 5 +++-- dagre/dagre.d.ts | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dagre-d3/dagre-d3-tests.ts b/dagre-d3/dagre-d3-tests.ts index f73389015f..2ba8675436 100644 --- a/dagre-d3/dagre-d3-tests.ts +++ b/dagre-d3/dagre-d3-tests.ts @@ -1,19 +1,18 @@ /// namespace DagreD3Tests { - var gDagre = new dagreD3.graphlib.Graph(); - var graph = gDagre.graph(); + const gDagre = new dagreD3.graphlib.Graph(); + const graph = gDagre.graph(); // has graph methods from dagre.d.ts graph.setNode("a", {}); - var num: number = 251 + graph.height + graph.width; - var predecessors: { [vertex:string]: string[] } = {}; - var successors: { [vertex:string]: string[] } = {}; + const num: number = 251 + graph.height + graph.width; + const predecessors: { [vertex: string]: string[] } = {}; + const successors: { [vertex: string]: string[] } = {}; predecessors["a"] = graph.predecessors("a"); successors["a"] = graph.successors("a"); - var render = new dagreD3.render(); - var svg = d3.select("svg"); + const render = new dagreD3.render(); + const svg = d3.select("svg"); render(svg, graph); } - diff --git a/dagre-d3/dagre-d3.d.ts b/dagre-d3/dagre-d3.d.ts index c8484995e3..0bc71294c8 100644 --- a/dagre-d3/dagre-d3.d.ts +++ b/dagre-d3/dagre-d3.d.ts @@ -29,3 +29,7 @@ declare namespace Dagre { } declare var dagreD3: Dagre.DagreD3Factory; + +declare module "dagre-d3" { + export = dagreD3; +} diff --git a/dagre/dagre-tests.ts b/dagre/dagre-tests.ts index a4eaad32f3..0a33a7750d 100644 --- a/dagre/dagre-tests.ts +++ b/dagre/dagre-tests.ts @@ -1,10 +1,11 @@ /// namespace DagreTests { - var gDagre = new dagre.graphlib.Graph(); + const gDagre = new dagre.graphlib.Graph(); gDagre.setGraph({}) .setDefaultEdgeLabel(function(){ return ; }) .setNode("a", {}) - .setEdge("b", "c"); + .setEdge("b", "c") + .setEdge("c", "d", {class: "class"}); dagre.layout(gDagre); } diff --git a/dagre/dagre.d.ts b/dagre/dagre.d.ts index 2b99bf4d5a..7caa1b5590 100644 --- a/dagre/dagre.d.ts +++ b/dagre/dagre.d.ts @@ -3,7 +3,7 @@ // Definitions by: Qinfeng Chen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace Dagre{ +declare namespace Dagre { interface DagreFactory { graphlib: GraphLib; layout(graph: Graph): void; @@ -16,7 +16,7 @@ declare namespace Dagre{ nodes(): string[]; node(id: any): any; setDefaultEdgeLabel(callback: () => void): Graph; - setEdge(sourceId: string, targetId: string): Graph; + setEdge(sourceId: string, targetId: string, options?: { [key: string]: any }): Graph; setGraph(options: { [key: string]: any }): Graph; setNode(id: string, node: { [key: string]: any }): Graph; } From 2fe3e9681e082bcf619900b179e70ac8960a3b7b Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 5 May 2016 18:51:08 +0200 Subject: [PATCH 0192/1506] Initial typings for react-imageloader (#9183) * Initial react-imageloader typings * Fixed tests --- react-imageloader/react-imageloader-tests.tsx | 7 ++++ react-imageloader/react-imageloader.d.ts | 38 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 react-imageloader/react-imageloader-tests.tsx create mode 100644 react-imageloader/react-imageloader.d.ts diff --git a/react-imageloader/react-imageloader-tests.tsx b/react-imageloader/react-imageloader-tests.tsx new file mode 100644 index 0000000000..9a1ddf0204 --- /dev/null +++ b/react-imageloader/react-imageloader-tests.tsx @@ -0,0 +1,7 @@ +/// +/// + +import ImageLoader = require('react-imageloader'); +import * as React from 'react'; + +let imageLoader = ; diff --git a/react-imageloader/react-imageloader.d.ts b/react-imageloader/react-imageloader.d.ts new file mode 100644 index 0000000000..1ba1ba38d0 --- /dev/null +++ b/react-imageloader/react-imageloader.d.ts @@ -0,0 +1,38 @@ +// Type definitions for react-imageloader 2.1.0 +// Project: https://github.com/hzdg/react-imageloader +// Definitions by: Stephen Jelfs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-imageloader" { + interface ImageLoaderProps extends __React.Props { + /** An optional class name for the wrapper component. */ + className?: string; + + /** An optional object containing props for the underlying img component. */ + imgProps?: any; + + /** An optional handler for the error event. */ + onError?: (event: any) => void; + + /** An optional handler for the load event. */ + onLoad?: (event: any) => void; + + /** An optional function that returns a React element to be shown while the image loads. */ + preloader?: (params: any) => __React.ReactElement; + + /** The URL of the image to be loaded. */ + src: string; + + /** An optional object containing styles for the wrapper component. */ + style?: __React.CSSProperties; + + /** A function that takes a props argument and returns a React element to be used as the wrapper component. Defaults to React.DOM.span. */ + wrapper?: (props: any) => __React.ReactElement; + } + + class ImageLoader extends __React.Component {} + + export = ImageLoader; +} From d1555d272ce53dcbbf4a3c81de9f5a59678e0cfa Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 5 May 2016 18:54:59 +0200 Subject: [PATCH 0193/1506] Initial typings for react-autosuggest (#9184) * Initial react-autosuggest typings * Fixed tests --- react-autosuggest/react-autosuggest-tests.tsx | 12 +++++ react-autosuggest/react-autosuggest.d.ts | 51 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 react-autosuggest/react-autosuggest-tests.tsx create mode 100644 react-autosuggest/react-autosuggest.d.ts diff --git a/react-autosuggest/react-autosuggest-tests.tsx b/react-autosuggest/react-autosuggest-tests.tsx new file mode 100644 index 0000000000..4fb4947e19 --- /dev/null +++ b/react-autosuggest/react-autosuggest-tests.tsx @@ -0,0 +1,12 @@ +/// +/// + +import Autosuggest = require('react-autosuggest'); +import * as React from 'react'; + +let autosuggest = suggestion.name} + renderSuggestion={(suggestion: any) => ({suggestion.name})} + inputProps={{value: "El", onChange: (event: any, params: {newValue: string, method: string}) => {}}} +/> diff --git a/react-autosuggest/react-autosuggest.d.ts b/react-autosuggest/react-autosuggest.d.ts new file mode 100644 index 0000000000..cb67474ae1 --- /dev/null +++ b/react-autosuggest/react-autosuggest.d.ts @@ -0,0 +1,51 @@ +// Type definitions for react-autosuggest 3.7.1 +// Project: https://github.com/moroshko/react-autosuggest +// Definitions by: Stephen Jelfs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-autosuggest" { + interface Suggestion { + text: string; + } + + interface Theme { + container?: string; + containerOpen?: string; + input?: string; + suggestionsContainer?: string; + suggestion?: string; + suggestionFocused?: string; + sectionContainer?: string; + sectionTitle?: string; + sectionSuggestionsContainer?: string; + } + + interface InputProps { + value: string; + onChange: (event: any, params: {newValue: string, method: string}) => void; + type?: string; + placeholder?: string; + } + + interface AutosuggestProps extends __React.Props { + suggestions: any[]; + onSuggestionsUpdateRequested?: (params: {value: string, reason: string}) => void; + getSuggestionValue: (suggestion: any) => string; + renderSuggestion: (suggestion: any, params: {value: string, valueBeforeUpDown: string}) => __React.ReactElement; + inputProps: InputProps; + shouldRenderSuggestions?: (value: string) => boolean; + multiSection?: boolean; + renderSectionTitle?: (section: any) => __React.ReactElement; + getSectionSuggestions?: (section: any) => any[]; + onSuggestionSelected?: (event: any, params: {suggestion: any, suggestionValue: string, method: string}) => void; + focusInputOnSuggestionClick?: boolean; + theme?: Theme; + id?: string; + } + + class Autosuggest extends __React.Component {} + + export = Autosuggest; +} From 36c7b30eb3bb766156b222304f3a44033caa55cd Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 5 May 2016 18:57:42 +0200 Subject: [PATCH 0194/1506] Initial typings for react-scrollbar (#9185) * Initial typings for react-scrollbar * Fixed tests --- react-scrollbar/react-scrollbar-tests.tsx | 14 ++++++++++ react-scrollbar/react-scrollbar.d.ts | 32 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 react-scrollbar/react-scrollbar-tests.tsx create mode 100644 react-scrollbar/react-scrollbar.d.ts diff --git a/react-scrollbar/react-scrollbar-tests.tsx b/react-scrollbar/react-scrollbar-tests.tsx new file mode 100644 index 0000000000..784a44d899 --- /dev/null +++ b/react-scrollbar/react-scrollbar-tests.tsx @@ -0,0 +1,14 @@ +/// +/// + +import ScrollArea = require('react-scrollbar'); +import * as React from 'react'; + +let scrollArea = +
Some long content.
+
; diff --git a/react-scrollbar/react-scrollbar.d.ts b/react-scrollbar/react-scrollbar.d.ts new file mode 100644 index 0000000000..8df2435678 --- /dev/null +++ b/react-scrollbar/react-scrollbar.d.ts @@ -0,0 +1,32 @@ +// Type definitions for react-scrollbar 0.4.1 +// Project: https://github.com/souhe/reactScrollbar +// Definitions by: Stephen Jelfs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-scrollbar" { + interface ScrollAreaProps extends __React.Props { + className?: string, + style?: __React.CSSProperties, + speed?: number, + contentClassName?: string, + contentStyle?: __React.CSSProperties, + vertical?: boolean, + verticalContainerStyle?: __React.CSSProperties, + verticalScrollbarStyle?: __React.CSSProperties, + horizontal?: boolean, + horizontalContainerStyle?: __React.CSSProperties, + horizontalScrollbarStyle?: __React.CSSProperties, + onScroll?: (value: {leftPosition: number, topPosition: number, containerHeight: number, containerWidth: number, realHeight: number, realWidth: number}) => void, + contentWindow?: any, + ownerDocument?: any, + smoothScrolling?: boolean + minScrollSize?: number, + swapWheelAxes?: boolean + } + + class ScrollArea extends __React.Component {} + + export = ScrollArea; +} From 311d63427afa2832e8b345e8d2d01466cda00093 Mon Sep 17 00:00:00 2001 From: Alex Gorbatchev Date: Thu, 5 May 2016 09:57:56 -0700 Subject: [PATCH 0195/1506] Updates redux-actions to allow payload and meta typing. (#9124) --- redux-actions/redux-actions-tests.ts | 112 ++++++++++++++++++--------- redux-actions/redux-actions.d.ts | 62 ++++++++++++--- 2 files changed, 127 insertions(+), 47 deletions(-) diff --git a/redux-actions/redux-actions-tests.ts b/redux-actions/redux-actions-tests.ts index 30dd00a970..3d97157a6c 100644 --- a/redux-actions/redux-actions-tests.ts +++ b/redux-actions/redux-actions-tests.ts @@ -1,56 +1,98 @@ /// -const minimalAction: ReduxActions.Action = { type: 'INCREMENT' }; -const richerAction: ReduxActions.Action = { +let state: number; +const minimalAction: ReduxActions.BaseAction = { type: 'INCREMENT' }; + +const incrementAction: () => ReduxActions.Action = ReduxActions.createAction( + 'INCREMENT', () => 1 +); + +const multiplyAction: (...args: number[]) => ReduxActions.Action = ReduxActions.createAction( + 'MULTIPLY' +); + +const action: ReduxActions.Action = incrementAction(); + +const actionHandler = ReduxActions.handleAction( + 'INCREMENT', + (state: number, action: ReduxActions.Action) => state + action.payload +); + +state = actionHandler(0, incrementAction()); + +const actionHandlerWithReduceMap = ReduxActions.handleAction( + 'MULTIPLY', { + next(state: number, action: ReduxActions.Action) { + return state * action.payload; + }, + throw(state: number) { return state } + } +); + +state = actionHandlerWithReduceMap(0, multiplyAction(10)); + +const actionsHandler = ReduxActions.handleActions({ + 'INCREMENT': (state: number, action: ReduxActions.Action) => state + action.payload, + 'MULTIPLY': (state: number, action: ReduxActions.Action) => state * action.payload +}); + +state = actionsHandler(0, { type: 'INCREMENT' }); + +const actionsHandlerWithInitialState = ReduxActions.handleActions({ + 'INCREMENT': (state: number, action: ReduxActions.Action) => state + action.payload, + 'MULTIPLY': (state: number, action: ReduxActions.Action) => state * action.payload +}, 0); + +state = actionsHandlerWithInitialState(0, { type: 'INCREMENT' }); + +// ---------------------------------------------------------------------------------------------------- + +type TypedState = { + value: number; +}; + +type MetaType = { + remote: boolean +}; + +let typedState: TypedState; + +const richerAction: ReduxActions.ActionMeta = { type: 'INCREMENT', - payload: 2, error: false, + payload: { + value: 2 + }, meta: { remote: true } }; -const incrementAction: (...args: any[]) => ReduxActions.Action = ReduxActions.createAction( +const typedIncrementAction: () => ReduxActions.Action = ReduxActions.createAction( 'INCREMENT', - (amount: number) => amount + () => ({ value: 1 }) ); -const action: ReduxActions.Action = incrementAction(42); -const incrementByAction: (...args: any[]) => ReduxActions.Action = ReduxActions.createAction( +const typedActionHandler = ReduxActions.handleAction( + 'INCREMENT', + (state: TypedState, action: ReduxActions.Action) => ({ value: state.value + 1 }) +); + +typedState = typedActionHandler({ value: 0 }, typedIncrementAction()); + +const typedIncrementByActionWithMeta: (value: number) => ReduxActions.ActionMeta = ReduxActions.createAction( 'INCREMENT_BY', - (amount: number) => amount, + amount => ({ value: amount }), amount => ({ remote: true }) ); -let state: number; - -const actionHandler = ReduxActions.handleAction( - 'INCREMENT', - (state: number, action: ReduxActions.Action) => state + 1 -); -state = actionHandler(0, { type: 'INCREMENT' }); - -const actionHandlerWithReduceMap = ReduxActions.handleAction( +const typedActionHandlerWithReduceMap = ReduxActions.handleAction( 'INCREMENT_BY', { - next(state: number, action: ReduxActions.Action) { - return state + action.payload; + next(state: TypedState, action: ReduxActions.Action) { + return { value: state.value + action.payload.value }; }, - throw(state: number) { return state } + throw(state: TypedState) { return state } } ); -state = actionHandlerWithReduceMap(0, { type: 'INCREMENT' }); - -const actionsHandler = ReduxActions.handleActions({ - 'INCREMENT': (state: number, action: ReduxActions.Action) => state + 1, - 'DECREMENT': (state: number, action: ReduxActions.Action) => state - 1 -}); -state = actionsHandler(0, { type: 'INCREMENT' }); - -const actionsHandlerWithInitialState = ReduxActions.handleActions({ - 'INCREMENT': (state: number, action: ReduxActions.Action) => state + 1, - 'DECREMENT': (state: number, action: ReduxActions.Action) => state - 1 -}, 0); -state = actionsHandlerWithInitialState(0, { type: 'INCREMENT' }); - - +typedState = typedActionHandlerWithReduceMap({ value: 0 }, typedIncrementByActionWithMeta(10)); diff --git a/redux-actions/redux-actions.d.ts b/redux-actions/redux-actions.d.ts index 8709bd2a02..e9e2cf83a0 100644 --- a/redux-actions/redux-actions.d.ts +++ b/redux-actions/redux-actions.d.ts @@ -1,32 +1,70 @@ // Type definitions for redux-actions v0.8.0 // Project: https://github.com/acdlite/redux-actions -// Definitions by: Jack Hsu +// Definitions by: Jack Hsu , Alex Gorbatchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace ReduxActions { // FSA-compliant action. // See: https://github.com/acdlite/flux-standard-action - type Action = { + interface BaseAction { type: string - payload?: any + } + + interface Action extends BaseAction { + payload?: Payload error?: boolean meta?: any + } + + interface ActionMeta extends Action { + meta: Meta + } + + type PayloadCreator = (...args: Input[]) => Payload; + + type MetaCreator = (...args: Input[]) => Payload; + + type Reducer = (state: Payload, action: Action) => Payload; + + type ReducerMeta = (state: Payload, action: ActionMeta) => Payload; + + type ReducerMap = { + [actionType: string]: Reducer }; - type PayloadCreator = (...args: any[]) => T; - type MetaCreator = (...args: any[]) => any; + export function createAction( + actionType: string, + payloadCreator?: PayloadCreator, + metaCreator?: MetaCreator + ): (...args: any[]) => Action; - type Reducer = (state: T, action: Action) => T; + export function createAction( + actionType: string, + payloadCreator?: PayloadCreator + ): (...args: InputAndPayload[]) => Action; - type ReducerMap = { - [actionType: string]: Reducer - }; + export function createAction( + actionType: string, + payloadCreator?: PayloadCreator + ): (...args: Input[]) => Action; - export function createAction(actionType: string, payloadCreator?: PayloadCreator, metaCreator?: MetaCreator): (...args: any[]) => Action; + export function createAction( + actionType: string, + payloadCreator: PayloadCreator, + metaCreator: MetaCreator + ): (...args: Input[]) => ActionMeta; - export function handleAction(actionType: string, reducer: Reducer | ReducerMap): Reducer; + export function handleAction( + actionType: string, + reducer: Reducer | ReducerMap + ): Reducer; - export function handleActions(reducerMap: ReducerMap, initialState?: T): Reducer; + export function handleAction( + actionType: string, + reducer: ReducerMeta | ReducerMap + ): Reducer; + + export function handleActions(reducerMap: ReducerMap, initialState?: Payload): Reducer; } declare module 'redux-actions' { From 9143f1233f13692c14ae2afe7aee2d5014cba916 Mon Sep 17 00:00:00 2001 From: Michael Zabka Date: Thu, 5 May 2016 19:02:01 +0200 Subject: [PATCH 0196/1506] Add missing implementation of crypto-js ciphers (#9191) * there ware uncoverred typings for cipher of crypto-js * was updated version number of crypto-js * added test cases #9133 --- crypto-js/crypto-js-tests.ts | 126 +++++++++++++++++++++++++++++++++-- crypto-js/crypto-js.d.ts | 101 +++++++++++++++++++++------- 2 files changed, 195 insertions(+), 32 deletions(-) diff --git a/crypto-js/crypto-js-tests.ts b/crypto-js/crypto-js-tests.ts index 199c32ef2f..3a06346ed4 100644 --- a/crypto-js/crypto-js-tests.ts +++ b/crypto-js/crypto-js-tests.ts @@ -2,8 +2,8 @@ import CryptoJS = require('crypto-js'); +// Hashers var str: string; - str = CryptoJS.MD5('some message'); str = CryptoJS.MD5('some message', 'some key'); @@ -13,11 +13,123 @@ str = CryptoJS.SHA1('some message', 'some key', { any: true }); str = CryptoJS.format.OpenSSL('some message'); str = CryptoJS.format.OpenSSL('some message', 'some key'); -str = CryptoJS.enc.Utf8('some message'); -str = CryptoJS.enc.Utf8('some message', 'some key'); -str = CryptoJS.mode.OFB('some message'); -str = CryptoJS.mode.OFB('some message', 'some key'); +// Ciphers +var encrypted: CryptoJS.WordArray; +var decrypted: CryptoJS.DecryptedMessage; -str = CryptoJS.pad.Ansix923('some message'); -str = CryptoJS.pad.Ansix923('some message', 'some key'); +encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase"); +decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase"); + +encrypted = CryptoJS.DES.encrypt("Message", "Secret Passphrase"); +decrypted = CryptoJS.DES.decrypt(encrypted, "Secret Passphrase"); + +encrypted = CryptoJS.TripleDES.encrypt("Message", "Secret Passphrase"); +decrypted = CryptoJS.TripleDES.decrypt(encrypted, "Secret Passphrase"); + + +encrypted = CryptoJS.Rabbit.encrypt("Message", "Secret Passphrase"); +decrypted = CryptoJS.Rabbit.decrypt(encrypted, "Secret Passphrase"); + +encrypted = CryptoJS.RC4.encrypt("Message", "Secret Passphrase"); +decrypted = CryptoJS.RC4.decrypt(encrypted, "Secret Passphrase"); + +encrypted = CryptoJS.RC4Drop.encrypt("Message", "Secret Passphrase"); +encrypted = CryptoJS.RC4Drop.encrypt("Message", "Secret Passphrase", { drop: 3072 / 4 }); +decrypted = CryptoJS.RC4Drop.decrypt(encrypted, "Secret Passphrase", { drop: 3072 / 4 }); + +var key = CryptoJS.enc.Hex.parse('000102030405060708090a0b0c0d0e0f'); +var iv = CryptoJS.enc.Hex.parse('101112131415161718191a1b1c1d1e1f'); +encrypted = CryptoJS.AES.encrypt("Message", key, { iv: iv }); + +encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase", { + mode: CryptoJS.mode.CFB, + padding: CryptoJS.pad.AnsiX923 +}); + + +// The Cipher Output +encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase"); +alert(encrypted.key); +// 74eb593087a982e2a6f5dded54ecd96d1fd0f3d44a58728cdcd40c55227522223 +alert(encrypted.iv); +// 7781157e2629b094f0e3dd48c4d786115 +alert(encrypted.salt); +// 7a25f9132ec6a8b34 +alert(encrypted.ciphertext); +// 73e54154a15d1beeb509d9e12f1e462a0 +alert(encrypted); +// U2FsdGVkX1+iX5Ey7GqLND5UFUoV0b7rUJ2eEvHkYqA= + +var JsonFormatter = { + stringify: function(cipherParams: any) { + // create json object with ciphertext + var jsonObj: any = { + ct: cipherParams.ciphertext.toString(CryptoJS.enc.Base64) + }; + // optionally add iv and salt + if (cipherParams.iv) { + jsonObj.iv = cipherParams.iv.toString(); + } + if (cipherParams.salt) { + jsonObj.s = cipherParams.salt.toString(); + } + // stringify json object + return JSON.stringify(jsonObj); + }, + parse: function (jsonStr: any) { + // parse json string + var jsonObj = JSON.parse(jsonStr); + // extract ciphertext from json object, and create cipher params object + var cipherParams = (CryptoJS).lib.CipherParams.create({ + ciphertext: CryptoJS.enc.Base64.parse(jsonObj.ct) + }); + // optionally extract iv and salt + if (jsonObj.iv) { + cipherParams.iv = CryptoJS.enc.Hex.parse(jsonObj.iv); + } + if (jsonObj.s) { + cipherParams.salt = CryptoJS.enc.Hex.parse(jsonObj.s); + } return cipherParams; + } +}; +encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase", { + format: JsonFormatter +}); +alert(encrypted); +// {"ct":"tZ4MsEnfbcDOwqau68aOrQ==","iv":"8a8c8fd8fe33743d3638737ea4a00698","s":"ba06373c8f57179c"} +decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase", { + format: JsonFormatter +}); +alert(decrypted.toString(CryptoJS.enc.Utf8)); // Message + + +// Progressive Ciphering +var key = CryptoJS.enc.Hex.parse('000102030405060708090a0b0c0d0e0f'); +var iv = CryptoJS.enc.Hex.parse('101112131415161718191a1b1c1d1e1f'); +var aesEncryptor = CryptoJS.algo.AES.createEncryptor(key, { iv: iv }); +var ciphertextPart1 = aesEncryptor.process("Message Part 1"); +var ciphertextPart2 = aesEncryptor.process("Message Part 2"); +var ciphertextPart3 = aesEncryptor.process("Message Part 3"); +var ciphertextPart4 = aesEncryptor.finalize(); +var aesDecryptor = CryptoJS.algo.AES.createDecryptor(key, { iv: iv }); +var plaintextPart1 = aesDecryptor.process(ciphertextPart1); +var plaintextPart2 = aesDecryptor.process(ciphertextPart2); +var plaintextPart3 = aesDecryptor.process(ciphertextPart3); +var plaintextPart4 = aesDecryptor.process(ciphertextPart4); +var plaintextPart5 = aesDecryptor.finalize(); + + +// Encoders +var words = CryptoJS.enc.Base64.parse('SGVsbG8sIFdvcmxkIQ=='); +var base64 = CryptoJS.enc.Base64.stringify(words); +var words = CryptoJS.enc.Latin1.parse('Hello, World!'); +var latin1 = CryptoJS.enc.Latin1.stringify(words); +var words = CryptoJS.enc.Hex.parse('48656c6c6f2c20576f726c6421'); +var hex = CryptoJS.enc.Hex.stringify(words); +var words = CryptoJS.enc.Utf8.parse('𤭢'); +var utf8 = CryptoJS.enc.Utf8.stringify(words); +var words = CryptoJS.enc.Utf16.parse('Hello, World!'); +var utf16 = CryptoJS.enc.Utf16.stringify(words); +var words = CryptoJS.enc.Utf16LE.parse('Hello, World!'); +var utf16 = CryptoJS.enc.Utf16LE.stringify(words); diff --git a/crypto-js/crypto-js.d.ts b/crypto-js/crypto-js.d.ts index 19ea3cd196..0ab6681dce 100644 --- a/crypto-js/crypto-js.d.ts +++ b/crypto-js/crypto-js.d.ts @@ -1,10 +1,48 @@ -// Type definitions for crypto-js v3.1.3 +// Type definitions for crypto-js v3.1.4 // Project: https://github.com/evanvosberg/crypto-js // Definitions by: Michael Zabka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace CryptoJS { type Hash = (message: string, key?: string, ...options: any[]) => string; + interface Cipher { + encrypt(message: string, secretPassphrase: string, option?: CipherOption): WordArray; + decrypt(encryptedMessage: string | WordArray, secretPassphrase: string, option?: CipherOption): DecryptedMessage; + } + interface CipherAlgorythm { + createEncryptor(secretPassphrase: string, option?: CipherOption): Encriptor; + createDecryptor(secretPassphrase: string, option?: CipherOption): Decryptor; + } + interface Encriptor { + process(messagePart: string): string; + finalize(): string; + } + interface Decryptor { + process(messagePart: string): string; + finalize(): string; + } + export interface WordArray { + iv: string; + salt: string; + ciphertext: string; + key?: string; + } + export type DecryptedMessage = { + toString(encoder?: Encoder): string; + }; + interface CipherOption { + iv?: string; + mode?: Mode; + padding?: Padding; + [option: string]: any; + } + interface Encoder { + parse(encodedMessage: string): any; + stringify(words: any): string; + } + + interface Mode {} + interface Padding {} export interface Hashes { MD5: Hash; @@ -24,37 +62,50 @@ declare namespace CryptoJS { HmacSHA3: Hash; HmacRIPEMD160: Hash; PBKDF2: Hash; - AES: Hash; - TripleDES: Hash; - RC4: Hash; - Rabbit: Hash; - RabbitLegacy: Hash; - EvpKDF: Hash; + AES: Cipher; + DES: Cipher; + TripleDES: Cipher; + RC4: Cipher; + RC4Drop: Cipher; + Rabbit: Cipher; + RabbitLegacy: Cipher; + EvpKDF: Cipher; + algo: { + AES: CipherAlgorythm; + DES: CipherAlgorythm; + TrippleDES: CipherAlgorythm; + RC4: CipherAlgorythm; + RC4Drop: CipherAlgorythm; + Rabbit: CipherAlgorythm; + RabbitLegacy: CipherAlgorythm; + EvpKDF: CipherAlgorythm; + }; format: { - OpenSSL: Hash; - Hex: Hash; + OpenSSL: any; + Hex: any; }; enc: { - Latin1: Hash; - Utf8: Hash; - Hex: Hash; - Utf16: Hash; - Base64: Hash; + Latin1: Encoder; + Utf8: Encoder; + Hex: Encoder; + Utf16: Encoder; + Utf16LE: Encoder; + Base64: Encoder; }; mode: { - CFB: Hash; - CTR: Hash; - CTRGladman: Hash; - OFB: Hash; - ECB: Hash; + CFB: Mode; + CTR: Mode; + CTRGladman: Mode; + OFB: Mode; + ECB: Mode; }; pad: { - Pkcs7: Hash; - Ansix923: Hash; - Iso10126: Hash; - Iso97971: Hash; - ZeroPadding: Hash; - NoPadding: Hash; + Pkcs7: Padding; + AnsiX923: Padding; + Iso10126: Padding; + Iso97971: Padding; + ZeroPadding: Padding; + NoPadding: Padding; }; } From e1860b07df6a4bb14800f611bcb965a3bb6dee0c Mon Sep 17 00:00:00 2001 From: BobBuehler Date: Thu, 5 May 2016 12:02:41 -0500 Subject: [PATCH 0197/1506] Update to winreg 1.2.0 (#9157) * Update to winreg 1.2.0 * Used @link for jsdoc on WinregStatic constructor. Updated jsdoc on Options.arch. --- winreg/winreg-tests.ts | 95 +++++++++---- winreg/winreg.d.ts | 297 +++++++++++++++++++++++++---------------- 2 files changed, 255 insertions(+), 137 deletions(-) diff --git a/winreg/winreg-tests.ts b/winreg/winreg-tests.ts index 376006aed6..4a930b3916 100644 --- a/winreg/winreg-tests.ts +++ b/winreg/winreg-tests.ts @@ -16,7 +16,7 @@ var regKey3 = new Winreg({ }) var str: string = regKey.parent.key -var par: Winreg = regKey.parent +var par: Winreg.Registry = regKey.parent regKey.values((err, items) => { var itemsC: Array = items; @@ -28,11 +28,11 @@ regKey.values((err, items) => { }); regKey.keys((err, items) => { - var itemsC: Array = items; + var itemsC: Array = items; var errorC: Error = err; items.forEach((item) => { - var regKey4: Winreg = item; + var regKey4: Winreg.Registry = item; }); }); @@ -47,49 +47,94 @@ var r2 = new Winreg({ hive: Winreg.HKCU, key: '\\Control Panel\\Desktop' }) +var r3 = new Winreg({ + host: 'blah', + arch: 'x64' +}) // get parent key console.log('parent of "'+r2.path+'" -> "'+r2.parent.path+'"'); -// list subkeys -r2.keys(function (err, items) { +// list values +r1.values(function (err, items) { if (!err) { - for (var i = 0, l = items.length; i < l; i++) { - console.log('subkey of "'+r2.path+'": '+items[i].path); - } + console.log(JSON.stringify(items, null, '\t')); } - // list values - r1.values(function (err, items) { + // query named value + r1.get(items[0].name, function (err, item) { if (!err) { - console.log(JSON.stringify(items, null, '\t')); + console.log(JSON.stringify(item, null, '\t')); } - // query named value - r1.get(items[0].name, function (err, item) { + // add value + r1.set('bla', Winreg.REG_SZ, 'hello world!', function (err) { if (!err) { - console.log(JSON.stringify(item, null, '\t')); + console.log('value written'); } - // add value - r1.set('bla', Winreg.REG_SZ, 'hello world!', function (err) { + // delete value + r1.remove('bla', function (err) { if (!err) { - console.log('value written'); + console.log('value deleted'); } - // delete value - r1.remove('bla', function (err) { - - if (!err) { - console.log('value deleted'); - } - - }); }); }); }); }); + +// check for key +r2.keyExists(function (err, exists) { + + if (!err) { + if (exists) { + console.log('key ' + r2.key + ' exists'); + } else { + + console.log('key ' + r2.key + ' does not exist'); + } + } + + // check for value + r2.valueExists('bla', function (err, exists) { + + if (!err) { + if (exists) { + console.log('value bla exists on key ' + r2.key); + } else { + console.log('value bla does not exist on key ' + r2.key); + } + } + + }); +}); + +// create new key or no-op +r3.create(function (err) { + + if (!err) { + console.log('key created'); + } + + // clear subkeys of key and values on key + r3.clear(function (err) { + + if (!err) { + console.log('key cleared'); + } + + // remove this key and all its subkeys + r3.destroy(function (err) { + + if (!err) { + console.log('key destroyed'); + } + + }); + }); +}); diff --git a/winreg/winreg.d.ts b/winreg/winreg.d.ts index 0b23f6981d..3860bc237b 100644 --- a/winreg/winreg.d.ts +++ b/winreg/winreg.d.ts @@ -1,44 +1,60 @@ -// Type definitions for Winreg v0.0.16 -// Project: https://github.com/fresc81/node-winreg/ -// Definitions by: RX14 +// Type definitions for Winreg v1.2.0 +// Project: http://fresc81.github.io/node-winreg/ +// Definitions by: RX14 , BobBuehler // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare var Winreg: WinregStatic; interface WinregStatic { /** - * Create a new Winreg instance with the given options. - * @param options options object + * Creates a registry object, which provides access to a single registry key. + * Note: This class is returned by a call to ```require('winreg')```. + * + * @public + * @class + * + * @param {@link Options} options - the options + * + * @example + * var Registry = require('winreg') + * , autoStartCurrentUser = new Registry({ + * hive: Registry.HKCU, + * key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' + * }); */ - new (options: Winreg.Options): Winreg; + new (options: Winreg.Options): Winreg.Registry; /** - * HKEY_LOCAL_MACHINE registry hive. + * Registry hive key HKEY_LOCAL_MACHINE. + * Note: For writing to this hive your program has to run with admin privileges. */ HKLM: string; /** - * HKEY_CURRENT_USER registry hive. + * Registry hive key HKEY_CURRENT_USER. */ HKCU: string; /** - * HKEY_CLASSES_ROOT registry hive. + * Registry hive key HKEY_CLASSES_ROOT. + * Note: For writing to this hive your program has to run with admin privileges. */ HKCR: string; /** - * HKEY_USERS registry hive. + * Registry hive key HKEY_USERS. + * Note: For writing to this hive your program has to run with admin privileges. */ HKU: string; /** - * HKEY_CURRENT_CONFIG registry hive. + * Registry hive key HKEY_CURRENT_CONFIG. + * Note: For writing to this hive your program has to run with admin privileges. */ HKCC: string; /** - * Array of available registry hives. + * Collection of available registry hive keys. */ HIVES: Array; @@ -92,101 +108,14 @@ interface WinregStatic { REG_NONE: string; /** - * Array of available registry value types. + * Collection of available registry value types. */ REG_TYPES: Array; -} - -interface Winreg { - /** - * Hostname, if set in options. - * @readonly - */ - host: string; /** - * Hive ID. - * @readonly + * The name of the default value. May be used instead of the empty string literal for better readability. */ - hive: string; - - /** - * The registry key. - * @readonly - */ - key: string; - - /** - * The path of the registry key, including hostname (if set) and hive. - * @readonly - */ - path: string; - - /** - * Architecture this key belongs to. - * @readonly - */ - arch: string; - - /** - * A new Winreg instance of the parent key. - * @readonly - */ - parent: Winreg; - - /** - * Retrieves all values from this registry key. - * - * @param cb Callback with an array of RegistryItem objects, one for each value. - */ - values(cb: (err: Error, result: Array) => void): void; - - /** - * Retrieves all subkeys of this registry key. - * - * @param cb Callback with an array of Winreg objects, one for each subkey. - */ - keys(cb: (err: Error, result: Array) => void): void; - - /** - * Retrieves a named value from this registry key. - * - * @param name Name of the value to retrieve. - * @param cb Callback with a RegistryItem object for the value. - */ - get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): void; - - /** - * Sets a named value in this registry key. Overwrites existing value. - * - * @param name Name of the value to set. - * @param type Type of the value to set. - * @param value Value of value to set. - * @param cb Callback with any errors. - */ - set(name: string, type: string, value: string, cb: (err: Error) => void): void; - - /** - * Remove a named value from this registry key. - * - * @param name Name of the value to remove. - * @param cb Callback with any errors. - */ - remove(name: string, cb: (err: Error) => void): void; - - /** - * Create this registry key. - * - * @param cb Callback with any errors. - */ - create(cb: (err: Error) => void): void; - - /** - * Erase this registry key and its contents. - * - * @param cb Callback with any errors. - */ - erase(cb: (err: Error) => void): void; + DEFAULT_VALUE: string; } declare namespace Winreg { @@ -207,53 +136,197 @@ declare namespace Winreg { key?: string; /** - * Optional architecture of the registry. + * Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems). */ arch?: string; } /** - * A single registry value record + * A registry object, which provides access to a single registry key. */ - interface RegistryItem { + export interface Registry { /** - * Hostname, if set in options. + * The hostname. * @readonly */ host: string; /** - * Hive ID. + * The hive id. * @readonly */ hive: string; /** - * Key that the registry value belongs to. + * The registry key name. * @readonly */ key: string; /** - * Name of the registry value. + * The full path to the registry key. + * @readonly + */ + path: string; + + /** + * The registry hive architecture ('x86' or 'x64'). + * @readonly + */ + arch: string; + + /** + * Creates a new {@link Registry} instance that points to the parent registry key. + * @readonly + */ + parent: Registry; + + /** + * Retrieve all values from this registry key. + * @param {valuesCallback} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link RegistryItem} objects + * @returns {Registry} this registry key object + */ + values(cb: (err: Error, result: Array) => void): Registry; + + /** + * Retrieve all subkeys from this registry key. + * @param {function (err, items)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link Registry} objects + * @returns {Registry} this registry key object + */ + keys(cb: (err: Error, result: Array) => void): Registry; + + /** + * Gets a named value from this registry key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, item)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {RegistryItem=} cb.item - the retrieved registry item + * @returns {Registry} this registry key object + */ + get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry; + + /** + * Sets a named value in this registry key, overwriting an already existing value. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {string} type - the value type + * @param {string} value - the value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + set(name: string, type: string, value: string, cb: (err: Error) => void): Registry; + + /** + * Remove a named value from this registry key. If name is empty, sets the default value of this key. + * Note: This key must be already existing. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + remove(name: string, cb: (err: Error) => void): Registry; + + /** + * Remove all subkeys and values (including the default value) from this registry key. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + clear(cb: (err: Error) => void): Registry; + + /** + * Alias for the clear method to keep it backward compatible. + * @method + * @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + erase(cb: (err: Error) => void): Registry; + + /** + * Delete this key and all subkeys from the registry. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + destroy(cb: (err: Error) => void): Registry; + + /** + * Create this registry key. Note that this is a no-op if the key already exists. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + create(cb: (err: Error) => void): Registry; + + /** + * Checks if this key already exists. + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a registry key with this name already exists + * @returns {Registry} this registry key object + */ + keyExists(cb: (err: Error, exists: boolean) => void): Registry; + + /** + * Checks if a value with the given name already exists within this key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a value with the given name was found in this key + * @returns {Registry} this registry key object + */ + valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry; + } + + /** + * A single registry value record. + * Objects of this type are created internally and returned by methods of {@link Registry} objects. + */ + export interface RegistryItem { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key. + * @readonly + */ + key: string; + + /** + * The value name. * @readonly */ name: string; /** - * Type of the registry value. + * The value type. * @readonly */ type: string; /** - * Value of the registry value, as a string. + * The value. * @readonly */ value: string; /** - * Architecture this value belongs to. + * The hive architecture. * @readonly */ arch: string; From 6b44986641be59099a97ffae2855fa7b0530ae95 Mon Sep 17 00:00:00 2001 From: huyph Date: Fri, 6 May 2016 03:10:13 +1000 Subject: [PATCH 0198/1506] Correct AmPieChart typings (#9193) * Correct AmPieChart typings AmPieChart should inherit from AmChart (as mentioned in the AmChart website: https://docs.amcharts.com/javascriptcharts/AmPieChart) * Removed the duplicate addListener AmChart class should already have description for 'addListener' --- amcharts/AmCharts.d.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/amcharts/AmCharts.d.ts b/amcharts/AmCharts.d.ts index a54ed5d515..543467feac 100644 --- a/amcharts/AmCharts.d.ts +++ b/amcharts/AmCharts.d.ts @@ -36,7 +36,7 @@ declare namespace AmCharts { chart.dataProvider = chartData; chart.write("chartdiv"); */ - class AmPieChart { + class AmPieChart extends AmChart { /** Name of the field in chart's dataProvider which holds slice's alpha. */ alphaField: string; /** Pie lean angle (for 3D effect). Valid range is 0 - 90. */ @@ -187,19 +187,6 @@ declare namespace AmCharts { rollOverSlice(index: number); /** Shows slice. index - the number of a slice or Slice object. */ showSlice(index: number); - - /** Adds event listener of the type "clickSlice" or "pullInSlice" or "pullOutSlice" to the object. - @param type Always "clickSlice" or "pullInSlice" or "pullOutSlice". - @param handler - If the type is "clickSlice", dispatched when user clicks on a slice. - If the type is "pullInSlice", dispatched when user clicks on a slice and the slice is pulled-in. - If the type is "pullOutSlice", dispatched when user clicks on a slice and the slice is pulled-out. - If the type is "rollOutSlice", dispatched when user rolls-out of the slice. - If the type is "rollOverSlice", dispatched when user rolls-over the slice. - */ - addListener(type: string, handler: (e: {/** Always "rollOverSlice". */ - type: string; dataItem: Slice; - }) => void ); } /** AmRadarChart is the class you have to use for radar and polar chart types. From 716ab1bdda7609c2854921e2a477160c28d27c19 Mon Sep 17 00:00:00 2001 From: Leon Yu Date: Thu, 5 May 2016 13:14:33 -0400 Subject: [PATCH 0199/1506] Fix isomorphic-fetch module setup (#9144) --- isomorphic-fetch/isomorphic-fetch-tests.ts | 96 +++++++++++++++++++++- isomorphic-fetch/isomorphic-fetch.d.ts | 8 +- 2 files changed, 98 insertions(+), 6 deletions(-) diff --git a/isomorphic-fetch/isomorphic-fetch-tests.ts b/isomorphic-fetch/isomorphic-fetch-tests.ts index 3235912ac1..ddf11f84fe 100644 --- a/isomorphic-fetch/isomorphic-fetch-tests.ts +++ b/isomorphic-fetch/isomorphic-fetch-tests.ts @@ -1,6 +1,9 @@ /// -function test_isomorphicFetchTestCases() { +import fetchImportedViaCommonJS = require('isomorphic-fetch'); +import * as fetchImportedViaES6Module from 'isomorphic-fetch'; + +function test_isomorphicFetchTestCases_ambient() { expectSuccess(fetch('http://localhost:3000/good'), 'Good response'); fetch('http://localhost:3000/bad') @@ -11,7 +14,30 @@ function test_isomorphicFetchTestCases() { }); } -function test_whatwgTestCases() { +function test_isomorphicFetchTestCases_commonjs() { + expectSuccess(fetchImportedViaCommonJS('http://localhost:3000/good'), 'Good response'); + + fetchImportedViaCommonJS('http://localhost:3000/bad') + .then((response: IResponse) => { + return response.text(); + }) + .catch((err) => { + }); +} + +function test_isomorphicFetchTestCases_es6() { + expectSuccess(fetchImportedViaES6Module('http://localhost:3000/good'), 'Good response'); + + fetchImportedViaES6Module('http://localhost:3000/bad') + .then((response: IResponse) => { + return response.text(); + }) + .catch((err) => { + }); +} + + +function test_whatwgTestCases_ambient() { var headers = new Headers(); headers.append("Content-Type", "application/json"); var requestOptions: RequestInit = { @@ -43,6 +69,72 @@ function test_whatwgTestCases() { expectSuccess(fetch(request), 'Post response:'); } + +function test_whatwgTestCases_commonjs() { + var headers = new Headers(); + headers.append("Content-Type", "application/json"); + var requestOptions: RequestInit = { + method: "POST", + headers: headers, + mode: 'same-origin', + credentials: 'omit', + cache: 'default' + }; + + expectSuccess(fetchImportedViaCommonJS('http://localhost:3000/poster', requestOptions), 'Post response:'); + + var requestOptions: RequestInit = { + method: "POST", + headers: { + 'Content-Type': 'application/json' + } + }; + + expectSuccess(fetchImportedViaCommonJS('http://localhost:3000/poster', requestOptions), 'Post response:'); + + var requestOptions: RequestInit = { + method: "POST", + headers: { + 'Content-Type': 'application/json' + } + }; + var request: Request = new Request('http://localhost:3000/poster', requestOptions); + + expectSuccess(fetchImportedViaCommonJS(request), 'Post response:'); +} + +function test_whatwgTestCases_es6() { + var headers = new Headers(); + headers.append("Content-Type", "application/json"); + var requestOptions: RequestInit = { + method: "POST", + headers: headers, + mode: 'same-origin', + credentials: 'omit', + cache: 'default' + }; + + expectSuccess(fetchImportedViaES6Module('http://localhost:3000/poster', requestOptions), 'Post response:'); + + var requestOptions: RequestInit = { + method: "POST", + headers: { + 'Content-Type': 'application/json' + } + }; + + expectSuccess(fetchImportedViaES6Module('http://localhost:3000/poster', requestOptions), 'Post response:'); + + var requestOptions: RequestInit = { + method: "POST", + headers: { + 'Content-Type': 'application/json' + } + }; + var request: Request = new Request('http://localhost:3000/poster', requestOptions); + + expectSuccess(fetchImportedViaES6Module(request), 'Post response:'); +} function expectSuccess(promise: Promise, responseText: string) { promise.then((response: IResponse) => { diff --git a/isomorphic-fetch/isomorphic-fetch.d.ts b/isomorphic-fetch/isomorphic-fetch.d.ts index 824c8a8ae0..0edbe24afb 100644 --- a/isomorphic-fetch/isomorphic-fetch.d.ts +++ b/isomorphic-fetch/isomorphic-fetch.d.ts @@ -112,8 +112,8 @@ interface IFetchStatic { (url: string | IRequest, init?: RequestInit): Promise; } -declare module "isomorphic-fetch" { - export default IFetchStatic; -} - declare var fetch: IFetchStatic; + +declare module "isomorphic-fetch" { + export = fetch; +} From 77664bdf013d68a0798116721aa1991542eef169 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Thu, 5 May 2016 19:14:44 +0200 Subject: [PATCH 0200/1506] Update to Electron 0.37.8 - forgotten header (#9169) --- github-electron/github-electron.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index 131a0a425a..dfcff3d83c 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Electron v0.37.7 +// Type definitions for Electron v0.37.8 // Project: http://electron.atom.io/ // Definitions by: jedmao , rhysd , Milan Burda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 1e5bb9f454be744f9447860b6109c14246f09107 Mon Sep 17 00:00:00 2001 From: Rajab Shakirov Date: Thu, 5 May 2016 20:15:56 +0300 Subject: [PATCH 0201/1506] add initial typing for react-datepicker (#9188) * add initial typing for react-datepicker * add any for props --- react-datepicker/react-datepicker-tests.tsx | 34 ++++++++++++++++ react-datepicker/react-datepicker.d.ts | 45 +++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 react-datepicker/react-datepicker-tests.tsx create mode 100644 react-datepicker/react-datepicker.d.ts diff --git a/react-datepicker/react-datepicker-tests.tsx b/react-datepicker/react-datepicker-tests.tsx new file mode 100644 index 0000000000..6858e04335 --- /dev/null +++ b/react-datepicker/react-datepicker-tests.tsx @@ -0,0 +1,34 @@ +/// +/// +/// + +import * as React from "react"; +import * as moment from 'moment'; +import * as DatePicker from 'react-datepicker'; + +class ReactDatePicker extends React.Component<{}, {startDate:any,displayName:string}> { + constructor(props:any) { + super(); + this.state = { + startDate: moment(), + displayName: 'Example' + } + this.handleChange = this.handleChange.bind(this); + } + + handleChange = function(date?:any) { + this.setState({ + startDate: date + }); + } + + render(){ + return ( +
+ +
+ ); + } +}; \ No newline at end of file diff --git a/react-datepicker/react-datepicker.d.ts b/react-datepicker/react-datepicker.d.ts new file mode 100644 index 0000000000..d987d26f1b --- /dev/null +++ b/react-datepicker/react-datepicker.d.ts @@ -0,0 +1,45 @@ +// Type definitions for react-datepicker v0.27.0 +// Project: https://github.com/Hacker0x01/react-datepicker +// Definitions by: Rajab Shakirov , Andrey Balokha +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-datepicker" { + interface ReactDatePicker { + className?: string; + dateFormat?: string; + dateFormatCalendar?: string; + disabled?: boolean; + endDate?: {}; + excludeDates?: any[]; + filterDate?():any; + id?: string; + includeDates?: any[]; + isClearable?: boolean; + locale?: string; + maxDate?: {}; + minDate?: {}; + name?: string; + onBlur?():any; + onChange():any; + onChange(date?:any):any; + onFocus?():any; + placeholderText?: string; + popoverAttachment?: string; + popoverTargetAttachment?: string; + popoverTargetOffset?: string; + readOnly?: boolean; + renderCalendarTo?: any; + required?: boolean; + selected?: {}; + showYearDropdown?: boolean; + startDate?: {}; + tabIndex?: number; + tetherConstraints?: any[]; + title?: string; + todayButton?: string; + } + let ReactDatePicker: __React.ClassicComponentClass; + export = ReactDatePicker; +} \ No newline at end of file From 0a00f6e409cd505efb7ebfef7fc18d6257a221b9 Mon Sep 17 00:00:00 2001 From: Tijmen van der Burgt Date: Thu, 5 May 2016 19:28:00 +0200 Subject: [PATCH 0202/1506] Update typings for oidc-token-manager (#9137) --- oidc-token-manager/oidc-token-manager.d.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/oidc-token-manager/oidc-token-manager.d.ts b/oidc-token-manager/oidc-token-manager.d.ts index 0b982db33d..dd5fd679dd 100644 --- a/oidc-token-manager/oidc-token-manager.d.ts +++ b/oidc-token-manager/oidc-token-manager.d.ts @@ -50,8 +50,9 @@ declare namespace Oidc { } interface OidcTokenManagerSettings { + load_user_profile?: boolean; persist?: boolean; - store?: any; + store?: Storage; persistKey?: string; client_id?: string; redirect_uri?: string; @@ -62,6 +63,14 @@ declare namespace Oidc { popup_redirect_uri?: string; silent_redirect_uri?: string; silent_renew?: boolean; + request_state_store?: Storage; + request_state_key?: string; + metadata?: any; + authorization_endpoint?: string; + jwks_uri?: string; + jwks?: any; + userinfo_endpoint?: string; + end_session_endpoint?: string; } interface PopupSettings { @@ -106,8 +115,8 @@ declare namespace Oidc { addOnTokenExpired(cb: () => void): void; addOnSilentTokenRenewFailed(cb: () => void): void; removeToken(): void; - redirectForToken(): void; - redirectForLogout(): void; + redirectForToken(): DefaultPromise; + redirectForLogout(): DefaultPromise; processTokenCallbackAsync(queryString?: string): DefaultPromise; renewTokenSilentAsync(): DefaultPromise; processTokenCallbackSilent(hash?: string): void; From b8948c7009ae9af08bc2be3ef6b50d4f9a0019ad Mon Sep 17 00:00:00 2001 From: Leon Yu Date: Thu, 5 May 2016 13:29:21 -0400 Subject: [PATCH 0203/1506] fs.mkdtemp and fs.mkdtempSync (#9197) --- node/node-tests.ts | 7 +++++++ node/node.d.ts | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/node/node-tests.ts b/node/node-tests.ts index cc39926ca3..603fb7719c 100644 --- a/node/node-tests.ts +++ b/node/node-tests.ts @@ -129,6 +129,13 @@ fs.readFile('testfile', (err, data) => { } }); +fs.mkdtemp('/tmp/foo-', (err, folder) => { + console.log(folder); + // Prints: /tmp/foo-itXde2 +}); + +var tempDir: string; +tempDir = fs.mkdtempSync('/tmp/foo-'); /////////////////////////////////////////////////////// /// Buffer tests : https://nodejs.org/api/buffer.html diff --git a/node/node.d.ts b/node/node.d.ts index 47b4b4d967..184bd02a78 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -1489,6 +1489,20 @@ declare module "fs" { * @param callback No arguments other than a possible exception are given to the completion callback. */ export function mkdirSync(path: string, mode?: string): void; + /* + * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param prefix + * @param callback The created folder path is passed as a string to the callback's second parameter. + */ + export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; + /* + * Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param prefix + * @returns Returns the created folder path. + */ + export function mkdtempSync(prefix: string): string; export function readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; export function readdirSync(path: string): string[]; export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; From 2eaeb872aa33a5f90215ca02d467be7286e741a7 Mon Sep 17 00:00:00 2001 From: t_ Date: Fri, 6 May 2016 02:33:16 +0900 Subject: [PATCH 0204/1506] update ISelection in atom/atom.d.ts (#9198) --- atom/atom.d.ts | 179 ++++++++++++++++++++++++++++--------------------- 1 file changed, 104 insertions(+), 75 deletions(-) diff --git a/atom/atom.d.ts b/atom/atom.d.ts index 31fa76eb4a..389d6ef16e 100644 --- a/atom/atom.d.ts +++ b/atom/atom.d.ts @@ -456,82 +456,111 @@ declare namespace AtomCore { // TBD } - interface ISelection /* extends Theorist.Model */ { - cursor:ICursor; - marker:IDisplayBufferMarker; - editor:IEditor; - initialScreenRange:any; - wordwise:boolean; - needsAutoscroll:boolean; - retainSelection:boolean; - subscriptionCounts:any; + interface ISelection { + // https://atom.io/docs/api/v1.7.3/Selection - destroy():any; - finalize():any; - clearAutoscroll():any; - isEmpty():boolean; - isReversed():boolean; - isSingleScreenLine():boolean; - getScreenRange():TextBuffer.IRange; - setScreenRange(screenRange:any, options:any):any; - getBufferRange():TextBuffer.IRange; - setBufferRange(bufferRange:any, options:any):any; - getBufferRowRange():number[]; - autoscroll():void; - getText():string; - clear():boolean; - selectWord():TextBuffer.IRange; - expandOverWord():any; - selectLine(row?:any):TextBuffer.IRange; - expandOverLine():boolean; - selectToScreenPosition(position:any):any; - selectToBufferPosition(position:any):any; - selectRight():boolean; - selectLeft():boolean; - selectUp(rowCount?:any):boolean; - selectDown(rowCount?:any):boolean; - selectToTop():any; - selectToBottom():any; - selectAll():any; - selectToBeginningOfLine():any; - selectToFirstCharacterOfLine():any; - selectToEndOfLine():any; - selectToBeginningOfWord():any; - selectToEndOfWord():any; - selectToBeginningOfNextWord():any; - selectToPreviousWordBoundary():any; - selectToNextWordBoundary():any; - addSelectionBelow():any; - getGoalBufferRange():any; - addSelectionAbove():any[]; - insertText(text:string, options?:any):any; - normalizeIndents(text:string, indentBasis:number):any; - indent(_arg?:any):any; - indentSelectedRows():TextBuffer.IRange[]; - setIndentationForLine(line:string, indentLevel:number):any; - backspace():any; - backspaceToBeginningOfWord():any; - backspaceToBeginningOfLine():any; - delete():any; - deleteToEndOfWord():any; - deleteSelectedText():any; - deleteLine():any; - joinLines():any; - outdentSelectedRows():any[]; - autoIndentSelectedRows():any; - toggleLineComments():any; - cutToEndOfLine(maintainClipboard:any):any; - cut(maintainClipboard:any):any; - copy(maintainClipboard:any):any; - fold():any; - modifySelection(fn:()=>any):any; - plantTail():any; - intersectsBufferRange(bufferRange:any):any; - intersectsWith(otherSelection:any):any; - merge(otherSelection:any, options:any):any; - compare(otherSelection:any):any; - getRegionRects():any[]; - screenRangeChanged():any; + // Event Subscription + onDidChangeRange(callback: (event: { + oldBufferRange: TextBuffer.IRange; + oldScreenRange: TextBuffer.IRange; + newBufferRange: TextBuffer.IRange; + newScreenRange: TextBuffer.IRange; + selection: ISelection; + }) => {}): Disposable; + onDidDestroy(callback: () => {}): Disposable; + + // Managing the selection range + getScreenRange(): TextBuffer.IRange; + setScreenRange(screenRange: TextBuffer.IRange, options?: { + preserveFolds?: boolean; + autoscroll?: boolean; + }): void; + getBufferRange(): TextBuffer.IRange; + setBufferRange(bufferRange: TextBuffer.IRange, options?: { + preserveFolds?: boolean; + autoscroll?: boolean; + }): void; + getBufferRowRange(): [number]; + + // Info about the selection + isEmpty(): boolean; + isReversed(): boolean; + isSingleScreenLine(): boolean; + getText(): string; + intersectsBufferRange(bufferRange: TextBuffer.IRange): boolean; + intersectsWith(otherSelection: ISelection): boolean; + + // Modifying the selected range + clear(options?: {autoscroll?: boolean}): void; + selectToScreenPosition(position: any): void; + selectToBufferPosition(position: any): void; + selectRight(columnCount?: number): void; + selectLeft(columnCount?: number): void; + selectUp(rowCount: number): void; + selectDown(rowCount: number): void; + selectToTop(): void; + selectToBottom(): void; + selectAll(): void; + selectToBeginningOfLine(): void; + selectToFirstCharacterOfLine(): void; + selectToEndOfLine(): void; + selectToEndOfBufferLine(): void; + selectToBeginningOfWord(): void; + selectToEndOfWord(): void; + selectToBeginningOfNextWord(): void; + selectToPreviousWordBoundary(): void; + selectToNextWordBoundary(): void; + selectToPreviousSubwordBoundary(): void; + selectToNextSubwordBoundary(): void; + selectToBeginningOfNextParagraph(): void; + selectToBeginningOfPreviousParagraph(): void; + selectWord(): TextBuffer.IRange; + expandOverWord(): void; + selectLine(row?: number): void; + expandOverLine(): void; + + // Modifying the selected text + insertText(text: string, options?: { + select: boolean; + autoIndent: boolean; + autoIndentNewline: boolean; + autoDecreaseIndent: boolean; + normalizeLineEndings?: boolean; + undo?: 'skip'; + }): void; + backspace(): void; + deleteToPreviousWordBoundary(): void; + deleteToNextWordBoundary(): void; + deleteToBeginningOfWord(): void; + deleteToBeginningOfLine(): void; + delete(): void; + deleteToEndOfLine(): void; + deleteToEndOfWord(): void; + deleteToBeginningOfSubword(): void; + deleteToEndOfSubword(): void; + deleteSelectedText(): void; + deleteLine(): void; + joinLines(): void; + outdentSelectedRows(): void; + autoIndentSelectedRows(): void; + toggleLineComments(): void; + cutToEndOfLine(): void; + cutToEndOfBufferLine(): void; + cut(maintainClipboard?: boolean, fullLine?: boolean): void; + copy(maintainClipboard?: boolean, fullLine?: boolean): void; + fold(): void; + indentSelectedRows(): void; + + // Managing multiple selections + addSelectionBelow(): void; + addSelectionAbove(): void; + merge(otherSelection: ISelection, options?: { + preserveFolds?: boolean; + autoscroll?: boolean; + }): void; + + // Comparing to other selections + compare(otherSelection: ISelection): any; } interface IDecorationParams { From 51baa79eadae0ec91bb350a68910b640906bb2ca Mon Sep 17 00:00:00 2001 From: Andrew Fong Date: Thu, 5 May 2016 10:33:40 -0700 Subject: [PATCH 0205/1506] Add exportChartLocal function for HighCharts (#9194) --- highcharts/highcharts-tests.ts | 1 + highcharts/highcharts.d.ts | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/highcharts/highcharts-tests.ts b/highcharts/highcharts-tests.ts index ad57f8bc4c..499dfc9494 100644 --- a/highcharts/highcharts-tests.ts +++ b/highcharts/highcharts-tests.ts @@ -2187,6 +2187,7 @@ function test_ChartObject() { chart.destroy(); chart.drillUp(); chart.exportChart({}, {}); + chart.exportChartLocal({}, {}); var object = chart.get('axisIdOrSeriesIdOrPointId'); var svg1 = chart.getSVG(); var svg2 = chart.getSVG({}); diff --git a/highcharts/highcharts.d.ts b/highcharts/highcharts.d.ts index 16151be327..c7584f4e0d 100644 --- a/highcharts/highcharts.d.ts +++ b/highcharts/highcharts.d.ts @@ -5681,6 +5681,30 @@ interface HighchartsChartObject { * @since 2.0 */ exportChart(options: HighchartsExportingOptions, chartOptions: HighchartsOptions): void; + /** + * Export the chart to a PNG or SVG without sending it to a server. Requires + * modules/exporting.js and modules/offline-exporting.js. + * @since 2.0 + */ + exportChartLocal(): void; + /** + * Export the chart to a PNG or SVG without sending it to a server. Requires + * modules/exporting.js and modules/offline-exporting.js. + * @param {HighchartsExportingOptions} options Exporting options. Same as + * the exportChart params. + * @since 2.0 + */ + exportChartLocal(options: HighchartsExportingOptions): void; + /** + * Export the chart to a PNG or SVG without sending it to a server. + * Requires modules/exporting.js and modules/offline-exporting.js. + * @param {HighchartsExportingOptions} options Exporting options. Same as + * the exportChart params. + * @param {HighchartsOptions} chartOptions Additional chart options for the + * exported chart. Same as the exportChart params. + * @since 2.0 + */ + exportChartLocal(options: HighchartsExportingOptions, chartOptions: HighchartsOptions): void; /** * Get an axis, series or point by its id as given in the configuration options. * @param {string} id The id of the axis, series or point to get. From 347d4d7614e2d9ff16009958c26b569a791086a9 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 5 May 2016 19:36:17 +0200 Subject: [PATCH 0206/1506] Update jsonwebtoken typings for 6.2.0 (#9200) * Update SignCallback for jsonwebtoken 6.0 compat * Update whole definition for jsonwebtoken 6.2.0 * Update signature for jwt.sign() in tests * Change type of error callback param --- jsonwebtoken/jsonwebtoken-tests.ts | 2 +- jsonwebtoken/jsonwebtoken.d.ts | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/jsonwebtoken/jsonwebtoken-tests.ts b/jsonwebtoken/jsonwebtoken-tests.ts index d7ac4c8e2b..44a39dfedb 100644 --- a/jsonwebtoken/jsonwebtoken-tests.ts +++ b/jsonwebtoken/jsonwebtoken-tests.ts @@ -25,7 +25,7 @@ cert = fs.readFileSync('private.key'); // get private key token = jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256'}); // sign asynchronously -jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256' }, function(token: string) { +jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256' }, function(err: Error, token: string) { console.log(token); }); diff --git a/jsonwebtoken/jsonwebtoken.d.ts b/jsonwebtoken/jsonwebtoken.d.ts index bddb01226b..888ac75d6f 100644 --- a/jsonwebtoken/jsonwebtoken.d.ts +++ b/jsonwebtoken/jsonwebtoken.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsonwebtoken 5.7.0 +// Type definitions for jsonwebtoken 6.2.0 // Project: https://github.com/auth0/node-jsonwebtoken // Definitions by: Maxime LUCE , Daniel Heim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -22,11 +22,6 @@ declare module "jsonwebtoken" { * - none: No digital signature or MAC value included */ algorithm?: string; - /** - *@deprecated - see expiresIn - *@member {number} - Lifetime for the token in minutes - */ - expiresInMinutes?: number; /** @member {string} - Lifetime for the token expressed in a string describing a time span [rauchg/ms](https://github.com/rauchg/ms.js). Eg: `60`, `"2 days"`, `"10h"`, `"7d"` */ expiresIn?: string; notBefore?: string; @@ -35,7 +30,7 @@ declare module "jsonwebtoken" { issuer?: string; jwtid?: string; noTimestamp?: boolean; - headers?: Object; + header?: Object; } export interface VerifyOptions { @@ -62,7 +57,7 @@ declare module "jsonwebtoken" { } export interface SignCallback { - (encoded: string): void; + (err: Error, encoded: string): void; } /** From 30f28ebb7da70942aca93c3ba5b10a02cd1f20b0 Mon Sep 17 00:00:00 2001 From: Olivier Adam Date: Thu, 5 May 2016 19:45:32 +0200 Subject: [PATCH 0207/1506] Make nunjucks typings usable without AMD (#9201) The existing typings were only usable when using modules. Using the global `nunjucks` variable was not possible. I used `js-yaml/js-yaml.d.ts` as an example of a typing that was usable both as a module and as a global variable. The indentation of the whole file was changed because the base indentation used to be 2 (namespace inside module) and is now 1. The existing test is working as is. --- nunjucks/nunjucks.d.ts | 254 ++++++++++++++++++++--------------------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/nunjucks/nunjucks.d.ts b/nunjucks/nunjucks.d.ts index f6c059128f..6a6d384d87 100644 --- a/nunjucks/nunjucks.d.ts +++ b/nunjucks/nunjucks.d.ts @@ -3,131 +3,131 @@ // Definitions by: Ruben Slabbert // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare namespace nunjucks { + export function render(name: string, context?: Object): string; + export function render(name: string, context?: Object, callback?: (err: any, res: string) => any): void; + + export function renderString(src: string, context: Object): string; + export function renderString(src: string, context: Object, callback?: (err: any, res: string) => any): void; + + export function compile(src: string, env?: Environment): Template; + export function compile(src: string, env?: Environment, callback?: (err: any, res: Template) => any): Template; + + export function precompile(path: string, opts?: PrecompileOptions): string; + export function precompileString(src: string, opts?: PrecompileOptions): string; + + export interface PrecompileOptions { + name?: string; + asFunction?: boolean; + force?: boolean; + env?: Environment; + include?: string[]; + exclude?: string[]; + wrapper?(templates: { name: string, template: string }, opts: PrecompileOptions): string; + } + + export class Template { + constructor(src: string, env?: Environment, eagerCompile?: boolean); + render(context?: Object): string; + render(context?: Object, callback?: (err: any, res: string) => any): void; + } + + export function configure(options: ConfigureOptions): Environment; + export function configure(path: string, options?: ConfigureOptions): Environment; + + export interface ConfigureOptions { + autoescape?: boolean; + throwOnUndefined?: boolean; + trimBlocks?: boolean; + lstripBlocks?: boolean; + watch?: boolean; + noCache?: boolean; + web?: { + useCache?: boolean, + async?: boolean + }; + express?: Object; + tags?: { + blockStart?: string, + blockEnd?: string, + variableStart?: string, + variableEnd?: string, + commentStart?: string, + commentEnd?: string + }; + } + + export class Environment { + options: { + autoescape: boolean; + }; + + constructor(loader: ILoader, opts?: ConfigureOptions); + constructor(loaders: ILoader[], opts?: ConfigureOptions); + + render(name: string, context?: Object): string; + render(name: string, context?: Object, callback?: (err: any, res: string) => any): void; + + renderString(name: string, context: Object): string; + renderString(name: string, context: Object, callback?: (err: any, res: string) => any): void; + + addFilter(name: string, func: (...args: any[]) => any, async?: boolean): void; + getFilter(name: string): void; + + addExtension(name: string, ext: Extension): void; + removeExtension(name: string): void; + getExtension(name: string): Extension; + hasExtension(name: string): void; + + addGlobal(name: string, value: any): void; + + getTemplate(name: string, eagerCompile?: boolean): Template; + getTemplate(name: string, eagerCompile?: boolean, callback?: (err: any, templ: Template) => Template): void; + + express(app: Object): void; + } + + export interface Extension { + tags: string[]; + // Parser API is undocumented it is suggested to check the source: https://github.com/mozilla/nunjucks/blob/master/src/parser.js + parse(parser: any, nodes: any, lexer: any): any; + } + + export function installJinjaCompat(): void; + + export interface ILoader { + async?: boolean; + getSource(name: string): LoaderSource; + extend?(extender: ILoader): ILoader; + } + + // Needs both Loader and ILoader since nunjucks uses a custom object system + // Object system is also responsible for the extend methods + export class Loader { + on(name: string, func: (...args: any[]) => any): void; + emit(name: string, ...args: any[]): void; + resolve(from: string, to: string): string; + isRelative(filename: string): boolean; + extend(toExtend: ILoader): ILoader; + } + + export interface LoaderSource { + src: string; + path: string; + noCache: boolean; + } + + export class FileSystemLoader extends Loader implements ILoader { + init(searchPaths: string[], opts: any): void; + getSource(name: string): LoaderSource; + } + + export class PrecompiledLoader extends Loader implements ILoader { + init(searchPaths: string[], opts: any): void; + getSource(name: string): LoaderSource; + } +} + declare module "nunjucks" { - namespace Nunjucks { - function render(name: string, context?: Object): string; - function render(name: string, context?: Object, callback?: (err: any, res: string) => any): void; - - function renderString(src: string, context: Object): string; - function renderString(src: string, context: Object, callback?: (err: any, res: string) => any): void; - - function compile(src: string, env?: Environment): Template; - function compile(src: string, env?: Environment, callback?: (err: any, res: Template) => any): Template; - - function precompile(path: string, opts?: PrecompileOptions): string; - function precompileString(src: string, opts?: PrecompileOptions): string; - - interface PrecompileOptions { - name?: string; - asFunction?: boolean; - force?: boolean; - env?: Environment; - include?: string[]; - exclude?: string[]; - wrapper?(templates: { name: string, template: string }, opts: PrecompileOptions): string; - } - - class Template { - constructor(src: string, env?: Environment, eagerCompile?: boolean); - render(context?: Object): string; - render(context?: Object, callback?: (err: any, res: string) => any): void; - } - - function configure(options: ConfigureOptions): Environment; - function configure(path: string, options?: ConfigureOptions): Environment; - - interface ConfigureOptions { - autoescape?: boolean; - throwOnUndefined?: boolean; - trimBlocks?: boolean; - lstripBlocks?: boolean; - watch?: boolean; - noCache?: boolean; - web?: { - useCache?: boolean, - async?: boolean - }; - express?: Object; - tags?: { - blockStart?: string, - blockEnd?: string, - variableStart?: string, - variableEnd?: string, - commentStart?: string, - commentEnd?: string - }; - } - - class Environment { - options: { - autoescape: boolean; - }; - - constructor(loader: ILoader, opts?: ConfigureOptions); - constructor(loaders: ILoader[], opts?: ConfigureOptions); - - render(name: string, context?: Object): string; - render(name: string, context?: Object, callback?: (err: any, res: string) => any): void; - - renderString(name: string, context: Object): string; - renderString(name: string, context: Object, callback?: (err: any, res: string) => any): void; - - addFilter(name: string, func: (...args: any[]) => any, async?: boolean): void; - getFilter(name: string): void; - - addExtension(name: string, ext: Extension): void; - removeExtension(name: string): void; - getExtension(name: string): Extension; - hasExtension(name: string): void; - - addGlobal(name: string, value: any): void; - - getTemplate(name: string, eagerCompile?: boolean): Template; - getTemplate(name: string, eagerCompile?: boolean, callback?: (err: any, templ: Template) => Template): void; - - express(app: Object): void; - } - - interface Extension { - tags: string[]; - // Parser API is undocumented it is suggested to check the source: https://github.com/mozilla/nunjucks/blob/master/src/parser.js - parse(parser: any, nodes: any, lexer: any): any; - } - - function installJinjaCompat(): void; - - interface ILoader { - async?: boolean; - getSource(name: string): LoaderSource; - extend?(extender: ILoader): ILoader; - } - - // Needs both Loader and ILoader since nunjucks uses a custom object system - // Object system is also responsible for the extend methods - class Loader { - on(name: string, func: (...args: any[]) => any): void; - emit(name: string, ...args: any[]): void; - resolve(from: string, to: string): string; - isRelative(filename: string): boolean; - extend(toExtend: ILoader): ILoader; - } - - interface LoaderSource { - src: string; - path: string; - noCache: boolean; - } - - class FileSystemLoader extends Loader implements ILoader { - init(searchPaths: string[], opts: any): void; - getSource(name: string): LoaderSource; - } - - class PrecompiledLoader extends Loader implements ILoader { - init(searchPaths: string[], opts: any): void; - getSource(name: string): LoaderSource; - } - } - - export = Nunjucks; -} \ No newline at end of file + export = nunjucks; +} From c8393a0018ab5ca14edcd97b184a838452c30e1b Mon Sep 17 00:00:00 2001 From: Giedrius Grabauskas Date: Thu, 5 May 2016 21:04:41 +0300 Subject: [PATCH 0208/1506] Added type definitions for react-swipeable (#9204) * Init react-swipeable.d.ts file * Added react-swipeable-tests.tsx file. --- react-swipeable/react-swipeable-tests.tsx | 28 ++++++++++++ react-swipeable/react-swipeable.d.ts | 52 +++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 react-swipeable/react-swipeable-tests.tsx create mode 100644 react-swipeable/react-swipeable.d.ts diff --git a/react-swipeable/react-swipeable-tests.tsx b/react-swipeable/react-swipeable-tests.tsx new file mode 100644 index 0000000000..dec0414759 --- /dev/null +++ b/react-swipeable/react-swipeable-tests.tsx @@ -0,0 +1,28 @@ +/// +/// + +import Swipeable = require('react-swipeable'); +import React = require('react'); + +var SampleComponent = React.createClass({ + render: function () { + return ( + +
+ This element can be swiped +
+
+ ) + } +}) diff --git a/react-swipeable/react-swipeable.d.ts b/react-swipeable/react-swipeable.d.ts new file mode 100644 index 0000000000..1e147a222f --- /dev/null +++ b/react-swipeable/react-swipeable.d.ts @@ -0,0 +1,52 @@ +// Type definitions for react-swipeable 3.3.1 +// Project: https://www.npmjs.com/package/react-swipeable +// Definitions by: Giedrius Grabauskas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace ReactSwipeableModule { + + import React = __React; + + interface onSwipingCallback { + (event: React.TouchEvent, deltaX: number, deltaY: number, absX: number, absY: number, velocity: number): void; + } + + interface OnSwipedCallback { + (event: React.TouchEvent, deltaX: number, deltaY: number, isFlick: boolean): void; + } + + interface OnSwipedDirectionCallback { + (event: React.TouchEvent, delta: number, isFlick: boolean): void; + } + + interface OnSwipingDirectionCallback { + (event: React.TouchEvent, delta: number): void; + } + + interface Props { + onSwiped?: OnSwipedCallback; + onSwiping?: onSwipingCallback; + onSwipingUp?: OnSwipingDirectionCallback; + onSwipingRight?: OnSwipingDirectionCallback; + onSwipingDown?: OnSwipingDirectionCallback; + onSwipingLeft?: OnSwipingDirectionCallback; + onSwipedUp?: OnSwipedDirectionCallback; + onSwipedRight?: OnSwipedDirectionCallback; + onSwipedDown?: OnSwipedDirectionCallback; + onSwipedLeft?: OnSwipedDirectionCallback; + flickThreshold?: number; + delta?: number; + preventDefaultTouchmoveEvent?: boolean; + } + + interface ReactSwipeable extends React.ComponentClass { } + +} + + +declare module "react-swipeable" { + let module: ReactSwipeableModule.ReactSwipeable; + export = module; +} From f86e99d05c7258d925bf04556f5eac4706cac576 Mon Sep 17 00:00:00 2001 From: mick delaney Date: Thu, 5 May 2016 19:12:02 +0100 Subject: [PATCH 0209/1506] Universal Access To The Module (#9206) Redeclare as Global module. --- he/he.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/he/he.d.ts b/he/he.d.ts index e0fb9847ac..44879577e1 100644 --- a/he/he.d.ts +++ b/he/he.d.ts @@ -6,6 +6,9 @@ // he - "HTML Entities" - A high quality pair of HTML encode and decode functions. declare module "he" { + export = he; +} +declare module he { var version: string; From cc14a78043949fbeb1facbafae04805085869a37 Mon Sep 17 00:00:00 2001 From: Derrick Liu Date: Thu, 5 May 2016 10:17:45 -0800 Subject: [PATCH 0210/1506] react-select: update props to match Select and Async source files (#9127) * Add an export for Option so we can use it directly * Update tests to import the newly exported Option * Add missing props from latest `react-select` 1.0.0-beta12 * Add menuRenderer function and interface for its named props * This argument should be optional. * `tabSelectsValue` should be a boolean, not a string * Update tests with new props * Export menu renderer props so devs can write typesafe `menuRenderer` functions * Make sure to check exports in tests, since it's likely users won't be using --- react-select/react-select-tests.tsx | 35 +++++- react-select/react-select.d.ts | 169 ++++++++++++++++++++++------ 2 files changed, 167 insertions(+), 37 deletions(-) diff --git a/react-select/react-select-tests.tsx b/react-select/react-select-tests.tsx index 8e4571f472..57bef47be2 100644 --- a/react-select/react-select-tests.tsx +++ b/react-select/react-select-tests.tsx @@ -5,16 +5,25 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import Select, { Option } from "react-select"; +import Select, { Option, MenuRendererProps } from "react-select"; class SelectTest extends React.Component, {}> { render() { const options: Option[] = [{ label: "Foo", value: "bar" }]; const onChange = (value: any) => console.log(value); + const renderMenu = ({ + focusedOption, + focusOption, + labelKey, + options, + selectValue, + valueArray + }: MenuRendererProps) => { return
}; const onOpen = () => { return; }; const onClose = () => { return; }; const optionRenderer = (option: Option) => {option.label} + return
// ---------------------------------------- - interface InputProps extends React.HTMLAttributes { + interface InputProps extends React.HTMLProps { defaultValue?:string; addonAfter?: any; // TODO: Add more specific type addonBefore?: any; // TODO: Add more specific type @@ -680,7 +680,7 @@ declare module "react-bootstrap" { // // ---------------------------------------- - interface ButtonInputProps extends React.HTMLAttributes { + interface ButtonInputProps extends React.HTMLProps { addonAfter?: any; // TODO: Add more specific type addonBefore?: any; // TODO: Add more specific type bsSize?: string; @@ -702,7 +702,7 @@ declare module "react-bootstrap" { // // ---------------------------------------- - interface StaticProps extends React.HTMLAttributes {} + interface StaticProps extends React.HTMLProps {} interface Static extends React.ReactElement { } interface StaticClass extends React.ComponentClass { } interface FormControlsClass { @@ -712,7 +712,7 @@ declare module "react-bootstrap" { //
// ---------------------------------------- - interface FormProps extends React.HTMLAttributes { + interface FormProps extends React.HTMLProps { bsClass?: string; componentClass?: React.ReactType; horizontal?: boolean; @@ -722,33 +722,33 @@ declare module "react-bootstrap" { // // ---------------------------------------- - interface FormGroupProps extends React.HTMLAttributes { + interface FormGroupProps extends React.HTMLProps { bsClass?: string; bsSize?: "sm" | "small" | "lg" | "large"; controlId?: string; validationState?: "success" | "warning" | "error"; } class FormGroup extends React.Component {} - + // // ---------------------------------------- - interface ControlLabelProps extends React.HTMLAttributes { + interface ControlLabelProps extends React.HTMLProps { bsClass?: string; htmlFor?: string; srOnly?: boolean; } class ControlLabel extends React.Component {} - + // // ---------------------------------------- - interface FormControlFeedbackProps extends React.HTMLAttributes { + interface FormControlFeedbackProps extends React.HTMLProps { } class FormControlFeedback extends React.Component { } - + // // ---------------------------------------- - interface FormControlProps extends React.HTMLAttributes { + interface FormControlProps extends React.HTMLProps { bsClass?: string; componentClass?: React.ReactType; id?: string; @@ -759,27 +759,27 @@ declare module "react-bootstrap" { } type FormControl = React.Component; var FormControl: FormControlClass; - + // // ---------------------------------------- - interface HelpBlockProps extends React.HTMLAttributes { + interface HelpBlockProps extends React.HTMLProps { bsClass?: string; } class HelpBlock extends React.Component {} - + // // ---------------------------------------- - interface CheckboxProps extends React.HTMLAttributes { + interface CheckboxProps extends React.HTMLProps { bsClass?: string; disabled?: boolean; inline?: boolean; validationState?: "success" | "warning" | "error"; } class Checkbox extends React.Component {} - + // // ---------------------------------------- - interface RadioProps extends React.HTMLAttributes { + interface RadioProps extends React.HTMLProps { bsClass?: string; disabled?: boolean; inline?: boolean; From ce1b9ab23456cf096a31ea0359bdf098bd2b7408 Mon Sep 17 00:00:00 2001 From: Thomas Townsend Date: Thu, 2 Jun 2016 14:43:58 +0200 Subject: [PATCH 0414/1506] Add immutable typings (#9412) * Add immutable typings * Fix header * Rename immutable test --- immutable/immutable-tests.ts | 329 +++++ immutable/immutable.d.ts | 2546 ++++++++++++++++++++++++++++++++++ 2 files changed, 2875 insertions(+) create mode 100644 immutable/immutable-tests.ts create mode 100644 immutable/immutable.d.ts diff --git a/immutable/immutable-tests.ts b/immutable/immutable-tests.ts new file mode 100644 index 0000000000..17240ebe9c --- /dev/null +++ b/immutable/immutable-tests.ts @@ -0,0 +1,329 @@ +/// + +import immutable = require('immutable') + +// List tests + +let list: immutable.List = immutable.List([0, 1, 2, 3, 4, 5]); +let list1: immutable.List = immutable.List(list); + +list = immutable.List.of(0, 1, 2, 3, 4); +let bool: boolean = immutable.List.isList(list); + +list = list.set(0, 1); +list = list.delete(0); +list = list.remove(0); +list = list.insert(0, 1); +list = list.clear(); +list = list.push(0, 1, 2, 3, 4, 5); +list = list.pop(); +list = list.unshift(1, 2, 3); +list = list.shift(); +list = list.update((value: immutable.List) => value); +list = list.update(1, (value: number) => value); +list = list.update(1, 1, (value: number) => value); +list = list.merge(list1, list); +list = list.merge([0, 1, 2], [3, 4, 5]); +list = list.mergeWith((prev: number, next: number, key: number) => prev, list, list1); +list = list.mergeWith((prev: number, next: number, key: number) => prev, [0, 1, 2], [3, 4, 5]); +list = list.mergeDeep(list1, list); +list = list.mergeDeep([0, 1, 2], [3, 4, 5]); +list = list.mergeDeepWith((prev: number, next: number, key: number) => prev, list, list1); +list = list.mergeDeepWith((prev: number, next: number, key: number) => prev, [0, 1, 2], [3, 4, 5]); +list = list.setSize(5); +list = list.setIn([0, 1, 2], 5); +list = list.deleteIn([0, 1, 2]); +list = list.removeIn([0, 1, 2]); +list = list.updateIn([0, 1, 2], value => value); +list = list.updateIn([0, 1, 2], 1, value => value); +list = list.mergeIn([0, 1, 2], list, list1); +list = list.mergeIn([0, 1, 2], [0, 1, 2], [3, 4, 5]); +list = list.mergeDeepIn([0, 1, 2], list, list1); +list = list.mergeDeepIn([0, 1, 2], [0, 1, 2], [3, 4, 5]); +list = list.withMutations((mutable: immutable.List) => mutable); +list = list.asMutable(); +list = list.asImmutable(); + +// Collection.Indexed +let indexedSeq: immutable.Seq.Indexed = list.toSeq(); + +// Iterable tests +let value: number = list.get(0); +value = list.get(0, 1); +list = list.interpose(0); +list = list.interleave(list, list1); +list = list.splice(0, 2, 4, 5, 6); +list = list.zip(list1); +let indexedIterable: immutable.Iterable.Indexed = list.zipWith( + (value: number, other: number) => value + other, + list1 +); +let indexedIterable1: immutable.Iterable.Indexed = list.zipWith( + (value: number, other: number, third: number) => value + other + third, + list1, + indexedIterable +); +indexedIterable = list.zipWith( + (value: number, other: number, third: number) => value + other + third, + list1, + indexedIterable1 +); +value = list.indexOf(1); +value = list.lastIndexOf(1); +value = list.findIndex((value: number, index: number, iter: immutable.List) => true); +value = list.findLastIndex((value: number, index: number, iter: immutable.List) => true); +value = list.size; + +bool = list.equals(list1); +value = list.hashCode(); +bool = list.has(1); +bool = list.includes(1); +bool = list.contains(1); +value = list.first(); +value = list.last(); +let toArr: number[] = list.toArray(); +let toMap: immutable.Map = list.toMap(); +let toOrderedMap: immutable.OrderedMap = list.toOrderedMap(); +let toSet: immutable.Set = list.toSet(); +let toOrderedSet: immutable.OrderedSet = list.toOrderedSet(); +list = list.toList(); +let toStack: immutable.Stack = list.toStack(); +let toKeyedSeq: immutable.Seq.Keyed = list.toKeyedSeq(); +indexedSeq = list.toIndexedSeq(); +let toSetSeq: immutable.Seq.Set = list.toSetSeq(); + +let iter: immutable.Iterator = list.keys(); +iter = list.values(); +let iter1: immutable.Iterator<[number, number]> = list.entries(); + +indexedSeq = list.keySeq(); +indexedSeq = list.valueSeq(); +let indexedSeq1: immutable.Seq.Indexed<[number, number]> = list.entrySeq(); + +let iter2: immutable.Iterable = list.map( + (value: number, key: number, iter: immutable.List) => "foo" +) + +list = list.filterNot((value: number, key: number, iter: immutable.List) => true); +list = list.reverse(); +list = list.sort((valA: number, valB: number) => 0); +list = list.sortBy( + (value: number, key: number, iter: immutable.List) => "foo", + (valueA: string, valueB: string) => 0 +); + +let keyedSeq2: immutable.Seq.Keyed> = list.groupBy( + (value: number, key: number, iter: immutable.List) => "" +); + +value = list.forEach((value: number, key: number, iter: immutable.List) => true); +list = list.slice(0, 1); +list = list.rest(); +list = list.butLast(); +list = list.skip(0); +list = list.skipLast(0); +list = list.skipWhile( + (value: number, key: number, iter: immutable.List) => true +); +list = list.take(2); +list = list.takeLast(2); +list = list.takeWhile( + (value: number, key: number, iter: immutable.List) => true +); +list = list.takeUntil( + (value: number, key: number, iter: immutable.List) => true +); +list = list.concat(list1, 2, 3); +list = list.flatten(1); +list = list.flatten(true); +let str: string = list.reduce( + (red: string, value: number, key: number, iter: immutable.List) => red + "bar", + "foo" +); +str = list.reduceRight( + (red: string, value: number, key: number, iter: immutable.List) => red + "bar", + "foo" +); +bool = list.every( + (value: number, key: number, iter: immutable.List) => true +); +bool = list.some( + (value: number, key: number, iter: immutable.List) => true +); +str = list.join(","); +bool = list.isEmpty(); +value = list.count(); +value = list.count( + (value: number, key: number, iter: immutable.List) => true +); +let keyedSeq3: immutable.Seq.Keyed = list.countBy( + (value: number, key: number, iter: immutable.List) => "foo" +); +value = list.find( + (value: number, key: number, iter: immutable.List) => true, + null, + 0 +); +value = list.findLast( + (value: number, key: number, iter: immutable.List) => true, + null, + 0 +); +let tuple: [number, number] = list.findEntry( + (value: number, key: number, iter: immutable.List) => true, + null, + 0 +); +tuple = list.findLastEntry( + (value: number, key: number, iter: immutable.List) => true, + null, + 0 +); +value = list.findKey( + (value: number, key: number, iter: immutable.List) => true, + null +); +value = list.findLastKey( + (value: number, key: number, iter: immutable.List) => true, + null +); +value = list.keyOf(0); +value = list.lastKeyOf(0); +value = list.max((valA: number, valB: number) => 0); +value = list.maxBy( + (value: number, key: number, iter: immutable.List) => "foo", + (valueA: string, valueB: string) => 0 +); +value = list.min((valA: number, valB: number) => 0); +value = list.minBy( + (value: number, key: number, iter: immutable.List) => "foo", + (valueA: string, valueB: string) => 0 +); +bool = list.isSubset(list1); +bool = list.isSubset([0, 1, 2]); +bool = list.isSuperset(list1); +bool = list.isSuperset([0, 1, 2]); + + +// Map tests + +let map: immutable.Map = immutable.Map(); +map = immutable.Map([["foo", 1], ["bar", 2]]); +let map1: immutable.Map = immutable.Map(map); +map = map.set("baz", 3); +map.delete("foo"); +map.remove("foo"); +map = map.clear(); +map = map.update((value: immutable.Map) => value); +map = map.update("foo", (value: number) => value); +map = map.update("bar", 1, (value: number) => value); +map = map.merge(map1, map); +map = map.merge({ "foo": 0, "bar": 1}, {"baz": 2}); +map = map.mergeWith((prev: number, next: number, key: string) => prev, map, map1); +map = map.mergeWith((prev: number, next: number, key: string) => prev,{ "foo": 0, "bar": 1}, {"baz": 2}); +map = map.mergeDeep(map1, map); +map = map.mergeDeep({ "foo": 0, "bar": 1}, {"baz": 2}); +map = map.mergeDeepWith((prev: number, next: number, key: string) => prev, map, map1); +map = map.mergeDeepWith((prev: number, next: number, key: string) => prev, { "foo": 0, "bar": 1}, {"baz": 2}); +map = map.setIn([0, 1, 2], 5); +map = map.deleteIn([0, 1, 2]); +map = map.removeIn([0, 1, 2]); +map = map.updateIn([0, 1, 2], value => value); +map = map.updateIn([0, 1, 2], 1, value => value); +map = map.mergeIn([0, 1, 2], map, map1); +map = map.mergeIn([0, 1, 2], { "foo": 0, "bar": 1}, {"baz": 2}); +map = map.mergeDeepIn([0, 1, 2], map, map1); +map = map.mergeDeepIn([0, 1, 2], { "foo": 0, "bar": 1}, {"baz": 2}); +map = map.withMutations((mutable: immutable.Map) => mutable); +map = map.asMutable(); +map = map.asImmutable(); + +bool = immutable.Map.isMap(map); +map = immutable.Map.of("foo", 0, "bar", 1); + +// OrderedMap tests +bool = immutable.OrderedMap.isOrderedMap(toOrderedMap); +toOrderedMap = immutable.OrderedMap(toOrderedMap); + +// Set tests +let set: immutable.Set = immutable.Set.of(0, 1, 2, 3); +bool = immutable.Set.isSet(set); +set = immutable.Set.fromKeys(toMap); +let set1: immutable.Set = immutable.Set.fromKeys({ "foo": 1, "bar": 2}); +set = immutable.Set(); +set = immutable.Set(set); +set = set.add(3); +set.delete(1); +set.remove(2); +set = set.clear(); +set = set.union(map, list); +set = set.union([1, 2, 3], [4, 5, 6]); +set = set.merge(map1, list); +set = set.merge([1, 2, 3], [4, 5, 6]); +set = set.intersect(map1, list); +set = set.intersect([1, 2, 3], [4, 5, 6]); +set = set.subtract(map1, list); +set = set.subtract([1, 2, 3], [4, 5, 6]); +set = set.withMutations((mutable: immutable.Set) => mutable); +set = set.asMutable(); +set = set.asImmutable(); + + +// OrderedSet tests +bool = immutable.OrderedSet.isOrderedSet(set); +let orderedSet1: immutable.OrderedSet = immutable.OrderedSet.of(0, 1, 2, 3); +orderedSet1 = immutable.OrderedSet.fromKeys(toMap); +let orderedSet2: immutable.Set = immutable.Set.fromKeys({ "foo": 1, "bar": 2}); + +// Stack tests + +let stack: immutable.Stack = immutable.Stack(); +bool = immutable.Stack.isStack(stack); +stack = immutable.Stack.of(0, 1, 2, 3, 4, 5); +stack = immutable.Stack(list); +value = stack.peek(); +stack = stack.clear(); +stack = stack.unshift(0, 1, 2); +stack = stack.unshiftAll(list); +stack = stack.unshiftAll([1, 2, 3]); +stack = stack.shift(); +stack = stack.push(1, 2, 3); +stack = stack.pushAll(list); +stack = stack.pushAll([1, 2, 3]); +stack = stack.pop(); +stack = stack.withMutations((mutable: immutable.Stack) => mutable); +stack = stack.asMutable(); +stack = stack.asImmutable(); + + +// Range and Repeat function tests + +let funcSeqIndexed: immutable.Seq.Indexed = immutable.Range(0, 3, 1); +funcSeqIndexed = immutable.Repeat(2, 10); + + +// Seq tests +let seq: immutable.Seq = immutable.Seq(); +bool = immutable.Seq.isSeq(seq); +funcSeqIndexed = immutable.Seq.of(0, 1, 2, 3); +seq = immutable.Seq(map); +value = seq.size; +seq = seq.cacheResult(); + + +// keyed +let seqKeyed: immutable.Seq.Keyed = immutable.Seq.Keyed(); +seqKeyed = immutable.Seq.Keyed(map); +seqKeyed = seqKeyed.toSeq(); + +// indexed +let seqIndexed: immutable.Seq.Indexed = immutable.Seq.Indexed(); +seqIndexed = immutable.Seq.Indexed.of(0, 1, 2, 3); +seqIndexed = immutable.Seq.Indexed(list); +seqIndexed = seqIndexed.toSeq(); + +// indexed +let seqSet: immutable.Seq.Set = immutable.Seq.Set(); +seqSet = immutable.Seq.Set.of(0, 1, 2, 3); +seqSet = immutable.Seq.Set(list); +seqSet = seqSet.toSeq(); diff --git a/immutable/immutable.d.ts b/immutable/immutable.d.ts new file mode 100644 index 0000000000..5ca32ecfe4 --- /dev/null +++ b/immutable/immutable.d.ts @@ -0,0 +1,2546 @@ +// Type definitions for Facebook's Immutable 3.8.1 +// Project: https://github.com/facebook/immutable-js +// Definitions by: tht13 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// Core of typings are from repository itself + +/** + * Copyright (c) 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +/** + * Immutable data encourages pure functions (data-in, data-out) and lends itself + * to much simpler application development and enabling techniques from + * functional programming such as lazy evaluation. + * + * While designed to bring these powerful functional concepts to JavaScript, it + * presents an Object-Oriented API familiar to Javascript engineers and closely + * mirroring that of Array, Map, and Set. It is easy and efficient to convert to + * and from plain Javascript types. + + * Note: all examples are presented in [ES6][]. To run in all browsers, they + * need to be translated to ES3. For example: + * + * // ES6 + * foo.map(x => x * x); + * // ES3 + * foo.map(function (x) { return x * x; }); + * + * [ES6]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla + */ + +declare namespace __Immutable { + + /** + * Deeply converts plain JS objects and arrays to Immutable Maps and Lists. + * + * If a `reviver` is optionally provided, it will be called with every + * collection as a Seq (beginning with the most nested collections + * and proceeding to the top-level collection itself), along with the key + * refering to each collection and the parent JS object provided as `this`. + * For the top level, object, the key will be `""`. This `reviver` is expected + * to return a new Immutable Iterable, allowing for custom conversions from + * deep JS objects. + * + * This example converts JSON to List and OrderedMap: + * + * Immutable.fromJS({a: {b: [10, 20, 30]}, c: 40}, function (key, value) { + * var isIndexed = Immutable.Iterable.isIndexed(value); + * return isIndexed ? value.toList() : value.toOrderedMap(); + * }); + * + * // true, "b", {b: [10, 20, 30]} + * // false, "a", {a: {b: [10, 20, 30]}, c: 40} + * // false, "", {"": {a: {b: [10, 20, 30]}, c: 40}} + * + * If `reviver` is not provided, the default behavior will convert Arrays into + * Lists and Objects into Maps. + * + * `reviver` acts similarly to the [same parameter in `JSON.parse`][1]. + * + * `Immutable.fromJS` is conservative in its conversion. It will only convert + * arrays which pass `Array.isArray` to Lists, and only raw objects (no custom + * prototype) to Map. + * + * Keep in mind, when using JS objects to construct Immutable Maps, that + * JavaScript Object properties are always strings, even if written in a + * quote-less shorthand, while Immutable Maps accept keys of any type. + * + * ```js + * var obj = { 1: "one" }; + * Object.keys(obj); // [ "1" ] + * obj["1"]; // "one" + * obj[1]; // "one" + * + * var map = Map(obj); + * map.get("1"); // "one" + * map.get(1); // undefined + * ``` + * + * Property access for JavaScript Objects first converts the key to a string, + * but since Immutable Map keys can be of any type the argument to `get()` is + * not altered. + * + * [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter + * "Using the reviver parameter" + */ + export function fromJS( + json: any, + reviver?: (k: any, v: Iterable) => any + ): any; + + + /** + * Value equality check with semantics similar to `Object.is`, but treats + * Immutable `Iterable`s as values, equal if the second `Iterable` includes + * equivalent values. + * + * It's used throughout Immutable when checking for equality, including `Map` + * key equality and `Set` membership. + * + * var map1 = Immutable.Map({a:1, b:1, c:1}); + * var map2 = Immutable.Map({a:1, b:1, c:1}); + * assert(map1 !== map2); + * assert(Object.is(map1, map2) === false); + * assert(Immutable.is(map1, map2) === true); + * + * Note: Unlike `Object.is`, `Immutable.is` assumes `0` and `-0` are the same + * value, matching the behavior of ES6 Map key equality. + */ + export function is(first: any, second: any): boolean; + + + /** + * Lists are ordered indexed dense collections, much like a JavaScript + * Array. + * + * Lists are immutable and fully persistent with O(log32 N) gets and sets, + * and O(1) push and pop. + * + * Lists implement Deque, with efficient addition and removal from both the + * end (`push`, `pop`) and beginning (`unshift`, `shift`). + * + * Unlike a JavaScript Array, there is no distinction between an + * "unset" index and an index set to `undefined`. `List#forEach` visits all + * indices from 0 to size, regardless of whether they were explicitly defined. + */ + export module List { + + /** + * True if the provided value is a List + */ + function isList(maybeList: any): boolean; + + /** + * Creates a new List containing `values`. + */ + function of(...values: T[]): List; + } + + /** + * Create a new immutable List containing the values of the provided + * iterable-like. + */ + export function List(): List; + export function List(iter: Iterable.Indexed): List; + export function List(iter: Iterable.Set): List; + export function List(iter: Iterable.Keyed): List<[K,V]>; + export function List(array: Array): List; + export function List(iterator: Iterator): List; + export function List(iterable: Iterable): List; + + + export interface List extends Collection.Indexed { + + // Persistent changes + + /** + * Returns a new List which includes `value` at `index`. If `index` already + * exists in this List, it will be replaced. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.set(-1, "value")` sets the last item in the List. + * + * If `index` larger than `size`, the returned List's `size` will be large + * enough to include the `index`. + */ + set(index: number, value: T): List; + + /** + * Returns a new List which excludes this `index` and with a size 1 less + * than this List. Values at indices above `index` are shifted down by 1 to + * fill the position. + * + * This is synonymous with `list.splice(index, 1)`. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.delete(-1)` deletes the last item in the List. + * + * Note: `delete` cannot be safely used in IE8 + * @alias remove + */ + delete(index: number): List; + remove(index: number): List; + + /** + * Returns a new List with `value` at `index` with a size 1 more than this + * List. Values at indices above `index` are shifted over by 1. + * + * This is synonymous with `list.splice(index, 0, value) + */ + insert(index: number, value: T): List; + + /** + * Returns a new List with 0 size and no values. + */ + clear(): List; + + /** + * Returns a new List with the provided `values` appended, starting at this + * List's `size`. + */ + push(...values: T[]): List; + + /** + * Returns a new List with a size ones less than this List, excluding + * the last index in this List. + * + * Note: this differs from `Array#pop` because it returns a new + * List rather than the removed value. Use `last()` to get the last value + * in this List. + */ + pop(): List; + + /** + * Returns a new List with the provided `values` prepended, shifting other + * values ahead to higher indices. + */ + unshift(...values: T[]): List; + + /** + * Returns a new List with a size ones less than this List, excluding + * the first index in this List, shifting all other values to a lower index. + * + * Note: this differs from `Array#shift` because it returns a new + * List rather than the removed value. Use `first()` to get the first + * value in this List. + */ + shift(): List; + + /** + * Returns a new List with an updated value at `index` with the return + * value of calling `updater` with the existing value, or `notSetValue` if + * `index` was not set. If called with a single argument, `updater` is + * called with the List itself. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.update(-1)` updates the last item in the List. + * + * @see `Map#update` + */ + update(updater: (value: List) => List): List; + update(index: number, updater: (value: T) => T): List; + update(index: number, notSetValue: T, updater: (value: T) => T): List; + + /** + * @see `Map#merge` + */ + merge(...iterables: Iterable.Indexed[]): List; + merge(...iterables: Array[]): List; + + /** + * @see `Map#mergeWith` + */ + mergeWith( + merger: (previous?: T, next?: T, key?: number) => T, + ...iterables: Iterable.Indexed[] + ): List; + mergeWith( + merger: (previous?: T, next?: T, key?: number) => T, + ...iterables: Array[] + ): List; + + /** + * @see `Map#mergeDeep` + */ + mergeDeep(...iterables: Iterable.Indexed[]): List; + mergeDeep(...iterables: Array[]): List; + + /** + * @see `Map#mergeDeepWith` + */ + mergeDeepWith( + merger: (previous?: T, next?: T, key?: number) => T, + ...iterables: Iterable.Indexed[] + ): List; + mergeDeepWith( + merger: (previous?: T, next?: T, key?: number) => T, + ...iterables: Array[] + ): List; + + /** + * Returns a new List with size `size`. If `size` is less than this + * List's size, the new List will exclude values at the higher indices. + * If `size` is greater than this List's size, the new List will have + * undefined values for the newly available indices. + * + * When building a new List and the final size is known up front, `setSize` + * used in conjunction with `withMutations` may result in the more + * performant construction. + */ + setSize(size: number): List; + + + // Deep persistent changes + + /** + * Returns a new List having set `value` at this `keyPath`. If any keys in + * `keyPath` do not exist, a new immutable Map will be created at that key. + * + * Index numbers are used as keys to determine the path to follow in + * the List. + */ + setIn(keyPath: Array, value: any): List; + setIn(keyPath: Iterable, value: any): List; + + /** + * Returns a new List having removed the value at this `keyPath`. If any + * keys in `keyPath` do not exist, no change will occur. + * + * @alias removeIn + */ + deleteIn(keyPath: Array): List; + deleteIn(keyPath: Iterable): List; + removeIn(keyPath: Array): List; + removeIn(keyPath: Iterable): List; + + /** + * @see `Map#updateIn` + */ + updateIn( + keyPath: Array, + updater: (value: any) => any + ): List; + updateIn( + keyPath: Array, + notSetValue: any, + updater: (value: any) => any + ): List; + updateIn( + keyPath: Iterable, + updater: (value: any) => any + ): List; + updateIn( + keyPath: Iterable, + notSetValue: any, + updater: (value: any) => any + ): List; + + /** + * @see `Map#mergeIn` + */ + mergeIn( + keyPath: Iterable, + ...iterables: Iterable.Indexed[] + ): List; + mergeIn( + keyPath: Array, + ...iterables: Iterable.Indexed[] + ): List; + mergeIn( + keyPath: Array, + ...iterables: Array[] + ): List; + + /** + * @see `Map#mergeDeepIn` + */ + mergeDeepIn( + keyPath: Iterable, + ...iterables: Iterable.Indexed[] + ): List; + mergeDeepIn( + keyPath: Array, + ...iterables: Iterable.Indexed[] + ): List; + mergeDeepIn( + keyPath: Array, + ...iterables: Array[] + ): List; + + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `set`, `push`, `pop`, `shift`, `unshift` and + * `merge` may be used mutatively. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: List) => any): List; + + /** + * @see `Map#asMutable` + */ + asMutable(): List; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): List; + } + + + /** + * Immutable Map is an unordered Iterable.Keyed of (key, value) pairs with + * `O(log32 N)` gets and `O(log32 N)` persistent sets. + * + * Iteration order of a Map is undefined, however is stable. Multiple + * iterations of the same Map will iterate in the same order. + * + * Map's keys can be of any type, and use `Immutable.is` to determine key + * equality. This allows the use of any value (including NaN) as a key. + * + * Because `Immutable.is` returns equality based on value semantics, and + * Immutable collections are treated as values, any Immutable collection may + * be used as a key. + * + * Map().set(List.of(1), 'listofone').get(List.of(1)); + * // 'listofone' + * + * Any JavaScript object may be used as a key, however strict identity is used + * to evaluate key equality. Two similar looking objects will represent two + * different keys. + * + * Implemented by a hash-array mapped trie. + */ + export module Map { + + /** + * True if the provided value is a Map + */ + function isMap(maybeMap: any): boolean; + + /** + * Creates a new Map from alternating keys and values + */ + function of(...keyValues: (K|V)[]): Map; + } + + /** + * Creates a new Immutable Map. + * + * Created with the same key value pairs as the provided Iterable.Keyed or + * JavaScript Object or expects an Iterable of [K, V] tuple entries. + * + * var newMap = Map({key: "value"}); + * var newMap = Map([["key", "value"]]); + * + * Keep in mind, when using JS objects to construct Immutable Maps, that + * JavaScript Object properties are always strings, even if written in a + * quote-less shorthand, while Immutable Maps accept keys of any type. + * + * ```js + * var obj = { 1: "one" }; + * Object.keys(obj); // [ "1" ] + * obj["1"]; // "one" + * obj[1]; // "one" + * + * var map = Map(obj); + * map.get("1"); // "one" + * map.get(1); // undefined + * ``` + * + * Property access for JavaScript Objects first converts the key to a string, + * but since Immutable Map keys can be of any type the argument to `get()` is + * not altered. + */ + export function Map(): Map; + export function Map(iter: Iterable.Keyed): Map; + export function Map(iter: Iterable): Map; + export function Map(array: Array<[K,V]>): Map; + export function Map(obj: {[key: string]: V}): Map; + export function Map(iterator: Iterator<[K,V]>): Map; + export function Map(iterable: Iterable): Map; + + export interface Map extends Collection.Keyed { + + // Persistent changes + + /** + * Returns a new Map also containing the new key, value pair. If an equivalent + * key already exists in this Map, it will be replaced. + */ + set(key: K, value: V): Map; + + /** + * Returns a new Map which excludes this `key`. + * + * Note: `delete` cannot be safely used in IE8, but is provided to mirror + * the ES6 collection API. + * @alias remove + */ + delete(key: K): Map; + remove(key: K): Map; + + /** + * Returns a new Map containing no keys or values. + */ + clear(): Map; + + /** + * Returns a new Map having updated the value at this `key` with the return + * value of calling `updater` with the existing value, or `notSetValue` if + * the key was not set. If called with only a single argument, `updater` is + * called with the Map itself. + * + * Equivalent to: `map.set(key, updater(map.get(key, notSetValue)))`. + */ + update(updater: (value: Map) => Map): Map; + update(key: K, updater: (value: V) => V): Map; + update(key: K, notSetValue: V, updater: (value: V) => V): Map; + + /** + * Returns a new Map resulting from merging the provided Iterables + * (or JS objects) into this Map. In other words, this takes each entry of + * each iterable and sets it on this Map. + * + * If any of the values provided to `merge` are not Iterable (would return + * false for `Immutable.Iterable.isIterable`) then they are deeply converted + * via `Immutable.fromJS` before being merged. However, if the value is an + * Iterable but includes non-iterable JS objects or arrays, those nested + * values will be preserved. + * + * var x = Immutable.Map({a: 10, b: 20, c: 30}); + * var y = Immutable.Map({b: 40, a: 50, d: 60}); + * x.merge(y) // { a: 50, b: 40, c: 30, d: 60 } + * y.merge(x) // { b: 20, a: 10, d: 60, c: 30 } + * + */ + merge(...iterables: Iterable[]): Map; + merge(...iterables: {[key: string]: V}[]): Map; + + /** + * Like `merge()`, `mergeWith()` returns a new Map resulting from merging + * the provided Iterables (or JS objects) into this Map, but uses the + * `merger` function for dealing with conflicts. + * + * var x = Immutable.Map({a: 10, b: 20, c: 30}); + * var y = Immutable.Map({b: 40, a: 50, d: 60}); + * x.mergeWith((prev, next) => prev / next, y) // { a: 0.2, b: 0.5, c: 30, d: 60 } + * y.mergeWith((prev, next) => prev / next, x) // { b: 2, a: 5, d: 60, c: 30 } + * + */ + mergeWith( + merger: (previous?: V, next?: V, key?: K) => V, + ...iterables: Iterable[] + ): Map; + mergeWith( + merger: (previous?: V, next?: V, key?: K) => V, + ...iterables: {[key: string]: V}[] + ): Map; + + /** + * Like `merge()`, but when two Iterables conflict, it merges them as well, + * recursing deeply through the nested data. + * + * var x = Immutable.fromJS({a: { x: 10, y: 10 }, b: { x: 20, y: 50 } }); + * var y = Immutable.fromJS({a: { x: 2 }, b: { y: 5 }, c: { z: 3 } }); + * x.mergeDeep(y) // {a: { x: 2, y: 10 }, b: { x: 20, y: 5 }, c: { z: 3 } } + * + */ + mergeDeep(...iterables: Iterable[]): Map; + mergeDeep(...iterables: {[key: string]: V}[]): Map; + + /** + * Like `mergeDeep()`, but when two non-Iterables conflict, it uses the + * `merger` function to determine the resulting value. + * + * var x = Immutable.fromJS({a: { x: 10, y: 10 }, b: { x: 20, y: 50 } }); + * var y = Immutable.fromJS({a: { x: 2 }, b: { y: 5 }, c: { z: 3 } }); + * x.mergeDeepWith((prev, next) => prev / next, y) + * // {a: { x: 5, y: 10 }, b: { x: 20, y: 10 }, c: { z: 3 } } + * + */ + mergeDeepWith( + merger: (previous?: V, next?: V, key?: K) => V, + ...iterables: Iterable[] + ): Map; + mergeDeepWith( + merger: (previous?: V, next?: V, key?: K) => V, + ...iterables: {[key: string]: V}[] + ): Map; + + + // Deep persistent changes + + /** + * Returns a new Map having set `value` at this `keyPath`. If any keys in + * `keyPath` do not exist, a new immutable Map will be created at that key. + */ + setIn(keyPath: Array, value: any): Map; + setIn(KeyPath: Iterable, value: any): Map; + + /** + * Returns a new Map having removed the value at this `keyPath`. If any keys + * in `keyPath` do not exist, no change will occur. + * + * @alias removeIn + */ + deleteIn(keyPath: Array): Map; + deleteIn(keyPath: Iterable): Map; + removeIn(keyPath: Array): Map; + removeIn(keyPath: Iterable): Map; + + /** + * Returns a new Map having applied the `updater` to the entry found at the + * keyPath. + * + * If any keys in `keyPath` do not exist, new Immutable `Map`s will + * be created at those keys. If the `keyPath` does not already contain a + * value, the `updater` function will be called with `notSetValue`, if + * provided, otherwise `undefined`. + * + * var data = Immutable.fromJS({ a: { b: { c: 10 } } }); + * data = data.updateIn(['a', 'b', 'c'], val => val * 2); + * // { a: { b: { c: 20 } } } + * + * If the `updater` function returns the same value it was called with, then + * no change will occur. This is still true if `notSetValue` is provided. + * + * var data1 = Immutable.fromJS({ a: { b: { c: 10 } } }); + * data2 = data1.updateIn(['x', 'y', 'z'], 100, val => val); + * assert(data2 === data1); + * + */ + updateIn( + keyPath: Array, + updater: (value: any) => any + ): Map; + updateIn( + keyPath: Array, + notSetValue: any, + updater: (value: any) => any + ): Map; + updateIn( + keyPath: Iterable, + updater: (value: any) => any + ): Map; + updateIn( + keyPath: Iterable, + notSetValue: any, + updater: (value: any) => any + ): Map; + + /** + * A combination of `updateIn` and `merge`, returning a new Map, but + * performing the merge at a point arrived at by following the keyPath. + * In other words, these two lines are equivalent: + * + * x.updateIn(['a', 'b', 'c'], abc => abc.merge(y)); + * x.mergeIn(['a', 'b', 'c'], y); + * + */ + mergeIn( + keyPath: Iterable, + ...iterables: Iterable[] + ): Map; + mergeIn( + keyPath: Array, + ...iterables: Iterable[] + ): Map; + mergeIn( + keyPath: Array, + ...iterables: {[key: string]: V}[] + ): Map; + + /** + * A combination of `updateIn` and `mergeDeep`, returning a new Map, but + * performing the deep merge at a point arrived at by following the keyPath. + * In other words, these two lines are equivalent: + * + * x.updateIn(['a', 'b', 'c'], abc => abc.mergeDeep(y)); + * x.mergeDeepIn(['a', 'b', 'c'], y); + * + */ + mergeDeepIn( + keyPath: Iterable, + ...iterables: Iterable[] + ): Map; + mergeDeepIn( + keyPath: Array, + ...iterables: Iterable[] + ): Map; + mergeDeepIn( + keyPath: Array, + ...iterables: {[key: string]: V}[] + ): Map; + + + // Transient changes + + /** + * Every time you call one of the above functions, a new immutable Map is + * created. If a pure function calls a number of these to produce a final + * return value, then a penalty on performance and memory has been paid by + * creating all of the intermediate immutable Maps. + * + * If you need to apply a series of mutations to produce a new immutable + * Map, `withMutations()` creates a temporary mutable copy of the Map which + * can apply mutations in a highly performant manner. In fact, this is + * exactly how complex mutations like `merge` are done. + * + * As an example, this results in the creation of 2, not 4, new Maps: + * + * var map1 = Immutable.Map(); + * var map2 = map1.withMutations(map => { + * map.set('a', 1).set('b', 2).set('c', 3); + * }); + * assert(map1.size === 0); + * assert(map2.size === 3); + * + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `set` and `merge` may be used mutatively. + * + */ + withMutations(mutator: (mutable: Map) => any): Map; + + /** + * Another way to avoid creation of intermediate Immutable maps is to create + * a mutable copy of this collection. Mutable copies *always* return `this`, + * and thus shouldn't be used for equality. Your function should never return + * a mutable copy of a collection, only use it internally to create a new + * collection. If possible, use `withMutations` as it provides an easier to + * use API. + * + * Note: if the collection is already mutable, `asMutable` returns itself. + * + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `set` and `merge` may be used mutatively. + */ + asMutable(): Map; + + /** + * The yin to `asMutable`'s yang. Because it applies to mutable collections, + * this operation is *mutable* and returns itself. Once performed, the mutable + * copy has become immutable and can be safely returned from a function. + */ + asImmutable(): Map; + } + + + /** + * A type of Map that has the additional guarantee that the iteration order of + * entries will be the order in which they were set(). + * + * The iteration behavior of OrderedMap is the same as native ES6 Map and + * JavaScript Object. + * + * Note that `OrderedMap` are more expensive than non-ordered `Map` and may + * consume more memory. `OrderedMap#set` is amortized O(log32 N), but not + * stable. + */ + + export module OrderedMap { + + /** + * True if the provided value is an OrderedMap. + */ + function isOrderedMap(maybeOrderedMap: any): boolean; + } + + /** + * Creates a new Immutable OrderedMap. + * + * Created with the same key value pairs as the provided Iterable.Keyed or + * JavaScript Object or expects an Iterable of [K, V] tuple entries. + * + * The iteration order of key-value pairs provided to this constructor will + * be preserved in the OrderedMap. + * + * var newOrderedMap = OrderedMap({key: "value"}); + * var newOrderedMap = OrderedMap([["key", "value"]]); + * + */ + export function OrderedMap(): OrderedMap; + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; + export function OrderedMap(iter: Iterable): OrderedMap; + export function OrderedMap(array: Array<[K,V]>): OrderedMap; + export function OrderedMap(obj: {[key: string]: V}): OrderedMap; + export function OrderedMap(iterator: Iterator<[K,V]>): OrderedMap; + export function OrderedMap(iterable: Iterable): OrderedMap; + + export interface OrderedMap extends Map {} + + + /** + * A Collection of unique values with `O(log32 N)` adds and has. + * + * When iterating a Set, the entries will be (value, value) pairs. Iteration + * order of a Set is undefined, however is stable. Multiple iterations of the + * same Set will iterate in the same order. + * + * Set values, like Map keys, may be of any type. Equality is determined using + * `Immutable.is`, enabling Sets to uniquely include other Immutable + * collections, custom value types, and NaN. + */ + export module Set { + + /** + * True if the provided value is a Set + */ + function isSet(maybeSet: any): boolean; + + /** + * Creates a new Set containing `values`. + */ + function of(...values: T[]): Set; + + /** + * `Set.fromKeys()` creates a new immutable Set containing the keys from + * this Iterable or JavaScript Object. + */ + function fromKeys(iter: Iterable): Set; + function fromKeys(obj: {[key: string]: any}): Set; + } + + /** + * Create a new immutable Set containing the values of the provided + * iterable-like. + */ + export function Set(): Set; + export function Set(iter: Iterable.Set): Set; + export function Set(iter: Iterable.Indexed): Set; + export function Set(iter: Iterable.Keyed): Set<[K,V]>; + export function Set(array: Array): Set; + export function Set(iterator: Iterator): Set; + export function Set(iterable: Iterable): Set; + + export interface Set extends Collection.Set { + + // Persistent changes + + /** + * Returns a new Set which also includes this value. + */ + add(value: T): Set; + + /** + * Returns a new Set which excludes this value. + * + * Note: `delete` cannot be safely used in IE8 + * @alias remove + */ + delete(value: T): Set; + remove(value: T): Set; + + /** + * Returns a new Set containing no values. + */ + clear(): Set; + + /** + * Returns a Set including any value from `iterables` that does not already + * exist in this Set. + * @alias merge + */ + union(...iterables: Iterable[]): Set; + union(...iterables: Array[]): Set; + merge(...iterables: Iterable[]): Set; + merge(...iterables: Array[]): Set; + + + /** + * Returns a Set which has removed any values not also contained + * within `iterables`. + */ + intersect(...iterables: Iterable[]): Set; + intersect(...iterables: Array[]): Set; + + /** + * Returns a Set excluding any values contained within `iterables`. + */ + subtract(...iterables: Iterable[]): Set; + subtract(...iterables: Array[]): Set; + + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `add` may be used mutatively. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: Set) => any): Set; + + /** + * @see `Map#asMutable` + */ + asMutable(): Set; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): Set; + } + + + /** + * A type of Set that has the additional guarantee that the iteration order of + * values will be the order in which they were `add`ed. + * + * The iteration behavior of OrderedSet is the same as native ES6 Set. + * + * Note that `OrderedSet` are more expensive than non-ordered `Set` and may + * consume more memory. `OrderedSet#add` is amortized O(log32 N), but not + * stable. + */ + export module OrderedSet { + + /** + * True if the provided value is an OrderedSet. + */ + function isOrderedSet(maybeOrderedSet: any): boolean; + + /** + * Creates a new OrderedSet containing `values`. + */ + function of(...values: T[]): OrderedSet; + + /** + * `OrderedSet.fromKeys()` creates a new immutable OrderedSet containing + * the keys from this Iterable or JavaScript Object. + */ + function fromKeys(iter: Iterable): OrderedSet; + function fromKeys(obj: {[key: string]: any}): OrderedSet; + } + + /** + * Create a new immutable OrderedSet containing the values of the provided + * iterable-like. + */ + export function OrderedSet(): OrderedSet; + export function OrderedSet(iter: Iterable.Set): OrderedSet; + export function OrderedSet(iter: Iterable.Indexed): OrderedSet; + export function OrderedSet(iter: Iterable.Keyed): OrderedSet<[K,V]>; + export function OrderedSet(array: Array): OrderedSet; + export function OrderedSet(iterator: Iterator): OrderedSet; + export function OrderedSet(iterable: Iterable): OrderedSet; + + export interface OrderedSet extends Set {} + + + /** + * Stacks are indexed collections which support very efficient O(1) addition + * and removal from the front using `unshift(v)` and `shift()`. + * + * For familiarity, Stack also provides `push(v)`, `pop()`, and `peek()`, but + * be aware that they also operate on the front of the list, unlike List or + * a JavaScript Array. + * + * Note: `reverse()` or any inherent reverse traversal (`reduceRight`, + * `lastIndexOf`, etc.) is not efficient with a Stack. + * + * Stack is implemented with a Single-Linked List. + */ + export module Stack { + + /** + * True if the provided value is a Stack + */ + function isStack(maybeStack: any): boolean; + + /** + * Creates a new Stack containing `values`. + */ + function of(...values: T[]): Stack; + } + + /** + * Create a new immutable Stack containing the values of the provided + * iterable-like. + * + * The iteration order of the provided iterable is preserved in the + * resulting `Stack`. + */ + export function Stack(): Stack; + export function Stack(iter: Iterable.Indexed): Stack; + export function Stack(iter: Iterable.Set): Stack; + export function Stack(iter: Iterable.Keyed): Stack<[K,V]>; + export function Stack(array: Array): Stack; + export function Stack(iterator: Iterator): Stack; + export function Stack(iterable: Iterable): Stack; + + export interface Stack extends Collection.Indexed { + + // Reading values + + /** + * Alias for `Stack.first()`. + */ + peek(): T; + + + // Persistent changes + + /** + * Returns a new Stack with 0 size and no values. + */ + clear(): Stack; + + /** + * Returns a new Stack with the provided `values` prepended, shifting other + * values ahead to higher indices. + * + * This is very efficient for Stack. + */ + unshift(...values: T[]): Stack; + + /** + * Like `Stack#unshift`, but accepts a iterable rather than varargs. + */ + unshiftAll(iter: Iterable): Stack; + unshiftAll(iter: Array): Stack; + + /** + * Returns a new Stack with a size ones less than this Stack, excluding + * the first item in this Stack, shifting all other values to a lower index. + * + * Note: this differs from `Array#shift` because it returns a new + * Stack rather than the removed value. Use `first()` or `peek()` to get the + * first value in this Stack. + */ + shift(): Stack; + + /** + * Alias for `Stack#unshift` and is not equivalent to `List#push`. + */ + push(...values: T[]): Stack; + + /** + * Alias for `Stack#unshiftAll`. + */ + pushAll(iter: Iterable): Stack; + pushAll(iter: Array): Stack; + + /** + * Alias for `Stack#shift` and is not equivalent to `List#pop`. + */ + pop(): Stack; + + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `set`, `push`, and `pop` may be used mutatively. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: Stack) => any): Stack; + + /** + * @see `Map#asMutable` + */ + asMutable(): Stack; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): Stack; + } + + + /** + * Returns a Seq.Indexed of numbers from `start` (inclusive) to `end` + * (exclusive), by `step`, where `start` defaults to 0, `step` to 1, and `end` to + * infinity. When `start` is equal to `end`, returns empty range. + * + * Range() // [0,1,2,3,...] + * Range(10) // [10,11,12,13,...] + * Range(10,15) // [10,11,12,13,14] + * Range(10,30,5) // [10,15,20,25] + * Range(30,10,5) // [30,25,20,15] + * Range(30,30,5) // [] + * + */ + export function Range(start?: number, end?: number, step?: number): Seq.Indexed; + + + /** + * Returns a Seq.Indexed of `value` repeated `times` times. When `times` is + * not defined, returns an infinite `Seq` of `value`. + * + * Repeat('foo') // ['foo','foo','foo',...] + * Repeat('bar',4) // ['bar','bar','bar','bar'] + * + */ + export function Repeat(value: T, times?: number): Seq.Indexed; + + + /** + * Creates a new Class which produces Record instances. A record is similar to + * a JS object, but enforce a specific set of allowed string keys, and have + * default values. + * + * var ABRecord = Record({a:1, b:2}) + * var myRecord = new ABRecord({b:3}) + * + * Records always have a value for the keys they define. `remove`ing a key + * from a record simply resets it to the default value for that key. + * + * myRecord.size // 2 + * myRecord.get('a') // 1 + * myRecord.get('b') // 3 + * myRecordWithoutB = myRecord.remove('b') + * myRecordWithoutB.get('b') // 2 + * myRecordWithoutB.size // 2 + * + * Values provided to the constructor not found in the Record type will + * be ignored. For example, in this case, ABRecord is provided a key "x" even + * though only "a" and "b" have been defined. The value for "x" will be + * ignored for this record. + * + * var myRecord = new ABRecord({b:3, x:10}) + * myRecord.get('x') // undefined + * + * Because Records have a known set of string keys, property get access works + * as expected, however property sets will throw an Error. + * + * Note: IE8 does not support property access. Only use `get()` when + * supporting IE8. + * + * myRecord.b // 3 + * myRecord.b = 5 // throws Error + * + * Record Classes can be extended as well, allowing for custom methods on your + * Record. This is not a common pattern in functional environments, but is in + * many JS programs. + * + * Note: TypeScript does not support this type of subclassing. + * + * class ABRecord extends Record({a:1,b:2}) { + * getAB() { + * return this.a + this.b; + * } + * } + * + * var myRecord = new ABRecord({b: 3}) + * myRecord.getAB() // 4 + * + */ + export module Record { + export interface Class { + new (): Map; + new (values: {[key: string]: any}): Map; + new (values: Iterable): Map; // deprecated + + (): Map; + (values: {[key: string]: any}): Map; + (values: Iterable): Map; // deprecated + } + } + + export function Record( + defaultValues: {[key: string]: any}, name?: string + ): Record.Class; + + + /** + * Represents a sequence of values, but may not be backed by a concrete data + * structure. + * + * **Seq is immutable** — Once a Seq is created, it cannot be + * changed, appended to, rearranged or otherwise modified. Instead, any + * mutative method called on a `Seq` will return a new `Seq`. + * + * **Seq is lazy** — Seq does as little work as necessary to respond to any + * method call. Values are often created during iteration, including implicit + * iteration when reducing or converting to a concrete data structure such as + * a `List` or JavaScript `Array`. + * + * For example, the following performs no work, because the resulting + * Seq's values are never iterated: + * + * var oddSquares = Immutable.Seq.of(1,2,3,4,5,6,7,8) + * .filter(x => x % 2).map(x => x * x); + * + * Once the Seq is used, it performs only the work necessary. In this + * example, no intermediate data structures are ever created, filter is only + * called three times, and map is only called once: + * + * console.log(oddSquares.get(1)); // 9 + * + * Seq allows for the efficient chaining of operations, + * allowing for the expression of logic that can otherwise be very tedious: + * + * Immutable.Seq({a:1, b:1, c:1}) + * .flip().map(key => key.toUpperCase()).flip().toObject(); + * // Map { A: 1, B: 1, C: 1 } + * + * As well as expressing logic that would otherwise be memory or time limited: + * + * Immutable.Range(1, Infinity) + * .skip(1000) + * .map(n => -n) + * .filter(n => n % 2 === 0) + * .take(2) + * .reduce((r, n) => r * n, 1); + * // 1006008 + * + * Seq is often used to provide a rich collection API to JavaScript Object. + * + * Immutable.Seq({ x: 0, y: 1, z: 2 }).map(v => v * 2).toObject(); + * // { x: 0, y: 2, z: 4 } + */ + + export module Seq { + /** + * True if `maybeSeq` is a Seq, it is not backed by a concrete + * structure such as Map, List, or Set. + */ + function isSeq(maybeSeq: any): boolean; + + /** + * Returns a Seq of the values provided. Alias for `Seq.Indexed.of()`. + */ + function of(...values: T[]): Seq.Indexed; + + + /** + * `Seq` which represents key-value pairs. + */ + export module Keyed {} + + /** + * Always returns a Seq.Keyed, if input is not keyed, expects an + * iterable of [K, V] tuples. + */ + export function Keyed(): Seq.Keyed; + export function Keyed(seq: Iterable.Keyed): Seq.Keyed; + export function Keyed(seq: Iterable): Seq.Keyed; + export function Keyed(array: Array<[K,V]>): Seq.Keyed; + export function Keyed(obj: {[key: string]: V}): Seq.Keyed; + export function Keyed(iterator: Iterator<[K,V]>): Seq.Keyed; + export function Keyed(iterable: Iterable): Seq.Keyed; + + export interface Keyed extends Seq, Iterable.Keyed { + + /** + * Returns itself + */ + toSeq(): this + } + + + /** + * `Seq` which represents an ordered indexed list of values. + */ + module Indexed { + + /** + * Provides an Seq.Indexed of the values provided. + */ + function of(...values: T[]): Seq.Indexed; + } + + /** + * Always returns Seq.Indexed, discarding associated keys and + * supplying incrementing indices. + */ + export function Indexed(): Seq.Indexed; + export function Indexed(seq: Iterable.Indexed): Seq.Indexed; + export function Indexed(seq: Iterable.Set): Seq.Indexed; + export function Indexed(seq: Iterable.Keyed): Seq.Indexed<[K,V]>; + export function Indexed(array: Array): Seq.Indexed; + export function Indexed(iterator: Iterator): Seq.Indexed; + export function Indexed(iterable: Iterable): Seq.Indexed; + + export interface Indexed extends Seq, Iterable.Indexed { + + /** + * Returns itself + */ + toSeq(): this + } + + + /** + * `Seq` which represents a set of values. + * + * Because `Seq` are often lazy, `Seq.Set` does not provide the same guarantee + * of value uniqueness as the concrete `Set`. + */ + export module Set { + + /** + * Returns a Seq.Set of the provided values + */ + function of(...values: T[]): Seq.Set; + } + + /** + * Always returns a Seq.Set, discarding associated indices or keys. + */ + export function Set(): Seq.Set; + export function Set(seq: Iterable.Set): Seq.Set; + export function Set(seq: Iterable.Indexed): Seq.Set; + export function Set(seq: Iterable.Keyed): Seq.Set<[K,V]>; + export function Set(array: Array): Seq.Set; + export function Set(iterator: Iterator): Seq.Set; + export function Set(iterable: Iterable): Seq.Set; + + export interface Set extends Seq, Iterable.Set { + + /** + * Returns itself + */ + toSeq(): this + } + + } + + /** + * Creates a Seq. + * + * Returns a particular kind of `Seq` based on the input. + * + * * If a `Seq`, that same `Seq`. + * * If an `Iterable`, a `Seq` of the same kind (Keyed, Indexed, or Set). + * * If an Array-like, an `Seq.Indexed`. + * * If an Object with an Iterator, an `Seq.Indexed`. + * * If an Iterator, an `Seq.Indexed`. + * * If an Object, a `Seq.Keyed`. + * + */ + export function Seq(): Seq; + export function Seq(seq: Seq): Seq; + export function Seq(iterable: Iterable): Seq; + export function Seq(array: Array): Seq.Indexed; + export function Seq(obj: {[key: string]: V}): Seq.Keyed; + export function Seq(iterator: Iterator): Seq.Indexed; + export function Seq(iterable: Iterable): Seq.Indexed; + + export interface Seq extends Iterable { + + /** + * Some Seqs can describe their size lazily. When this is the case, + * size will be an integer. Otherwise it will be undefined. + * + * For example, Seqs returned from `map()` or `reverse()` + * preserve the size of the original `Seq` while `filter()` does not. + * + * Note: `Range`, `Repeat` and `Seq`s made from `Array`s and `Object`s will + * always have a size. + */ + size: number/*?*/; + + + // Force evaluation + + /** + * Because Sequences are lazy and designed to be chained together, they do + * not cache their results. For example, this map function is called a total + * of 6 times, as each `join` iterates the Seq of three values. + * + * var squares = Seq.of(1,2,3).map(x => x * x); + * squares.join() + squares.join(); + * + * If you know a `Seq` will be used multiple times, it may be more + * efficient to first cache it in memory. Here, the map function is called + * only 3 times. + * + * var squares = Seq.of(1,2,3).map(x => x * x).cacheResult(); + * squares.join() + squares.join(); + * + * Use this method judiciously, as it must fully evaluate a Seq which can be + * a burden on memory and possibly performance. + * + * Note: after calling `cacheResult`, a Seq will always have a `size`. + */ + cacheResult(): this; + } + + /** + * The `Iterable` is a set of (key, value) entries which can be iterated, and + * is the base class for all collections in `immutable`, allowing them to + * make use of all the Iterable methods (such as `map` and `filter`). + * + * Note: An iterable is always iterated in the same order, however that order + * may not always be well defined, as is the case for the `Map` and `Set`. + */ + export module Iterable { + /** + * True if `maybeIterable` is an Iterable, or any of its subclasses. + */ + function isIterable(maybeIterable: any): boolean; + + /** + * True if `maybeKeyed` is an Iterable.Keyed, or any of its subclasses. + */ + function isKeyed(maybeKeyed: any): boolean; + + /** + * True if `maybeIndexed` is a Iterable.Indexed, or any of its subclasses. + */ + function isIndexed(maybeIndexed: any): boolean; + + /** + * True if `maybeAssociative` is either a keyed or indexed Iterable. + */ + function isAssociative(maybeAssociative: any): boolean; + + /** + * True if `maybeOrdered` is an Iterable where iteration order is well + * defined. True for Iterable.Indexed as well as OrderedMap and OrderedSet. + */ + function isOrdered(maybeOrdered: any): boolean; + + + /** + * Keyed Iterables have discrete keys tied to each value. + * + * When iterating `Iterable.Keyed`, each iteration will yield a `[K, V]` + * tuple, in other words, `Iterable#entries` is the default iterator for + * Keyed Iterables. + */ + export module Keyed {} + + /** + * Creates an Iterable.Keyed + * + * Similar to `Iterable()`, however it expects iterable-likes of [K, V] + * tuples if not constructed from a Iterable.Keyed or JS Object. + */ + export function Keyed(iter: Iterable.Keyed): Iterable.Keyed; + export function Keyed(iter: Iterable): Iterable.Keyed; + export function Keyed(array: Array<[K,V]>): Iterable.Keyed; + export function Keyed(obj: {[key: string]: V}): Iterable.Keyed; + export function Keyed(iterator: Iterator<[K,V]>): Iterable.Keyed; + export function Keyed(iterable: Iterable): Iterable.Keyed; + + export interface Keyed extends Iterable { + + /** + * Returns Seq.Keyed. + * @override + */ + toSeq(): Seq.Keyed; + + + // Sequence functions + + /** + * Returns a new Iterable.Keyed of the same type where the keys and values + * have been flipped. + * + * Seq({ a: 'z', b: 'y' }).flip() // { z: 'a', y: 'b' } + * + */ + flip(): this; + + /** + * Returns a new Iterable.Keyed of the same type with keys passed through + * a `mapper` function. + * + * Seq({ a: 1, b: 2 }) + * .mapKeys(x => x.toUpperCase()) + * // Seq { A: 1, B: 2 } + * + */ + mapKeys( + mapper: (key?: K, value?: V, iter?: this) => M, + context?: any + ): /*this*/Iterable.Keyed; + + /** + * Returns a new Iterable.Keyed of the same type with entries + * ([key, value] tuples) passed through a `mapper` function. + * + * Seq({ a: 1, b: 2 }) + * .mapEntries(([k, v]) => [k.toUpperCase(), v * 2]) + * // Seq { A: 2, B: 4 } + * + */ + mapEntries( + mapper: ( + entry?: [K, V], + index?: number, + iter?: this + ) => [KM, VM], + context?: any + ): /*this*/Iterable.Keyed; + } + + + /** + * Indexed Iterables have incrementing numeric keys. They exhibit + * slightly different behavior than `Iterable.Keyed` for some methods in order + * to better mirror the behavior of JavaScript's `Array`, and add methods + * which do not make sense on non-indexed Iterables such as `indexOf`. + * + * Unlike JavaScript arrays, `Iterable.Indexed`s are always dense. "Unset" + * indices and `undefined` indices are indistinguishable, and all indices from + * 0 to `size` are visited when iterated. + * + * All Iterable.Indexed methods return re-indexed Iterables. In other words, + * indices always start at 0 and increment until size. If you wish to + * preserve indices, using them as keys, convert to a Iterable.Keyed by + * calling `toKeyedSeq`. + */ + export module Indexed {} + + /** + * Creates a new Iterable.Indexed. + */ + export function Indexed(iter: Iterable.Indexed): Iterable.Indexed; + export function Indexed(iter: Iterable.Set): Iterable.Indexed; + export function Indexed(iter: Iterable.Keyed): Iterable.Indexed<[K,V]>; + export function Indexed(array: Array): Iterable.Indexed; + export function Indexed(iterator: Iterator): Iterable.Indexed; + export function Indexed(iterable: Iterable): Iterable.Indexed; + + export interface Indexed extends Iterable { + + // Reading values + + /** + * Returns the value associated with the provided index, or notSetValue if + * the index is beyond the bounds of the Iterable. + * + * `index` may be a negative number, which indexes back from the end of the + * Iterable. `s.get(-1)` gets the last item in the Iterable. + */ + get(index: number, notSetValue?: T): T; + + + // Conversion to Seq + + /** + * Returns Seq.Indexed. + * @override + */ + toSeq(): Seq.Indexed; + + /** + * If this is an iterable of [key, value] entry tuples, it will return a + * Seq.Keyed of those entries. + */ + fromEntrySeq(): Seq.Keyed; + + + // Combination + + /** + * Returns an Iterable of the same type with `separator` between each item + * in this Iterable. + */ + interpose(separator: T): this; + + /** + * Returns an Iterable of the same type with the provided `iterables` + * interleaved into this iterable. + * + * The resulting Iterable includes the first item from each, then the + * second from each, etc. + * + * I.Seq.of(1,2,3).interleave(I.Seq.of('A','B','C')) + * // Seq [ 1, 'A', 2, 'B', 3, 'C' ] + * + * The shortest Iterable stops interleave. + * + * I.Seq.of(1,2,3).interleave( + * I.Seq.of('A','B'), + * I.Seq.of('X','Y','Z') + * ) + * // Seq [ 1, 'A', 'X', 2, 'B', 'Y' ] + */ + interleave(...iterables: Array>): this; + + /** + * Splice returns a new indexed Iterable by replacing a region of this + * Iterable with new values. If values are not provided, it only skips the + * region to be removed. + * + * `index` may be a negative number, which indexes back from the end of the + * Iterable. `s.splice(-2)` splices after the second to last item. + * + * Seq(['a','b','c','d']).splice(1, 2, 'q', 'r', 's') + * // Seq ['a', 'q', 'r', 's', 'd'] + * + */ + splice( + index: number, + removeNum: number, + ...values: Array | T> + ): this; + + /** + * Returns an Iterable of the same type "zipped" with the provided + * iterables. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * var a = Seq.of(1, 2, 3); + * var b = Seq.of(4, 5, 6); + * var c = a.zip(b); // Seq [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * + */ + zip(...iterables: Array>): this; + + /** + * Returns an Iterable of the same type "zipped" with the provided + * iterables by using a custom `zipper` function. + * + * var a = Seq.of(1, 2, 3); + * var b = Seq.of(4, 5, 6); + * var c = a.zipWith((a, b) => a + b, b); // Seq [ 5, 7, 9 ] + * + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherIterable: Iterable + ): Iterable.Indexed; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherIterable: Iterable, + thirdIterable: Iterable + ): Iterable.Indexed; + zipWith( + zipper: (...any: Array) => Z, + ...iterables: Array> + ): Iterable.Indexed; + + + // Search for value + + /** + * Returns the first index at which a given value can be found in the + * Iterable, or -1 if it is not present. + */ + indexOf(searchValue: T): number; + + /** + * Returns the last index at which a given value can be found in the + * Iterable, or -1 if it is not present. + */ + lastIndexOf(searchValue: T): number; + + /** + * Returns the first index in the Iterable where a value satisfies the + * provided predicate function. Otherwise -1 is returned. + */ + findIndex( + predicate: (value?: T, index?: number, iter?: this) => boolean, + context?: any + ): number; + + /** + * Returns the last index in the Iterable where a value satisfies the + * provided predicate function. Otherwise -1 is returned. + */ + findLastIndex( + predicate: (value?: T, index?: number, iter?: this) => boolean, + context?: any + ): number; + } + + + /** + * Set Iterables only represent values. They have no associated keys or + * indices. Duplicate values are possible in Seq.Sets, however the + * concrete `Set` does not allow duplicate values. + * + * Iterable methods on Iterable.Set such as `map` and `forEach` will provide + * the value as both the first and second arguments to the provided function. + * + * var seq = Seq.Set.of('A', 'B', 'C'); + * assert.equal(seq.every((v, k) => v === k), true); + * + */ + export module Set {} + + /** + * Similar to `Iterable()`, but always returns a Iterable.Set. + */ + export function Set(iter: Iterable.Set): Iterable.Set; + export function Set(iter: Iterable.Indexed): Iterable.Set; + export function Set(iter: Iterable.Keyed): Iterable.Set<[K,V]>; + export function Set(array: Array): Iterable.Set; + export function Set(iterator: Iterator): Iterable.Set; + export function Set(iterable: Iterable): Iterable.Set; + + export interface Set extends Iterable { + + /** + * Returns Seq.Set. + * @override + */ + toSeq(): Seq.Set; + } + + } + + /** + * Creates an Iterable. + * + * The type of Iterable created is based on the input. + * + * * If an `Iterable`, that same `Iterable`. + * * If an Array-like, an `Iterable.Indexed`. + * * If an Object with an Iterator, an `Iterable.Indexed`. + * * If an Iterator, an `Iterable.Indexed`. + * * If an Object, an `Iterable.Keyed`. + * + * This methods forces the conversion of Objects and Strings to Iterables. + * If you want to ensure that a Iterable of one item is returned, use + * `Seq.of`. + */ + export function Iterable(iterable: Iterable): Iterable; + export function Iterable(array: Array): Iterable.Indexed; + export function Iterable(obj: {[key: string]: V}): Iterable.Keyed; + export function Iterable(iterator: Iterator): Iterable.Indexed; + export function Iterable(iterable: Iterable): Iterable.Indexed; + export function Iterable(value: V): Iterable.Indexed; + + export interface Iterable { + + // Value equality + + /** + * True if this and the other Iterable have value equality, as defined + * by `Immutable.is()`. + * + * Note: This is equivalent to `Immutable.is(this, other)`, but provided to + * allow for chained expressions. + */ + equals(other: Iterable): boolean; + + /** + * Computes and returns the hashed identity for this Iterable. + * + * The `hashCode` of an Iterable is used to determine potential equality, + * and is used when adding this to a `Set` or as a key in a `Map`, enabling + * lookup via a different instance. + * + * var a = List.of(1, 2, 3); + * var b = List.of(1, 2, 3); + * assert(a !== b); // different instances + * var set = Set.of(a); + * assert(set.has(b) === true); + * + * If two values have the same `hashCode`, they are [not guaranteed + * to be equal][Hash Collision]. If two values have different `hashCode`s, + * they must not be equal. + * + * [Hash Collision]: http://en.wikipedia.org/wiki/Collision_(computer_science) + */ + hashCode(): number; + + + // Reading values + + /** + * Returns the value associated with the provided key, or notSetValue if + * the Iterable does not contain this key. + * + * Note: it is possible a key may be associated with an `undefined` value, + * so if `notSetValue` is not provided and this method returns `undefined`, + * that does not guarantee the key was not found. + */ + get(key: K, notSetValue?: V): V; + + /** + * True if a key exists within this `Iterable`, using `Immutable.is` to determine equality + */ + has(key: K): boolean; + + /** + * True if a value exists within this `Iterable`, using `Immutable.is` to determine equality + * @alias contains + */ + includes(value: V): boolean; + contains(value: V): boolean; + + /** + * The first value in the Iterable. + */ + first(): V; + + /** + * The last value in the Iterable. + */ + last(): V; + + + // Reading deep values + + /** + * Returns the value found by following a path of keys or indices through + * nested Iterables. + */ + getIn(searchKeyPath: Array, notSetValue?: any): any; + getIn(searchKeyPath: Iterable, notSetValue?: any): any; + + /** + * True if the result of following a path of keys or indices through nested + * Iterables results in a set value. + */ + hasIn(searchKeyPath: Array): boolean; + hasIn(searchKeyPath: Iterable): boolean; + + + // Conversion to JavaScript types + + /** + * Deeply converts this Iterable to equivalent JS. + * + * `Iterable.Indexeds`, and `Iterable.Sets` become Arrays, while + * `Iterable.Keyeds` become Objects. + * + * @alias toJSON + */ + toJS(): any; + + /** + * Shallowly converts this iterable to an Array, discarding keys. + */ + toArray(): Array; + + /** + * Shallowly converts this Iterable to an Object. + * + * Throws if keys are not strings. + */ + toObject(): { [key: string]: V }; + + + // Conversion to Collections + + /** + * Converts this Iterable to a Map, Throws if keys are not hashable. + * + * Note: This is equivalent to `Map(this.toKeyedSeq())`, but provided + * for convenience and to allow for chained expressions. + */ + toMap(): Map; + + /** + * Converts this Iterable to a Map, maintaining the order of iteration. + * + * Note: This is equivalent to `OrderedMap(this.toKeyedSeq())`, but + * provided for convenience and to allow for chained expressions. + */ + toOrderedMap(): OrderedMap; + + /** + * Converts this Iterable to a Set, discarding keys. Throws if values + * are not hashable. + * + * Note: This is equivalent to `Set(this)`, but provided to allow for + * chained expressions. + */ + toSet(): Set; + + /** + * Converts this Iterable to a Set, maintaining the order of iteration and + * discarding keys. + * + * Note: This is equivalent to `OrderedSet(this.valueSeq())`, but provided + * for convenience and to allow for chained expressions. + */ + toOrderedSet(): OrderedSet; + + /** + * Converts this Iterable to a List, discarding keys. + * + * Note: This is equivalent to `List(this)`, but provided to allow + * for chained expressions. + */ + toList(): List; + + /** + * Converts this Iterable to a Stack, discarding keys. Throws if values + * are not hashable. + * + * Note: This is equivalent to `Stack(this)`, but provided to allow for + * chained expressions. + */ + toStack(): Stack; + + + // Conversion to Seq + + /** + * Converts this Iterable to a Seq of the same kind (indexed, + * keyed, or set). + */ + toSeq(): Seq; + + /** + * Returns a Seq.Keyed from this Iterable where indices are treated as keys. + * + * This is useful if you want to operate on an + * Iterable.Indexed and preserve the [index, value] pairs. + * + * The returned Seq will have identical iteration order as + * this Iterable. + * + * Example: + * + * var indexedSeq = Immutable.Seq.of('A', 'B', 'C'); + * indexedSeq.filter(v => v === 'B').toString() // Seq [ 'B' ] + * var keyedSeq = indexedSeq.toKeyedSeq(); + * keyedSeq.filter(v => v === 'B').toString() // Seq { 1: 'B' } + * + */ + toKeyedSeq(): Seq.Keyed; + + /** + * Returns an Seq.Indexed of the values of this Iterable, discarding keys. + */ + toIndexedSeq(): Seq.Indexed; + + /** + * Returns a Seq.Set of the values of this Iterable, discarding keys. + */ + toSetSeq(): Seq.Set; + + + // Iterators + + /** + * An iterator of this `Iterable`'s keys. + * + * Note: this will return an ES6 iterator which does not support Immutable JS sequence algorithms. Use `keySeq` instead, if this is what you want. + */ + keys(): Iterator; + + /** + * An iterator of this `Iterable`'s values. + * + * Note: this will return an ES6 iterator which does not support Immutable JS sequence algorithms. Use `valueSeq` instead, if this is what you want. + */ + values(): Iterator; + + /** + * An iterator of this `Iterable`'s entries as `[key, value]` tuples. + * + * Note: this will return an ES6 iterator which does not support Immutable JS sequence algorithms. Use `entrySeq` instead, if this is what you want. + */ + entries(): Iterator<[K, V]>; + + + // Iterables (Seq) + + /** + * Returns a new Seq.Indexed of the keys of this Iterable, + * discarding values. + */ + keySeq(): Seq.Indexed; + + /** + * Returns an Seq.Indexed of the values of this Iterable, discarding keys. + */ + valueSeq(): Seq.Indexed; + + /** + * Returns a new Seq.Indexed of [key, value] tuples. + */ + entrySeq(): Seq.Indexed<[K, V]>; + + + // Sequence algorithms + + /** + * Returns a new Iterable of the same type with values passed through a + * `mapper` function. + * + * Seq({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { a: 10, b: 20 } + * + */ + map( + mapper: (value?: V, key?: K, iter?: this) => M, + context?: any + ): /*this*/Iterable; + + /** + * Returns a new Iterable of the same type with only the entries for which + * the `predicate` function returns true. + * + * Seq({a:1,b:2,c:3,d:4}).filter(x => x % 2 === 0) + * // Seq { b: 2, d: 4 } + * + */ + filter( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): this; + + /** + * Returns a new Iterable of the same type with only the entries for which + * the `predicate` function returns false. + * + * Seq({a:1,b:2,c:3,d:4}).filterNot(x => x % 2 === 0) + * // Seq { a: 1, c: 3 } + * + */ + filterNot( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): this; + + /** + * Returns a new Iterable of the same type in reverse order. + */ + reverse(): this; + + /** + * Returns a new Iterable of the same type which includes the same entries, + * stably sorted by using a `comparator`. + * + * If a `comparator` is not provided, a default comparator uses `<` and `>`. + * + * `comparator(valueA, valueB)`: + * + * * Returns `0` if the elements should not be swapped. + * * Returns `-1` (or any negative number) if `valueA` comes before `valueB` + * * Returns `1` (or any positive number) if `valueA` comes after `valueB` + * * Is pure, i.e. it must always return the same value for the same pair + * of values. + * + * When sorting collections which have no defined order, their ordered + * equivalents will be returned. e.g. `map.sort()` returns OrderedMap. + */ + sort(comparator?: (valueA: V, valueB: V) => number): this; + + /** + * Like `sort`, but also accepts a `comparatorValueMapper` which allows for + * sorting by more sophisticated means: + * + * hitters.sortBy(hitter => hitter.avgHits); + * + */ + sortBy( + comparatorValueMapper: (value?: V, key?: K, iter?: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): this; + + /** + * Returns a `Iterable.Keyed` of `Iterable.Keyeds`, grouped by the return + * value of the `grouper` function. + * + * Note: This is always an eager operation. + */ + groupBy( + grouper: (value?: V, key?: K, iter?: this) => G, + context?: any + ): Seq.Keyed; + + + // Side effects + + /** + * The `sideEffect` is executed for every entry in the Iterable. + * + * Unlike `Array#forEach`, if any call of `sideEffect` returns + * `false`, the iteration will stop. Returns the number of entries iterated + * (including the last iteration which returned false). + */ + forEach( + sideEffect: (value?: V, key?: K, iter?: this) => any, + context?: any + ): number; + + + // Creating subsets + + /** + * Returns a new Iterable of the same type representing a portion of this + * Iterable from start up to but not including end. + * + * If begin is negative, it is offset from the end of the Iterable. e.g. + * `slice(-2)` returns a Iterable of the last two entries. If it is not + * provided the new Iterable will begin at the beginning of this Iterable. + * + * If end is negative, it is offset from the end of the Iterable. e.g. + * `slice(0, -1)` returns an Iterable of everything but the last entry. If + * it is not provided, the new Iterable will continue through the end of + * this Iterable. + * + * If the requested slice is equivalent to the current Iterable, then it + * will return itself. + */ + slice(begin?: number, end?: number): this; + + /** + * Returns a new Iterable of the same type containing all entries except + * the first. + */ + rest(): this; + + /** + * Returns a new Iterable of the same type containing all entries except + * the last. + */ + butLast(): this; + + /** + * Returns a new Iterable of the same type which excludes the first `amount` + * entries from this Iterable. + */ + skip(amount: number): this; + + /** + * Returns a new Iterable of the same type which excludes the last `amount` + * entries from this Iterable. + */ + skipLast(amount: number): this; + + /** + * Returns a new Iterable of the same type which includes entries starting + * from when `predicate` first returns false. + * + * Seq.of('dog','frog','cat','hat','god') + * .skipWhile(x => x.match(/g/)) + * // Seq [ 'cat', 'hat', 'god' ] + * + */ + skipWhile( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): this; + + /** + * Returns a new Iterable of the same type which includes entries starting + * from when `predicate` first returns true. + * + * Seq.of('dog','frog','cat','hat','god') + * .skipUntil(x => x.match(/hat/)) + * // Seq [ 'hat', 'god' ] + * + */ + skipUntil( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): this; + + /** + * Returns a new Iterable of the same type which includes the first `amount` + * entries from this Iterable. + */ + take(amount: number): this; + + /** + * Returns a new Iterable of the same type which includes the last `amount` + * entries from this Iterable. + */ + takeLast(amount: number): this; + + /** + * Returns a new Iterable of the same type which includes entries from this + * Iterable as long as the `predicate` returns true. + * + * Seq.of('dog','frog','cat','hat','god') + * .takeWhile(x => x.match(/o/)) + * // Seq [ 'dog', 'frog' ] + * + */ + takeWhile( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): this; + + /** + * Returns a new Iterable of the same type which includes entries from this + * Iterable as long as the `predicate` returns false. + * + * Seq.of('dog','frog','cat','hat','god').takeUntil(x => x.match(/at/)) + * // ['dog', 'frog'] + * + */ + takeUntil( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): this; + + + // Combination + + /** + * Returns a new Iterable of the same type with other values and + * iterable-like concatenated to this one. + * + * For Seqs, all entries will be present in + * the resulting iterable, even if they have the same key. + */ + concat(...valuesOrIterables: Array|V>): this; + + /** + * Flattens nested Iterables. + * + * Will deeply flatten the Iterable by default, returning an Iterable of the + * same type, but a `depth` can be provided in the form of a number or + * boolean (where true means to shallowly flatten one level). A depth of 0 + * (or shallow: false) will deeply flatten. + * + * Flattens only others Iterable, not Arrays or Objects. + * + * Note: `flatten(true)` operates on Iterable> and + * returns Iterable + */ + flatten(depth?: number): this; + flatten(shallow?: boolean): this; + + /** + * Flat-maps the Iterable, returning an Iterable of the same type. + * + * Similar to `iter.map(...).flatten(true)`. + */ + flatMap( + mapper: (value?: V, key?: K, iter?: this) => Iterable, + context?: any + ): /*this*/Iterable; + flatMap( + mapper: (value?: V, key?: K, iter?: this) => /*iterable-like*/any, + context?: any + ): /*this*/Iterable; + + + // Reducing a value + + /** + * Reduces the Iterable to a value by calling the `reducer` for every entry + * in the Iterable and passing along the reduced value. + * + * If `initialReduction` is not provided, or is null, the first item in the + * Iterable will be used. + * + * @see `Array#reduce`. + */ + reduce( + reducer: (reduction?: R, value?: V, key?: K, iter?: this) => R, + initialReduction?: R, + context?: any + ): R; + + /** + * Reduces the Iterable in reverse (from the right side). + * + * Note: Similar to this.reverse().reduce(), and provided for parity + * with `Array#reduceRight`. + */ + reduceRight( + reducer: (reduction?: R, value?: V, key?: K, iter?: this) => R, + initialReduction?: R, + context?: any + ): R; + + /** + * True if `predicate` returns true for all entries in the Iterable. + */ + every( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): boolean; + + /** + * True if `predicate` returns true for any entry in the Iterable. + */ + some( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): boolean; + + /** + * Joins values together as a string, inserting a separator between each. + * The default separator is `","`. + */ + join(separator?: string): string; + + /** + * Returns true if this Iterable includes no values. + * + * For some lazy `Seq`, `isEmpty` might need to iterate to determine + * emptiness. At most one iteration will occur. + */ + isEmpty(): boolean; + + /** + * Returns the size of this Iterable. + * + * Regardless of if this Iterable can describe its size lazily (some Seqs + * cannot), this method will always return the correct size. E.g. it + * evaluates a lazy `Seq` if necessary. + * + * If `predicate` is provided, then this returns the count of entries in the + * Iterable for which the `predicate` returns true. + */ + count(): number; + count( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): number; + + /** + * Returns a `Seq.Keyed` of counts, grouped by the return value of + * the `grouper` function. + * + * Note: This is not a lazy operation. + */ + countBy( + grouper: (value?: V, key?: K, iter?: this) => G, + context?: any + ): Seq.Keyed; + + + // Search for value + + /** + * Returns the first value for which the `predicate` returns true. + */ + find( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any, + notSetValue?: V + ): V; + + /** + * Returns the last value for which the `predicate` returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLast( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any, + notSetValue?: V + ): V; + + /** + * Returns the first [key, value] entry for which the `predicate` returns true. + */ + findEntry( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any, + notSetValue?: V + ): [K, V]; + + /** + * Returns the last [key, value] entry for which the `predicate` + * returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLastEntry( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any, + notSetValue?: V + ): [K, V]; + + /** + * Returns the key for which the `predicate` returns true. + */ + findKey( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): K; + + /** + * Returns the last key for which the `predicate` returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLastKey( + predicate: (value?: V, key?: K, iter?: this) => boolean, + context?: any + ): K; + + /** + * Returns the key associated with the search value, or undefined. + */ + keyOf(searchValue: V): K; + + /** + * Returns the last key associated with the search value, or undefined. + */ + lastKeyOf(searchValue: V): K; + + /** + * Returns the maximum value in this collection. If any values are + * comparatively equivalent, the first one found will be returned. + * + * The `comparator` is used in the same way as `Iterable#sort`. If it is not + * provided, the default comparator is `>`. + * + * When two values are considered equivalent, the first encountered will be + * returned. Otherwise, `max` will operate independent of the order of input + * as long as the comparator is commutative. The default comparator `>` is + * commutative *only* when types do not differ. + * + * If `comparator` returns 0 and either value is NaN, undefined, or null, + * that value will be returned. + */ + max(comparator?: (valueA: V, valueB: V) => number): V; + + /** + * Like `max`, but also accepts a `comparatorValueMapper` which allows for + * comparing by more sophisticated means: + * + * hitters.maxBy(hitter => hitter.avgHits); + * + */ + maxBy( + comparatorValueMapper: (value?: V, key?: K, iter?: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): V; + + /** + * Returns the minimum value in this collection. If any values are + * comparatively equivalent, the first one found will be returned. + * + * The `comparator` is used in the same way as `Iterable#sort`. If it is not + * provided, the default comparator is `<`. + * + * When two values are considered equivalent, the first encountered will be + * returned. Otherwise, `min` will operate independent of the order of input + * as long as the comparator is commutative. The default comparator `<` is + * commutative *only* when types do not differ. + * + * If `comparator` returns 0 and either value is NaN, undefined, or null, + * that value will be returned. + */ + min(comparator?: (valueA: V, valueB: V) => number): V; + + /** + * Like `min`, but also accepts a `comparatorValueMapper` which allows for + * comparing by more sophisticated means: + * + * hitters.minBy(hitter => hitter.avgHits); + * + */ + minBy( + comparatorValueMapper: (value?: V, key?: K, iter?: this) => C, + comparator?: (valueA: C, valueB: C) => number + ): V; + + + // Comparison + + /** + * True if `iter` includes every value in this Iterable. + */ + isSubset(iter: Iterable): boolean; + isSubset(iter: Array): boolean; + + /** + * True if this Iterable includes every value in `iter`. + */ + isSuperset(iter: Iterable): boolean; + isSuperset(iter: Array): boolean; + + + /** + * Note: this is here as a convenience to work around an issue with + * TypeScript https://github.com/Microsoft/TypeScript/issues/285, but + * Iterable does not define `size`, instead `Seq` defines `size` as + * nullable number, and `Collection` defines `size` as always a number. + * + * @ignore + */ + size: number; + } + + + /** + * Collection is the abstract base class for concrete data structures. It + * cannot be constructed directly. + * + * Implementations should extend one of the subclasses, `Collection.Keyed`, + * `Collection.Indexed`, or `Collection.Set`. + */ + export module Collection { + + + /** + * `Collection` which represents key-value pairs. + */ + export module Keyed {} + + export interface Keyed extends Collection, Iterable.Keyed { + + /** + * Returns Seq.Keyed. + * @override + */ + toSeq(): Seq.Keyed; + } + + + /** + * `Collection` which represents ordered indexed values. + */ + export module Indexed {} + + export interface Indexed extends Collection, Iterable.Indexed { + + /** + * Returns Seq.Indexed. + * @override + */ + toSeq(): Seq.Indexed; + } + + + /** + * `Collection` which represents values, unassociated with keys or indices. + * + * `Collection.Set` implementations should guarantee value uniqueness. + */ + export module Set {} + + export interface Set extends Collection, Iterable.Set { + + /** + * Returns Seq.Set. + * @override + */ + toSeq(): Seq.Set; + } + + } + + export interface Collection extends Iterable { + + /** + * All collections maintain their current `size` as an integer. + */ + size: number; + } + + + /** + * ES6 Iterator. + * + * This is not part of the Immutable library, but a common interface used by + * many types in ES6 JavaScript. + * + * @ignore + */ + export interface Iterator { + next(): { value: T; done: boolean; } + } + +} + +declare module "immutable" { + export = __Immutable +} From c16125cd7119cd3a3a82133649c2d68afcc37345 Mon Sep 17 00:00:00 2001 From: Dan Marshall Date: Thu, 2 Jun 2016 05:45:30 -0700 Subject: [PATCH 0415/1506] Updates to Bezier-js (#9441) * Added definitions for Bezier.Js * updates for maker.js and bezier.js * removed copyright * deleted bezierjs * Added definitions for Bezier.Js * updates for maker.js and bezier.js * deleted bezierjs * changed name to DefinitelyTyped * update tests for 0.8.0 * rename to bezier-js * add pdfkit reference * public clockwise * added signatures for split() * added extra signature for split() * Added definitions for Bezier.Js * updates for maker.js and bezier.js * removed copyright * deleted bezierjs * Added definitions for Bezier.Js * deleted bezierjs * changed name to DefinitelyTyped * rename to bezier-js * add pdfkit reference * public clockwise * added signatures for split() * added extra signature for split() --- bezier-js/bezier-js-tests.ts | 5 +++-- bezier-js/bezier-js.d.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bezier-js/bezier-js-tests.ts b/bezier-js/bezier-js-tests.ts index 1814d67dc0..54c629d11b 100644 --- a/bezier-js/bezier-js-tests.ts +++ b/bezier-js/bezier-js-tests.ts @@ -31,7 +31,7 @@ function test() { bezier.get(1); bezier.getLUT()[0].x; bezier.hull(0); - bezier.inflections().values; + bezier.extrema(); bezier.intersects(bezier); bezier.length(); bezier.lineIntersects(line); @@ -48,7 +48,8 @@ function test() { bezier.scale(4); bezier.selfintersects(); bezier.simple(); - bezier.split(0, 1); + bezier.split(0, 1).clockwise; + bezier.split(0.5).left; bezier.toSVG(); bezier.update(); diff --git a/bezier-js/bezier-js.d.ts b/bezier-js/bezier-js.d.ts index 7d54a19d95..35e5cc19f1 100644 --- a/bezier-js/bezier-js.d.ts +++ b/bezier-js/bezier-js.d.ts @@ -117,7 +117,8 @@ declare module BezierJs { private __normal3(t); private __normal(t); hull(t: number): Point[]; - split(t1: number, t2?: number): Bezier | Split; + split(t1: number): Split; + split(t1: number, t2: number): Bezier; extrema(): Inflection; bbox(): BBox; overlaps(curve: Bezier): boolean; From 191daf6112933a8edb5fd9011a76bf42a8e36b12 Mon Sep 17 00:00:00 2001 From: Caleb Eggensperger Date: Thu, 2 Jun 2016 08:49:24 -0400 Subject: [PATCH 0416/1506] Fix component router breakage (#9442) --- angularjs/angular-component-router.d.ts | 51 +++++++++++++++++++++++++ angularjs/angular.d.ts | 44 --------------------- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/angularjs/angular-component-router.d.ts b/angularjs/angular-component-router.d.ts index 2c56ef3a21..3b037b58b1 100644 --- a/angularjs/angular-component-router.d.ts +++ b/angularjs/angular-component-router.d.ts @@ -428,4 +428,55 @@ declare namespace angular { interface OnReuse { $routerOnReuse(next?: angular.ComponentInstruction, prev?: angular.ComponentInstruction): any; } + + /** + * Runtime representation a type that a Component or other object is instances of. + * + * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by + * the `MyCustomComponent` constructor function. + */ + interface Type extends Function { + } + + /** + * `RouteDefinition` defines a route within a {@link RouteConfig} decorator. + * + * Supported keys: + * - `path` or `aux` (requires exactly one of these) + * - `component`, `loader`, `redirectTo` (requires exactly one of these) + * - `name` or `as` (optional) (requires exactly one of these) + * - `data` (optional) + * + * See also {@link Route}, {@link AsyncRoute}, {@link AuxRoute}, and {@link Redirect}. + */ + interface RouteDefinition { + path?: string; + aux?: string; + component?: Type | ComponentDefinition | string; + loader?: Function; + redirectTo?: any[]; + as?: string; + name?: string; + data?: any; + useAsDefault?: boolean; + } + + /** + * Represents either a component type (`type` is `component`) or a loader function + * (`type` is `loader`). + * + * See also {@link RouteDefinition}. + */ + interface ComponentDefinition { + type: string; + loader?: Function; + component?: Type; + } + + // Supplement IComponentOptions from angular.d.ts with router-specific + // fields. + interface IComponentOptions { + $canActivate?: () => boolean; + $routeConfig?: RouteDefinition[]; + } } diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 204c645b0c..983c0ca799 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1656,50 +1656,6 @@ declare namespace angular { // see http://angularjs.blogspot.com.br/2015/11/angularjs-15-beta2-and-14-releases.html // and http://toddmotto.com/exploring-the-angular-1-5-component-method/ /////////////////////////////////////////////////////////////////////////// - /** - * Runtime representation a type that a Component or other object is instances of. - * - * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by - * the `MyCustomComponent` constructor function. - */ - interface Type extends Function { - } - - /** - * `RouteDefinition` defines a route within a {@link RouteConfig} decorator. - * - * Supported keys: - * - `path` or `aux` (requires exactly one of these) - * - `component`, `loader`, `redirectTo` (requires exactly one of these) - * - `name` or `as` (optional) (requires exactly one of these) - * - `data` (optional) - * - * See also {@link Route}, {@link AsyncRoute}, {@link AuxRoute}, and {@link Redirect}. - */ - interface RouteDefinition { - path?: string; - aux?: string; - component?: Type | ComponentDefinition | string; - loader?: Function; - redirectTo?: any[]; - as?: string; - name?: string; - data?: any; - useAsDefault?: boolean; - } - - /** - * Represents either a component type (`type` is `component`) or a loader function - * (`type` is `loader`). - * - * See also {@link RouteDefinition}. - */ - interface ComponentDefinition { - type: string; - loader?: Function; - component?: Type; - } - /** * Component definition object (a simplified directive definition object) */ From 61d2636c2cec3f3e290c9cf3d60646a192d817bc Mon Sep 17 00:00:00 2001 From: Chris Manning Date: Fri, 3 Jun 2016 00:50:23 +1200 Subject: [PATCH 0417/1506] Changed hapi IRouteConfiguration handler property to be optional (#9439) The hapi IRouteConfiguration handler property should be optional as the handler can alternatively be provided via the config property using the handler property of IRouteAdditionalConfigurationOptions. --- hapi/hapi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi/hapi.d.ts b/hapi/hapi.d.ts index 05f4aa1047..2867dd7de9 100644 --- a/hapi/hapi.d.ts +++ b/hapi/hapi.d.ts @@ -875,7 +875,7 @@ declare module "hapi" { /** - an optional domain string or an array of domain strings for limiting the route to only requests with a matching host header field.Matching is done against the hostname part of the header only (excluding the port).Defaults to all hosts.*/ vhost?: string; /** - (required) the function called to generate the response after successful authentication and validation.The handler function is described in Route handler.If set to a string, the value is parsed the same way a prerequisite server method string shortcut is processed.Alternatively, handler can be assigned an object with a single key using the name of a registered handler type and value with the options passed to the registered handler.*/ - handler: ISessionHandler | string | IRouteHandlerConfig; + handler?: ISessionHandler | string | IRouteHandlerConfig; /** - additional route options.*/ config?: IRouteAdditionalConfigurationOptions; } From d4ab7731d392a74f71c47b0e35adee5e50863737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20W=C3=BCrsch?= Date: Thu, 2 Jun 2016 14:51:06 +0200 Subject: [PATCH 0418/1506] WheelEvent extends MouseEvent not SyntheticEvent (#9437) --- react/react.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/react.d.ts b/react/react.d.ts index 4dd185d89c..ce9d188d10 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -347,7 +347,7 @@ declare namespace __React { view: AbstractView; } - interface WheelEvent extends SyntheticEvent { + interface WheelEvent extends MouseEvent { deltaMode: number; deltaX: number; deltaY: number; From 65b05d550d7aeb09b8e755c89d2c7aecdd5baf04 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 2 Jun 2016 21:54:06 +0900 Subject: [PATCH 0419/1506] TypeScript-STL & Samchon-Framework (#9448) TypeScript-STL v0.9.9 Samchon Framework v1.1.0 --- .../samchon-collection-tests.ts | 7 + samchon-collection/samchon-collection.d.ts | 23 + samchon-framework/samchon-framework-tests.ts | 7 + samchon-framework/samchon-framework.d.ts | 2710 +++++++++++++++++ samchon-library/samchon-library-tests.ts | 7 + samchon-library/samchon-library.d.ts | 23 + typescript-stl/typescript-stl.d.ts | 2187 ++++++++----- 7 files changed, 4119 insertions(+), 845 deletions(-) create mode 100644 samchon-collection/samchon-collection-tests.ts create mode 100644 samchon-collection/samchon-collection.d.ts create mode 100644 samchon-framework/samchon-framework-tests.ts create mode 100644 samchon-framework/samchon-framework.d.ts create mode 100644 samchon-library/samchon-library-tests.ts create mode 100644 samchon-library/samchon-library.d.ts diff --git a/samchon-collection/samchon-collection-tests.ts b/samchon-collection/samchon-collection-tests.ts new file mode 100644 index 0000000000..028eb32caa --- /dev/null +++ b/samchon-collection/samchon-collection-tests.ts @@ -0,0 +1,7 @@ +/// + +declare var global: any; +declare var require: (name: string) => any; + +collection = require("samchon-collection"); +console.log(collection); \ No newline at end of file diff --git a/samchon-collection/samchon-collection.d.ts b/samchon-collection/samchon-collection.d.ts new file mode 100644 index 0000000000..3decceb20b --- /dev/null +++ b/samchon-collection/samchon-collection.d.ts @@ -0,0 +1,23 @@ +// Type definitions for Samchon Collection v0.0.2 +// Project: https://github.com/samchon/framework +// Definitions by: Jeongho Nam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// ------------------------------------------------------------------------------------ +// In Samchon Collection, merging multiple 'ts' files to a module is not possible yet. +// Instead of using "import" instruction, use such trick: +// +// +// declare var global: any; +// declare var require: Function; +// +// collection = require("samchon-collection"); +// let cont: collection.ArrayCollection = new collection.ArrayCollection(); +// +// +// Those declaration of global and require can be substituted by using "node.d.ts" +// ------------------------------------------------------------------------------------ + +/// + +declare var collection: typeof samchon.collection; \ No newline at end of file diff --git a/samchon-framework/samchon-framework-tests.ts b/samchon-framework/samchon-framework-tests.ts new file mode 100644 index 0000000000..5820b158c3 --- /dev/null +++ b/samchon-framework/samchon-framework-tests.ts @@ -0,0 +1,7 @@ +/// + +declare var global: any; +declare var require: any; + +global["samchon"] = require("samchon-framework"); +console.log(samchon); \ No newline at end of file diff --git a/samchon-framework/samchon-framework.d.ts b/samchon-framework/samchon-framework.d.ts new file mode 100644 index 0000000000..9dd52e9503 --- /dev/null +++ b/samchon-framework/samchon-framework.d.ts @@ -0,0 +1,2710 @@ +// Type definitions for Samchon Framework v1.1.0 +// Project: https://github.com/samchon/framework +// Definitions by: Jeongho Nam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// ------------------------------------------------------------------------------------ +// In Samchon Framework, merging multiple 'ts' files to a module is not possible yet. +// Instead of using "import" instruction, use such trick: +// +// +// declare var global: any; +// declare var require: Function; +// +// global["samchon"] = require("samchon-framework"); +// let invoke: samchon.protocol.Invoke = new samchon.protocol.Invoke("setValue", 3); +// +// +// Those declaration of global and require can be substituted by using "node.d.ts" +// ------------------------------------------------------------------------------------ + +/// + +/** + * Samchon Framework, A SDN framework. + * + * @author Jeongho Nam + */ +declare namespace samchon { +} +declare namespace samchon.library { +} +declare namespace samchon.collection { +} +declare namespace samchon.protocol { +} +declare namespace samchon.protocol.service { +} +declare namespace samchon.protocol.master { +} +declare namespace samchon.protocol.slave { +} +declare namespace samchon.library { + /** + *

XML is a class representing a tree structued xml objects.

+ *

The XML class provides methods and properties for working with XML objects.

+ * + *

The XML class (along with the XMLList and Namespace) implements + * the powerful XML-handling standard defined in ECMAScript for XML (E4X) specification.

+ * + *

XML class has a recursive, hierarchical relationship.

+ * + *

Relationships between XML and XMLList

+ *
    + *
  • XML contains XMLList from dictionary of XMLList.
  • + *
  • XMLList contains XML from vector of XML.
  • + *
+ * + *

Note

+ *

Do not abuse values for expressing member variables.

+ * + * + * + * + * + * + * + * + * + * + *
Standard UsageNon-standard usage abusing value
+ * <memberList>
+ *      <member id='jhnam88' name='Jeongho+Nam' birthdate='1988-03-11' />
+ *      <member id='master' name='Administartor' birthdate='2011-07-28' />
+ * </memberList> + *
+ * <member>
+ *      <id>jhnam88</id>
+ *      <name>Jeongho+Nam</name>
+ *      <birthdate>1988-03-11</birthdate>
+ * </member> + *
+ * + * @author Jeongho Nam + */ + class XML extends std.HashMap { + /** + *

Tag name of the XML.

+ * + *
    + *
  • \<tag label='property' /\>: tag => \"tag\"
  • + *
  • \<price high='1500' low='1300' open='1450' close='1320' /\>: tag => \"price\"
  • + *
+ */ + private tag; + /** + *

Value of the XML.

+ * + *
    + *
  • \26\: value => 26
  • + *
  • \: value => null
  • + *
+ */ + private value; + /** + *

Properties belongs to the XML.

+ *

A Dictionary of properties accessing each property by its key.

+ * + *
    + *
  • \high='1500' low='1300' open='1450' close='1320' /\>: + * propertyMap => {{\"high\": 1500}, {\"low\": 1300}, {\"open\": 1450}, {\"close\", 1320}}
  • + *
  • \id='jhnam88' name='Jeongho+Nam' comment='Hello.+My+name+is+Jeongho+Nam' \>: + * propertyMap => {{\"id\", \"jhnam88\"}, {\"name\", \"Jeongho Nam \"}, + * {\"comment\", \"Hello. My name is Jeongho Nam \"}}
  • + *
+ */ + private properties; + /** + *

Default Constructor.

+ * + *

If the string parameter is not omitted, constructs its tag, value and + * properties by parsing the string. If there's children, then construct the + * children XML, XMLList objects, too.

+ * + * @param str A string to be parsed + */ + constructor(str?: string); + /** + *

Construct XML objects by parsing a string.

+ */ + private construct(str); + /** + *

Parse and fetch a tag.

+ */ + private parseTag(str); + /** + *

Parse and fetch properties.

+ */ + private parseProperty(str); + /** + *

Parse and fetch a value.

+ */ + private parseValue(str); + /** + *

Parse and construct children XML objects.

+ */ + private parseChildren(str); + /** + *

Get tag.

+ */ + getTag(): string; + /** + *

Get value.

+ */ + getValue(): any; + /** + *

Test wheter a property exists or not.

+ */ + hasProperty(key: string): boolean; + /** + *

Get property by its key.

+ */ + getProperty(key: string): any; + getPropertyMap(): std.HashMap; + /** + *

Set tag (identifier) of the XML.

+ */ + setTag(str: string): void; + /** + *

Set value of the XML.

+ * + *

Do not abuse values for expressing member variables.

+ * + * + * + * + * + * + * + * + * + *
Standard UsageNon-standard usage abusing value
+ * \\n + *     \\n + *     \\n + * \ + * + * \\n + * \jhnam88\\n + * \Jeongho+Nam\\n + * \1988-03-11\\n + * \ + *
+ * + * @param val A value to set + */ + setValue(str: any): void; + /** + *

Set a property with its key.

+ */ + setProperty(key: string, value: any): void; + /** + *

Erase a property by its key.

+ * + * @param key The key of the property to erase + * @throw exception out of range + */ + eraseProperty(key: string): void; + push(...args: std.Pair[]): number; + push(...args: [L, U][]): number; + push(...xmls: XML[]): number; + push(...xmlLists: XMLList[]): number; + addAllProperties(xml: XML): void; + clearProperties(): void; + private calcMinIndex(...args); + /** + *

Decode a value.

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
EncodedDecoded
\&\&
\<\<
\>\>
+ * + * @return A decoded string represents a value + */ + static decodeValue(str: string): string; + /** + *

Encode a value.

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
OriginalEncoded
\&\&
\<\<
\>\>
+ * + * @return A encoded string represents a value + */ + static encodeValue(str: string): string; + /** + *

Decode a property.

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
EncodedDecoded
\&\&
\<\<
\>\>
"\"
''
'
'\\t
\\n
\\r
+ * + * @return A decoded string represents a property + */ + static decodeProperty(str: string): string; + /** + *

Decode a property.

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
OriginalEncoded
\&\&
\<\<
\>\>
\""
''
'
\\t'
\\n
\\r
+ * + * @return A encoded string represents a property + */ + static encodeProperty(str: string): string; + /** + *

Convert the XML to a string.

+ */ + toString(level?: number): string; + /** + *

Convert the XML to HTML string.

+ */ + toHTML(level?: number): string; + } + /** + *

List of XML(s) having same tag.

+ * + * @author Jeongho Nam + */ + class XMLList extends std.Vector { + /** + *

Default Constructor.

+ */ + constructor(); + getTag(): string; + /** + *

Convert XMLList to string.

+ * + * @param level Level(depth) of the XMLList. + */ + toString(level?: number): string; + /** + *

Convert XMLList to HTML string.

+ * + * @param level Level(depth) of the XMLList. + */ + toHTML(level?: number): string; + } +} +declare namespace samchon.collection { + /** + * A {@link Vector} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class ArrayCollection extends std.Vector implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + push(...items: U[]): number; + /** + * @inheritdoc + */ + push_back(val: T): void; + /** + * @hidden + */ + protected insert_by_repeating_val(position: std.VectorIterator, n: number, val: T): std.VectorIterator; + /** + * @hidden + */ + protected insert_by_range>(position: std.VectorIterator, begin: InputIterator, end: InputIterator): std.VectorIterator; + /** + * @inheritdoc + */ + pop_back(): void; + /** + * @hidden + */ + protected erase_by_range(first: std.VectorIterator, last: std.VectorIterator): std.VectorIterator; + /** + * @hidden + */ + private notify_insert(first, last); + /** + * @hidden + */ + private notify_erase(first, last); + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + unshift(...items: U[]): number; + /** + * @inheritdoc + */ + pop(): T; + /** + * @inheritdoc + */ + splice(start: number): T[]; + /** + * @inheritdoc + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; + } +} +declare namespace samchon.protocol { + /** + *

An entity, a standard data class.

+ * + *

Entity is a class for standardization of expression method using on network I/O by XML. If + * Invoke is a standard message protocol of Samchon Framework which must be kept, Entity is a + * recommended semi-protocol of message for expressing a data class. Following the semi-protocol + * Entity is not imposed but encouraged.

+ * + *

As we could get advantages from standardization of message for network I/O with Invoke, + * we can get additional advantage from standardizing expression method of data class with Entity. + * We do not need to know a part of network communication. Thus, with the Entity, we can only + * concentrate on entity's own logics and relationships between another entities. Entity does not + * need to how network communications are being done.

+ * + *

I say repeatedly. Expression method of Entity is recommended, but not imposed. It's a semi + * protocol for network I/O but not a essential protocol must be kept. The expression method of + * Entity, using on network I/O, is expressed by XML string.

+ * + *

If your own network system has a critical performance issue on communication data class, + * it would be better to using binary communication (with ByteArray). + * Don't worry about the problem! Invoke also provides methods for binary data (ByteArray).

+ * + * @author Jeongho Nam + */ + abstract class Entity implements IEntity { + /** + *

Default Constructor.

+ */ + constructor(); + construct(xml: library.XML): void; + key(): any; + abstract TAG(): string; + toXML(): library.XML; + } +} +declare namespace samchon.library { + /** + * An event class. + * + *
    + *
  • Comments from - https://developer.mozilla.org/en-US/docs/Web/API/Event/
  • + *
+ * + * @author Jeongho Nam + */ + class BasicEvent implements Event { + NONE: number; + CAPTURING_PHASE: number; + AT_TARGET: number; + BUBBLING_PHASE: number; + private type_; + private target_; + private currentTarget_; + protected trusted_: boolean; + protected bubbles_: boolean; + protected cancelable_: boolean; + protected defaultPrevented_: boolean; + protected cancelBubble_: boolean; + private timeStamp_; + constructor(type: string, bubbles?: boolean, cancelable?: boolean); + /** + * @inheritdoc + */ + initEvent(type: string, bubbles: boolean, cancelable: boolean): void; + /** + * @inheritdoc + */ + preventDefault(): void; + /** + * @inheritdoc + */ + stopImmediatePropagation(): void; + /** + * @inheritdoc + */ + stopPropagation(): void; + /** + * @inheritdoc + */ + type: string; + /** + * @inheritdoc + */ + target: IEventDispatcher; + /** + * @inheritdoc + */ + currentTarget: IEventDispatcher; + /** + * @inheritdoc + */ + isTrusted: boolean; + /** + * @inheritdoc + */ + bubbles: boolean; + /** + * @inheritdoc + */ + cancelable: boolean; + /** + * @inheritdoc + */ + eventPhase: number; + /** + * @inheritdoc + */ + defaultPrevented: boolean; + /** + * @inheritdoc + */ + srcElement: Element; + /** + * @inheritdoc + */ + cancelBubble: boolean; + /** + * @inheritdoc + */ + timeStamp: number; + /** + * Don't know what it is. + */ + returnValue: boolean; + } + class ProgressEvent extends BasicEvent { + static PROGRESS: string; + protected numerator_: number; + protected denominator_: number; + constructor(type: string, numerator: number, denominator: number); + numerator: number; + denominator: number; + } +} +declare namespace samchon.collection { + interface CollectionEventListener extends EventListener { + (event: CollectionEvent): void; + } + class CollectionEvent extends library.BasicEvent { + static INSERT: string; + static ERASE: string; + private first_; + private last_; + constructor(type: string, first: std.Iterator, last: std.Iterator); + container: ICollection; + first: std.Iterator; + last: std.Iterator; + } +} +declare namespace samchon.collection { + /** + * A {@link Deque} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class DequeCollection extends std.Deque implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + push(...items: U[]): number; + /** + * @inheritdoc + */ + push_back(val: T): void; + /** + * @hidden + */ + protected insert_by_repeating_val(position: std.DequeIterator, n: number, val: T): std.DequeIterator; + /** + * @hidden + */ + protected insert_by_range>(position: std.DequeIterator, begin: InputIterator, end: InputIterator): std.DequeIterator; + /** + * @inheritdoc + */ + pop_back(): void; + /** + * @hidden + */ + protected erase_by_range(first: std.DequeIterator, last: std.DequeIterator): std.DequeIterator; + /** + * @hidden + */ + private notify_insert(first, last); + /** + * @hidden + */ + private notify_erase(first, last); + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.collection { + /** + * A {@link HashMap} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class HashMapCollection extends std.HashMap implements ICollection> { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + get_insert_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + set_insert_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + protected handle_insert(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } + /** + * A {@link HashMultiMap} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class HashMultiMapCollection extends std.HashMap implements ICollection> { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + get_insert_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + set_insert_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + protected handle_insert(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.collection { + /** + * A {@link HashSet} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class HashSetCollection extends std.TreeSet implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + protected handle_insert(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } + class HashMultiSetCollection extends std.TreeMultiSet implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + protected handle_insert(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.collection { + interface CollectionHandler { + (first: std.Iterator, last: std.Iterator): void; + } + interface MapCollectionHandler extends CollectionHandler> { + (first: std.MapIterator, last: std.MapIterator): void; + } + /** + * An interface for {@link IContainer containers} who can detect element I/O events. + * + * @author Jeongho Nam + */ + interface ICollection extends std.base.IContainer, library.IEventDispatcher { + get_insert_handler(): CollectionHandler; + get_erase_handler(): CollectionHandler; + set_insert_handler(listener: CollectionHandler): any; + set_erase_handler(listener: CollectionHandler): any; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.collection { + /** + * A {@link List} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class ListCollection extends std.List implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + push(...items: T[]): number; + /** + * @inheritdoc + */ + push_front(val: T): void; + /** + * @inheritdoc + */ + push_back(val: T): void; + /** + * @hidden + */ + protected insert_by_repeating_val(position: std.ListIterator, n: number, val: T): std.ListIterator; + /** + * @hidden + */ + protected insert_by_range>(position: std.ListIterator, begin: InputIterator, end: InputIterator): std.ListIterator; + /** + * @inheritdoc + */ + pop_front(): void; + /** + * @inheritdoc + */ + pop_back(): void; + /** + * @hidden + */ + protected erase_by_range(first: std.ListIterator, last: std.ListIterator): std.ListIterator; + /** + * @hidden + */ + private notify_insert(first, last); + /** + * @hidden + */ + private notify_erase(first, last); + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.collection { + /** + * A {@link TreeMap} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class TreeMapCollection extends std.HashMap implements ICollection> { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + get_insert_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + set_insert_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + protected handle_insert(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } + /** + * A {@link TreeMultiMap} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class TreeMultiMapCollection extends std.HashMap implements ICollection> { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + get_insert_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): MapCollectionHandler; + /** + * @inheritdoc + */ + set_insert_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: MapCollectionHandler): void; + /** + * @inheritdoc + */ + protected handle_insert(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.MapIterator, last: std.MapIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.collection { + /** + * A {@link TreeMap} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class TreeSetCollection extends std.TreeSet implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + protected handle_insert(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } + /** + * A {@link TreeMultiSet} who can detect element I/O events. + * + * @author Jeongho Nam + */ + class TreeMultiSetCollection extends std.TreeMultiSet implements ICollection { + private insert_handler_; + private erase_handler_; + private event_dispatcher_; + /** + * @inheritdoc + */ + set_insert_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + set_erase_handler(listener: CollectionHandler): void; + /** + * @inheritdoc + */ + get_insert_handler(): CollectionHandler; + /** + * @inheritdoc + */ + get_erase_handler(): CollectionHandler; + /** + * @inheritdoc + */ + protected handle_insert(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + protected handle_erase(first: std.SetIterator, last: std.SetIterator): void; + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + addEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener): void; + /** + * @inheritdoc + */ + removeEventListener(type: "insert" | "erase", listener: CollectionEventListener, thisArg: Object): void; + } +} +declare namespace samchon.library { + /** + *

Case generator.

+ * + *

CaseGenerator is an abstract case generator using like a matrix.

+ *
    + *
  • nTTr(n^r) -> CombinedPermutationGenerator
  • + *
  • nPr -> PermutationGenerator
  • + *
  • n! -> FactorialGenerator
  • + *
+ * + * @author Jeongho Nam + */ + abstract class CaseGenerator { + /** + *

Size, the number of all cases.

+ */ + protected size_: number; + /** + *

N, size of the candidates.

+ */ + protected n_: number; + /** + *

R, size of elements of each case.

+ */ + protected r_: number; + /** + *

Construct from size of N and R.

+ * + * @param n Size of candidates. + * @param r Size of elements of each case. + */ + constructor(n: number, r: number); + /** + *

Get size of all cases.

+ * + * @return Get a number of the all cases. + */ + size(): number; + /** + *

Get size of the N.

+ */ + n(): number; + /** + *

Get size of the R.

+ */ + r(): number; + /** + *

Get index'th case.

+ * + * @param index Index number + * @return The row of the index'th in combined permuation case + */ + abstract at(index: number): Array; + } + /** + *

A combined-permutation case generator.

+ *

nTTr

+ * + * @inheritdoc + * @author Jeongho Nam + */ + class CombinedPermutationGenerator extends CaseGenerator { + /** + *

An array using for dividing each element index.

+ */ + private dividerArray; + /** + *

Construct from size of N and R.

+ * + * @param n Size of candidates. + * @param r Size of elements of each case. + */ + constructor(n: number, r: number); + at(index: number): Array; + } + /** + *

A permutation case generator.

+ *

nPr

+ * + * @author Jeongho Nam + * @inheritdoc + */ + class PermuationGenerator extends CaseGenerator { + /** + *

Construct from size of N and R.

+ * + * @param n Size of candidates. + * @param r Size of elements of each case. + */ + constructor(n: number, r: number); + /** + * @inheritdoc + */ + at(index: number): Array; + } + class FactorialGenerator extends PermuationGenerator { + /** + * Construct from factorial size N. + * + * @param n Factoria size N. + */ + constructor(n: number); + } +} +declare namespace samchon.library { + /** + *

The IEventDispatcher interface defines methods for adding or removing event listeners, checks + * whether specific types of event listeners are registered, and dispatches events.

+ * + *

Event targets are an important part of the Flash�� Player and Adobe AIR event model. The event + * target serves as the focal point for how events flow through the display list hierarchy. When an + * event such as a mouse click or a keypress occurs, an event object is dispatched into the event flow + * from the root of the display list. The event object makes a round-trip journey to the event target, + * which is conceptually divided into three phases: the capture phase includes the journey from the + * root to the last node before the event target's node; the target phase includes only the event + * target node; and the bubbling phase includes any subsequent nodes encountered on the return trip to + * the root of the display list.

+ * + *

In general, the easiest way for a user-defined class to gain event dispatching capabilities is + * to extend EventDispatcher. If this is impossible (that is, if the class is already extending another + * class), you can instead implement the IEventDispatcher interface, create an EventDispatcher member, + * and write simple hooks to route calls into the aggregated EventDispatcher.

+ * + *
    + *
  • Made by AS3 - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/IEventDispatcher.html + *
+ * + * @see EventDispatcher + * @author Migrated by Jeongho Nam + */ + interface IEventDispatcher { + /** + *

Checks whether the EventDispatcher object has any listeners registered for a specific type + * of event. This allows you to determine where an EventDispatcher object has altered handling of + * an event type in the event flow hierarchy. To determine whether a specific event type actually + * triggers an event listener, use willTrigger().

+ * + *

The difference between hasEventListener() and willTrigger() is that hasEventListener() + * examines only the object to which it belongs, whereas willTrigger() examines the entire event + * flow for the event specified by the type parameter.

+ * + * @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + *

Dispatches an event into the event flow.

+ *

The event target is the EventDispatcher object upon which the dispatchEvent() method is called.

+ * + * @param event The Event object that is dispatched into the event flow. If the event is being + * redispatched, a clone of the event is created automatically. After an event is + * dispatched, its target property cannot be changed, so you must create a new copy + * of the event for redispatching to work. + */ + dispatchEvent(event: BasicEvent): boolean; + /** + *

Registers an event listener object with an EventDispatcher object so that the listener + * receives notification of an event. You can register event listeners on all nodes in the display + * list for a specific type of event, phase, and priority. + * + *

After you successfully register an event listener, you cannot change its priority through + * additional calls to addEventListener(). To change a listener's priority, you must first call + * removeEventListener(). Then you can register the listener again with the new priority level.

+ * + *

Keep in mind that after the listener is registered, subsequent calls to addEventListener() + * with a different type or useCapture value result in the creation of a separate listener + * registration. For example, if you first register a listener with useCapture set to true, + * it listens only during the capture phase. If you call addEventListener() again using the same + * listener object, but with useCapture set to false, you have two separate listeners: one that + * listens during the capture phase and another that listens during the target and bubbling phases.

+ * + *

You cannot register an event listener for only the target phase or the bubbling phase. + * Those phases are coupled during registration because bubbling applies only to the ancestors of + * the target node.

+ * + *

If you no longer need an event listener, remove it by calling removeEventListener(), or + * memory problems could result. Event listeners are not automatically removed from memory because + * the garbage collector does not remove the listener as long as the dispatching object exists + * (unless the useWeakReference parameter is set to true).

+ * + *

Copying an EventDispatcher instance does not copy the event listeners attached to it. (If + * your newly created node needs an event listener, you must attach the listener after creating + * the node.) However, if you move an EventDispatcher instance, the event listeners attached to + * it move along with it.

+ * + *

If the event listener is being registered on a node while an event is also being processed + * on this node, the event listener is not triggered during the current phase but may be triggered + * during a later phase in the event flow, such as the bubbling phase.

+ * + *

If an event listener is removed from a node while an event is being processed on the node, + * it is still triggered by the current actions. After it is removed, the event listener is never + * invoked again (unless it is registered again for future processing).

+ * + * @param event The type of event. + * @param listener The listener function that processes the event. + * This function must accept an Event object as its only parameter and must return + * nothing. + */ + addEventListener(type: string, listener: EventListener, thisArg: Object): void; + /** + * Removes a listener from the EventDispatcher object. If there is no matching listener registered + * with the EventDispatcher object, a call to this method has no effect. + * + * @param type The type of event. + * @param listener The listener object to remove. + */ + removeEventListener(type: string, listener: EventListener, thisArg: Object): void; + } + /** + *

Registers an event listener object with an EventDispatcher object so that the listener + * receives notification of an event. You can register event listeners on all nodes in the display + * list for a specific type of event, phase, and priority.

+ * + *

After you successfully register an event listener, you cannot change its priority through + * additional calls to addEventListener(). To change a listener's priority, you must first call + * removeListener(). Then you can register the listener again with the new priority level.

+ * + * Keep in mind that after the listener is registered, subsequent calls to addEventListener() + * with a different type or useCapture value result in the creation of a separate listener registration. + * For example, if you first register a listener with useCapture set to true, it listens only during the + * capture phase. If you call addEventListener() again using the same listener object, but with + * useCapture set to false, you have two separate listeners: one that listens during the capture + * phase and another that listens during the target and bubbling phases. + * + *

You cannot register an event listener for only the target phase or the bubbling phase. Those + * phases are coupled during registration because bubbling applies only to the ancestors of the + * target node.

+ * + *

If you no longer need an event listener, remove it by calling removeEventListener(), + * or memory problems could result. Event listeners are not automatically removed from memory + * because the garbage collector does not remove the listener as long as the dispatching object + * exists (unless the useWeakReference parameter is set to true).

+ * + *

Copying an EventDispatcher instance does not copy the event listeners attached to it. (If your + * newly created node needs an event listener, you must attach the listener after creating the + * node.) However, if you move an EventDispatcher instance, the event listeners attached to it move + * along with it.

+ * + *

If the event listener is being registered on a node while an event is being processed on + * this node, the event listener is not triggered during the current phase but can be triggered + * during a later phase in the event flow, such as the bubbling phase.

+ * + *

If an event listener is removed from a node while an event is being processed on the node, it is + * still triggered by the current actions. After it is removed, the event listener is never invoked + * again (unless registered again for future processing).

+ * + *
    + *
  • Made by AS3 - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/EventDispatcher.html + *
+ * + * @author Migrated by Jeongho Nam + */ + class EventDispatcher implements IEventDispatcher { + /** + * The origin object who issuing events. + */ + protected target: IEventDispatcher; + /** + * Container of listeners. + */ + protected listeners: std.HashMap>>; + /** + * Default Constructor. + */ + constructor(); + /** + * Construct from the origin event dispatcher. + * + * @param target The origin object who issuing events. + */ + constructor(target: IEventDispatcher); + /** + * @inheritdoc + */ + hasEventListener(type: string): boolean; + /** + * @inheritdoc + */ + dispatchEvent(event: Event): boolean; + /** + * @inheritdoc + */ + addEventListener(type: string, listener: EventListener, thisArg?: Object): void; + /** + * @inheritdoc + */ + removeEventListener(type: string, listener: EventListener, thisArg?: Object): void; + } +} +declare namespace samchon.library { + /** + *

A utility class supporting static methods of string.

+ * + * @author Jeongho Nam + */ + class StringUtil { + /** + *

Generate a substring.

+ * + *

Extracts a substring consisting of the characters from specified start to end. + * It's same with str.substring( ? = (str.find(start) + start.size()), str.find(end, ?) )

+ * + * + let str = between("ABCD[EFGH]IJK", "[", "]"); + console.log(str); // PRINTS "EFGH" + * + * + *
    + *
  • If start is not specified, extracts from begin of the string to end.
  • + *
  • If end is not specified, extracts from start to end of the string.
  • + *
  • If start and end are all omitted, returns str, itself.
  • + *
+ * + * @param str Target string to be applied between + * @param start A string for separating substring at the front + * @param end A string for separating substring at the end + * + * @return substring by specified terms + */ + static between(str: string, start?: string, end?: string): string; + /** + *

Fetch substrings.

+ * + *

Splits a string into an array of substrings dividing by specified delimeters of start and end. + * It's the array of substrings adjusted the between.

+ * + *
    + *
  • If startStr is omitted, it's same with the split by endStr not having last item.
  • + *
  • If endStr is omitted, it's same with the split by startStr not having first item.
  • + *
  • If startStr and endStar are all omitted, returns str.
  • + *
+ * + * @param str Target string to split by between + * @param start A string for separating substring at the front. + * If omitted, it's same with split(end) not having last item + * @param end A string for separating substring at the end. + * If omitted, it's same with split(start) not having first item + * @return An array of substrings + */ + static betweens(str: string, start?: string, end?: string): Array; + /** + * An array containing whitespaces. + */ + private static SPACE_ARRAY; + /** + * Remove all designated characters from the beginning and end of the specified string. + * + * @param str The string whose designated characters should be trimmed. + * @param args Designated character(s). + * + * @return Updated string where designated characters was removed from the beginning and end. + */ + static trim(str: string, ...args: string[]): string; + /** + * Remove all designated characters from the beginning of the specified string. + * + * @param str The string should be trimmed. + * @param delims Designated character(s). + * + * @return Updated string where designated characters was removed from the beginning + */ + static ltrim(str: string, ...args: string[]): string; + /** + * Remove all designated characters from the end of the specified string. + * + * @param str The string should be trimmed. + * @param delims Designated character(s). + * + * @return Updated string where designated characters was removed from the end. + */ + static rtrim(str: string, ...args: string[]): string; + /** + * Substitute {n} tokens within the specified string. + * + * @param format The string to make substitutions in. This string can contain special tokens of the form + * {n}, where n is a zero based index, that will be replaced with the + * additional parameters found at that index if specified. + * @param args Additional parameters that can be substituted in the format parameter at each + * {n} location, where n is an integer (zero based) index value into + * the array of values specified. + * + * @return New string with all of the {n} tokens replaced with the respective arguments specified. + */ + static substitute(format: string, ...args: any[]): string; + /** + * Returns a string specified word is replaced. + * + * @param str Target string to replace + * @param before Specific word you want to be replaced + * @param after Specific word you want to replace + * + * @return A string specified word is replaced + */ + static replaceAll(str: string, before: string, after: string): string; + /** + * Returns a string specified words are replaced. + * + * @param str Target string to replace + * @param pairs A specific word's pairs you want to replace and to be replaced + * + * @return A string specified words are replaced + */ + static replaceAll(str: string, ...pairs: std.Pair[]): string; + /** + *

Get a tabbed string by specified size.

+ */ + static tab(size: number): string; + /** + *

Get a tabbed HTLM string by specified size.

+ */ + static htmlTab(size: number): string; + /** + * Replace all HTML spaces to a literal space. + * + * @param str Target string to replace. + */ + static removeHTMLSpaces(str: string): string; + } +} +declare namespace samchon.protocol { + /** + * @author Jeongho Nam + */ + abstract class EntityArray extends std.Vector { + /** + * Default Constructor. + */ + constructor(); + /** + *

Construct data of the Entity from an XML object.

+ * + *

Constructs the EntityArray's own member variables only from the input XML object.

+ * + *

Do not consider about constructing children Entity objects' data in EntityArray::construct(). + * Those children Entity objects' data will constructed by their own construct() method. Even insertion + * of XML objects representing children are done by abstract method of EntityArray::toXML().

+ * + *

Constructs only data of EntityArray's own.

+ * + * @inheritdoc + */ + construct(xml: library.XML): void; + /** + *

Factory method of a child Entity.

+ * + *

EntityArray::createChild() is a factory method creating a new child Entity which is belonged + * to the EntityArray. This method is called by EntityArray::construct(). The children construction + * methods Entity::construct() will be called by abstract method of the EntityArray::construct().

+ * + * @return A new child Entity belongs to EntityArray. + */ + protected abstract createChild(xml: library.XML): Ety; + /** + * @inheritdoc + */ + key(): any; + /** + *

Whether have the item or not.

+ * + *

Indicates whether a map has an item having the specified identifier.

+ * + * @param key Key value of the element whose mapped value is accessed. + * + * @return Whether the map has an item having the specified identifier. + */ + has(key: any): boolean; + /** + *

Count elements with a specific key.

+ * + *

Searches the container for elements whose key is key and returns the number of elements found.

+ * + * @param key Key value to be searched for. + * + * @return The number of elements in the container with a key. + */ + count(key: any): number; + /** + *

Get an element

+ * + *

Returns a reference to the mapped value of the element identified with key.

+ * + * @param key Key value of the element whose mapped value is accessed. + * + * @throw exception out of range + * + * @return A reference object of the mapped value (_Ty) + */ + get(key: string): Ety; + /** + * @inheritdoc + */ + abstract TAG(): string; + /** + *

A tag name of children objects.

+ */ + abstract CHILD_TAG(): string; + /** + *

Get an XML object represents the EntityArray.

+ * + *

Archives the EntityArray's own member variables only to the returned XML object.

+ * + *

Do not consider about archiving children Entity objects' data in EntityArray::toXML(). + * Those children Entity objects will converted to XML object by their own toXML() method. The + * insertion of XML objects representing children are done by abstract method of + * EntityArray::toXML().

+ * + *

Archives only data of EntityArray's own.

+ * + * @inheritdoc + */ + toXML(): library.XML; + } +} +declare namespace samchon.protocol { + /** + *

A network driver for an external system.

+ * + *

ExternalSystem is a boundary class interacting with an external system by network communication. + * Also, ExternalSystem is an abstract class that a network role, which one is server and which one is + * client, is not determined yet.

+ * + *

The ExternalSystem has ExternalSystemRole(s) groupped methods, handling Invoke message + * interacting with the external system, by subject or unit of a moudle. The ExternalSystemRole is + * categorized in a 'control'.

+ * + *

Note

+ *

The ExternalSystem class takes a role of interaction with external system in network level. + * However, within a framework of Samchon Framework, a boundary class like the ExternalSystem is + * not such important. You can find some evidence in a relationship between ExternalSystemArray, + * ExternalSystem and ExternalSystemRole.

+ * + *

Of course, the ExternalSystemRole is belonged to an ExternalSystem. However, if you + * access an ExternalSystemRole from an ExternalSystemArray directly, not passing by a belonged + * ExternalSystem, and send an Invoke message even you're not knowing which ExternalSystem is + * related in, it's called "Proxy pattern". + * + *

Like the explanation of "Proxy pattern", you can utilize an ExternalSystemRole as a proxy + * of an ExternalSystem. With the pattern, you can only concentrate on ExternalSystemRole itself, + * what to do with Invoke message, irrespective of the ExternalSystemRole is belonged to which + * ExternalSystem.

+ * + * @author Jeongho Nam + */ + abstract class ExternalSystem extends EntityArray implements IProtocol { + /** + *

A driver for interacting with (real, physical) external system.

+ */ + protected driver: ServerConnector; + /** + *

A name can identify an external system.

+ * + *

The name must be unique in ExternalSystemArray.

+ */ + protected name: string; + /** + *

An ip address of an external system.

+ */ + protected ip: string; + /** + *

A port number of an external system.

+ */ + protected port: number; + /** + *

Default Constructor.

+ */ + constructor(); + /** + *

Start interaction.

+ *

An abstract method starting interaction with an external system.

+ * + *

If an external systems are a server, starts connection and listening Inovoke message, + * else clients, just starts listening only. You also can addict your own procudures of starting + * the driver, but if you directly override method of abstract ExternalSystem, be careful about + * virtual inheritance.

+ */ + start(): void; + key(): any; + /** + *

Get name.

+ */ + getName(): string; + /** + *

Get ip address of the external system.

+ */ + getIP(): string; + /** + *

Get port number of the external system.

+ */ + getPort(): number; + sendData(invoke: Invoke): void; + replyData(invoke: Invoke): void; + TAG(): string; + CHILD_TAG(): string; + } +} +declare namespace samchon.protocol { + /** + *

An array of ExternalSystem(s).

+ * + *

ExternalSystemArray is an abstract class containing and managing external system drivers.

+ * + *

Also, ExternalSystemArray can access to ExternalSystemRole(s) directly. With the method, you + * can use an ExternalSystemRole as "logical proxy" of an ExternalSystem. Of course, the + * ExternalSystemRole is belonged to an ExternalSystem. However, if you access an ExternalSystemRole + * from an ExternalSystemArray directly, not passing by a belonged ExternalSystem, and send an Invoke + * message even you're not knowing which ExternalSystem is related in, the ExternalSystemRole acted + * a role of proxy.

+ * + *

It's called as "Proxy pattern". With the pattern, you can only concentrate on + * ExternalSystemRole itself, what to do with Invoke message, irrespective of the ExternalSystemRole + * is belonged to which ExternalSystem.

+ * + *
    + *
  • ExternalSystemArray::getRole("something")->sendData(invoke);
  • + *
+ * + * @author Jeongho Nam + */ + abstract class ExternalSystemArray extends EntityArray implements IProtocol { + /** + * Default Constructor. + */ + constructor(); + /** + *

Start interaction.

+ *

An abstract method starting interaction with external systems.

+ * + *

If external systems are servers, starts connection to them, else clients, opens a server + * and accepts the external systems. You can addict your own procudures of starting drivers, but + * if you directly override method of abstract ExternalSystemArray, be careful about virtual + * inheritance.

+ */ + start(): void; + /** + *

Test whether has a role.

+ * + * @param name Name of an ExternalSystemRole. + * @return Whether has or not. + */ + hasRole(key: string): boolean; + /** + *

Get a role.

+ * + * @param name Name of an ExternalSystemRole + * @return A shared pointer of specialized role + */ + getRole(key: string): ExternalSystemRole; + sendData(invoke: Invoke): void; + replyData(invoke: Invoke): void; + TAG(): string; + CHILD_TAG(): string; + } +} +declare namespace samchon.protocol { + /** + *

A role belongs to an external system.

+ * + *

ExternalSystemRole is a 'control' class groupping methods, handling Invoke messages + * interacting with an external system that the ExternalSystemRole is belonged to, by a subject or + * unit of a module.

+ * + *

ExternalSystemRole can be a "logical proxy" for an ExternalSystem which is containing the + * ExternalSystemRole. Of course, the ExternalSystemRole is belonged to an ExternalSystem. However, + * if you access an ExternalSystemRole from an ExternalSystemArray directly, not passing by a + * belonged ExternalSystem, and send an Invoke message even you're not knowing which ExternalSystem + * is related in, the ExternalSystemRole acted a role of proxy.

+ * + *

It's called as "Proxy pattern". With the pattern, you can only concentrate on + * ExternalSystemRole itself, what to do with Invoke message, irrespective of the ExternalSystemRole + * is belonged to which ExternalSystem.

+ * + * @author Jeongho Nam + */ + class ExternalSystemRole extends Entity implements IProtocol { + /** + *

A driver of external system containing the ExternalSystemRole.

+ */ + protected system: ExternalSystem; + /** + *

A name representing the role.

+ */ + protected name: string; + protected sendListeners: std.HashSet; + /** + *

Construct from external system driver.

+ * + * @param system A driver of external system the ExternalSystemRole is belonged to. + */ + constructor(system: ExternalSystem); + construct(xml: library.XML): void; + getName(): string; + hasSendListener(key: string): boolean; + sendData(invoke: Invoke): void; + replyData(invoke: Invoke): void; + TAG(): string; + toXML(): library.XML; + } +} +declare namespace samchon.protocol { + /** + *

An interface of entity.

+ * + *

Entity is a class for standardization of expression method using on network I/O by XML. If + * Invoke is a standard message protocol of Samchon Framework which must be kept, Entity is a + * recommended semi-protocol of message for expressing a data class. Following the semi-protocol + * Entity is not imposed but encouraged.

+ * + *

As we could get advantages from standardization of message for network I/O with Invoke, + * we can get additional advantage from standardizing expression method of data class with Entity. + * We do not need to know a part of network communication. Thus, with the Entity, we can only + * concentrate on entity's own logics and relationships between another entities. Entity does not + * need to how network communications are being done.

+ * + *

I say repeatedly. Expression method of Entity is recommended, but not imposed. It's a semi + * protocol for network I/O but not a essential protocol must be kept. The expression method of + * Entity, using on network I/O, is expressed by XML string.

+ * + *

If your own network system has a critical performance issue on communication data class, + * it would be better to using binary communication (with ByteArray). + * Don't worry about the problem! Invoke also provides methods for binary data (ByteArray).

+ * + * @author Jeongho Nam + */ + interface IEntity { + /** + *

Construct data of the Entity from a XML object.

+ * + *

Overrides the construct() method and fetch data of member variables from the XML.

+ * + *

By recommended guidance, data representing member variables are contained in properties + * of the put XML object.

+ * + * @param xml An xml used to contruct data of entity. + */ + construct(xml: library.XML): any; + /** + *

Get a key that can identify the Entity uniquely.

+ * + *

If identifier of the Entity is not atomic value, returns a string or paired object + * that can represents the composite identifier.

+ */ + key(): any; + /** + *

A tag name when represented by XML.

+ * + *
    + *
  • <TAG {...properties} />
  • + *
+ */ + TAG(): string; + /** + *

Get a XML object represents the Entity.

+ * + *

A member variable (not object, but atomic value like number, string or date) is categorized + * as a property within the framework of entity side. Thus, when overriding a toXML() method and + * archiving member variables to an XML object to return, puts each variable to be a property + * belongs to only a XML object.

+ * + *

Don't archive the member variable of atomic value to XML::value causing enormouse creation + * of XML objects to number of member variables. An Entity must be represented by only a XML + * instance (tag).

+ * + * + * + * + * + * + * + * + * + * + *
Standard Usage Non-standard usage abusing value
+ * <memberList>
+ * <member id='jhnam88' name='Jeongho+Nam' birthdate='1988-03-11' />
+ <member id='master' name='Administartor' birthdate='2011-07-28' />
+</memberList> + *
+ * <member> + * <id>jhnam88</id> + * <name>Jeongho+Nam<name> + * <birthdate>1988-03-11</birthdate> + * </member> + *
+ * + * @return An XML object representing the Entity. + */ + toXML(): library.XML; + } +} +declare namespace samchon.protocol { + /** + *

An interface for Invoke message chain.

+ * + *

IProtocol is an interface for Invoke message, which is standard message of network I/O + * in Samchon Framework, chain. The IProtocol interface is used to network drivers and some + * classes which are in a relationship of chain of responsibility with those network drivers.

+ * + *

In Samchon Framework, server side, IProtocol is one of the basic 3 + 1 components that + * can make any type of network system in Samchon Framework with IServer and IClient. Following + * the "chain of responsibility" pa1ttern, looking around classes in Samchon Framework, you + * can see all related classes with network I/O are implemented from the IProtocol.

+ * + * @see Invoke + * @author Jeongho Nam + */ + interface IProtocol { + /** + *

Sending message.

+ *

Sends message to related system or shifts the responsibility to chain.

+ * + * @param invoke Invoke message to send + */ + replyData(invoke: Invoke): void; + /** + *

Handling replied message.

+ *

Handles replied message or shifts the responsibility to chain.

+ * + * @param invoke Replied invoke message + */ + sendData(invoke: Invoke): void; + } +} +declare namespace samchon.protocol { + /** + *

Standard message of network I/O.

+ *

Invoke is a class used in network I/O in protocol package of Samchon Framework.

+ * + *

The Invoke message has an XML structure like the result screen of provided example in below. + * We can enjoy lots of benefits by the normalized and standardized message structure used in + * network I/O.

+ * + *

The greatest advantage is that we can make any type of network system, even how the system + * is enourmously complicated. As network communication message is standardized, we only need to + * concentrate on logical relationships between network systems. We can handle each network system + * like a object (class) in OOD. And those relationships can be easily designed by using design + * pattern.

+ * + *

In Samchon Framework, you can make any type of network system with basic 3 + 1 componenets + * (IProtocol, IServer and IClient + ServerConnector), by implemens or inherits them, like designing + * classes of S/W architecture.

+ * + * @see IProtocol + * @author Jeongho Nam + */ + class Invoke extends EntityArray { + /** + *

Listener, represent function's name.

+ */ + protected listener: string; + constructor(listener: string); + /** + * Copy Constructor. + * + * @param invoke + */ + constructor(invoke: Invoke); + constructor(xml: library.XML); + constructor(listener: string, begin: std.VectorIterator, end: std.VectorIterator); + constructor(listener: string, ...parameters: any[]); + /** + * @inheritdoc + */ + protected createChild(xml: library.XML): InvokeParameter; + /** + * Get listener. + */ + getListener(): string; + /** + *

Get arguments for Function.apply().

+ * + * @return An array containing values of the contained parameters. + */ + getArguments(): Array; + /** + *

Apply to a matched function.

+ */ + apply(obj: IProtocol): boolean; + /** + * @inheritdoc + */ + TAG(): string; + /** + * @inheritdoc + */ + CHILD_TAG(): string; + } +} +declare namespace samchon.protocol { + /** + *

A history of an Invoke message.

+ * + *

InvokeHistory is a class for reporting history log of an Invoke message with elapsed time + * from a slave to its master.

+ * + *

With the elapsed time, consumed time for a process of handling the Invoke message, + * InvokeHistory is reported to the master. The master utilizies the elapsed time to estimating + * performances of each slave system. With the estimated performan index, master retrives the + * optimal solution of distributing processes.

+ * + * @author Jeongho Nam + */ + class InvokeHistory extends Entity { + /** + *

An identifier.

+ */ + protected uid: number; + /** + *

A listener of the Invoke message.

+ * + *

InvokeHistory does not archive entire data of an Invoke message. InvokeHistory only + * archives its listener. The first, formal reason is to save space, avoid wasting spaces.

+ * + *

The second, complicate reason is on an aspect of which systems are using the + * InvokeHistory class. InvokeHistory is designed to let slave reports to master elapsed time + * of a process used to handling the Invoke message. If you want to archive entire history log + * of Invoke messages, then the subject should be master, not the slave using InvokeHistory + * classes.

+ */ + protected listener: string; + /** + *

Start time of the history.

+ * + *

Means start time of a process handling the Invoke message. The start time not only + * has ordinary arguments represented Datetime (year to seconds), but also has very precise + * values under seconds, which is expressed as nano seconds (10^-9).

+ * + *

The precise start time will be used to calculate elapsed time with end time.

+ */ + protected startTime: Date; + /** + *

End time of the history.

+ * + * @details + *

Means end time of a process handling the Invoke message. The end time not only + * has ordinary arguments represented Datetime (year to seconds), but also has very precise + * values under seconds, which is expressed as nano seconds (10^-9).

+ * + *

The precise end time will be used to calculate elapsed time with start time.

+ */ + protected endTime: Date; + /** + *

Construct from an Invoke message.

+ * + *

InvokeHistory does not archive entire Invoke message, only archives its listener.

+ * + * @param invoke A message to archive its history log + */ + constructor(invoke: Invoke); + /** + *

Notify end of the process.

+ * + *

Notifies end of a process handling the matched Invoke message to InvokeHistory.

+ *

InvokeHistory archives the end datetime and calculates elapsed time as nanoseconds.

+ */ + notifyEnd(): void; + TAG(): string; + toXML(): library.XML; + /** + *

Get an Invoke message.

+ * + *

Returns an Invoke message to report to a master that how much time was elapsed on a + * process handling the Invoke message. In master, those reports are used to estimate + * performance of each slave system.

+ * + * @return An Invoke message to report master. + */ + toInvoke(): Invoke; + } +} +declare namespace samchon.protocol { + /** + * A parameter belongs to an Invoke. + * + * @see Invoke + * @author Jeongho Nam + */ + class InvokeParameter extends Entity { + /** + *

Name of the parameter.

+ * + * @details Optional property, can be omitted. + */ + protected name: string; + /** + *

Type of the parameter.

+ */ + protected type: string; + /** + *

Value of the parameter.

+ */ + protected value: any; + constructor(); + constructor(name: string, val: any); + constructor(name: string, type: string, val: any); + construct(xml: library.XML): void; + key(): any; + /** + * Get name. + */ + getName(): string; + /** + * Get type. + */ + getType(): string; + /** + * Get value. + */ + getValue(): any; + TAG(): string; + toXML(): library.XML; + } +} +declare namespace samchon.protocol { + /** + *

A server connector for a physical client.

+ * + *

ServerConnector is a class for a physical client connecting a server. If you want to connect + * to a server, then implements this ServerConnector and just override some methods like + * getIP(), getPort() and replyData(). That's all.

+ * + *

In Samchon Framework, package protocol, There are basic 3 + 1 components that can make any + * type of network system in Samchon Framework. The basic 3 components are IProtocol, IServer and + * IClient. The last, surplus one is the ServerConnector. Looking around classes in + * Samchon Framework, especially module master and slave which are designed for realizing + * distributed processing systems and parallel processing systems, physical client classes are all + * derived from this ServerConnector.

+ * + * + * + * @author Jeongho Nam + */ + class ServerConnector implements IProtocol { + /** + *

A parent object who listens and sends Invoke message.

+ * + *
    + *
  • ServerConnector.replyData(Invoke) -> parent.replyData(Invoke)
  • + *
+ */ + private parent; + /** + *

A socket for network I/O.

+ */ + private socket; + /** + *

Unused string from a server.

+ */ + private str; + /** + *

An open-event listener.

+ */ + onopen: Function; + /** + *

Constructor with parent.

+ */ + constructor(parent: IProtocol); + /** + *

Connects to a cloud server with specified host and port.

+ * + *

If the connection fails immediately, either an event is dispatched or an exception is thrown: + * an error event is dispatched if a host was specified, and an exception is thrown if no host + * was specified. Otherwise, the status of the connection is reported by an event. + * If the socket is already connected, the existing connection is closed first.

+ * + * @param ip + * The name or IP address of the host to connect to. + * If no host is specified, the host that is contacted is the host where the calling + * file resides. If you do not specify a host, use an event listener to determine whether + * the connection was successful. + * @param port + * The port number to connect to. + * + * @throws IOError + * No host was specified and the connection failed. + * @throws SecurityError + * This error occurs in SWF content for the following reasons: + * Local untrusted SWF files may not communicate with the Internet. You can work around + * this limitation by reclassifying the file as local-with-networking or as trusted. + */ + connect(ip: string, port: number): void; + /** + *

Send data to the server.

+ */ + sendData(invoke: Invoke): void; + /** + *

Shift responsiblity of handling message to parent.

+ */ + replyData(invoke: Invoke): void; + private handleConnect(event); + /** + *

Handling replied message.

+ */ + private handleReply(event); + } +} +declare namespace samchon.protocol.service { + /** + *

An application, the top class in JS-UI.

+ * + *

The Application is separated to three part, TopMenu, Movie and ServerConnector.

+ *
    + *
  • TopMenu: Menu on the top. It's not an essential component.
  • + *
  • Movie: Correspond with Service in Server. Movie has domain UI components(Movie) for the matched Service.
  • + *
  • ServerConnector: The socket connecting to the Server.
  • + *
+ * + *

The Application and its UI-layout is not fixed, essential component for Samchon Framework in Flex, + * so it's okay to do not use the provided Application and make your custom Application. + * But the custom Application, your own, has to contain the Movie and keep the construction routine.

+ * + *

+ * + *

THE CONSTRUCTION ROUTINE

+ *
    + *
  • Socket Connection
  • + *
      + *
    • Connect to the CPP-Server
    • + *
    + *
  • Fetch authority
  • + *
      + *
    • Send a request to fetching authority
    • + *
    • The window can be navigated to other page by the authority
    • + *
    + *
  • Construct Movie
  • + *
      + *
    • Determine a Movie by URLVariables::movie and construct it
    • + *
    + *
  • All the routines are done
  • + *
+ * + * @author Jeongho Nam + */ + class Application implements IProtocol { + /** + *

Invoke Socket.

+ */ + protected socket: ServerConnector; + /** + *

A movie.

+ */ + protected movie: Movie; + /** + *

Construct from arguments.

+ * + * @param movie A movie represents a service. + * @param ip An ip address of cloud server to connect. + * @param port A port number of cloud server to connect. + */ + constructor(movie: Movie, ip: string, port: number); + private handleConnect(event); + /** + *

Handle replied message or shift the responsibility.

+ */ + replyData(invoke: Invoke): void; + /** + *

Send a data to server.

+ */ + sendData(invoke: Invoke): void; + } +} +declare namespace samchon.protocol.service { + /** + * A movie belonged to an Application. + */ + class Movie implements IProtocol { + /** + *

An application the movie is belonged to + */ + protected application: Application; + /** + * Handle replied data. + */ + replyData(invoke: Invoke): void; + /** + * Send data to server. + */ + sendData(invoke: Invoke): void; + } +} +declare namespace samchon.protocol.service { +} +declare namespace samchon.protocol.slave { + /** + * @brief A slave system. + * + * @details + *

SlaveSystem, literally, means a slave system belongs to a maste system.

+ * + *

The SlaveSystem class is used in opposite side system of master::DistributedSystem + * and master::ParallelSystem and reports elapsed time of each commmand (by Invoke message) + * for estimation of its performance.

+ * + * @inheritdoc + * @author Jeongho Nam + */ + abstract class SlaveSystem extends ExternalSystem { + /** + *

Default Constructor.

+ */ + constructor(); + /** + * @inheritdoc + */ + replyData(invoke: Invoke): void; + } +} diff --git a/samchon-library/samchon-library-tests.ts b/samchon-library/samchon-library-tests.ts new file mode 100644 index 0000000000..a2b0656d5f --- /dev/null +++ b/samchon-library/samchon-library-tests.ts @@ -0,0 +1,7 @@ +/// + +declare var global: any; +declare var require: (name: string) => any; + +library = require("samchon-library"); +console.log(library); \ No newline at end of file diff --git a/samchon-library/samchon-library.d.ts b/samchon-library/samchon-library.d.ts new file mode 100644 index 0000000000..3daecf0937 --- /dev/null +++ b/samchon-library/samchon-library.d.ts @@ -0,0 +1,23 @@ +// Type definitions for Samchon Library v0.0.2 +// Project: https://github.com/samchon/framework +// Definitions by: Jeongho Nam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// ------------------------------------------------------------------------------------ +// In Samchon Collection, merging multiple 'ts' files to a module is not possible yet. +// Instead of using "import" instruction, use such trick: +// +// +// declare var global: any; +// declare var require: Function; +// +// library = require("samchon-library"); +// let xml: library.XML = new library.XML(); +// +// +// Those declaration of global and require can be substituted by using "node.d.ts" +// ------------------------------------------------------------------------------------ + +/// + +declare var library: typeof samchon.library; \ No newline at end of file diff --git a/typescript-stl/typescript-stl.d.ts b/typescript-stl/typescript-stl.d.ts index 659bd89cc2..1286a62084 100644 --- a/typescript-stl/typescript-stl.d.ts +++ b/typescript-stl/typescript-stl.d.ts @@ -1,9 +1,45 @@ -// Type definitions for TypeScript-STL v0.9.4 +// Type definitions for TypeScript-STL v0.9.9 // Project: https://github.com/samchon/stl // Definitions by: Jeongho Nam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// ------------------------------------------------------------------------------------ +// In TypeScript, merging multiple 'ts' files to a module is not possible yet. +// Instead of using "import" instruction, use such trick: +// +// +// declare var global: any; +// declare var require: Function; +// +// global["std"] = require("typescript-stl"); +// let list: std.List = new std.List(); +// +// +// Those declaration of global and require can be substituted by using "node.d.ts" +// ------------------------------------------------------------------------------------ + +/** + * STL (Standard Template Library) Containers for TypeScript. + * + * @author Jeongho Nam + */ +declare namespace std { +} +/** + * Base classes composing STL in background. + * + * @author Jeongho Nam + */ declare namespace std.base { +} +/** + * Examples for supporting developers who use STL library. + * + * @author Jeongho Nam + */ +declare namespace std.example { +} +declare namespace std { /** *

Bi-directional iterator.

* @@ -16,23 +52,22 @@ declare namespace std.base { *

There is not a single type of {@link Iterator bidirectional iterator}: {@link IContainer Each container} * may define its own specific iterator type able to iterate through it and access its elements.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/iterator/BidirectionalIterator/
  • - *
+ *

* + * @reference http://www.cplusplus.com/reference/iterator/BidirectionalIterator * @author Jeongho Nam */ abstract class Iterator { /** * Source container of the iterator is directing for. */ - protected source_: IContainer; + protected source_: base.IContainer; /** * Construct from the source {@link IContainer container}. * * @param source The source */ - constructor(source: IContainer); + constructor(source: base.IContainer); /** *

Get iterator to previous element.

*

If current iterator is the first item(equal with {@link IContainer.begin IContainer.begin()}), @@ -58,7 +93,7 @@ declare namespace std.base { /** * Get source */ - get_source(): Container; + get_source(): base.IContainer; /** *

Whether an iterator is equal with the iterator.

* @@ -83,25 +118,221 @@ declare namespace std.base { value: T; abstract swap(obj: Iterator): void; } -} -declare namespace std.base { /** - * A reverse and bi-directional iterator.

+ *

This class reverses the direction in which a bidirectional or random-access iterator iterates through a range. + *

* + *

A copy of the original iterator (the {@link Iterator base iterator}) is kept internally and used to reflect + * the operations performed on the {@link ReverseIterator}: whenever the {@link ReverseIterator} is incremented, its + * {@link Iterator base iterator} is decreased, and vice versa. A copy of the {@link Iterator base iterator} with the + * current state can be obtained at any time by calling member {@link base}.

+ * + *

Notice however that when an iterator is reversed, the reversed version does not point to the same element in + * the range, but to the one preceding it. This is so, in order to arrange for the past-the-end element of a + * range: An iterator pointing to a past-the-end element in a range, when reversed, is pointing to the last element + * (not past it) of the range (this would be the first element of the reversed range). And if an iterator to the + * first element in a range is reversed, the reversed iterator points to the element before the first element (this + * would be the past-the-end element of the reversed range).

+ * + *

+ * + * @reference http://www.cplusplus.com/reference/iterator/reverse_iterator * @author Jeongho Nam */ - abstract class ReverseIterator extends Iterator { - protected iterator_: Iterator; - constructor(iterator: Iterator); - equal_to(obj: Iterator): boolean; - equal_to(obj: ReverseIterator): boolean; + abstract class ReverseIterator, This extends ReverseIterator> extends Iterator { + protected base_: Base; + constructor(base: Base); + base(): Base; + protected abstract create_neighbor(): This; + value: T; /** * @inheritdoc */ - value: T; - swap(obj: Iterator): void; - swap(obj: ReverseIterator): void; + prev(): This; + /** + * @inheritdoc + */ + next(): This; + /** + * @inheritdoc + */ + advance(n: number): This; + /** + * @inheritdoc + */ + equal_to(obj: This): boolean; + /** + * @inheritdoc + */ + swap(obj: This): void; } + /** + *

Return distance between {@link Iterator iterators}.

+ * + *

Calculates the number of elements between first and last.

+ * + *

If it is a {@link IArrayIterator random-access iterator}, the function uses operator- to calculate this. + * Otherwise, the function uses the increase operator {@link Iterator.next next()} repeatedly.

+ * + * @param first Iterator pointing to the initial element. + * @param last Iterator pointing to the final element. This must be reachable from first. + * + * @return The number of elements between first and last. + */ + function distance>(first: InputIterator, last: InputIterator): number; + /** + *

Advance iterator.

+ * + *

Advances the iterator it by n elements positions.

+ * + * @param it Iterator to be advanced. + * @param n Number of element positions to advance. + * + * @return An iterator to the element n positions before it. + */ + function advance>(it: InputIterator, n: number): InputIterator; + /** + *

Get iterator to previous element.

+ * + *

Returns an iterator pointing to the element that it would be pointing to if advanced -n positions.

+ * + * @param it Iterator to base position. + * @param n Number of element positions offset (1 by default). + * + * @return An iterator to the element n positions before it. + */ + function prev>(it: BidirectionalIterator, n?: number): BidirectionalIterator; + /** + *

Get iterator to next element.

+ * + *

Returns an iterator pointing to the element that it would be pointing to if advanced n positions.

+ * + * @param it Iterator to base position. + * @param n Number of element positions offset (1 by default). + * + * @return An iterator to the element n positions away from it. + */ + function next>(it: ForwardIterator, n?: number): ForwardIterator; + /** + *

Iterator to beginning.

+ * + *

Returns an iterator pointing to the first element in the sequence.

+ * + *

If the sequence is empty, the returned value shall not be dereferenced.

+ * + * @param container A container object of a class type for which member {@link IContainer.begin begin} is defined. + * + * @return The same as returned by {@link IContainer.begin container.begin()}. + */ + function begin(container: Vector): VectorIterator; + /** + *

Iterator to beginning.

+ * + *

Returns an iterator pointing to the first element in the sequence.

+ * + *

If the sequence is empty, the returned value shall not be dereferenced.

+ * + * @param container A container object of a class type for which member {@link IContainer.begin begin} is defined. + * + * @return The same as returned by {@link IContainer.begin container.begin()}. + */ + function begin(container: List): ListIterator; + /** + *

Iterator to beginning.

+ * + *

Returns an iterator pointing to the first element in the sequence.

+ * + *

If the sequence is empty, the returned value shall not be dereferenced.

+ * + * @param container A container object of a class type for which member {@link IContainer.begin begin} is defined. + * + * @return The same as returned by {@link IContainer.begin container.begin()}. + */ + function begin(container: Deque): DequeIterator; + /** + *

Iterator to beginning.

+ * + *

Returns an iterator pointing to the first element in the sequence.

+ * + *

If the sequence is empty, the returned value shall not be dereferenced.

+ * + * @param container A container object of a class type for which member {@link IContainer.begin begin} is defined. + * + * @return The same as returned by {@link IContainer.begin container.begin()}. + */ + function begin(container: base.SetContainer): SetIterator; + /** + *

Iterator to beginning.

+ * + *

Returns an iterator pointing to the first element in the sequence.

+ * + *

If the sequence is empty, the returned value shall not be dereferenced.

+ * + * @param container A container object of a class type for which member {@link IContainer.begin begin} is defined. + * + * @return The same as returned by {@link IContainer.begin container.begin()}. + */ + function begin(container: base.MapContainer): MapIterator; + /** + *

Iterator to end.

+ * + *

Returns an iterator pointing to the past-the-end element in the sequence.

+ * + *

If the sequence is {@link IContainer.empty empty}, the returned value compares equal to the one returned by {@link begin} with the same argument.

+ * + * @param container A container of a class type for which member {@link IContainer.end end} is defined. + * + * @return The same as returned by {@link IContainer.end container.end()}. + */ + function end(container: Vector): VectorIterator; + /** + *

Iterator to end.

+ * + *

Returns an iterator pointing to the past-the-end element in the sequence.

+ * + *

If the sequence is {@link IContainer.empty empty}, the returned value compares equal to the one returned by {@link begin} with the same argument.

+ * + * @param container A container of a class type for which member {@link IContainer.end end} is defined. + * + * @return The same as returned by {@link IContainer.end container.end()}. + */ + function end(container: List): ListIterator; + /** + *

Iterator to end.

+ * + *

Returns an iterator pointing to the past-the-end element in the sequence.

+ * + *

If the sequence is {@link IContainer.empty empty}, the returned value compares equal to the one returned by {@link begin} with the same argument.

+ * + * @param container A container of a class type for which member {@link IContainer.end end} is defined. + * + * @return The same as returned by {@link IContainer.end container.end()}. + */ + function end(container: Deque): DequeIterator; + /** + *

Iterator to end.

+ * + *

Returns an iterator pointing to the past-the-end element in the sequence.

+ * + *

If the sequence is {@link IContainer.empty empty}, the returned value compares equal to the one returned by {@link begin} with the same argument.

+ * + * @param container A container of a class type for which member {@link IContainer.end end} is defined. + * + * @return The same as returned by {@link IContainer.end container.end()}. + */ + function end(container: base.SetContainer): SetIterator; + /** + *

Iterator to end.

+ * + *

Returns an iterator pointing to the past-the-end element in the sequence.

+ * + *

If the sequence is {@link IContainer.empty empty}, the returned value compares equal to the one returned by {@link begin} with the same argument.

+ * + * @param container A container of a class type for which member {@link IContainer.end end} is defined. + * + * @return The same as returned by {@link IContainer.end container.end()}. + */ + function end(container: base.MapContainer): MapIterator; } declare namespace std { /** @@ -135,6 +366,8 @@ declare namespace std { * end, they perform worse than the others, and have less consistent iterators and references than {@link List}s. *

* + *

+ * *

Container properties

*
*
Sequence
@@ -150,15 +383,12 @@ declare namespace std { * *
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/vector/vector/ - *
- * * @param Type of the elements. * + * @reference http://www.cplusplus.com/reference/vector/vector * @author Jeongho Nam */ - class Vector extends Array implements base.IArray { + class Vector extends Array implements base.IArrayContainer { /** * Type definition of {@link Vector}'s {@link VectorIterator iterator}. */ @@ -209,11 +439,11 @@ declare namespace std { * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: base.Iterator, end: base.Iterator); + constructor(begin: Iterator, end: Iterator); /** * @inheritdoc */ - assign>(begin: InputIterator, end: InputIterator): void; + assign>(begin: InputIterator, end: InputIterator): void; /** * @inheritdoc */ @@ -274,10 +504,6 @@ declare namespace std { * @inheritdoc */ push_back(val: T): void; - /** - * @inheritdoc - */ - pop_back(): void; /** *

Insert an element.

* @@ -346,7 +572,92 @@ declare namespace std { * * @return An iterator that points to the first of the newly inserted elements. */ - insert>(position: VectorIterator, begin: InputIterator, end: InputIterator): VectorIterator; + insert>(position: VectorIterator, begin: InputIterator, end: InputIterator): VectorIterator; + /** + *

Insert an element.

+ * + *

The {@link Vector} is extended by inserting new element before the element at the specified + * position, effectively increasing the container size by one.

+ * + *

This causes an automatic reallocation of the allocated storage space if -and only if- the new + * {@link size} surpasses the current {@link capacity}.

+ * + *

Because {@link Vector}s use an Array as their underlying storage, inserting element in + * positions other than the {@link end end()} causes the container to relocate all the elements that were + * after position to its new position. This is generally an inefficient operation compared to the one + * performed for the same operation by other kinds of sequence containers (such as {@link List}).

+ * + * @param position Position in the {@link Vector} where the new element is inserted. + * {@link iterator} is a member type, defined as a + * {@link VectorIterator random access iterator} type that points to elements. + * @param val Value to be copied to the inserted element. + * + * @return An iterator that points to the newly inserted element. + */ + insert(position: VectorReverseIterator, val: T): VectorReverseIterator; + /** + *

Insert elements by repeated filling.

+ * + *

The {@link Vector} is extended by inserting new elements before the element at the specified + * position, effectively increasing the container size by the number of elements inserted.

+ * + *

This causes an automatic reallocation of the allocated storage space if -and only if- the new + * {@link size} surpasses the current {@link capacity}.

+ * + *

Because {@link Vector}s use an Array as their underlying storage, inserting elements in + * positions other than the {@link end end()} causes the container to relocate all the elements that were + * after position to their new positions. This is generally an inefficient operation compared to the + * one performed for the same operation by other kinds of sequence containers (such as {@link List}). + * + * @param position Position in the {@link Vector} where the new elements are inserted. + * {@link iterator} is a member type, defined as a + * {@link VectorIterator random access iterator} type that points to elements. + * @param n Number of elements to insert. Each element is initialized to a copy of val. + * @param val Value to be copied (or moved) to the inserted elements. + * + * @return An iterator that points to the first of the newly inserted elements. + */ + insert(position: VectorReverseIterator, n: number, val: T): VectorReverseIterator; + /** + *

Insert elements by range iterators.

+ * + *

The {@link Vector} is extended by inserting new elements before the element at the specified + * position, effectively increasing the container size by the number of elements inserted by range + * iterators.

+ * + *

This causes an automatic reallocation of the allocated storage space if -and only if- the new + * {@link size} surpasses the current {@link capacity}.

+ * + *

Because {@link Vector}s use an Array as their underlying storage, inserting elements in + * positions other than the {@link end end()} causes the container to relocate all the elements that were + * after position to their new positions. This is generally an inefficient operation compared to the + * one performed for the same operation by other kinds of sequence containers (such as {@link List}). + * + * @param position Position in the {@link Vector} where the new elements are inserted. + * {@link iterator} is a member type, defined as a + * {@link VectorIterator random access iterator} type that points to elements. + * @param begin Input interator of the initial position in a sequence. + * @param end Input interator of the final position in a sequence. + * + * @return An iterator that points to the first of the newly inserted elements. + */ + insert>(position: VectorReverseIterator, begin: InputIterator, end: InputIterator): VectorReverseIterator; + /** + * @hidden + */ + private insert_by_val(position, val); + /** + * @hidden + */ + protected insert_by_repeating_val(position: VectorIterator, n: number, val: T): VectorIterator; + /** + * @hidden + */ + protected insert_by_range>(position: VectorIterator, first: InputIterator, last: InputIterator): VectorIterator; + /** + * @inheritdoc + */ + pop_back(): void; /** *

Erase element.

* @@ -366,6 +677,45 @@ declare namespace std { * sequence. */ erase(position: VectorIterator): VectorIterator; + /** + *

Erase element.

+ * + *

Removes from the Vector either a single element; position.

+ * + *

This effectively reduces the container size by the number of elements removed.

+ * + *

Because {@link Vector}s use an Array as their underlying storage, erasing elements in + * position other than the {@link end end()} causes the container to relocate all the elements after the + * segment erased to their new positions. This is generally an inefficient operation compared to the one + * performed for the same operation by other kinds of sequence containers (such as {@link List}).

+ * + * @param begin An iterator specifying a range of beginning to erase. + * @param end An iterator specifying a range of end to erase. + * + * @return An iterator pointing to the new location of the element that followed the last element erased by + * the function call. This is the {@link rend rend()} if the operation erased the last element in the + * sequence. + */ + erase(first: VectorIterator, last: VectorIterator): VectorIterator; + /** + *

Erase element.

+ * + *

Removes from the {@link Vector} either a single element; position.

+ * + *

This effectively reduces the container size by the number of element removed.

+ * + *

Because {@link Vector}s use an Array as their underlying storage, erasing an element in + * position other than the {@link end end()} causes the container to relocate all the elements after the + * segment erased to their new positions. This is generally an inefficient operation compared to the one + * performed for the same operation by other kinds of sequence containers (such as {@link List}).

+ * + * @param position Iterator pointing to a single element to be removed from the {@link Vector}. + * + * @return An iterator pointing to the new location of the element that followed the last element erased by + * the function call. This is the {@link rend rend()} if the operation erased the last element in the + * sequence. + */ + erase(position: VectorReverseIterator): VectorReverseIterator; /** *

Erase element.

* @@ -385,7 +735,11 @@ declare namespace std { * the function call. This is the {@link end end()} if the operation erased the last element in the * sequence. */ - erase(begin: VectorIterator, end: VectorIterator): VectorIterator; + erase(first: VectorReverseIterator, last: VectorReverseIterator): VectorReverseIterator; + /** + * @hiddde + */ + protected erase_by_range(first: VectorIterator, last: VectorIterator): VectorIterator; /** * @inheritdoc */ @@ -394,15 +748,17 @@ declare namespace std { /** *

An iterator of Vector.

* + *

+ * * @param Type of the elements. * * @author Jeongho Nam */ - class VectorIterator extends base.Iterator implements base.IArrayIterator { + class VectorIterator extends Iterator implements base.IArrayIterator { /** * Sequence number of iterator in the source {@link Vector}. */ - protected index_: number; + private index_; /** *

Construct from the source {@link Vector container}.

* @@ -417,7 +773,7 @@ declare namespace std { /** * @hidden */ - protected vector: Vector; + private vector; /** * @inheritdoc */ @@ -425,6 +781,22 @@ declare namespace std { * Set value. */ value: T; + /** + * Get index. + */ + index: number; + /** + * @inheritdoc + */ + prev(): VectorIterator; + /** + * @inheritdoc + */ + next(): VectorIterator; + /** + * @inheritdoc + */ + advance(n: number): VectorIterator; /** *

Whether an iterator is equal with the iterator.

* @@ -441,19 +813,6 @@ declare namespace std { * @return Indicates whether equal or not. */ equal_to(obj: VectorIterator): boolean; - index: number; - /** - * @inheritdoc - */ - prev(): VectorIterator; - /** - * @inheritdoc - */ - next(): VectorIterator; - /** - * @inheritdoc - */ - advance(n: number): VectorIterator; /** * @inheritdoc */ @@ -462,35 +821,33 @@ declare namespace std { /** *

A reverse-iterator of Vector.

* + *

+ * * @param Type of the elements. * * @author Jeongho Nam */ - class VectorReverseIterator extends base.ReverseIterator implements base.IArrayIterator { - constructor(iterator: VectorIterator); + class VectorReverseIterator extends ReverseIterator, VectorReverseIterator> implements base.IArrayIterator { + constructor(base: VectorIterator); /** - * @hidden + * @inheritdoc + */ + protected create_neighbor(): VectorReverseIterator; + /** + * Set value. */ - private vector_iterator; - index: number; value: T; /** - * @inheritdoc + * Get index. */ - prev(): VectorReverseIterator; - /** - * @inheritdoc - */ - next(): VectorReverseIterator; - /** - * @inheritdoc - */ - advance(n: number): VectorReverseIterator; + index: number; } } declare namespace std.base { /** - *

An abstract

+ *

An abstract container.

+ * + *

* *

Container properties

*
@@ -550,6 +907,30 @@ declare namespace std.base { * @inheritdoc */ clear(): void; + /** + * @inheritdoc + */ + abstract begin(): Iterator; + /** + * @inheritdoc + */ + abstract end(): Iterator; + /** + * @inheritdoc + */ + abstract rbegin(): base.IReverseIterator; + /** + * @inheritdoc + */ + abstract rend(): base.IReverseIterator; + /** + * @inheritdoc + */ + abstract size(): number; + /** + * @inheritdoc + */ + empty(): boolean; /** * @inheritdoc */ @@ -569,31 +950,7 @@ declare namespace std.base { /** * @inheritdoc */ - abstract begin(): Iterator; - /** - * @inheritdoc - */ - abstract end(): Iterator; - /** - * @inheritdoc - */ - abstract rbegin(): ReverseIterator; - /** - * @inheritdoc - */ - abstract rend(): ReverseIterator; - /** - * @inheritdoc - */ - abstract size(): number; - /** - * @inheritdoc - */ - empty(): boolean; - /** - * @inheritdoc - */ - swap(obj: Container): void; + swap(obj: IContainer): void; } } declare namespace std { @@ -601,32 +958,32 @@ declare namespace std { *

Double ended queue.

* *

{@link Deque} (usually pronounced like "deck") is an irregular acronym of - * double-ended queue. Double-ended queues are sequence containers with dynamic - * sizes that can be expanded or contracted on both ends (either its front or its back).

+ * double-ended queue. Double-ended queues are sequence containers with dynamic sizes that can be + * expanded or contracted on both ends (either its front or its back).

* - *

Specific libraries may implement deques in different ways, generally as some form of dynamic - * array. But in any case, they allow for the individual elements to be accessed directly through - * random access iterators, with storage handled automatically by expanding and contracting the - * container as needed.

+ *

Specific libraries may implement deques in different ways, generally as some form of dynamic array. But in any + * case, they allow for the individual elements to be accessed directly through random access iterators, with storage + * handled automatically by expanding and contracting the container as needed.

* - *

Therefore, they provide a functionality similar to vectors, but with efficient insertion and - * deletion of elements also at the beginning of the sequence, and not only at its end. But, unlike - * {@link Vector}s, {@link Deque}s are not guaranteed to store all its elements in contiguous storage - * locations: accessing elements in a deque by offsetting a pointer to another element causes - * undefined behavior.

+ *

Therefore, they provide a functionality similar to vectors, but with efficient insertion and deletion of + * elements also at the beginning of the sequence, and not only at its end. But, unlike {@link Vector Vectors}, + * {@link Deque Deques} are not guaranteed to store all its elements in contiguous storage locations: accessing + * elements in a deque by offsetting a pointer to another element causes undefined behavior.

* - *

Both {@link Vector}s and {@link Deque}s provide a very similar interface and can be used for - * similar purposes, but internally both work in quite different ways: While {@link Vector}s use a - * single array that needs to be occasionally reallocated for growth, the elements of a {@link Deque} - * can be scattered in different chunks of storage, with the container keeping the necessary information - * internally to provide direct access to any of its elements in constant time and with a uniform - * sequential interface (through iterators). Therefore, {@link Deque}s are a little more complex - * internally than {@link Vector}s, but this allows them to grow more efficiently under certain - * circumstances, especially with very long sequences, where reallocations become more expensive.

+ *

Both {@link Vector}s and {@link Deque}s provide a very similar interface and can be used for similar purposes, + * but internally both work in quite different ways: While {@link Vector}s use a single array that needs to be + * occasionally reallocated for growth, the elements of a {@link Deque} can be scattered in different chunks of + * storage, with the container keeping the necessary information internally to provide direct access to any of its + * elements in constant time and with a uniform sequential interface (through iterators). Therefore, + * {@link Deque Deques} are a little more complex internally than {@link Vector}s, but this allows them to grow more + * efficiently under certain circumstances, especially with very long sequences, where reallocations become more + * expensive.

* - *

For operations that involve frequent insertion or removals of elements at positions other than - * the beginning or the end, {@link Deque}s perform worse and have less consistent iterators and - * references than {@link List}s.

+ *

For operations that involve frequent insertion or removals of elements at positions other than the beginning or + * the end, {@link Deque Deques} perform worse and have less consistent iterators and references than + * {@link List Lists}.

+ * + *

* *

Container properties

*
@@ -640,15 +997,12 @@ declare namespace std { * of the sequence. *
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/deque/deque/
  • - *
- * * @param Type of the elements. * + * @reference http://www.cplusplus.com/reference/deque/deque/ * @author Jeongho Nam */ - class Deque extends base.Container implements base.IArray, base.IDeque { + class Deque extends base.Container implements base.IArrayContainer, base.IDequeContainer { /** * Type definition of {@link Deque}'s {@link DequeIterator iterator}. */ @@ -758,11 +1112,11 @@ declare namespace std { * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: base.Iterator, end: base.Iterator); + constructor(begin: Iterator, end: Iterator); /** * @inheritdoc */ - assign>(begin: InputIterator, end: InputIterator): void; + assign>(begin: InputIterator, end: InputIterator): void; /** * @inheritdoc */ @@ -854,7 +1208,35 @@ declare namespace std { /** * @inheritdoc */ - insert>(position: DequeIterator, begin: InputIterator, end: InputIterator): DequeIterator; + insert>(position: DequeIterator, begin: InputIterator, end: InputIterator): DequeIterator; + /** + * @inheritdoc + */ + insert(position: DequeReverseIterator, val: T): DequeReverseIterator; + /** + * @inheritdoc + */ + insert(position: DequeReverseIterator, n: number, val: T): DequeReverseIterator; + /** + * @inheritdoc + */ + insert>(position: DequeReverseIterator, begin: InputIterator, end: InputIterator): DequeReverseIterator; + /** + * @hidden + */ + private insert_by_val(position, val); + /** + * @hidden + */ + protected insert_by_repeating_val(position: DequeIterator, n: number, val: T): DequeIterator; + /** + * @hidden + */ + protected insert_by_range>(position: DequeIterator, begin: InputIterator, end: InputIterator): DequeIterator; + /** + * @hidden + */ + private insert_by_items(position, items); /** * @inheritdoc */ @@ -862,7 +1244,19 @@ declare namespace std { /** * @inheritdoc */ - erase(begin: DequeIterator, end: DequeIterator): DequeIterator; + erase(first: DequeIterator, last: DequeIterator): DequeIterator; + /** + * @inheritdoc + */ + erase(position: DequeReverseIterator): DequeReverseIterator; + /** + * @inheritdoc + */ + erase(first: DequeReverseIterator, last: DequeReverseIterator): DequeReverseIterator; + /** + * @hidden + */ + protected erase_by_range(first: DequeIterator, last: DequeIterator): DequeIterator; /** * @inheritdoc */ @@ -873,12 +1267,13 @@ declare namespace std { private swap_deque(obj); } /** - * An iterator of {@link Deque}. + *

An iterator of {@link Deque}.

+ * + *

* * @author Jeongho Nam */ - class DequeIterator extends base.Iterator implements base.IArrayIterator { - private deque; + class DequeIterator extends Iterator implements base.IArrayIterator { /** * Sequence number of iterator in the source {@link Deque}. */ @@ -894,10 +1289,30 @@ declare namespace std { * @param index Sequence number of the element in the source {@link Deque}. */ constructor(source: Deque, index: number); + /** + * @hidden + */ + private deque; /** * @inheritdoc */ value: T; + /** + * @inheritdoc + */ + index: number; + /** + * @inheritdoc + */ + prev(): DequeIterator; + /** + * @inheritdoc + */ + next(): DequeIterator; + /** + * @inheritdoc + */ + advance(n: number): DequeIterator; /** *

Whether an iterator is equal with the iterator.

* @@ -914,22 +1329,6 @@ declare namespace std { * @return Indicates whether equal or not. */ equal_to(obj: DequeIterator): boolean; - /** - * @inheritdoc - */ - index: number; - /** - * @inheritdoc - */ - prev(): DequeIterator; - /** - * @inheritdoc - */ - next(): DequeIterator; - /** - * @inheritdoc - */ - advance(n: number): DequeIterator; /** * @inheritdoc */ @@ -938,79 +1337,72 @@ declare namespace std { /** *

A reverse-iterator of Deque.

* + *

+ * * @param Type of the elements. * * @author Jeongho Nam */ - class DequeReverseIterator extends base.ReverseIterator implements base.IArrayIterator { - constructor(iterator: DequeIterator); + class DequeReverseIterator extends ReverseIterator, DequeReverseIterator> implements base.IArrayIterator { + constructor(base: DequeIterator); /** - * @hidden + * @inheritdoc + */ + protected create_neighbor(): DequeReverseIterator; + /** + * Set value. */ - private deque_iterator; - index: number; value: T; /** - * @inheritdoc + * Get index. */ - prev(): DequeReverseIterator; - /** - * @inheritdoc - */ - next(): DequeReverseIterator; - /** - * @inheritdoc - */ - advance(n: number): DequeReverseIterator; + index: number; } } declare namespace std { /** *

Doubly linked list.

* - *

{@link List}s are sequence containers that allow constant time insert and erase operations anywhere - * within the sequence, and iteration in both directions.

+ *

{@link List}s are sequence containers that allow constant time insert and erase operations anywhere within the + * sequence, and iteration in both directions.

* - *

List containers are implemented as doubly-linked lists; Doubly linked lists can store each of the elements - * they contain in different and unrelated storage locations. The ordering is kept internally by the association - * to each element of a link to the element preceding it and a link to the element following it.

+ *

List containers are implemented as doubly-linked lists; Doubly linked lists can store each of the elements they + * contain in different and unrelated storage locations. The ordering is kept internally by the association to each + * element of a link to the element preceding it and a link to the element following it.

* - *

They are very similar to forward_list: The main difference being that forward_list objects are - * single-linked lists, and thus they can only be iterated forwards, in exchange for being somewhat smaller and - * more efficient.

+ *

They are very similar to forward_list: The main difference being that forward_list objects are single-linked + * lists, and thus they can only be iterated forwards, in exchange for being somewhat smaller and more efficient.

* - *

Compared to other base standard sequence containers (array, vector and deque), lists perform generally - * better in inserting, extracting and moving elements in any position within the container for which an iterator - * has already been obtained, and therefore also in algorithms that make intensive use of these, like sorting - * algorithms.

+ *

Compared to other base standard sequence containers (array, vector and deque), lists perform generally better + * in inserting, extracting and moving elements in any position within the container for which an iterator has already + * been obtained, and therefore also in algorithms that make intensive use of these, like sorting algorithms.

* *

The main drawback of lists and forward_lists compared to these other sequence containers is that they lack - * direct access to the elements by their position; For example, to access the sixth element in a list, one has - * to iterate from a known position (like the beginning or the end) to that position, which takes linear time in - * the distance between these. They also consume some extra memory to keep the linking information associated to - * each element (which may be an important factor for large lists of small-sized elements).

+ * direct access to the elements by their position; For example, to access the sixth element in a list, one has to + * iterate from a known position (like the beginning or the end) to that position, which takes linear time in the + * distance between these. They also consume some extra memory to keep the linking information associated to each + * element (which may be an important factor for large lists of small-sized elements).

+ * + *

* *

Container properties

*
*
Sequence
- *
Elements in sequence containers are ordered in a strict linear sequence. Individual elements are - * accessed by their position in this sequence.
+ *
Elements in sequence containers are ordered in a strict linear sequence. Individual elements are accessed by + * their position in this sequence.
* *
Doubly-linked list
- *
Each element keeps information on how to locate the next and the previous elements, allowing constant - * time insert and erase operations before or after a specific element (even of entire ranges), but no - * direct random access.
+ *
Each element keeps information on how to locate the next and the previous elements, allowing constant time + * insert and erase operations before or after a specific element (even of entire ranges), but no direct random + * access.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/list/list/ - *
- * * @param Type of the elements. * + * @reference http://www.cplusplus.com/reference/list/list/ * @author Jeongho Nam */ - class List extends base.Container implements base.IDeque { + class List extends base.Container implements base.IDequeContainer { /** * An iterator of beginning. */ @@ -1065,7 +1457,7 @@ declare namespace std { * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: base.Iterator, end: base.Iterator); + constructor(begin: Iterator, end: Iterator); /** * @inheritdoc */ @@ -1073,7 +1465,7 @@ declare namespace std { /** * @inheritdoc */ - assign>(begin: InputIterator, end: InputIterator): void; + assign>(begin: InputIterator, end: InputIterator): void; /** * @inheritdoc */ @@ -1147,6 +1539,13 @@ declare namespace std { /** *

Insert elements by repeated filling.

* + *

The container is extended by inserting a new element before the element at the specified + * position. This effectively increases the {@link List.size List size} by the amount of elements + * inserted.

+ * + *

Unlike other standard sequence containers, {@link List} is specifically designed to be efficient + * inserting and removing elements in any position, even in the middle of the sequence.

+ * * @param position Position in the container where the new elements are inserted. The {@link iterator} is a * member type, defined as a {@link ListIterator bidirectional iterator} type that points to * elements. @@ -1157,6 +1556,14 @@ declare namespace std { */ insert(position: ListIterator, size: number, val: T): ListIterator; /** + *

Insert elements by range iterators.

+ * + *

The container is extended by inserting a new element before the element at the specified + * position. This effectively increases the {@link List.size List size} by the amount of elements + * inserted.

+ * + *

Unlike other standard sequence containers, {@link List} is specifically designed to be efficient + * inserting and removing elements in any position, even in the middle of the sequence.

* * @param position Position in the container where the new elements are inserted. The {@link iterator} is a * member type, defined as a {@link ListIterator bidirectional iterator} type that points to @@ -1166,7 +1573,63 @@ declare namespace std { * * @return An iterator that points to the first of the newly inserted elements. */ - insert>(position: ListIterator, begin: InputIterator, end: InputIterator): ListIterator; + insert>(position: ListIterator, begin: InputIterator, end: InputIterator): ListIterator; + /** + *

Insert an element.

+ * + *

The container is extended by inserting a new element before the element at the specified + * position. This effectively increases the {@link List.size List size} by the amount of elements + * inserted.

+ * + *

Unlike other standard sequence containers, {@link List} is specifically designed to be efficient + * inserting and removing elements in any position, even in the middle of the sequence.

+ * + * @param position Position in the container where the new element is inserted. + * {@link iterator}> is a member type, defined as a + * {@link ListReverseIterator bidirectional iterator} type that points to elements. + * @param val Value to be inserted as an element. + * + * @return An iterator that points to the newly inserted element; val. + */ + insert(position: ListReverseIterator, val: T): ListReverseIterator; + /** + *

Insert elements by repeated filling.

+ * + *

The container is extended by inserting a new element before the element at the specified + * position. This effectively increases the {@link List.size List size} by the amount of elements + * inserted.

+ * + *

Unlike other standard sequence containers, {@link List} is specifically designed to be efficient + * inserting and removing elements in any position, even in the middle of the sequence.

+ * + * @param position Position in the container where the new elements are inserted. The {@link iterator} is a + * member type, defined as a {@link ListReverseIterator bidirectional iterator} type that points to + * elements. + * @param size Number of elements to insert. + * @param val Value to be inserted as an element. + * + * @return An iterator that points to the first of the newly inserted elements. + */ + insert(position: ListReverseIterator, size: number, val: T): ListReverseIterator; + /** + *

Insert elements by range iterators.

+ * + *

The container is extended by inserting a new element before the element at the specified + * position. This effectively increases the {@link List.size List size} by the amount of elements + * inserted.

+ * + *

Unlike other standard sequence containers, {@link List} is specifically designed to be efficient + * inserting and removing elements in any position, even in the middle of the sequence.

+ * + * @param position Position in the container where the new elements are inserted. The {@link iterator} is a + * member type, defined as a {@link ListReverseIterator bidirectional iterator} type that points to + * elements. + * @param begin An iterator specifying range of the begining element. + * @param end An iterator specifying range of the ending element. + * + * @return An iterator that points to the first of the newly inserted elements. + */ + insert>(position: ListReverseIterator, begin: InputIterator, end: InputIterator): ListReverseIterator; /** * @hidden */ @@ -1174,11 +1637,11 @@ declare namespace std { /** * @hidden */ - private insertByRepeatingVal(position, size, val); + protected insert_by_repeating_val(position: ListIterator, size: number, val: T): ListIterator; /** * @hidden */ - private insert_by_range(position, begin, end); + protected insert_by_range>(position: ListIterator, begin: InputIterator, end: InputIterator): ListIterator; /** *

Erase an element.

* @@ -1213,13 +1676,42 @@ declare namespace std { */ erase(begin: ListIterator, end: ListIterator): ListIterator; /** - * @hidden + *

Erase an element.

+ * + *

Removes from the {@link List} either a single element; position.

+ * + *

This effectively reduces the container size by the number of element removed.

+ * + *

Unlike other standard sequence containers, {@link List} objects are specifically designed to be + * efficient inserting and removing elements in any position, even in the middle of the sequence.

+ * + * @param position Iterator pointing to a single element to be removed from the {@link List}. + * + * @return An iterator pointing to the element that followed the last element erased by the function call. + * This is the {@link rend rend()} if the operation erased the last element in the sequence. */ - private erase_by_iterator(it); + erase(position: ListReverseIterator): ListReverseIterator; + /** + *

Erase elements.

+ * + *

Removes from the {@link List} container a range of elements.

+ * + *

This effectively reduces the container {@link size} by the number of elements removed.

+ * + *

Unlike other standard sequence containers, {@link List} objects are specifically designed to be + * efficient inserting and removing elements in any position, even in the middle of the sequence.

+ * + * @param begin An iterator specifying a range of beginning to erase. + * @param end An iterator specifying a range of end to erase. + * + * @return An iterator pointing to the element that followed the last element erased by the function call. + * This is the {@link rend rend()} if the operation erased the last element in the sequence. + */ + erase(begin: ListReverseIterator, end: ListReverseIterator): ListReverseIterator; /** * @hidden */ - private erase_by_range(begin, end); + protected erase_by_range(first: ListIterator, last: ListIterator): ListIterator; /** *

Remove duplicate values.

* @@ -1458,12 +1950,16 @@ declare namespace std { private swap_list(obj); } /** - * An iterator, node of a List. + *

An iterator, node of a List.

+ * + *

+ * + * @author Jeongho Nam */ - class ListIterator extends base.Iterator { - protected prev_: ListIterator; - protected next_: ListIterator; - protected value_: T; + class ListIterator extends Iterator { + private prev_; + private next_; + private value_; /** *

Construct from the source {@link List container}.

* @@ -1480,15 +1976,12 @@ declare namespace std { /** * @inheritdoc */ - setPrev(prev: ListIterator): void; + set_prev(it: ListIterator): void; /** * @inheritdoc */ - setNext(next: ListIterator): void; - /** - * @inheritdoc - */ - equal_to(obj: ListIterator): boolean; + set_next(next: ListIterator): void; + private list(); /** * @inheritdoc */ @@ -1505,6 +1998,10 @@ declare namespace std { * @inheritdoc */ value: T; + /** + * @inheritdoc + */ + equal_to(obj: ListIterator): boolean; /** * @inheritdoc */ @@ -1513,29 +2010,22 @@ declare namespace std { /** *

A reverse-iterator of List.

* + *

+ * * @param Type of the elements. * * @author Jeongho Nam */ - class ListReverseIterator extends base.ReverseIterator { - constructor(iterator: ListIterator); + class ListReverseIterator extends ReverseIterator, ListReverseIterator> { + constructor(base: ListIterator); /** - * @hidden + * @inheritdoc + */ + protected create_neighbor(): ListReverseIterator; + /** + * @inheritdoc */ - private list_iterator; value: T; - /** - * @inheritdoc - */ - prev(): ListReverseIterator; - /** - * @inheritdoc - */ - next(): ListReverseIterator; - /** - * @inheritdoc - */ - advance(n: number): ListReverseIterator; } } declare namespace std { @@ -1568,12 +2058,11 @@ declare namespace std { * By default, if no container class is specified for a particular {@link Queue} class instantiation, the standard * container {@link List} is used.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/queue/queue/
  • - *
+ *

* * @param Type of elements. * + * @reference http://www.cplusplus.com/reference/queue/queue * @author Jeongho Nam */ class Queue { @@ -1770,7 +2259,7 @@ declare namespace std { * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: base.Iterator, end: base.Iterator); + constructor(begin: Iterator, end: Iterator); /** * Range Constructor with compare. * @@ -1778,7 +2267,7 @@ declare namespace std { * @param end Input interator of the final position in a sequence. * @param compare A binary predicate determines order of elements. */ - constructor(begin: base.Iterator, end: base.Iterator, compare: (left: T, right: T) => boolean); + constructor(begin: Iterator, end: Iterator, compare: (left: T, right: T) => boolean); /** * @hidden */ @@ -1790,7 +2279,7 @@ declare namespace std { /** * @hidden */ - protected construct_from_range(begin: base.Iterator, end: base.Iterator): void; + protected construct_from_range(begin: Iterator, end: Iterator): void; /** *

Return size.

* @@ -1897,12 +2386,11 @@ declare namespace std { * By default, if no container class is specified for a particular {@link Stack} class instantiation, the standard * container {@link List} is used.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stack/stack/
  • - *
+ *

* * @param Type of elements. * + * @reference http://www.cplusplus.com/reference/stack/stack * @author Jeongho Nam */ class Stack { @@ -2007,12 +2495,14 @@ declare namespace std.base { * {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index * table like {@link RBTree tree} or {@link HashBuckets hash-table}.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute - * position in the + * position in the container. *
* *
Set
@@ -2054,6 +2544,10 @@ declare namespace std.base { * Construct from range iterators. */ constructor(begin: Iterator, end: Iterator); + /** + * @hidden + */ + protected init(): void; /** * @hidden */ @@ -2061,11 +2555,11 @@ declare namespace std.base { /** * @hidden */ - protected construct_from_container(container: Container): void; + protected construct_from_container(container: IContainer): void; /** * @hidden */ - protected construct_from_range(begin: Iterator, end: Iterator): void; + protected construct_from_range>(begin: InputIterator, end: InputIterator): void; /** * @inheritdoc */ @@ -2146,6 +2640,19 @@ declare namespace std.base { * same value in the {@link SetContainer}. */ insert(hint: SetIterator, val: T): SetIterator; + /** + *

Insert an element with hint.

+ * + *

Extends the container by inserting new elements, effectively increasing the container size by the + * number of elements inserted.

+ * + * @param hint Hint for the position where the element can be inserted. + * @param val Value to be inserted as an element. + * + * @return An iterator pointing to either the newly inserted element or to the element that already had its + * same value in the {@link SetContainer}. + */ + insert(hint: SetReverseIterator, val: T): SetReverseIterator; /** *

Insert elements with a range of a

* @@ -2163,11 +2670,11 @@ declare namespace std.base { /** * @hidden */ - protected insert_by_hint(hint: SetIterator, val: T): SetIterator; + protected abstract insert_by_hint(hint: SetIterator, val: T): SetIterator; /** * @hidden */ - protected insert_by_range>(begin: InputIterator, end: InputIterator): void; + protected abstract insert_by_range>(begin: InputIterator, end: InputIterator): void; /** *

Erase an element.

*

Removes from the set container the elements whose value is key.

@@ -2193,63 +2700,86 @@ declare namespace std.base { * @param end An iterator specifying a range of end to erase. */ erase(begin: SetIterator, end: SetIterator): SetIterator; + /** + * @inheritdoc + */ + erase(it: SetReverseIterator): SetReverseIterator; + /** + *

Erase elements.

+ *

Removes from the set container a range of elements..

+ * + *

This effectively reduces the container size by the number of elements removed.

+ * + * @param begin An iterator specifying a range of beginning to erase. + * @param end An iterator specifying a range of end to erase. + */ + erase(begin: SetReverseIterator, end: SetReverseIterator): SetReverseIterator; + /** + * @hidden + */ + private erase_by_iterator(first, last?); /** * @hidden */ private erase_by_val(val); - /** - * @hidden - */ - private erase_by_iterator(it); /** * @hidden */ private erase_by_range(begin, end); /** - *

Abstract method handling insertion for indexing.

+ *

Abstract method handling insertions for indexing.

* - *

This method, {@link handle_insert} is designed to register the item to somewhere storing those - * {@link SetIterator iterators} for indexing, fast accessment and retrievalance.

- * - *

When {@link insert} is called, a new element will be inserted into the {@link data_ list container} - * and a new {@link SetIterator iterator} item, pointing the element, will be created and the newly - * created iterator item will be shifted into this method {@link handle_insert} after the insertion.

- * - *

If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the item will be - * registered into the {@link TreeSet.tree_ tree} as a {@link XTreeNode tree node item}. Else if the derived - * one is {@link HashBuckets hash-based} like {@link HashSet}, the item will be registered into the - * {@link HashSet.hash_buckets_ hash bucket}.

- * - * @param item Iterator of inserted item. - */ - protected abstract handle_insert(item: SetIterator): void; - /** - *

Abstract method handling deletion for indexing.

- * - *

This method, {@link handle_insert} is designed to unregister the item to somewhere storing + *

This method, {@link handle_insert} is designed to register the first to last to somewhere storing * those {@link SetIterator iterators} for indexing, fast accessment and retrievalance.

* - *

When {@link erase} is called with item, an {@link SetIterator iterator} positioning somewhere - * place to be deleted, is memorized and shifted to this method {@link handle_erase} after the deletion - * process is terminated.

+ *

When {@link insert} is called, new elements will be inserted into the {@link data_ list container} and new + * {@link SetIterator iterators} first to last, pointing the inserted elements, will be created and the + * newly created iterators first to last will be shifted into this method {@link handle_insert} after the + * insertions.

* - *

If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the item will be - * unregistered from the {@link TreeSet.tree_ tree} as a {@link XTreeNode tree node item}. Else if the - * derived one is {@link HashBuckets hash-based} like {@link HashSet}, the item will be unregistered - * from the {@link HashSet.hash_buckets_ hash bucket}.

+ *

If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link SetIterator iterators} + * will be registered into the {@link TreeSet.tree_ tree} as a {@link XTreeNode tree node item}. Else if the + * derived one is {@link HashBuckets hash-based} like {@link HashSet}, the first to last will be + * registered into the {@link HashSet.hash_buckets_ hash bucket}.

* - * @param item Iterator of erased item. + * @param first An {@link SetIterator} to the initial position in a sequence. + * @param last An {@link SetIterator} to the final position in a sequence. The range used is + * [first, last), which contains all the elements between first and last, + * including the element pointed by first but not the element pointed by last. */ - protected abstract handle_erase(item: SetIterator): void; + protected abstract handle_insert(first: SetIterator, last: SetIterator): void; + /** + *

Abstract method handling deletions for indexing.

+ * + *

This method, {@link handle_insert} is designed to unregister the first to last to somewhere storing + * those {@link SetIterator iterators} for indexing, fast accessment and retrievalance.

+ * + *

When {@link erase} is called with first to last, {@link SetIterator iterators} positioning somewhere + * place to be deleted, is memorized and shifted to this method {@link handle_erase} after the deletion process is + * terminated.

+ * + *

If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link SetIterator iterators} + * will be unregistered from the {@link TreeSet.tree_ tree} as a {@link XTreeNode tree node item}. Else if the + * derived one is {@link HashBuckets hash-based} like {@link HashSet}, the first to last will be + * unregistered from the {@link HashSet.hash_buckets_ hash bucket}.

+ * + * @param first An {@link SetIterator} to the initial position in a sequence. + * @param last An {@link SetIterator} to the final position in a sequence. The range used is + * [first, last), which contains all the elements between first and last, + * including the element pointed by first but not the element pointed by last. + */ + protected abstract handle_erase(first: SetIterator, last: SetIterator): void; } } declare namespace std { /** *

An iterator of a Set.

* + *

+ * * @author Jeongho Nam */ - class SetIterator extends base.Iterator implements IComparable> { + class SetIterator extends Iterator implements IComparable> { private list_iterator_; /** *

Construct from source and index number.

@@ -2303,28 +2833,18 @@ declare namespace std { /** *

A reverse-iterator of Set.

* + *

+ * * @param Type of the elements. * * @author Jeongho Nam */ - class SetReverseIterator extends base.ReverseIterator { - constructor(iterator: SetIterator); - /** - * @hidden - */ - private set_iterator; + class SetReverseIterator extends ReverseIterator, SetReverseIterator> { + constructor(base: SetIterator); /** * @inheritdoc */ - prev(): SetReverseIterator; - /** - * @inheritdoc - */ - next(): SetReverseIterator; - /** - * @inheritdoc - */ - advance(n: number): SetReverseIterator; + protected create_neighbor(): SetReverseIterator; } } declare namespace std.base { @@ -2342,12 +2862,14 @@ declare namespace std.base { * {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index * table like {@link RBTree tree} or {@link HashBuckets hash-table}.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute - * position in the + * position in the container. *
* *
Set
@@ -2363,10 +2885,6 @@ declare namespace std.base { * @author Jeongho Nam */ abstract class UniqueSet extends SetContainer { - /** - * Default Constructor. - */ - constructor(); /** * @inheritdoc */ @@ -2395,10 +2913,18 @@ declare namespace std.base { * @inheritdoc */ insert(hint: SetIterator, val: T): SetIterator; + /** + * @inheritdoc + */ + insert(hint: SetReverseIterator, val: T): SetReverseIterator; /** * @inheritdoc */ insert>(begin: InputIterator, end: InputIterator): void; + /** + * @inheritdoc + */ + swap(obj: UniqueSet): void; } } declare namespace std.base { @@ -2416,12 +2942,14 @@ declare namespace std.base { * {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index * table like {@link RBTree tree} or {@link HashBuckets hash-table}.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute - * position in the + * position in the container. *
* *
Set
@@ -2437,14 +2965,6 @@ declare namespace std.base { * @author Jeongho Nam */ abstract class MultiSet extends SetContainer { - /** - * Default Constructor. - */ - constructor(); - /** - * @inheritdoc - */ - count(val: T): number; /** *

Insert an element.

* @@ -2460,10 +2980,18 @@ declare namespace std.base { * @inheritdoc */ insert(hint: SetIterator, val: T): SetIterator; + /** + * @inheritdoc + */ + insert(hint: SetReverseIterator, val: T): SetReverseIterator; /** * @inheritdoc */ insert>(begin: InputIterator, end: InputIterator): void; + /** + * @inheritdoc + */ + swap(obj: MultiSet): void; } } declare namespace std { @@ -2485,11 +3013,13 @@ declare namespace std { * elements by their key, although they are generally less efficient for range iteration through a * subset of their elements.

* + *

+ * *

Container properties

*
*
Associative
*
Elements in associative containers are referenced by their key and not by their absolute - * position in the
+ * position in the container. * *
Hashed
*
Hashed containers organize their elements using hash tables that allow for fast access to elements @@ -2502,41 +3032,22 @@ declare namespace std { *
No two elements in the container can have equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/unordered_set/unordered_set/
  • - *
- * * @param Type of the elements. * Each element in an {@link HashSet} is also uniquely identified by this value. * + * @reference http://www.cplusplus.com/reference/unordered_set/unordered_set * @author Jeongho Nam */ class HashSet extends base.UniqueSet { private hash_buckets_; /** - * Default Constructor. + * @hidden */ - constructor(); - /** - * Construct from elements. - */ - constructor(items: Array); - /** - * Copy Constructor. - */ - constructor(container: base.IContainer); - /** - * Construct from range iterators. - */ - constructor(begin: base.Iterator, end: base.Iterator); + protected init(): void; /** * @hidden */ protected construct_from_array(items: Array): void; - /** - * @inheritdoc - */ - assign>(begin: InputIterator, end: InputIterator): void; /** * @inheritdoc */ @@ -2552,19 +3063,23 @@ declare namespace std { /** * @hidden */ - protected insert_by_range>(begin: InputIterator, end: InputIterator): void; + protected insert_by_hint(hint: SetIterator, val: T): SetIterator; + /** + * @hidden + */ + protected insert_by_range>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_insert(item: SetIterator): void; + protected handle_insert(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - protected handle_erase(item: SetIterator): void; + protected handle_erase(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - swap(obj: base.IContainer): void; + swap(obj: base.UniqueSet): void; /** * @hidden */ @@ -2588,11 +3103,13 @@ declare namespace std { *

Elements with equivalent values are grouped together in the same bucket and in such a way that an * iterator can iterate through all of them. Iterators in the container are doubly linked iterators.

* + *

+ * *

Container properties

*
*
Associative
*
Elements in associative containers are referenced by their key and not by their absolute - * position in the
+ * position in the container. * *
Hashed
*
Hashed containers organize their elements using hash tables that allow for fast access to elements @@ -2605,41 +3122,22 @@ declare namespace std { *
The container can hold multiple elements with equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/unordered_set/unordered_multiset/
  • - *
- * * @param Type of the elements. * Each element in an {@link UnorderedMultiSet} is also identified by this value.. * + * @reference http://www.cplusplus.com/reference/unordered_set/unordered_multiset * @author Jeongho Nam */ class HashMultiSet extends base.MultiSet { private hash_buckets_; /** - * Default Constructor. + * @hidden */ - constructor(); - /** - * Construct from elements. - */ - constructor(items: Array); - /** - * Copy Constructor. - */ - constructor(container: base.IContainer); - /** - * Construct from range iterators. - */ - constructor(begin: base.Iterator, end: base.Iterator); + protected init(): void; /** * @hidden */ protected construct_from_array(items: Array): void; - /** - * @inheritdoc - */ - assign>(begin: InputIterator, end: InputIterator): void; /** * @inheritdoc */ @@ -2648,6 +3146,10 @@ declare namespace std { * @inheritdoc */ find(val: T): SetIterator; + /** + * @inheritdoc + */ + count(val: T): number; /** * @hidden */ @@ -2655,19 +3157,23 @@ declare namespace std { /** * @hidden */ - protected insert_by_range>(begin: InputIterator, end: InputIterator): void; + protected insert_by_hint(hint: SetIterator, val: T): SetIterator; + /** + * @hidden + */ + protected insert_by_range>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_insert(it: SetIterator): void; + protected handle_insert(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - protected handle_erase(it: SetIterator): void; + protected handle_erase(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - swap(obj: base.IContainer): void; + swap(obj: base.MultiSet): void; /** * @hidden */ @@ -2693,12 +3199,14 @@ declare namespace std.base { * {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index * table like {@link RBTree tree} or {@link HashBuckets hash-table}.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute position - * in the + * in the container. *
* *
Map
@@ -2713,7 +3221,7 @@ declare namespace std.base { * * @author Jeongho Nam */ - abstract class MapContainer { + abstract class MapContainer extends base.Container> { /** * Type definition of {@link MapContainer}'s {@link MapIterator iterator}. */ @@ -2744,11 +3252,15 @@ declare namespace std.base { /** * Copy Constructor. */ - constructor(container: MapContainer); + constructor(container: IContainer>); /** * Construct from range iterators. */ - constructor(begin: MapIterator, end: MapIterator); + constructor(begin: Iterator>, end: Iterator>); + /** + * @hidden + */ + protected init(): void; /** * @hidden */ @@ -2756,25 +3268,17 @@ declare namespace std.base { /** * @hidden */ - protected construct_from_container(container: MapContainer): void; + protected construct_from_container(container: IContainer>): void; /** * @hidden */ - protected construct_from_range(begin: MapIterator, end: MapIterator): void; + protected construct_from_range>>(begin: InputIterator, end: InputIterator): void; /** - *

Assign new content to content.

- * - *

Assigns new contents to the container, replacing its current contents, and modifying its {@link size} - * accordingly.

- * - * @param begin Input interator of the initial position in a sequence. - * @param end Input interator of the final position in a sequence. + * @inheritdoc */ - assign(begin: MapIterator, end: MapIterator): void; + assign>>(first: InputIterator, last: InputIterator): void; /** - *

Clear content.

- * - *

Removes all elements from the container, leaving the container with a size of 0.

+ * @inheritdoc */ clear(): void; /** @@ -2879,9 +3383,13 @@ declare namespace std.base { */ size(): number; /** - * Test whether the container is empty. + * @inheritdoc */ - empty(): boolean; + push(...args: Pair[]): number; + /** + * @inheritdoc + */ + push(...args: [Key, T][]): number; /** *

Insert an element.

* @@ -2895,6 +3403,19 @@ declare namespace std.base { * equivalent key in the {@link MapContainer}. */ insert(hint: MapIterator, pair: Pair): MapIterator; + /** + *

Insert an element.

+ * + *

Extends the container by inserting a new element, effectively increasing the container {@link size} + * by the number of element inserted (zero or one).

+ * + * @param hint Hint for the position where the element can be inserted. + * @param pair {@link Pair} to be inserted as an element. + * + * @return An iterator pointing to either the newly inserted element or to the element that already had an + * equivalent key in the {@link MapContainer}. + */ + insert(hint: MapReverseIterator, pair: Pair): MapReverseIterator; /** *

Insert an element.

* @@ -2908,6 +3429,19 @@ declare namespace std.base { * equivalent key in the {@link MapContainer}. */ insert(hint: MapIterator, tuple: [L, U]): MapIterator; + /** + *

Insert an element.

+ * + *

Extends the container by inserting new elements, effectively increasing the container {@link size} + * by the number of elements inserted.

+ * + * @param hint Hint for the position where the element can be inserted. + * @param tuple Tuple represensts the {@link Pair} to be inserted as an element. + * + * @return An iterator pointing to either the newly inserted element or to the element that already had an + * equivalent key in the {@link MapContainer}. + */ + insert(hint: MapReverseIterator, tuple: [L, U]): MapReverseIterator; /** *

Insert elements from range iterators.

* @@ -2919,7 +3453,7 @@ declare namespace std.base { * Notice that the range includes all the elements between begin and end, * including the element pointed by begin but not the one pointed by end. */ - insert(begin: MapIterator, end: MapIterator): void; + insert>>(first: InputIterator, last: InputIterator): void; /** * @hidden */ @@ -2931,15 +3465,15 @@ declare namespace std.base { /** * @hidden */ - protected insert_by_hint(hint: MapIterator, pair: Pair): MapIterator; + protected abstract insert_by_hint(hint: MapIterator, pair: Pair): MapIterator; /** * @hidden */ - private insert_by_hint_with_tuple(hint, tuple); + private insert_by_hint_with_tuple(hint, tuple); /** * @hidden */ - protected insert_by_range(begin: MapIterator, end: MapIterator): void; + protected abstract insert_by_range>>(first: InputIterator, last: InputIterator): void; /** *

Erase an elemet by key.

* @@ -2978,6 +3512,33 @@ declare namespace std.base { * including the element pointed by begin but not the one pointed by end. */ erase(begin: MapIterator, end: MapIterator): MapIterator; + /** + *

Erase an elemet by iterator.

+ * + *

Removes from the {@link MapContainer map container} a single element.

+ * + *

This effectively reduces the container {@link size} by the number of element removed (zero or one), + * which are destroyed.

+ * + * @param it Iterator specifying position winthin the {@link MapContainer map contaier} to be removed. + */ + erase(it: MapReverseIterator): MapReverseIterator; + /** + *

Erase elements by range iterators.

+ * + *

Removes from the {@link MapContainer map container} a range of elements.

+ * + *

This effectively reduces the container {@link size} by the number of elements removed, which are + * destroyed.

+ * + * @param begin An iterator specifying initial position of a range within {@link MApContainer map container} + * to be removed. + * @param end An iterator specifying initial position of a range within {@link MApContainer map container} + * to be removed. + * Notice that the range includes all the elements between begin and end, + * including the element pointed by begin but not the one pointed by end. + */ + erase(begin: MapReverseIterator, end: MapReverseIterator): MapReverseIterator; /** * @hidden */ @@ -2985,82 +3546,69 @@ declare namespace std.base { /** * @hidden */ - private erase_by_iterator(it); + private erase_by_iterator(first, last?); /** * @hidden */ private erase_by_range(begin, end); /** - *

Abstract method handling insertion for indexing.

+ *

Abstract method handling insertions for indexing.

* - *

This method, {@link handle_insert} is designed to register the item to somewhere storing those - * {@link MapIterator iterators} for indexing, fast accessment and retrievalance.

- * - *

When {@link insert} is called, a new element will be inserted into the {@link data_ list container} - * and a new {@link MapIterator iterator} item, pointing the element, will be created and the newly - * created iterator item will be shifted into this method {@link handle_insert} after the insertion.

- * - *

If the derived one is {@link RBTree tree-based} like {@link TreeMap}, the item will be - * registered into the {@link TreeMap.tree_ tree} as a {@link XTreeNode tree node item}. Else if the derived - * one is {@link HashBuckets hash-based} like {@link HashSet}, the item will be registered into the - * {@link HashMap.hash_buckets_ hash bucket}.

- * - * @param item Iterator of inserted item. - */ - protected abstract handle_insert(item: MapIterator): void; - /** - *

Abstract method handling deletion for indexing.

- * - *

This method, {@link handle_insert} is designed to unregister the item to somewhere storing + *

This method, {@link handle_insert} is designed to register the first to last to somewhere storing * those {@link MapIterator iterators} for indexing, fast accessment and retrievalance.

* - *

When {@link erase} is called with item, an {@link MapIterator iterator} positioning somewhere - * place to be deleted, is memorized and shifted to this method {@link handle_erase} after the deletion - * process is terminated.

+ *

When {@link insert} is called, new elements will be inserted into the {@link data_ list container} and new + * {@link MapIterator iterators} first to last, pointing the inserted elements, will be created and the + * newly created iterators first to last will be shifted into this method {@link handle_insert} after the + * insertions.

* - *

If the derived one is {@link RBTree tree-based} like {@link TreeMap}, the item will be - * unregistered from the {@link TreeMap.tree_ tree} as a {@link XTreeNode tree node item}. Else if the - * derived one is {@link HashBuckets hash-based} like {@link HashSet}, the item will be unregistered - * from the {@link HashMap.hash_buckets_ hash bucket}.

+ *

If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link MapIterator iterators} + * will be registered into the {@link TreeSet.tree_ tree} as a {@link XTreeNode tree node item}. Else if the + * derived one is {@link HashBuckets hash-based} like {@link HashSet}, the first to last will be + * registered into the {@link HashSet.hash_buckets_ hash bucket}.

* - * @param item Iterator of erased item. + * @param first An {@link MapIterator} to the initial position in a sequence. + * @param last An {@link MapIterator} to the final position in a sequence. The range used is + * [first, last), which contains all the elements between first and last, + * including the element pointed by first but not the element pointed by last. */ - protected abstract handle_erase(item: MapIterator): void; + protected abstract handle_insert(first: MapIterator, last: MapIterator): void; /** - *

Swap content.

+ *

Abstract method handling deletions for indexing.

* - *

Exchanges the content of the container by the content of obj, which is another - * {@link MapContainer map} of the same type. Sizes abd container type may differ.

+ *

This method, {@link handle_insert} is designed to unregister the first to last to somewhere storing + * those {@link MapIterator iterators} for indexing, fast accessment and retrievalance.

* - *

After the call to this member function, the elements in this container are those which were - * in obj before the call, and the elements of obj are those which were in this. All - * iterators, references and pointers remain valid for the swapped objects.

+ *

When {@link erase} is called with first to last, {@link MapIterator iterators} positioning somewhere + * place to be deleted, is memorized and shifted to this method {@link handle_erase} after the deletion process is + * terminated.

* - *

Notice that a non-member function exists with the same name, {@link std.swap swap}, overloading that - * algorithm with an optimization that behaves like this member function.

+ *

If the derived one is {@link RBTree tree-based} like {@link TreeSet}, the {@link MapIterator iterators} + * will be unregistered from the {@link TreeSet.tree_ tree} as a {@link XTreeNode tree node item}. Else if the + * derived one is {@link HashBuckets hash-based} like {@link HashSet}, the first to last will be + * unregistered from the {@link HashSet.hash_buckets_ hash bucket}.

* - * @param obj Another {@link MapContainer map container} of the same type of elements as this (i.e., - * with the same template parameters, Key and T) whose content is swapped - * with that of this {@link MapContaier container}. + * @param first An {@link MapIterator} to the initial position in a sequence. + * @param last An {@link MapIterator} to the final position in a sequence. The range used is + * [first, last), which contains all the elements between first and last, + * including the element pointed by first but not the element pointed by last. */ - swap(obj: MapContainer): void; + protected abstract handle_erase(first: MapIterator, last: MapIterator): void; } } declare namespace std { /** - * An iterator of {@link MapColntainer map container}. + *

An iterator of {@link MapContainer map container}.

+ * + *

* * @author Jeongho Nam */ - class MapIterator implements IComparable> { - /** - * The source {@link MapContainer} of the iterator is directing for. - */ - protected source_: base.MapContainer; + class MapIterator extends Iterator> implements IComparable> { /** * A {@link ListIterator} pointing {@link Pair} of key and value. */ - protected list_iterator_: ListIterator>; + private list_iterator_; /** * Construct from the {@link MapContainer source map} and {@link ListIterator list iterator}. * @@ -3084,13 +3632,17 @@ declare namespace std { */ advance(step: number): MapIterator; /** - * Get source. + * @hidden */ - get_source(): base.MapContainer; + private map; /** * Get ListIterator. */ get_list_iterator(): ListIterator>; + /** + * @inheritdoc + */ + value: Pair; /** * Get first, key element. */ @@ -3115,33 +3667,27 @@ declare namespace std { hash(): number; swap(obj: MapIterator): void; } -} -declare namespace std { /** - * A reverse-iterator of {@link MapColntainer map container}. + *

A reverse-iterator of {@link MapContainer map container}.

+ * + *

* * @author Jeongho Nam */ - class MapReverseIterator extends MapIterator { + class MapReverseIterator extends ReverseIterator, MapIterator, MapReverseIterator> { + constructor(base: MapIterator); + protected create_neighbor(): MapReverseIterator; /** - * Construct from the {@link MapContainer source map} and {@link ListIterator list iterator}. - * - * @param source The source {@link MapContainer}. - * @param list_iterator A {@link ListIterator} pointing {@link Pair} of key and value. + * Get first, key element. */ - constructor(source: base.MapContainer, list_iterator: ListIterator>); + first: Key; /** - * @inheritdoc + * Get second, value element. */ - prev(): MapReverseIterator; /** - * @inheritdoc + * Set second value. */ - next(): MapReverseIterator; - /** - * @inheritdoc - */ - advance(step: number): MapReverseIterator; + second: T; } } declare namespace std.base { @@ -3163,12 +3709,14 @@ declare namespace std.base { * {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index * table like {@link RBTree tree} or {@link HashBuckets hash-table}.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute position - * in the + * in the container. *
* *
Map
@@ -3187,28 +3735,6 @@ declare namespace std.base { * @author Jeongho Nam */ abstract class UniqueMap extends MapContainer { - /** - * Default Constructor. - */ - constructor(); - /** - * Construct from elements. - */ - constructor(items: Array>); - /** - * Contruct from tuples. - * - * @param array Tuples to be contained. - */ - constructor(array: Array<[Key, T]>); - /** - * Copy Constructor. - */ - constructor(container: MapContainer); - /** - * Construct from range iterators. - */ - constructor(begin: MapIterator, end: MapIterator); /** * @inheritdoc */ @@ -3281,6 +3807,10 @@ declare namespace std.base { * @inheritdoc */ insert(hint: MapIterator, pair: Pair): MapIterator; + /** + * @inheritdoc + */ + insert(hint: MapReverseIterator, pair: Pair): MapReverseIterator; /** * @inheritdoc */ @@ -3288,7 +3818,29 @@ declare namespace std.base { /** * @inheritdoc */ - insert(begin: MapIterator, end: MapIterator): void; + insert(hint: MapReverseIterator, tuple: [L, U]): MapReverseIterator; + /** + * @inheritdoc + */ + insert>>(first: InputIterator, last: InputIterator): void; + /** + *

Swap content.

+ * + *

Exchanges the content of the container by the content of obj, which is another + * {@link UniqueMap map} of the same type. Sizes abd container type may differ.

+ * + *

After the call to this member function, the elements in this container are those which were + * in obj before the call, and the elements of obj are those which were in this. All + * iterators, references and pointers remain valid for the swapped objects.

+ * + *

Notice that a non-member function exists with the same name, {@link std.swap swap}, overloading that + * algorithm with an optimization that behaves like this member function.

+ * + * @param obj Another {@link UniqueMap map container} of the same type of elements as this (i.e., + * with the same template parameters, Key and T) whose content is swapped + * with that of this {@link UniqueMap container}. + */ + swap(obj: UniqueMap): void; } } declare namespace std.base { @@ -3310,12 +3862,14 @@ declare namespace std.base { * {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index * table like {@link RBTree tree} or {@link HashBuckets hash-table}.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute position - * in the + * in the container. *
* *
Map
@@ -3334,32 +3888,6 @@ declare namespace std.base { * @author Jeongho Nam */ abstract class MultiMap extends MapContainer { - /** - * Default Constructor. - */ - constructor(); - /** - * Construct from elements. - */ - constructor(items: Array>); - /** - * Contruct from tuples. - * - * @param array Tuples to be contained. - */ - constructor(array: Array<[Key, T]>); - /** - * Copy Constructor. - */ - constructor(container: MapContainer); - /** - * Construct from range iterators. - */ - constructor(begin: MapIterator, end: MapIterator); - /** - * @inheritdoc - */ - count(key: Key): number; /** *

Insert elements.

* @@ -3386,6 +3914,10 @@ declare namespace std.base { * @inheritdoc */ insert(hint: MapIterator, pair: Pair): MapIterator; + /** + * @inheritdoc + */ + insert(hint: MapReverseIterator, pair: Pair): MapReverseIterator; /** * @inheritdoc */ @@ -3393,35 +3925,58 @@ declare namespace std.base { /** * @inheritdoc */ - insert(begin: MapIterator, end: MapIterator): void; + insert(hint: MapReverseIterator, tuple: [L, U]): MapReverseIterator; + /** + * @inheritdoc + */ + insert>>(first: InputIterator, last: InputIterator): void; + /** + *

Swap content.

+ * + *

Exchanges the content of the container by the content of obj, which is another + * {@link UniqueMap map} of the same type. Sizes abd container type may differ.

+ * + *

After the call to this member function, the elements in this container are those which were + * in obj before the call, and the elements of obj are those which were in this. All + * iterators, references and pointers remain valid for the swapped objects.

+ * + *

Notice that a non-member function exists with the same name, {@link std.swap swap}, overloading that + * algorithm with an optimization that behaves like this member function.

+ * + * @param obj Another {@link MultiMap map container} of the same type of elements as this (i.e., + * with the same template parameters, Key and T) whose content is swapped + * with that of this {@link MultiMap container}. + */ + swap(obj: MultiMap): void; } } declare namespace std { /** *

Hashed, unordered map.

* - *

{@link HashMap}s are associative containers that store elements formed by the - * combination of a key value and a mapped value, and which allows for fast - * retrieval of individual elements based on their keys.

+ *

{@link HashMap}s are associative containers that store elements formed by the combination of a key value + * and a mapped value, and which allows for fast retrieval of individual elements based on their keys. + *

* - *

In an {@link HashMap}, the key value is generally used to uniquely identify - * the element, while the mapped value is an object with the content associated to this - * key. Types of key and mapped value may differ.

+ *

In an {@link HashMap}, the key value is generally used to uniquely identify the element, while the + * mapped value is an object with the content associated to this key. Types of key and + * mapped value may differ.

* - *

Internally, the elements in the {@link HashMap} are not sorted in any particular order - * with respect to either their key or mapped values, but organized into buckets - * depending on their hash values to allow for fast access to individual elements directly by - * their key values (with a constant average time complexity on average).

+ *

Internally, the elements in the {@link HashMap} are not sorted in any particular order with respect to either + * their key or mapped values, but organized into buckets depending on their hash values to allow + * for fast access to individual elements directly by their key values (with a constant average time complexity + * on average).

* - *

{@link HashMap} containers are faster than {@link TreeMap} containers to access - * individual elements by their key, although they are generally less efficient for range - * iteration through a subset of their elements.

+ *

{@link HashMap} containers are faster than {@link TreeMap} containers to access individual elements by their + * key, although they are generally less efficient for range iteration through a subset of their elements.

+ * + *

* *

Container properties

*
*
Associative
*
Elements in associative containers are referenced by their key and not by their absolute - * position in the
+ * position in the container. * *
Hashed
*
Hashed containers organize their elements using hash tables that allow for fast access to elements @@ -3435,56 +3990,24 @@ declare namespace std { *
No two elements in the container can have equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/unordered_map/unordered_map/
  • - *
- * * @param Type of the key values. * Each element in an {@link HashMap} is uniquely identified by its key value. * @param Type of the mapped value. * Each element in an {@link HashMap} is used to store some data as its mapped value. * + * @reference http://www.cplusplus.com/reference/unordered_map/unordered_map * @author Jeongho Nam */ class HashMap extends base.UniqueMap { private hash_buckets_; /** - * Default Constructor. + * @hidden */ - constructor(); - /** - * Contruct from elements. - * - * @param array Elements to be contained. - */ - constructor(array: Array>); - /** - * Contruct from tuples. - * - * @param array Tuples to be contained. - */ - constructor(array: Array<[Key, T]>); - /** - * Copy Constructor. - * - * @param container Another map to copy. - */ - constructor(container: base.MapContainer); - /** - * Range Constructor. - * - * @param begin nput interator of the initial position in a sequence. - * @param end Input interator of the final position in a sequence. - */ - constructor(begin: MapIterator, end: MapIterator); + protected init(): void; /** * @hidden */ protected construct_from_array(items: Array>): void; - /** - * @inheritdoc - */ - assign(begin: MapIterator, end: MapIterator): void; /** * @inheritdoc */ @@ -3500,19 +4023,23 @@ declare namespace std { /** * @hidden */ - protected insert_by_range(begin: MapIterator, end: MapIterator): void; + protected insert_by_hint(hint: MapIterator, pair: Pair): MapIterator; + /** + * @hidden + */ + protected insert_by_range>>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_insert(it: MapIterator): void; + protected handle_insert(first: MapIterator, last: MapIterator): void; /** * @inheritdoc */ - protected handle_erase(it: MapIterator): void; + protected handle_erase(first: MapIterator, last: MapIterator): void; /** * @inheritdoc */ - swap(obj: base.MapContainer): void; + swap(obj: base.UniqueMap): void; /** * @hidden */ @@ -3537,11 +4064,13 @@ declare namespace std { *

Elements with equivalent keys are grouped together in the same bucket and in such a way that * an iterator can iterate through all of them. Iterators in the container are doubly linked iterators.

* + *

+ * *

Container properties

*
*
Associative
*
Elements in associative containers are referenced by their key and not by their absolute - * position in the
+ * position in the container. * *
Hashed
*
Hashed containers organize their elements using hash tables that allow for fast access to elements @@ -3555,15 +4084,12 @@ declare namespace std { *
The container can hold multiple elements with equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/unordered_map/unordered_multimap/
  • - *
- * * @param Type of the key values. * Each element in an {@link HashMap} is identified by a key value. * @param Type of the mapped value. * Each element in an {@link HashMap} is used to store some data as its mapped value. * + * @reference http://www.cplusplus.com/reference/unordered_map/unordered_multimap * @author Jeongho Nam */ class HashMultiMap extends base.MultiMap { @@ -3572,42 +4098,13 @@ declare namespace std { */ private hash_buckets_; /** - * Default Constructor. + * @hidden */ - constructor(); - /** - * Contruct from elements. - * - * @param array Elements to be contained. - */ - constructor(array: Array>); - /** - * Contruct from tuples. - * - * @param array Tuples to be contained. - */ - constructor(array: Array<[Key, T]>); - /** - * Copy Constructor. - * - * @param container Another map to copy. - */ - constructor(container: base.MapContainer); - /** - * Range Constructor. - * - * @param begin nput interator of the initial position in a sequence. - * @param end Input interator of the final position in a sequence. - */ - constructor(begin: MapIterator, end: MapIterator); + protected init(): void; /** * @hidden */ protected construct_from_array(items: Array>): void; - /** - * @inheritdoc - */ - assign(begin: MapIterator, end: MapIterator): void; /** * @inheritdoc */ @@ -3616,6 +4113,10 @@ declare namespace std { * @inheritdoc */ find(key: Key): MapIterator; + /** + * @inheritdoc + */ + count(key: Key): number; /** * @hidden */ @@ -3623,19 +4124,23 @@ declare namespace std { /** * @hidden */ - protected insert_by_range(begin: MapIterator, end: MapIterator): void; + protected insert_by_hint(hint: MapIterator, pair: Pair): MapIterator; + /** + * @hidden + */ + protected insert_by_range>>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_insert(it: MapIterator): void; + protected handle_insert(first: MapIterator, last: MapIterator): void; /** * @inheritdoc */ - protected handle_erase(it: MapIterator): void; + protected handle_erase(first: MapIterator, last: MapIterator): void; /** * @inheritdoc */ - swap(obj: base.MapContainer): void; + swap(obj: base.MultiMap): void; /** * @hidden */ @@ -3662,12 +4167,14 @@ declare namespace std { * *

{@link TreeSet}s are typically implemented as binary search trees.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute - * position in the + * position in the container. *
* *
Ordered
@@ -3683,13 +4190,10 @@ declare namespace std { *
No two elements in the container can have equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/set/set/
  • - *
- * * @param Type of the elements. * Each element in an {@link TreeSet} is also uniquely identified by this value. * + * @reference http://www.cplusplus.com/reference/set/set * @author Jeongho Nam */ class TreeSet extends base.UniqueSet { @@ -3723,21 +4227,21 @@ declare namespace std { /** * Copy Constructor. */ - constructor(container: base.Container); + constructor(container: base.IContainer); /** * Copy Constructor with compare. * * @param container A container to be copied. * @param compare A binary predicate determines order of elements. */ - constructor(container: base.Container, compare: (left: T, right: T) => boolean); + constructor(container: base.IContainer, compare: (left: T, right: T) => boolean); /** * Range Constructor. * * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: base.Iterator, end: base.Iterator); + constructor(begin: Iterator, end: Iterator); /** * Range Constructor with compare. * @@ -3745,11 +4249,7 @@ declare namespace std { * @param end Input interator of the final position in a sequence. * @param compare A binary predicate determines order of elements. */ - constructor(begin: base.Iterator, end: base.Iterator, compare: (left: T, right: T) => boolean); - /** - * @inheritdoc - */ - assign>(begin: InputIterator, end: InputIterator): void; + constructor(begin: Iterator, end: Iterator, compare: (left: T, right: T) => boolean); /** * @inheritdoc */ @@ -3829,18 +4329,23 @@ declare namespace std { * @hidden */ protected insert_by_val(val: T): any; + protected insert_by_hint(hint: SetIterator, val: T): SetIterator; + /** + * @hidden + */ + protected insert_by_range>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_insert(item: SetIterator): void; + protected handle_insert(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - protected handle_erase(item: SetIterator): void; + protected handle_erase(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - swap(obj: base.IContainer): void; + swap(obj: base.UniqueSet): void; /** * @hidden */ @@ -3866,12 +4371,14 @@ declare namespace std { * *

{@link TreeMultiSet TreeMultiSets} are typically implemented as binary search trees.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute - * position in the + * position in the container. *
* *
Ordered
@@ -3887,13 +4394,10 @@ declare namespace std { *
Multiple elements in the container can have equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/set/multiset/
  • - *
- * * @param Type of the elements. Each element in a {@link TreeMultiSet} container is also identified * by this value (each value is itself also the element's key). * + * @reference http://www.cplusplus.com/reference/set/multiset * @author Jeongho Nam */ class TreeMultiSet extends base.MultiSet { @@ -3941,7 +4445,7 @@ declare namespace std { * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: base.Iterator, end: base.Iterator); + constructor(begin: Iterator, end: Iterator); /** * Construct from range and compare. * @@ -3949,11 +4453,7 @@ declare namespace std { * @param end Input interator of the final position in a sequence. * @param compare A binary predicate determines order of elements. */ - constructor(begin: base.Iterator, end: base.Iterator, compare: (left: T, right: T) => boolean); - /** - * @inheritdoc - */ - assign>(begin: InputIterator, end: InputIterator): void; + constructor(begin: Iterator, end: Iterator, compare: (left: T, right: T) => boolean); /** * @inheritdoc */ @@ -3962,6 +4462,10 @@ declare namespace std { * @inheritdoc */ find(val: T): SetIterator; + /** + * @inheritdoc + */ + count(val: T): number; /** *

Return iterator to lower bound.

* @@ -4033,17 +4537,25 @@ declare namespace std { */ protected insert_by_val(val: T): any; /** - * @inheritdoc + * @hidden */ - protected handle_insert(item: SetIterator): void; + protected insert_by_hint(hint: SetIterator, val: T): SetIterator; + /** + * @hidden + */ + protected insert_by_range>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_erase(item: SetIterator): void; + protected handle_insert(first: SetIterator, last: SetIterator): void; /** * @inheritdoc */ - swap(obj: base.IContainer): void; + protected handle_erase(first: SetIterator, last: SetIterator): void; + /** + * @inheritdoc + */ + swap(obj: base.MultiSet): void; /** * @hidden */ @@ -4057,27 +4569,28 @@ declare namespace std { *

{@link TreeMap TreeMaps} are associative containers that store elements formed by a combination of a * key value (Key) and a mapped value (T), following order.

* - *

In a {@link TreeMap}, the key values are generally used to sort and uniquely identify - * the elements, while the mapped values store the content associated to this key. The types of - * key and mapped value may differ, and are grouped together in member type value_type, - * which is a {@link Pair} type combining both:

+ *

In a {@link TreeMap}, the key values are generally used to sort and uniquely identify the elements, + * while the mapped values store the content associated to this key. The types of key and + * mapped value may differ, and are grouped together in member type value_type, which is a {@link Pair} + * type combining both:

* *

typedef Pair value_type;

* - *

Internally, the elements in a {@link TreeMap} are always sorted by its key following - * a strict weak ordering criterion indicated by its internal comparison method {@link less}. + *

Internally, the elements in a {@link TreeMap} are always sorted by its key following a + * strict weak ordering criterion indicated by its internal comparison method {@link less}. * - *

{@link TreeMap} containers are generally slower than {@link HashMap HashMap} containers to - * access individual elements by their key, but they allow the direct iteration on subsets based on - * their order.

+ *

{@link TreeMap} containers are generally slower than {@link HashMap HashMap} containers to access individual + * elements by their key, but they allow the direct iteration on subsets based on their order.

* *

{@link TreeMap}s are typically implemented as binary search trees.

* + *

+ * *

Container properties

*
*
Associative
*
Elements in associative containers are referenced by their key and not by their absolute - * position in the
+ * position in the container. * *
Ordered
*
The elements in the container follow a strict order at all times. All inserted elements are @@ -4091,13 +4604,10 @@ declare namespace std { *
No two elements in the container can have equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/map/map/
  • - *
- * * @param Type of the keys. Each element in a map is uniquely identified by its key value. * @param Type of the mapped value. Each element in a map stores some data as its mapped value. * + * @reference http://www.cplusplus.com/reference/map/map * @author Jeongho Nam */ class TreeMap extends base.UniqueMap { @@ -4160,7 +4670,7 @@ declare namespace std { * @param begin nput interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: MapIterator, end: MapIterator); + constructor(begin: Iterator>, end: Iterator>); /** * Range Constructor. * @@ -4168,11 +4678,7 @@ declare namespace std { * @param end Input interator of the final position in a sequence. * @param compare A binary predicate determines order of elements. */ - constructor(begin: MapIterator, end: MapIterator, compare: (left: Key, right: Key) => boolean); - /** - * @inheritdoc - */ - assign(begin: MapIterator, end: MapIterator): void; + constructor(begin: Iterator>, end: Iterator>, compare: (left: Key, right: Key) => boolean); /** * @inheritdoc */ @@ -4255,17 +4761,25 @@ declare namespace std { */ protected insert_by_pair(pair: Pair): any; /** - * @inheritdoc + * @hidden */ - protected handle_insert(item: MapIterator): void; + protected insert_by_hint(hint: MapIterator, pair: Pair): MapIterator; + /** + * @hidden + */ + protected insert_by_range>>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_erase(item: MapIterator): void; + protected handle_insert(first: MapIterator, last: MapIterator): void; /** * @inheritdoc */ - swap(obj: base.MapContainer): void; + protected handle_erase(first: MapIterator, last: MapIterator): void; + /** + * @inheritdoc + */ + swap(obj: base.UniqueMap): void; /** * @hidden */ @@ -4294,12 +4808,14 @@ declare namespace std { * *

{@link TreeMultiMap TreeMultiMaps} are typically implemented as binary search trees.

* + *

+ * *

Container properties

*
*
Associative
*
* Elements in associative containers are referenced by their key and not by their absolute - * position in the + * position in the container. *
* *
Ordered
@@ -4318,13 +4834,10 @@ declare namespace std { *
Multiple elements in the container can have equivalent keys.
*
* - *
    - *
  • Reference: http://www.cplusplus.com/reference/map/multimap/
  • - *
- * * @param Type of the keys. Each element in a map is uniquely identified by its key value. * @param Type of the mapped value. Each element in a map stores some data as its mapped value. * + * @reference http://www.cplusplus.com/reference/map/multimap * @author Jeongho Nam */ class TreeMultiMap extends base.MultiMap { @@ -4384,7 +4897,7 @@ declare namespace std { * @param begin nput interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. */ - constructor(begin: MapIterator, end: MapIterator); + constructor(begin: Iterator>, end: Iterator>); /** * Range Constructor. * @@ -4392,11 +4905,7 @@ declare namespace std { * @param end Input interator of the final position in a sequence. * @param compare A binary predicate determines order of elements. */ - constructor(begin: MapIterator, end: MapIterator, compare: (left: Key, right: Key) => boolean); - /** - * @inheritdoc - */ - assign(begin: MapIterator, end: MapIterator): void; + constructor(begin: Iterator>, end: Iterator>, compare: (left: Key, right: Key) => boolean); /** * @inheritdoc */ @@ -4405,6 +4914,10 @@ declare namespace std { * @inheritdoc */ find(key: Key): MapIterator; + /** + * @inheritdoc + */ + count(key: Key): number; /** *

Return iterator to lower bound.

* @@ -4476,17 +4989,25 @@ declare namespace std { */ protected insert_by_pair(pair: Pair): any; /** - * @inheritdoc + * @hidden */ - protected handle_insert(item: MapIterator): void; + protected insert_by_hint(hint: MapIterator, pair: Pair): MapIterator; + /** + * @hidden + */ + protected insert_by_range>>(first: InputIterator, last: InputIterator): void; /** * @inheritdoc */ - protected handle_erase(item: MapIterator): void; + protected handle_insert(first: MapIterator, last: MapIterator): void; /** * @inheritdoc */ - swap(obj: base.MapContainer): void; + protected handle_erase(first: MapIterator, last: MapIterator): void; + /** + * @inheritdoc + */ + swap(obj: base.MultiMap): void; /** * @hidden */ @@ -4508,7 +5029,7 @@ declare namespace std { * * @return Returns fn. */ - function for_each, Func extends (val: T) => any>(first: Iterator, last: Iterator, fn: Func): Func; + function for_each, Func extends (val: T) => any>(first: InputIterator, last: InputIterator, fn: Func): Func; /** *

Test condition on all elements in range.

* @@ -4527,7 +5048,7 @@ declare namespace std { * @return true if pred returns true for all the elements in the range or if the range is * {@link IContainer.empty empty}, and false otherwise. */ - function all_of>(first: Iterator, last: Iterator, pred: (val: T) => boolean): boolean; + function all_of>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean): boolean; /** *

Test if any element in range fulfills condition.

* @@ -4549,7 +5070,7 @@ declare namespace std { * [first, last), and false otherwise. If [first, last) is an * {@link IContainer.empty empty} range, the function returns false. */ - function any_of>(first: Iterator, last: Iterator, pred: (val: T) => boolean): boolean; + function any_of>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean): boolean; /** *

Test if no elements fulfill condition.

* @@ -4569,7 +5090,7 @@ declare namespace std { * [first, last) or if the range is {@link IContainer.empty empty}, and false * otherwise. */ - function none_of>(first: Iterator, last: Iterator, pred: (val: T) => boolean): boolean; + function none_of>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean): boolean; /** *

Test whether the elements in two ranges are equal.

* @@ -4586,7 +5107,7 @@ declare namespace std { * @return true if all the elements in the range [first1, last1) compare equal to those * of the range starting at first2, and false otherwise. */ - function equal>(first1: Iterator1, last1: Iterator1, first2: base.Iterator): boolean; + function equal>(first1: Iterator1, last1: Iterator1, first2: Iterator): boolean; /** *

Test whether the elements in two ranges are equal.

* @@ -4606,7 +5127,7 @@ declare namespace std { * @return true if all the elements in the range [first1, last1) compare equal to those * of the range starting at first2, and false otherwise. */ - function equal>(first1: Iterator1, last1: Iterator1, first2: base.Iterator, pred: (x: T, y: T) => boolean): boolean; + function equal>(first1: Iterator1, last1: Iterator1, first2: Iterator, pred: (x: T, y: T) => boolean): boolean; /** *

Test whether range is permutation of another.

* @@ -4624,7 +5145,7 @@ declare namespace std { * @return true if all the elements in the range [first1, last1) compare equal to those * of the range starting at first2 in any order, and false otherwise. */ - function is_permutation, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2): boolean; + function is_permutation, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2): boolean; /** *

Test whether range is permutation of another.

* @@ -4645,7 +5166,7 @@ declare namespace std { * @return true if all the elements in the range [first1, last1) compare equal to those * of the range starting at first2 in any order, and false otherwise. */ - function is_permutation, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, pred: (x: T, y: T) => boolean): boolean; + function is_permutation, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, pred: (x: T, y: T) => boolean): boolean; /** *

Lexicographical less-than comparison.

* @@ -4671,7 +5192,7 @@ declare namespace std { * @return true if the first range compares lexicographically less than than the second. * false otherwise (including when all the elements of both ranges are equivalent). */ - function lexicographical_compare, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): boolean; + function lexicographical_compare, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): boolean; /** *

Lexicographical comparison.

* @@ -4700,7 +5221,7 @@ declare namespace std { * @return true if the first range compares lexicographically relationship than than the * second. false otherwise (including when all the elements of both ranges are equivalent). */ - function lexicographical_compare, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, compare: (x: T, y: T) => boolean): boolean; + function lexicographical_compare, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, compare: (x: T, y: T) => boolean): boolean; /** *

Find value in range.

* @@ -4718,7 +5239,7 @@ declare namespace std { * @return An {@link Iterator} to the first element in the range that compares equal to val. If no elements * match, the function returns last. */ - function find>(first: Iterator, last: Iterator, val: T): Iterator; + function find>(first: InputIterator, last: InputIterator, val: T): InputIterator; /** *

Find element in range.

* @@ -4737,7 +5258,7 @@ declare namespace std { * false. If pred is false for all elements, the function returns * last. */ - function find_if>(first: Iterator, last: Iterator, pred: (val: T) => boolean): Iterator; + function find_if>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean): InputIterator; /** *

Find element in range.

* @@ -4755,7 +5276,7 @@ declare namespace std { * @return An {@link Iterator} to the first element in the range for which pred returns false. * If pred is true for all elements, the function returns last. */ - function find_if_not>(first: Iterator, last: Iterator, pred: (val: T) => boolean): Iterator; + function find_if_not>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean): InputIterator; /** *

Find last subsequence in range.

* @@ -4785,7 +5306,7 @@ declare namespace std { * [first1, last1). If the sequence is not found, the function returns ,i>last1. Otherwise * [first2, last2) is an empty range, the function returns last1. */ - function find_end, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1; + function find_end, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1; /** *

Find last subsequence in range.

* @@ -4815,7 +5336,7 @@ declare namespace std { * [first1, last1). If the sequence is not found, the function returns ,i>last1. Otherwise * [first2, last2) is an empty range, the function returns last1. */ - function find_end, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, pred: (x: T, y: T) => boolean): Iterator1; + function find_end, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, pred: (x: T, y: T) => boolean): Iterator1; /** *

Find element from set in range.

* @@ -4836,7 +5357,7 @@ declare namespace std { * @return An {@link Iterator} to the first element in [first1, last1) that is part of * [first2, last2). If no matches are found, the function returns last1. */ - function find_first_of, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1; + function find_first_of, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1; /** *

Find element from set in range.

* @@ -4860,7 +5381,7 @@ declare namespace std { * @return An {@link Iterator} to the first element in [first1, last1) that is part of * [first2, last2). If no matches are found, the function returns last1. */ - function find_first_of, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, pred: (x: T, y: T) => boolean): Iterator1; + function find_first_of, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, pred: (x: T, y: T) => boolean): Iterator1; /** *

Find equal adjacent elements in range.

* @@ -4877,7 +5398,7 @@ declare namespace std { * @return An {@link Iterator} to the first element of the first pair of matching consecutive elements in the range * [first, last). If no such pair is found, the function returns last. */ - function adjacent_find>(first: Iterator, last: Iterator): Iterator; + function adjacent_find>(first: InputIterator, last: InputIterator): InputIterator; /** *

Find equal adjacent elements in range.

* @@ -4897,7 +5418,7 @@ declare namespace std { * @return An {@link Iterator} to the first element of the first pair of matching consecutive elements in the range * [first, last). If no such pair is found, the function returns last. */ - function adjacent_find>(first: Iterator, last: Iterator, pred: (x: T, y: T) => boolean): Iterator; + function adjacent_find>(first: InputIterator, last: InputIterator, pred: (x: T, y: T) => boolean): InputIterator; /** *

Search range for subsequence.

* @@ -4924,7 +5445,7 @@ declare namespace std { * and last1. If the sequence is not found, the function returns last1. Otherwise * [first2, last2) is an empty range, the function returns first1. */ - function search, ForwardIterator2 extends base.Iterator>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2): ForwardIterator1; + function search, ForwardIterator2 extends Iterator>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2): ForwardIterator1; /** *

Search range for subsequence.

* @@ -4955,7 +5476,7 @@ declare namespace std { * [first1, last1). If the sequence is not found, the function returns last1. Otherwise * [first2, last2) is an empty range, the function returns first1. */ - function search, ForwardIterator2 extends base.Iterator>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2, pred: (x: T, y: T) => boolean): ForwardIterator1; + function search, ForwardIterator2 extends Iterator>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2, pred: (x: T, y: T) => boolean): ForwardIterator1; /** *

Search range for elements.

* @@ -5022,7 +5543,7 @@ declare namespace std { * to last1 and {@link Pair.second second} set to the element in that same relative position in the * second sequence. If none matched, it returns {@link make_pair}(first1, first2). */ - function mismatch, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2): Pair; + function mismatch, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2): Pair; /** *

Return first position where two ranges differ.

* @@ -5048,7 +5569,7 @@ declare namespace std { * to last1 and {@link Pair.second second} set to the element in that same relative position in the * second sequence. If none matched, it returns {@link make_pair}(first1, first2). */ - function mismatch, Iterator2 extends base.Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, compare: (x: T, y: T) => boolean): Pair; + function mismatch, Iterator2 extends Iterator>(first1: Iterator1, last1: Iterator1, first2: Iterator2, compare: (x: T, y: T) => boolean): Pair; /** *

Count appearances of value in range.

* @@ -5064,7 +5585,7 @@ declare namespace std { * * @return The number of elements in the range [first, last) that compare equal to val. */ - function count>(first: Iterator, last: Iterator, val: T): number; + function count>(first: InputIterator, last: InputIterator, val: T): number; /** *

Return number of elements in range satisfying condition.

* @@ -5080,7 +5601,7 @@ declare namespace std { * The function shall not modify its argument. This can either be a function pointer or a function * object. */ - function count_if>(first: Iterator, last: Iterator, pred: (val: T) => boolean): number; + function count_if>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean): number; /** *

Copy range of elements.

* @@ -5101,7 +5622,7 @@ declare namespace std { * * @return An iterator to the end of the destination range where elements have been copied. */ - function copy, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator): OutputIterator; + function copy, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator): OutputIterator; /** *

Copy elements.

* @@ -5125,7 +5646,7 @@ declare namespace std { * * @return An iterator to the end of the destination range where elements have been copied. */ - function copy_n, OutputIterator extends base.Iterator>(first: InputIterator, n: number, result: OutputIterator): OutputIterator; + function copy_n, OutputIterator extends Iterator>(first: InputIterator, n: number, result: OutputIterator): OutputIterator; /** *

Copy certain elements of range.

* @@ -5144,7 +5665,7 @@ declare namespace std { * * @return An iterator to the end of the destination range where elements have been copied. */ - function copy_if, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (x: T) => boolean): OutputIterator; + function copy_if, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (x: T) => boolean): OutputIterator; /** *

Copy range of elements backward.

* @@ -5171,7 +5692,7 @@ declare namespace std { * * @return An iterator to the first element of the destination sequence where elements have been copied. */ - function copy_backward, BidirectionalIterator2 extends base.Iterator>(first: BidirectionalIterator1, last: BidirectionalIterator1, result: BidirectionalIterator2): BidirectionalIterator2; + function copy_backward, BidirectionalIterator2 extends Iterator>(first: BidirectionalIterator1, last: BidirectionalIterator1, result: BidirectionalIterator2): BidirectionalIterator2; /** *

Fill range with value.

* @@ -5185,7 +5706,7 @@ declare namespace std { * but not the element pointed by last. * @param val Value to assign to the elements in the filled range. */ - function fill>(first: ForwardIterator, last: ForwardIterator, val: T): void; + function fill>(first: ForwardIterator, last: ForwardIterator, val: T): void; /** *

Fill sequence with value.

* @@ -5198,7 +5719,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element filled. */ - function fill_n>(first: OutputIterator, n: number, val: T): OutputIterator; + function fill_n>(first: OutputIterator, n: number, val: T): OutputIterator; /** *

Transform range.

* @@ -5216,7 +5737,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element written in the result sequence. */ - function transform, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, op: (val: T) => T): OutputIterator; + function transform, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, op: (val: T) => T): OutputIterator; /** *

Transform range.

* @@ -5237,7 +5758,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element written in the result sequence. */ - function transform, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, result: OutputIterator, binary_op: (x: T, y: T) => T): OutputIterator; + function transform, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, result: OutputIterator, binary_op: (x: T, y: T) => T): OutputIterator; /** *

Generate values for range with function.

* @@ -5251,7 +5772,7 @@ declare namespace std { * @param gen Generator function that is called with no arguments and returns some value of a type convertible to * those pointed by the iterators. */ - function generate>(first: ForwardIterator, last: ForwardIterator, gen: () => T): void; + function generate>(first: ForwardIterator, last: ForwardIterator, gen: () => T): void; /** *

Generate values for sequence with function.

* @@ -5266,7 +5787,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element whose value has been generated. */ - function generate_n>(first: ForwardIterator, n: number, gen: () => T): ForwardIterator; + function generate_n>(first: ForwardIterator, n: number, gen: () => T): ForwardIterator; /** *

Remove consecutive duplicates in range.

* @@ -5289,7 +5810,7 @@ declare namespace std { * @return An iterator to the element that follows the last element not removed. The range between first and * this iterator includes all the elements in the sequence that were not considered duplicates. */ - function unique>(first: Iterator, last: Iterator): Iterator; + function unique>(first: InputIterator, last: InputIterator): InputIterator; /** *

Remove consecutive duplicates in range.

* @@ -5316,7 +5837,7 @@ declare namespace std { * @return An iterator to the element that follows the last element not removed. The range between first and * this iterator includes all the elements in the sequence that were not considered duplicates. */ - function unique>(first: Iterator, last: Iterator, pred: (left: t, right: t) => boolean): Iterator; + function unique>(first: InputIterator, last: InputIterator, pred: (left: t, right: t) => boolean): InputIterator; /** *

Copy range removing duplicates.

* @@ -5338,7 +5859,7 @@ declare namespace std { * * @return An iterator pointing to the end of the copied range, which contains no consecutive duplicates. */ - function unique_copy, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator): OutputIterator; + function unique_copy, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator): OutputIterator; /** *

Copy range removing duplicates.

* @@ -5364,7 +5885,7 @@ declare namespace std { * * @return An iterator pointing to the end of the copied range, which contains no consecutive duplicates. */ - function unique_copy, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (x: T, y: T) => boolean): OutputIterator; + function unique_copy, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (x: T, y: T) => boolean): OutputIterator; /** *

Remove value from range.

* @@ -5385,7 +5906,7 @@ declare namespace std { * first but not the element pointed by last. * @param val Value to be removed. */ - function remove>(first: Iterator, last: Iterator, val: T): Iterator; + function remove>(first: InputIterator, last: InputIterator, val: T): InputIterator; /** *

Remove elements from range.

* @@ -5408,7 +5929,7 @@ declare namespace std { * bool. The value returned indicates whether the element is to be removed (if * true, it is removed). The function shall not modify its argument. */ - function remove_if>(first: Iterator, last: Iterator, pred: (left: T) => boolean): Iterator; + function remove_if>(first: InputIterator, last: InputIterator, pred: (left: T) => boolean): InputIterator; /** *

Copy range removing value.

* @@ -5432,7 +5953,7 @@ declare namespace std { * @return An iterator pointing to the end of the copied range, which includes all the elements in * [first, last) except those that compare equal to val. */ - function remove_copy, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, val: T): OutputIterator; + function remove_copy, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, val: T): OutputIterator; /** *

Copy range removing values.

* @@ -5456,7 +5977,7 @@ declare namespace std { * @return An iterator pointing to the end of the copied range, which includes all the elements in * [first, last) except those for which pred returns true. */ - function remove_copy_if, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (val: T) => boolean): OutputIterator; + function remove_copy_if, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (val: T) => boolean): OutputIterator; /** *

Replace value in range.

* @@ -5472,7 +5993,7 @@ declare namespace std { * @param old_val Value to be replaced. * @param new_val Replacement value. */ - function replace>(first: Iterator, last: Iterator, old_val: T, new_val: T): void; + function replace>(first: InputIterator, last: InputIterator, old_val: T, new_val: T): void; /** *

Replace value in range.

* @@ -5488,7 +6009,7 @@ declare namespace std { * true, it is replaced). The function shall not modify its argument. * @param new_val Value to assign to replaced elements. */ - function replace_if>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean, new_val: T): void; + function replace_if>(first: InputIterator, last: InputIterator, pred: (val: T) => boolean, new_val: T): void; /** *

Copy range replacing value.

* @@ -5512,7 +6033,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element written in the result sequence. */ - function replace_copy, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, old_val: T, new_val: T): OutputIterator; + function replace_copy, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, old_val: T, new_val: T): OutputIterator; /** *

Copy range replacing value.

* @@ -5533,7 +6054,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element written in the result sequence. */ - function replace_copy_if, OutputIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (val: T) => boolean, new_val: T): OutputIterator; + function replace_copy_if, OutputIterator extends Iterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: (val: T) => boolean, new_val: T): OutputIterator; /** *

Exchange values of objects pointed to by two iterators.

* @@ -5544,7 +6065,7 @@ declare namespace std { * @param x {@link Iterator Forward iterator} to the objects to swap. * @param y {@link Iterator Forward iterator} to the objects to swap. */ - function iter_swap(x: base.Iterator, y: base.Iterator): void; + function iter_swap(x: Iterator, y: Iterator): void; /** *

Exchange values of two ranges.

* @@ -5562,7 +6083,7 @@ declare namespace std { * * @return An iterator to the last element swapped in the second sequence. */ - function swap_ranges, ForwardIterator2 extends base.Iterator>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2): ForwardIterator2; + function swap_ranges, ForwardIterator2 extends Iterator>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2): ForwardIterator2; /** *

Reverse range.

* @@ -5575,7 +6096,7 @@ declare namespace std { * which contains all the elements between first and last, including the element pointed by * first but not the element pointed by last. */ - function reverse>(first: Iterator, last: Iterator): void; + function reverse>(first: InputIterator, last: InputIterator): void; /** *

Copy range reversed.

* @@ -5593,7 +6114,7 @@ declare namespace std { * @return An output iterator pointing to the end of the copied range, which contains the same elements in reverse * order. */ - function reverse_copy, OutputIterator extends base.Iterator>(first: BidirectionalIterator, last: BidirectionalIterator, result: OutputIterator): OutputIterator; + function reverse_copy, OutputIterator extends Iterator>(first: BidirectionalIterator, last: BidirectionalIterator, result: OutputIterator): OutputIterator; /** *

Rotate left the elements in range.

* @@ -5609,7 +6130,7 @@ declare namespace std { * * @return An iterator pointing to the element that now contains the value previously pointed by first. */ - function rotate>(first: Iterator, middle: Iterator, last: Iterator): Iterator; + function rotate>(first: InputIterator, middle: InputIterator, last: InputIterator): InputIterator; /** *

Copy range rotated left.

* @@ -5629,7 +6150,7 @@ declare namespace std { * * @return An output iterator pointing to the end of the copied range. */ - function rotate_copy, OutputIterator extends base.Iterator>(first: ForwardIterator, middle: ForwardIterator, last: ForwardIterator, result: OutputIterator): OutputIterator; + function rotate_copy, OutputIterator extends Iterator>(first: ForwardIterator, middle: ForwardIterator, last: ForwardIterator, result: OutputIterator): OutputIterator; /** *

Randomly rearrange elements in range.

* @@ -5777,7 +6298,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element written in the result sequence. */ - function partial_sort_copy, RandomAccessIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result_first: RandomAccessIterator, result_last: RandomAccessIterator): RandomAccessIterator; + function partial_sort_copy, RandomAccessIterator extends Iterator>(first: InputIterator, last: InputIterator, result_first: RandomAccessIterator, result_last: RandomAccessIterator): RandomAccessIterator; /** *

Copy and partially sort range.

* @@ -5806,7 +6327,7 @@ declare namespace std { * * @return An iterator pointing to the element that follows the last element written in the result sequence. */ - function partial_sort_copy, RandomAccessIterator extends base.Iterator>(first: InputIterator, last: InputIterator, result_first: RandomAccessIterator, result_last: RandomAccessIterator, compare: (x: T, y: T) => boolean): RandomAccessIterator; + function partial_sort_copy, RandomAccessIterator extends Iterator>(first: InputIterator, last: InputIterator, result_first: RandomAccessIterator, result_last: RandomAccessIterator, compare: (x: T, y: T) => boolean): RandomAccessIterator; /** *

Check whether range is sorted.

* @@ -5823,7 +6344,7 @@ declare namespace std { * false otherwise. If the range [first, last) contains less than two elements, * the function always returns true. */ - function is_sorted>(first: ForwardIterator, last: ForwardIterator): boolean; + function is_sorted>(first: ForwardIterator, last: ForwardIterator): boolean; /** *

Check whether range is sorted.

* @@ -5844,7 +6365,7 @@ declare namespace std { * false otherwise. If the range [first, last) contains less than two elements, * the function always returns true. */ - function is_sorted>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): boolean; + function is_sorted>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): boolean; /** *

Find first unsorted element in range.

* @@ -5869,7 +6390,7 @@ declare namespace std { * @return An iterator to the first element in the range which does not follow an ascending order, or last if * all elements are sorted or if the range contains less than two elements. */ - function is_sorted_until>(first: ForwardIterator, last: ForwardIterator): ForwardIterator; + function is_sorted_until>(first: ForwardIterator, last: ForwardIterator): ForwardIterator; /** *

Find first unsorted element in range.

* @@ -5894,7 +6415,7 @@ declare namespace std { * @return An iterator to the first element in the range which does not follow an ascending order, or last if * all elements are sorted or if the range contains less than two elements. */ - function is_sorted_until>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; + function is_sorted_until>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; /** *

Return iterator to lower bound.

* @@ -5923,7 +6444,7 @@ declare namespace std { * @return An iterator to the lower bound of val in the range. If all the element in the range compare less than * val, the function returns last. */ - function lower_bound>(first: ForwardIterator, last: ForwardIterator, val: T): ForwardIterator; + function lower_bound>(first: ForwardIterator, last: ForwardIterator, val: T): ForwardIterator; /** *

Return iterator to lower bound.

* @@ -5955,7 +6476,7 @@ declare namespace std { * @return An iterator to the lower bound of val in the range. If all the element in the range compare less than * val, the function returns last. */ - function lower_bound>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): ForwardIterator; + function lower_bound>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): ForwardIterator; /** *

Return iterator to upper bound.

* @@ -5984,7 +6505,7 @@ declare namespace std { * @return An iterator to the upper bound of val in the range. If no element in the range comparse greater than * val, the function returns last. */ - function upper_bound>(first: ForwardIterator, last: ForwardIterator, val: T): ForwardIterator; + function upper_bound>(first: ForwardIterator, last: ForwardIterator, val: T): ForwardIterator; /** *

Return iterator to upper bound.

* @@ -6016,7 +6537,7 @@ declare namespace std { * @return An iterator to the upper bound of val in the range. If no element in the range comparse greater than * val, the function returns last. */ - function upper_bound>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): ForwardIterator; + function upper_bound>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): ForwardIterator; /** *

Get subrange of equal elements.

* @@ -6046,7 +6567,7 @@ declare namespace std { * equivalent values, and {@link Pair.second} its upper bound. The values are the same as those that would be * returned by functions {@link lower_bound} and {@link upper_bound} respectively. */ - function equal_range>(first: ForwardIterator, last: ForwardIterator, val: T): Pair; + function equal_range>(first: ForwardIterator, last: ForwardIterator, val: T): Pair; /** *

Get subrange of equal elements.

* @@ -6079,7 +6600,7 @@ declare namespace std { * equivalent values, and {@link Pair.second} its upper bound. The values are the same as those that would be * returned by functions {@link lower_bound} and {@link upper_bound} respectively. */ - function equal_range>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): Pair; + function equal_range>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): Pair; /** *

Get subrange of equal elements.

* @@ -6107,7 +6628,7 @@ declare namespace std { * * @return true if an element equivalent to val is found, and false otherwise. */ - function binary_search>(first: ForwardIterator, last: ForwardIterator, val: T): boolean; + function binary_search>(first: ForwardIterator, last: ForwardIterator, val: T): boolean; /** *

Get subrange of equal elements.

* @@ -6138,7 +6659,7 @@ declare namespace std { * * @return true if an element equivalent to val is found, and false otherwise. */ - function binary_search>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): boolean; + function binary_search>(first: ForwardIterator, last: ForwardIterator, val: T, compare: (x: T, y: T) => boolean): boolean; /** *

Test whether range is partitioned.

* @@ -6160,7 +6681,7 @@ declare namespace std { * true precede those for which it returns false. Otherwise it returns * false. If the range is {@link IContainer.empty empty}, the function returns true. */ - function is_partitioned>(first: InputIterator, last: InputIterator, pred: (x: T) => boolean): boolean; + function is_partitioned>(first: InputIterator, last: InputIterator, pred: (x: T) => boolean): boolean; /** *

Partition range in two.

* @@ -6183,7 +6704,7 @@ declare namespace std { * @return An iterator that points to the first element of the second group of elements (those for which pred * returns false), or last if this group is {@link IContainer.empty empty}. */ - function partition>(first: BidirectionalIterator, last: BidirectionalIterator, pred: (x: T) => boolean): BidirectionalIterator; + function partition>(first: BidirectionalIterator, last: BidirectionalIterator, pred: (x: T) => boolean): BidirectionalIterator; /** *

Partition range in two - stable ordering.

* @@ -6205,7 +6726,7 @@ declare namespace std { * @return An iterator that points to the first element of the second group of elements (those for which pred * returns false), or last if this group is {@link IContainer.empty empty}. */ - function stable_partition>(first: BidirectionalIterator, last: BidirectionalIterator, pred: (x: T) => boolean): BidirectionalIterator; + function stable_partition>(first: BidirectionalIterator, last: BidirectionalIterator, pred: (x: T) => boolean): BidirectionalIterator; /** *

Partition range into two.

* @@ -6231,7 +6752,7 @@ declare namespace std { * member {@link Pair.second second} points to the element that follows the last element copied to the sequence * of elements for which pred returned false. */ - function partition_copy, OutputIterator1 extends base.Iterator, OutputIterator2 extends base.Iterator>(first: InputIterator, last: InputIterator, result_true: OutputIterator1, result_false: OutputIterator2, pred: (val: T) => T): Pair; + function partition_copy, OutputIterator1 extends Iterator, OutputIterator2 extends Iterator>(first: InputIterator, last: InputIterator, result_true: OutputIterator1, result_false: OutputIterator2, pred: (val: T) => T): Pair; /** *

Get partition point.

* @@ -6256,7 +6777,7 @@ declare namespace std { * @return An iterator to the first element in the partitioned range [first, last) for which pred * is not true, or last if it is not true for any element. */ - function partition_point>(first: ForwardIterator, last: ForwardIterator, pred: (x: T) => boolean): ForwardIterator; + function partition_point>(first: ForwardIterator, last: ForwardIterator, pred: (x: T) => boolean): ForwardIterator; /** *

Merge sorted ranges.

* @@ -6278,7 +6799,7 @@ declare namespace std { * * @return An iterator pointing to the past-the-end element in the resulting sequence. */ - function merge, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; + function merge, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; /** *

Merge sorted ranges.

* @@ -6304,7 +6825,7 @@ declare namespace std { * * @return An iterator pointing to the past-the-end element in the resulting sequence. */ - function merge, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; + function merge, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; /** *

Merge consecutive sorted ranges.

* @@ -6326,7 +6847,7 @@ declare namespace std { * sequence. This is also the past-the-end position of the range where the resulting merged range is * stored. */ - function inplace_merge>(first: BidirectionalIterator, middle: BidirectionalIterator, last: BidirectionalIterator): void; + function inplace_merge>(first: BidirectionalIterator, middle: BidirectionalIterator, last: BidirectionalIterator): void; /** *

Merge consecutive sorted ranges.

* @@ -6352,7 +6873,7 @@ declare namespace std { * considered to go before the second in the specific strict weak ordering it defines. The * function shall not modify any of its arguments. */ - function inplace_merge>(first: BidirectionalIterator, middle: BidirectionalIterator, last: BidirectionalIterator, compare: (x: T, y: T) => boolean): void; + function inplace_merge>(first: BidirectionalIterator, middle: BidirectionalIterator, last: BidirectionalIterator, compare: (x: T, y: T) => boolean): void; /** *

Test whether sorted range includes another sorted range.

* @@ -6377,7 +6898,7 @@ declare namespace std { * [first1, last1), false otherwise. If [first2, last2) is an empty * range, the function returns true. */ - function includes, InputIterator2 extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2): boolean; + function includes, InputIterator2 extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2): boolean; /** *

Test whether sorted range includes another sorted range.

* @@ -6406,7 +6927,7 @@ declare namespace std { * [first1, last1), false otherwise. If [first2, last2) is an empty * range, the function returns true. */ - function includes, InputIterator2 extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, compare: (x: T, y: T) => boolean): boolean; + function includes, InputIterator2 extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, compare: (x: T, y: T) => boolean): boolean; /** *

Union of two sorted ranges.

* @@ -6435,7 +6956,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_union, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; + function set_union, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; /** *

Union of two sorted ranges.

* @@ -6468,7 +6989,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_union, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; + function set_union, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; /** *

Intersection of two sorted ranges.

* @@ -6496,7 +7017,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_intersection, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; + function set_intersection, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; /** *

Intersection of two sorted ranges.

* @@ -6528,7 +7049,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_intersection, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; + function set_intersection, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; /** *

Difference of two sorted ranges.

* @@ -6562,7 +7083,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_difference, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; + function set_difference, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; /** *

Difference of two sorted ranges.

* @@ -6600,7 +7121,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_difference, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; + function set_difference, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; /** *

Symmetric difference of two sorted ranges.

* @@ -6634,7 +7155,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_symmetric_difference, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; + function set_symmetric_difference, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator): OutputIterator; /** *

Symmetric difference of two sorted ranges.

* @@ -6668,7 +7189,7 @@ declare namespace std { * * @return An iterator to the end of the constructed range. */ - function set_symmetric_difference, InputIterator2 extends base.Iterator, OutputIterator extends base.Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; + function set_symmetric_difference, InputIterator2 extends Iterator, OutputIterator extends Iterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, result: OutputIterator, compare: (x: T, y: T) => boolean): OutputIterator; /** *

Return the smallest.

* @@ -6717,7 +7238,7 @@ declare namespace std { * * @return An iterator to smallest value in the range, or last if the range is empty. */ - function min_element>(first: ForwardIterator, last: ForwardIterator): ForwardIterator; + function min_element>(first: ForwardIterator, last: ForwardIterator): ForwardIterator; /** *

Return smallest element in range.

* @@ -6738,7 +7259,7 @@ declare namespace std { * * @return An iterator to smallest value in the range, or last if the range is empty. */ - function min_element>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; + function min_element>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; /** *

Return largest element in range.

* @@ -6756,7 +7277,7 @@ declare namespace std { * * @return An iterator to largest value in the range, or last if the range is empty. */ - function max_element>(first: ForwardIterator, last: ForwardIterator): ForwardIterator; + function max_element>(first: ForwardIterator, last: ForwardIterator): ForwardIterator; /** *

Return largest element in range.

* @@ -6777,7 +7298,7 @@ declare namespace std { * * @return An iterator to largest value in the range, or last if the range is empty. */ - function max_element>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; + function max_element>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; /** *

Return smallest and largest elements in range.

* @@ -6803,7 +7324,7 @@ declare namespace std { * @return A {@link Pair} with an iterator pointing to the element with the smallest value in the range * [first, last) as first element, and the largest as second. */ - function minmax_element>(first: ForwardIterator, last: ForwardIterator): Pair; + function minmax_element>(first: ForwardIterator, last: ForwardIterator): Pair; /** *

Return smallest and largest elements in range.

* @@ -6829,7 +7350,7 @@ declare namespace std { * @return A {@link Pair} with an iterator pointing to the element with the smallest value in the range * [first, last) as first element, and the largest as second. */ - function minmax_element>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): Pair; + function minmax_element>(first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): Pair; } declare namespace std { /** @@ -7314,22 +7835,6 @@ declare namespace std { const _20: PlaceHolder; } } -declare namespace std { - /** - *

Return distance between {@link Iterator iterators}.

- * - *

Calculates the number of elements between first and last.

- * - *

If it is a {@link IArrayIterator random-access iterator}, the function uses operator- to calculate this. - * Otherwise, the function uses the increase operator {@link Iterator.next next()} repeatedly.

- * - * @param first Iterator pointing to the initial element. - * @param last Iterator pointing to the final element. This must be reachable from first. - * - * @return The number of elements between first and last. - */ - function distance>(first: Iterator, last: Iterator): number; -} declare namespace std { /** *

Standard exception class.

@@ -7339,10 +7844,9 @@ declare namespace std { *

All objects thrown by components of the standard library are derived from this class. * Therefore, all standard exceptions can be caught by catching this type by reference.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/exception/exception/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/exception/exception * @author Jeongho Nam */ class Exception { @@ -7380,10 +7884,9 @@ declare namespace std { * *

It is used as a base class for several logical error exceptions.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/logic_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/logic_error * @author Jeongho Nam */ class LogicError extends Exception { @@ -7406,10 +7909,9 @@ declare namespace std { *

No component of the standard library throws exceptions of this type. It is designed as a standard * exception to be thrown by programs.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/domain_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/domain_error * @author Jeongho Nam */ class DomainError extends LogicError { @@ -7428,10 +7930,9 @@ declare namespace std { *

It is a standard exception that can be thrown by programs. Some components of the standard library * also throw exceptions of this type to signal invalid arguments.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/invalid_argument/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/invalid_argument * @author Jeongho Nam */ class InvalidArgument extends LogicError { @@ -7450,10 +7951,9 @@ declare namespace std { *

It is a standard exception that can be thrown by programs. Some components of the standard library, * such as vector and string also throw exceptions of this type to signal errors resizing.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/length_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/length_error * @author Jeongho Nam */ class LengthError extends LogicError { @@ -7473,10 +7973,9 @@ declare namespace std { * such as vector, deque, string and bitset also throw exceptions of this type to signal arguments * out of range.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/out_of_range/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/out_of_range * @author Jeongho Nam */ class OutOfRange extends LogicError { @@ -7495,10 +7994,9 @@ declare namespace std { * *

It is used as a base class for several runtime error exceptions.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/runtime_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/runtime_error * @author Jeongho Nam */ class RuntimeError extends Exception { @@ -7517,10 +8015,9 @@ declare namespace std { *

It is a standard exception that can be thrown by programs. Some components of the standard library * also throw exceptions of this type to signal range errors.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/outflow_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/outflow_error * @author Jeongho Nam */ class OverflowError extends RuntimeError { @@ -7539,10 +8036,9 @@ declare namespace std { *

No component of the standard library throws exceptions of this type. It is designed as a standard * exception to be thrown by programs.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/underflow_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/underflow_error * @author Jeongho Nam */ class UnderflowError extends RuntimeError { @@ -7562,10 +8058,9 @@ declare namespace std { *

It is a standard exception that can be thrown by programs. Some components of the standard library * also throw exceptions of this type to signal range errors.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/stdexcept/range_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/stdexcept/range_error * @author Jeongho Nam */ class RangeError extends RuntimeError { @@ -7592,9 +8087,11 @@ declare namespace std.base { * so that they can be interpreted when needed as more abstract (and portable) * {@link ErrorCondition error conditions}.

* + *

+ * * @author Jeongho Nam */ - class ErrorInstance { + abstract class ErrorInstance { /** * A reference to an {@link ErrorCategory} object. */ @@ -7699,10 +8196,9 @@ declare namespace std { *

The class inherits from {@link RuntimeError}, to which it adds an {@link ErrorCode} as * member code (and defines a specialized what member).

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/system_error/system_error/ - *
+ *

* + * @reference http://www.cplusplus.com/reference/system_error/system_error * @author Jeongho Nam */ class SystemError extends RuntimeError { @@ -7763,10 +8259,9 @@ declare namespace std { * passed by reference. As such, only one object of each of these types shall exist, each uniquely identifying its own * category: all error codes and conditions of a same category shall return a reference to same object.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/system_error/error_category/
  • - *
+ *

* + * @reference http://www.cplusplus.com/reference/system_error/error_category * @author Jeongho Nam */ abstract class ErrorCategory { @@ -7889,10 +8384,9 @@ declare namespace std { *

The {@link ErrorCategory categories} associated with the {@link ErrorCondition} and the * {@link ErrorCode} define the equivalences between them.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/system_error/error_condition/
  • - *
+ *

* + * @reference http://www.cplusplus.com/reference/system_error/error_condition * @author Jeongho Nam */ class ErrorCondition extends base.ErrorInstance { @@ -7920,10 +8414,9 @@ declare namespace std { *

Objects of this class associate such numerical codes to {@link ErrorCategory error categories}, so that they * can be interpreted when needed as more abstract (and portable) {@link ErrorCondition error conditions}.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/system_error/error_code/
  • - *
+ *

* + * @reference http://www.cplusplus.com/reference/system_error/error_code * @author Jeongho Nam */ class ErrorCode extends base.ErrorInstance { @@ -7948,13 +8441,10 @@ declare namespace std { * T2). The individual values can be accessed through its public members {@link first} and * {@link second}.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/utility/pair/
  • - *
- * * @param Type of member {@link first}. * @param Type of member {@link second}. * + * @reference http://www.cplusplus.com/reference/utility/pair * @author Jeongho Nam */ class Pair { @@ -8083,12 +8573,9 @@ declare namespace std.base { * maximal paths have the same number of black nodes, by property 5, this shows * that no path is more than twice as long as any other path.

* - *
    - *
  • Reference: https://en.wikipedia.org/w/index.php?title=Red%E2%80%93black_tree&redirect=no
  • - *
- * * @param Type of elements. * + * @reference https://en.wikipedia.org/w/index.php?title=Red%E2%80%93black_tree * @inventor Rudolf Bayer * @author Migrated by Jeongho Nam */ @@ -8114,8 +8601,8 @@ declare namespace std.base { * @return The maximum node. */ protected fetch_maximum(node: XTreeNode): XTreeNode; - abstract is_equals(left: T, right: T): boolean; abstract is_less(left: T, right: T): boolean; + abstract is_equal_to(left: T, right: T): boolean; /** *

Insert an element with a new node.

* @@ -8632,6 +9119,10 @@ declare namespace std.base { } declare namespace std.base { /** + *

A red-black Tree storing {@link SetIterator SetIterators}.

+ * + *

+ * * @author Jeongho Nam */ class AtomicTree extends XTree> { @@ -8650,7 +9141,7 @@ declare namespace std.base { /** * @inheritdoc */ - is_equals(left: SetIterator, right: SetIterator): boolean; + is_equal_to(left: SetIterator, right: SetIterator): boolean; /** * @inheritdoc */ @@ -8709,7 +9200,7 @@ declare namespace std.base { * * @author Jeongho Nam */ - class HashBuckets { + abstract class HashBuckets { private buckets_; private item_size_; /** @@ -8726,7 +9217,7 @@ declare namespace std.base { size(): number; item_size(): number; at(index: number): Vector; - private hash_index(val); + hash_index(val: T): number; insert(val: T): void; erase(val: T): void; } @@ -8761,6 +9252,8 @@ declare namespace std.base { * beginning or the end, {@link IArray} objects perform worse and have less consistent iterators and references * than {@link List Lists}

. * + *

+ * *

Container properties

*
*
Sequence
@@ -8780,7 +9273,7 @@ declare namespace std.base { * * @author Jeongho Nam */ - interface IArray extends ILinearContainer { + interface IArrayContainer extends ILinearContainer { /** *

Request a change in capacity.

* @@ -8871,10 +9364,9 @@ declare namespace std.base { *

There is not a single type of {@link IArrayIterator random-access iterator}: Each container may define its * own specific iterator type able to iterate through it and access its elements.

* - *
    - *
  • Reference: http://www.cplusplus.com/reference/iterator/RandomAccessIterator/
  • - *
+ *

* + * @reference http://www.cplusplus.com/reference/iterator/RandomAccessIterator * @author Jeongho Nam */ interface IArrayIterator extends Iterator { @@ -8896,11 +9388,13 @@ declare namespace std.base { } declare namespace std.base { /** - *

An interface of

+ *

An interface of containers.

* *

{@link IContainer} is an interface designed for sequence containers. Sequence containers of STL * (Standard Template Library) are based on the {@link IContainer}.

* + *

+ * *

Container properties

*
*
Sequence
@@ -8980,7 +9474,7 @@ declare namespace std.base { * * @return A {@link ReverseIterator reverse iterator} to the reverse beginning of the sequence */ - rbegin(): ReverseIterator; + rbegin(): base.IReverseIterator; /** *

Return {@link ReverseIterator reverse iterator} to reverse end.

* @@ -8992,7 +9486,7 @@ declare namespace std.base { * * @return A {@link ReverseIterator reverse iterator} to the reverse end of the sequence */ - rend(): ReverseIterator; + rend(): base.IReverseIterator; /** * Return the number of elements in the Container. * @@ -9082,14 +9576,18 @@ declare namespace std.base { */ swap(obj: IContainer): void; } + interface IReverseIterator extends ReverseIterator, IReverseIterator> { + } } declare namespace std.base { /** *

An interface for deque

* + *

+ * * @author Jeongho Nam */ - interface IDeque extends ILinearContainer { + interface IDequeContainer extends ILinearContainer { /** *

Insert element at beginning.

* @@ -9111,7 +9609,9 @@ declare namespace std.base { } declare namespace std.base { /** - *

Linear

+ *

An interface for linear containers.

+ * + *

* * @author Jeonngho Nam */ @@ -9221,6 +9721,13 @@ declare namespace std.base { } } declare namespace std.base { + /** + *

Hash buckets storing {@link MapIterator MapIterators}.

+ * + *

+ * + * @author Jeongho Nam + */ class MapHashBuckets extends HashBuckets> { private map; constructor(map: MapContainer); @@ -9229,6 +9736,10 @@ declare namespace std.base { } declare namespace std.base { /** + *

A red-black Tree storing {@link MapIterator MapIterators}.

+ * + *

+ * * @author Jeongho Nam */ class PairTree extends XTree> { @@ -9247,7 +9758,7 @@ declare namespace std.base { /** * @inheritdoc */ - is_equals(left: MapIterator, right: MapIterator): boolean; + is_equal_to(left: MapIterator, right: MapIterator): boolean; /** * @inheritdoc */ @@ -9255,6 +9766,13 @@ declare namespace std.base { } } declare namespace std.base { + /** + *

Hash buckets storing {@link SetIterator SetIterators}.

+ * + *

+ * + * @author Jeongho Nam + */ class SetHashBuckets extends HashBuckets> { private set; constructor(set: SetContainer); @@ -9312,27 +9830,6 @@ declare namespace std.base { uncle: XTreeNode; } } -/** -* STL (Standard Template Library) Containers for TypeScript. -* -* @author Jeongho Nam -*/ -declare namespace std { -} -/** - * Base classes composing STL in background. - * - * @author Jeongho Nam - */ -declare namespace std.base { -} -/** - * Examples for supporting developers who use STL library. - * - * @author Jeongho Nam - */ -declare namespace std.example { -} declare namespace std.example { function test_bind(): void; } From 32e93d9fa79e9f8c239fdf365ed0a029d53c7f80 Mon Sep 17 00:00:00 2001 From: ven Date: Thu, 2 Jun 2016 14:55:22 +0200 Subject: [PATCH 0420/1506] fix typo (#9450) --- angularjs/angular-resource.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 0fb9351342..1482c3f047 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -95,7 +95,7 @@ declare namespace angular.resource { (params: Object, data: Object, success?: Function, error?: Function): IResourceArray; } - // Baseclass for everyresource with default actions. + // Baseclass for every resource with default actions. // If you define your new actions for the resource, you will need // to extend this interface and typecast the ResourceClass to it. // From 9161d4fca9b3eeeb74e011f2bfa5e53066b838c6 Mon Sep 17 00:00:00 2001 From: Peter Hajdu Date: Thu, 2 Jun 2016 15:02:58 +0200 Subject: [PATCH 0421/1506] fix angular-material import as module (#9451) [TypeScript error: xxx.ts(xx,xx): Error TS2307: Cannot find module 'angular-material'.] --- angular-material/angular-material.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index bb144d15d4..4af35c6701 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -4,6 +4,12 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// + +declare module 'angular-material' { +    var _: string; +   export = _; +} + declare namespace angular.material { interface IBottomSheetOptions { From 8ef4d9a7db3fa5bdca6bf30570620bb2c70be809 Mon Sep 17 00:00:00 2001 From: Rand Scullard Date: Thu, 2 Jun 2016 09:05:18 -0400 Subject: [PATCH 0422/1506] Add definitions for fontfaceobserver (#9453) --- fontfaceobserver/fontfaceobserver-tests.ts | 46 +++++++++++++++++++ .../fontfaceobserver-tests.ts.tscparams | 1 + fontfaceobserver/fontfaceobserver.d.ts | 33 +++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 fontfaceobserver/fontfaceobserver-tests.ts create mode 100644 fontfaceobserver/fontfaceobserver-tests.ts.tscparams create mode 100644 fontfaceobserver/fontfaceobserver.d.ts diff --git a/fontfaceobserver/fontfaceobserver-tests.ts b/fontfaceobserver/fontfaceobserver-tests.ts new file mode 100644 index 0000000000..1ea9a7a222 --- /dev/null +++ b/fontfaceobserver/fontfaceobserver-tests.ts @@ -0,0 +1,46 @@ +/// + +function test1() { + var font = new FontFaceObserver('My Family', { + weight: 400 + }); + + font.load().then(function () { + console.log('Font is available'); + }, function () { + console.log('Font is not available'); + }); +} + +function test2() { + var font = new FontFaceObserver('My Family'); + + font.load('中国').then(function () { + console.log('Font is available'); + }, function () { + console.log('Font is not available'); + }); +} + +function test3() { + var font = new FontFaceObserver('My Family'); + + font.load(null, 5000).then(function () { + console.log('Font is available'); + }, function () { + console.log('Font is not available after waiting 5 seconds'); + }); +} + +function test4() { + var fontA = new FontFaceObserver('Family A'); + var fontB = new FontFaceObserver('Family B'); + + fontA.load().then(function () { + console.log('Family A is available'); + }); + + fontB.load().then(function () { + console.log('Family B is available'); + }); +} diff --git a/fontfaceobserver/fontfaceobserver-tests.ts.tscparams b/fontfaceobserver/fontfaceobserver-tests.ts.tscparams new file mode 100644 index 0000000000..14fce22a5c --- /dev/null +++ b/fontfaceobserver/fontfaceobserver-tests.ts.tscparams @@ -0,0 +1 @@ +--target ES6 diff --git a/fontfaceobserver/fontfaceobserver.d.ts b/fontfaceobserver/fontfaceobserver.d.ts new file mode 100644 index 0000000000..8f461dbd4f --- /dev/null +++ b/fontfaceobserver/fontfaceobserver.d.ts @@ -0,0 +1,33 @@ +// Type definitions for fontfaceobserver +// Project: https://github.com/bramstein/fontfaceobserver +// Definitions by: Rand Scullard +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +declare namespace FontFaceObserver { + interface FontVariant { + weight?: number | string; + style?: string; + stretch?: string; + } +} + +declare class FontFaceObserver { + /** + * Creates a new FontFaceObserver. + * @param fontFamilyName Name of the font family to observe. + * @param variant Description of the font variant to observe. If a property is not present it will default to normal. + */ + constructor(fontFamilyName: string, variant?: FontFaceObserver.FontVariant); + + /** + * Starts observing the loading of the specified font. Immediately returns a new Promise that resolves when the font is available and rejected when the font is not available. + * @param testString If your font doesn't contain latin characters you can pass a custom test string. + * @param timeout The default timeout for giving up on font loading is 3 seconds. You can increase or decrease this by passing a number of milliseconds. + */ + load(testString?: string, timeout?: number): Promise; +} + +declare module "fontfaceobserver" { + export = FontFaceObserver; +} From f6e169d0719685d4c2cbb92a519f354e58755f0c Mon Sep 17 00:00:00 2001 From: Craig Date: Thu, 2 Jun 2016 09:09:42 -0400 Subject: [PATCH 0423/1506] The click event handler for the title action of Infobox entities needs to accept an optional MouseEvent input parameter (#9452) Because the Infobox title click handler is attached to an anchor tag with a hash as its destination (), the hash can cause problems in framework like Angular when used in conjunction with a void; + getTitleClickHandler(): (mouseEvent?: MouseEvent) => void; getVisible(): boolean; getWidth(): number; getZIndex(): number; @@ -329,8 +329,8 @@ declare namespace Microsoft.Maps { showPointer?: boolean; pushpin?: Pushpin; title?: string; - titleAction?: { label?: string; eventHandler: () => void; }; - titleClickHandler?: () => void; + titleAction?: { label?: string; eventHandler: (mouseEvent?: MouseEvent) => void; }; + titleClickHandler?: (mouseEvent?: MouseEvent) => void; typeName?: InfoboxType; visible?: boolean; width?: number; From 7a4bf1d15f91989c54604cd9b904c380470abf8f Mon Sep 17 00:00:00 2001 From: trevordunn Date: Thu, 2 Jun 2016 07:29:35 -0600 Subject: [PATCH 0424/1506] Made GET and POST variables static (#6140) (#9455) --- preloadjs/preloadjs.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preloadjs/preloadjs.d.ts b/preloadjs/preloadjs.d.ts index 1585842356..1a9d01b1e8 100644 --- a/preloadjs/preloadjs.d.ts +++ b/preloadjs/preloadjs.d.ts @@ -20,14 +20,14 @@ declare namespace createjs { static BINARY: string; canceled: boolean; static CSS: string; - GET: string; + static GET: string; static IMAGE: string; static JAVASCRIPT: string; static JSON: string; static JSONP: string; loaded: boolean; static MANIFEST: string; - POST: string; + static POST: string; progress: number; resultFormatter: () => any; static SOUND: string; From b13eab309f2c3240a60ad8af299c84217fee613b Mon Sep 17 00:00:00 2001 From: Rajab Shakirov Date: Thu, 2 Jun 2016 16:34:54 +0300 Subject: [PATCH 0425/1506] init commit react-modal (#9457) --- react-modal/react-modal-tests.tsx | 49 +++++++++++++++++++++++++++++++ react-modal/react-modal.d.ts | 28 ++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 react-modal/react-modal-tests.tsx create mode 100644 react-modal/react-modal.d.ts diff --git a/react-modal/react-modal-tests.tsx b/react-modal/react-modal-tests.tsx new file mode 100644 index 0000000000..9a9814930d --- /dev/null +++ b/react-modal/react-modal-tests.tsx @@ -0,0 +1,49 @@ +/// +/// + +import * as React from "react"; +import ReactModal from 'react-modal'; + +class ExampleOfUsingReactModal extends React.Component<{}, {}> { + render() { + var onAfterOpenFn = () => { } + var onRequestCloseFn = () => { } + var customStyle = { + overlay: { + position: 'fixed', + top: 0, + left: 0, + right: 0, + bottom: 0, + backgroundColor: 'rgba(255, 255, 255, 0.75)' + }, + content: { + position: 'absolute', + top: '40px', + left: '40px', + right: '40px', + bottom: '40px', + border: '1px solid #ccc', + background: '#fff', + overflow: 'auto', + WebkitOverflowScrolling: 'touch', + borderRadius: '4px', + outline: 'none', + padding: '20px' + + } + } + return ( + +

Modal Content

+

Etc.

+
+ ); + } +}; \ No newline at end of file diff --git a/react-modal/react-modal.d.ts b/react-modal/react-modal.d.ts new file mode 100644 index 0000000000..2f2d0403d2 --- /dev/null +++ b/react-modal/react-modal.d.ts @@ -0,0 +1,28 @@ +// Type definitions for react-modal v1.3.0 +// Project: https://github.com/reactjs/react-modal +// Definitions by: Rajab Shakirov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-modal" { + interface ReactModal { + isOpen: boolean; + style?: { + content: { + [key: string]: any; + }, + overlay: { + [key: string]: any; + } + }, + appElement?: HTMLElement | {}, + onAfterOpen?: Function, + onRequestClose?: Function, + closeTimeoutMS?: number, + ariaHideApp?: boolean, + shouldCloseOnOverlayClick?: boolean + } + let ReactModal: __React.ClassicComponentClass; + export default ReactModal; +} From f1184e2e62085a204f85994128044500654af904 Mon Sep 17 00:00:00 2001 From: cbauerme Date: Thu, 2 Jun 2016 07:00:54 -0700 Subject: [PATCH 0426/1506] Added Sequelize Model.addScope method. (#9459) --- sequelize/sequelize-tests.ts | 4 ++++ sequelize/sequelize.d.ts | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/sequelize/sequelize-tests.ts b/sequelize/sequelize-tests.ts index 6e62606e19..0f274e20a9 100644 --- a/sequelize/sequelize-tests.ts +++ b/sequelize/sequelize-tests.ts @@ -841,6 +841,10 @@ User.schema( 'special' ).create( { age : 3 }, { logging : function( ) {} } ); User.getTableName(); +User.addScope('lowAccess', { where : { parent_id : 2 } }); +User.addScope('lowAccess', function() { } ); +User.addScope('lowAccess', { where : { parent_id : 2 } }, { override: true }); + User.scope( 'lowAccess' ).count(); User.scope( { where : { parent_id : 2 } } ); diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index 81c7f4a165..8d058efdb2 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -2948,6 +2948,18 @@ declare module "sequelize" { } + /** + * AddScope Options for Model.addScope + */ + interface AddScopeOptions { + + /** + * If a scope of the same name already exists, should it be overwritten? + */ + override: boolean; + + } + /** * Scope Options for Model.scope */ @@ -3640,6 +3652,18 @@ declare module "sequelize" { */ getTableName( options? : { logging : Function } ) : string | Object; + /** + * Add a new scope to the model. This is especially useful for adding scopes with includes, when the model you want to include is not available at the time this model is defined. + * + * By default this will throw an error if a scope with that name already exists. Pass `override: true` in the options object to silence this error. + * + * @param {String} name The name of the scope. Use `defaultScope` to override the default scope + * @param {Object|Function} scope + * @param {Object} [options] + * @param {Boolean} [options.override=false] + */ + addScope( name : string, scope : FindOptions | Function, options? : AddScopeOptions ): void; + /** * Apply a scope created in `define` to the model. First let's look at how to create scopes: * ```js From 79aa209309897673e291696b52c833cc71457895 Mon Sep 17 00:00:00 2001 From: Jerome David Yackley Date: Thu, 2 Jun 2016 09:01:19 -0500 Subject: [PATCH 0427/1506] angular-ui-bootstrap - Added windowTopClass (#9458) Added the options parameter windowTopClass to IModalSettings. Here is the definition: https://github.com/angular-ui/bootstrap/blob/dd091488937060a8e4511fdfd6e1bbbf5d5403b7/src/modal/docs/readme.md. --- angular-ui-bootstrap/angular-ui-bootstrap.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index 0a7b54775e..38a1c321bd 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -387,6 +387,12 @@ declare namespace angular.ui.bootstrap { * @default 'model-open' */ openedClass?: string; + + /** + * CSS class(es) to be added to the top modal window. + */ + + windowTopClass?: string; } interface IModalStackService { From a0d42d933647e096fe3d14db2fc75b6718cb9089 Mon Sep 17 00:00:00 2001 From: Nathan Brown Date: Thu, 2 Jun 2016 07:02:14 -0700 Subject: [PATCH 0428/1506] material-ui: Update material-ui to v0.15.0 (#9462) --- .../legacy/material-ui-0.14.4-tests.tsx | 2302 +++++ .../material-ui-0.14.4-tests.tsx.tscparams | 1 + material-ui/legacy/material-ui-0.14.4.d.ts | 8246 +++++++++++++++++ material-ui/material-ui-tests.tsx | 7159 +++++++++----- material-ui/material-ui.d.ts | 5768 ++++++------ 5 files changed, 18401 insertions(+), 5075 deletions(-) create mode 100644 material-ui/legacy/material-ui-0.14.4-tests.tsx create mode 100644 material-ui/legacy/material-ui-0.14.4-tests.tsx.tscparams create mode 100644 material-ui/legacy/material-ui-0.14.4.d.ts diff --git a/material-ui/legacy/material-ui-0.14.4-tests.tsx b/material-ui/legacy/material-ui-0.14.4-tests.tsx new file mode 100644 index 0000000000..0d112fcaa8 --- /dev/null +++ b/material-ui/legacy/material-ui-0.14.4-tests.tsx @@ -0,0 +1,2302 @@ +/// +/// +/// + +import * as React from "react"; +import * as LinkedStateMixin from "react-addons-linked-state-mixin"; +import * as MaterialUi from "material-ui"; +import ActionGrade from "material-ui/lib/svg-icons/action/grade"; +import AppBar from "material-ui/lib/app-bar"; +import ArrowDropRight from "material-ui/lib/svg-icons/navigation-arrow-drop-right"; +import AutoComplete from 'material-ui/lib/auto-complete'; +import Avatar from "material-ui/lib/avatar"; +import Badge from "material-ui/lib/badge"; +import Card from "material-ui/lib/card/card"; +import CardActions from "material-ui/lib/card/card-actions"; +import CardHeader from "material-ui/lib/card/card-header"; +import CardMedia from 'material-ui/lib/card/card-media'; +import CardText from "material-ui/lib/card/card-text"; +import CardTitle from 'material-ui/lib/card/card-title'; +import Checkbox from "material-ui/lib/checkbox"; +import CircularProgress from 'material-ui/lib/circular-progress'; +import ColorManipulator from 'material-ui/lib/utils/color-manipulator'; +import Colors from "material-ui/lib/styles/colors"; +import DatePicker from "material-ui/lib/date-picker/date-picker"; +import Dialog from "material-ui/lib/dialog"; +import Divider from 'material-ui/lib/divider'; +import DropDownMenu from "material-ui/lib/drop-down-menu"; +import FileFolder from "material-ui/lib/svg-icons/file/folder"; +import FlatButton from "material-ui/lib/flat-button"; +import FloatingActionButton from "material-ui/lib/floating-action-button"; +import FontIcon from "material-ui/lib/font-icon"; +import GridList from 'material-ui/lib/grid-list/grid-list'; +import GridTile from 'material-ui/lib/grid-list/grid-tile'; +import IconButton from "material-ui/lib/icon-button"; +import IconMenu from "material-ui/lib/menus/icon-menu"; +import LeftNav from 'material-ui/lib/left-nav'; +import LinearProgress from 'material-ui/lib/linear-progress'; +import List from 'material-ui/lib/lists/list'; +import ListItem from 'material-ui/lib/lists/list-item'; +import Menu from 'material-ui/lib/menus/menu'; +import MenuItem from 'material-ui/lib/menus/menu-item'; +import Paper from 'material-ui/lib/paper'; +import Popover from 'material-ui/lib/popover/popover'; +import PopoverAnimationFromTop from 'material-ui/lib/popover/popover-animation-from-top'; +import RadioButton from "material-ui/lib/radio-button"; +import RadioButtonGroup from "material-ui/lib/radio-button-group"; +import RaisedButton from "material-ui/lib/raised-button"; +import RefreshIndicator from 'material-ui/lib/refresh-indicator'; +import SelectField from "material-ui/lib/select-field"; +import Slider from 'material-ui/lib/slider'; +import Snackbar from 'material-ui/lib/snackbar'; +import Spacing from "material-ui/lib/styles/spacing"; +import Styles from 'material-ui/lib/styles'; +import SvgIcon from 'material-ui/lib/svg-icon'; +import Tab from 'material-ui/lib/tabs/tab'; +import Table from 'material-ui/lib/table/table'; +import TableBody from 'material-ui/lib/table/table-body'; +import TableFooter from 'material-ui/lib/table/table-footer'; +import TableHeader from 'material-ui/lib/table/table-header'; +import TableHeaderColumn from 'material-ui/lib/table/table-header-column'; +import TableRow from 'material-ui/lib/table/table-row'; +import TableRowColumn from 'material-ui/lib/table/table-row-column'; +import Tabs from 'material-ui/lib/tabs/tabs'; +import TextField from "material-ui/lib/text-field"; +import ThemeDecorator from 'material-ui/lib/styles/theme-decorator'; +import ThemeManager from 'material-ui/lib/styles/theme-manager'; +import TimePicker from "material-ui/lib/time-picker"; +import Toggle from "material-ui/lib/toggle"; +import ToggleStar from "material-ui/lib/svg-icons/toggle/star"; +import ToggleStarBorder from "material-ui/lib/svg-icons/toggle/star-border"; +import Toolbar from 'material-ui/lib/toolbar/toolbar'; +import ToolbarGroup from 'material-ui/lib/toolbar/toolbar-group'; +import ToolbarSeparator from 'material-ui/lib/toolbar/toolbar-separator'; +import ToolbarTitle from 'material-ui/lib/toolbar/toolbar-title'; +import Typography from "material-ui/lib/styles/typography"; +import zIndex from 'material-ui/lib/styles/zIndex'; + +import {SelectableContainerEnhance} from 'material-ui/lib/hoc/selectable-enhance'; + +import * as Icons from "material-ui/lib/svg-icons"; +import ActionAndroid from 'material-ui/lib/svg-icons/action/android'; +import ActionFavorite from 'material-ui/lib/svg-icons/action/favorite'; +import ActionFavoriteBorder from 'material-ui/lib/svg-icons/action/favorite-border'; +import ActionFlightTakeoff from 'material-ui/lib/svg-icons/action/flight-takeoff'; +import ActionHome from 'material-ui/lib/svg-icons/action/home'; +import ActionInfo from 'material-ui/lib/svg-icons/action/info'; +import CommunicationChatBubble from 'material-ui/lib/svg-icons/communication/chat-bubble'; +import ContentAdd from 'material-ui/lib/svg-icons/content/add'; +import ContentCopy from 'material-ui/lib/svg-icons/content/content-copy'; +import ContentDrafts from 'material-ui/lib/svg-icons/content/drafts'; +import ContentFilter from 'material-ui/lib/svg-icons/content/filter-list'; +import ContentInbox from 'material-ui/lib/svg-icons/content/inbox'; +import ContentLink from 'material-ui/lib/svg-icons/content/link'; +import ContentSend from 'material-ui/lib/svg-icons/content/send'; +import Delete from 'material-ui/lib/svg-icons/action/delete'; +import Download from 'material-ui/lib/svg-icons/file/file-download'; +import FileCloudDownload from 'material-ui/lib/svg-icons/file/cloud-download'; +import FolderIcon from 'material-ui/lib/svg-icons/file/folder-open'; +import HardwareVideogameAsset from 'material-ui/lib/svg-icons/hardware/videogame-asset'; +import MapsPlace from 'material-ui/lib/svg-icons/maps/place'; +import MoreVertIcon from 'material-ui/lib/svg-icons/navigation/more-vert'; +import NavigationClose from "material-ui/lib/svg-icons/navigation/close"; +import NavigationExpandMoreIcon from 'material-ui/lib/svg-icons/navigation/expand-more'; +import NotificationsIcon from 'material-ui/lib/svg-icons/social/notifications'; +import PersonAdd from 'material-ui/lib/svg-icons/social/person-add'; +import RemoveRedEye from 'material-ui/lib/svg-icons/image/remove-red-eye'; +import StarBorder from 'material-ui/lib/svg-icons/toggle/star-border'; +import UploadIcon from 'material-ui/lib/svg-icons/file/cloud-upload'; + + +type CheckboxProps = __MaterialUI.CheckboxProps; +type MuiTheme = __MaterialUI.Styles.MuiTheme; +type TouchTapEvent = __MaterialUI.TouchTapEvent; + +interface MaterialUiTestsState { + showDialogStandardActions: boolean; + showDialogCustomActions: boolean; + showDialogScrollable: boolean; + value: number; + dataSource: [string]; + minDate: Date; + maxDate: Date; + autoOk: boolean; + disableYearSelection: boolean; + open: boolean; + valueSingle: string; + valueMultiple: string[]; + anchorEl: Element; + completed: number; + message: string; + autoHideDuration: number; + fixedHeader: boolean; + fixedFooter: boolean; + stripedRows: boolean; + showRowHover: boolean; + selectable: boolean; + multiSelectable: boolean; + enableSelectAll: boolean; + deselectOnClickaway: boolean; + height: string; +} + +// "http://www.material-ui.com/#/customization/themes" +let muiTheme: MuiTheme = ThemeManager.getMuiTheme({ + spacing: Spacing, + zIndex: zIndex, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: Colors.cyan500, + primary2Color: Colors.cyan700, + primary3Color: Colors.lightBlack, + accent1Color: Colors.pinkA200, + accent2Color: Colors.grey100, + accent3Color: Colors.grey500, + textColor: Colors.darkBlack, + alternateTextColor: Colors.white, + canvasColor: Colors.white, + borderColor: Colors.grey300, + disabledColor: ColorManipulator.fade(Colors.darkBlack, 0.3), + pickerHeaderColor: Colors.cyan500, + } +}); + +let SelectableList = SelectableContainerEnhance(List); + +@ThemeDecorator(muiTheme) +class MaterialUiTests extends React.Component<{}, MaterialUiTestsState> implements React.LinkedStateMixin { + + // injected with mixin + linkState: (key: string) => React.ReactLink; + + private picker12hr: TimePicker; + private picker24hr: TimePicker; + + private touchTapEventHandler(e: TouchTapEvent) { + console.info("Received touch tap", e); + } + private formEventHandler(e: React.FormEvent) { + } + private selectFieldChangeHandler(e: TouchTapEvent, si: number, mi: any) { + } + private handleRequestClose(buttonClicked: boolean) { + } + private handleRequestCloseReason(reason: string) { + } + private handleToggle() { + this.setState(Object.assign({}, this.state, { open: !this.state.open })); + } + private handleClose() { + this.setState(Object.assign({}, this.state, { open: false })); + } + private handleChangeSingle(event: React.MouseEvent, value: string){ + } + private handleChangeMultiple(event: React.MouseEvent, value: string[]) { + } + + private handleChange = (e: TouchTapEvent, index: number, value: number) => this.setState(Object.assign({}, this.state, { value })); + + private handleUpdateInput(t: string) { + this.setState(Object.assign({}, this.state, { + dataSource: [t, t + t, t + t + t], + })); + } + private handleTouchTap(e: TouchTapEvent) { + alert('onTouchTap triggered on the title component'); + } + private handleActionTouchTap() { + this.setState(Object.assign({}, this.state, {open: false,})); + alert('Event removed from your calendar.'); + } + private handleChangeDuration = (event: React.FormEvent) => { + const value = event.target["value"]; + this.setState(Object.assign({}, this.state, { + autoHideDuration: value.length > 0 ? parseInt(value) : 0, + })); + } + private onRowSelection(selectedRows: number[] | string) { + } + private handleActive(tab: Tab) { + alert(`A tab with this route property ${tab.props.value} was activated.`); + } + private handleChangeTabs(value: any, e: React.FormEvent, tab: Tab) { + } + private handleChangeTimePicker12(err, time) { + this.picker12hr.setTime(time); + }; + + private handleChangeTimePicker24(err, time) { + this.picker24hr.setTime(time); + }; + + render() { + + const styles = { + title: { + cursor: 'pointer', + }, + exampleImageInput: { + cursor: 'pointer', + position: 'absolute', + top: 0, + bottom: 0, + right: 0, + left: 0, + width: '100%', + opacity: 0, + }, + button: { + margin: 12, + }, + floatingButton: { + marginRight: 20, + }, + textField: { + marginLeft: 20, + }, + floatLeft: { + float: 'left', + }, + root: { + display: 'flex', + flexWrap: 'wrap', + justifyContent: 'space-around', + }, + gridList: { + width: 500, + height: 400, + overflowY: 'auto', + marginBottom: 24, + }, + icons: { + marginRight: 24, + }, + menu: { + marginRight: 32, + marginBottom: 32, + float: 'left', + position: 'relative', + zIndex: 0, + }, + rightIcon: { + textAlign: 'center', + lineHeight: '24px', + }, + paper: { + height: 100, + width: 100, + margin: 20, + textAlign: 'center', + display: 'inline-block', + }, + popover: { + padding: 20, + }, + container: { + position: 'relative', + }, + refresh: { + display: 'inline-block', + position: 'relative', + }, + block: { + maxWidth: 250, + }, + checkbox: { + marginBottom: 16, + }, + radioButton: { + marginBottom: 16, + }, + toggle: { + marginBottom: 16, + }, + propContainerStyle: { + width: 200, + overflow: 'hidden', + margin: '20px auto 0', + }, + propToggleHeader: { + margin: '20px auto 10px', + }, + headline: { + fontSize: 24, + paddingTop: 16, + marginBottom: 12, + fontWeight: 400, + }, + errorStyle: { + color: Colors.orange500, + }, + underlineStyle: { + borderColor: Colors.orange500, + }, + }; + const colors = Styles.Colors; + + // "http://www.material-ui.com/#/customization/inline-styles" + let element: React.ReactElement; + element = + element = React.createElement(Checkbox, { + id: "checkboxId1", name: "checkboxName1", value: "checkboxValue1", label: "went for a run today", style: { + width: '50%', + margin: '0 auto' + }, iconStyle: { + fill: '#FF4081' + } + }); + + // "http://www.material-ui.com/#/components/app-bar" + const AppBarExampleIcon = () => ( + + ); + + const AppBarExampleIconButton = () => ( + Title} + onTitleTouchTap={this.handleTouchTap} + iconElementLeft={} + iconElementRight={} + /> + ); + const AppBarExampleIconMenu = () => ( + } + iconElementRight={ + + } + targetOrigin={{ horizontal: 'right', vertical: 'top' }} + anchorOrigin={{ horizontal: 'right', vertical: 'top' }} + > + + + + + } + /> + ); + + // "http://www.material-ui.com/#/components/auto-complete" + element = + + const dataSource1 = [ + { + text: 'text-value1', + value: ( + + ), + }, + { + text: 'text-value2', + value: ( + + ), + }, + ]; + + const dataSource2 = ['12345', '23456', '34567']; + + const AutoCompleteExampleNoFilter = () => ( +
+
+ +
+ ); + + const AutoCompleteExampleFilters = () => ( +
+ +
+ +
+ ); + + // "http://www.material-ui.com/#/components/avatar" + const AvatarExampleSimple = () => ( + + + } + > + Image Avatar + + } /> + } + > + FontIcon Avatar + + } + color={colors.blue300} + backgroundColor={colors.indigo900} + /> + } + > + FontIcon Avatar with custom colors + + } /> + } + > + SvgIcon Avatar + + } + color={colors.orange200} + backgroundColor={colors.pink400} + /> + } + > + SvgIcon Avatar with custom colors + + A} + > + Letter Avatar + + + A + + } + > + Letter Avatar with custom colors + + + ); + + //image avatar + element = ; + //SvgIcon avatar + element = } />; + //SvgIcon avatar with custom colors + element = } + color={Colors.orange200} + backgroundColor={Colors.pink400} />; + //FontIcon avatar + element = + } />; + //FontIcon avatar with custom colors + element = } + color={Colors.blue300} + backgroundColor={Colors.indigo900} />; + //Letter avatar + element = A; + //Letter avatar with custom colors + element = + + + // "http://www.material-ui.com/#/components/badge" + const BadgeExampleSimple = () => ( +
+ + + + + + + + +
+ ); + const BadgeExampleContent = () => ( +
+ } + > + + + + Company Name + +
+ ); + + // "http://www.material-ui.com/#/components/flat-button" + const FlatButtonExampleSimple = () => ( +
+ + + + +
+ ); + const FlatButtonExampleComplex = () => ( +
+ + + + + } + /> + + } + /> + +
+ ); + + // "http://www.material-ui.com/#/components/raised-button" + const RaisedButtonExampleSimple = () => ( +
+ + + + +
+ ); + const RaisedButtonExampleComplex = () => ( +
+ + + + } + style={styles.button} + /> + } + /> +
+ ); + + // "http://www.material-ui.com/#/components/floating-action-button" + const FloatingActionButtonExampleSimple = () => ( +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ ); + + // "http://www.material-ui.com/#/components/icon-button" + const IconButtonExampleSimple = () => ( +
+ + +
+ ); + const IconButtonExampleComplex = () => ( +
+ + + + + + + + + + home + +
+ ); + const IconButtonExampleTooltip = () => ( +
+ + + + + + +
+ ); + const IconButtonExampleTouch = () => ( +
+ + + + + + + + + + + + + + + + + + +
+ ); + //Method 1: muidocs-icon-github is defined in a style sheet. + element = ; + //Method 2: ActionGrade is a component created using mui.SvgIcon. + element = + + ; + //Method 3: Manually creating a mui.FontIcon component within IconButton + element = + + ; + //Method 4: Using Google material-icons + element = settings_system_daydream; + + + // "http://www.material-ui.com/#/components/card" + const CardExampleWithAvatar = () => ( + + + } + > + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Donec mattis pretium massa.Aliquam erat volutpat.Nulla facilisi. + Donec vulputate interdum sollicitudin.Nunc lacinia auctor quam sed pellentesque. + Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio. + + + + + + + ); + const CardExampleWithoutAvatar = () => ( + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Donec mattis pretium massa.Aliquam erat volutpat.Nulla facilisi. + Donec vulputate interdum sollicitudin.Nunc lacinia auctor quam sed pellentesque. + Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio. + + + + + + + ); + + // "http://www.material-ui.com/#/components/date-picker" + const DatePickerExampleSimple = () => ( +
+ + + +
+ ); + const DatePickerExampleInline = () => ( +
+ + +
+ ); + element = ( +
+ +
+ ); + element = ; + element = ; + element = ; + + // "http://material-ui.com/#/components/dialog" + let standardActions = [ + { text: 'Cancel' }, + { text: 'Submit', onTouchTap: this.touchTapEventHandler, ref: 'submit' } + ]; + + element = + The actions in this window are created from the json that's passed in. + ; + + //Custom Actions + let customActions = [ + , + + ]; + + element = + The actions in this window were passed in as an array of react objects. + ; + + element = +
+ Really long content +
+
; + + // "http://www.material-ui.com/#/components/divider" + const DividerExampleForm = () => ( + + + + + + + + + + + ); + const DividerExampleList = () => ( +
+ + + + + + + + + +
+ ); + const DividerExampleMenu = () => ( + + + + + + + ); + + + // "http://www.material-ui.com/#/components/grid-list" + const tilesData = [ + { + img: 'images/grid-list/00-52-29-429_640.jpg', + title: 'Breakfast', + author: 'jill111', + featured: false, + }]; + const GridListExampleSimple = () => ( +
+ + {tilesData.map(tile => ( + by {tile.author}} + actionIcon={} + > + + + )) } + +
+ ); + const GridListExampleComplex = () => ( +
+ + {tilesData.map(tile => ( + } + actionPosition="left" + titlePosition="top" + titleBackground="linear-gradient(to bottom, rgba(0,0,0,0.7) 0%,rgba(0,0,0,0.3) 70%,rgba(0,0,0,0) 100%)" + cols={tile.featured ? 2 : 1} + rows={tile.featured ? 2 : 1} + > + + + )) } + +
+ ); + + + element = ; + + element = GridTile} + actionPosition="left" + titlePosition="top" + titleBackground="rgba(0, 0, 0, 0.4)" + cols={2} + rows={1} + style={{ color: 'red' }}> +

Children are Required!

+
; + + + // "http://www.material-ui.com/#/components/font-icon" + const FontIconExampleSimple = () => ( +
+ + + + + +
+ ); + + const FontIconExampleIcons = () => ( +
+ home + flight_takeoff + cloud_download + videogame_asset +
+ ); + + + // "http://www.material-ui.com/#/components/svg-icon" + const HomeIcon = (props) => ( + + + + ); + + const SvgIconExampleSimple = () => ( +
+ + + +
+ ); + const SvgIconExampleIcons = () => ( +
+ + + + +
+ ); + element = ; + element = ; + element = home; + + + // "http://www.material-ui.com/#/components/left-nav" + element = ( +
+ + + Menu Item + Menu Item 2 + +
+ ); + element = ( +
+ + this.setState(Object.assign({}, this.state, { open })) } + > + Menu Item + Menu Item 2 + +
+ ); + element = ( +
+ + + + +
+ ); + + + // "http://material-ui.com/#/components/lists" + const ListExampleSimple = () => ( +
+ + } /> + } /> + } /> + } /> + } /> + + + + } /> + } /> + } /> + } /> + +
+ ); + const ListExampleChat = () => ( +
+ + } + rightIcon={} + /> + } + rightIcon={} + /> + } + rightIcon={} + /> + } + rightIcon={} + /> + } + rightIcon={} + /> + + + + } + /> + } + /> + +
+ ); + const ListExampleNested = () => ( +
+ + } /> + } /> + } + initiallyOpen={true} + primaryTogglesNestedList={true} + nestedItems={[ + } + />, + } + disabled={true} + nestedItems={[ + } />, + ]} + />, + ]} + /> + +
+ ); + const iconButtonElement = ( + + + + ); + const rightIconMenu = ( + + Reply + Forward + Delete + + ); + const ListExampleMessages = () => ( +
+ + } + rightIconButton={rightIconMenu} + primaryText="Brendan Lim" + secondaryText={ +

+ Brunch this weekend?
+ I' ll be in your neighborhood doing errands this weekend.Do you want to grab brunch? +

+ } + secondaryTextLines={2} + /> +
+
+ ); + const ListExampleSelectable = () => ( +
+ + } + nestedItems={[ + } + />, + ]} + /> + } + /> + } + /> + } + /> + +
+ ); + + + // "http://www.material-ui.com/#/components/menu" + const MenuExampleSimple = () => ( +
+ + + + + + + + + + + + +
+ ); + const MenuExampleDisable = () => ( +
+ + + + + + + + + + + + + + + + +
+ ); + const MenuExampleIcons = () => ( +
+ + } /> + } /> + } /> + + } /> + } /> + + } /> + + + + } /> + settings}/> + settings + } + /> + ¶} /> + §} /> + +
+ ); + const MenuExampleSecondary = () => ( +
+ + + + + + + + + } /> + } /> + } /> + } /> + } /> + + + + + + + + + + + + + +
+ ); + const MenuExampleNested = () => ( +
+ + + + + } + menuItems={[ + } + menuItems={[ + , + , + , + , + ]} + />, + , + , + , + ]} + /> + + + + + + +
+ ); + + + // "http://www.material-ui.com/#/components/icon-menu" + const IconMenuExampleSimple = () => ( +
+ } + anchorOrigin={{ horizontal: 'left', vertical: 'top' }} + targetOrigin={{ horizontal: 'left', vertical: 'top' }} + > + + + + + + + } + anchorOrigin={{ horizontal: 'left', vertical: 'bottom' }} + targetOrigin={{ horizontal: 'left', vertical: 'bottom' }} + > + + + + + + + } + anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }} + targetOrigin={{ horizontal: 'right', vertical: 'bottom' }} + > + + + + + + + } + anchorOrigin={{ horizontal: 'right', vertical: 'top' }} + targetOrigin={{ horizontal: 'right', vertical: 'top' }} + > + + + + + + +
+ ); + element = ( +
+ } + onChange={this.handleChangeSingle} + value={this.state.valueSingle} + > + + + + + + + } + onChange={this.handleChangeMultiple} + value={this.state.valueMultiple} + multiple={true} + > + + + + + + + +
+ ); + const IconMenuExampleScrollable = () => ( +
} + anchorOrigin={{ horizontal: 'left', vertical: 'top' }} + targetOrigin={{ horizontal: 'left', vertical: 'top' }} + maxHeight={272} + > + + + + ); + + + // "http://www.material-ui.com/#/components/dropdown-menu" + element = + + + + + + ; + const menuItems = []; + element = ( + + {menuItems} + + ); + element = ( + + + + + + + ); + + // "http://material-ui.com/#/components/paper" + const PaperExampleSimple = () => ( +
+ + + + + +
+ ); + const PaperExampleRounded = () => ( +
+ + + + + +
+ ); + const PaperExampleCircle = () => ( +
+ + + + + +
+ ); + + + // "http://www.material-ui.com/#/components/popover" + element = ( +
+ + +
+ +
+
+
+ ); + element = ( +
+ + +
+ +
+
+
+ ); + + + // "http://www.material-ui.com/#/components/circular-progress" + const CircularProgressExampleSimple = () => ( +
+ + + +
+ ); + element = ( +
+ + + +
+ ); + + + // "http://www.material-ui.com/#/components/linear-progress" + const LinearProgressExampleSimple = () => ( + + ); + element = ( + + ); + + + // "http://www.material-ui.com/#/components/refresh-indicator" + const RefreshIndicatorExampleSimple = () => ( +
+ + + + +
+ ); + const RefreshIndicatorExampleLoading = () => ( +
+ + +
+ ); + + + // "http://www.material-ui.com/#/components/select-field" + element = ( +
+ + + + + + + +
+ + + + +
+ ); + element = ( + + {menuItems} + + ); + element = ( + + + + + + + ); + element = ( +
+ + {menuItems} + +
+ + {menuItems} + +
+ ); + const {value} = this.state; + const night = value === 2 || value === 3; + element = ( +
+ + {menuItems} + +
+ + {menuItems} + +
+ ); + + + // "http://www.material-ui.com/#/components/slider" + const SliderExampleSimple = () => ( +
+ + + +
+ ); + const SliderExampleDisabled = () => ( +
+ + + +
+ ); + const SliderExampleStep = () => ( + + ); + + + // "http://www.material-ui.com/#/components/checkbox" + const CheckboxExampleSimple = () => ( +
+ + + + } + unCheckedIcon={} + label="Custom icon" + style={styles.checkbox} + /> + +
+ ); + + + // "http://www.material-ui.com/#/components/radio-button" + const RadioButtonExampleSimple = () => ( +
+ + + + + + + + + +
+ ); + + + // "http://www.material-ui.com/#/components/toggle" + const ToggleExampleSimple = () => ( +
+ + + + +
+ ); + + + // "http://material-ui.com/#/components/snackbar" + element = ( +
+ + +
+ ); + element = ( +
+ +
+ + +
+ ); + + // "http://www.material-ui.com/#/components/table" + element = ( + + + + ID + Name + Status + + + + + 1 + John Smith + Employed + + + 2 + Randal White + Unemployed + + + 3 + Stephanie Sanders + Employed + + + 4 + Steve Brown + Employed + + +
+ ); + const tableData = [ + { + name: 'John Smith', + status: 'Employed', + selected: true, + }, + ]; + element = ( +
+ + + + + Super Header + + + + ID + Name + Status + + + + {tableData.map( (row, index) => ( + + {index} + {row.name} + {row.status} + + ))} + + + + ID + Name + Status + + + + Super Footer + + + +
+ +
+

Table Properties

+ + + + + + +

TableBody Properties

+ + + +
+
+ ); + + // "http://www.material-ui.com/#/components/tabs" + const TabsExampleSimple = () => ( + + +
+

Tab One

+

+ This is an example tab. +

+

+ You can put any sort of HTML or react component in here. It even keeps the component state! +

+ +
+
+ +
+

Tab Two

+

+ This is another example tab. +

+
+
+ +
+

Tab Three

+

+ This is a third example tab. +

+
+
+
+ ); + element = ( + + +
+

Controllable Tab A

+

+ Tabs are also controllable if you want to programmatically pass them their values. + This allows for more functionality in Tabs such as not + having any Tab selected or assigning them different values. +

+
+
+ +
+

Controllable Tab B

+

+ This is another example of a controllable tab. Remember, if you + use controllable Tabs, you need to give all of your tabs values or else + you wont be able to select them. +

+
+
+
+ ); + const TabsExampleIcon = () => ( + + } /> + } /> + favorite} /> + + ); + + // "http://www.material-ui.com/#/components/text-field" + const TextFieldExampleSimple = () => ( +
+
+
+
+
+
+
+
+ +
+ ); + const TextFieldExampleError = () => ( +
+
+
+
+
+
+ ); + const TextFieldExampleCustomize = () => ( +
+
+
+
+ +
+ ); + const TextFieldExampleDisabled = () => ( +
+
+
+
+ +
+ ); + element = ; + + + // "http://www.material-ui.com/#/components/time-picker" + const TimePickerExampleSimple = () => ( +
+ + +
+ ); + element = ( +
+ this.picker12hr = t} + format="ampm" + hintText="12hr Format" + onChange={this.handleChangeTimePicker12} + /> + this.picker24hr = t} + format="24hr" + hintText="24hr Format" + onChange={this.handleChangeTimePicker24} + /> +
+ ); + + // "http://www.material-ui.com/#/components/toolbar" + const ToolbarExamplesSimple = () => ( + + + + + + + + + + + + + + + + + + + } + > + + + + + + + + ); + + return element; + } +} diff --git a/material-ui/legacy/material-ui-0.14.4-tests.tsx.tscparams b/material-ui/legacy/material-ui-0.14.4-tests.tsx.tscparams new file mode 100644 index 0000000000..855355b85f --- /dev/null +++ b/material-ui/legacy/material-ui-0.14.4-tests.tsx.tscparams @@ -0,0 +1 @@ +--experimentalDecorators \ No newline at end of file diff --git a/material-ui/legacy/material-ui-0.14.4.d.ts b/material-ui/legacy/material-ui-0.14.4.d.ts new file mode 100644 index 0000000000..29eeb225bd --- /dev/null +++ b/material-ui/legacy/material-ui-0.14.4.d.ts @@ -0,0 +1,8246 @@ +// Type definitions for material-ui v0.14.4 +// Project: https://github.com/callemall/material-ui +// Definitions by: Nathan Brown , Oliver Herrmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "material-ui" { + export import AppBar = __MaterialUI.AppBar; // require('material-ui/lib/app-bar'); + export import AppCanvas = __MaterialUI.AppCanvas; // require('material-ui/lib/app-canvas'); + export import AutoComplete = __MaterialUI.AutoComplete; // require('material-ui/lib/auto-complete'); + export import Avatar = __MaterialUI.Avatar; // require('material-ui/lib/avatar'); + export import Badge = __MaterialUI.Badge; // require('material-ui/lib/badge'); + export import BeforeAfterWrapper = __MaterialUI.BeforeAfterWrapper; // require('material-ui/lib/before-after-wrapper'); + export import Card = __MaterialUI.Card.Card; // require('material-ui/lib/card/card'); + export import CardActions = __MaterialUI.Card.CardActions; // require('material-ui/lib/card/card-actions'); + export import CardExpandable = __MaterialUI.Card.CardExpandable; // require('material-ui/lib/card/card-expandable'); + export import CardHeader = __MaterialUI.Card.CardHeader; // require('material-ui/lib/card/card-header'); + export import CardMedia = __MaterialUI.Card.CardMedia; // require('material-ui/lib/card/card-media'); + export import CardText = __MaterialUI.Card.CardText; // require('material-ui/lib/card/card-text'); + export import CardTitle = __MaterialUI.Card.CardTitle; // require('material-ui/lib/card/card-title'); + export import Checkbox = __MaterialUI.Checkbox; // require('material-ui/lib/checkbox'); + export import CircularProgress = __MaterialUI.CircularProgress; // require('material-ui/lib/circular-progress'); + export import ClearFix = __MaterialUI.ClearFix; // require('material-ui/lib/clearfix'); + export import DatePicker = __MaterialUI.DatePicker.DatePicker; // require('material-ui/lib/date-picker/date-picker'); + export import DatePickerDialog = __MaterialUI.DatePicker.DatePickerDialog; // require('material-ui/lib/date-picker/date-picker-dialog'); + export import Dialog = __MaterialUI.Dialog // require('material-ui/lib/dialog'); + export import Divider = __MaterialUI.Divider // require('material-ui/lib/divider'); + export import DropDownMenu = __MaterialUI.Menus.DropDownMenu; // require('material-ui/lib/DropDownMenu/DropDownMenu'); + export import EnhancedButton = __MaterialUI.EnhancedButton; // require('material-ui/lib/enhanced-button'); + export import FlatButton = __MaterialUI.FlatButton; // require('material-ui/lib/flat-button'); + export import FloatingActionButton = __MaterialUI.FloatingActionButton; // require('material-ui/lib/floating-action-button'); + export import FontIcon = __MaterialUI.FontIcon; // require('material-ui/lib/font-icon'); + export import GridList = __MaterialUI.GridList.GridList; // require('material-ui/lib/gridlist/grid-list'); + export import GridTile = __MaterialUI.GridList.GridTile; // require('material-ui/lib/gridlist/grid-tile'); + export import IconButton = __MaterialUI.IconButton; // require('material-ui/lib/icon-button'); + export import IconMenu = __MaterialUI.Menus.IconMenu; // require('material-ui/lib/menus/icon-menu'); + export import LeftNav = __MaterialUI.LeftNav; // require('material-ui/lib/left-nav'); + export import LinearProgress = __MaterialUI.LinearProgress; // require('material-ui/lib/linear-progress'); + export import List = __MaterialUI.Lists.List; // require('material-ui/lib/lists/list'); + export import ListDivider = __MaterialUI.Lists.ListDivider; // require('material-ui/lib/lists/list-divider'); + export import ListItem = __MaterialUI.Lists.ListItem; // require('material-ui/lib/lists/list-item'); + export import Menu = __MaterialUI.Menus.Menu; // require('material-ui/lib/menus/menu'); + export import MenuItem = __MaterialUI.Menus.MenuItem; // require('material-ui/lib/menus/menu-item'); + export import Mixins = __MaterialUI.Mixins; // require('material-ui/lib/mixins'); + export import Overlay = __MaterialUI.Overlay; // require('material-ui/lib/overlay'); + export import Paper = __MaterialUI.Paper; // require('material-ui/lib/paper'); + export import Popover = __MaterialUI.Popover.Popover; // require('material-ui/lib/popover/popover'); + export import RadioButton = __MaterialUI.RadioButton; // require('material-ui/lib/radio-button'); + export import RadioButtonGroup = __MaterialUI.RadioButtonGroup; // require('material-ui/lib/radio-button-group'); + export import RaisedButton = __MaterialUI.RaisedButton; // require('material-ui/lib/raised-button'); + export import RefreshIndicator = __MaterialUI.RefreshIndicator; // require('material-ui/lib/refresh-indicator'); + export import Ripples = __MaterialUI.Ripples; // require('material-ui/lib/ripples'); + export import SelectField = __MaterialUI.SelectField; // require('material-ui/lib/select-field'); + export import SelectableContainerEnhance = __MaterialUI.Hoc.SelectableContainerEnhance; // require('material-ui/lib/hoc/selectable-enhance'); + export import Slider = __MaterialUI.Slider; // require('material-ui/lib/slider'); + export import SvgIcon = __MaterialUI.SvgIcon; // require('material-ui/lib/svg-icon'); + export import Styles = __MaterialUI.Styles; // require('material-ui/lib/styles'); + export import Snackbar = __MaterialUI.Snackbar; // require('material-ui/lib/snackbar'); + export import Tab = __MaterialUI.Tabs.Tab; // require('material-ui/lib/tabs/tab'); + export import Tabs = __MaterialUI.Tabs.Tabs; // require('material-ui/lib/tabs/tabs'); + export import Table = __MaterialUI.Table.Table; // require('material-ui/lib/table/table'); + export import TableBody = __MaterialUI.Table.TableBody; // require('material-ui/lib/table/table-body'); + export import TableFooter = __MaterialUI.Table.TableFooter; // require('material-ui/lib/table/table-footer'); + export import TableHeader = __MaterialUI.Table.TableHeader; // require('material-ui/lib/table/table-header'); + export import TableHeaderColumn = __MaterialUI.Table.TableHeaderColumn; // require('material-ui/lib/table/table-header-column'); + export import TableRow = __MaterialUI.Table.TableRow; // require('material-ui/lib/table/table-row'); + export import TableRowColumn = __MaterialUI.Table.TableRowColumn; // require('material-ui/lib/table/table-row-column'); + export import Toggle = __MaterialUI.Toggle; // require('material-ui/lib/toggle'); + export import ThemeWrapper = __MaterialUI.ThemeWrapper; // require('material-ui/lib/theme-wrapper'); + export import TimePicker = __MaterialUI.TimePicker; // require('material-ui/lib/time-picker'); + export import TextField = __MaterialUI.TextField; // require('material-ui/lib/text-field'); + export import Toolbar = __MaterialUI.Toolbar.Toolbar; // require('material-ui/lib/toolbar/toolbar'); + export import ToolbarGroup = __MaterialUI.Toolbar.ToolbarGroup; // require('material-ui/lib/toolbar/toolbar-group'); + export import ToolbarSeparator = __MaterialUI.Toolbar.ToolbarSeparator; // require('material-ui/lib/toolbar/toolbar-separator'); + export import ToolbarTitle = __MaterialUI.Toolbar.ToolbarTitle; // require('material-ui/lib/toolbar/toolbar-title'); + export import Tooltip = __MaterialUI.Tooltip; // require('material-ui/lib/tooltip'); + export import Utils = __MaterialUI.Utils; // require('material-ui/lib/utils'); + + // svg icons + import NavigationMenu = __MaterialUI.SvgIcon; // require('material-ui/lib/svg-icon/navigation/menu'); + import NavigationChevronLeft = __MaterialUI.SvgIcon; // require('material-ui/lib/svg-icon/navigation/chevron-left'); + import NavigationChevronRight = __MaterialUI.SvgIcon; // require('material-ui/lib/svg-icon/navigation/chevron-right'); + + export const Icons: { + NavigationMenu: NavigationMenu, + NavigationChevronLeft: NavigationChevronLeft, + NavigationChevronRight: NavigationChevronRight, + }; + + // export type definitions + export type TouchTapEvent = __MaterialUI.TouchTapEvent; + export type TouchTapEventHandler = __MaterialUI.TouchTapEventHandler; + export type DialogAction = __MaterialUI.DialogAction; +} + +declare namespace __MaterialUI { + export import React = __React; + + // ReactLink is from "react/addons" + interface ReactLink { + value: T; + requestChange(newValue: T): void; + } + + // What's common between React.TouchEvent and React.MouseEvent + interface TouchTapEvent extends React.SyntheticEvent { + altKey: boolean; + ctrlKey: boolean; + getModifierState(key: string): boolean; + metaKey: boolean; + shiftKey: boolean; + } + + // What's common between React.TouchEventHandler and React.MouseEventHandler + interface TouchTapEventHandler extends React.EventHandler { } + + interface ThemeWrapperProps extends React.Props { + theme: Styles.MuiTheme; + } + export class ThemeWrapper extends React.Component { + } + + export namespace Styles { + interface AutoPrefix { + all(styles: React.CSSProperties): React.CSSProperties; + set(style: React.CSSProperties, key: string, value: string | number): void; + single(key: string): string; + singleHyphened(key: string): string; + } + export var AutoPrefix: AutoPrefix; + + interface Spacing { + iconSize?: number; + + desktopGutter?: number; + desktopGutterMore?: number; + desktopGutterLess?: number; + desktopGutterMini?: number; + desktopKeylineIncrement?: number; + desktopDropDownMenuItemHeight?: number; + desktopDropDownMenuFontSize?: number; + desktopLeftNavMenuItemHeight?: number; + desktopSubheaderHeight?: number; + desktopToolbarHeight?: number; + } + export var Spacing: Spacing; + + interface ThemePalette { + primary1Color?: string; + primary2Color?: string; + primary3Color?: string; + accent1Color?: string; + accent2Color?: string; + accent3Color?: string; + textColor?: string; + alternateTextColor?: string; + canvasColor?: string; + borderColor?: string; + disabledColor?: string; + pickerHeaderColor?: string; + clockCircleColor?: string; + shadowColor?: string; + } + interface MuiTheme { + isRtl?: boolean; + userAgent?: any; + zIndex?: zIndex; + baseTheme?: RawTheme; + rawTheme?: RawTheme; + appBar?: { + color?: string, + textColor?: string, + height?: number, + }; + avatar?: { + borderColor?: string, + } + badge?: { + color?: string, + textColor?: string, + primaryColor?: string, + primaryTextColor?: string, + secondaryColor?: string, + secondaryTextColor?: string, + }, + button?: { + height?: number, + minWidth?: number, + iconButtonSize?: number, + }, + cardText?: { + textColor?: string, + }, + checkbox?: { + boxColor?: string, + checkedColor?: string, + requiredColor?: string, + disabledColor?: string, + labelColor?: string, + labelDisabledColor?: string, + }, + datePicker?: { + color?: string, + textColor?: string, + calendarTextColor?: string, + selectColor?: string, + selectTextColor?: string, + }, + dropDownMenu?: { + accentColor?: string, + }, + flatButton?: { + color?: string, + buttonFilterColor?: string, + disabledColor?: string, + textColor?: string, + primaryTextColor?: string, + secondaryTextColor?: string, + }, + floatingActionButton?: { + buttonSize?: number, + miniSize?: number, + color?: string, + iconColor?: string, + secondaryColor?: string, + secondaryIconColor?: string, + disabledColor?: string, + disabledTextColor?: string, + }, + gridTile?: { + textColor?: string, + }, + inkBar?: { + backgroundColor?: string, + }, + leftNav?: { + width?: number, + color?: string, + }, + listItem?: { + nestedLevelDepth?: number, + }, + menu?: { + backgroundColor?: string, + containerBackgroundColor?: string, + }, + menuItem?: { + dataHeight?: number, + height?: number, + hoverColor?: string, + padding?: number, + selectedTextColor?: string, + }, + menuSubheader?: { + padding?: number, + borderColor?: string, + textColor?: string, + }, + paper?: { + backgroundColor?: string, + zDepthShadows?: string[], + }, + radioButton?: { + borderColor?: string, + backgroundColor?: string, + checkedColor?: string, + requiredColor?: string, + disabledColor?: string, + size?: number, + labelColor?: string, + labelDisabledColor?: string, + }, + raisedButton?: { + color?: string, + textColor?: string, + primaryColor?: string, + primaryTextColor?: string, + secondaryColor?: string, + secondaryTextColor?: string, + disabledColor?: string, + disabledTextColor?: string, + }, + refreshIndicator?: { + strokeColor?: string, + loadingStrokeColor?: string, + }; + slider?: { + trackSize?: number, + trackColor?: string, + trackColorSelected?: string, + handleSize?: number, + handleSizeDisabled?: number, + handleSizeActive?: number, + handleColorZero?: string, + handleFillColor?: string, + selectionColor?: string, + rippleColor?: string, + }, + snackbar?: { + textColor?: string, + backgroundColor?: string, + actionColor?: string, + }, + table?: { + backgroundColor?: string; + }; + tableHeader?: { + borderColor?: string; + }; + tableHeaderColumn?: { + textColor?: string; + height?: number; + spacing?: number; + }; + tableFooter?: { + borderColor?: string; + textColor?: string; + }; + tableRow?: { + hoverColor?: string; + stripeColor?: string; + selectedColor?: string; + textColor?: string; + borderColor?: string; + height?: number; + }; + tableRowColumn?: { + height?: number; + spacing?: number; + }; + timePicker?: { + color?: string; + textColor?: string; + accentColor?: string; + clockColor?: string; + clockCircleColor?: string; + headerColor?: string; + selectColor?: string; + selectTextColor?: string; + }; + toggle?: { + thumbOnColor?: string, + thumbOffColor?: string, + thumbDisabledColor?: string, + thumbRequiredColor?: string, + trackOnColor?: string, + trackOffColor?: string, + trackDisabledColor?: string, + labelColor?: string, + labelDisabledColor?: string + trackRequiredColor?: string, + }, + toolbar?: { + backgroundColor?: string, + height?: number, + titleFontSize?: number, + iconColor?: string, + separatorColor?: string, + menuHoverColor?: string, + }; + tabs?: { + backgroundColor?: string, + textColor?: string, + selectedTextColor?: string, + }; + textField?: { + textColor?: string; + hintColor?: string; + floatingLabelColor?: string; + disabledTextColor?: string; + errorColor?: string; + focusColor?: string; + backgroundColor?: string; + borderColor?: string; + }; + } + + interface zIndex { + menu: number; + appBar: number; + leftNavOverlay: number; + leftNav: number; + dialogOverlay: number; + dialog: number; + layer: number; + popover: number; + snackbar: number; + tooltip: number; + } + export var zIndex: zIndex; + + interface RawTheme { + spacing?: Spacing; + fontFamily?: string; + palette?: ThemePalette; + zIndex?: zIndex; + } + var lightBaseTheme: RawTheme; + var darkBaseTheme: RawTheme; + + export function ThemeDecorator(muiTheme: Styles.MuiTheme): (Component: TFunction) => TFunction; + + export function getMuiTheme(baseTheme: RawTheme, muiTheme ?: MuiTheme): MuiTheme; + + interface ThemeManager { + getMuiTheme(baseTheme: RawTheme, muiTheme?: MuiTheme): MuiTheme; + modifyRawThemeSpacing(muiTheme: MuiTheme, newSpacing: Spacing): MuiTheme; + modifyRawThemePalette(muiTheme: MuiTheme, newPaletteKeys: ThemePalette): MuiTheme; + modifyRawThemeFontFamily(muiTheme: MuiTheme, newFontFamily: string): MuiTheme; + } + export var ThemeManager: ThemeManager; + + interface Transitions { + easeOut(duration?: string, property?: string | string[], delay?: string, easeFunction?: string): string; + create(duration?: string, property?: string, delay?: string, easeFunction?: string): string; + easeOutFunction: string; + easeInOutFunction: string; + } + export var Transitions: Transitions; + + interface Typography { + textFullBlack: string; + textDarkBlack: string; + textLightBlack: string; + textMinBlack: string; + textFullWhite: string; + textDarkWhite: string; + textLightWhite: string; + + // font weight + fontWeightLight: number; + fontWeightNormal: number; + fontWeightMedium: number; + + fontStyleButtonFontSize: number; + } + export var Typography: Typography; + + export var DarkRawTheme: RawTheme; + export var LightRawTheme: RawTheme; + } + + interface AppBarProps extends React.Props { + className?: string; + iconClassNameLeft?: string; + iconClassNameRight?: string; + iconElementLeft?: React.ReactElement; + iconElementRight?: React.ReactElement; + iconStyleRight?: string; + onLeftIconButtonTouchTap?: TouchTapEventHandler; + onRightIconButtonTouchTap?: TouchTapEventHandler; + onTitleTouchTap?: TouchTapEventHandler; + showMenuIconButton?: boolean; + style?: React.CSSProperties; + title?: React.ReactNode; + titleStyle?: React.CSSProperties; + zDepth?: number; + } + export class AppBar extends React.Component{ + } + + interface AppCanvasProps extends React.Props { + } + export class AppCanvas extends React.Component { + } + + interface Origin { + horizontal: string; // oneOf(['left', 'middle', 'right']) + vertical: string; // oneOf(['top', 'center', 'bottom']) + } + + type AutoCompleteDataItem = { text: string, value: React.ReactNode } | string; + type AutoCompleteDataSource = { text: string, value: React.ReactNode }[] | string[]; + interface AutoCompleteProps extends React.Props { + anchorOrigin?: Origin; + animated?: boolean; + dataSource?: AutoCompleteDataSource; + disableFocusRipple?: boolean; + errorStyle?: React.CSSProperties; + errorText?: string; + filter?: (searchText: string, key: string, item: AutoCompleteDataItem) => boolean; + floatingLabelText?: string; + fullWidth?: boolean; + hintText?: string; + listStyle?: React.CSSProperties; + menuCloseDelay?: number; + menuProps?: any; + menuStyle?: React.CSSProperties; + onNewRequest?: (chosenRequest: string, index: number) => void; + onUpdateInput?: (searchText: string, dataSource: AutoCompleteDataSource) => void; + open?: boolean; + searchText?: string; + /** @deprecated use noFilter instead */ + showAllItems?: boolean; + style?: React.CSSProperties; + targetOrigin?: Origin; + touchTapCloseDelay?: number; + triggerUpdateOnFocus?: boolean; + /** @deprecated updateWhenFocused has been renamed to triggerUpdateOnFocus */ + updateWhenFocused?: boolean; + } + export class AutoComplete extends React.Component { + static noFilter: () => boolean; + static defaultFilter: (searchText: string, key: string) => boolean; + static caseSensitiveFilter: (searchText: string, key: string) => boolean; + static caseInsensitiveFilter: (searchText: string, key: string) => boolean; + static levenshteinDistanceFilter(distanceLessThan: number): (searchText: string, key: string) => boolean; + static fuzzyFilter: (searchText: string, key: string) => boolean; + static Item: Menus.MenuItem; + static Divider: Divider; + } + + interface AvatarProps extends React.Props { + backgroundColor?: string; + className?: string; + color?: string; + icon?: React.ReactElement; + size?: number; + src?: string; + style?: React.CSSProperties; + } + export class Avatar extends React.Component { + } + + interface BadgeProps extends React.Props { + badgeContent: React.ReactNode; + badgeStyle?: React.CSSProperties; + className?: string; + primary?: boolean; + secondary?: boolean; + style?: React.CSSProperties; + } + export class Badge extends React.Component { + } + + interface BeforeAfterWrapperProps extends React.Props { + afterElementType?: string; + afterStyle?: React.CSSProperties; + beforeElementType?: string; + beforeStyle?: React.CSSProperties; + elementType?: string; + style?: React.CSSProperties; + } + export class BeforeAfterWrapper extends React.Component { + } + + // non generally overridden elements of EnhancedButton + interface SharedEnhancedButtonProps extends React.Props { + centerRipple?: boolean; + disableFocusRipple?: boolean; + disableKeyboardFocus?: boolean; + disableTouchRipple?: boolean; + focusRippleColor?: string; + focusRippleOpacity?: number; + keyboardFocused?: boolean; + linkButton?: boolean; + onBlur?: React.FocusEventHandler; + onFocus?: React.FocusEventHandler; + onKeyboardFocus?: (e: React.FocusEvent, isKeyboardFocused: boolean) => void; + onKeyDown?: React.KeyboardEventHandler; + onKeyUp?: React.KeyboardEventHandler; + onTouchTap?: TouchTapEventHandler; + style?: React.CSSProperties; + tabIndex?: number; + touchRippleColor?: string; + touchRippleOpacity?: number; + type?: string; + } + + interface EnhancedButtonProps extends React.HTMLAttributes, SharedEnhancedButtonProps { + // container element,
- - - - - - - - - Item - - - - - - - - - - - - - - - - - - - - + + + Text + + + + Email address + + + + Pass + + + + File + + [Optional] Block level help text + + + Checkbox + + + Radio + + + Select + + + + + + + Textarea + +
-
- - - - - - - - - -
+
+ + + @ + + + + + + + .00 + + + + + $ + + .00 + + + + + + + + + + + + + + + + + + + + + + + + + Item + + + + + + + + + + + + + + + + + + + + +
-
- - Input with success - - Help text with validation state. - + + + + + + + + + + +
+
- - Input with warning - - - - - Input with error - - - - - Input with success and feedback icon - - - - - - Input with warning and feedback icon - - - - - - Input with error and feedback icon - - - - - - Input with success and custom feedback icon - - - - - - - - Input group with warning - - @ - - - - - -
- - - Input with error - - - - - - - - - - Input group with success - - - - @ +
+ + + Input with success - - - - - + Help text with validation state. + -
- - Input with warning - {' '} - - - - {' '} - - Input group with error - {' '} - - @ - - - - -
+ + Input with warning + + - - Checkbox with success - - - Radio with warning - - - Checkbox with error - + + Input with error + + - {/* This requires React 15's -less spaces to be exactly correct. */} - - - Checkbox - - {' '} - - with - - {' '} - - success - - - + + Input with success and feedback icon + + + + + + Input with warning and feedback icon + + + + + + Input with error and feedback icon + + + + + + Input with success and custom feedback icon + + + + + + + + Input group with warning + + @ + + + + + +
+ + + Input with error + + + + + + + + + + Input group with success + + + + @ + + + + + +
+ +
+ + Input with warning + {' '} + + + + {' '} + + Input group with error + {' '} + + @ + + + + +
+ + + Checkbox with success + + + Radio with warning + + + Checkbox with error + + + {/* This requires React 15's -less spaces to be exactly correct. */} + + + Checkbox + + {' '} + + with + + {' '} + + success + + +
-
- - Control Label - - - Help block message. - + + + Control Label + + + Help block message. + - - 1 - {' '} - 2 - {' '} - 3 - - - 1 - {' '} - 2 - {' '} - 3 - -
+ + 1 + {' '} + 2 + {' '} + 3 + + + 1 + {' '} + 2 + {' '} + 3 + +
-
+
- - Image - - - Top aligned media -

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

-

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
+ + Image + + + Top aligned media +

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

+

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

+
From 404ea846dc219951683c3dad8fcf281b93ee2127 Mon Sep 17 00:00:00 2001 From: Batbold Gansukh Date: Thu, 28 Jul 2016 14:49:47 +0900 Subject: [PATCH 1225/1506] Fix formating --- react-bootstrap/react-bootstrap.d.ts | 160 +++++++-------------------- 1 file changed, 43 insertions(+), 117 deletions(-) diff --git a/react-bootstrap/react-bootstrap.d.ts b/react-bootstrap/react-bootstrap.d.ts index 76e51cb012..8c9d50a304 100644 --- a/react-bootstrap/react-bootstrap.d.ts +++ b/react-bootstrap/react-bootstrap.d.ts @@ -27,12 +27,12 @@ declare namespace ReactBootstrap { interface TransitionCallbacks { - onEnter?: Function; - onEntered?: Function; - onEntering?: Function; - onExit?: Function; - onExited?: Function; - onExiting?: Function; + onEnter?: Function; + onEntered?: Function; + onEntering?: Function; + onExit?: Function; + onExited?: Function; + onExiting?: Function; } @@ -52,14 +52,10 @@ declare namespace ReactBootstrap { // - interface BreadcrumbProps - extends React.Props - { + interface BreadcrumbProps extends React.Props { bsClass?: string; } - interface BreadcrumbClass - extends React.ClassicComponentClass - { + interface BreadcrumbClass extends React.ClassicComponentClass { Item: typeof BreadcrumbItem; } type Breadcrumb = React.ClassicComponent; @@ -67,9 +63,7 @@ declare namespace ReactBootstrap { // - interface BreadcrumbItemProps - extends React.Props - { + interface BreadcrumbItemProps extends React.Props { active?: boolean; id?: string | number; href?: string; @@ -81,9 +75,7 @@ declare namespace ReactBootstrap { //