diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 7ebdcc514f..44f0d8e9a0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -401,6 +401,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](egg.js/egg.js.d.ts) [Egg.js](https://github.com/mikeflynn/egg.js) by [Markus Peloso](https://github.com/ToastHawaii) * [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000) * [:link:](ejs/ejs.d.ts) [ejs.js](http://ejs.co) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped) +* [:link:](elasticsearch/elasticsearch.d.ts) [elasticsearch](https://www.elastic.co) by [Casper Skydt](https://github.com/CasperSkydt/DefinitelyTyped), [Blake Smith](https://github.com/bfsmith/DefinitelyTyped) * [:link:](jquery.elang/jquery.elang.d.ts) [eLang](https://github.com/sumegizoltan/ELang) by [Zoltan Sumegi](https://github.com/sumegizoltan) * [:link:](github-electron/github-electron.d.ts) [Electron](http://electron.atom.io) by [jedmao](https://github.com/jedmao), [rhysd](https://rhysd.github.io), [Milan Burda](https://github.com/miniak) * [:link:](electron-builder/electron-builder.d.ts) [electron-builder](https://github.com/loopline-systems/electron-builder) by [Maxime LUCE](https://github.com/SomaticIT) diff --git a/Headroom/headroom.d.ts b/Headroom/headroom.d.ts index ac505fac18..6e180d869f 100644 --- a/Headroom/headroom.d.ts +++ b/Headroom/headroom.d.ts @@ -8,10 +8,11 @@ interface HeadroomOptions { tolerance?: any; classes?: { initial?: string; - pinned?: string; - unpinned?: string; - top?: string; + notBottom?:string; notTop?: string; + pinned?: string; + top?: string; + unpinned?: string; }; scroller?: Element; onPin?: () => void; diff --git a/acl/acl.d.ts b/acl/acl.d.ts index d222f9ebb6..eaa728cb2c 100644 --- a/acl/acl.d.ts +++ b/acl/acl.d.ts @@ -20,7 +20,7 @@ declare module "acl" { type Callback = (err: Error) => any; type AnyCallback = (err: Error, obj: any) => any; type AllowedCallback = (err: Error, allowed: boolean) => any; - type GetUserId = (req: http.ServerRequest, res: http.ServerResponse) => Value; + type GetUserId = (req: http.IncomingMessage, res: http.ServerResponse) => Value; interface AclStatic { new (backend: Backend, logger: Logger, options: Option): Acl; diff --git a/algoliasearch-client-js/algoliasearch-client-js-tests.ts b/algoliasearch-client-js/algoliasearch-client-js-tests.ts new file mode 100644 index 0000000000..f0ccd447c0 --- /dev/null +++ b/algoliasearch-client-js/algoliasearch-client-js-tests.ts @@ -0,0 +1,136 @@ +/// +/// + +var algoliasearch = require('algoliasearch'); + +var _clientOptions: ClientOptions = { + timeout : 12, + protocol: "", + httpAgent: "" +}; + +var _synonymOption: SynonymOption = { + forwardToSlaves: false, + replaceExistingSynonyms: false +}; + +var _algoliaUserKeyOptions : AlgoliaUserKeyOptions = { + validity: 0, + maxQueriesPerIPPerHour: 0, + indexes: [""], + queryParameters: { attributesToRetrieve: ["algolia"] }, + description: "" +}; + +var _searchSynonymOptions : SearchSynonymOptions = { + query: "", + page: 0, + type: "", + hitsPerPage: 0 +}; + +var _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = { + filters: "", + validUntil: 0, + restrictIndices: "", + userToken: "" +}; + +var _algoliaIndexSettings : AlgoliaIndexSettings = { + attributesToIndex: [""], + attributesforFaceting: [""], + unretrievableAttributes: [""], + attributesToRetrieve: [""], + ranking: [""], + customRanking: [""], + slaves: [""], + maxValuesPerFacet: '', + attributesToHighlight: [""], + attributesToSnippet: [""], + highlightPreTag: '', + highlightPostTag: '', + snippetEllipsisText: '', + restrictHighlightAndSnippetArrays: false, + hitsPerPage: 0, + minWordSizefor1Typo: 0, + minWordSizefor2Typos: 0, + typoTolerance: false, + allowTyposOnNumericTokens: false, + ignorePlurals: false, + disableTypoToleranceOnAttributes: '', + separatorsToIndex: '', + queryType: '', + removeWordsIfNoResults: '', + advancedSyntax: false, + optionalWords: [""], + removeStopWords: [""], + disablePrefixOnAttributes: [""], + disableExactOnAttributes: [""], + exactOnSingleWordQuery: '', + alternativesAsExact: false, + attributeForDistinct: "", + distinct: false, + numericAttributesToIndex: [""], + allowCompressionOfIntegerArray: false, + altCorrections: [{}], + minProximity: 0, + placeholders: '' +}; + +var _algoliaQueryParameters : AlgoliaQueryParameters = { + query: '', + filters: '', + attributesToRetrieve: [""], + restrictSearchableAttributes: [""], + facets: '', + maxValuesPerFacet: '', + attributesToHighlight: [''], + attributesToSnippet: [''], + highlightPreTag: '', + highlightPostTag: '', + snippetEllipsisText: '', + restrictHighlightAndSnippetArrays: false, + hitsPerPage: 0, + page: 0, + offset: 0, + length: 0, + minWordSizefor1Typo: 0, + minWordSizefor2Typos: 0, + typoTolerance: false, + allowTyposOnNumericTokens: false, + ignorePlurals: false, + disableTypoToleranceOnAttributes: '', + aroundLatLng: '', + aroundLatLngViaIP: '', + aroundRadius: '', + aroundPrecision: 0, + minimumAroundRadius: 0, + insideBoundingBox: '', + queryType: '', + insidePolygon: '', + removeWordsIfNoResults: '', + advancedSyntax: false, + optionalWords: [''], + removeStopWords: [''], + disableExactOnAttributes: [''], + exactOnSingleWordQuery: '', + alternativesAsExact: true, + distinct: 0, + getRankingInfo: false, + numericAttributesToIndex: [''], + numericFilters: [''], + tagFilters: '', + facetFilters: '', + analytics: false, + analyticsTags: [''], + synonyms: true, + replaceSynonymsInHighlight: false, + minProximity: 0 +}; + +var index: AlgoliaIndex = algoliasearch('', '').initIndex(''); + +var search = index.search({query: ""}); +index.search({query: ""}, function(err, res){}); + + diff --git a/algoliasearch-client-js/algoliasearch-client-js.d.ts b/algoliasearch-client-js/algoliasearch-client-js.d.ts new file mode 100644 index 0000000000..b0eeb9968b --- /dev/null +++ b/algoliasearch-client-js/algoliasearch-client-js.d.ts @@ -0,0 +1,1571 @@ +// Type definitions for algoliasearch-client-js 3.18.1 +// Project: https://github.com/algolia/algoliasearch-client-js +// Definitions by: Baptiste Coquelle +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface AlgoliaResponse { + /** + * Contains all the hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hits: any[]; + /** + * Current page + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + page: number; + /** + * Number of total hits matching the query + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbHits: number; + /** + * Number of pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + nbPage: number; + /** + * Number of hits per pages + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + hitsPerPage: number; + /** + * Engine processing time (excluding network transfer) + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + processingTimeMS: number; + /** + * Query used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + query: string; + /** + * GET parameters used to perform the search + * https://github.com/algolia/algoliasearch-client-js#response-format + */ + params: string; +} +/* + Interface for the algolia client object + */ +interface AlgoliaClient { + /** + * Initialization of the index + * @param name: index name + * return algolia index object + * https://github.com/algolia/algoliasearch-client-js#init-index---initindex + */ + initIndex(name: string): AlgoliaIndex; + /** + * Query on multiple index + * @param queries index name, query and query parameters + * @param cb callback(err, res) + * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries + */ + search(queries: { indexName: string, query: string, options: AlgoliaQueryParameters }, cb: (err: Error, res: any) => void): void; + /** + * Query on multiple index + * @param queries index name, query and query parameters + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries + */ + search(queries: { indexName: string, query: string, options: AlgoliaQueryParameters }): Promise; + /** + * clear browser cache + * https://github.com/algolia/algoliasearch-client-js#cache + */ + clearCache(): void; + /** + * kill alive connections + * https://github.com/algolia/algoliasearch-client-js#keep-alive + */ + destroy(): void; + /** + * List all your indices along with their associated information (number of entries, disk size, etc.) + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes + */ + listIndexes(cb: (err: Error, res: any) => void): void; + /** + * List all your indices along with their associated information (number of entries, disk size, etc.) + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes + */ + listIndexes(): Promise; + /** + * Delete a specific index + * @param name + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex + */ + deleteIndex(name: string, cb: (err: Error, res: any) => void): void; + /** + * Delete a specific index + * @param name + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex + */ + deleteIndex(name: string): Promise; + /** + * Copy an index from a specific index to a new one + * @param from origin index + * @param to destination index + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex + */ + copyIndex(from: string, to: string, cb: (err: Error, res: any) => void): void; + /** + * Copy an index from a specific index to a new one + * @param from origin index + * @param to destination index + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex + */ + copyIndex(from: string, to: string): Promise; + /** + * Move index to a new one (and will overwrite the original one) + * @param from origin index + * @param to destination index + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#move-index---moveindex + */ + moveIndex(from: string, to: string, cb: (err: Error, res: any) => void): void; + /** + * Move index to a new one (and will overwrite the original one) + * @param from origin index + * @param to destination index + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#move-index---moveindex + */ + moveIndex(from: string, to: string): Promise; + /** + * Generate a public API key + * @param key api key + * @param filters + * https://github.com/algolia/algoliasearch-client-js#generate-key---generatesecuredapikey + */ + generateSecuredApiKey(key: string, filters: AlgoliaSecuredApiOptions): void; + /** + * Perform multiple operations with one API call to reduce latency + * @param action + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch + */ + batch(action: AlgoliaAction, cb: (err: Error, res: any) => void): void; + /** + * Perform multiple operations with one API call to reduce latency + * @param action + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch + */ + batch(action: AlgoliaAction): Promise; + /** + * Lists global API Keys + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + listUserKeys(cb: (err: Error, res: any) => void): void; + /** + * Lists global API Keys + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + listUserKeys(): Promise; + /** + * Add global API Keys + * @param scopes + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[], cb: (err: Error, res: any) => void): void; + /** + * Add global API Keys + * @param scopes + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[]): Promise; + /** + * Add global API Key + * @param scopes + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void; + /** + * Add global API Key + * @param scopes + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[], options: AlgoliaUserKeyOptions): Promise; + /** + * Update global API key + * @param key + * @param scopes + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[], cb: (err: Error, res: any) => void): void; + /** + * Update global API key + * @param key + * @param scopes + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[]): Promise; + /** + * Update global API key + * @param key + * @param scopes + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void; + /** + * Update global API key + * @param key + * @param scopes + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions): Promise; + /** + * Gets the rights of a global key + * @param key + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + getUserKeyACL(key: string, cb: (err: Error, res: any) => void): void; + /** + * Gets the rights of a global key + * @param key + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + getUserKeyACL(key: string): Promise; + /** + * Deletes a global key + * @param key + * @param cb(err,res) + * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey + */ + deleteUserKey(key: string, cb: (err: Error, res: any) => void): void; + /** + * Deletes a global key + * @param key + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey + */ + deleteUserKey(key: string): Promise; + /** + * Get 1000 last events + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs + */ + getLogs(options: LogsOptions, cb: (err: Error, res: any) => void): void; + /** + * Get 1000 last events + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs + */ + getLogs(options: LogsOptions): Promise; +} +/** + * Interface for the index algolia object + */ +interface AlgoliaIndex { + /** + * Gets a specific object + * @param objectID + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject(objectID: string, cb: (err: Error, res: any) => void): void; + /** + * Gets specific attributes from an object + * @param objectID + * @param attributes + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject(objectID: string, attributes: string[], cb: (err: Error, res: any) => void): void; + /** + * Gets a list of objects + * @param objectIDs + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObjects(objectIDs: string[], cb: (err: Error, res: any) => void): void; + /** + * Add a specific object + * @param object without objectID + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects + */ + addObject(object: {}, cb: (err: Error, res: any) => void): void; + /** + * Add a list of objects + * @param object with objectID + * @param objectID + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects + */ + addObject(object: {}, objectID: string, cb: (err: Error, res: any) => void): void; + /** + * Add list of objects + * @param objects + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects + */ + addObjects(objects: [{}], cb: (err: Error, res: any) => void): void; + /** + * Add or replace a specific object + * @param object + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + saveObject(object: {}, cb: (err: Error, res: any) => void): void; + /** + * Add or replace several objects + * @param objects + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + saveObjects(objects: [{}], cb: (err: Error, res: any) => void): void; + /** + * Update parameters of a specific object + * @param object + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + partialUpdateObject(object: {}, cb: (err: Error, res: any) => void): void; + /** + * Update parameters of a list of objects + * @param objects + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + partialUpdateObjects(objects: [{}], cb: (err: Error, res: any) => void): void; + /** + * Delete a specific object + * @param objectID + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects + */ + deleteObject(objectID: string, cb: (err: Error, res: any) => void): void; + /** + * Delete a list of objects + * @param objectIDs + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects + */ + deleteObjects(objectIDs: string[], cb: (err: Error, res: any) => void): void; + /** + * Delete objects that matches the query + * @param query + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery + */ + deleteByQuery(query: string, cb: (err: Error, res: any) => void): void; + /** + * Delete objects that matches the query + * @param query + * @param params of the object + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery + */ + deleteByQuery(query: string, params: {}, cb: (err: Error, res: any) => void): void; + /** + * Wait for an indexing task to be compete + * @param taskID + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask + */ + waitTask(taskID: number, cb: (err: Error, res: any) => void): void; + /** + * Get an index settings + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings + */ + getSettings(cb: (err: Error, res: any) => void): void; + /** + * Set an index settings + * @param settings + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings + */ + setSettings(settings: AlgoliaIndexSettings, cb: (err: Error, res: any) => void): void; + /** + * Clear cache of an index + * https://github.com/algolia/algoliasearch-client-js#cache + */ + clearCache(): void; + /** + * Clear an index content + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex + */ + clearIndex(cb: (err: Error, res: any) => void): void; + /** + * Save a synonym object + * @param synonym + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym + */ + saveSynonym(synonym: AlgoliaSynonym, option: SynonymOption, cb: (err: Error, res: any) => void): void; + /** + * Save a synonym object + * @param synonyms + * @param options + * @param cb(err, res) + */ + batchSynonyms(synonyms: AlgoliaSynonym[], options: SynonymOption, cb: (err: Error, res: any) => void): void; + /** + * Delete a specific synonym + * @param identifier + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms + */ + deleteSynonym(identifier: string, options: SynonymOption, cb: (err: Error, res: any) => void): void; + /** + * Clear all synonyms of an index + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms + */ + clearSynonyms(options: SynonymOption, cb: (err: Error, res: any) => void): void; + /** + * Get a specific synonym + * @param identifier + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym + */ + getSynonym(identifier: string, cb: (err: Error, res: any) => void): void; + /** + * Search a synonyms + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms + */ + searchSynonyms(options: SearchSynonymOptions, cb: (err: Error, res: any) => void): void; + /** + * List index user keys + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys + */ + listUserKeys(cb: (err: Error, res: any) => void): void; + /** + * Add key for this index + * @param scopes + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[], cb: (err: Error, res: any) => void): void; + /** + * Add key for this index + * @param scopes + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void; + /** + * Update a key for this index + * @param key + * @param scopes + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[], cb: (err: Error, res: any) => void): void; + /** + * Update a key for this index + * @param key + * @param scopes + * @param options + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void; + /** + * Gets the rights of an index specific key + * @param key + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getuserkeyacl + */ + getUserKeyACL(key: string, cb: (err: Error, res: any) => void): void; + /** + * Deletes an index specific key + * @param key + * @param cb(err, res) + * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey + */ + deleteUserKey(key: string, cb: (err: Error, res: any) => void): void; + /** + * Gets a specific object + * @param objectID + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject(objectID: string): Promise ; + /** + * Gets specific attributes from an object + * @param objectID + * @param attributes + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObject(objectID: string, attributes: string[]): Promise ; + /** + * Gets a list of objects + * @param objectIDs + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects + */ + getObjects(objectIDs: string[]): Promise ; + /** + * Add a specific object + * @param object without objectID + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects + */ + addObject(object: {}): Promise ; + /** + * Add a list of objects + * @param object with objectID + * @param objectID + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects + */ + addObject(object: {}, objectID: string): Promise ; + /** + * Add list of objects + * @param objects + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects + */ + addObjects(objects: [{}]): Promise ; + /** + * Add or replace a specific object + * @param object + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + saveObject(object: {}): Promise ; + /** + * Add or replace several objects + * @param objects + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + saveObjects(objects: [{}]): Promise ; + /** + * Update parameters of a specific object + * @param object + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + partialUpdateObject(object: {}): Promise ; + /** + * Update parameters of a list of objects + * @param objects + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects + */ + partialUpdateObjects(objects: [{}]): Promise ; + /** + * Delete a specific object + * @param objectID + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects + */ + deleteObject(objectID: string): Promise ; + /** + * Delete a list of objects + * @param objectIDs + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects + */ + deleteObjects(objectIDs: string[]): Promise ; + /** + * Delete objects that matches the query + * @param query + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery + */ + deleteByQuery(query: string): Promise ; + /** + * Delete objects that matches the query + * @param query + * @param params of the object + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery + */ + deleteByQuery(query: string, params: {}): Promise ; + /** + * Wait for an indexing task to be compete + * @param taskID + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask + */ + waitTask(taskID: number): Promise ; + /** + * Get an index settings + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings + */ + getSettings(): Promise ; + /** + * Set an index settings + * @param settings + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings + */ + setSettings(settings: AlgoliaIndexSettings): Promise ; + /** + * Search in an index + * @param params query parameter + * return {Promise} + * @param err() error callback + * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search + */ + search(params: AlgoliaQueryParameters): Promise ; + /** + * Search in an index + * @param params query parameter + * @param cb(err, res) + * @param err() error callback + * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search + */ + search(params: AlgoliaQueryParameters, cb: (err: Error, res: any) => void): void; + /** + * Browse an index + * @param query + * @param cb(err, content) + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string, cb: (err: Error, res: any) => void): void; + /** + * Browse an index + * @param query + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string): Promise; + /** + * Browse an index from a cursor + * @param cursor + * @param cb(err, content) + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseFrom(cursor: string, cb: (err: Error, res: any) => void): void; + /** + * Browse an index from a cursor + * @param cursor + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseFrom(cursor: string): Promise; + /** + * Browse an entire index + * return Promise + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browseAll(): Promise; + /** + * Clear an index content + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex + */ + clearIndex(): Promise ; + /** + * Save a synonym object + * @param synonym + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym + */ + saveSynonym(synonym: AlgoliaSynonym, option: SynonymOption): Promise ; + /** + * Save a synonym object + * @param synonyms + * @param options + * return {Promise} + */ + batchSynonyms(synonyms: AlgoliaSynonym[], options: SynonymOption): Promise ; + /** + * Delete a specific synonym + * @param identifier + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms + */ + deleteSynonym(identifier: string, options: SynonymOption): Promise ; + /** + * Clear all synonyms of an index + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms + */ + clearSynonyms(options: SynonymOption): Promise ; + /** + * Get a specific synonym + * @param identifier + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym + */ + getSynonym(identifier: string): Promise ; + /** + * Search a synonyms + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms + */ + searchSynonyms(options: SearchSynonymOptions): Promise ; + /** + * List index user keys + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys + */ + listUserKeys(): Promise ; + /** + * Add key for this index + * @param scopes + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[]): Promise ; + /** + * Add key for this index + * @param scopes + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + addUserKey(scopes: string[], options: AlgoliaUserKeyOptions): Promise ; + /** + * Update a key for this index + * @param key + * @param scopes + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[]): Promise ; + /** + * Update a key for this index + * @param key + * @param scopes + * @param options + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey + */ + updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions): Promise ; + /** + * Gets the rights of an index specific key + * @param key + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getuserkeyacl + */ + getUserKeyACL(key: string): Promise ; + /** + * Deletes an index specific key + * @param key + * return {Promise} + * https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey + */ + deleteUserKey(key: string): Promise ; +} +/* + Interface describing available options when initializing a client + */ +interface ClientOptions { + /** + * Timeout for requests to our servers, in milliseconds + * default: 15s (node), 2s (browser) + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + timeout?: number; + /** + * Protocol to use when communicating with algolia + * default: current protocol(browser), https(node) + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + protocol?: string; + /** + * (node only) httpAgent instance to use when communicating with Algolia servers. + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + httpAgent?: any; + /** + * read: array of read hosts to use to call Algolia servers, computed automatically + * write: array of read hosts to use to call Algolia servers, computed automatically + * https://github.com/algolia/algoliasearch-client-js#client-options + */ + hosts?: { read?: string[], write?: string[] }; +} +/* + Interface describing options available for gettings the logs + */ +interface LogsOptions { + /** + * Specify the first entry to retrieve (0-based, 0 is the most recent log entry). + * default: 0 + * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs + */ + offset?: number; + /** + * Specify the maximum number of entries to retrieve starting at the offset. + * default: 10 + * maximum: 1000 + * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs + */ + length?: number; + /** + * @deprecated + * Retrieve only logs with an HTTP code different than 200 or 201 + * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs + */ + onlyErrors?: boolean; + /** + * Specify the type of logs to retrieve + * 'query' Retrieve only the queries + * 'build' Retrieve only the build operations + * 'error' Retrieve only the errors (same as onlyErrors parameters) + * https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs + */ + type?: string; +} +/** + * Describe the action object used for batch operation + */ +interface AlgoliaAction { + /** + * Type of the batch action + * values: addObject, updateObject, partialUpdateObject, partialUpdateObjectNoCreate, deleteObject + * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch + */ + action: string; + /** + * Name of the index where the bact will be performed + * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch + */ + indexName: string; + /** + * Object + * https://github.com/algolia/algoliasearch-client-js#custom-batch---batch + */ + body: {}; +} +/** + * Describes the option used when creating user key + */ +interface AlgoliaUserKeyOptions { + /** + * Add a validity period. The key will be valid for a specific period of time (in seconds). + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + validity?: number; + /** + * Specify the maximum number of API calls allowed from an IP address per hour + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + maxQueriesPerIPPerHour?: number; + /** + * Specify the maximum number of hits this API key can retrieve in one call + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + maxHitsPerQuery?: boolean; + /** + * Specify the list of targeted indices + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + indexes?: string[]; + /** + * Specify the list of referers + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + referers?: string[]; + /** + * Specify the list of query parameters + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + queryParameters?: AlgoliaQueryParameters; + /** + * Specify a description to describe where the key is used. + * https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey + */ + description?: string; +} +/** + * Describes option used when making operation on synonyms + */ +interface SynonymOption { + /** + * You can forward all settings updates to the slaves of an index + * https://github.com/algolia/algoliasearch-client-js#slave-settings + */ + forwardToSlaves?: boolean; + /** + * Replace all existing synonyms on the index with the content of the batch + * https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms + */ + replaceExistingSynonyms?: boolean; +} +/** + * Describes options used when searching for synonyms + */ +interface SearchSynonymOptions { + /** + * The actual search query to find synonyms + * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms + */ + query?: string; + /** + * The page to fetch when browsing through several pages of results + * default: 100 + * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms + */ + page?: number; + /** + * Restrict the search to a specific type of synonym + * Use an empty string to search all types (default behavior) + * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms + */ + type?: string; + /** + * Number of hits per page + * default: 100 + * https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms + */ + hitsPerPage?: number +} +interface AlgoliaBrowseResponse { + cursor?: string, + hits: any[], + params: string, + query: string, + processingTimeMS: number +} +/** + * Describes a synonym object + */ +interface AlgoliaSynonym { + /** + * ObjectID of the synonym + * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym + */ + objectID: string; + /** + * Type of synonym + * values: synonym,oneWaySynonym + * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym + */ + type: string; + /** + * Values used for the synonym + * https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym + */ + synonyms: string[]; +} +/** + * Describes the options used when generating new api keys + */ +interface AlgoliaSecuredApiOptions { + /** + * Filter the query with numeric, facet or/and tag filters + * default: "" + * https://github.com/algolia/algoliasearch-client-js#filters-1 + */ + filters?: string; + /** + * Defines the expiration date of the API key + * https://github.com/algolia/algoliasearch-client-js#valid-until + */ + validUntil?: number; + /** + * Restricts the key to a list of index names allowed for the secured API key + * https://github.com/algolia/algoliasearch-client-js#index-restriction + */ + restrictIndices?: string; + /** + * Allows you to restrict a single user to performing a maximum of N API calls per hour + * https://github.com/algolia/algoliasearch-client-js#user-rate-limiting + */ + userToken?: string; +} + +/** + * Describes the settings available for configure your index + */ +interface AlgoliaIndexSettings { + /** + * The list of attributes you want index + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoindex + */ + attributesToIndex?: string[]; + /** + * The list of attributes you want to use for faceting + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributesforfaceting + */ + attributesforFaceting?: string[]; + /** + * The list of attributes that cannot be retrieved at query time + * default: null + * https://github.com/algolia/algoliasearch-client-js#unretrievableattributes + */ + unretrievableAttributes?: string[]; + /** + * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve + */ + attributesToRetrieve?: string[]; + /** + * Controls the way results are sorted + * default: ['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'] + * https://github.com/algolia/algoliasearch-client-js#ranking + */ + ranking?: string[]; + /** + * Lets you specify part of the ranking + * default: [] + * https://github.com/algolia/algoliasearch-client-js#customranking + */ + customRanking?: string[]; + /** + * The list of indices on which you want to replicate all write operations + * default: [] + * https://github.com/algolia/algoliasearch-client-js#slaves + */ + slaves?: string[]; + /** + * Limit the number of facet values returned for each facet + * default: "" + * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet + */ + maxValuesPerFacet?: string; + /** + * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestohighlight + */ + attributesToHighlight?: string[]; + /** + * Default list of attributes to snippet alongside the number of words to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestosnippet + */ + attributesToSnippet?: string[]; + /** + * Specify the string that is inserted before the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightpretag + */ + highlightPreTag?: string; + /** + * Specify the string that is inserted after the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + * default: … + * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext + */ + snippetEllipsisText?: string; + /** + * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets + * default: false + * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays + */ + restrictHighlightAndSnippetArrays?: boolean; + /** + * Pagination parameter used to select the number of hits per page + * default: 20 + * https://github.com/algolia/algoliasearch-client-js#hitsperpage + */ + hitsPerPage?: number; + /** + * The minimum number of characters needed to accept one typo + * default: 4 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo + */ + minWordSizefor1Typo?: number; + /** + * The minimum number of characters needed to accept two typos. + * default: 8 + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + minWordSizefor2Typos?: number; + /** + * This option allows you to control the number of typos allowed in the result set + * default: true + * 'true' The typo tolerance is enabled and all matching hits are retrieved (default behavior). + * 'false' The typo tolerance is disabled. All results with typos will be hidden. + * 'min' Only keep results with the minimum number of typos. For example, if one result matches without typos, then all results with typos will be hidden. + * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. + * https://github.com/algolia/algoliasearch-client-js#typotolerance + */ + typoTolerance?: any; + /** + * If set to false, disables typo tolerance on numeric tokens (numbers). + * default: true + * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens + */ + allowTyposOnNumericTokens?: boolean; + /** + * If set to true, plural won't be considered as a typo + * default: false + * https://github.com/algolia/algoliasearch-client-js#ignoreplurals + */ + ignorePlurals?: boolean; + /** + * List of attributes on which you want to disable typo tolerance + * default: "" + * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes + */ + disableTypoToleranceOnAttributes?: string; + /** + * Specify the separators (punctuation characters) to index. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#separatorstoindex + */ + separatorsToIndex?: string; + /** + * Selects how the query words are interpreted + * default: 'prefixLast' + * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. + * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). + * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. + * https://github.com/algolia/algoliasearch-client-js#querytype + */ + queryType?: any; + /** + * This option is used to select a strategy in order to avoid having an empty result page + * default: 'none' + * 'lastWords' When a query does not return any results, the last word will be added as optional + * 'firstWords' When a query does not return any results, the first word will be added as optional + * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional + * 'none' No specific processing is done when a query does not return any results + * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults + */ + removeWordsIfNoResults?: string; + /** + * Enables the advanced query syntax + * default: false + * https://github.com/algolia/algoliasearch-client-js#advancedsyntax + */ + advancedSyntax?: boolean; + /** + * A string that contains the comma separated list of words that should be considered as optional when found in the query + * default: [] + * https://github.com/algolia/algoliasearch-client-js#optionalwords + */ + optionalWords?: string[]; + /** + * Remove stop words from the query before executing it + * default: false + * true|false: enable or disable stop words for all 41 supported languages; or + * a list of language ISO codes (as a comma-separated string) for which stop words should be enable + * https://github.com/algolia/algoliasearch-client-js#removestopwords + */ + removeStopWords?: string[]; + /** + * List of attributes on which you want to disable prefix matching + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableprefixonattributes + */ + disablePrefixOnAttributes?: string[]; + /** + * List of attributes on which you want to disable the computation of exact criteria + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes + */ + disableExactOnAttributes?: string[]; + /** + * This parameter control how the exact ranking criterion is computed when the query contains one word + * default: attribute + * 'none': no exact on single word query + * 'word': exact set to 1 if the query word is found in the record + * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query + * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery + */ + exactOnSingleWordQuery?: string; + /** + * Specify the list of approximation that should be considered as an exact match in the ranking formula + * default: ['ignorePlurals', 'singleWordSynonym'] + * 'ignorePlurals': alternative words added by the ignorePlurals feature + * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") + * 'multiWordsSynonym': multiple-words synonym + * https://github.com/algolia/algoliasearch-client-js#alternativesasexact + */ + alternativesAsExact?: any; + /** + * The name of the attribute used for the Distinct feature + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributefordistinct + */ + attributeForDistinct?: string; + /** + * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. + * https://github.com/algolia/algoliasearch-client-js#distinct + */ + distinct?: any; + /** + * All numerical attributes are automatically indexed as numerical filters + * default '' + * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex + */ + numericAttributesToIndex?: string[]; + /** + * Allows compression of big integer arrays. + * default: false + * https://github.com/algolia/algoliasearch-client-js#allowcompressionofintegerarray + */ + allowCompressionOfIntegerArray?: boolean; + /** + * Specify alternative corrections that you want to consider. + * default: [] + * https://github.com/algolia/algoliasearch-client-js#altcorrections + */ + altCorrections?: [{}]; + /** + * Configure the precision of the proximity ranking criterion + * default: 1 + * https://github.com/algolia/algoliasearch-client-js#minproximity + */ + minProximity?: number; + /** + * This is an advanced use-case to define a token substitutable by a list of words without having the original token searchable + * default: '' + * https://github.com/algolia/algoliasearch-client-js#placeholders + */ + placeholders?: any; +} + +interface AlgoliaQueryParameters { + /** + * Query string used to perform the search + * default: '' + * https://github.com/algolia/algoliasearch-client-js#query + */ + query?: string; + /** + * Filter the query with numeric, facet or/and tag filters + * default: "" + * https://github.com/algolia/algoliasearch-client-js#filters + */ + filters?: string; + /** + * A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer. + * default: * + * https://github.com/algolia/algoliasearch-client-js#attributestoretrieve + */ + attributesToRetrieve?: string[]; + /** + * List of attributes you want to use for textual search + * default: attributeToIndex + * https://github.com/algolia/algoliasearch-client-js#restrictsearchableattributes + */ + restrictSearchableAttributes?: string[]; + /** + * You can use facets to retrieve only a part of your attributes declared in attributesForFaceting attributes + * default: "" + * https://github.com/algolia/algoliasearch-client-js#facets + */ + facets?: string; + /** + * Limit the number of facet values returned for each facet. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet + */ + maxValuesPerFacet?: string; + /** + * Default list of attributes to highlight. If set to null, all indexed attributes are highlighted. + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestohighlight + */ + attributesToHighlight?: string[]; + /** + * Default list of attributes to snippet alongside the number of words to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#attributestosnippet + */ + attributesToSnippet?: string[]; + /** + * Specify the string that is inserted before the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightpretag + */ + highlightPreTag?: string; + /** + * Specify the string that is inserted after the highlighted parts in the query result + * default: + * https://github.com/algolia/algoliasearch-client-js#highlightposttag + */ + highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + * default: … + * https://github.com/algolia/algoliasearch-client-js#snippetellipsistext + */ + snippetEllipsisText?: string; + /** + * If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets + * default: false + * https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays + */ + restrictHighlightAndSnippetArrays?: boolean; + /** + * Pagination parameter used to select the number of hits per page + * default: 20 + * https://github.com/algolia/algoliasearch-client-js#hitsperpage + */ + hitsPerPage?: number; + /** + * Pagination parameter used to select the page to retrieve. + * default: 0 + * https://github.com/algolia/algoliasearch-client-js#page + */ + page?: number; + /** + * Offset of the first hit to return + * default: null + * https://github.com/algolia/algoliasearch-client-js#offset + */ + offset?: number; + /** + * Number of hits to return. + * default: null + * https://github.com/algolia/algoliasearch-client-js#length + */ + length?: number; + /** + * The minimum number of characters needed to accept one typo. + * default: 4 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo + */ + minWordSizefor1Typo?: number; + /** + * The minimum number of characters needed to accept two typo. + * fault: 8 + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos + */ + minWordSizefor2Typos?: number; + /** + * This option allows you to control the number of typos allowed in the result set: + * default: true + * 'true' The typo tolerance is enabled and all matching hits are retrieved + * 'false' The typo tolerance is disabled. All results with typos will be hidden. + * 'min' Only keep results with the minimum number of typos + * 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos. + * https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos + */ + typoTolerance?: boolean; + /** + * If set to false, disables typo tolerance on numeric tokens (numbers). + * default: + * https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens + */ + allowTyposOnNumericTokens?: boolean; + /** + * If set to true, plural won't be considered as a typo + * default: false + * https://github.com/algolia/algoliasearch-client-js#ignoreplurals + */ + ignorePlurals?: boolean; + /** + * List of attributes on which you want to disable typo tolerance + * default: "" + * https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes + */ + disableTypoToleranceOnAttributes?: string; + /** + * Search for entries around a given location + * default: "" + * https://github.com/algolia/algoliasearch-client-js#aroundlatlng + */ + aroundLatLng?: string; + /** + * Search for entries around a given latitude/longitude automatically computed from user IP address. + * default: "" + * https://github.com/algolia/algoliasearch-client-js#aroundlatlngviaip + */ + aroundLatLngViaIP?: string; + /** + * Control the radius associated with a geo search. Defined in meters. + * default: null + * You can specify aroundRadius=all if you want to compute the geo distance without filtering in a geo area + * https://github.com/algolia/algoliasearch-client-js#aroundradius + */ + aroundRadius?: any; + /** + * Control the precision of a geo search + * default: null + * https://github.com/algolia/algoliasearch-client-js#aroundprecision + */ + aroundPrecision?: number; + /** + * Define the minimum radius used for a geo search when aroundRadius is not set. + * default: null + * https://github.com/algolia/algoliasearch-client-js#minimumaroundradius + */ + minimumAroundRadius?: number; + /** + * Search entries inside a given area defined by the two extreme points of a rectangle + * default: null + * https://github.com/algolia/algoliasearch-client-js#insideboundingbox + */ + insideBoundingBox?: string; + /** + * Selects how the query words are interpreted + * default: 'prefixLast' + * 'prefixAll' All query words are interpreted as prefixes. This option is not recommended. + * 'prefixLast' Only the last word is interpreted as a prefix (default behavior). + * 'prefixNone' No query word is interpreted as a prefix. This option is not recommended. + * https://github.com/algolia/algoliasearch-client-js#querytype + */ + queryType?: any; + /** + * Search entries inside a given area defined by a set of points + * defauly: '' + * https://github.com/algolia/algoliasearch-client-js#insidepolygon + */ + insidePolygon?: string; + /** + * This option is used to select a strategy in order to avoid having an empty result page + * default: 'none' + * 'lastWords' When a query does not return any results, the last word will be added as optional + * 'firstWords' When a query does not return any results, the first word will be added as optional + * 'allOptional' When a query does not return any results, a second trial will be made with all words as optional + * 'none' No specific processing is done when a query does not return any results + * https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults + */ + removeWordsIfNoResults?: string; + /** + * Enables the advanced query syntax + * default: false + * https://github.com/algolia/algoliasearch-client-js#advancedsyntax + */ + advancedSyntax?: boolean; + /** + * A string that contains the comma separated list of words that should be considered as optional when found in the query + * default: [] + * https://github.com/algolia/algoliasearch-client-js#optionalwords + */ + optionalWords?: string[]; + /** + * Remove stop words from the query before executing it + * default: false + * true|false: enable or disable stop words for all 41 supported languages; or + * a list of language ISO codes (as a comma-separated string) for which stop words should be enable + * https://github.com/algolia/algoliasearch-client-js#removestopwords + */ + removeStopWords?: string[]; + /** + * List of attributes on which you want to disable the computation of exact criteria + * default: [] + * https://github.com/algolia/algoliasearch-client-js#disableexactonattributes + */ + disableExactOnAttributes?: string[]; + /** + * This parameter control how the exact ranking criterion is computed when the query contains one word + * default: attribute + * 'none': no exact on single word query + * 'word': exact set to 1 if the query word is found in the record + * 'attribute': exact set to 1 if there is an attribute containing a string equals to the query + * https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery + */ + exactOnSingleWordQuery?: string; + /** + * Specify the list of approximation that should be considered as an exact match in the ranking formula + * default: ['ignorePlurals', 'singleWordSynonym'] + * 'ignorePlurals': alternative words added by the ignorePlurals feature + * 'singleWordSynonym': single-word synonym (For example "NY" = "NYC") + * 'multiWordsSynonym': multiple-words synonym + * https://github.com/algolia/algoliasearch-client-js#alternativesasexact + */ + alternativesAsExact?: any; + /** + * If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set. + * https://github.com/algolia/algoliasearch-client-js#distinct + */ + distinct?: any; + /** + * If set to true, the result hits will contain ranking information in the _rankingInfo attribute. + * default: false + * https://github.com/algolia/algoliasearch-client-js#getrankinginfo + */ + getRankingInfo?: boolean; + /** + * All numerical attributes are automatically indexed as numerical filters + * default: '' + * https://github.com/algolia/algoliasearch-client-js#numericattributestoindex + */ + numericAttributesToIndex?: string[]; + /** + * @deprecated please use filters instead + * A string that contains the comma separated list of numeric filters you want to apply. + * https://github.com/algolia/algoliasearch-client-js#numericfilters-deprecated + */ + numericFilters?: string[]; + /** + * @deprecated + * Filter the query by a set of tags. + * https://github.com/algolia/algoliasearch-client-js#tagfilters-deprecated + */ + tagFilters?: string; + /** + * @deprecated + * Filter the query by a set of facets. + * https://github.com/algolia/algoliasearch-client-js#facetfilters-deprecated + */ + facetFilters?: string; + /** + * If set to false, this query will not be taken into account in the analytics feature. + * default true + * https://github.com/algolia/algoliasearch-client-js#analytics + */ + analytics?: boolean; + /** + * If set, tag your query with the specified identifiers + * default: null + * https://github.com/algolia/algoliasearch-client-js#analyticstags + */ + analyticsTags?: string[]; + /** + * If set to false, the search will not use the synonyms defined for the targeted index. + * default: true + * https://github.com/algolia/algoliasearch-client-js#synonyms + */ + synonyms?: boolean; + /** + * If set to false, words matched via synonym expansion will not be replaced by the matched synonym in the highlighted result. + * default: true + * https://github.com/algolia/algoliasearch-client-js#replacesynonymsinhighlight + */ + replaceSynonymsInHighlight?: boolean; + /** + * Configure the precision of the proximity ranking criterion + * default: 1 + * https://github.com/algolia/algoliasearch-client-js#minproximity + */ + minProximity?: number; +} + +declare module "algoliasearch" { + function algoliasearch(applicationId: string, apiKey: string, options?: ClientOptions) : AlgoliaClient; + export = algoliasearch; +} diff --git a/amcharts/AmCharts.d.ts b/amcharts/AmCharts.d.ts index 27998956b8..4f5dbe90f7 100644 --- a/amcharts/AmCharts.d.ts +++ b/amcharts/AmCharts.d.ts @@ -27,6 +27,9 @@ declare namespace AmCharts { /** Clears all the charts on page, removes listeners and intervals. */ function clear(); + /** Handle ready event */ + function ready(Function): void; + /** Create chart by params. */ function makeChart(selector: string, params: any, delay?: number): AmChart; @@ -961,6 +964,10 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val @Default 150 */ hideBalloonTime: number; + /** Allows changing language easily. + * Note, you should include the language.js file from amcharts/lang or ammap/lang folder and then use variable name used in this file, like chart.language = "de"; + * Note, for maps this works differently - you use language only for country names, as there are no other strings in the maps application. */ + language: string; /** Legend of a chart. */ legend: AmLegend; /** Reference to the div of the legend. */ @@ -989,6 +996,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val prefixesOfBigNumbers: any[]; /** Prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. [{number:1e-24, prefix:"y"},{number:1e-21, prefix:"z"},{number:1e-18, prefix:"a"},{number:1e-15, prefix:"f"},{number:1e-12, prefix:"p"},{number:1e-9, prefix:"n"},{number:1e-6, prefix:"μ"},{number:1e-3, prefix:"m"}] */ prefixesOfSmallNumbers: any[]; + /** A config object for Responsive plugin. */ + responsive: any; /** Theme of a chart. Config files of themes can be found in amcharts/themes/ folder. More info about using themes. */ theme: string; /** Thousands separator. diff --git a/amplitude-js/v2/amplitude-js-tests.ts b/amplitude-js/v2/amplitude-js-tests.ts new file mode 100644 index 0000000000..3e69d7c867 --- /dev/null +++ b/amplitude-js/v2/amplitude-js-tests.ts @@ -0,0 +1,87 @@ +// Tests for Amplitude SDK TypeScript definitions + +/// + +module Amplitude.Tests { + function all() { + amplitude.init('YOUR_API_KEY_HERE', null, { + // optional configuration options + saveEvents: true, + includeUtm: true, + includeReferrer: true, + batchEvents: true, + eventUploadThreshold: 50 + }); + amplitude.init('YOUR_API_KEY_HERE', 'USER_ID_HERE', null, () => {}); + + amplitude.logEvent('EVENT_IDENTIFIER_HERE'); + amplitude.setUserId('USER_ID_HERE'); + amplitude.init('YOUR_API_KEY_HERE', 'USER_ID_HERE'); + amplitude.setUserId(null); // not string 'null' + amplitude.setVersionName('VERSION_NAME_HERE'); + + amplitude.regenerateDeviceId(); + amplitude.setDeviceId('CUSTOM_DEVICE_ID'); + + amplitude.logEvent('EVENT_IDENTIFIER_HERE', { + 'color': 'blue', + 'age': 20, + 'key': 'value' + }); + amplitude.logEvent("EVENT_IDENTIFIER_HERE", null, (httpCode, response) => { }); + + let identify = new amplitude.Identify().set('gender', 'female').set('age', 20); + amplitude.identify(identify); + + identify = new amplitude.Identify().setOnce('sign_up_date', '08/24/2015'); + amplitude.identify(identify); + + identify = new amplitude.Identify().setOnce('sign_up_date', '09/14/2015'); + amplitude.identify(identify); + + identify = new amplitude.Identify().unset('gender').unset('age'); + amplitude.identify(identify); + + identify = new amplitude.Identify().add('karma', 1).add('friends', 1); + amplitude.identify(identify); + + identify = new amplitude.Identify().append('ab-tests', 'new-user-test').append('some_list', [1, 2, 3, 4, 'values']); + amplitude.identify(identify); + + identify = new amplitude.Identify().prepend('ab-tests', 'new-user-test').prepend('some_list', [1, 2, 3, 4, 'values']); + amplitude.identify(identify); + + identify = new amplitude.Identify() + .set('karma', 10) + .add('karma', 1) + .unset('karma'); + amplitude.identify(identify); + + identify = new amplitude.Identify() + .set('colors', ['rose', 'gold']) + .append('ab-tests', 'campaign_a') + .append('existing_list', [4, 5]); + amplitude.identify(identify); + + amplitude.setUserProperties({ + gender: 'female', + age: 20 + }); + + amplitude.clearUserProperties(); + + amplitude.setOptOut(true); + amplitude.setOptOut(false); + + amplitude.setGroup('orgId', '15'); + amplitude.setGroup('sport', ['soccer', 'tennis']); + + // TODO: Implement those. + /* + var revenue = new amplitude.Revenue().setProductId('com.company.productId').setPrice(3.99).setQuantity(3); + amplitude.logRevenueV2(revenue); + + amplitude.logEventWithGroups('initialize_game', { 'key': 'value' }, { 'sport': 'soccer' }); + */ + } +} diff --git a/amplitude-js/v2/amplitude-js.d.ts b/amplitude-js/v2/amplitude-js.d.ts new file mode 100644 index 0000000000..613f5ad5d8 --- /dev/null +++ b/amplitude-js/v2/amplitude-js.d.ts @@ -0,0 +1,61 @@ +// Type definitions for Amplitude SDK 2.12.1 +// Project: https://github.com/amplitude/Amplitude-Javascript +// Definitions by: Arvydas Sidorenko +// Definitions: https://github.com/Asido/DefinitelyTyped + +declare module amplitude { + interface Config { + batchEvents?: boolean; + cookieExpiration?: number; + cookieName?: string; + deviceId?: string; + domain?: string; + eventUploadPeriodMillis?: number; + eventUploadThreshold?: number; + includeReferrer?: boolean; + includeUtm?: boolean; + language?: string; + optOut?: boolean; + platform?: string; + saveEvents?: boolean; + savedMaxCount?: number; + sessionTimeout?: number; + uploadBatchSize?: number; + } + + export class Identify { + set(key: string, value: any): Identify; + setOnce(key: string, value: any): Identify; + add(key: string, value: number): Identify; + append(key: string, value: any): Identify; + prepend(key: string, value: any): Identify; + + unset(key: string): Identify; + } + + export function init(apiKey: string): void; + export function init(apiKey: string, userId: string): void; + export function init(apiKey: string, userId: string, options: Config): void; + export function init(apiKey: string, userId: string, options: Config, callback: () => void): void; + + export function setVersionName(version: string): void; + export function setUserId(userId: string): void; + + export function setDeviceId(id: string): void; + export function regenerateDeviceId(): void; + + export function identify(identify: Identify): void; + + export function setUserProperties(properties: Object): void; + export function clearUserProperties(): void; + + export function setOptOut(optOut: boolean): void; + + export function setGroup(groupType: string, groupName: string | string[]): void; + + export function logEvent(event: string): void; + export function logEvent(event: string, data: Object): void; + export function logEvent(event: string, data: Object, callback: (httpCode: number, response: any) => void): void; + + export var options: Config; +} diff --git a/angular-breadcrumb/angular-breadcrumb.d.ts b/angular-breadcrumb/angular-breadcrumb.d.ts index 7df33ddef5..b9df64e366 100644 --- a/angular-breadcrumb/angular-breadcrumb.d.ts +++ b/angular-breadcrumb/angular-breadcrumb.d.ts @@ -14,7 +14,7 @@ declare namespace angular.ui { /** * Override the parent state (only for the breadcrumb) **/ - parent?: string; + parent?: string|Function; /** * When defined to true, the state is never included in the chain of states and never appears in the breadcrumb **/ @@ -76,4 +76,4 @@ declare namespace ncy { **/ getLastStep(): angular.ui.IState; } -} \ No newline at end of file +} diff --git a/angular-dynamic-locale/angular-dynamic-locale.d.ts b/angular-dynamic-locale/angular-dynamic-locale.d.ts index 4b7a1f9656..210a50f4aa 100644 --- a/angular-dynamic-locale/angular-dynamic-locale.d.ts +++ b/angular-dynamic-locale/angular-dynamic-locale.d.ts @@ -20,6 +20,7 @@ declare namespace angular.dynamicLocale { interface tmhDynamicLocaleProvider extends angular.IServiceProvider { localeLocationPattern(location: string): tmhDynamicLocaleProvider; localeLocationPattern(): string; + storageKey(storageKey: string): void; useStorage(storageName: string): void; useCookieStorage(): void; } diff --git a/angular-es/angular-es.d.ts b/angular-es/angular-es.d.ts index 10979ae15c..0972b42da0 100644 --- a/angular-es/angular-es.d.ts +++ b/angular-es/angular-es.d.ts @@ -45,12 +45,12 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Component: (component: iComponent) => ngESDecorator; + function Component(component: iComponent): ngESDecorator; /** * Register config block */ - var Config: () => ngESDecorator; + function Config(): ngESDecorator; /** * Register constant @@ -59,7 +59,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Constant: (name: string) => ngESDecorator; + function Constant(name: string): ngESDecorator; /** * Register controller @@ -68,7 +68,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Controller: (name: string) => ngESDecorator; + function Controller(name: string): ngESDecorator; /** * Register decorator @@ -77,7 +77,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Decorator: (name: string) => ngESDecorator; + function Decorator(name: string): ngESDecorator; /** * Register directive @@ -86,7 +86,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Directive: (name: string) => ngESDecorator; + function Directive(name: string): ngESDecorator; /** * Register factory @@ -95,7 +95,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Factory: (name: string) => ngESDecorator; + function Factory(name: string): ngESDecorator; /** * Register filter @@ -104,7 +104,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Filter: (name: string) => ngESDecorator; + function Filter(name: string): ngESDecorator; /** * Add $inject property to target @@ -113,7 +113,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Inject: (...dependencies: Array) => ngESDecorator; + function Inject(...dependencies: Array): ngESDecorator; /** * Inject dependencies as properties to target @@ -122,7 +122,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var InjectAsProperty: (...dependencies: Array) => ngESDecorator; + function InjectAsProperty(...dependencies: Array): ngESDecorator; /** * Attach target to the specified module @@ -131,7 +131,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Module: (name: string) => ngESDecorator; + function Module(name: string): ngESDecorator; /** * Register provider @@ -140,14 +140,14 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Provider: (name: string) => ngESDecorator; + function Provider(name: string): ngESDecorator; /** * Register run block * * @returns {ngESDecorator} - decorated class */ - var Run: () => ngESDecorator; + function Run(): ngESDecorator; /** * Register service @@ -156,7 +156,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Service: (name: string) => ngESDecorator; + function Service(name: string): ngESDecorator; /** * Register value @@ -165,7 +165,7 @@ declare module 'angular-es' { * * @returns {ngESDecorator} - decorated class */ - var Value: (name: string) => ngESDecorator; + function Value(name: string): ngESDecorator; export { Component, diff --git a/angular-feature-flags/angular-feature-flags-tests.ts b/angular-feature-flags/angular-feature-flags-tests.ts new file mode 100644 index 0000000000..a36eaba3d0 --- /dev/null +++ b/angular-feature-flags/angular-feature-flags-tests.ts @@ -0,0 +1,31 @@ +/// + +let myApp = angular.module('myApp', ['feature-flags']); + +const flagsData: Array = [ + { + key: '1', + active: true, + name: 'flag1', + description: 'This is the first flag' + }, + { + key: '2', + active: false, + name: 'flag2', + description: 'This is the second flag' + } +]; + +myApp.config(function (featureFlagsProvider: angular.featureflags.FeatureFlagsProvider) { + featureFlagsProvider.setInitialFlags(flagsData); +}); + +myApp.run(function ($q: angular.IQService, $http: angular.IHttpService, featureFlags: angular.featureflags.FeatureFlagsService) { + let deferred = $q.defer(); + deferred.resolve(flagsData); + + featureFlags.set(deferred.promise); + + featureFlags.set($http.get('/data/flags.json')); +}); \ No newline at end of file diff --git a/angular-feature-flags/angular-feature-flags.d.ts b/angular-feature-flags/angular-feature-flags.d.ts new file mode 100644 index 0000000000..99ef300976 --- /dev/null +++ b/angular-feature-flags/angular-feature-flags.d.ts @@ -0,0 +1,38 @@ +// Type definitions for angular-feature-flags 1.4.0 +// Project: https://github.com/mjt01/angular-feature-flags +// Definitions by: Borislav Zhivkov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace angular.featureflags { + export interface FlagData { + /** + * Unique key that is used from the markup to resolve whether a flag is active or not. + */ + key: string; + + /** + * Boolean value for enabling/disabling the feature + */ + active: boolean; + + /** + * A short name of the flag (only visible in the list of flags) + */ + name: string; + + /** + * A long description of the flag to further explain the feature being toggled (only visible in the list of flags) + */ + description: string; + } + + export interface FeatureFlagsProvider { + setInitialFlags(flags: Array): void; + } + + export interface FeatureFlagsService { + set(flagsPromise: angular.IPromise | angular.IHttpPromise): void; + } +} \ No newline at end of file diff --git a/angular-gettext/angular-gettext.d.ts b/angular-gettext/angular-gettext.d.ts index 48734d4433..84721d8dc0 100644 --- a/angular-gettext/angular-gettext.d.ts +++ b/angular-gettext/angular-gettext.d.ts @@ -51,12 +51,12 @@ declare namespace angular.gettext { /** Get the correct pluralized (but untranslated) string for the value of n. */ getStringForm(string: string, n: number): string; - /** Translate a string with the given context. Uses Angular.JS interpolation, so something like this will do what you expect: + /** Translate a string with the given scope. Uses Angular.JS interpolation, so something like this will do what you expect: * var hello = gettextCatalog.getString("Hello {{name}}!", { name: "Ruben" }); * // var hello will be "Hallo Ruben!" in Dutch. - * The context parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster. + * The scope parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster. */ - getString(string: string, context?: any): string; + getString(string: string, scope?: any, context?: string): string; /** Translate a plural string with the given context. */ getPlural(n: number, string: string, stringPlural: string, context?: any): string; diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts index 3a6b7d6bf1..818899e829 100644 --- a/angular-jwt/angular-jwt-tests.ts +++ b/angular-jwt/angular-jwt-tests.ts @@ -15,3 +15,18 @@ var $jwtInterceptor: ng.jwt.IJwtInterceptor; $jwtInterceptor.tokenGetter = () => { return expToken; } + + +var authManager: ng.jwt.IAuthManagerServiceProvider; + +// Indicate the user is authenticated +authManager.authenticate(); + +// Indicate the user is unauthenticated +authManager.unauthenticate(); + +// Keep the user authenticated +authManager.checkAuthOnRefresh(); + +// Redirect the user on unauthorized requests +authManager.redirectWhenUnauthenticated(); \ No newline at end of file diff --git a/angular-jwt/angular-jwt.d.ts b/angular-jwt/angular-jwt.d.ts index eb02cf24df..d1f9eb085f 100644 --- a/angular-jwt/angular-jwt.d.ts +++ b/angular-jwt/angular-jwt.d.ts @@ -27,4 +27,11 @@ declare namespace angular.jwt { interface IJwtInterceptor { tokenGetter(...params : any[]): string; } + + interface IAuthManagerServiceProvider { + authenticate(): void; + unauthenticate(): void; + checkAuthOnRefresh(): void; + redirectWhenUnauthenticated(): void; + } } diff --git a/angular-material/angular-material-tests.ts b/angular-material/angular-material-tests.ts index 4464c599e3..70d7b413ae 100644 --- a/angular-material/angular-material-tests.ts +++ b/angular-material/angular-material-tests.ts @@ -20,6 +20,13 @@ myApp.config(( .warnPalette('red') .dark(true); + var browserColors: ng.material.IBrowserColors = { + theme: 'default', + palette: 'neonRed', + hue: '500' + }; + $mdThemingProvider.enableBrowserColor(browserColors); + $mdIconProvider .defaultIconSet('my/app/icons.svg') // Register a default set of SVG icons .iconSet('social', 'my/app/social.svg') // Register a named icon set of SVGs @@ -41,6 +48,25 @@ myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng $scope['cancelBottomSheet'] = $mdBottomSheet.cancel.bind($mdBottomSheet, 'cancel'); }); +myApp.controller('ColorController', ($scope: ng.IScope, $mdColor: ng.material.IColorService) => { + var colorExpression : ng.material.IColorExpression; + var element : Element; + + colorExpression = { color: '#FFFFFF' } + + element = new Element(); + + $scope['applyThemeColors'] = () => { + $mdColor.applyThemeColors(element, colorExpression); + }; + $scope['getThemeColor'] = () => { + $mdColor.getThemeColor('default-neonRed') + }; + $scope['hasTheme'] = () => { + $mdColor.hasTheme(); + }; +}); + myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.IDialogService) => { $scope['openDialog'] = () => { $mdDialog.show({ @@ -127,15 +153,33 @@ myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.materia instance.isOpen(); instance.isLockedOpen(); }); + + $scope['onClose'] = $mdSidenav(componentId).onClose(() => {}); }); myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.IToastService) => { - $scope['openToast'] = () => $mdToast.show($mdToast.simple().textContent('Hello!')); + $scope['openToast'] = () => { + $mdToast.show($mdToast.simple().textContent('Hello!')); + $mdToast.updateTextContent('New Content'); + } + + $scope['customToast'] = () => { + var options = { + hideDelay: 3000, + position: 'top right', + controller : 'ToastCtrl', + templateUrl : 'toast-template.html', + toastClass: 'my-class' + }; + + $mdToast.show(options); + } }); myApp.controller('PanelController', ($scope: ng.IScope, $mdPanel: ng.material.IPanelService) => { $scope['createPanel'] = () => { var config = { + id: 'myPanel', template: '

Hello!

', hasBackdrop: true, disableParentScroll: true, diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index 23da7bceb2..31da141bf9 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -22,7 +22,7 @@ declare namespace angular.material { clickOutsideToClose?: boolean; disableBackdrop?: boolean; escapeToClose?: boolean; - resolve?: {[index: string]: angular.IPromise}; + resolve?: {[index: string]: () => angular.IPromise}; controllerAs?: string; parent?: Function|string|Object; // default: root node disableParentScroll?: boolean; // default: true @@ -53,7 +53,7 @@ declare namespace angular.material { controller(controller?: string|Function): T; locals(locals?: {[index: string]: any}): T; bindToController(bindToController?: boolean): T; // default: false - resolve(resolve?: {[index: string]: angular.IPromise}): T; + resolve(resolve?: {[index: string]: () => angular.IPromise}): T; controllerAs(controllerAs?: string): T; parent(parent?: string|Element|JQuery): T; // default: root node onComplete(onComplete?: Function): T; @@ -73,6 +73,16 @@ declare namespace angular.material { initialValue(initialValue: string): IPromptDialog; } + interface IColorExpression { + [cssPropertyName: string]: string + } + + interface IColorService { + applyThemeColors(element: Element|JQuery, colorExpression: IColorExpression): void; + getThemeColor(expression: string): string; + hasTheme(): boolean; + } + interface IDialogOptions { templateUrl?: string; template?: string; @@ -91,7 +101,7 @@ declare namespace angular.material { controller?: string|Function; locals?: {[index: string]: any}; bindToController?: boolean; // default: false - resolve?: {[index: string]: angular.IPromise} + resolve?: {[index: string]: () => angular.IPromise} controllerAs?: string; parent?: string|Element|JQuery; // default: root node onShowing?: Function; @@ -132,6 +142,7 @@ declare namespace angular.material { close(): angular.IPromise; isOpen(): boolean; isLockedOpen(): boolean; + onClose(onClose: Function): void; } interface ISidenavService { @@ -162,10 +173,11 @@ declare namespace angular.material { preserveScope?: boolean; // default: false hideDelay?: number; // default (ms): 3000 position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left' + toastClass?: string; controller?: string|Function; locals?: {[index: string]: any}; bindToController?: boolean; // default: false - resolve?: {[index: string]: angular.IPromise} + resolve?: {[index: string]: () => angular.IPromise} controllerAs?: string; parent?: string|Element|JQuery; // default: root node } @@ -175,7 +187,8 @@ declare namespace angular.material { showSimple(content: string): angular.IPromise; simple(): ISimpleToastPreset; build(): IToastPreset; - updateContent(): void; + updateContent(newContent: string): void; + updateTextContent(newContent: string): void hide(response?: any): void; cancel(response?: any): void; } @@ -213,6 +226,12 @@ declare namespace angular.material { hues: IThemeHues; } + interface IBrowserColors{ + theme: string; + palette: string; + hue: string; + } + interface IThemeColors { accent: IThemePalette; background: IThemePalette; @@ -242,12 +261,14 @@ declare namespace angular.material { } interface IThemingProvider { - theme(name: string, inheritFrom?: string): ITheme; - definePalette(name: string, palette: IPalette): IThemingProvider; - extendPalette(name: string, palette: IPalette): IPalette; - setDefaultTheme(theme: string): void; alwaysWatchTheme(alwaysWatch: boolean): void; + definePalette(name: string, palette: IPalette): IThemingProvider; + enableBrowserColor(browserColors: IBrowserColors): Function; + extendPalette(name: string, palette: IPalette): IPalette; + registerStyles(styles: String): void; + setDefaultTheme(theme: string): void; setNonce(nonce: string): void; + theme(name: string, inheritFrom?: string): ITheme; } interface IDateLocaleProvider { @@ -291,13 +312,14 @@ declare namespace angular.material { } interface IPanelConfig { + id?: string; template?: string; templateUrl?: string; controller?: string|Function; controllerAs?: string; bindToController?: boolean; // default: true locals?: {[index: string]: any}; - resolve?: {[index: string]: angular.IPromise} + resolve?: {[index: string]: () => angular.IPromise} attachTo?: string|JQuery|Element; propagateContainerEvents?: boolean; panelClass?: string; @@ -333,6 +355,9 @@ declare namespace angular.material { removeClass(oldClass: string): void; toggleClass(toggleClass: string): void; updatePosition(position: IPanelPosition): void; + registerInterceptor(type: string, callback: () => angular.IPromise): IPanelRef; + removeInterceptor(type: string, callback: () => angular.IPromise): IPanelRef; + removeAllInterceptors(type?: string): IPanelRef; } interface IPanelPosition { @@ -348,8 +373,8 @@ declare namespace angular.material { centerVertically(): IPanelPosition; center(): IPanelPosition; addPanelPosition(xPosition: string, yPosition: string): IPanelPosition; - withOffsetX(offsetX: string): IPanelPosition; - withOffsetY(offsetY: string): IPanelPosition; + withOffsetX(offsetX: string|((panel: IPanelPosition) => string)): IPanelPosition; + withOffsetY(offsetY: string|((panel: IPanelPosition) => string)): IPanelPosition; } interface IPanelAnimation { @@ -382,5 +407,8 @@ declare namespace angular.material { SCALE: string, FADE: string, }; + interceptorTypes: { + CLOSE: string, + }; } } diff --git a/angular-signalr-hub/angular-signalr-hub-tests.ts b/angular-signalr-hub/angular-signalr-hub-tests.ts index d20457bcdc..1e7c90c962 100644 --- a/angular-signalr-hub/angular-signalr-hub-tests.ts +++ b/angular-signalr-hub/angular-signalr-hub-tests.ts @@ -1,5 +1,5 @@ -/// /// +/// angular .module('app', ['SignalR']) diff --git a/angular-signalr-hub/angular-signalr-hub.d.ts b/angular-signalr-hub/angular-signalr-hub.d.ts index 03fa6427eb..8d331ffd75 100644 --- a/angular-signalr-hub/angular-signalr-hub.d.ts +++ b/angular-signalr-hub/angular-signalr-hub.d.ts @@ -3,8 +3,14 @@ // Definitions by: Adam Santaniello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// /// +declare module "angular-signalr-hub" { + let _: string; + export = _; +} + declare namespace ngSignalr { interface HubFactory { /** diff --git a/angular-touchspin/angular-touchspin-tests.ts b/angular-touchspin/angular-touchspin-tests.ts index c6e229c7f5..c69c6b3140 100644 --- a/angular-touchspin/angular-touchspin-tests.ts +++ b/angular-touchspin/angular-touchspin-tests.ts @@ -2,9 +2,9 @@ /// angular - .module('touchspin-tests', ['lm.touchspin']) - .config(function(touchspinConfigProvider: angularTouchSpin.ITouchSpinConfigProvider) { - touchspinConfigProvider.defaults({ + .module('touchspin-tests', ['nk.touchspin']) + .config(function(touchspinConfigProvider: angular.touchspin.ITouchSpinConfigProvider) { + touchspinConfigProvider.defaults({ min: 0, max: 0, step: 0, diff --git a/angular-touchspin/angular-touchspin.d.ts b/angular-touchspin/angular-touchspin.d.ts index 5423b17e55..adae8cc92c 100644 --- a/angular-touchspin/angular-touchspin.d.ts +++ b/angular-touchspin/angular-touchspin.d.ts @@ -11,7 +11,7 @@ declare module "angular-touchspin" { export = _; } -declare namespace angularTouchSpin { +declare namespace angular.touchspin { interface ITouchSpinOptions { min?: number; max?: number; diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index dd129d141d..d6c389146b 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -400,6 +400,17 @@ declare namespace angular.ui.bootstrap { * @default 'body' */ appendTo?: angular.IAugmentedJQuery; + + /** + * A string reference to the component to be rendered that is registered with Angular's compiler. If using a directive, the directive must have `restrict: 'E'` and a template or templateUrl set. + * + * It supports these bindings: + * - `close` - A method that can be used to close a modal, passing a result. The result must be passed in this format: `{$value: myResult}` + * - `dismiss` - A method that can be used to dismiss a modal, passing a result. The result must be passed in this format: `{$value: myRejectedResult}` + * - `modalInstance` - The modal instance. This is the same `$uibModalInstance` injectable found when using `controller`. + * - `resolve` - An object of the modal resolve values. See [UI Router resolves] for details. + */ + component?: string; } interface IModalStackService { diff --git a/angular-ui-notification/angular-ui-notification-tests.ts b/angular-ui-notification/angular-ui-notification-tests.ts new file mode 100644 index 0000000000..3039a74c9e --- /dev/null +++ b/angular-ui-notification/angular-ui-notification-tests.ts @@ -0,0 +1,30 @@ +/// + +function TestNotifications(NotificationProvider: angular.uiNotification.INotificationProvider, Notification: angular.uiNotification.INotificationService) { + NotificationProvider.setOptions({ + delay: 10000, + startTop: 20, + startRight: 10, + verticalSpacing: 20, + horizontalSpacing: 20, + positionX: 'left', + positionY: 'bottom' + }); + + Notification.primary('Primary notification'); + Notification('Primary notification'); + + Notification.success('Success notification'); + + Notification({message: 'Warning notification'}, 'warning'); + + Notification({message: 'Primary notification', title: 'Primary notification'}); + + Notification.error({message: 'Error notification 1s', delay: 1000}); + + Notification.success({message: 'Success notification
Some other content
This is a link
', title: 'Html content'}); + + Notification.error({message: 'Error Bottom Right', positionY: 'bottom', positionX: 'right'}); + + Notification.error({message: 'Error notification 1s', replaceMessage: true}); +} \ No newline at end of file diff --git a/angular-ui-notification/angular-ui-notification.d.ts b/angular-ui-notification/angular-ui-notification.d.ts new file mode 100644 index 0000000000..48215e6d42 --- /dev/null +++ b/angular-ui-notification/angular-ui-notification.d.ts @@ -0,0 +1,82 @@ +// Type definitions for angular-ui-notification +// Project: https://github.com/alexcrack/angular-ui-notification +// Definitions by: Kamil Rojewski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace angular.uiNotification { + // Taken from angular to avoid dependency + interface IPromise { + /** + * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected. + * The successCallBack may return IPromise for when a $q.reject() needs to be returned + * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method. + */ + then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise; + + /** + * Shorthand for promise.then(null, errorCallback) + */ + catch(onRejected: (reason: any) => IPromise|TResult): IPromise; + + /** + * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information. + * + * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible. + */ + finally(finallyCallback: () => any): IPromise; + } + + type XPosition = 'right'|'left'|'center'; + type YPosition = 'top'|'bottom'; + + type MessageType = 'primary'|'info'|'success'|'warning'|'error'; + + interface IGlobalMessageOptions { + delay?: number; + startTop?: number; + startRight?: number; + verticalSpacing?: number; + horizontalSpacing?: number; + positionX?: XPosition; + positionY?: YPosition; + replaceMessage?: boolean; + templateUrl?: string; + onClose?: (element: any) => any; + closeOnClick?: boolean; + maxCount?: number; + } + + interface IMessageOptions { + title?: string; + message?: string; + templateUrl?: string; + delay?: number; + type?: MessageType; + positionX?: XPosition; + positionY?: YPosition; + replaceMessage?: boolean; + closeOnClick?: boolean; + } + + interface INotificationScope { + kill(isHard: boolean): void; + } + + interface INotificationProvider { + setOptions(options: IGlobalMessageOptions): void; + } + + type Message = string|IMessageOptions; + + interface INotificationService { + primary(message: Message): IPromise; + info(message: Message): IPromise; + success(message: Message): IPromise; + warning(message: Message): IPromise; + error(message: Message): IPromise; + + clearAll(): void; + + (message: Message, type?: MessageType): IPromise; + } +} diff --git a/angular-ui-scroll/angular-ui-scroll.d.ts b/angular-ui-scroll/angular-ui-scroll.d.ts index 168c6ba271..5f24c8ec38 100644 --- a/angular-ui-scroll/angular-ui-scroll.d.ts +++ b/angular-ui-scroll/angular-ui-scroll.d.ts @@ -42,9 +42,10 @@ declare namespace angular.ui { */ topVisibleScope: ng.IRepeatScope; /** - * calling this method reinitializes and reloads the scroller content. + * calling this method reinitializes and reloads the scroller content. + * @param startIndex is an integer indicating what item index the scroller will use to start the load process. */ - reload(): void; + reload(startIndex?: number): void; /** * Replaces the item in the buffer at the given index with the new items. * diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 441a7e1d3d..f7e803c1c8 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -42,15 +42,20 @@ declare namespace angular.resource { (url: string, paramDefaults?: any, /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } where deleteDescriptor : IActionDescriptor */ - actions?: any, options?: IResourceOptions): IResourceClass>; + actions?: IActionHash, options?: IResourceOptions): IResourceClass>; (url: string, paramDefaults?: any, /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } where deleteDescriptor : IActionDescriptor */ - actions?: any, options?: IResourceOptions): U; + actions?: IActionHash, options?: IResourceOptions): U; (url: string, paramDefaults?: any, /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } where deleteDescriptor : IActionDescriptor */ - actions?: any, options?: IResourceOptions): IResourceClass; + actions?: IActionHash, options?: IResourceOptions): IResourceClass; + } + + // Hash of action descriptors allows custom action names + interface IActionHash { + [action: string]: IActionDescriptor } // Just a reference to facilitate describing new actions @@ -186,6 +191,12 @@ declare namespace angular { /** creating a resource service factory */ factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction): IModule; } + + namespace auto { + interface IInjectorService { + get(name: '$resource'): ng.resource.IResourceService; + } + } } interface Array diff --git a/angularjs/angular-sanitize-tests.ts b/angularjs/angular-sanitize-tests.ts index d065392c79..8fdf3e3eed 100644 --- a/angularjs/angular-sanitize-tests.ts +++ b/angularjs/angular-sanitize-tests.ts @@ -1,10 +1,32 @@ /// -var shouldBeString: string; +/////////////////////////////////////////////////////////////////////////////// +// Variables +/////////////////////////////////////////////////////////////////////////////// +let shouldBeString: string; +let testInputText: string = 'TEST'; -declare var $sanitizeService: ng.sanitize.ISanitizeService; -shouldBeString = $sanitizeService(shouldBeString); +/////////////////////////////////////////////////////////////////////////////// +// Test sanitize service +/////////////////////////////////////////////////////////////////////////////// +declare let $sanitizeService: ng.sanitize.ISanitizeService; +shouldBeString = $sanitizeService(testInputText); -declare var $linky: ng.sanitize.filter.ILinky; -shouldBeString = $linky(shouldBeString); -shouldBeString = $linky(shouldBeString, shouldBeString); +/////////////////////////////////////////////////////////////////////////////// +// Test `linky` filter +/////////////////////////////////////////////////////////////////////////////// +declare let $linky: ng.sanitize.filter.ILinky; + +// Should be string for simple text and target parameters +shouldBeString = $linky(testInputText, testInputText); + +// Should be string for simple text, target and attributes parameters +let attributesAsFunction = () => { +}; +shouldBeString = $linky(shouldBeString, testInputText, { + "attributeKey1": "attributeValue1", + "attributeKey2": "attributeValue2" +}); +shouldBeString = $linky(shouldBeString, testInputText, (url: string) => { + return {"attributeKey1": "attributeValue1"} +}); \ No newline at end of file diff --git a/angularjs/angular-sanitize.d.ts b/angularjs/angular-sanitize.d.ts index d87515adca..36cad6f77e 100644 --- a/angularjs/angular-sanitize.d.ts +++ b/angularjs/angular-sanitize.d.ts @@ -29,12 +29,25 @@ declare namespace angular.sanitize { // see https://github.com/angular/angular.js/tree/v1.2.0/src/ngSanitize/filter /////////////////////////////////////////////////////////////////////////// export module filter { - - // Finds links in text input and turns them into html links. - // Supports http/https/ftp/mailto and plain email address links. - // see http://code.angularjs.org/1.2.0/docs/api/ngSanitize.filter:linky + /** + * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and plain email address links. + * @param text Input text. + * @param target ILinkyTargetType Window (_blank|_self|_parent|_top) or named frame to open links in. + * @param attributes Add custom attributes to the link element. + * @return Html-linkified and sanitized text. + * see https://docs.angularjs.org/api/ngSanitize/filter/linky + */ interface ILinky { - (text: string, target?: string): string; + (text: string, target: string, attributes?: { [attribute: string]: string } | ((url: string) => { [attribute: string]: string })): string; } + } } +/////////////////////////////////////////////////////////////////////////////// +// Extend angular $filter declarations to include filters from angular.sanitize module +/////////////////////////////////////////////////////////////////////////////// +declare namespace angular { + interface IFilterService { + (name: 'linky'): angular.sanitize.filter.ILinky; + } +} \ No newline at end of file diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts index ef3e29b4c8..4c03e7c219 100644 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -180,25 +180,51 @@ namespace My.Namespace { // IModule Registering Test var mod = angular.module('tests', []); -mod.controller('name', function ($scope: ng.IScope) { }) -mod.controller('name', ['$scope', function ($scope: ng.IScope) { }]) -mod.controller(My.Namespace); +mod.controller('name', function ($scope: ng.IScope) { }); +mod.controller('name', ['$scope', function ($scope: ng.IScope) { }]); +mod.controller('name', class { + // Uncommenting the next line should lead to a type error because this signature isn't compatible + // with the signature of the `$onChanges` hook: + // $onChanges(x: number) { } +}); +mod.controller({ + MyCtrl: class{}, + MyCtrl2: function() {}, + MyCtrl3: ['$fooService', function($fooService: any) { }] +}); mod.directive('name', function ($scope: ng.IScope) { }) mod.directive('name', ['$scope', function ($scope: ng.IScope) { }]) -mod.directive(My.Namespace); +mod.directive({ + myFooDir: () => ({ + template: 'my-foo-dir.tpl.html' + }), + myBarDir: ['$fooService', ($fooService: any) => ({ + template: 'my-bar-dir.tpl.html' + })] +}); mod.factory('name', function ($scope: ng.IScope) { }) -mod.factory('name', ['$scope', function ($scope: ng.IScope) { }]) -mod.factory(My.Namespace); +mod.factory('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.factory({ + name1: function (foo: any) { }, + name2: ['foo', function (foo: any) { }] +}); mod.filter('name', function ($scope: ng.IScope) { }) -mod.filter('name', ['$scope', function ($scope: ng.IScope) { }]) -mod.filter(My.Namespace); +mod.filter('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.filter({ + name1: function (foo: any) { }, + name2: ['foo', function (foo: any) { }] +}); mod.provider('name', function ($scope: ng.IScope) { return { $get: () => { } } }) mod.provider('name', TestProvider); mod.provider('name', ['$scope', function ($scope: ng.IScope) { }]) mod.provider(My.Namespace); mod.service('name', function ($scope: ng.IScope) { }) mod.service('name', ['$scope', function ($scope: ng.IScope) { }]) -mod.service(My.Namespace); +mod.service({ + MyCtrl: class{}, + MyCtrl2: function() {}, + MyCtrl3: ['$fooService', function($fooService: any) { }] +}); mod.constant('name', 23); mod.constant('name', "23"); mod.constant(My.Namespace); @@ -867,6 +893,26 @@ angular.module('docsTabsExample', []) }; }); +angular.module('multiSlotTranscludeExample', []) + .directive('dropDownMenu', function() { + return { + transclude: { + button: 'button', + list: 'ul', + }, + link: function(scope, element, attrs, ctrl, transclude) { + // without scope + transclude().appendTo(element); + transclude(clone => clone.appendTo(element)); + + // with scope + transclude(scope, clone => clone.appendTo(element)); + transclude(scope, clone => clone.appendTo(element), element, 'button'); + transclude(scope, null, element, 'list').addClass('drop-down-list').appendTo(element); + } + }; + }); + angular.module('componentExample', []) .component('counter', { require: {'ctrl': '^ctrl'}, diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 3c13fd6cf3..e879668039 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular JS 1.5 // Project: http://angularjs.org -// Definitions by: Diego Vilar +// Definitions by: Diego Vilar , Georgii Dolzhykov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -25,6 +25,8 @@ declare module 'angular' { /////////////////////////////////////////////////////////////////////////////// declare namespace angular { + type Injectable = T | (string | T)[]; + // not directly implemented, but ensures that constructed class implements $get interface IServiceProviderClass { new (...args: any[]): IServiceProvider; @@ -125,6 +127,7 @@ declare namespace angular { isFunction(value: any): value is Function; isNumber(value: any): value is number; isObject(value: any): value is Object; + isObject(value: any): value is T; isString(value: any): value is string; isUndefined(value: any): boolean; lowercase(str: string): string; @@ -213,50 +216,26 @@ declare namespace angular { * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors. * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation). */ - controller(name: string, controllerConstructor: Function): IModule; - /** - * The $controller service is used by Angular to create new controllers. - * - * This provider allows controller registration via the register method. - * - * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors. - * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation). - */ - controller(name: string, inlineAnnotatedConstructor: any[]): IModule; - controller(object: Object): IModule; + controller(name: string, controllerConstructor: Injectable): IModule; + controller(object: {[name: string]: Injectable}): IModule; /** * Register a new directive with the compiler. * * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) * @param directiveFactory An injectable directive factory function. */ - directive(name: string, directiveFactory: IDirectiveFactory): IModule; - /** - * Register a new directive with the compiler. - * - * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) - * @param directiveFactory An injectable directive factory function. - */ - directive(name: string, inlineAnnotatedFunction: any[]): IModule; - directive(object: Object): IModule; + directive(name: string, directiveFactory: Injectable): IModule; + directive(object: {[directiveName: string]: Injectable}): IModule; /** * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider. * * @param name The name of the instance. * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}). */ - factory(name: string, $getFn: Function): IModule; - /** - * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider. - * - * @param name The name of the instance. - * @param inlineAnnotatedFunction The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}). - */ - factory(name: string, inlineAnnotatedFunction: any[]): IModule; - factory(object: Object): IModule; - filter(name: string, filterFactoryFunction: Function): IModule; - filter(name: string, inlineAnnotatedFunction: any[]): IModule; - filter(object: Object): IModule; + factory(name: string, $getFn: Injectable): IModule; + factory(object: {[name: string]: Injectable}): IModule; + filter(name: string, filterFactoryFunction: Injectable): IModule; + filter(object: {[name: string]: Injectable}): IModule; provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule; provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule; provider(name: string, inlineAnnotatedConstructor: any[]): IModule; @@ -265,26 +244,15 @@ declare namespace angular { /** * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests. */ - run(initializationFunction: Function): IModule; - /** - * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests. - */ - run(inlineAnnotatedFunction: any[]): IModule; + run(initializationFunction: Injectable): IModule; /** * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function. * * @param name The name of the instance. * @param serviceConstructor An injectable class (constructor function) that will be instantiated. */ - service(name: string, serviceConstructor: Function): IModule; - /** - * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function. - * - * @param name The name of the instance. - * @param inlineAnnotatedConstructor An injectable class (constructor function) that will be instantiated. - */ - service(name: string, inlineAnnotatedConstructor: any[]): IModule; - service(object: Object): IModule; + service(name: string, serviceConstructor: Injectable): IModule; + service(object: {[name: string]: Injectable}): IModule; /** * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service. @@ -301,8 +269,7 @@ declare namespace angular { * @param name The name of the service to decorate * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to. */ - decorator(name:string, decoratorConstructor: Function): IModule; - decorator(name:string, inlineAnnotatedConstructor: any[]): IModule; + decorator(name: string, decorator: Injectable): IModule; // Properties name: string; @@ -612,11 +579,11 @@ declare namespace angular { /** * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed). */ - stopPropagation?: Function; + stopPropagation?(): void; /** * calling preventDefault sets defaultPrevented flag to true. */ - preventDefault: Function; + preventDefault(): void; /** * true if preventDefault was called. */ @@ -1220,19 +1187,12 @@ declare namespace angular { // see http://docs.angularjs.org/api/ng.$compileProvider /////////////////////////////////////////////////////////////////////////// interface ICompileService { - (element: string, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction; - (element: Element, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction; - (element: JQuery, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction; + (element: string | Element | JQuery, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction; } interface ICompileProvider extends IServiceProvider { - directive(name: string, directiveFactory: Function): ICompileProvider; - directive(directivesMap: Object, directiveFactory: Function): ICompileProvider; - directive(name: string, inlineAnnotatedFunction: any[]): ICompileProvider; - directive(directivesMap: Object, inlineAnnotatedFunction: any[]): ICompileProvider; - - // Undocumented, but it is there... - directive(directivesMap: any): ICompileProvider; + directive(name: string, directiveFactory: Injectable): ICompileProvider; + directive(object: {[directiveName: string]: Injectable}): ICompileProvider; component(name: string, options: IComponentOptions): ICompileProvider; @@ -1242,7 +1202,8 @@ declare namespace angular { imgSrcSanitizationWhitelist(): RegExp; imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider; - debugInfoEnabled(enabled?: boolean): any; + debugInfoEnabled(): boolean; + debugInfoEnabled(enabled: boolean): ICompileProvider; } interface ICloneAttachFunction { @@ -1255,12 +1216,16 @@ declare namespace angular { (scope: IScope, cloneAttachFn?: ICloneAttachFunction): JQuery; } - // This corresponds to $transclude (and also the transclude function passed to link). + /** + * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions. + * https://docs.angularjs.org/api/ng/service/$compile#-controller- + * http://teropa.info/blog/2015/06/09/transclusion.html + */ interface ITranscludeFunction { // If the scope is provided, then the cloneAttachFn must be as well. - (scope: IScope, cloneAttachFn: ICloneAttachFunction): JQuery; + (scope: IScope, cloneAttachFn: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery; // If one argument is provided, then it's assumed to be the cloneAttachFn. - (cloneAttachFn?: ICloneAttachFunction): JQuery; + (cloneAttachFn?: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery; } /////////////////////////////////////////////////////////////////////////// @@ -1411,6 +1376,16 @@ declare namespace angular { * Absolute or relative URL of the resource that is being requested. */ url: string; + /** + * Event listeners to be bound to the XMLHttpRequest object. + * To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block. + */ + eventHandlers?: { [type: string]: EventListenerOrEventListenerObject }; + /** + * Event listeners to be bound to the XMLHttpRequest upload object. + * To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block. + */ + uploadEventHandlers?: { [type: string]: EventListenerOrEventListenerObject }; } interface IHttpHeadersGetter { @@ -1538,7 +1513,7 @@ declare namespace angular { * Register service factories (names or implementations) for interceptors which are called before and after * each request. */ - interceptors: (string|IHttpInterceptorFactory|(string|IHttpInterceptorFactory)[])[]; + interceptors: (string | Injectable)[]; useApplyAsync(): boolean; useApplyAsync(value: boolean): IHttpProvider; @@ -1686,11 +1661,10 @@ declare namespace angular { * controller if passed as a string. Empty function by default. * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection) */ - controller?: string | Function | (string | Function)[] | IComponentController; + controller?: string | Injectable; /** - * An identifier name for a reference to the controller. If present, the controller will be published to scope under - * the controllerAs name. If not present, this will default to be the same as the component name. - * @default "$ctrl" + * An identifier name for a reference to the controller. If present, the controller will be published to its scope under + * the specified name. If not present, this will default to '$ctrl'. */ controllerAs?: string; /** @@ -1701,24 +1675,24 @@ declare namespace angular { * $attrs - Current attributes object for the element * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection) */ - template?: string | Function | (string | Function)[]; + template?: string | Injectable<(...args: any[]) => string>; /** - * path or function that returns a path to an html template that should be used as the contents of this component. + * Path or function that returns a path to an html template that should be used as the contents of this component. * If templateUrl is a function, then it is injected with the following locals: * $element - Current element * $attrs - Current attributes object for the element * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection) */ - templateUrl?: string | Function | (string | Function)[]; + templateUrl?: string | Injectable<(...args: any[]) => string>; /** * Define DOM attribute binding to component properties. Component properties are always bound to the component * controller and not to the scope. */ - bindings?: {[binding: string]: string}; + bindings?: {[boundProperty: string]: string}; /** - * Whether transclusion is enabled. Enabled by default. + * Whether transclusion is enabled. Disabled by default. */ - transclude?: boolean | string | {[slot: string]: string}; + transclude?: boolean | {[slot: string]: string}; /** * Requires the controllers of other directives and binds them to this component's controller. * The object keys specify the property names under which the required controllers (object values) will be bound. @@ -1728,16 +1702,18 @@ declare namespace angular { require?: {[controller: string]: string}; } - interface IComponentTemplateFn { - ( $element?: JQuery, $attrs?: IAttributes ): string; - } + type IControllerConstructor = + (new (...args: any[]) => IController) | + // Instead of classes, plain functions are often used as controller constructors, especially in examples. + ((...args: any[]) => (void | IController)); /** - * Components have a well-defined lifecycle Each component can implement "lifecycle hooks". These are methods that - * will be called at certain points in the life of the component. - * @url https://docs.angularjs.org/guide/component + * Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that + * will be called by Angular at certain points in the life cycle of the directive. + * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks + * https://docs.angularjs.org/guide/component */ - interface IComponentController { + interface IController { /** * Called on each controller after all the controllers on an element have been constructed and had their bindings * initialized (and before the pre & post linking functions for the directives on this element). This is a good @@ -1745,12 +1721,21 @@ declare namespace angular { */ $onInit?(): void; /** - * Called whenever one-way bindings are updated. The changesObj is a hash whose keys are the names of the bound - * properties that have changed, and the values are an {@link IChangesObject} object of the form + * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes. + * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook; + * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish + * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's + * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes, + * you must store the previous value(s) for comparison to the current values. + */ + $doCheck?(): void; + /** + * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound + * properties that have changed, and the values are an {@link IChangesObject} object of the form * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as * cloning the bound value to prevent accidental mutation of the outer value. */ - $onChanges?(changesObj: {[property:string]: IChangesObject}): void; + $onChanges?(onChangesObj: IOnChangesObject): void; /** * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources, * watches and event handlers. @@ -1767,9 +1752,13 @@ declare namespace angular { $postLink?(): void; } - interface IChangesObject { - currentValue: any; - previousValue: any; + interface IOnChangesObject { + [property: string]: IChangesObject; + } + + interface IChangesObject { + currentValue: T; + previousValue: T; isFirstChange(): boolean; } @@ -1809,12 +1798,12 @@ declare namespace angular { * that is passed to the link function instead. */ transclude: ITranscludeFunction - ): void | IDirectivePrePost; + ): void | IDirectiveLinkFn | IDirectivePrePost; } interface IDirective { compile?: IDirectiveCompileFn; - controller?: any; + controller?: string | Injectable; controllerAs?: string; /** * @deprecated @@ -1822,10 +1811,9 @@ declare namespace angular { * the controller constructor is called, this use is now deprecated. Please place initialization code that * relies upon bindings inside a $onInit method on the controller, instead. */ - bindToController?: boolean | Object; + bindToController?: boolean | {[boundProperty: string]: string}; link?: IDirectiveLinkFn | IDirectivePrePost; multiElement?: boolean; - directiveName?: string; priority?: number; /** * @deprecated @@ -1833,12 +1821,12 @@ declare namespace angular { replace?: boolean; require?: string | string[] | {[controller: string]: string}; restrict?: string; - scope?: boolean | Object; - template?: string | Function; + scope?: boolean | {[boundProperty: string]: string}; + template?: string | ((tElement: JQuery, tAttrs: IAttributes) => string); templateNamespace?: string; - templateUrl?: string | Function; + templateUrl?: string | ((tElement: JQuery, tAttrs: IAttributes) => string); terminal?: boolean; - transclude?: boolean | string | {[slot: string]: string}; + transclude?: boolean | 'element' | {[slot: string]: string}; } /** @@ -1851,6 +1839,11 @@ declare namespace angular { interface IAugmentedJQueryStatic extends JQueryStatic {} interface IAugmentedJQuery extends JQuery {} + /** + * Same as IController. Keeping it for compatibility with older versions of these type definitions. + */ + interface IComponentController extends IController {} + /////////////////////////////////////////////////////////////////////////// // AUTO module (angular.js) /////////////////////////////////////////////////////////////////////////// diff --git a/apn/apn.d.ts b/apn/apn.d.ts index cf11b13c0e..c77f3ddf6d 100644 --- a/apn/apn.d.ts +++ b/apn/apn.d.ts @@ -137,6 +137,7 @@ declare module "apn" { } export interface NotificationAlertOptions { title?:string; + subtitle?:string; body:string; "title-loc-key"?:string; "title-loc-args"?:string[]; diff --git a/applicationinsights/applicationinsights.d.ts b/applicationinsights/applicationinsights.d.ts index 96d5773fa5..45c89556a6 100644 --- a/applicationinsights/applicationinsights.d.ts +++ b/applicationinsights/applicationinsights.d.ts @@ -346,24 +346,24 @@ interface Client { * 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 request The http.IncomingMessage 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?: { + trackRequest(request: any /* http.IncomingMessage */, 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 request The http.IncomingMessage 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?: { + trackRequestSync(request: any /*http.IncomingMessage */, response: any /*http.ServerResponse */, ellapsedMilliseconds?: number, properties?: { [key: string]: string;}, error?: any) : void; /** diff --git a/arcgis-js-api/arcgis-js-api.d.ts b/arcgis-js-api/arcgis-js-api.d.ts index 65765fbb09..d27429b428 100644 --- a/arcgis-js-api/arcgis-js-api.d.ts +++ b/arcgis-js-api/arcgis-js-api.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript v3.17 +// Type definitions for ArcGIS API for JavaScript v3.18 // Project: http://js.arcgis.com // Definitions by: Esri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -44,6 +44,7 @@ declare module "esri" { import QueryTask = require("esri/tasks/QueryTask"); import TextSymbol = require("esri/symbols/TextSymbol"); import StandardGeographyQueryTask = require("esri/tasks/geoenrichment/StandardGeographyQueryTask"); + import WCSConnection = require("esri/layers/WCSConnection"); import WMSLayerInfo = require("esri/layers/WMSLayerInfo"); import WMTSLayerInfo = require("esri/layers/WMTSLayerInfo"); @@ -483,12 +484,14 @@ declare module "esri" { featureLayers: FeatureLayer[]; /** Reference to the map object. */ map?: Map; - /** The point feature layer containing the origin points. */ - originsLayer: FeatureLayer; + /** The point feature layers containing the origin points. */ + originsLayers: FeatureLayer[]; /** The name of the output layer to be shown in the Result layer name input box. */ outputLayerName?: string; /** The url to the ArcGIS.com site or in-house portal where the GP server is hosted. */ portalUrl?: string; + /** Indicates whether to display a drop down menu listing valid input analysis layers. */ + showSelectAnalysisLayer?: boolean; } export interface CoordinatesLocationProviderOptions { /** The attribute field in the graphic object that contains the longitude (X) values. */ @@ -563,12 +566,14 @@ declare module "esri" { export interface CreateWatershedsOptions { /** The URL to the GPServer used to execute an analysis job. */ analysisGpServer?: string; - /** The feature layer containing input points used for calculating watersheds. */ - inputLayer: FeatureLayer; + /** The feature layers containing input points used for calculating watersheds. */ + inputLayers: FeatureLayer[]; /** Reference to the map object. */ map?: Map; /** The url to the ArcGIS.com site or in-house portal where the GP server is hosted. */ portalUrl?: string; + /** Indicates whether to display a drop down menu listing valid input analysis layers. */ + showSelectAnalysisLayer?: boolean; } export interface CutOptions { /** The feature(s) added to the feature layer by the cut operation. */ @@ -939,6 +944,10 @@ declare module "esri" { outFields?: string[]; /** Displays or hides the attachment column. */ showAttachments?: boolean; + /** Displays or hides tooltips for column headers. */ + showColumnHeaderTooltips?: boolean; + /** Shows or hides cyclical relationship. */ + showCyclicalRelationships?: boolean; /** Displays the data type of the field right under the field label. */ showDataTypes?: boolean; /** Displays or hides total number of features and selected number of features in the grid header. */ @@ -947,6 +956,8 @@ declare module "esri" { showGridHeader?: boolean; /** Displays or hides 'Options' drop-down menu of the FeatureTable. */ showGridMenu?: boolean; + /** Displays or hides the option to show related records in a table if the layer has pre-established relationship. */ + showRelatedRecords?: boolean; /** Displays or hides the 'Statistics' option in column menus for numeric fields. */ showStatistics?: boolean; /** Enables an interaction between the map and the feature table. */ @@ -1996,6 +2007,30 @@ declare module "esri" { /** The URL to use for connecting to a socket. */ socketUrl?: string; } + export interface StretchFilterOptions { + /** Indicates whether to perform dynamic range adjustment using the current pixel data. */ + dra?: boolean; + /** An array of gamma values, for example [0.8, 0.8, 0.8]. */ + gamma?: number[]; + /** The maximum value of stretched pixels. */ + max?: number; + /** Percent of pixels clipped on the right histogram tail, for example 0.25. */ + maxPercent?: number; + /** The minimum value of stretched pixels. */ + min?: number; + /** Percent of pixels clipped on the left histogram tail, for example 1.5. */ + minPercent?: number; + /** The number of standard deviations for StandardDeviation stretch, for example 2.5. */ + numberOfStandardDeviations?: number; + /** The output pixel type. */ + outputPixelType?: string; + /** An array of arrays containing custom statistics objects. */ + statistics?: any[][]; + /** See the constants table for a list of possible stretchType values. */ + stretchType?: number; + /** Indicates whether to perform non-linear gamma stretch. */ + useGamma?: boolean; + } export interface SummarizeNearbyOptions { /** The URL to the GPServer used to execute an analysis job. */ analysisGpServer?: string; @@ -2023,6 +2058,8 @@ declare module "esri" { showCredits?: boolean; /** When true, the help links will be shown. */ showHelp?: boolean; + /** Indicates whether to display a drop down menu listing valid input analysis layers. */ + showSelectAnalysisLayer?: boolean; /** When true, the select folder dropdown will be shown. */ showSelectFolder?: boolean; /** An array of possible statistics attribute field names and summary types that you wish to calculate for all nearby features. */ @@ -2031,8 +2068,8 @@ declare module "esri" { summaryLayer?: FeatureLayer; /** An array of possible feature layers summarizing toward. */ summaryLayers: FeatureLayer[]; - /** The point, line, or polygon feature layer from which distances will be measured to features in summarizeLayer. */ - sumNearbyLayer: FeatureLayer; + /** The point, line, or polygon feature layers from which distances will be measured to features in summarizeLayer. */ + sumNearbyLayers: FeatureLayer[]; /** If true. */ sumShape?: boolean; /** Type of units shown as the defeault value in the Find nearest features using a option. */ @@ -2184,27 +2221,37 @@ declare module "esri" { /** Region of preview scale thumbnails. */ region?: string; } + export interface WCSConnectionOptions { + /** The coverage identifier, defaults to the first coverage. */ + coverageId?: string; + /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */ + version?: string; + } + export interface WCSLayerOptions { + /** The coverage identifier, defaults to the first coverage. */ + coverageId?: string; + /** Sets the layer's draw mode. */ + drawMode?: boolean; + /** Sets the context of the Canvas. */ + drawType?: string; + /** A function that takes a pixelData object as input and processes it. */ + pixelFilter?: Function; + /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */ + version?: string; + /** A WCS Connection object. */ + wcsConnection?: WCSConnection; + } export interface WFSLayerOptions { - /** Full WFS body request sent to WFS server via POST method. */ - getFeatureRequest?: string; - /** URL used when executing getFeature request. */ - getFeatureUrl?: string; + /** Use this to append custom parameters to WFS requests. */ + customParameters?: any; /** The template that defines the content to display in the map info window when the user clicks on a feature. */ infoTemplate?: InfoTemplate; - /** For "ondemand" mode only. */ - inverseFilter?: boolean; - /** When true, the XY coordinates should be swapped (this is required for some WFS vendors, versions, and WKIDS). */ - inverseResponse?: boolean; /** Specifies the maximum number of features to return in one response. */ maxFeatures?: number; /** The query mode for the WFS layer. */ mode?: string; - /** For "ondemand" mode only. */ - nsGeometryFieldName?: string; - /** The full layer name including the namespace as a prefix. */ - nsLayerName?: string; - /** When true, more details will be printed to console when the first connection to a WFS server is established. */ - showDetails?: boolean; + /** The simple layer name (excluding the namespace). */ + name?: string; /** URL to the WFS server. */ url: string; /** OGC WFS version number. */ @@ -2235,6 +2282,10 @@ declare module "esri" { title?: string; } export interface WMSLayerOptions { + /** The customLayerParameters object used for the WMS Layer. */ + customLayerParameters?: any; + /** The customParameters object used for the WMS Layer. */ + customParameters?: any; /** Specify the map image format, valid options are png,jpg,bmp,gif,svg. */ format?: string; /** An optional resourceInfo object. */ @@ -2267,6 +2318,10 @@ declare module "esri" { title?: string; } export interface WMTSLayerOptions { + /** The customLayerParameters object used for the WMTS Layer. */ + customLayerParameters?: any; + /** The customParameters object used for the WMTS Layer. */ + customParameters?: any; /** A WMTSLayerInfo object that when ResourceInfo options are not specified the map will display the first layer in the WMTS capabilities that matches the properties specified by WMTSLayerInfo. */ layerInfo?: WMTSLayerInfo; /** When true, tile resampling is enabled. */ @@ -2783,7 +2838,7 @@ declare module "esri/TimeExtent" { * Returns a new time extent indicating the intersection between "this" and the argument time extent. * @param timeExtent The input time extent. */ - intersection(timeExtent: number): TimeExtent; + intersection(timeExtent: TimeExtent): TimeExtent; /** * Returns a new time extent with the given offset from "this' time extent. * @param offsetValue The length of time to offset from "this" time extent. @@ -2946,7 +3001,7 @@ declare module "esri/arcgis/Portal" { /** The prefix selected by the organization's administrator to be used with the customBaseURL. */ urlKey: string; /** User information for the accessing user is returned only when a token is passed in. */ - user: any; + user: PortalUser; /** If true, only simple where clauses that are complaint with SQL92 can be used when querying layers and tables. */ useStandardizedQuery: boolean; /** @@ -3951,6 +4006,8 @@ declare module "esri/dijit/ElevationProfile" { startup(): void; /** Fires when the elevation profile is cleared. */ on(type: "clear-profile", listener: (event: { target: ElevationProfile }) => void): esri.Handle; + /** Fires after the profile is generated. */ + on(type: "elevation-values", listener: (event: { data: any; target: ElevationProfile }) => void): esri.Handle; /** Fires when the widget has fully loaded. */ on(type: "load", listener: (event: { target: ElevationProfile }) => void): esri.Handle; /** Fires when the title of the elevation profile is changed */ @@ -3967,6 +4024,7 @@ declare module "esri/dijit/FeatureTable" { import FeatureLayer = require("esri/layers/FeatureLayer"); import Map = require("esri/map"); import FeatureEditResult = require("esri/layers/FeatureEditResult"); + import Graphic = require("esri/graphic"); /** Creates an instance of the FeatureTable widget within the provided DOM node. */ class FeatureTable { @@ -4012,6 +4070,10 @@ declare module "esri/dijit/FeatureTable" { selectedRows: any[]; /** Displays or hides the attachment column. */ showAttachments: boolean; + /** Displays or hides tooltips for column headers. */ + showColumnHeaderTooltips: boolean; + /** Relies on showRelatedRecords property. */ + showCyclicalRelationships: boolean; /** Displays or hides the data type of the field right under the field label in the column header. */ showDataTypes: boolean; /** Displays or hides total number of features and selected number of features in the grid header. */ @@ -4020,6 +4082,8 @@ declare module "esri/dijit/FeatureTable" { showGridHeader: boolean; /** Displays or hides 'Options' drop-down menu of the FeatureTable. */ showGridMenu: boolean; + /** Displays or hides the option to show related records in a table if the layer has pre-established relationship. */ + showRelatedRecords: boolean; /** Displays or hides the 'Statistics' option in column menus for numeric fields. */ showStatistics: boolean; /** Enables an interaction between the map and the feature table. */ @@ -4032,35 +4096,55 @@ declare module "esri/dijit/FeatureTable" { * @param srcNodeRef Reference or id of a HTML element that this dijit is rendered into. */ constructor(params: esri.FeatureTableOptions, srcNodeRef: Node | string); - /** Removes all current selections including subsets from filterSelectedRecords(). */ + /** Centers the map on combined extent of selected rows. */ + centerOnSelection(): void; + /** Removes all filters and selections in the table. */ + clearFilter(): void; + /** Removes all selections. */ clearSelection(): void; /** Destroys the FeatureTable widget. */ destroy(): void; /** - * Allows users to see the sub-set of currently selected records (uses dGrid.query). - * @param toggle When true only a subset of currently selected features will be displayed in the FeatureTable. + * Filters the table based on the provided row ids. + * @param ids Array of row ids. */ - filterSelectedRecords(toggle: boolean): void; + filterRecordsByIds(ids: number[]): void; + /** Allows users to see the sub-set of records. */ + filterSelectedRecords(): void; /** * Queries and gets selected features from the FeatureLayer instead of the store. - * @param id Array of row ids + * @param id Row id or an array of row ids */ - getFeatureDataById(id: number[]): any; + getFeatureDataById(id: number | number[]): any; /** * Gets row object by the row ID. * @param id row ID */ getRowDataById(id: number): any; - /** Refreshes the data in the grid. */ + /** Refreshes the data in the table. */ refresh(): void; /** Resizes the grid's container. */ resize(): void; + /** + * Allows users to select rows(s) based on row id(s). + * @param ids Row id or an array of row ids + * @param scrollToRow Indicates whether the table should scroll to selected rows. + */ + selectRows(ids: number | number[], scrollToRow?: boolean): void; + /** + * Sorts a given field in ascending or descending order. + * @param field Name of the field + * @param descending Defines whether the specified field will be sorted in ascending or descending order. + */ + sort(field: string, descending?: boolean): void; /** Finalizes the creation of the widget. */ startup(): void; + /** This event fires in response to clearSelection() method. */ + on(type: "clear-selection", listener: (event: { target: FeatureTable }) => void): esri.Handle; /** Fires when the grid column is resized. */ - on(type: "column-resize", listener: (event: { target: FeatureTable }) => void): esri.Handle; + on(type: "column-resize", listener: (event: { resizeEvent: any; target: FeatureTable }) => void): esri.Handle; /** Fires when a column is hidden or shown via 'Options' drop-down menu. */ - on(type: "column-state-change", listener: (event: { target: FeatureTable }) => void): esri.Handle; + on(type: "column-state-change", listener: (event: { stateChangeEvent: any; target: FeatureTable }) => void): esri.Handle; /** Fires when grid editor field loses focus after being changed. */ on(type: "data-change", listener: (event: { target: FeatureTable }) => void): esri.Handle; /** Fires when grid editor is hidden. */ @@ -4072,19 +4156,23 @@ declare module "esri/dijit/FeatureTable" { /** Fires when an error occurs in the grid. */ on(type: "error", listener: (event: { target: FeatureTable }) => void): esri.Handle; /** Fires when grid is filtered. */ - on(type: "filter", listener: (event: { target: FeatureTable }) => void): esri.Handle; + on(type: "filter", listener: (event: { ids: number[]; target: FeatureTable }) => void): esri.Handle; /** Fires when the FeatureTable is loaded. */ on(type: "load", listener: (event: { target: FeatureTable }) => void): esri.Handle; /** Fires when the grid is refreshed. */ on(type: "refresh", listener: (event: { target: FeatureTable }) => void): esri.Handle; /** Fires when a row is deselected. */ - on(type: "row-deselect", listener: (event: { target: FeatureTable }) => void): esri.Handle; + on(type: "row-deselect", listener: (event: { event: any; target: FeatureTable }) => void): esri.Handle; /** Fires when a row is selected. */ - on(type: "row-select", listener: (event: { target: FeatureTable }) => void): esri.Handle; + on(type: "row-select", listener: (event: { event: any; target: FeatureTable }) => void): esri.Handle; + /** Fires when attachment is displayed in the table. */ + on(type: "show-attachments", listener: (event: { attachments: any; dialog: any; featureId: number; target: FeatureTable }) => void): esri.Handle; + /** Fires when related records are displayed in the table. */ + on(type: "show-related-records", listener: (event: { features: Graphic[]; relationship: any; row: any; target: FeatureTable }) => void): esri.Handle; /** Fires when the statistics dialog box shows the calculated statistics on a column with numeric data. */ on(type: "show-statistics", listener: (event: { statistics: any; target: FeatureTable }) => void): esri.Handle; /** Fires when a column is sorted. */ - on(type: "sort", listener: (event: { target: FeatureTable }) => void): esri.Handle; + on(type: "sort", listener: (event: { sortEvent: any; target: FeatureTable }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; } export = FeatureTable; @@ -4168,7 +4256,7 @@ declare module "esri/dijit/Geocoder" { import GraphicsLayer = require("esri/layers/GraphicsLayer"); import Symbol = require("esri/symbols/Symbol"); - /** Starting with version 3.13, the Search Widget supersedes the Geocoder Widget and is deprecated. */ + /** The Geocoder widget was deprecated in version 3.13 and replaced by the Search widget. */ class Geocoder { /** Currently selected locator object. */ activeGeocoder: any; @@ -9403,6 +9491,8 @@ declare module "esri/layers/FeatureLayer" { labelingInfo: LabelClass[]; /** Unique ID of the layer that the FeatureLayer was constructed against. */ layerId: number; + /** The maximum allowable offset, only applicable for layers that are not editable. */ + maxAllowableOffset: number; /** The maximum number of results that will be returned from a query. */ maxRecordCount: number; /** Maximum visible scale for the layer. */ @@ -10914,7 +11004,7 @@ declare module "esri/layers/VectorTileLayer" { import SpatialReference = require("esri/SpatialReference"); import TileInfo = require("esri/layers/TileInfo"); - /** A VectorTileLayer accesses cached tiles of data and renders it in vector format. */ + /** A VectorTileLayer renders cached tiles of data. */ class VectorTileLayer extends Layer { /** The full extent of the layer. */ fullExtent: Extent; @@ -10946,6 +11036,224 @@ declare module "esri/layers/VectorTileLayer" { export = VectorTileLayer; } +declare module "esri/layers/WCSConnection" { + import esri = require("esri"); + import WCSCoverageDescription = require("esri/layers/WCSCoverageDescription"); + import DimensionalDefinition = require("esri/layers/DimensionalDefinition"); + + /** (Currently in beta), a helper class to discover available coverages in an OGC Web Coverage Service. */ + class WCSConnection { + /** Resamples pixel by bilinear interpolation. */ + static INTERPOLATION_BILINEAR: any; + /** Resamples pixel by cubic convolution. */ + static INTERPOLATION_CUBICCONVOLUTION: any; + /** Resamples pixel by nearest neighbor. */ + static INTERPOLATION_NEARESTNEIGHBOR: any; + /** An array of coverages offered by the WCS server. */ + coverages: WCSCoverageDescription[]; + /** Multiple dimensional definitions are usually used to filter data. */ + multidimensionalDefinition: DimensionalDefinition[]; + /** The name of the WCS server. */ + name: string; + /** Key-value pairs for URLs of different WCS operations: GetCapabilitiesDescribeCoverage */ + onlineResources: any; + /** An array of string values indicating WCS 2.0.1 profiles. */ + profiles: string[]; + /** An array of supported formats by the server. */ + supportedFormats: string[]; + /** The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space. */ + supportedInterpolations: number[]; + /** An array of supported WCS versions by the server. */ + supportedVersions: string[]; + /** URL to a WCS Server endpoint. */ + url: string; + /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */ + version: string; + /** + * Creates a new WCSConnection. + * @param url URL to a WCS Server endpoint. + * @param options Optional parameters. + */ + constructor(url: string, options?: esri.WCSConnectionOptions); + /** Triggered when successfully retrieved list of coverages. */ + on(type: "onConnected", listener: (event: { target: WCSConnection }) => void): esri.Handle; + /** Triggered when an error occurred. */ + on(type: "onConnectionFailed", listener: (event: { error: Error; target: WCSConnection }) => void): esri.Handle; + on(type: string, listener: (event: any) => void): esri.Handle; + } + export = WCSConnection; +} + +declare module "esri/layers/WCSCoverageDescription" { + import Extent = require("esri/geometry/Extent"); + import Point = require("esri/geometry/Point"); + import TimeInfo = require("esri/layers/TimeInfo"); + + /** (Currently in beta), the WCSCoverageDescription models the coverage properties offered by the WCS Server. */ + class WCSCoverageDescription { + /** Resamples pixel by bilinear interpolation. */ + static INTERPOLATION_BILINEAR: any; + /** Resamples pixel by cubic convolution. */ + static INTERPOLATION_CUBICCONVOLUTION: any; + /** Resamples pixel by nearest neighbor. */ + static INTERPOLATION_NEARESTNEIGHBOR: any; + /** An array of band names. */ + bandInfo: string[]; + /** Number of columns at the source resolution. */ + columns: number; + /** The coverage description text. */ + description: string; + /** Coverage extent in the native spatial reference. */ + extent: Extent; + /** The coverage id. */ + id: string; + /** Coverage extent in WGS84. */ + lonLatEnvelope: Extent; + /** A parsed multidimensional object that describes variables and dimensions. */ + multiDimensionalInfo: any; + /** A parsed coverage description object in a structure similar to WCS Coverage Description schema. */ + nativeCoverageDescription: any; + /** Coverage's source resolution. */ + resolution: Point; + /** Number of rows at the source resolution. */ + rows: number; + /** Generalized from the following properties:SupportedFormats for WCS 1.0.0 and 1.1.xserviceParameters.supportedFormats for WCS 2.0.1. */ + supportedFormats: string[]; + /** The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space. */ + supportedInterpolations: number[]; + /** Temporal information for the layer, such as time extent. */ + timeInfo: TimeInfo; + /** The current version of the coverage. */ + version: string; + /** + * Creates a new WCSCoverageDescription. + * @param coverageDocument The coverage description XML. + * @param version The version of the coverage description document. + */ + constructor(coverageDocument: string, version: string); + } + export = WCSCoverageDescription; +} + +declare module "esri/layers/WCSLayer" { + import esri = require("esri"); + import WCSCoverageDescription = require("esri/layers/WCSCoverageDescription"); + import Extent = require("esri/geometry/Extent"); + import DimensionalDefinition = require("esri/layers/DimensionalDefinition"); + import TimeInfo = require("esri/layers/TimeInfo"); + import WCSConnection = require("esri/layers/WCSConnection"); + import Point = require("esri/geometry/Point"); + import Layer = require("esri/layers/layer"); + + /** (Currently in beta) The WCSLayer works with OGC Web Coverage Services. */ + class WCSLayer { + /** Resamples pixel by bilinear interpolation. */ + static INTERPOLATION_BILINEAR: any; + /** Resamples pixel by cubic convolution. */ + static INTERPOLATION_CUBICCONVOLUTION: any; + /** Resamples pixel by nearest neighbor. */ + static INTERPOLATION_NEARESTNEIGHBOR: any; + /** Zero-based array of current band selections. */ + bandIds: number[]; + /** A reference to a WCSCoverageDescription object. */ + coverageDescription: WCSCoverageDescription; + /** The coverage identifier, defaults to the first coverage. */ + coverageId: string; + /** The extent of the full coverage. */ + extent: Extent; + /** Raster format of the layer. */ + format: string; + /** Current interpolation method. */ + interpolation: number; + /** When the layer is loaded, the value becomes "true", and layer properties can be accessed. */ + loaded: boolean; + /** Multiple dimensional definitions are usually used to filter data. */ + multidimensionalDefinition: DimensionalDefinition[]; + /** Opacity or transparency of layer. */ + opacity: number; + /** A function that takes a pixelData object as input and processes it. */ + pixelFilter: Function; + /** The pixel type of the image service. */ + pixelType: string; + /** The projected extent in the map's spatial reference. */ + projectedFullExtent: Extent; + /** When true, the layer is suspended. */ + suspended: boolean; + /** Temporal information for the layer, such as time extent. */ + timeInfo: TimeInfo; + /** URL to a WCS Server endpoint. */ + url: string; + /** The version of WCSLayer, can be: 1.0.01.1.01.1.11.1.22.0.1 */ + version: string; + /** The visibility of the layer. */ + visible: boolean; + /** A WCS Connection object. */ + wcsConnection: WCSConnection; + /** + * Creates a new WCSLayer. + * @param url URL to a WCS Server endpoint. + * @param options Optional parameters. + */ + constructor(url: string, options?: esri.WCSLayerOptions); + /** Returns the context of the Canvas. */ + getContext(): any; + /** + * Returns an array of graphics as a Promise. + * @param mapPoint The map point location in which to identify. + */ + identify(mapPoint: Point): any; + /** Resumes layer drawing. */ + resume(): void; + /** + * Sets the opacity of the layer. + * @param opacity Value from 0 to 1, where 0 is 100% transparent and 1 has no transparency. + */ + setOpacity(opacity: number): void; + /** + * Sets a pixelFilter on the layer. + * @param pixelFilter The function defining the PixelFilter to set on the layer. + * @param doNotRefresh When true the layer will not refresh the map image. + */ + setPixelFilter(pixelFilter: Function, doNotRefresh?: boolean): void; + /** + * Determines if the layer will update its content based on the map's current time extent. + * @param use Use true to update the layer's content based on the map's current time extent. + */ + setUseMapTime(use: boolean): void; + /** + * Sets the visibility of the layer. + * @param isVisible Indicate whether to set layer visibility. + */ + setVisibility(isVisible: boolean): void; + /** Suspends layer drawing. */ + suspend(): void; + /** Fires when there is a problem retrieving a layer. */ + on(type: "error", listener: (event: { error: Error; target: WCSLayer }) => void): esri.Handle; + /** Fires after layer properties for the layer are successfully populated. */ + on(type: "load", listener: (event: { layer: Layer; target: WCSLayer }) => void): esri.Handle; + /** Fires when the layer opacity has been changed, and returns an object with the opacity value. */ + on(type: "opacity-change", listener: (event: { opacity: number; target: WCSLayer }) => void): esri.Handle; + /** This event is fired when the layer's refreshInterval is modified. */ + on(type: "refresh-interval-change", listener: (event: { target: WCSLayer }) => void): esri.Handle; + /** Fires when a layer resumes drawing. */ + on(type: "resume", listener: (event: { target: WCSLayer }) => void): esri.Handle; + /** Fires when a layer's minScale and/or maxScale is changed. */ + on(type: "scale-range-change", listener: (event: { target: WCSLayer }) => void): esri.Handle; + /** Fires when a layer's scale visibility changes. */ + on(type: "scale-visibility-change", listener: (event: { target: WCSLayer }) => void): esri.Handle; + /** Fires when a layer suspends drawing */ + on(type: "suspend", listener: (event: { target: WCSLayer }) => void): esri.Handle; + /** Fires when a layer has finished updating its content. */ + on(type: "update-end", listener: (event: { error: Error; target: WCSLayer }) => void): esri.Handle; + /** Fires when a layer begins to update its content. */ + on(type: "update-start", listener: (event: { target: WCSLayer }) => void): esri.Handle; + /** Fires when the layer visibility has been changed, and returns an object with a Boolean visible property containing the new visibility value of the layer. */ + on(type: "visibility-change", listener: (event: { visible: boolean; target: WCSLayer }) => void): esri.Handle; + on(type: string, listener: (event: any) => void): esri.Handle; + } + export = WCSLayer; +} + declare module "esri/layers/WFSLayer" { import esri = require("esri"); import GraphicsLayer = require("esri/layers/GraphicsLayer"); @@ -10957,6 +11265,8 @@ declare module "esri/layers/WFSLayer" { /** (Currently in beta) A layer for OGC Web Feature Services (WFS). */ class WFSLayer extends GraphicsLayer { + /** Use this to append custom parameters to WFS requests. */ + customParameters: any; /** An array of fields in the layer. */ fields: Field[]; /** The full extent of the layer. */ @@ -10987,6 +11297,11 @@ declare module "esri/layers/WFSLayer" { redraw(): void; /** Refreshes the features in the WFS layer. */ refresh(): void; + /** + * Sets the custom parameters used on the WFS layer. + * @param customParameters The customParameters object used append WFS requests. + */ + setCustomParameters(customParameters: any): void; /** Sets the default line symbol to be used if no renderer is specified. */ setLineSymbol(): void; /** Sets the default point symbol to be used if no renderer is specified. */ @@ -11012,12 +11327,20 @@ declare module "esri/layers/WMSLayer" { allExtents: Extent[]; /** Copyright of the WMS service. */ copyright: string; + /** Use this to append different custom parameters to WMS layer requests. */ + customLayerParameters: any; + /** Use this to append custom parameters to all WMS requests. */ + customParameters: any; /** Description of the WMS service. */ description: string; /** Extent of the WMS service. */ extent: Extent; + /** Feature info MIME type to request. */ + featureInfoFormat: string; + /** The URL for the WMS GetFeatureInfo call. */ + getFeatureInfoURL: string; /** The URL for the WMS GetMap call. */ - getMapUrl: string; + getMapURL: string; /** The map image format. */ imageFormat: string; /** List of layers in the WMS service. */ @@ -11034,12 +11357,22 @@ declare module "esri/layers/WMSLayer" { title: string; /** Version of the WMS service. */ version: string; + /** A list of layer names that represent the layers to include in the exported map. */ + visibleLayers: string[]; /** * Creates a new WMSLayer object. * @param url URL to the OGC Web Map Service. * @param options Optional parameters. */ constructor(url: string, options?: esri.WMSLayerOptions); + /** Returns the current map image format. */ + getImageFormat(): string; + /** + * Sets the custom parameters used on the WMS layer. + * @param customParameters The customParameters object used append WMS requests. + * @param customLayerParameters The customLayerParameters object used append specific WMS layer requests. + */ + setCustomParameters(customParameters: any, customLayerParameters?: any): void; /** * Set the map image format; valid values are "png", "jpg", "pdf", "bmp", "gif" and "svg". * @param format The image format. @@ -11106,6 +11439,10 @@ declare module "esri/layers/WMTSLayer" { class WMTSLayer extends TiledMapServiceLayer { /** Copyright information for the service. */ copyright: string; + /** Use this to append different custom parameters to a WMTS tile request. */ + customLayerParameters: any; + /** Use this to append custom parameters to all WMTS requests. */ + customParameters: any; /** The description of the active layer if specified in the capabilties file or the resource info. */ description: string; /** The tile format. */ @@ -11137,6 +11474,12 @@ declare module "esri/layers/WMTSLayer" { * @param WMTSLayerInfo The WMTSLayerInfo for the layer to make active. */ setActiveLayer(WMTSLayerInfo: WMTSLayerInfo): void; + /** + * Sets the custom parameters used on the WMTS layer. + * @param customParameters The customParameters object used append WMTS requests. + * @param customLayerParameters The customLayerParameters object used append specific WMTS layer requests. + */ + setCustomParameters(customParameters: any, customLayerParameters?: any): void; } export = WMTSLayer; } @@ -11315,6 +11658,47 @@ declare module "esri/layers/layer" { export = Layer; } +declare module "esri/layers/pixelfilters/StretchFilter" { + import esri = require("esri"); + + /** A stretch filter used to work with client -side pixel data to enhance raster/image appearances. */ + class StretchFilter { + /** Indicates whether to perform dynamic range adjustment using the current pixel data. */ + dra: boolean; + /** An array of gamma values, for example [0.8, 0.8, 0.8]. */ + gamma: number[]; + /** The maximum value of stretched pixels. */ + max: number; + /** Percent of pixels clipped on the right histogram tail, for example 0.25. */ + maxPercent: number; + /** The minimum value of stretched pixels. */ + min: number; + /** Percent of pixels clipped on the left histogram tail, for example 1.5. */ + minPercent: number; + /** The number of standard deviations for StandardDeviation stretch, for example 2.5. */ + numberOfStandardDeviations: number; + /** The output pixel type. */ + outputPixelType: string; + /** An array of arrays containing custom statistics objects. */ + statistics: any[][]; + /** Number indicating the various stretch types. */ + stretchType: number; + /** Indicates whether to perform non-linear gamma stretch. */ + useGamma: boolean; + /** + * Creates an instance of a StretchFilter. + * @param options Optional parameters. + */ + constructor(options?: esri.StretchFilterOptions); + /** + * It takes a pixelData object as input and processes it. + * @param pixelData The pixelData object used as filter input. + */ + filter(pixelData: any): void; + } + export = StretchFilter; +} + declare module "esri/map" { import esri = require("esri"); import Attribution = require("esri/dijit/Attribution"); @@ -11779,8 +12163,8 @@ declare module "esri/opsdashboard/ExtensionBase" { static POLYLINE: any; /** Read-only: Indicates if the host application is the Windows Operations Dashboard. */ isNative: boolean; - /** Read Only: It will list all of the Portal helper services. */ - portalHelperServices: string; + /** Read-only: It will list all of the Portal helper services. */ + portalHelperServices: any; /** Read-only: The URL to the ArcGIS.com site or in-house portal that you are currently signed in to. */ portalUrl: string; /** Get the collection of data sources from the host application. */ @@ -11838,8 +12222,11 @@ declare module "esri/opsdashboard/ExtensionConfigurationBase" { class ExtensionConfigurationBase extends ExtensionBase { /** The object that will store the Widget/MapTool/FeatureAction configuration. */ config: any; - /** Indicates that the configuration is ready to be persisted or not. */ - readyToPersistConfig: boolean; + /** + * Indicates if the configuration is ready to be persisted or not. + * @param ready Indicates that the configuration is ready to be persisted or not. + */ + readyToPersistConfig(ready: boolean): void; } export = ExtensionConfigurationBase; } @@ -14127,6 +14514,8 @@ declare module "esri/tasks/FeatureSet" { features: Graphic[]; /** Set of name-value pairs for the attribute's field and alias names. */ fieldAliases: any; + /** The array of fields. */ + fields: any[]; /** The geometry type of the FeatureSet. */ geometryType: string; /** When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. */ @@ -14379,7 +14768,7 @@ declare module "esri/tasks/GeometryService" { url: string; /** * Creates a new GeometryService object. - * @param url URL to the ArcGIS Server REST resource that represents a GeometryService, e.g., http://sampleserver6.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer. + * @param url URL to the ArcGIS Server REST resource that represents a GeometryService, https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer. */ constructor(url: string); /** @@ -15165,6 +15554,7 @@ declare module "esri/tasks/PrintParameters" { declare module "esri/tasks/PrintTask" { import esri = require("esri"); import PrintParameters = require("esri/tasks/PrintParameters"); + import DataFile = require("esri/tasks/DataFile"); /** The PrintTask class generates a printer-ready version of the map using an Export Web Map Task available with ArGIS Server 10.1 and later. */ class PrintTask { @@ -15184,7 +15574,7 @@ declare module "esri/tasks/PrintTask" { */ execute(printParameters: PrintParameters, callback?: Function, errback?: Function): any; /** Fired when the print operation is complete. */ - on(type: "complete", listener: (event: { url: string; target: PrintTask }) => void): esri.Handle; + on(type: "complete", listener: (event: { result: DataFile; target: PrintTask }) => void): esri.Handle; /** Fired when an error occurs while executing the print task. */ on(type: "error", listener: (event: { error: Error; target: PrintTask }) => void): esri.Handle; on(type: string, listener: (event: any) => void): esri.Handle; diff --git a/atom/atom.d.ts b/atom/atom.d.ts index 389d6ef16e..ac899ba5ac 100644 --- a/atom/atom.d.ts +++ b/atom/atom.d.ts @@ -946,9 +946,14 @@ declare namespace AtomCore { registry: any; repository: Object; scopeName: string; + tokenizeLines: (text: string) => any; // TBD } + + interface IGrammars { + grammarForScopeName(scope: string): IGrammar; + } interface IPane /* extends Theorist.Model */ { itemForURI: (uri:string)=>IEditor; @@ -1302,6 +1307,7 @@ declare namespace AtomCore { deserializers:IDeserializerManager; config: IConfig; commands: ICommandRegistry; + grammars: IGrammars; keymaps: IKeymapManager; keymap: IKeymapManager; packages: IPackageManager; diff --git a/auth0-js/auth0-js.d.ts b/auth0-js/auth0-js.d.ts index 1ee4ab9d7c..250c7a850e 100644 --- a/auth0-js/auth0-js.d.ts +++ b/auth0-js/auth0-js.d.ts @@ -42,6 +42,7 @@ interface Auth0ClientOptions { /** Represents a normalized UserProfile. */ interface Auth0UserProfile { email: string; + email_verified: boolean; family_name: string; gender: string; given_name: string; @@ -127,6 +128,6 @@ interface Auth0DelegationToken { declare var Auth0: Auth0Static; -declare module "auth0" { +declare module "auth0-js" { export = Auth0 } diff --git a/auth0.lock/auth0.lock.d.ts b/auth0.lock/auth0.lock.d.ts index 43d842aecc..2d74f6e6a5 100644 --- a/auth0.lock/auth0.lock.d.ts +++ b/auth0.lock/auth0.lock.d.ts @@ -92,7 +92,7 @@ interface Auth0LockConstructorOptions { initialScreen?: "login" | "signUp" | "forgotPassword"; language?: string; languageDictionary?: any; - loginAfterSignup?: boolean; + loginAfterSignUp?: boolean; mustAcceptTerms?: boolean; popupOptions?: Auth0LockPopupOptions; prefill?: { email?: string, username?: string}; diff --git a/autobahn/autobahn.d.ts b/autobahn/autobahn.d.ts index bb7a0c86ae..496738875e 100644 --- a/autobahn/autobahn.d.ts +++ b/autobahn/autobahn.d.ts @@ -211,7 +211,7 @@ declare namespace autobahn { retry_delay_jitter?: number; url?: string; protocols?: string[]; - onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler; + onchallenge?: OnChallengeHandler; realm?: string; authmethods?: string[]; authid?: string; diff --git a/autobind-decorator/autobind-decorator-tests.ts b/autobind-decorator/autobind-decorator-tests.ts new file mode 100644 index 0000000000..e428604802 --- /dev/null +++ b/autobind-decorator/autobind-decorator-tests.ts @@ -0,0 +1,43 @@ +/// + +import autobind = require('autobind-decorator'); + +class Test { + public static what: string = 'static'; + + @autobind + public static test(): void { + console.log(this.what); + } + + public constructor(public what: string) { + this.what = what; + } + + @autobind + public test(): void { + console.warn(this.what); + } +} + +const tester: Test = new Test('bind'); +const { test } = tester; +tester.test(); // warns 'bind'. +test(); // warns 'bind'. +Test.test(); // logs 'static'. + +@autobind +class Component { + public constructor(private someMember: string) { + this.someMember = someMember; + } + + public someMethod(): void { + console.error(this.someMember); + } +} + +const component: Component = new Component('React vs Angular2'); +const { someMethod } = component; +component.someMethod(); // errors 'React vs Angular2' +someMethod(); // errors 'React vs Angular2' diff --git a/autobind-decorator/autobind-decorator.d.ts b/autobind-decorator/autobind-decorator.d.ts new file mode 100644 index 0000000000..51ba89c9bf --- /dev/null +++ b/autobind-decorator/autobind-decorator.d.ts @@ -0,0 +1,10 @@ +// Type definitions for autobind-decorator v1.3.3 +// Project: https://github.com/andreypopp/autobind-decorator +// Definitions by: Ivo Stratev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'autobind-decorator' { + function autobind(target: TFunction): TFunction | void; + function autobind(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor | void; + export = autobind; +} diff --git a/autobind-decorator/autobind-decorator.ts.tscparams b/autobind-decorator/autobind-decorator.ts.tscparams new file mode 100644 index 0000000000..1ee3d05cb6 --- /dev/null +++ b/autobind-decorator/autobind-decorator.ts.tscparams @@ -0,0 +1 @@ +--experimentalDecorators diff --git a/aws-lambda/aws-lambda-tests.ts b/aws-lambda/aws-lambda-tests.ts index fd289dcb7f..f562b59d3d 100644 --- a/aws-lambda/aws-lambda-tests.ts +++ b/aws-lambda/aws-lambda-tests.ts @@ -4,46 +4,37 @@ import lambda = require('aws-lambda'); var str: string; var date: Date; -var sns: lambda.SNS; -var kinesis: lambda.Kinesis; -var recordsList: lambda.Record[]; var anyObj: any; var num: number; - -/* Records */ -var records: lambda.Records; - -recordsList = records.Records; - -/* Record */ -var record: lambda.Record; - -str = record.EventVersion; -str = record.EventSubscriptionArn; -str = record.EnventSource; -sns = record.Sns; -kinesis = record.kinesis; - -/* SNS */ -str = sns.Type; -str = sns.MessageId; -str = sns.TopicArn; -str = sns.Subject; -str = sns.Message; -date = sns.Timestamp; - -/* Kinesis */ -var kinesis: lambda.Kinesis; - -str = kinesis.data; +var identity: lambda.CognitoIdentity; +var error: Error; +var b: boolean; +var clientCtx: lambda.ClientContext; /* Context */ var context: lambda.Context; -context.log(str, anyObj); -context.fail(str); -context.succeed(str); -context.succeed(anyObj); -context.succeed(str, anyObj); +b = context.callbackWaitsForEmptyEventLoop; +str = context.functionName; +str = context.functionVersion; +str = context.invokedFunctionArn; +num = context.memoryLimitInMB; str = context.awsRequestId; -num = context.getRemainingTimeInMillis(); \ No newline at end of file +str = context.logGroupName; +str = context.logStreamName; +identity = context.identity; +clientCtx = context.clientContext; + +/* CognitoIdentity */ +var identity: lambda.CognitoIdentity; + +str = identity.cognitoIdentityId; +str = identity.cognitoIdentityPoolId; + +/* Callback */ +function callback(cb: lambda.Callback) { + cb(); + cb(null); + cb(error); + cb(null, anyObj); +} \ No newline at end of file diff --git a/aws-lambda/aws-lambda.d.ts b/aws-lambda/aws-lambda.d.ts index cdd8e2f506..c9a66a3783 100644 --- a/aws-lambda/aws-lambda.d.ts +++ b/aws-lambda/aws-lambda.d.ts @@ -1,43 +1,68 @@ // Type definitions for AWS Lambda // Project: http://docs.aws.amazon.com/lambda -// Definitions by: Michael Skarum +// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "aws-lambda" { + // Context + // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html + interface Context { + // Properties + callbackWaitsForEmptyEventLoop: boolean; + functionName: string; + functionVersion: string; + invokedFunctionArn: string; + memoryLimitInMB: number; + awsRequestId: string; + logGroupName: string; + logStreamName: string; + identity?: CognitoIdentity; + clientContext?: ClientContext; + + // Functions + getRemainingTimeInMillis(): number; - export interface Records { - Records: Record[]; - } - interface Record { - EventVersion: string; - EventSubscriptionArn: string; - EnventSource: string; - Sns: SNS; - kinesis: Kinesis; - } - interface SNS { - Type: string; - MessageId: string; - TopicArn: string; - Subject: string; - Message: string; - Timestamp: Date; - } - - interface Kinesis { - data: string; - } - - export interface Context { + // Functions for compatibility with earlier Node.js Runtime v0.10.42 log(message: string, object: any): void; fail(message: string): void; succeed(message: string): void; succeed(object: any): void; - succeed(message: string, object: any): void; - awsRequestId: string; - getRemainingTimeInMillis(): number; + succeed(message: string, object: any): void; } - - - export type Callback = (error?: Error, message?: string) => void; + + interface CognitoIdentity { + cognitoIdentityId: string; + cognitoIdentityPoolId: string; + } + + interface ClientContext { + client: ClientContextClient; + Custom?: any; + env: ClientContextEnv; + } + + interface ClientContextClient { + installationId: string; + appTitle: string; + appVersionName: string; + appVersionCode: string; + appPackageName: string; + } + + interface ClientContextEnv { + platformVersion: string; + platform: string; + make: string; + model: string; + locale: string; + } + + /** + * Optional callback parameter. + * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html + * + * @param error – an optional parameter that you can use to provide results of the failed Lambda function execution. + * @param result – an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible. + */ + export type Callback = (error?: Error, result?: any) => void; } \ No newline at end of file diff --git a/aws-sdk/aws-sdk.d.ts b/aws-sdk/aws-sdk.d.ts index cb35f34e97..d30b3af305 100644 --- a/aws-sdk/aws-sdk.d.ts +++ b/aws-sdk/aws-sdk.d.ts @@ -22,6 +22,27 @@ declare module "aws-sdk" { constructor(profile: string); } + export module CognitoIdentity { + export interface CognitoIdentityCredentialsParams { + IdentityPoolId?: string; + AccountId?: string; + Logins?: {[k: string]: any}; + + RoleArn?: string; + RoleSessionName?: string; + WebIdentityToken?: string; + ProviderId?: string; + Policy?: string; + DurationSeconds?: number; + + IdentityId?: string; + } + } + + export class CognitoIdentityCredentials extends Credentials { + constructor(params: CognitoIdentity.CognitoIdentityCredentialsParams); + } + export interface Logger { write?: (chunk: any, encoding?: string, callback?: () => void) => void; log?: (...messages: any[]) => void; @@ -49,6 +70,51 @@ declare module "aws-sdk" { stack: string; } + export interface RetryDelayOption { + base?: number; + customBackoff?: (retryCount: number) => number; + } + + export interface Ebs { + SnapshotId?: string; + VolumeSize?: number; + VolumeType?: string; + DeleteOnTermination?: boolean; + Iops?: number; + Encrypted?: boolean; + } + + export interface BlockDeviceMapping { + VirtualName?: string; + DeviceName: string; + Ebs?: Ebs; + NoDevice?: boolean; + } + + export interface InstanceMonitoring { + SpotPrice?: string; + Enabled?: boolean; + } + + export interface Filter { + Name?: string; + Values?: boolean; + } + + export interface StepAdjustment { + scalingAdjustment: number; + metricIntervalLowerBound?: number; + metricIntervalUpperBound?: number; + } + + export interface Tags { + resourceId?: string; + resourceType?: string; + key: string; + value?: string; + propagateAtLaunch?: boolean; + } + export interface Services { autoscaling?: any; cloudformation?: any; @@ -118,6 +184,37 @@ declare module "aws-sdk" { region: string; } + export class CloudFormation { + constructor(options?: CloudFormation.Options); + endpoint: Endpoint; + + cancelUpdateStack(params: CloudFormation.CancelUpdateStackParams, callback: (err: AwsError, data: any) => void): void; + continueUpdateRollback(params: CloudFormation.ContinueUpdateRollbackParams, callback: (err: AwsError, data: any) => void): void; + createChangeSet(params: CloudFormation.CreateChangeSetParams, callback: (err: AwsError, data: any) => void): void; + createStack(params: CloudFormation.CreateStackParams, callback: (err: AwsError, data: any) => void): void; + deleteChangeSet(params: CloudFormation.DeleteChangeSetParams, callback: (err: AwsError, data: any) => void): void; + deleteStack(params: CloudFormation.DeleteStackParams, callback: (err: AwsError, data: any) => void): void; + describeAccountLimits(params: CloudFormation.DescribeAccountLimitsParams, callback: (err: AwsError, data: any) => void): void; + describeChangeSet(params: CloudFormation.DescribeChangeSetParams, callback: (err: AwsError, data: any) => void): void; + describeStackEvents(params: CloudFormation.DescribeStackEventsParams, callback: (err: AwsError, data: any) => void): void; + describeStackResource(params: CloudFormation.DescribeStackResourceParams, callback: (err: AwsError, data: any) => void): void; + describeStackResources(params: CloudFormation.DescribeStackResourcesParams, callback: (err: AwsError, data: any) => void): void; + describeStacks(params: CloudFormation.DescribeStacksParams, callback: (err: AwsError, data: any) => void): void; + estimateTemplateCost(params: CloudFormation.EstimateTemplateCostParams, callback: (err: AwsError, data: any) => void): void; + executeChangeSet(params: CloudFormation.ExecuteChangeSetParams, callback: (err: AwsError, data: any) => void): void; + getStackPolicy(params: CloudFormation.GetStackPolicyParams, callback: (err: AwsError, data: any) => void): void; + getTemplate(params: CloudFormation.GetTemplateParams, callback: (err: AwsError, data: any) => void): void; + getTemplateSummary(params: CloudFormation.GetTemplateSummaryParams, callback: (err: AwsError, data: any) => void): void; + listChangeSets(params: CloudFormation.ListChangeSetsParams, callback: (err: AwsError, data: any) => void): void; + listStackResources(params: CloudFormation.ListStackResourcesParams, callback: (err: AwsError, data: any) => void): void; + listStacks(params: CloudFormation.ListStacksParams, callback: (err: AwsError, data: any) => void): void; + setStackPolicy(params: CloudFormation.SetStackPolicyParams, callback: (err: AwsError, data: any) => void): void; + signalResource(params: CloudFormation.SignalResourceParams, callback: (err: AwsError, data: any) => void): void; + updateStack(params: CloudFormation.UpdateStackParams, callback: (err: AwsError, data: any) => void): void; + validateTemplate(params: CloudFormation.ValidateTemplateParams, callback: (err: AwsError, data: any) => void): void; + waitFor(state: string, params: CloudFormation.WaitForParams, callback: (err: AwsError, data: any) => void): void; + } + export class Lambda { constructor(options?: any); endpoint: Endpoint; @@ -147,6 +244,64 @@ declare module "aws-sdk" { updateFunctionConfiguration(params: Lambda.UpdateFunctionConfigurationParams, callback: (err: AwsError, data: any) => void): void; } + export class AutoScaling { + constructor(options?: any); + endpoint: Endpoint; + + attachInstances(params: AutoScaling.AttachInstancesParams, callback: (err: AwsError, data: any) => void): void; + attachLoadBalancers(params: AutoScaling.AttachLoadBalancersParams, callback: (err: AwsError, data: any) => void): void; + attachLoadBalancerTargetGroups(param: AutoScaling.AttachLoadBalancerTargetGroupsParams, callback: (err: AwsError, data: any) => void): void; + completeLifecycleAction(param: AutoScaling.CompleteLifecycleActionParams, callback: (err: AwsError, data: any) => void): void; + createAutoScalingGroup(param: AutoScaling.CreateAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void; + createLaunchConfiguration(param: AutoScaling.CreateLaunchConfigurationParams, callback: (err: AwsError, data: any) => void): void; + createOrUpdateTags(param: AutoScaling.CreateOrUpdateTagsParams, callback: (err: AwsError, data: any) => void): void; + deleteAutoScalingGroup(param: AutoScaling.DeleteAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void; + deleteLaunchConfiguration(param: AutoScaling.DeleteLaunchConfigurationParams, callback: (err: AwsError, data: any) => void): void; + deleteLifecycleHook(param: AutoScaling.DeleteLifecycleHookParams, callback: (err: AwsError, data: any) => void): void; + deleteNotificationConfiguration(param: AutoScaling.DeleteNotificationConfigurationParams, callback: (err: AwsError, data: any) => void): void; + deletePolicy(param: AutoScaling.DeletePolicyParams, callback: (err: AwsError, data: any) => void): void; + deleteScheduledAction(param: AutoScaling.DeleteScheduledActionParams, callback: (err: AwsError, data: any) => void): void; + deleteTags(param: AutoScaling.DeleteTagsParams, callback: (err: AwsError, data: any) => void): void; + describeAccountLimits(callback: (err: AwsError, data: any) => void): void; + describeAdjustmentTypes(callback: (err: AwsError, data: any) => void): void; + describeAutoScalingGroups(param: AutoScaling.DescribeAutoScalingGroupsParams, callback: (err: AwsError, data: any) => void): void; + describeAutoScalingInstances(param: AutoScaling.DescribeAutoScalingInstancesParams, callback: (err: AwsError, data: any) => void): void; + describeAutoScalingNotificationTypes(callback: (err: AwsError, data: any) => void): void; + describeLaunchConfigurations(param: AutoScaling.DescribeLaunchConfigurationsParams, callback: (err: AwsError, data: any) => void): void; + describeLifecycleHooks(param: AutoScaling.DescribeLifecycleHooksParams, callback: (err: AwsError, data: any) => void): void; + describeLifecycleHookTypes(callback: (err: AwsError, data: any) => void): void; + describeLoadBalancers(param: AutoScaling.DescribeLoadBalancersParams, callback: (err: AwsError, data: any) => void): void; + describeLoadBalancerTargetGroups(param: AutoScaling.DescribeLoadBalancerTargetGroupsParams, callback: (err: AwsError, data: any) => void): void; + describeMetricCollectionTypes(callback: (err: AwsError, data: any) => void): void; + describeNotificationConfigurations(param: AutoScaling.DescribeNotificationConfigurationsParams, callback: (err: AwsError, data: any) => void): void; + describePolicies(param: AutoScaling.DescribePoliciesParams, callback: (err: AwsError, data: any) => void): void; + describeScalingActivities(param: AutoScaling.DescribeScalingActivitiesParams, callback: (err: AwsError, data: any) => void): void; + describeScalingProcessTypes(callback: (err: AwsError, data: any) => void): void; + describeScheduledActions(param: AutoScaling.DescribeScheduledActionsParams, callback: (err: AwsError, data: any) => void): void; + describeTags(param: AutoScaling.DescribeTagsParams, callback: (err: AwsError, data: any) => void): void; + describeTerminationPolicyTypes(callback: (err: AwsError, data: any) => void): void; + detachInstances(param: AutoScaling.DetachInstancesParams, callback: (err: AwsError, data: any) => void): void; + detachLoadBalancers(param: AutoScaling.DetachLoadBalancersParams, callback: (err: AwsError, data: any) => void): void; + detachLoadBalancerTargetGroups(param: AutoScaling.DetachLoadBalancerTargetGroupsParams, callback: (err: AwsError, data: any) => void): void; + disableMetricsCollection(param: AutoScaling.DisableMetricsCollectionParams, callback: (err: AwsError, data: any) => void): void; + enableMetricsCollection(param: AutoScaling.EnableMetricsCollectionParams, callback: (err: AwsError, data: any) => void): void; + enterStandby(param: AutoScaling.EnterStandbyParams, callback: (err: AwsError, data: any) => void): void; + executePolicy(param: AutoScaling.ExecutePolicyParams, callback: (err: AwsError, data: any) => void): void; + exitStandby(param: AutoScaling.ExitStandbyParams, callback: (err: AwsError, data: any) => void): void; + putLifecycleHook(param: AutoScaling.PutLifecycleHookParams, callback: (err: AwsError, data: any) => void): void; + putNotificationConfiguration(param: AutoScaling.PutNotificationConfigurationParams, callback: (err: AwsError, data: any) => void): void; + putScalingPolicy(param: AutoScaling.PutScalingPolicyParams, callback: (err: AwsError, data: any) => void): void; + putScheduledUpdateGroupAction(param: AutoScaling.PutScheduledUpdateGroupActionParams, callback: (err: AwsError, data: any) => void): void; + recordLifecycleActionHeartbeat(params: AutoScaling.RecordLifecycleActionHeartbeatParams, callback: (err: AwsError, data: any) => void): void; + resumeProcesses(params: AutoScaling.ResumeProcessesParams, callback: (err: AwsError, data: any) => void): void; + setDesiredCapacity(params: AutoScaling.SetDesiredCapacityParams, callback: (err: AwsError, data: any) => void): void; + setInstanceHealth(params: AutoScaling.SetInstanceHealthParams, callback: (err: AwsError, data: any) => void): void; + setInstanceProtection(params: AutoScaling.SetInstanceProtectionParams, callback: (err: AwsError, data: any) => void): void; + suspendProcesses(params: AutoScaling.SuspendProcessesParams, callback: (err: AwsError, data: any) => void): void; + terminateInstanceInAutoScalingGroup(params: AutoScaling.TerminateInstanceInAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void; + updateAutoScalingGroup(params: AutoScaling.UpdateAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void; + } + export class SQS { constructor(options?: any); endpoint: Endpoint; @@ -226,7 +381,7 @@ declare module "aws-sdk" { constructor(options?: any); endpoint: Endpoint; - getObject(params: s3.GetObjectRequest, callback: (err: Error, data: any) => void): void; + getObject(params: s3.GetObjectRequest, callback?: (err: Error, data: any) => void): any; putObject(params: s3.PutObjectRequest, callback: (err: Error, data: any) => void): void; deleteObject(params: s3.DeleteObjectRequest, callback: (err: Error, data: any) => void): void; headObject(params: s3.HeadObjectRequest, callback: (err: Error, data: any) => void): void; @@ -235,6 +390,12 @@ declare module "aws-sdk" { upload(params?: s3.PutObjectRequest, options?: s3.UploadOptions, callback?: (err: Error, data: any) => void): void; listObjects(params: s3.ListObjectRequest, callback: (err: Error, data: s3.ListObjectResponse) => void): void; listObjectsV2(params: s3.ListObjectV2Request, callback: (err: Error, data: s3.ListObjectV2Response) => void): void; + waitFor(state: string, params: s3.HeadObjectRequest, callback: (err: Error, data: any) => void): void; + + createMultipartUpload(params: any, callback: (err: Error, data: any) => void): void; + uploadPart(params: any, callback: (err: Error, data: any) => void): void; + listParts(params: any, callback: (err: Error, data: any) => void): void; + completeMultipartUpload(params: any, callback: (err: Error, data: any) => void): void; } export class STS { @@ -423,6 +584,214 @@ declare module "aws-sdk" { // =========================================================== + export module CloudFormation { + + export interface CancelUpdateStackParams { + StackName: string; + } + + export interface ContinueUpdateRollbackParams { + StackName: string; + } + + export interface CreateChangeSetParams { + StackName: string; + TemplateBody?: string; // specify either TemplateBody or TemplateURL + TemplateURL?: string; // specify either TemplateBody or TemplateURL + UsePreviousTemplate?: boolean; + Parameters?: CloudFormation.Parameter[]; + Capabilities?: string[]; // CAPABILITY_IAM | CAPABILITY_NAMED_IAM + ResourceTypes?: string[]; + NotificationARNs?: string[]; + Tags?: CloudFormation.Tag[]; + ChangeSetName: string; + ClientToken?: string; + Description?: string; + } + + export interface CreateStackParams { + StackName: string; + TemplateBody?: string; // specify either TemplateBody or TemplateURL + TemplateURL?: string; // specify either TemplateBody or TemplateURL + Parameters?: CloudFormation.Parameter[]; + DisableRollback?: boolean; // cannot specify both DisableRollback and OnFailure + TimeoutInMinutes?: number; + NotificationARNs?: string[]; + Capabilities?: string[]; + ResourceTypes?: string[]; + OnFailure?: string[]; // cannot specify both DisableRollback and OnFailure + // DO_NOTHING | ROLLBACK | DELETE + StackPolicyBody?: string[]; // cannot specify both StackPolicyBody and StackPolicyURL + StackPolicyURL?: string[]; // cannot specify both StackPolicyBody and StackPolicyURL + Tags?: CloudFormation.Tag[]; + } + + export interface DeleteChangeSetParams { + ChangeSetName: string; + StackName?: string; + } + + export interface DeleteStackParams { + StackName: string; + RetainResources?: string[]; + } + + export interface DescribeAccountLimitsParams { + NextToken?: string; + } + + export interface DescribeChangeSetParams { + ChangeSetName: string; + StackName?: string; + NextToken?: string; + } + + export interface DescribeStackEventsParams { + StackName?: string; + NextToken?: string; + } + + export interface DescribeStackResourceParams { + StackName: string; + LogicalResourceId: string; + } + + export interface DescribeStackResourcesParams { + StackName?: string; // must specify either StackName or PhysicalResourceId + LogicalResourceId?: string; + PhysicalResourceId?: string; // must specify either StackName or PhysicalResourceId + } + + export interface DescribeStacksParams { + StackName?: string; + NextToken?: string; + } + + export interface EstimateTemplateCostParams { + TemplateBody?: string; // must specify either TemplateBody or TemplateURL + // if both are passed, only TemplateBody is used + TemplateURL?: string; // must specify either TemplateBody or TemplateURL + Parameters?: CloudFormation.Parameter[]; + } + + export interface ExecuteChangeSetParams { + ChangeSetName: string; + StackName?: string; + } + + export interface GetStackPolicyParams { + StackName: string; + } + + export interface GetTemplateParams { + StackName: string; + } + + export interface GetTemplateSummaryParams { + // must specify one of the three + TemplateBody?: string; + TemplateURL?: string; + StackName?: string; + } + + export interface ListChangeSetsParams { + StackName: string; + NextToken?: string; + } + + export interface ListStackResourcesParams { + StackName: string; + NextToken?: string; + } + + export interface ListStacksParams { + NextToken?: string; + StackStatusFilter?: string[]; + } + + export interface SetStackPolicyParams { + StackName: string; + StackPolicyBody?: string; // cannot set both StackPolicyBody and StackPolicyURL + StackPolicyURL?: string; // cannot set both StackPolicyBody and StackPolicyURL + } + + export interface SignalResourceParams { + StackName: string; + LogicalResourceId: string; + UniqueId: string; + Status: string; // SUCCESS | FAILURE + } + + export interface UpdateStackParams { + StackName: string; + TemplateBody?: string; // specify either TemplateBody or TemplateURL, not both + TemplateURL?: string; // specify either TemplateBody or TemplateURL, not both + UsePreviousTemplate?: boolean; + StackPolicyDuringUpdateBody?: string; // cannot set both StackPolicyDuringUpdateBody and StackPolicyDuringUpdateURL + StackPolicyDuringUpdateURL?: string; // cannot set both StackPolicyDuringUpdateBody and StackPolicyDuringUpdateURL + Parameters?: CloudFormation.Parameter[]; + Capabilities?: string[]; // CAPABILITY_IAM | CAPABILITY_NAMED_IAM + ResourceTypes?: string[]; + StackPolicyBody?: string; // cannot set both StackPolicyBody and StackPolicyURL + StackPolicyURL?: string; // cannot set both StackPolicyBody and StackPolicyURL + NotificationARNs?: string[]; + Tags?: CloudFormation.Tag[]; + } + + export interface ValidateTemplateParams { + TemplateBody?: string; // must pass either TemplateBody or TemplateURL + // if both are specified, only TemplateBody is used + TemplateURL?: string; // must pass either TemplateBody or TemplateURL + } + + export interface WaitForParams { + StackName: string; + NextToken?: string; + } + + export interface Options { + params?: any; + endpoint?: string; + accessKeyId?: string; + secretAccessKey?: string; + sessionToken?: any; + credentials?: any; + credentialProvider?: any; + region?: string; + maxRetries?: number; + maxRedirects?: number; + sslEnabled?: boolean; + paramValidation?: any; + computeChecksums?: boolean; + convertResponseTypes?: boolean; + correctClockSkew?: boolean; + s3ForcePathStyle?: boolean; + s3BucketEndpoint?: boolean; + s3DisableBodySigning?: boolean; + retryDelayOptions?: any; + httpOptions?: any; + apiVersion?: any; + apiVersions?: any; + logger?: any; + systemClockOffset?: number; + signatureVersion?: string; + signatureCache?: boolean; + } + + export interface Parameter { + ParameterKey: string; + ParameterValue: string; + UsePreviousValue?: boolean; // if you specify true, do not specify ParameterValue + } + + export interface Tag { + Key: string; + Value: string; + } + } + + // =========================================================== + export module Lambda { export interface AddPermissionParams { @@ -592,6 +961,355 @@ declare module "aws-sdk" { } } + export module AutoScaling { + export interface AutoScalingOptions { + params?: any; + endpoint?: string; + accessKeyId?: string; + secretAccessKey?: string; + sessionToken?: Credentials; + credentials?: Credentials; + credentialProvider?: any; + region?: string; + maxRetries?: number; + maxRedirects?: number; + sslEnabled?: boolean; + paramValidation?: boolean; + computeChecksums?: boolean; + convertResponseTypes?: boolean; + correctClockSkew?: boolean; + s3ForcePathStyle?: boolean; + s3BucketEndpoint?: boolean; + s3DisableBodySigning?: boolean; + retryDelayOptions?: RetryDelayOption; + httpOptions?: HttpOptions; + apiVersion?: string; + apiVersions?: { [serviceName: string]: string }; + logger?: Logger; + systemClockOffset?: number; + signatureVersion?: string; + signatureCache?: boolean; + } + + export interface AttachInstancesParams { + AutoScalingGroupName: string; + InstanceIds: string[]; + } + + export interface AttachLoadBalancersParams { + AutoScalingGroupName: string; + LoadBalancerNames: string[]; + } + + export interface AttachLoadBalancerTargetGroupsParams { + AutoScalingGroupName: string; + TargetGroupARNs: string[]; + } + + export interface CompleteLifecycleActionParams { + AutoScalingGroupName: string; + LifecycleActionResult: string; + LifecycleHookName: string; + lifecycleActionToken?: string; + InstanceId?: string; + } + + export interface CreateAutoScalingGroupParams { + AutoScalingGroupName: string; + MinSize: number; + MaxSize: number; + LaunchConfigurationName?: string; + InstanceId?: string; + DesiredCapacity?: number; + DefaultCooldown?: number; + AvailabilityZones?: string[]; + LoadBalancerNames?: string[]; + TargetGroupARNs?: string[]; + HealthCheckType?: string; + HealthCheckGracePeriod?: number; + PlacementGroup?: string; + VPCZoneIdentifier?: string; + TerminationPolicies?: string; + NewInstancesProtectedFromScaleIn?: boolean; + Tags?: Tags; + } + + export interface CreateLaunchConfigurationParams { + LaunchConfigurationName: string; + AssociatePublicIpAddress?: boolean; + ImageId?: string; + KeyName?: string; + SecurityGroups?: string[]; + ClassicLinkVPCId?: string; + ClassicLinkVPCSecurityGroups?: string[]; + UserData?: string; + InstanceId?: string; + InstanceType?: string; + KernelId?: string; + RamdiskId?: string; + BlockDeviceMappings?: BlockDeviceMapping[]; + InstanceMonitoring?: InstanceMonitoring; + SpotPrice?: string; + IamInstanceProfile?: string; + EbsOptimized?: boolean; + PlacementTenancy?: string; + } + + export interface CreateOrUpdateTagsParams { + Tags: Tags[]; + } + + export interface DeleteAutoScalingGroupParams { + AutoScalingGroupName: string; + ForceDelete?: boolean; + } + + export interface DeleteLaunchConfigurationParams { + LaunchConfigurationName: string; + } + + export interface DeleteLifecycleHookParams { + AutoScalingGroupName: string; + LifecycleHookName: string; + } + + export interface DeleteNotificationConfigurationParams { + AutoScalingGroupName: string; + TopicARN: string; + } + + export interface DeletePolicyParams { + PolicyName: string; + AutoScalingGroupName?: string; + } + + export interface DeleteScheduledActionParams { + AutoScalingGroupName: string; + ScheduledActionName: string; + } + + export interface DeleteTagsParams { + Tags: Tags[]; + } + + export interface DescribeAutoScalingGroupsParams { + AutoScalingGroupName?: string; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeAutoScalingInstancesParams { + InstanceIds?: string[]; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeLaunchConfigurationsParams { + LaunchConfigurationNames?: string[]; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeLifecycleHooksParams { + AutoScalingGroupName: string; + LifecycleHookNames?: string[]; + } + + export interface DescribeLoadBalancersParams { + AutoScalingGroupName: string; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeLoadBalancerTargetGroupsParams { + AutoScalingGroupName: string; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeNotificationConfigurationsParams { + AutoScalingGroupName?: string; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribePoliciesParams { + AutoScalingGroupName?: string; + PolicyNames?: string[]; + PolicyTypes?: string[]; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeScalingActivitiesParams { + AutoScalingGroupName?: string; + ActivityIds?: string[]; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeScheduledActionsParams { + AutoScalingGroupName?: string; + ScheduledActionNames?: string[]; + StartTime?: Date; + EndTime?: Date; + NextToken?: string; + MaxRecords?: number; + } + + export interface DescribeTagsParams { + Filters?: Filter[]; + NextToken?: string; + MaxRecords?: number; + } + + export interface DetachInstancesParams { + AutoScalingGroupName: string; + ShouldDecrementDesiredCapacity: boolean; + InstanceIds?: string[]; + } + + export interface DetachLoadBalancersParams { + AutoScalingGroupName: string; + LoadBalancerNames: string; + } + + export interface DetachLoadBalancerTargetGroupsParams { + AutoScalingGroupName: string; + TargetGroupARNs: string[]; + } + + export interface DisableMetricsCollectionParams { + AutoScalingGroupName: string; + Metrics?: string[]; + } + + export interface EnableMetricsCollectionParams { + AutoScalingGroupName: string; + Granularity: string; + Metrics?: string[]; + } + + export interface EnterStandbyParams { + AutoScalingGroupName: string; + ShouldDecrementDesiredCapacity: boolean; + InstanceIds?: string[]; + } + + export interface ExecutePolicyParams { + PolicyName: string; + AutoScalingGroupName?: string; + HonorCooldown?: boolean; + MetricValue?: number; + BreachThreshold?: number; + } + + export interface ExitStandbyParams { + AutoScalingGroupName: string; + InstanceIds?: string[]; + } + + export interface PutLifecycleHookParams { + AutoScalingGroupName: string; + LifecycleHookName: string; + LifecycleTransition?: string; + RoleARN?: string; + NotificationTargetARN?: string; + NotificationMetadata?: string; + HeartbeatTimeout?: number; + DefaultResult?: string; + } + + export interface PutNotificationConfigurationParams { + AutoScalingGroupName: string; + NotificationTypes: string[]; + TopicARN: string; + } + + export interface PutScalingPolicyParams { + AutoScalingGroupName: string; + AdjustmentType: string; + PolicyName: string; + PolicyType?: string; + MinAdjustmentStep?: number; + MinAdjustmentMagnitude?: number; + ScalingAdjustment?: number; + Cooldown?: number; + MetricAggregationType?: string; + StepAdjustments?: StepAdjustment[]; + EstimatedInstanceWarmup: number; + } + + export interface PutScheduledUpdateGroupActionParams { + AutoScalingGroupName: string; + ScheduledActionName: string; + Time?: Date; + StartTime?: Date; + EndTime?: Date; + Recurrence?: string; + MinSize?: number; + MaxSize?: number; + DesiredCapacity?: number; + } + + export interface RecordLifecycleActionHeartbeatParams { + AutoScalingGroupName: string; + LifecycleHookName: string; + LifecycleActionToken?: string; + InstanceId?: string; + } + + export interface ResumeProcessesParams { + AutoScalingGroupName: string; + ScalingProcesses?: string[]; + } + + export interface SetDesiredCapacityParams { + AutoScalingGroupName: string; + DesiredCapacity: number; + HonorCooldown?: boolean; + } + + export interface SetInstanceHealthParams { + HealthStatus: string; + InstanceId: string; + ShouldRespectGracePeriod?: boolean; + } + + export interface SetInstanceProtectionParams { + AutoScalingGroupName: string; + InstanceIds: string[]; + ProtectedFromScaleIn: boolean; + } + + export interface SuspendProcessesParams { + AutoScalingGroupName: string; + ScalingProcesses?: string[]; + } + + export interface TerminateInstanceInAutoScalingGroupParams { + InstanceId: string; + ShouldDecrementDesiredCapacity: boolean; + } + + export interface UpdateAutoScalingGroupParams { + AutoScalingGroupName: string; + LaunchConfigurationName: string; + MinSize: number; + MaxSize: number; + DesiredCapacity: number; + DefaultCooldown: number; + AvailabilityZones: string[]; + HealthCheckType: string; + HealthCheckGracePeriod: number; + PlacementGroup: string; + VPCZoneIdentifier: string; + TerminationPolicies: string[]; + NewInstancesProtectedFromScaleIn?: boolean; + } + } + + export module SQS { export interface SqsOptions { diff --git a/axe-core/axe-core-tests.ts b/axe-core/axe-core-tests.ts new file mode 100644 index 0000000000..7decb865c2 --- /dev/null +++ b/axe-core/axe-core-tests.ts @@ -0,0 +1,91 @@ +/// + +var context:any = document +var $fixture:any = {} + +// axe.a11yCheck config +axe.a11yCheck(context, {}, (results) => { + // axe's results object + console.log(results.passes.length) + console.log(results.violations.length) +}); +// axe.a11yCheck include/exclude +axe.a11yCheck({include: [['#id1'], ['#id2']]}, {}, (results) => { + console.log(results) +}) +axe.a11yCheck({exclude: [$fixture[0]]}, {}, (results) => { + console.log(results) +}) +var tagConfigRunOnly: axe.RunOnly = { + type: 'tag', + values: ['wcag2a'] +} +var tagConfig = { + runOnly: tagConfigRunOnly +} +axe.a11yCheck(context, tagConfig, (results) => { + console.log(results) +}) +var includeExcludeTagsRunOnly: axe.RunOnly = { + type: 'tags', + value: { + include: ['wcag2a', 'wcag2aa'], + exclude: ['experimental'] + } +} +var includeExcludeTagsConfig = { + runOnly: includeExcludeTagsRunOnly +} +axe.a11yCheck(context, includeExcludeTagsConfig, (results) => { + console.log(results) +}) +var someRulesConfig = { + rules: { + "color-contrast": {enabled: 'false'}, + "heading-order": {enabled: 'true'} + } +} +axe.a11yCheck(context, someRulesConfig, (results) => { + console.log(results) +}) + +// axe.configure +var spec: axe.Spec = { + branding: { + brand: 'foo', + application: 'bar' + }, + reporter: 'v1', + checks: [{ + id: 'custom-check', + evaluate: function() { + return true + } + }], + rules: [{ + id: 'custom-rule', + any: ['custom-check'] + }] +} +axe.configure(spec) + +axe.reset() + +axe.getRules(['wcag2aa']) +typeof axe.getRules() === 'object' + +// Plugins +var pluginSrc: axe.AxePlugin = { + id: 'doStuff', + run: (data:any, callback:Function) => { + callback() + }, + commands: [{ + id: 'run-doStuff', + callback: (data:any, callback:Function) => { + axe.plugins['doStuff'].run(data, callback) + } + }] +} +axe.registerPlugin(pluginSrc) +axe.cleanup() diff --git a/axe-core/axe-core.d.ts b/axe-core/axe-core.d.ts new file mode 100644 index 0000000000..98818e75cc --- /dev/null +++ b/axe-core/axe-core.d.ts @@ -0,0 +1,159 @@ +// Type definitions for axe-core 2.0.5 +// Project: https://github.com/dequelabs/axe-core +// Definitions by: Marcy Sutton +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace axe { + + export type ImpactValue = "minor" | "moderate" | "serious" | "critical"; + + export type TagValue = "wcag2a" | "wcag2aa" | "section508" | "best-practice"; + + export type ReporterVersion = "v1" | "v2"; + + export type RunOnlyType = "rule" | "rules" | "tag" | "tags"; + + export interface ElementContext { + node?: Object, + selector?: string, + include?: any[], + exclude?: any[] + } + export interface RunOnly { + type: RunOnlyType, + value?: { + include?: string[], + exclude?: string[] + } + values?: TagValue[] + } + export interface AxeResults { + url: string, + timestamp: string, + passes: Pass[], + violations: Violation[] + } + export interface Pass { + description: string, + help: string, + helpUrl: string, + id: string, + impact: ImpactValue, + tags: TagValue[], + nodes: NodeResult[] + } + export interface Violation { + description: string, + help: string, + helpUrl: string, + id: string, + impact: ImpactValue, + tags: TagValue[], + nodes: NodeResult[] + } + export interface NodeResult { + html: string, + impact: ImpactValue, + target: string[], + any: CheckResult[], + all: CheckResult[], + none: CheckResult[] + } + export interface CheckResult { + id: string, + impact: string, + message: string, + data: any, + relatedNodes?: RelatedNode[] + } + export interface RelatedNode { + target: string[], + html: string + } + export interface Spec { + branding?: { + brand: string, + application: string + }, + reporter?: ReporterVersion, + checks?: Check[], + rules?: Rule[] + } + export interface Check { + id: string, + evaluate: Function, + after?: Function, + options?: any, + matches?: string, + enabled?: boolean + } + export interface Rule { + id: string, + selector?: string, + excludeHidden?: boolean, + enabled?: boolean, + pageLevel?: boolean, + any?: string[], + all?: string[], + none?: string[], + tags?: string[], + matches?: string + } + export interface AxePlugin { + id: string, + run(...args:any[]): any, + commands: { + id: string, + callback(...args:any[]): void + }[], + cleanup?(callback:Function): void + } + + export let plugins: any + + /** + * Starts analysis on the current document and its subframes + * + * @param {Object} context The `Context` specification object @see Context + * @param {Array} options Options passed into rules or checks, temporarily modifyint them. + * @param {Function} callback The function to invoke when analysis is complete. + * @returns {Object} results The aXe results object + */ + export function a11yCheck(context: ElementContext, options: {runOnly?: RunOnly, rules?: Object}, callback: (results:AxeResults) => void): AxeResults + + /** + * Method for configuring the data format used by aXe. Helpful for adding new + * rules, which must be registered with the library to execute. + * @param {Spec} Spec Object with valid `branding`, `reporter`, `checks` and `rules` data + */ + export function configure(spec: Spec): void + + /** + * Searches and returns rules that contain a tag in the list of tags. + * @param {Array} tags Optional array of tags + * @return {Array} Array of rules + */ + export function getRules(tags?: string[]): Object[] + + /** + * Restores the default axe configuration + */ + export function reset(): void + + /** + * Function to register a plugin configuration in document and its subframes + * @param {Object} plugin A plugin configuration object + */ + export function registerPlugin(plugin: AxePlugin): void + + /** + * Function to clean up plugin configuration in document and its subframes + */ + export function cleanup(): void + +} + +// axe is also available as a module +declare module "axe-core" { + export = axe; +} diff --git a/azure-mobile-apps/azure-mobile-apps-tests.ts b/azure-mobile-apps/azure-mobile-apps-tests.ts index 093932c2fb..f8f3bcef52 100644 --- a/azure-mobile-apps/azure-mobile-apps-tests.ts +++ b/azure-mobile-apps/azure-mobile-apps-tests.ts @@ -8,7 +8,7 @@ import queries = require('azure-mobile-apps/src/query'); var app = express(), mobileApp = mobileApps(); -// various configuration permutations +// various configuration permutations mobileApps({ debug: true, data: { @@ -17,7 +17,8 @@ mobileApps({ user: '', database: '', password: '' - } + }, + webhook: { url: 'http://localhost/' } }); mobileApps({ @@ -29,7 +30,7 @@ mobileApps({ // it would be nice to integrate with winston mobileApps({ logging: { level: 'silly', transports: [{}] } }) -// various custom middleware syntaxes +// various custom middleware syntaxes mobileApp.use(function (req: any, res: any, next: any) { next(); }); mobileApp.use([function () {}, function () {}]); mobileApp.use(function () {}, function () {}); @@ -43,6 +44,9 @@ mobileApp.tables.import('tables'); mobileApp.api.add('api', { authorize: true, get: function () {}, delete: function () {} }); mobileApp.api.import('api'); +// ensure the mobile app instance can be correctly mounted as an express router +app.use(mobileApp); + // Express.Table, instantiated from the mobile app var table = mobileApp.table() table.use(function (req: Express.Request, res: Express.Response, next: any) { @@ -61,21 +65,45 @@ table.read(function (context: Azure.MobileApps.Context) { table.insert(function (context: Azure.MobileApps.Context) { context.query.id = 'anotherId'; context.query.single = true; - context.item.userId = context.user.id; + context.item.userId = context.user.id; context.push.send('tag', {}, function (error, result) {}); context.push.gcm.send('tag', {}, function (error, result) {}); context.push.apns.send('tag', { payload: { } }, function (error, result) {}); context.push.wns.sendToastText01('tag', '', { headers: { } }, function (error, result) {}); + context.next(new Error()); + context.next('An error occurred'); }); table.read.use(function () {}); table.read.use([function () {}, function () {}]); table.read.use(function () {}, function () {}); -table.use(function () {}).use(function () {}).read(function () {}).use(function () {}) +table.use(function () {}).use(function () {}).read(function () {}).use(function () {}); + +table.access = undefined; +table.access = 'authenticated'; +table.read.access = 'anonymous'; +table.update.access = 'disabled'; +table.delete.access = 'authenticated'; +table.insert.access = 'authenticated'; + +table.filters = [function (query, context) { }]; +table.transforms = [function (item, context) { }]; +table.hooks = [function (results, context) { }]; + +table.perUser = true; +table.recordsExpire = { milliseconds: 1, seconds: 1, minutes: 1, hours: 1, days: 1, weeks: 1, months: 1, years: 1 }; +table.webhook = { url: 'http://localhost/' } +table.webhook = true; // Express.Table, instantiated from the static require('azure-mobile-apps').table() // This is going to be interesting if we ever support more than one provider var table2 = mobileApps.table(); -table2.read(function (context: Azure.MobileApps.Context) {}) +table2.read(function (context: Azure.MobileApps.Context) {}); + +// ApiDefinition, from the static require('azure-mobile-apps').api() +var api2 = mobileApps.api({ + get: function (req, res, next) { } +}); +api2.post = function (req, res, next) {}; // Logger logger.silly('test', 'message'); @@ -83,5 +111,15 @@ logger.error('Something happened', new Error()); mobileApps.logger.debug('a debug message') // Query -queries.create('table').where({ x: 10 }).select('col1,col2'); -mobileApps.query.create('table'); \ No newline at end of file +queries.create('table').where({ x: 10 }).select('col1,col2').includeDeleted().includeTotalCount(); +mobileApps.query.create('table'); + +// Custom SQL query +mobileApp.api.add('query', { authorize: true, get: (req, res, next) => { + req.azureMobile.data.execute({ + sql: "SELECT * FROM TODOITEM WHERE COMPLETE = :complete", + parameters: [ + { name: 'complete', value: 1 } + ] + }).then(x => {}); +}, delete: function () {} }); diff --git a/azure-mobile-apps/azure-mobile-apps.d.ts b/azure-mobile-apps/azure-mobile-apps.d.ts index 0a42fa9ecf..54aaa66f8b 100644 --- a/azure-mobile-apps/azure-mobile-apps.d.ts +++ b/azure-mobile-apps/azure-mobile-apps.d.ts @@ -1,4 +1,4 @@ -// Type definitions for azure-mobile-apps v2.0.0-beta3 +// Type definitions for azure-mobile-apps v2.1.7 // Project: https://github.com/Azure/azure-mobile-apps-node/ // Definitions by: Microsoft Azure // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -10,6 +10,7 @@ declare module "azure-mobile-apps" { interface AzureMobileApps { (configuration?: Azure.MobileApps.Configuration): Azure.MobileApps.Platforms.Express.MobileApp; table(): Azure.MobileApps.Platforms.Express.Table; + api(definition?: Azure.MobileApps.ApiDefinition): Azure.MobileApps.ApiDefinition; logger: Azure.MobileApps.Logger; query: Azure.MobileApps.Query; } @@ -31,7 +32,7 @@ declare namespace Azure.MobileApps { // the additional Platforms namespace is required to avoid collisions with the main Express namespace export module Platforms { export module Express { - interface MobileApp { + interface MobileApp extends Middleware { configuration: Configuration; tables: Tables; table(): Table; @@ -45,14 +46,7 @@ declare namespace Azure.MobileApps { import(fileOrFolder: string): void; } - interface Table { - authorize?: boolean; - autoIncrement?: boolean; - dynamicSchema?: boolean; - name: string; - columns?: any; - schema: string; - + interface Table extends TableDefinition { use(...middleware: Middleware[]): Table; use(middleware: Middleware[]): Table; read: TableOperation; @@ -66,6 +60,7 @@ declare namespace Azure.MobileApps { (operationHandler: (context: Context) => void): Table; use(...middleware: Middleware[]): Table; use(middleware: Middleware[]): Table; + access?: AccessType; } interface Tables { @@ -132,6 +127,7 @@ declare namespace Azure.MobileApps { auth?: Configuration.Auth; cors?: Configuration.Cors; notifications?: Configuration.Notifications; + webhook?: Webhook; } export module Configuration { @@ -148,6 +144,7 @@ declare namespace Azure.MobileApps { options?: { encrypt: boolean }; schema?: string; dynamicSchema?: boolean; + filename?: string; } interface Auth { @@ -163,8 +160,9 @@ declare namespace Azure.MobileApps { interface LoggingTransport { } interface Cors { + exposeHeaders: string; maxAge?: number; - origins: string[]; + hostnames: string[]; } interface Notifications { @@ -184,7 +182,8 @@ declare namespace Azure.MobileApps { } interface QueryJs { - includeTotalCount?: boolean; + includeTotalCount(): QueryJs; + includeDeleted(): QueryJs; orderBy(properties: string): QueryJs; orderByDescending(properties: string): QueryJs; select(properties: string): QueryJs; @@ -209,27 +208,75 @@ declare namespace Azure.MobileApps { // general var nh: Azure.ServiceBus.NotificationHubService; + interface Context { query: QueryJs; id: string | number; item: any; req: Express.Request; res: Express.Response; - data: (table: TableDefinition) => Data.Table; + data: ContextData; tables: (tableName: string) => Data.Table; user: User; push: typeof nh; logger: Logger; execute(): Thenable; + next(error: string|Error): any; } + interface ContextData { + (table: TableDefinition): Data.Table; + execute(q: SqlQueryDefinition): Thenable; + } + + interface SqlQueryDefinition { + sql: string; + parameters?: SqlParameterDefinition[]; + } + + interface SqlParameterDefinition { + name: string; + value: any; + } + interface TableDefinition { + access?: AccessType; authorize?: boolean; autoIncrement?: boolean; - dynamicSchema?: boolean; - name?: string; columns?: any; + databaseTableName?: string; + dynamicSchema?: boolean; + maxTop?: number; + name?: string; + pageSize?: number; schema?: string; + softDelete?: boolean; + userIdColumn?: string; + + filters?: [(query: QueryJs, context: Context) => void | QueryJs]; + transforms?: [(item: any, context: Context) => void | any]; + hooks?: [(results: any, context: Context) => void]; + + perUser?: boolean; + recordsExpire?: Duration; + webhook?: Webhook | boolean; + } + + type AccessType = 'anonymous' | 'authenticated' | 'disabled'; + + interface Duration { + milliseconds?: number; + seconds?: number; + minutes?: number; + hours?: number; + days?: number; + weeks?: number; + months?: number; + years?: number; + } + + interface Webhook { + url: string; } interface ApiDefinition { diff --git a/azure-mobile-services-client/AzureMobileServicesClient.d.ts b/azure-mobile-services-client/AzureMobileServicesClient.d.ts index afd6014598..6fa0f9c475 100644 --- a/azure-mobile-services-client/AzureMobileServicesClient.d.ts +++ b/azure-mobile-services-client/AzureMobileServicesClient.d.ts @@ -17,7 +17,7 @@ declare namespace Microsoft.WindowsAzure { login(provider: string, token: string): asyncPromise; login(provider: string, callback: (error: any, user: User) => void ): void; login(provider: string): asyncPromise; - logout(): void; + logout(): asyncPromise; getTable(tableName: string): MobileServiceTable; withFilter(serviceFilter: (request: any, next: (request: any, callback: (error: any, response: any) => void) => void, callback: (error: any, response: any) => void) => void): MobileServiceClient; /** diff --git a/babel-traverse/babel-traverse.d.ts b/babel-traverse/babel-traverse.d.ts index 17cbda2f23..6970c39f6f 100644 --- a/babel-traverse/babel-traverse.d.ts +++ b/babel-traverse/babel-traverse.d.ts @@ -346,7 +346,7 @@ declare module "babel-traverse" { getData(key: string, def?: any): any; - buildCodeFrameError(msg: string, Error: Error): Error; + buildCodeFrameError(msg: string, Error?: new (msg: string) => TError): TError; traverse(visitor: Visitor, state?: any): void; diff --git a/babyparse/babyparse-tests.ts b/babyparse/babyparse-tests.ts index 29d2d22891..186351ccd5 100644 --- a/babyparse/babyparse-tests.ts +++ b/babyparse/babyparse-tests.ts @@ -329,32 +329,32 @@ var CORE_PARSER_TESTS: ParserTest[] = [ } }, // { - // description: "Comment with non-default character", - // input: 'a,b,c\n!Comment goes here\nd,e,f', - // config: { comments: '!' }, - // expected: { - // data: [['a', 'b', 'c'], ['d', 'e', 'f']], - // errors: [] - // } + // description: "Comment with non-default character", + // input: 'a,b,c\n!Comment goes here\nd,e,f', + // config: { comments: '!' }, + // expected: { + // data: [['a', 'b', 'c'], ['d', 'e', 'f']], + // errors: [] + // } // }, // { - // description: "Bad comments value specified", - // notes: "Should silently disable comment parsing", - // input: 'a,b,c\n5comment\nd,e,f', - // config: { comments: 5 }, - // expected: { - // data: [['a', 'b', 'c'], ['5comment'], ['d', 'e', 'f']], - // errors: [] - // } + // description: "Bad comments value specified", + // notes: "Should silently disable comment parsing", + // input: 'a,b,c\n5comment\nd,e,f', + // config: { comments: 5 }, + // expected: { + // data: [['a', 'b', 'c'], ['5comment'], ['d', 'e', 'f']], + // errors: [] + // } // }, // { - // description: "Multi-character comment string", - // input: 'a,b,c\n=N(Comment)\nd,e,f', - // config: { comments: "=N(" }, - // expected: { - // data: [['a', 'b', 'c'], ['d', 'e', 'f']], - // errors: [] - // } + // description: "Multi-character comment string", + // input: 'a,b,c\n=N(Comment)\nd,e,f', + // config: { comments: "=N(" }, + // expected: { + // data: [['a', 'b', 'c'], ['d', 'e', 'f']], + // errors: [] + // } // }, { description: "Input with only a commented line", @@ -419,13 +419,13 @@ var CORE_PARSER_TESTS: ParserTest[] = [ } }, // { - // description: "Fast mode with comments", - // input: '// Commented line\na,b,c', - // config: { fastMode: true, comments: "//" }, - // expected: { - // data: [['a', 'b', 'c']], - // errors: [] - // } + // description: "Fast mode with comments", + // input: '// Commented line\na,b,c', + // config: { fastMode: true, comments: "//" }, + // expected: { + // data: [['a', 'b', 'c']], + // errors: [] + // } // }, { description: "Fast mode with preview", @@ -1091,7 +1091,7 @@ function compare(actualData: any[], actualErrors: any[], expected: ParserTestExp } } - if (passed) // final check will catch any other differences + if (passed) // final check will catch any other differences passed = JSON.stringify(actual) == JSON.stringify(expected); // We pass back an object right now, even though it only contains @@ -1228,3 +1228,11 @@ var parser = new Baby.Parser({}) parser.getCharIndex(); parser.abort(); parser.parse(""); + +/** + * Parse Files + */ +Baby.parseFiles('example.csv') +Baby.parseFiles('example.csv', {encoding: 'utf-8'}) +Baby.parseFiles(['example1.csv', 'example2.txt']) +Baby.parseFiles(['example1.csv', 'example2.txt'], {encoding: 'utf-8'}) \ No newline at end of file diff --git a/babyparse/babyparse.d.ts b/babyparse/babyparse.d.ts index 6e8df86c3e..5fd9856ebc 100644 --- a/babyparse/babyparse.d.ts +++ b/babyparse/babyparse.d.ts @@ -9,6 +9,11 @@ declare namespace BabyParse { * Parse a csv string or a csv file */ parse(csvString: string, config?: ParseConfig): ParseResult; + + /** + * Parse single file or multiple files + */ + parseFiles(input: string | string[] | FileObject | FileObject[], config?: ParseConfig): ParseResult; /** * Unparses javascript data objects and returns a csv string @@ -86,6 +91,11 @@ declare namespace BabyParse { data: string | Array; } + interface FileObject { + file: string + config?: ParseConfig + } + interface ParseError { type: string; // A generalization of the error code: string; // Standardized error code diff --git a/backlog-js/backlog-js-tests.ts b/backlog-js/backlog-js-tests.ts new file mode 100644 index 0000000000..979eb57ca4 --- /dev/null +++ b/backlog-js/backlog-js-tests.ts @@ -0,0 +1,88 @@ +/// + +import * as backlogjs from 'backlog-js'; + +const host = 'example.backlog.jp'; +const apiKey = 'apiKey'; +const clientId = 'clientId'; +const clientSecret = 'clientSecret'; +const redirectUri = 'redirectUri'; +const state = 'state'; +const code = 'code'; +const refreshToken = 'refreshToken'; +const configure = { host, apiKey } +const credentials = { clientId, clientSecret } + +const oauth2 = new backlogjs.OAuth2(credentials); +oauth2.getAuthorizationURL({ host, redirectUri, state }); +oauth2.getAccessToken({ host, code, redirectUri }).then(data => {}).catch(err => {}); +oauth2.refreshAccessToken({ host, refreshToken }).then(data => {}).catch(err => {}); + +const backlog = new backlogjs.Backlog(configure); +backlog.getSpace().then(data => { }).catch(err => { }); +backlog.getSpaceActivities({ + activityTypeId: [ + backlogjs.Option.ActivityType.IssueCreated, + backlogjs.Option.ActivityType.IssueUpdated + ], + minId: 1, + maxId: 2, + count: 3, + order: "asc" +}).then(data => { }).catch(err => { }); +backlog.getSpaceDiskUsage().then(data => { }).catch(err => { }); +backlog.getSpaceIcon().then(data => { }).catch(err => { }); +backlog.postSpaceAttachment(new FormData()).then(data => { }).catch(err => { }); +backlog.getUsers().then(data => { }).catch(err => { }); +backlog.getUser(1).then(data => { }).catch(err => { }); +backlog.postUser({ + userId: 'string', + password: 'string', + name: 'string', + mailAddress: 'string', + roleType: backlogjs.Option.User.RoleType.Admin +}).then(data => { }).catch(err => { }); +backlog.patchUser(1, { + password: 'string', + name: 'string', + mailAddress: 'string', + roleType: backlogjs.Option.User.RoleType.Admin +}).then(data => { }).catch(err => { }); +backlog.deleteUser(1).then(data => { }).catch(err => { }); +backlog.getMyself().then(data => { }).catch(err => { }); +backlog.getUserActivities(1, { + activityTypeId: [ + backlogjs.Option.ActivityType.IssueCreated, + backlogjs.Option.ActivityType.IssueUpdated + ], + minId: 1, + maxId: 2, + count: 3, + order: "asc" +}).then(data => { }).catch(err => { }); +backlog.getUserStars(1, { + minId: 1, + maxId: 2, + count: 3, + order: "asc" +}).then(data => { }).catch(err => { }); +backlog.getUserStarsCount(1, { + since: 'YYYY-MM-DD', + until: 'YYYY-MM-DD' +}).then(data => { }).catch(err => { }); +backlog.getRecentlyViewedIssues({ + order: 'asc', + offset: 1, + count: 2 +}).then(data => { }).catch(err => { }); +backlog.getRecentlyViewedProjects({ + order: 'asc', + offset: 1, + count: 2 +}).then(data => { }).catch(err => { }); +backlog.getRecentlyViewedWikis({ + order: 'asc', + offset: 1, + count: 2 +}).then(data => { }).catch(err => { }); +backlog.getUserIcon(1).then(data => {}).catch(err => {}); diff --git a/backlog-js/backlog-js.d.ts b/backlog-js/backlog-js.d.ts new file mode 100644 index 0000000000..353e7e90cd --- /dev/null +++ b/backlog-js/backlog-js.d.ts @@ -0,0 +1,695 @@ +// Type definitions for backlog-js 0.9.0 +// Project: https://github.com/nulab/backlog-js +// Definitions by: Yuichi Watanabe +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// + +declare module 'backlog-js' { + + class Request { + private configure; + constructor(configure: { + host: string; + apiKey?: string; + accessToken?: string; + timeout?: number; + }); + get(path: string, params?: any): Promise; + post(path: string, params?: any): Promise; + put(path: string, params: any): Promise; + patch(path: string, params: any): Promise; + delete(path: string, params?: any): Promise; + request(options: { + method: string; + path: string; + params?: Params | FormData; + }): Promise; + checkStatus(response: IResponse): Promise; + parseJSON(response: IResponse): Promise; + private toFormData(params); + private toQueryString(params); + webAppBaseURL: string; + restBaseURL: string; + } + + type Params = { + [index: string]: number | string | number[] | string[]; + }; + + export class Backlog extends Request { + constructor(configure: { + host: string; + apiKey?: string; + accessToken?: string; + timeout?: number; + }); + getSpace(): Promise; + getSpaceActivities(params: Option.Space.GetActivitiesParams): Promise; + getSpaceNotification(): Promise; + putSpaceNotification(params: Option.Space.PutSpaceNotificationParams): Promise; + getSpaceDiskUsage(): Promise; + getSpaceIcon(): Promise; + postSpaceAttachment(form: FormData): Promise; + getUsers(): Promise; + getUser(userId: number): Promise; + postUser(params: Option.User.PostUserParams): Promise; + patchUser(userId: number, params: Option.User.PatchUserParams): Promise; + deleteUser(userId: number): Promise; + getMyself(): Promise; + getUserActivities(userId: number, params: Option.User.GetUserActivitiesParams): Promise; + getUserStars(userId: number, params: Option.User.GetUserStarsParams): Promise; + getUserStarsCount(userId: number, params: Option.User.GetUserStarsCountParams): Promise; + getRecentlyViewedIssues(params: Option.User.GetRecentlyViewedParams): Promise; + getRecentlyViewedProjects(params: Option.User.GetRecentlyViewedParams): Promise; + getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise; + getUserIcon(userId: number): Promise; + getGroups(params: Option.Group.GetGroupsParams): Promise; + postGroups(params: Option.Group.PostGroupsParams): Promise; + getGroup(groupId: number): Promise; + patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise; + deleteGroup(groupId: number): Promise; + getStatuses(): Promise; + getResolutions(): Promise; + getPriorities(): Promise; + postProject(params: Option.Project.PostProjectParams): Promise; + getProjects(params?: Option.Project.GetProjectsParams): Promise; + getProject(projectIdOrKey: string): Promise; + patchProject(projectIdOrKey: string, params: Option.Project.PatchProjectParams): Promise; + deleteProject(projectIdOrKey: string): Promise; + getProjectActivities(projectIdOrKey: string, params: Option.Space.GetActivitiesParams): Promise; + getProjectUsers(projectIdOrKey: string): Promise; + deleteProjectUsers(projectIdOrKey: string, params: Option.Project.DeleteProjectUsersParams): Promise; + postProjectAdministrators(projectIdOrKey: string, params: Option.Project.PostProjectAdministrators): Promise; + getProjectAdministrators(projectIdOrKey: string): Promise; + deleteProjectAdministrators(projectIdOrKey: string, params: Option.Project.DeleteProjectAdministrators): Promise; + getIssueTypes(projectIdOrKey: string): Promise; + postIssueType(projectIdOrKey: string, params: Option.Project.PostIssueTypeParams): Promise; + patchIssueType(projectIdOrKey: string, id: number, params: Option.Project.PatchIssueTypeParams): Promise; + deleteIssueType(projectIdOrKey: string, id: number, params: Option.Project.DeleteIssueTypeParams): Promise; + getCategories(projectIdOrKey: string): Promise; + postCategories(projectIdOrKey: string, params: Option.Project.PostCategoriesParams): Promise; + patchCategories(projectIdOrKey: string, id: number, params: Option.Project.PatchCategoriesParams): Promise; + deleteCategories(projectIdOrKey: string, id: number): Promise; + getVersions(projectIdOrKey: string): Promise; + postVersions(projectIdOrKey: string, params: Option.Project.PostVersionsParams): Promise; + patchVersions(projectIdOrKey: string, id: number, params: Option.Project.PatchVersionsParams): Promise; + deleteVersions(projectIdOrKey: string, id: number): Promise; + getCustomFields(projectIdOrKey: string): Promise; + postCustomField(projectIdOrKey: string, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise; + patchCustomField(projectIdOrKey: string, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise; + deleteCustomField(projectIdOrKey: string, id: number): Promise; + postCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise; + patchCustomFieldItem(projectIdOrKey: string, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise; + deleteCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise; + getSharedFiles(projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams): Promise; + getProjectsDiskUsage(projectIdOrKey: string): Promise; + getWebhooks(projectIdOrKey: string): Promise; + postWebhook(projectIdOrKey: string, params: Option.Project.PostWebhookParams): Promise; + getWebhook(projectIdOrKey: string, webhookId: string): Promise; + patchWebhook(projectIdOrKey: string, webhookId: string, params: Option.Project.PatchWebhookParams): Promise; + deleteWebhook(projectIdOrKey: string, webhookId: string): Promise; + postIssue(params: Option.Issue.PostIssueParams): Promise; + patchIssue(issueIdOrKey: string, params: Option.Issue.PatchIssueParams): Promise; + getIssues(params?: Option.Issue.GetIssuesParams): Promise; + getIssue(issueIdOrKey: string): Promise; + getIssuesCount(params?: Option.Issue.GetIssuesParams): Promise; + deleteIssuesCount(issueIdOrKey: string): Promise; + getIssueComments(issueIdOrKey: string, params: Option.Issue.GetIssueCommentsParams): Promise; + postIssueComments(issueIdOrKey: string, params: Option.Issue.PostIssueCommentsParams): Promise; + getIssueCommentsCount(issueIdOrKey: string): Promise; + getIssueComment(issueIdOrKey: string, commentId: number): Promise; + patchIssueComment(issueIdOrKey: string, commentId: number, params: Option.Issue.PatchIssueCommentParams): Promise; + getIssueCommentNotifications(issueIdOrKey: string, commentId: number): Promise; + postIssueCommentNotifications(issueIdOrKey: string, commentId: number, prams: Option.Issue.IssueCommentNotifications): Promise; + getIssueAttachments(issueIdOrKey: string): Promise; + deleteIssueAttachment(issueIdOrKey: string, attachmentId: string): Promise; + getIssueSharedFiles(issueIdOrKey: string): Promise; + linkIssueSharedFiles(issueIdOrKey: string, params: Option.Issue.LinkIssueSharedFilesParams): Promise; + unlinkIssueSharedFile(issueIdOrKey: string, id: number): Promise; + getWikis(projectIdOrKey: number): Promise; + getWikisCount(projectIdOrKey: number): Promise; + getWikisTags(projectIdOrKey: number): Promise; + postWiki(params: Option.Wiki.PostWikiParams): Promise; + getWiki(wikiId: number): Promise; + patchWiki(wikiId: number, params: Option.Wiki.PatchWikiParams): Promise; + deleteWiki(wikiId: number, mailNotify: boolean): Promise; + getWikisAttachments(wikiId: number): Promise; + postWikisAttachments(wikiId: number, attachmentId: number[]): Promise; + deleteWikisAttachments(wikiId: number, attachmentId: number): Promise; + getWikisSharedFiles(wikiId: number): Promise; + linkWikisSharedFiles(wikiId: number, fileId: number[]): Promise; + unlinkWikisSharedFiles(wikiId: number, id: number): Promise; + getWikisHistory(wikiId: number, params: Option.Wiki.GetWikisHistoryParams): Promise; + getWikisStars(wikiId: number): Promise; + postStar(params: Option.Project.PostStarParams): Promise; + getNotifications(params: Option.Notification.GetNotificationsParams): Promise; + getNotificationsCount(params: Option.Notification.GetNotificationsCountParams): Promise; + resetNotificationsMarkAsRead(): Promise; + markAsReadNotification(id: number): Promise; + getGitRepositories(projectIdOrKey: string): Promise; + getGitRepository(projectIdOrKey: string, repoIdOrName: string): Promise; + getPullRequests(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise; + getPullRequestsCount(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise; + postPullRequest(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.PostPullRequestParams): Promise; + getPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; + patchPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PatchPullRequestParams): Promise; + getPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.GetPullRequestCommentsParams): Promise; + postPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PostPullRequestCommentsParams): Promise; + getPullRequestCommentsCount(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; + patchPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, commentId: number, params: Option.PullRequest.PatchPullRequestCommentsParams): Promise; + getPullRequestAttachments(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; + deletePullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise; + getProjectIcon(projectIdOrKey: string): Promise; + getSharedFile(projectIdOrKey: string, sharedFileId: number): Promise; + getIssueAttachment(issueIdOrKey: string, attachmentId: number): Promise; + getWikiAttachment(wikiId: number, attachmentId: number): Promise; + getPullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise; + private download(path); + private upload(path, params); + private parseFileData(response); + } + + export class OAuth2 { + private credentials; + private timeout; + constructor(credentials: Option.OAuth2.Credentials, timeout?: number); + getAuthorizationURL(options: { + host: string; + redirectUri?: string; + state?: string; + }): string; + getAccessToken(options: { + host: string; + code: string; + redirectUri?: string; + }): Promise; + refreshAccessToken(options: { + host: string; + refreshToken: string; + }): Promise; + } + + import { PassThrough } from 'stream'; + export namespace Entity { + export namespace File { + export type FileData = NodeFileData | BrowserFileData; + export interface NodeFileData { + body: PassThrough; + url: string; + filename: string; + } + export interface BrowserFileData { + body: any; + url: string; + blob?: () => Promise; + } + } + export namespace OAuth2 { + export interface AccessToken { + access_token: string; + token_type: string; + expires_in: number; + refresh_token: string; + } + } + } + + + export namespace Option { + export type Order = "asc" | "desc"; + export enum ActivityType { + Undefined = -1, + IssueCreated = 1, + IssueUpdated = 2, + IssueCommented = 3, + IssueDeleted = 4, + WikiCreated = 5, + WikiUpdated = 6, + WikiDeleted = 7, + FileAdded = 8, + FileUpdated = 9, + FileDeleted = 10, + SvnCommitted = 11, + GitPushed = 12, + GitRepositoryCreated = 13, + IssueMultiUpdated = 14, + ProjectUserAdded = 15, + ProjectUserRemoved = 16, + NotifyAdded = 17, + PullRequestAdded = 18, + PullRequestUpdated = 19, + PullRequestCommented = 20, + PullRequestMerged = 21, + } + export namespace Notification { + export interface GetNotificationsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface GetNotificationsCountParams { + alreadyRead: boolean; + resourceAlreadyRead: boolean; + } + } + export namespace Space { + export interface GetActivitiesParams { + activityTypeId?: ActivityType[]; + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface PutSpaceNotificationParams { + content: string; + } + } + export namespace User { + export interface PostUserParams { + userId: string; + password: string; + name: string; + mailAddress: string; + roleType: RoleType; + } + export interface PatchUserParams { + password?: string; + name?: string; + mailAddress?: string; + roleType?: RoleType; + } + export enum RoleType { + Admin = 1, + User = 2, + Reporter = 3, + Viewer = 4, + GuestReporter = 5, + GuestViewer = 6, + } + export interface GetUserActivitiesParams { + activityTypeId?: ActivityType[]; + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface GetUserStarsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface GetUserStarsCountParams { + since?: string; + until?: string; + } + export interface GetRecentlyViewedParams { + order?: Order; + offset?: number; + count?: number; + } + } + export namespace Group { + export interface GetGroupsParams { + order?: Order; + offset?: number; + count?: number; + } + export interface PostGroupsParams { + name: string; + members?: string[]; + } + export interface PatchGroupParams { + name?: string; + members?: string[]; + } + } + export namespace Project { + export type TextFormattingRule = "backlog" | "markdown"; + export interface PostProjectParams { + name: string; + key: string; + chartEnabled: boolean; + projectLeaderCanEditProjectLeader?: boolean; + subtaskingEnabled: boolean; + textFormattingRule: TextFormattingRule; + } + export interface PatchProjectParams { + name?: string; + key?: string; + chartEnabled?: boolean; + subtaskingEnabled?: boolean; + projectLeaderCanEditProjectLeader?: boolean; + textFormattingRule?: TextFormattingRule; + archived?: boolean; + } + export interface GetProjectsParams { + archived?: boolean; + all?: boolean; + } + export interface DeleteProjectUsersParams { + userId: number; + } + export interface PostProjectAdministrators { + userId: number; + } + export interface DeleteProjectAdministrators { + userId: number; + } + export type IssueTypeColor = "#e30000" | "#990000" | "#934981" | "#814fbc" | "#2779ca" | "#007e9a" | "#7ea800" | "#ff9200" | "#ff3265" | "#666665"; + export interface PostIssueTypeParams { + name: string; + color: IssueTypeColor; + } + export interface PatchIssueTypeParams { + name?: string; + color?: IssueTypeColor; + } + export interface DeleteIssueTypeParams { + substituteIssueTypeId: number; + } + export interface PostCategoriesParams { + name: string; + } + export interface PatchCategoriesParams { + name: string; + } + export interface PostVersionsParams { + name: string; + description: string; + startDate: string; + releaseDueDate: string; + } + export interface PatchVersionsParams { + name: string; + description?: string; + startDate?: string; + releaseDueDate?: string; + archived?: boolean; + } + export interface PostCustomFieldParams { + typeId: FieldType; + name: string; + applicableIssueTypes?: number[]; + description?: string; + required?: boolean; + } + export interface PostCustomFieldWithNumericParams extends PostCustomFieldParams { + min?: number; + max?: number; + initialValue?: number; + unit?: string; + } + export interface PostCustomFieldWithDateParams extends PostCustomFieldParams { + min?: string; + max?: string; + initialValueType?: number; + initialDate?: string; + initialShift?: number; + } + export interface PostCustomFieldWithListParams extends PostCustomFieldParams { + items?: string[]; + allowInput?: boolean; + allowAddItem?: boolean; + } + export interface PatchCustomFieldParams { + name?: string; + applicableIssueTypes?: number[]; + description?: string; + required?: boolean; + } + export interface PatchCustomFieldWithNumericParams extends PatchCustomFieldParams { + min?: number; + max?: number; + initialValue?: number; + unit?: string; + } + export interface PatchCustomFieldWithDateParams extends PatchCustomFieldParams { + min?: string; + max?: string; + initialValueType?: number; + initialDate?: string; + initialShift?: number; + } + export interface PatchCustomFieldWithListParams extends PatchCustomFieldParams { + items?: string[]; + allowInput?: boolean; + allowAddItem?: boolean; + } + export interface PostCustomFieldItemParams { + name: string; + } + export interface PatchCustomFieldItemParams { + name: string; + } + export interface GetSharedFilesParams { + order?: Order; + offset?: number; + count?: number; + } + export interface PostWebhookParams { + name?: string; + description?: string; + hookUrl?: string; + allEvent?: boolean; + activityTypeIds?: number[]; + } + export interface PatchWebhookParams { + name?: string; + description?: string; + hookUrl?: string; + allEvent?: boolean; + activityTypeIds?: number[]; + } + export enum FieldType { + Text = 1, + TextArea = 2, + Numeric = 3, + Date = 4, + SingleList = 5, + MultipleList = 6, + CheckBox = 7, + Radio = 8, + } + export interface PostStarParams { + issueId?: number; + commentId?: number; + wikiId?: number; + pullRequestId?: number; + pullRequestCommentId?: number; + } + } + export namespace Issue { + export interface PostIssueParams { + projectId: number; + summary: string; + priorityId: number; + issueTypeId: number; + parentIssueId?: number; + description?: string; + startDate?: string; + dueDate?: string; + estimatedHours?: number; + actualHours?: number; + categoryId?: number[]; + versionId?: number[]; + milestoneId?: number[]; + assigneeId?: number; + notifiedUserId?: number[]; + attachmentId?: number[]; + [customField_: string]: any; + } + export interface PatchIssueParams { + summary?: string; + parentIssueId?: number; + description?: string; + statusId?: number; + resolutionId?: number; + startDate?: string; + dueDate?: string; + estimatedHours?: number; + actualHours?: number; + issueTypeId?: number; + categoryId?: number[]; + versionId?: number[]; + milestoneId?: number[]; + priorityId?: number; + assigneeId?: number; + notifiedUserId?: number[]; + attachmentId?: number[]; + comment?: string; + [customField_: string]: any; + } + export interface GetIssuesParams { + projectId?: number[]; + issueTypeId?: number[]; + categoryId?: number[]; + versionId?: number[]; + milestoneId?: number[]; + statusId?: number[]; + priorityId?: number[]; + assigneeId?: number[]; + createdUserId?: number[]; + resolutionId?: number[]; + parentChild?: ParentChildType; + attachment?: boolean; + sharedFile?: boolean; + sort?: SortKey; + order?: Order; + offset?: number; + count?: number; + createdSince?: string; + createdUntil?: string; + updatedSince?: string; + updatedUntil?: string; + startDateSince?: string; + startDateUntil?: string; + dueDateSince?: string; + dueDateUntil?: string; + id?: number[]; + parentIssueId?: number[]; + keyword: string; + [customField_: string]: any; + } + export enum ParentChildType { + All = 0, + NotChild = 1, + Child = 2, + NotChildNotParent = 3, + Parent = 4, + } + export type SortKey = "issueType" | "category" | "version" | "milestone" | "summary" | "status" | "priority" | "attachment" | "sharedFile" | "created" | "createdUser" | "updated" | "updatedUser" | "assignee" | "startDate" | "dueDate" | "estimatedHours" | "actualHours" | "childIssue"; + export interface GetIssueCommentsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface PostIssueCommentsParams { + content: string; + notifiedUserId?: number[]; + attachmentId?: number[]; + } + export interface PatchIssueCommentParams { + content: string; + } + export interface IssueCommentNotifications { + notifiedUserId: number[]; + } + export interface LinkIssueSharedFilesParams { + fileId: number[]; + } + } + export namespace PullRequest { + export interface GetPullRequestsParams { + statusId?: number[]; + assigneeId?: number[]; + issueId?: number[]; + createdUserId?: number[]; + offset?: number; + count?: number; + } + export interface PostPullRequestParams { + summary: string; + description: string; + base: string; + branch: string; + issueId?: number; + assigneeId?: number; + notifiedUserId?: number[]; + attachmentId?: number[]; + } + export interface PatchPullRequestParams { + summary?: string; + description?: string; + issueId?: number; + assigneeId?: number; + notifiedUserId?: number[]; + comment?: string[]; + } + export interface GetPullRequestCommentsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface PostPullRequestCommentsParams { + content: string; + notifiedUserId?: number[]; + } + export interface PatchPullRequestCommentsParams { + content: string; + } + } + export namespace Wiki { + export interface PostWikiParams { + projectId: number; + name: string; + content: string; + mailNotify?: boolean; + } + export interface PatchWikiParams { + name?: string; + content?: string; + mailNotify?: boolean; + } + export interface GetWikisHistoryParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + } + export namespace OAuth2 { + export interface Credentials { + clientId: string; + clientSecret: string; + } + } + } + + export namespace Error { + export class BacklogError extends global.Error { + private _name; + private _url; + private _status; + private _body; + private _response; + constructor(name: BacklogErrorNameType, response: IResponse, body?: { + errors: BacklogErrorMessage[]; + }); + name: BacklogErrorNameType; + url: string; + status: number; + body: { + errors: BacklogErrorMessage[]; + }; + response: IResponse; + } + export class BacklogApiError extends BacklogError { + constructor(response: IResponse, body?: { + errors: BacklogErrorMessage[]; + }); + } + export class BacklogAuthError extends BacklogError { + constructor(response: IResponse, body?: { + errors: BacklogErrorMessage[]; + }); + } + export class UnexpectedError extends BacklogError { + constructor(response: IResponse); + } + export interface BacklogErrorMessage { + message: string; + code: number; + errorInfo: string; + moreInfo: string; + } + export type BacklogErrorNameType = 'BacklogApiError' | 'BacklogAuthError' | 'UnexpectedError'; + } + +} diff --git a/base16/base16-tests.ts b/base16/base16-tests.ts new file mode 100644 index 0000000000..e4cf78d559 --- /dev/null +++ b/base16/base16-tests.ts @@ -0,0 +1,24 @@ +/// + +import * as base16 from 'base16'; + +const colorScheme: base16.ColorScheme = base16.solarized + +const scheme: string = colorScheme.scheme +const author: string = colorScheme.author +const base00: string = colorScheme.base00 +const base01: string = colorScheme.base01 +const base02: string = colorScheme.base02 +const base03: string = colorScheme.base03 +const base04: string = colorScheme.base04 +const base05: string = colorScheme.base05 +const base06: string = colorScheme.base06 +const base07: string = colorScheme.base07 +const base08: string = colorScheme.base08 +const base09: string = colorScheme.base09 +const base0A: string = colorScheme.base0A +const base0B: string = colorScheme.base0B +const base0C: string = colorScheme.base0C +const base0D: string = colorScheme.base0D +const base0E: string = colorScheme.base0E +const base0F: string = colorScheme.base0F diff --git a/base16/base16.d.ts b/base16/base16.d.ts new file mode 100644 index 0000000000..32717e99f2 --- /dev/null +++ b/base16/base16.d.ts @@ -0,0 +1,70 @@ +// Type definitions for base16-js 1.0.0 +// Project: https://github.com/gaearon/base16-js +// Definitions by: Alec Hill +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'base16' { + + /** + * Type describing a syntax highlighting scheme as a JS object, as used in redux dev tools + * Based on https://github.com/chriskempson/base16 + */ + export interface ColorScheme { + scheme: string + author: string + base00: string + base01: string + base02: string + base03: string + base04: string + base05: string + base06: string + base07: string + base08: string + base09: string + base0A: string + base0B: string + base0C: string + base0D: string + base0E: string + base0F: string + } + + // predefined schemes... + export var threezerotwofour: ColorScheme + export var apathy: ColorScheme + export var ashes: ColorScheme + export var atelierDune: ColorScheme + export var atelierForest: ColorScheme + export var atelierHeath: ColorScheme + export var atelierLakeside: ColorScheme + export var atelierSeaside: ColorScheme + export var bespin: ColorScheme + export var brewer: ColorScheme + export var bright: ColorScheme + export var chalk: ColorScheme + export var codeschool: ColorScheme + export var colors: ColorScheme + export var eighties: ColorScheme + export var embers: ColorScheme + export var flat: ColorScheme + export var google: ColorScheme + export var grayscale: ColorScheme + export var greenscreen: ColorScheme + export var harmonic: ColorScheme + export var hopscotch: ColorScheme + export var isotope: ColorScheme + export var marrakesh: ColorScheme + export var monokai: ColorScheme + export var ocean: ColorScheme + export var paraiso: ColorScheme + export var pop: ColorScheme + export var railscasts: ColorScheme + export var shapeshifter: ColorScheme + export var solarized: ColorScheme + export var summerfruit: ColorScheme + export var tomorrow: ColorScheme + export var tube: ColorScheme + export var twilight: ColorScheme + +} diff --git a/bit-array/bit-array-tests.ts b/bit-array/bit-array-tests.ts new file mode 100644 index 0000000000..20310b2208 --- /dev/null +++ b/bit-array/bit-array-tests.ts @@ -0,0 +1,10 @@ +/// + +import BitArray = require("bit-array"); + +const a = new BitArray(32); +a.set(0, true); +a.set(31, true); +a.toString(); // "10000000000000000000000000000001" +a.get(1); // false +a.get(31); // true \ No newline at end of file diff --git a/bit-array/bit-array-tests.ts.tscparams b/bit-array/bit-array-tests.ts.tscparams new file mode 100644 index 0000000000..85542607d1 --- /dev/null +++ b/bit-array/bit-array-tests.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny --module commonjs diff --git a/bit-array/bit-array.d.ts b/bit-array/bit-array.d.ts new file mode 100644 index 0000000000..bab3d98a46 --- /dev/null +++ b/bit-array/bit-array.d.ts @@ -0,0 +1,105 @@ +// Type definitions for bit-array v0.2.2 +// Project: https://github.com/bramstein/bit-array +// Definitions by: Mudkip +// Definitions: https://github.com/mudkipme/DefinitelyTyped + +declare module "bit-array" { + + class BitArray { + /** + * Creates a new empty BitArray with the given length or initialises the BitArray with the given hex representation. + */ + constructor(size: number, hex?: string); + + /** + * Returns the total number of bits in this BitArray. + */ + size(): number; + + /** + * Sets the bit at index to a value (boolean.) + */ + set(index: number, value: boolean): BitArray; + + /** + * Toggles the bit at index. If the bit is on, it is turned off. Likewise, if the bit is off it is turned on. + */ + toggle(index: number): BitArray; + + /** + * Returns the value of the bit at index (boolean.) + */ + get(index: number): boolean; + + /** + * Resets the BitArray so that it is empty and can be re-used. + */ + reset(): BitArray; + + /** + * Returns a copy of this BitArray. + */ + copy(): BitArray; + + /** + * Returns true if this BitArray equals another. Two BitArrays are considered + * equal if both have the same length and bit pattern. + */ + equals(x: BitArray): boolean; + + /** + * Returns the JSON representation of this BitArray. + */ + toJSON(): string; + + /** + * Returns a string representation of the BitArray with bits + * in mathemetical order. + */ + toBinaryString(): string; + + /** + * Returns a hexadecimal string representation of the BitArray + * with bits in logical order. + */ + toHexString(): string; + + /** + * Returns a string representation of the BitArray with bits + * in logical order. + */ + toString(): string; + + /** + * Convert the BitArray to an Array of boolean values (slow). + */ + toArray(): boolean[]; + + /** + * Returns the total number of bits set to one in this BitArray. + */ + count(): number; + + /** + * Inverts this BitArray. + */ + not(): BitArray; + + /** + * Bitwise OR on the values of this BitArray using BitArray x. + */ + or(x: BitArray): BitArray; + + /** + * Bitwise AND on the values of this BitArray using BitArray x. + */ + and(x: BitArray): BitArray; + + /** + * Bitwise XOR on the values of this BitArray using BitArray x. + */ + xor(x: BitArray): BitArray; + } + + export = BitArray; +} \ No newline at end of file diff --git a/blessed/blessed-tests.ts b/blessed/blessed-tests.ts new file mode 100644 index 0000000000..4e7f7002e6 --- /dev/null +++ b/blessed/blessed-tests.ts @@ -0,0 +1,773 @@ +/// + +import * as blessed from 'blessed'; + +let screen: blessed.Widgets.Screen = null; + +// https://github.com/chjj/blessed/blob/master/test/widget-autopad.js + +screen = blessed.screen({ + dump: __dirname + '/logs/autopad.log', + smartCSR: true, + autoPadding: true, + warnings: true +}); + +var box1 = blessed.box({ + parent: screen, + top: 'center', + left: 'center', + width: 20, + height: 10, + border: 'line' +}); + +var box2 = blessed.box({ + parent: box1, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line' +}); + +screen.key('q', function() { + return screen.destroy(); +}); + +screen.render(); + +// https://github.com/chjj/blessed/blob/master/test/widget-bigtext.js + +screen = blessed.screen({ + dump: __dirname + '/logs/bigtext.log', + smartCSR: true, + warnings: true +}); + +var box = blessed.bigtext({ + parent: screen, + content: 'Hello', + shrink: true, + width: '80%', + // height: '80%', + height: 'shrink', + // width: 'shrink', + border: 'line', + fch: ' ', + ch: '\u2592', + style: { + fg: 'red', + bg: 'blue', + bold: false + } +}); + +screen.key('q', function() { + return screen.destroy(); +}); + +screen.render(); + +// https://github.com/chjj/blessed/blob/master/test/widget-csr.js + +screen = blessed.screen({ + dump: __dirname + '/logs/csr.log', + smartCSR: true, + warnings: true +}); + +var lorem = require('fs').readFileSync(__dirname + '/git.diff', 'utf8'); + +var cleanSides = screen.cleanSides; +function expectClean(value: any) { + screen.cleanSides = function(el: blessed.widget.Element) { + var ret = cleanSides.apply(this, arguments); + if (ret !== value) { + throw new Error('Failed. Expected ' + + value + ' from cleanSides. Got ' + + ret + '.'); + } + return ret; + }; +} +var btext = blessed.box({ + parent: screen, + left: 'center', + top: 'center', + width: '80%', + height: '80%', + style: { + bg: 'green' + }, + border: 'line', + content: 'CSR should still work.' +}); +let _oscroll = btext.scroll; +btext.scroll = function(offset, always) { + expectClean(true); + return _oscroll(offset, always); +}; + +var text = blessed.scrollabletext({ + parent: screen, + content: lorem, + border: 'line', + left: 'center', + top: 'center', + draggable: true, + width: '50%', + height: '50%', + mouse: true, + keys: true, + vi: true +}); + +_oscroll = text.scroll; +text.scroll = function(offset, always) { + var el = this; + var value = true; + if (el.left < 0) value = true; + if (el.top < 0) value = false; + if (el.left + el.width > screen.width) value = true; + if (el.top + el.height > screen.height) value = false; + expectClean(value); + return _oscroll(offset, always); +}; + +text.focus(); + +screen.key('q', function() { + return screen.destroy(); +}); + +screen.render(); + +// https://github.com/chjj/blessed/blob/master/test/widget-dock-noborder.js + +screen = blessed.screen({ + dump: __dirname + '/logs/dock.log', + smartCSR: true, + dockBorders: true, + warnings: true +}); + +blessed.box({ + parent: screen, + left: -1, + top: -1, + width: '50%+1', + height: '50%+1', + border: 'line', + content: 'Foo' +}); + +blessed.box({ + parent: screen, + left: '50%-1', + top: -1, + width: '50%+3', + height: '50%+1', + content: 'Bar', + border: 'line' +}); + +blessed.box({ + parent: screen, + left: -1, + top: '50%-1', + width: '50%+1', + height: '50%+3', + border: 'line', + content: 'Foo' +}); + +blessed.listtable({ + parent: screen, + left: '50%-1', + top: '50%-1', + width: '50%+3', + height: '50%+3', + border: 'line', + align: 'center', + tags: true, + keys: true, + vi: true, + mouse: true, + style: { + header: { + fg: 'blue', + bold: true + }, + cell: { + fg: 'magenta', + selected: { + bg: 'blue' + } + } + }, + data: [ + [ 'Animals', 'Foods', 'Times', 'Numbers' ], + [ 'Elephant', 'Apple', '1:00am', 'One' ], + [ 'Bird', 'Orange', '2:15pm', 'Two' ], + [ 'T-Rex', 'Taco', '8:45am', 'Three' ], + [ 'Mouse', 'Cheese', '9:05am', 'Four' ] + ] +}).focus(); + +screen.key('q', function() { + return screen.destroy(); +}); + +screen.render(); + +// https://raw.githubusercontent.com/chjj/blessed/master/example/simple-form.js + +var form = blessed.form({ + parent: screen, + keys: true, + left: 0, + top: 0, + width: 30, + height: 4, + bg: 'green', + content: 'Submit or cancel?' +}); + +var submit = blessed.button({ + parent: form, + mouse: true, + keys: true, + padding: { + left: 1, + right: 1 + }, + left: 10, + top: 2, + shrink: true, + name: 'submit', + content: 'submit', + style: { + bg: 'blue', + focus: { + bg: 'red' + }, + hover: { + bg: 'red' + } + } +}); + +var cancel = blessed.button({ + parent: form, + mouse: true, + keys: true, + padding: { + left: 1, + right: 1 + }, + left: 20, + top: 2, + shrink: true, + name: 'cancel', + content: 'cancel', + style: { + bg: 'blue', + focus: { + bg: 'red' + }, + hover: { + bg: 'red' + } + } +}); + +// https://github.com/chjj/blessed/blob/master/test/widget-layout.js + +screen = blessed.screen({ + dump: __dirname + '/logs/layout.log', + smartCSR: true, + autoPadding: true, + warnings: true +}); + +var layout = blessed.layout({ + parent: screen, + top: 'center', + left: 'center', + width: '50%', + height: '50%', + border: 'line', + layout: process.argv[2] === 'grid' ? 'grid' : 'inline', + style: { + bg: 'red', + border: { + fg: 'blue' + } + } +}); + +var box1 = blessed.box({ + parent: layout, + top: 'center', + left: 'center', + width: 20, + height: 10, + border: 'line', + content: '1' +}); + +var box2 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '2' +}); + +var box3 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '3' +}); + +var box4 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '4' +}); + +var box5 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '5' +}); + +var box6 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '6' +}); + +var box7 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '7' +}); + +var box8 = blessed.box({ + parent: layout, + top: 'center', + left: 'center', + width: 20, + height: 10, + border: 'line', + content: '8' +}); + +var box9 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '9' +}); + +var box10 = blessed.box({ + parent: layout, + top: 'center', + left: 'center', + width: 20, + height: 10, + border: 'line', + content: '10' +}); + +var box11 = blessed.box({ + parent: layout, + top: 0, + left: 0, + width: 10, + height: 5, + border: 'line', + content: '11' +}); + +var box12 = blessed.box({ + parent: layout, + top: 'center', + left: 'center', + width: 20, + height: 10, + border: 'line', + content: '12' +}); + +if (process.argv[2] !== 'grid') { + for (var i = 0; i < 10; i++) { + blessed.box({ + parent: layout, + // width: i % 2 === 0 ? 10 : 20, + // height: i % 2 === 0 ? 5 : 10, + width: Math.random() > 0.5 ? 10 : 20, + height: Math.random() > 0.5 ? 5 : 10, + border: 'line', + content: (i + 1 + 12) + '' + }); + } +} + +screen.key('q', function() { + return screen.destroy(); +}); + +screen.render(); + +// https://github.com/chjj/blessed/blob/master/test/widget-form.js + +screen = blessed.screen({ + dump: __dirname + '/logs/form.log', + warnings: true +}); + +type FormData = { + radio1: boolean; + radio2: boolean; + text: string; + check: boolean; +}; + +var form2 = blessed.form({ + parent: screen, + mouse: true, + keys: true, + vi: true, + left: 0, + top: 0, + width: '100%', + //height: 12, + style: { + bg: 'green', + border: { + inverse: true + }, + scrollbar: { + inverse: true + } + }, + content: 'foobar', + scrollable: true, + scrollbar: { + ch: ' ' + } + //alwaysScroll: true +}); + +form2.on('submit', (data) => { + output.setContent(JSON.stringify(data, null, 2)); + screen.render(); +}); + +form2.key('d', function() { + form2.scroll(1, true); + screen.render(); +}); + +form2.key('u', function() { + form2.scroll(-1, true); + screen.render(); +}); + +var set = blessed.radioset({ + parent: form2, + left: 1, + top: 1, + shrink: true, + //padding: 1, + //content: 'f', + style: { + bg: 'magenta' + } +}); + +var radio1 = blessed.radiobutton({ + parent: set, + mouse: true, + keys: true, + shrink: true, + style: { + bg: 'magenta' + }, + height: 1, + left: 0, + top: 0, + name: 'radio1', + content: 'radio1' +}); + +var radio2 = blessed.radiobutton({ + parent: set, + mouse: true, + keys: true, + shrink: true, + style: { + bg: 'magenta' + }, + height: 1, + left: 15, + top: 0, + name: 'radio2', + content: 'radio2' +}); + +var text2 = blessed.textbox({ + parent: form2, + mouse: true, + keys: true, + style: { + bg: 'blue' + }, + height: 1, + width: 20, + left: 1, + top: 3, + name: 'text' +}); + +text2.on('focus', function() { + text2.readInput(); +}); + +var check = blessed.checkbox({ + parent: form2, + mouse: true, + keys: true, + shrink: true, + style: { + bg: 'magenta' + }, + height: 1, + left: 28, + top: 1, + name: 'check', + content: 'check' +}); + +var check2 = blessed.checkbox({ + parent: form2, + mouse: true, + keys: true, + shrink: true, + style: { + bg: 'magenta' + }, + height: 1, + left: 28, + top: 14, + name: 'foooooooo2', + content: 'foooooooo2' +}); + +var submit = blessed.button({ + parent: form2, + mouse: true, + keys: true, + shrink: true, + padding: { + left: 1, + right: 1 + }, + left: 29, + top: 3, + name: 'submit', + content: 'submit', + style: { + bg: 'blue', + focus: { + bg: 'red' + } + } +}); + +submit.on('press', function() { + form2.submit(); +}); + +var box1 = blessed.box({ + parent: form2, + left: 1, + top: 10, + height: 10, + width: 10, + content: 'one', + style: { + bg: 'cyan' + } +}); + +var box2 = blessed.box({ + parent: box1, + left: 1, + top: 2, + height: 8, + width: 9, + content: 'two', + style: { + bg: 'magenta' + } +}); + +var box3 = blessed.box({ + parent: box2, + left: 1, + top: 2, + height: 6, + width: 8, + content: 'three', + style: { + bg: 'yellow' + } +}); + +var box4 = blessed.box({ + parent: box3, + left: 1, + top: 2, + height: 4, + width: 7, + content: 'four', + style: { + bg: 'blue' + } +}); + +var output = blessed.scrollabletext({ + parent: form2, + mouse: true, + keys: true, + left: 0, + top: 20, + height: 5, + right: 0, + style: { + bg: 'red' + }, + content: 'foobar' +}); + +var bottom = blessed.line({ + parent: form2, + type: 'line', + orientation: 'horizontal', + left: 0, + right: 0, + top: 50, + style: { + fg: 'blue' + } +}); + +screen.key('q', function() { + return screen.destroy(); +}); + +form2.focus(); + +form2.submit(); + +screen.render(); + +// https://github.com/chjj/blessed/blob/master/test/widget-table.js + +screen = blessed.screen({ + dump: __dirname + '/logs/table.log', + autoPadding: false, + fullUnicode: true, + warnings: true +}); + +var DU = '杜'; +var JUAN = '鹃'; + +var table = blessed.table({ + //parent: screen, + top: 'center', + left: 'center', + data: null, + border: 'line', + align: 'center', + tags: true, + //width: '80%', + width: 'shrink', + style: { + border: { + fg: 'red' + }, + header: { + fg: 'blue', + bold: true + }, + cell: { + fg: 'magenta' + } + } +}); + +var data1 = [ + [ 'Animals', 'Foods', 'Times' ], + [ 'Elephant', 'Apple', '1:00am' ], + [ 'Bird', 'Orange', '2:15pm' ], + [ 'T-Rex', 'Taco', '8:45am' ], + [ 'Mouse', 'Cheese', '9:05am' ] +]; + +data1[1][0] = '{red-fg}' + data1[1][0] + '{/red-fg}'; +data1[2][0] += ' (' + DU + JUAN + ')'; + +var data2 = [ + [ 'Animals', 'Foods', 'Times', 'Numbers' ], + [ 'Elephant', 'Apple', '1:00am', 'One' ], + [ 'Bird', 'Orange', '2:15pm', 'Two' ], + [ 'T-Rex', 'Taco', '8:45am', 'Three' ], + [ 'Mouse', 'Cheese', '9:05am', 'Four' ] +]; + +data2[1][0] = '{red-fg}' + data2[1][0] + '{/red-fg}'; +data2[2][0] += ' (' + DU + JUAN + ')'; + +screen.key('q', function() { + return screen.destroy(); +}); + +table.setData(data2); +screen.append(table); +screen.render(); + +setTimeout(function() { + table.setData(data1); + screen.render(); +}, 3000); diff --git a/blessed/blessed.d.ts b/blessed/blessed.d.ts index 6746afe5f5..cb9bd393ed 100644 --- a/blessed/blessed.d.ts +++ b/blessed/blessed.d.ts @@ -1,1256 +1,155 @@ -// Type definitions for blessed 0.1.5 +// Type definitions for blessed 0.1.81 // Project: https://github.com/chjj/blessed -// Definitions by: bryn austin bellomy +// Definitions by: bryn austin bellomy , Diullei Gomes // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// -declare module "blessed" -{ - import events = require('events'); - import buffer = require('buffer'); - import child_process = require('child_process'); +declare module "blessed" { + import {EventEmitter} from 'events'; + import * as stream from "stream" + import * as child_process from "child_process"; - module Blessed - { - export var colors: Colors; + export class BlessedProgram { + hideCursor: () => void; + move: any; + showCursor: any; + } - export interface GenericCallback { - (...args:any[]): void; + export module Widgets { + + export module Types { + + export type TTopLeft = string | number | "center"; + + export type TPosition = string | number; + + export type TMouseAction = "mousedown" | "mouseup" | "mousemove"; + + export type TStyle = { + type?: string; + bg?: string; + fg?: string; + ch?: string; + bold?: boolean; + underline?: boolean; + blink?: boolean; + inverse?: boolean; + invisible?: boolean; + transparent?: boolean; + border?: "line" | "bg" | TBorder; + hover?: boolean; + focus?: boolean; + label?: string; + track?: {bg?: string; fg?: string;}; + scrollbar?: {bg?: string; fg?: string;}; + } + + export type TBorder = { + /** + * Type of border (line or bg). bg by default. + */ + type?: "line" | "bg"; + /** + * Character to use if bg type, default is space. + */ + ch?: string; + /** + * Border foreground and background, must be numbers (-1 for default). + */ + bg?: number; + fg?: number; + /** + * Border attributes. + */ + bold?: string; + underline?: string; + } + + export type TCursor = { + /** + * Have blessed draw a custom cursor and hide the terminal cursor (experimental). + */ + artificial: boolean; + /** + * Shape of the cursor. Can be: block, underline, or line. + */ + shape: boolean; + /** + * Whether the cursor blinks. + */ + blink: boolean; + /** + * Color of the color. Accepts any valid color value (null is default). + */ + color: string; + } + + export type TAlign = "left" | "center" | "right"; + + export type ListbarCommand = { + key: string; + callback: () => void; + }; + + export type TImage = { + /** + * Pixel width. + */ + width: number; + /** + * Pixel height. + */ + height: number; + /** + * Image bitmap. + * */ + bmp: any; + /** + * Image cellmap (bitmap scaled down to cell size). + */ + cellmap: any; + }; + + export type Cursor = { + /** + * Have blessed draw a custom cursor and hide the terminal cursor (experimental). + */ + artificial: boolean; + /** + * Shape of the cursor. Can be: block, underline, or line. + */ + shape: boolean; + /** + * Whether the cursor blinks. + */ + blink: boolean; + /** + * Color of the color. Accepts any valid color value (null is default). + */ + color: string; + } } - 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; + export module Events { + + export interface IMouseEventArg { + x: number; + y: number; + action: Types.TMouseAction; + } + + export interface IKeyEventArg { + full: string; + name: string; + shift: boolean; + ctrl: boolean; + meta: boolean; + sequence: string; + } } - - /** 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 - { + export interface NodeChildProcessExecOptions { cwd?: string; stdio?: any; customFds?: any; @@ -1260,10 +159,2676 @@ declare module "blessed" maxBuffer?: number; killSignal?: string; } + + export interface IDestroyable { + destroy(): void; + } + + export interface IOptions { + } + + export interface IHasOptions { + options: T; + } + + export interface TputsOptions extends IOptions { + terminal?: string; + extended?: boolean; + debug?: boolean; + termcap?: string; + terminfoFile?: string; + terminfoPrefix?: string; + termcapFile?: string; + } + + export class Tput implements IHasOptions { + constructor(opts: TputsOptions); + + // ** properties ** // + + /** + * Original options object. + */ + options: TputsOptions; + + debug: boolean; + padding: boolean; + extended: boolean; + printf: boolean; + termcap: string; + terminfoPrefix: string; + terminfoFile: string; + termcapFile: string; + error: Error; + terminal: string; + + setup(): void; + term(is: any): boolean; + readTerminfo(term: string): string; + parseTerminfo(data: any, file: string): { + header: { + dataSize: number; + headerSize: number; + magicNumber: boolean; + namesSize: number; + boolCount: number; + numCount: number; + strCount: number; + strTableSize: number; + extended: { + dataSize: number; + headerSize: number; + boolCount: number; + numCount: number; + strCount: number; + strTableSize: number; + lastStrTableOffset: number; + } + } + name: string; + names: string[]; + desc: string; + bools: Object; + numbers: Object; + strings: Object; + }; + } + + export interface IDestroyable { + destroy(): void; + } + + export interface INodeOptions extends IOptions { + name?: string; + screen?: Screen; + parent?: Node; + children?: Node[]; + focusable?: boolean; + } + + export abstract class Node extends EventEmitter implements IHasOptions, IDestroyable { + constructor(options: INodeOptions); + + // ** properties ** // + + focusable: boolean; + + /** + * Original options object. + */ + options: INodeOptions; + + /** + * An object for any miscellanous user data. + */ + data: {[index: string]: any;}; + /** + * An object for any miscellanous user data. + */ + _: {[index: string]: any;}; + /** + * An object for any miscellanous user data. + */ + $: {[index: string]: any;}; + /** + * Type of the node (e.g. box). + */ + type: string; + /** + * Render index (document order index) of the last render call. + */ + index: number; + /** + * Parent screen. + */ + screen: Screen; + /** + * Parent node. + */ + parent: Node; + /** + * Array of node's children. + */ + children: Node[]; + + // ** methods ** // + + /** + * Prepend a node to this node's children. + */ + prepend(node: Node): void; + /** + * Append a node to this node's children. + */ + append(node: Node): void; + /** + * Remove child node from node. + */ + remove(node: Node): void; + /** + * Insert a node to this node's children at index i. + */ + insert(node: Node, index: number): void; + /** + * Insert a node to this node's children before the reference node. + */ + insertBefore(node: Node, refNode: Node): void; + /** + * Insert a node from node after the reference node. + */ + insertAfter(node: Node, refNode: Node): void; + /** + * Remove node from its parent. + */ + detach(): void; + /** + * Remove node from its parent. + */ + free(): void; + /** + * Remove node from its parent. + */ + forDescendants(iter: Function, s: any): void; + /** + * Remove node from its parent. + */ + forAncestors(iter: Function, s: any): void; + /** + * Remove node from its parent. + */ + collectDescendants(s: any): void; + /** + * Remove node from its parent. + */ + collectAncestors(s: any): void; + /** + * Remove node from its parent. + */ + emitDescendants(): void; + /** + * Remove node from its parent. + */ + emitAncestors(): void; + /** + * Remove node from its parent. + */ + hasDescendant(target: Node): void; + /** + * Remove node from its parent. + */ + hasAncestor(target: Node): boolean; + /** + * Remove node from its parent. + */ + destroy(): void; + /** + * Emit event for element, and recursively emit same event for all descendants. + */ + emitDescendants(type: string, ...args: any[]): void; + /** + * Get user property with a potential default value. + */ + get(name: string, def: T): T; + /** + * Set user property to value. + */ + set(name: string, value: T): void; + + // ** events ** // + + on(event: string, listener: Function): this; + /** + * Received when node is added to a parent. + */ + on(event: "adopt", callback: (arg: Node) => void): this; + /** + * Received when node is removed from it's current parent. + */ + on(event: "remove", callback: (arg: Node) => void): this; + /** + * Received when node gains a new parent. + */ + on(event: "reparent", callback: (arg: Node) => void): this; + /** + * Received when node is attached to the screen directly or somewhere in its ancestry. + */ + on(event: "attach", callback: (arg: Node) => void): this; + /** + * Received when node is detached from the screen directly or somewhere in its ancestry. + */ + on(event: "detach", callback: (arg: Node) => void): this; + } + + export class NodeWithEvents extends Node { + // ** methods ** // + + /** + * Bind a keypress listener for a specific key. + */ + key(name: string | string[], listener: Function): void; + /** + * Bind a keypress listener for a specific key once. + */ + onceKey(name: string, listener: Function): void; + /** + * Remove a keypress listener for a specific key. + */ + unkey(name: string, listener: Function): void; + removeKey(name: string, listener: Function): void; + + // ** events ** // + + on(event: string, listener: Function): this; + /** + * Received on screen resize. + */ + on(event: "resize", callback: () => void): this; + /** + * Received on mouse events. + */ + on(event: "mouse", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "mouseout", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "mouseover", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "mousedown", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "mouseup", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "mousewheel", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "wheeldown", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "wheelup", callback: (arg: Events.IMouseEventArg) => void): this; + on(event: "mousemove", callback: (arg: Events.IMouseEventArg) => void): this; + /** + * Received on key events. + */ + on(event: "keypress", callback: (ch: string, key: Events.IKeyEventArg) => void): this; + /** + * Global events received for all elements. + */ + on(event: "element click", callback: (arg: Screen) => void): this; + on(event: "element mouseover", callback: (arg: Screen) => void): this; + on(event: "element mouseout", callback: (arg: Screen) => void): this; + on(event: "element mouseup", callback: (arg: Screen) => void): this; + /** + * Received on key event for [name]. + */ + //on(event: "key", callback: (arg: BlessedScreen) => void): this; + /** + * Received when the terminal window focuses/blurs. Requires a terminal supporting the + * focus protocol and focus needs to be passed to program.enableMouse(). + */ + on(event: "focus", callback: (arg: Screen) => void): this; + /** + * Received when the terminal window focuses/blurs. Requires a terminal supporting the + * focus protocol and focus needs to be passed to program.enableMouse(). + */ + on(event: "blur", callback: (arg: Screen) => void): this; + /** + * Received before render. + */ + on(event: "prerender", callback: () => void): this; + /** + * Received on render. + */ + on(event: "render", callback: () => void): this; + /** + * Received when blessed notices something untoward (output is not a tty, terminfo not found, etc). + */ + on(event: "warning", callback: (text: string) => void): this; + /** + * Received when the screen is destroyed (only useful when using multiple screens). + */ + on(event: "destroy", callback: () => void): this; + /** + * Received when the element is moved. + */ + on(event: "move", callback: () => void): this; + /** + * Element was clicked (slightly smarter than mouseup). + */ + on(event: "click", callback: (arg: Screen) => void): this; + /** + * Received when element is shown. + */ + on(event: "show", callback: () => void): this; + /** + * Received when element becomes hidden. + */ + on(event: "hide", callback: () => void): this; + + on(event: "set content", callback: () => void): this; + on(event: "parsed content", callback: () => void): this; + } + + export interface IScreenOptions extends INodeOptions { + /** + * The blessed Program to be associated with. Will be automatically instantiated if none is provided. + */ + program?: BlessedProgram; + /** + * 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 (NOTE: this is a recommended + * option. It may become default in the future). + */ + autoPadding?: boolean; + + cursor?: Types.TCursor; + + /** + * Create a log file. See log method. + */ + log?: (...msg: any[]) => void; + /** + * Dump all output and input to desired file. Can be used together with log option if set as a boolean. + */ + dump?: string; + /** + * 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?: (...msg: string[]) => void; + /** + * Array of keys in their full format (e.g. C-c) to ignore when keys are locked or grabbed. Useful + * for creating a key that will always exit no matter whether the keys are locked. + */ + ignoreLocked?: boolean; + /** + * Automatically "dock" borders with other elements instead of overlapping, depending on position + * (experimental). For example: These border-overlapped elements: + */ + dockBorders?: boolean; + /** + * Normally, dockable borders will not dock if the colors or attributes are different. This option + * will allow them to dock regardless. It may produce some odd looking multi-colored borders though. + */ + ignoreDockContrast?: boolean; + /** + * Allow for rendering of East Asian double-width characters, utf-16 surrogate pairs, and unicode + * combining characters. This allows you to display text above the basic multilingual plane. This + * is behind an option because it may affect performance slightly negatively. Without this option + * enabled, all double-width, surrogate pair, and combining characters will be replaced by '??', + * '?', '' respectively. (NOTE: iTerm2 cannot display combining characters properly. Blessed simply + * removes them from an element's content if iTerm2 is detected). + */ + fullUnicode?: boolean; + /** + * Send focus events after mouse is enabled. + */ + sendFocus?: boolean; + /** + * Display warnings (such as the output not being a TTY, similar to ncurses). + */ + warnings?: boolean; + /** + * Force blessed to use unicode even if it is not detected via terminfo, env variables, or windows code page. + * If value is true unicode is forced. If value is false non-unicode is forced (default: null). + */ + forceUnicode?: boolean; + /** + * Input and output streams. process.stdin/process.stdout by default, however, it could be a + * net.Socket if you want to make a program that runs over telnet or something of that nature. + * */ + input?: stream.Writable; + /** + * Input and output streams. process.stdin/process.stdout by default, however, it could be a + * net.Socket if you want to make a program that runs over telnet or something of that nature. + * */ + output?: stream.Readable; + /** + * The blessed Tput object (only available if you passed tput: true to the Program constructor.) + */ + tput?: Tput; + /** + * Top of the focus history stack. + */ + focused?: BlessedElement; + /** + * Width of the screen (same as program.cols). + */ + width?: Types.TPosition; + /** + * Height of the screen (same as program.rows). + */ + height?: Types.TPosition; + /** + * Same as screen.width. + */ + cols?: number; + /** + * Same as screen.height. + */ + rows?: number; + /** + * Relative top offset, always zero. + */ + top?: Types.TTopLeft; + /** + * Relative left offset, always zero. + */ + left?: Types.TTopLeft; + /** + * Relative right offset, always zero. + */ + right?: Types.TPosition; + /** + * Relative bottom offset, always zero. + */ + bottom?: Types.TPosition; + /** + * Absolute top offset, always zero. + */ + atop?: Types.TTopLeft; + /** + * Absolute left offset, always zero. + */ + aleft?: Types.TTopLeft; + /** + * Absolute right offset, always zero. + */ + aright?: Types.TPosition; + /** + * Absolute bottom offset, always zero. + */ + abottom?: Types.TPosition; + /** + * Whether the focused element grabs all keypresses. + */ + grabKeys?: any; + /** + * Prevent keypresses from being received by any element. + */ + lockKeys?: boolean; + /** + * The currently hovered element. Only set if mouse events are bound. + */ + hover?: any; + /** + * Set or get terminal name. Set calls screen.setTerminal() internally. + */ + terminal?: string; + /** + * Set or get window title. + */ + title?: string; + } + + export class Screen extends NodeWithEvents implements IHasOptions { + constructor(opts: IScreenOptions); + + // ** properties ** // + cleanSides: any; + + /** + * Original options object. + */ + options: IScreenOptions; + + /** + * The blessed Program to be associated with. Will be automatically instantiated if none is provided. + */ + program: BlessedProgram; + /** + * 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 (NOTE: this is a recommended + * option. It may become default in the future). + */ + autoPadding: boolean; + + cursor: Types.TCursor; + + /** + * Dump all output and input to desired file. Can be used together with log option if set as a boolean. + */ + dump: string; + /** + * Array of keys in their full format (e.g. C-c) to ignore when keys are locked or grabbed. Useful + * for creating a key that will always exit no matter whether the keys are locked. + */ + ignoreLocked: boolean; + /** + * Automatically "dock" borders with other elements instead of overlapping, depending on position + * (experimental). For example: These border-overlapped elements: + */ + dockBorders: boolean; + /** + * Normally, dockable borders will not dock if the colors or attributes are different. This option + * will allow them to dock regardless. It may produce some odd looking multi-colored borders though. + */ + ignoreDockContrast: boolean; + /** + * Allow for rendering of East Asian double-width characters, utf-16 surrogate pairs, and unicode + * combining characters. This allows you to display text above the basic multilingual plane. This + * is behind an option because it may affect performance slightly negatively. Without this option + * enabled, all double-width, surrogate pair, and combining characters will be replaced by '??', + * '?', '' respectively. (NOTE: iTerm2 cannot display combining characters properly. Blessed simply + * removes them from an element's content if iTerm2 is detected). + */ + fullUnicode: boolean; + /** + * Send focus events after mouse is enabled. + */ + sendFocus: boolean; + /** + * Display warnings (such as the output not being a TTY, similar to ncurses). + */ + warnings: boolean; + /** + * Force blessed to use unicode even if it is not detected via terminfo, env variables, or windows code page. + * If value is true unicode is forced. If value is false non-unicode is forced (default: null). + */ + forceUnicode: boolean; + /** + * Input and output streams. process.stdin/process.stdout by default, however, it could be a + * net.Socket if you want to make a program that runs over telnet or something of that nature. + * */ + input: stream.Writable; + /** + * Input and output streams. process.stdin/process.stdout by default, however, it could be a + * net.Socket if you want to make a program that runs over telnet or something of that nature. + * */ + output: stream.Readable; + /** + * The blessed Tput object (only available if you passed tput: true to the Program constructor.) + */ + tput: Tput; + /** + * Top of the focus history stack. + */ + focused: BlessedElement; + /** + * Width of the screen (same as program.cols). + */ + width: Types.TPosition; + /** + * Height of the screen (same as program.rows). + */ + height: Types.TPosition; + /** + * Same as screen.width. + */ + cols: number; + /** + * Same as screen.height. + */ + rows: number; + /** + * Relative top offset, always zero. + */ + top: Types.TTopLeft; + /** + * Relative left offset, always zero. + */ + left: Types.TTopLeft; + /** + * Relative right offset, always zero. + */ + right: Types.TPosition; + /** + * Relative bottom offset, always zero. + */ + bottom: Types.TPosition; + /** + * Absolute top offset, always zero. + */ + atop: Types.TTopLeft; + /** + * Absolute left offset, always zero. + */ + aleft: Types.TTopLeft; + /** + * Absolute right offset, always zero. + */ + aright: Types.TPosition; + /** + * Absolute bottom offset, always zero. + */ + abottom: Types.TPosition; + /** + * Whether the focused element grabs all keypresses. + */ + grabKeys: any; + /** + * Prevent keypresses from being received by any element. + */ + lockKeys: boolean; + /** + * The currently hovered element. Only set if mouse events are bound. + */ + hover: any; + /** + * Set or get terminal name. Set calls screen.setTerminal() internally. + */ + terminal: string; + /** + * Set or get window title. + */ + title: string; + + // ** methods ** // + + /** + * 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; + /** + * Reallocate the screen buffers and clear the screen. + */ + realloc(): 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: string, ch: string, x1: number, x2: number, y1: number, y2: number): void; + /** + * Focus element by offset of focusable elements. + */ + focusOffset(offset: number): any; + /** + * 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: BlessedElement): void; + /** + * Pop element off the focus stack. + */ + focusPop(): BlessedElement; + /** + * Save the focused element. + */ + saveFocus(): BlessedElement; + /** + * Restore the saved focused element. + */ + restoreFocus(): BlessedElement; + /** + * "Rewind" focus to the last visible and attached element. + */ + rewindFocus(): BlessedElement; + /** + * 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: Function): child_process.ChildProcess; + /** + * Read data from text editor. + */ + readEditor(options: any, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + readEditor(callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + /** + * Set effects based on two events and attributes. + */ + setEffects(el: BlessedElement, fel: BlessedElement, over: any, out: any, effects: any, temp: any): 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: BlessedElement): void; + enableMouse(): void; + /** + * Enable keypress events for the screen and optionally an element (automatically called when a form of + * on('keypress') is bound). + */ + enableKeys(el: BlessedElement): void; + enableKeys(): void; + /** + * Enable key and mouse events. Calls bot enableMouse and enableKeys. + */ + enableInput(el: BlessedElement): void; + enableInput(): void; + /** + * Attempt to copy text to clipboard using iTerm2's proprietary sequence. Returns true if successful. + */ + copyToClipboard(text: string): void; + /** + * 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: boolean, blink: boolean): any; + /** + * Attempt to change cursor color. Returns true if successful. + */ + cursorColor(color: string): void; + /** + * Attempt to reset cursor. Returns true if successful. + */ + cursorReset(): void; + /** + * Take an SGR screenshot of the screen within the region. Returns a string containing only + * characters and SGR codes. Can be displayed by simply echoing it in a terminal. + */ + screenshot(xi: number, xl: number, yi: number, yl: number): string; + screenshot(): void; + /** + * Destroy the screen object and remove it from the global list. Also remove all global events relevant + * to the screen object. If all screen objects are destroyed, the node process is essentially reset + * to its initial state. + */ + destroy(): void; + /** + * Reset the terminal to term. Reloads terminfo. + */ + setTerminal(term: string): void; + } + + export interface Padding { + left?: number; + right?: number; + top?: number; + bottom?: number; + } + + export class PositionCoords { + xi: number; + xl: number; + yi: number; + yl: number; + } + + export interface Position { + left: number | string; + right: number | string; + top: number | string; + bottom: number | string; + } + + export interface Border { + /** + * Type of border (line or bg). bg by default. + */ + type?: "line" | "bg"; + /** + * Character to use if bg type, default is space. + */ + ch?: string; + /** + * Border foreground and background, must be numbers (-1 for default). + */ + bg?: number; + fg?: number; + /** + * Border attributes. + */ + bold?: string; + underline?: string; + } + + export interface ElementOptions extends INodeOptions { + tags?: boolean; + + fg?: string; + bg?: string; + bold?: string; + underline?: string; + + style?: any; + /** + * Border object, see below. + */ + border?: Border | "line" | "bg"; + /** + * Element's text content. + */ + content?: string; + /** + * Element is clickable. + */ + clickable?: boolean; + /** + * Element is focusable and can receive key input. + */ + input?: boolean; + keyable?: boolean; + /** + * Element is focused. + */ + focused?: BlessedElement; + /** + * 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?: "left" | "center" | "right"; + /** + * Vertical text alignment: top, middle, or bottom. + */ + valign?: "top" | "middle" | "bottom"; + /** + * Shrink/flex/grow to content and child elements. Width/height during render. + */ + shrink?: boolean; + /** + * 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; + + top?: Types.TTopLeft; + left?: Types.TTopLeft; + right?: Types.TPosition; + bottom?: Types.TPosition; + + /** + * Width/height of the element, can be a number, percentage (0-100%), or keyword (half or shrink). + * Percentages can also have offsets (50%+1, 50%-1). + */ + width?: 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. Percentages can also have + * offsets (50%+1, 50%-1). + */ + height?: number | string; + /** + * Can contain the above options. + */ + position?: Position; + /** + * 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; + /** + * Draw a translucent offset shadow behind the element. + */ + shadow?: boolean; + } + + export interface Coords { + xl: number; + xi: number; + yl: number; + yi: number; + base: number; + _contentEnd: {x: number; y: number;}; + notop: Types.TTopLeft; + noleft: Types.TTopLeft; + noright: Types.TPosition; + nobot: Types.TPosition; + } + + export interface LabelOptions { + text: string; + side: Types.TAlign; + } + + // TODO: scrollable - Note: If the scrollable option is enabled, Element inherits all methods from ScrollableBox. + export abstract class BlessedElement extends NodeWithEvents implements IHasOptions { + constructor(opts: ElementOptions); + + // ** properties ** // + + /** + * Original options object. + */ + options: ElementOptions; + /** + * Name of the element. Useful for form submission. + */ + name: string; + /** + * Border object. + */ + border: Border; + + style: any; + position: Position; + content: string; + hidden: boolean; + visible: boolean; + detached: boolean; + /** + * Border foreground and background, must be numbers (-1 for default). + */ + bg: number; + fg: number; + /** + * Border attributes. + */ + bold: string; + underline: string; + /** + * Calculated width. + */ + width: number | string; + /** + * Calculated height. + */ + height: number | string; + /** + * Calculated relative top offset.*/ + top: Types.TTopLeft; + /** + * Calculated relative left offset. + */ + left: Types.TTopLeft; + /** + * Calculated relative right offset. + */ + right: Types.TPosition; + /** + * Calculated relative bottom offset. + */ + bottom: Types.TPosition; + /** + * Calculated absolute top offset. + */ + atop: Types.TTopLeft; + /** + * Calculated absolute left offset. + */ + aleft: Types.TTopLeft; + /** + * Calculated absolute right offset. + */ + aright: Types.TPosition; + /** + * Calculated absolute bottom offset. + */ + abottom: Types.TPosition; + + /** + * Whether the element is draggable. Set to true to allow dragging. + */ + draggable: boolean; + + itop: Types.TTopLeft; + ileft: Types.TTopLeft; + iheight: Types.TPosition; + iwidth: Types.TPosition; + + /** + * Calculated relative top offset. + */ + rtop: Types.TTopLeft; + /** + * Calculated relative left offset. + */ + rleft: Types.TTopLeft; + /** + * Calculated relative right offset. + */ + rright: Types.TPosition; + /** + * Calculated relative bottom offset. + */ + rbottom: Types.TPosition; + + lpos: PositionCoords; + + // ** methods ** // + + /** + * Write content and children to the screen buffer. + */ + render(): Coords; + /** + * Hide element.*/ + hide(): void; + /** + * Show element. + */ + show(): void; + /** + * Toggle hidden/shown. + */ + toggle(): void; + /** + * Focus element. + */ + focus(): void; + /** + * Same asel.on('screen', ...) except this will automatically keep track of which listeners + * are bound to the screen object. For use with removeScreenEvent(), free(), and destroy(). + */ + onScreenEvent(type: string, handler: Function): void; + /** + * Same asel.removeListener('screen', ...) except this will automatically keep track of which + * listeners are bound to the screen object. For use with onScreenEvent(), free(), and destroy(). + */ + removeScreenEvent(type: string, handler: Function): void; + /** + * Free up the element. Automatically unbind all events that may have been bound to the screen + * object. This prevents memory leaks. For use with onScreenEvent(), removeScreenEvent(), + * and destroy(). + */ + free(): void; + /** + * Same as the detach() method, except this will automatically call free() and unbind any screen + * events to prevent memory leaks. for use with onScreenEvent(), removeScreenEvent(), and free(). + */ + destroy(): 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; + /** + * text/options - Set the label text for the top-left corner. Example options: {text:'foo',side:'left'} + */ + setLabel(arg: string | LabelOptions): void; + /** + * Remove the label completely. + */ + removeLabel(): any; + /** + * text/options - Set a hover text box to follow the cursor. Similar to the "title" DOM attribute + * in the browser. Example options: {text:'foo'} + */ + setHover(arg: string | LabelOptions): void; + /** + * Remove the hover label completely. + */ + removeHover(): void; + /** + * Enable mouse events for the element (automatically called when a form of on('mouse') is bound). + */ + enableMouse(): void; + /** + * Enable keypress events for the element (automatically called when a form of on('keypress') is bound). + */ + enableKeys(): void; + /** + * Enable key and mouse events. Calls bot enableMouse and enableKeys. + */ + enableInput(): void; + /** + * Enable dragging of the element. + */ + enableDrag(): void; + /** + * Disable dragging of the element. + */ + disableDrag(): void; + /** + * Take an SGR screenshot of the screen within the region. Returns a string containing only + * characters and SGR codes. Can be displayed by simply echoing it in a terminal. + */ + screenshot(xi: number, xl: number, yi: number, yl: number): string; + screenshot(): void; + + /* + Content Methods + + Methods for dealing with text content, line by line. Useful for writing a text editor, + irc client, etc. + + Note: All of these methods deal with pre-aligned, pre-wrapped text. If you use deleteTop() + on a box with a wrapped line at the top, it may remove 3-4 "real" lines (rows) depending + on how long the original line was. + + The lines parameter can be a string or an array of strings. The line parameter must + be a string. + */ + + /** + * 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(): string; + /** + * 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(): string; + /** + * Insert a line into the box's content. + */ + insertLine(i: number, lines: string | string[]): void; + /** + * Delete a line from the box's content. + */ + deleteLine(i: number): void; + /** + * Get a line from the box's content. + */ + getLine(i: number): string; + /** + * Get a line from the box's content from the visible top. + */ + getBaseLine(i: number): string; + /** + * Set a line in the box's content. + */ + setLine(i: number, line: string | string[]): void; + /** + * Set a line in the box's content from the visible top. + */ + setBaseLine(i: number, line: string | string[]): void; + /** + * Clear a line from the box's content. + */ + clearLine(i: number): void; + /** + * Clear a line from the box's content from the visible top. + */ + clearBaseLine(i: 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(i: 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(i: number): string; + /** + * An array containing the content lines. + */ + getLines(): string[]; + /** + * An array containing the lines as they are displayed on the screen. + */ + getScreenLines(): string[]; + /** + * Get a string's displayed width, taking into account double-width, surrogate pairs, + * combining characters, tags, and SGR escape codes. + */ + strWidth(text: string): string; + + // ** events ** // + } + + export interface ScrollableBoxOptions extends ElementOptions { + /** + * 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. + * Style of the scrollbar track if present (takes regular style options). + */ + scrollbar?: { style?: any; track?: any; ch?: string; } + } + + export interface ScrollableTextOptions extends ScrollableBoxOptions { + /** + * Whether to enable automatic mouse support for this element. + * Use pre-defined mouse events (right-click for editor). + */ + mouse?: boolean | (() => void); + /** + * Use pre-defined keys (i or enter for insert, e for editor, C-e for editor while inserting). + */ + keys?: string | string[] | boolean; + /** + * Use vi keys with the keys option. + */ + vi?: boolean; + } + + export interface BoxOptions extends ScrollableTextOptions { + bindings?: any; + } + + /** + * DEPRECATED - Use Box with the scrollable option instead. A box with scrollable content. + */ + export class ScrollableBoxElement extends BlessedElement { + /** + * 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, always?: boolean): 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(): void; + /** + * Get the actual height of the scrolling area. + */ + getScrollHeight(): void; + /** + * Get the current scroll index in percentage. + */ + getScrollPerc(): void; + /** + * Reset the scroll index to its initial state. + */ + resetScroll(): void; + + on(event: string, listener: Function): this; + /** + * Received when the element is scrolled. + */ + on(event: "scroll", callback: () => void): this; + } + + /** + * 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 ScrollableTextElement extends ScrollableBoxElement { + } + + /** + * A box element which draws a simple box containing content or other elements. + */ + export class BoxElement extends ScrollableTextElement implements IHasOptions { + constructor(opts: BoxOptions); + + /** + * Original options object. + */ + options: BoxOptions; + } + + export interface TextOptions extends ElementOptions { + /** + * Fill the entire line with chosen bg until parent bg ends, even if there + * is not enough text to fill the entire width. + */ + fill?: boolean; + /** + * Text alignment: left, center, or right. + */ + align?: Types.TAlign; + } + + /** + * An element similar to Box, but geared towards rendering simple text elements. + */ + export class TextElement extends BlessedElement implements IHasOptions { + constructor(opts: TextOptions); + + /** + * Original options object. + */ + options: TextOptions; + } + + /** + * A simple line which can be line or bg styled. + */ + export interface LineOptions extends BoxOptions { + /** + * Can be vertical or horizontal. + */ + orientation?: "vertical" | "horizontal"; + /** + * Treated the same as a border object. (attributes can be contained in style). + */ + type?: string; + bg?: string; + fg?: string; + ch?: string; + } + + /** + * A simple line which can be line or bg styled. + */ + export class LineElement extends BoxElement implements IHasOptions { + constructor(opts: LineOptions); + + /** + * Original options object. + */ + options: LineOptions; + } + + export interface BigTextOptions extends BoxOptions { + /** + * bdf->json font file to use (see ttystudio for instructions on compiling BDFs to JSON). + */ + font?: string; + /** + * bdf->json bold font file to use (see ttystudio for instructions on compiling BDFs to JSON). + */ + fontBold?: string; + /** + * foreground character. (default: ' ') + */ + fch?: string; + } + + /** + * A box which can render content drawn as 8x14 cell characters using the terminus font. + */ + export class BigTextElement extends BoxElement implements IHasOptions { + constructor(opts: BigTextOptions); + + /** + * Original options object. + */ + options: BigTextOptions; + } + + export interface ListElementStyle { + selected?: any; + item?: any; + } + + export interface ListOptions extends BoxOptions { + /** + * Style for a selected item. Style for an unselected item. + */ + style?: TStyle; + /** + * 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?: () => void; + /** + * Whether the list is interactive and can have items selected (Default: true). + */ + interactive?: boolean; + /** + * Whether to automatically override tags and invert fg of item when selected (Default: true). + */ + invertSelected?: boolean; + } + + export class ListElement extends BoxElement implements IHasOptions> { + constructor(opts: ListOptions); + + /** + * Original options object. + */ + options: ListOptions; + + /** + * Add an item based on a string. + */ + add(text: string): void; + /** + * Add an item based on a string. + */ + addItem(text: string): void; + /** + * Removes an item from the list. Child can be an element, index, or string. + */ + removeItem(child: BlessedElement): BlessedElement; + /** + * Push an item onto the list. + * */ + pushItem(child: BlessedElement): number; + /** + * Pop an item off the list. + * */ + popItem(): BlessedElement; + /** + * Unshift an item onto the list. + */ + unshiftItem(child: BlessedElement): number; + /** + * Shift an item off the list. + * */ + shiftItem(): BlessedElement; + /** + * Inserts an item to the list. Child can be an element, index, or string. + */ + insertItem(i: number, child: BlessedElement): void; + /** + * Returns the item element. Child can be an element, index, or string. + */ + getItem(child: BlessedElement): BlessedElement; + /** + * Set item to content. + */ + setItem(child: BlessedElement, content: BlessedElement | string): void; + /** + * Remove and insert items to the list. + * */ + spliceItem(i: number, n: number, ...items: BlessedElement[]): void; + /** + * Clears all items from the list. + * */ + clearItems(): void; + /** + * Sets the list items to multiple strings. + */ + setItems(items: BlessedElement[]): void; + /** + * Returns the item index from the list. Child can be an element, index, or string. + */ + getItemIndex(child: BlessedElement): number; + /** + * Select an index of an item. + * */ + select(index: number): void; + /** + * Select item 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(callback: () => void): void; + /** + * Find an item based on its text content. + */ + fuzzyFind(arg: string | RegExp | (() => void)): void; + + // ** events ** // + + on(event: string, listener: Function): this; + /** + * Received when an item is selected. + */ + on(event: "select", callback: (item: BoxElement, index: number) => void): this; + /** + * List was canceled (when esc is pressed with the keys option). + */ + on(event: "cancel", callback: () => void): this; + /** + * Either a select or a cancel event was received. + */ + on(event: "action", callback: () => void): this; + + on(event: "create item", callback: () => void): this; + on(event: "add item", callback: () => void): this; + on(event: "remove item", callback: () => void): this; + on(event: "insert item", callback: () => void): this; + on(event: "set items", callback: () => void): this; + on(event: "select item", callback: (item: BlessedElement, index: number) => void): this; + } + + export interface FileManagerOptions extends ListOptions { + /** + * Current working directory. + */ + cwd?: string; + } + + export class FileManagerElement extends ListElement implements IHasOptions { + constructor(opts: FileManagerOptions); + + /** + * Original options object. + */ + options: FileManagerOptions; + /** + * Current working directory. + */ + cwd: string; + + /** + * Refresh the file list (perform a readdir on cwd and update the list items). + */ + refresh(cwd:string, callback: () => void): void; + refresh(callback: () => void): void; + refresh(): void; + /** + * Pick a single file and return the path in the callback. + */ + pick(cwd:string, callback: () => void): void; + pick(callback: () => void): void; + /** + * Reset back to original cwd. + */ + reset(cwd:string, callback: () => void): void; + reset(callback: () => void): void; + reset(): void; + + // ** events ** // + + on(event: string, listener: Function): this; + /** + * Received when an item is selected. + */ + on(event: "cd", callback: (file: string, cwd: string) => void): this; + /** + * Received when an item is selected. + */ + on(event: "file", callback: (file: string) => void): this; + + on(event: "error", callback: (err: any, file: string) => void): this; + on(event: "refresh", callback: () => void): this; + } + + export interface StyleListTable extends ListElementStyle { + /** + * Header style. + */ + header?: any; + /** + * Cell style. + */ + cell?: any; + } + + export interface ListTableOptions extends ListOptions { + /** + * Array of array of strings representing rows. + */ + rows?: string[]; + 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; + + style?: StyleListTable; + } + + export class ListTableElement extends ListElement implements IHasOptions { + constructor(opts: ListTableOptions); + + /** + * Original options object. + */ + options: ListTableOptions; + + /** + * Set rows in table. Array of arrays of strings. + * @example: + * + * table.setData([ + [ 'Animals', 'Foods' ], + [ 'Elephant', 'Apple' ], + [ 'Bird', 'Orange' ] + ]); + */ + setRows(rows: string[][]): void; + /** + * Set rows in table. Array of arrays of strings. + * @example: + * + * table.setData([ + [ 'Animals', 'Foods' ], + [ 'Elephant', 'Apple' ], + [ 'Bird', 'Orange' ] + ]); + */ + setData(rows: string[][]): void; + } + + export interface ListbarOptions extends BoxOptions { + style?: ListElementStyle; + /** + * Set buttons using an object with keys as titles of buttons, containing of objects + * containing keys of keys and callback. + */ + commands: Types.ListbarCommand[]; + items: Types.ListbarCommand[]; + /** + * Automatically bind list buttons to keys 0-9. + */ + autoCommandKeys: boolean; + } + + export class ListbarElement extends BoxElement implements IHasOptions { + constructor(opts: ListbarOptions); + + /** + * Original options object. + */ + options: ListbarOptions; + + /** + * Set commands (see commands option above). + */ + setItems(commands: Types.ListbarCommand[]): void; + /** + * Append an item to the bar. + */ + add(item: Types.ListbarCommand, callback: () => void): void; + /** + * Append an item to the bar. + */ + addItem(item: Types.ListbarCommand, callback: () => void): void; + /** + * Append an item to the bar. + */ + appendItem(item: Types.ListbarCommand, callback: () => void): void; + /** + * Select an item on the bar. + */ + select(offset: number): void; + /** + * Remove item from the bar. + */ + removeItem(child: BlessedElement): void; + /** + * Move relatively across the bar. + */ + move(offset: number): void; + /** + * Move left relatively across the bar. + */ + moveLeft(offset: number): void; + /** + * Move right relatively across the bar. + */ + moveRight(offset: number): void; + /** + * Select button and execute its callback. + */ + selectTab(index: number): void; + + // ** events ** // + + on(event: string, listener: Function): this; + + on(event: "set items", callback: () => void): this; + on(event: "remove item", callback: () => void): this; + on(event: "select tab", callback: () => void): this; + } + + export interface FormOptions extends BoxOptions { + /** + * Allow default keys (tab, vi keys, enter). + */ + keys?: any; + /** + * Allow vi keys. + */ + vi?: boolean; + } + + export class FormElement extends BoxElement implements IHasOptions { + constructor(opts: FormOptions); + + /** + * Original options object. + */ + options: FormOptions; + /** + * Last submitted data. + */ + submission: TFormData; + + /** + * 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; + + // ** events ** // + + on(event: string, listener: Function): this; + /** + * Form is submitted. Receives a data object. + */ + on(event: "submit", callback: (out: TFormData) => void): this; + /** + * Form is discarded. + */ + on(event: "cancel", callback: () => void): this; + /** + * Form is cleared. + */ + on(event: "reset", callback: () => void): this; + } + + export interface InputOptions extends BoxOptions { } + + export abstract class InputElement extends BoxElement { + constructor(opts: InputOptions); + } + + /** + * A box which allows multiline text input. + */ + export interface TextareaOptions extends InputOptions { + /** + * Call readInput() when the element is focused. Automatically unfocus. + */ + inputOnFocus?: boolean; + } + + export class TextareaElement extends InputElement implements IHasOptions { + constructor(opts: TextareaOptions); + + /** + * Original options object. + */ + 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?: (err: any, value?: string) => void): void; + /** + * Grab key events and start reading text from the keyboard. Takes a callback which receives + * the final value. + */ + input(callback: (err: any, value?: string) => void): void; + /** + * Grab key events and start reading text from the keyboard. Takes a callback which receives + * the final value. + */ + setInput(callback: (err: any, value?: string) => void): void; + /** + * Open text editor in $EDITOR, read the output from the resulting file. Takes a callback which + * receives the final value. + */ + readEditor(callback: (err: any, value?: string) => void): void; + /** + * Open text editor in $EDITOR, read the output from the resulting file. Takes a callback which + * receives the final value. + */ + editor(callback: (err: any, value?: string) => void): void; + /** + * Open text editor in $EDITOR, read the output from the resulting file. Takes a callback which + * receives the final value. + */ + setEditor(callback: (err: any, value?: string) => void): void; + /** + * The same as this.value, for now. + */ + getValue(): string; + /** + * Clear input. + */ + clearValue(): void; + /** + * Set value. + */ + setValue(text: string): void; + + // ** events ** // + + on(event: string, listener: Function): this; + + on(event: "error", callback: (err: any) => void): this; + + /** + * Value is submitted (enter). + */ + on(event: "submit", callback: (value: any) => void): this; + /** + * Value is discared (escape). + */ + on(event: "cancel", callback: (value: any) => void): this; + /** + * Either submit or cancel. + */ + on(event: "action", callback: (value: any) => void): this; + } + + export interface TextboxOptions extends TextareaOptions { + /** + * Completely hide text. + */ + secret?: boolean; + /** + * Replace text with asterisks (*). + */ + censor?: boolean; + } + + export class TextboxElement extends TextareaElement implements IHasOptions { + constructor(opts: TextboxOptions); + + /** + * Original options object. + */ + options: TextboxOptions; + + /** + * Completely hide text. + */ + secret: boolean; + /** + * Replace text with asterisks (*). + */ + censor: boolean; + } + + export interface ButtonOptions extends BoxOptions { } + + export class ButtonElement extends InputElement implements IHasOptions { + constructor(opts: ButtonOptions); + + /** + * Original options object. + */ + options: ButtonOptions; + + /** + * Press button. Emits press. + */ + press(): void; + + on(event: string, listener: Function): this; + + on(event: "press", callback: () => void): this; + } + + export interface CheckboxOptions extends BoxOptions { + /** + * 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 CheckboxElement extends InputElement implements IHasOptions { + constructor(options?: CheckboxOptions); + + /** + * Original options object. + */ + 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; + } + + export interface RadioSetOptions extends BoxOptions { } + + /** + * An element wrapping RadioButtons. RadioButtons within this element will be mutually exclusive + * with each other. + * */ + export abstract class RadioSetElement extends BoxElement { + constructor(opts: RadioSetOptions); + } + + export interface RadioButtonOptions extends BoxOptions { } + + /** + * A radio button which can be used in a form element. + */ + export abstract class RadioButtonElement extends CheckboxElement { + constructor(opts: RadioButtonOptions); + } + + export interface PromptOptions extends BoxOptions { } + + /** + * A prompt box containing a text input, okay, and cancel buttons (automatically hidden). + */ + export class PromptElement extends BoxElement implements IHasOptions { + constructor(opts: PromptOptions); + + options: PromptOptions; + + /** + * Show the prompt and wait for the result of the textbox. Set text and initial value. + */ + input(text: string, value: string, callback: (err: any, value: string) => void): void; + setInput(text: string, value: string, callback: (err: any, value: string) => void): void; + readInput(text: string, value: string, callback: (err: any, value: string) => void): void; + } + + export interface QuestionOptions extends BoxOptions { } + + /** + * A question box containing okay and cancel buttons (automatically hidden). + */ + export class QuestionElement extends BoxElement implements IHasOptions { + constructor(opts: QuestionOptions); + + options: QuestionOptions; + + /** + * Ask a question. callback will yield the result. + */ + ask(question: string, callback: (err: any, value: string) => void): void; + } + + export interface MessageOptions extends BoxOptions { } + + /** + * A box containing a message to be displayed (automatically hidden). + */ + export class MessageElement extends BoxElement implements IHasOptions { + constructor(opts: MessageOptions); + + 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, time: number, callback: (err: any) => void): void; + log(text: string, callback: (err: any) => void): void; + display(text: string, time: number, callback: (err: any) => void): void; + display(text: string, callback: (err: any) => void): void; + + /** + * Display an error in the same way. + */ + error(text: string, time: number, callback: () => void): void; + error(text: string, callback: () => void): void; + } + + export interface LoadingOptions extends BoxOptions { } + + /** + * A box with a spinning line to denote loading (automatically hidden). + */ + export class LoadingElement extends BoxElement implements IHasOptions { + constructor(opts: LoadingOptions); + + 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; + } + + export interface ProgressBarOptions extends BoxOptions { + /** + * 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; + } + + /** + * A progress bar allowing various styles. This can also be used as a form input. + */ + export class ProgressBarElement extends InputElement implements IHasOptions { + constructor(options?: ProgressBarOptions); + + 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; + + on(event: string, listener: Function): this; + /** + * Bar was reset. + */ + on(event: "reset", callback: () => void): this; + /** + * Bar has completely filled. + */ + on(event: "complete", callback: () => void): this; + } + + 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 ScrollableTextElement implements IHasOptions { + constructor(options?: LogOptions); + + 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; + } + + 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; + } + + /** + * A stylized table of text elements. + * */ + export class TableElement extends BoxElement implements IHasOptions { + constructor(opts: TableOptions); + + options: TableOptions; + + /** + * 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; + } + + 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?: 'line'|'underline'|'block'; + + terminal?: string; + + /** + * Object for process env. + */ + env?: any; + } + + export class TerminalElement extends BoxElement implements IHasOptions { + constructor(opts: TerminalOptions); + + options: TerminalOptions; + + /** + * 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 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. + * */ + type: "ansi" | "overlay" | "w3m"; + } + + /** + * 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 ImageElement extends BoxElement implements IHasOptions { + constructor(options?: ImageOptions); + + options: ImageOptions; + } + + export interface ANSIImageOptions extends BoxOptions { + /** + * URL or path to PNG/GIF file. Can also be a buffer. + * */ + file: string; + /** + * Scale cellmap down (0-1.0) from its original pixel width/height (Default: 1.0). + * */ + scale: number; + + /** + * This differs from other element's width or height in that only one of them is needed: blessed will maintain the aspect ratio of the image as it scales down to the proper number of cells. NOTE: PNG/GIF's are always automatically shrunken to size (based on scale) if a width or height is not given. + * */ + width: number | string; + height: number | string; + + /** + * Add various "density" ASCII characters over the rendering to give the image more detail, similar to libcaca/libcucul (the library mplayer uses to display videos in the terminal). + */ + ascii: string; + + /** + * Whether to animate if the image is an APNG/animating GIF. If false, only display the first frame or IDAT (Default: true). + */ + animate: boolean; + + /** + * Set the speed of animation. Slower: 0.0-1.0. Faster: 1-1000. It cannot go faster than 1 frame per millisecond, so 1000 is the fastest. (Default: 1.0) + */ + speed: number; + + /** + * mem or cpu. If optimizing for memory, animation frames will be rendered to bitmaps as the animation plays, using less memory. Optimizing for cpu will precompile all bitmaps beforehand, which may be faster, but might also OOM the process on large images. (Default: mem). + */ + optimization: "mem" | "cpu"; + } + + /** + * Convert any .png file (or .gif, see below) to an ANSI image and display it as an element. + * */ + export class ANSIImageElement extends BoxElement implements IHasOptions { + constructor(options?:ANSIImageOptions); + + options: ANSIImageOptions; + + /** + * Image object from the png reader. + */ + img: Types.TImage; + + /** + * set the image in the box to a new path. + * */ + setImage(img: string, callback: () => void): void; + /** + * clear the current image. + * */ + clearImage(callback: () => void): void; + /** + * Play animation if it has been paused or stopped. + */ + play(): void; + /** + * Pause animation. + */ + pause(): void; + /** + * Stop animation. + */ + stop(): void; + } + + export interface OverlayImageOptions extends BoxOptions { + /** + * Path to image. + */ + file: string; + /** + * Render the file as ANSI art instead of using w3m to overlay Internally uses the ANSIImage element. See the ANSIImage element for more information/options. (Default: true). + */ + ansi: boolean; + /** + * Path to w3mimgdisplay. If a proper w3mimgdisplay path is not given, blessed will search the entire disk for the binary. + */ + w3m: string; + /** + * Whether to search /usr, /bin, and /lib for w3mimgdisplay (Default: true). + */ + search: string; + } + + /** + * Convert any .png file (or .gif, see below) to an ANSI image and display it as an element. + * */ + export class OverlayImageElement extends BoxElement implements IHasOptions { + constructor(options?: OverlayImageOptions); + + options: OverlayImageOptions; + + /** + * set the image in the box to a new path. + * */ + setImage(img: string, callback: () => void): void; + /** + * clear the current image. + * */ + clearImage(callback: () => void): void; + /** + * get the size of an image file in pixels. + * */ + imageSize(img:string, callback: () => void): void; + /** + * get the size of the terminal in pixels. + * */ + termSize(callback: () => void): void; + /** + * get the pixel to cell ratio for the terminal. + * */ + getPixelRatio(callback: () => void): void; + } + + export interface VideoOptions extends BoxOptions { + /** + * Video to play. + */ + file: string; + /** + * Start time in seconds. + */ + start: number; + } + + export class VideoElement extends BoxElement implements IHasOptions { + constructor(options?: VideoOptions); + + options: VideoOptions; + + /** + * The terminal element running mplayer or mpv. + */ + tty: any; + } + + export interface LayoutOptions extends ElementOptions { + /** + * A callback which is called right before the children are iterated over to be rendered. Should return an + * iterator callback which is called on each child element: iterator(el, i). + */ + renderer?: () => void; + + /** + * Using the default renderer, it provides two layouts: inline, and grid. inline is the default and will render + * akin to inline-block. grid will create an automatic grid based on element dimensions. The grid cells' + * width and height are always determined by the largest children in the layout. + */ + layout: "inline" | "inline-block" | "grid"; + } + + export class LayoutElement extends BlessedElement implements IHasOptions { + constructor(options?: LayoutOptions); + + options: LayoutOptions; + + /** + * A callback which is called right before the children are iterated over to be rendered. Should return an + * iterator callback which is called on each child element: iterator(el, i). + */ + renderer(coords: PositionCoords): void; + /** + * Check to see if a previous child element has been rendered and is visible on screen. This is only useful + * for checking child elements that have already been attempted to be rendered! see the example below. + */ + isRendered(el: BlessedElement): boolean; + /** + * Get the last rendered and visible child element based on an index. This is useful for basing the position + * of the current child element on the position of the last child element. + */ + getLast(i: number): Element; + /** + * Get the last rendered and visible child element coords based on an index. This is useful for basing the position + * of the current child element on the position of the last child element. See the example below. + */ + getLastCoords(i: number): PositionCoords; + } + + 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 = Blessed; + export module widget { + export class Element extends Widgets.BlessedElement { } + export class Node extends Widgets.Node { } + export class Screen extends Widgets.Screen { } + + export class Box extends Widgets.BoxElement { } + export class ScrollableBox extends Widgets.ScrollableBoxElement { } + export class ScrollableText extends Widgets.ScrollableTextElement { } + export class Text extends Widgets.BoxElement { } + export class Line extends Widgets.LineElement { } + export class BigText extends Widgets.BigTextElement { } + export class List extends Widgets.ListElement { } + export class FileManager extends Widgets.FileManagerElement { } + export class ListTable extends Widgets.ListTableElement { } + export class ListBar extends Widgets.ListbarElement { } + export class Form extends Widgets.FormElement { } + export class Textarea extends Widgets.TextareaElement { } + export class Button extends Widgets.ButtonElement { } + export class Checkbox extends Widgets.CheckboxElement { } + export class RadioSet extends Widgets.RadioSetElement { } + export class RadioButton extends Widgets.RadioButtonElement { } + + export class Prompt extends Widgets.PromptElement { } + export class question extends Widgets.QuestionElement { } + export class Message extends Widgets.MessageElement { } + export class Loading extends Widgets.LoadingElement { } + + export class ProgressBar extends Widgets.ProgressBarElement { } + export class Terminal extends Widgets.TerminalElement { } + } + + export function screen(options?: Widgets.IScreenOptions): Widgets.Screen; + + export function box(options?: Widgets.BoxOptions): Widgets.BoxElement; + export function text(options?: Widgets.TextOptions): Widgets.TextElement; + export function line(options?: Widgets.LineOptions): Widgets.LineElement; + export function scrollablebox(options?: Widgets.BoxOptions): Widgets.BoxElement; + export function scrollabletext(options?: Widgets.BoxOptions): Widgets.BoxElement; + export function bigtext(options?: Widgets.BigTextOptions): Widgets.BigTextElement; + export function list(options?: Widgets.ListOptions): Widgets.ListElement; + export function filemanager(options?: Widgets.FileManagerOptions): Widgets.FileManagerElement; + export function listtable(options?: Widgets.ListTableOptions): Widgets.ListTableElement; + export function listbar(options?: Widgets.ListbarOptions): Widgets.ListbarElement; + export function form(options?: Widgets.FormOptions): Widgets.FormElement; + export function input(options?: Widgets.InputOptions): Widgets.InputElement; + export function textarea(options?: Widgets.TextareaOptions): Widgets.TextareaElement; + export function textbox(options?: Widgets.TextboxOptions): Widgets.TextboxElement; + export function button(options?: Widgets.ButtonOptions): Widgets.ButtonElement; + export function checkbox(options?: Widgets.CheckboxOptions): Widgets.CheckboxElement; + export function radioset(options?: Widgets.RadioSetOptions): Widgets.RadioSetElement; + export function radiobutton(options?: Widgets.RadioButtonOptions): Widgets.RadioButtonElement; + + export function table(options?: Widgets.TableOptions): Widgets.TableElement; + + export function prompt(options?: Widgets.PromptOptions): Widgets.PromptElement; + export function question(options?: Widgets.QuestionOptions): Widgets.QuestionElement; + export function message(options?: Widgets.MessageOptions): Widgets.MessageElement; + export function loading(options?: Widgets.LoadingOptions): Widgets.LoadingElement; + + export function progressbar(options?: Widgets.ProgressBarOptions): Widgets.ProgressBarElement; + export function terminal(options?: Widgets.TerminalOptions): Widgets.TerminalElement; + + export function layout(options?: Widgets.LayoutOptions): Widgets.LayoutElement; + + export function escape(item: any): any; + export const colors: { + match: (hexColor: string) => string + } } - - - diff --git a/bluebird/bluebird-tests.ts b/bluebird/bluebird-tests.ts index 59cef89b1a..d7995438c1 100644 --- a/bluebird/bluebird-tests.ts +++ b/bluebird/bluebird-tests.ts @@ -82,6 +82,7 @@ var voidProm: Promise; var fooProm: Promise; var barProm: Promise; +var barOrVoidProm: Promise; var fooOrBarProm: Promise; var bazProm: Promise; @@ -221,12 +222,12 @@ barProm = fooProm.then((value: Foo) => { }, (reason: any) => { return barProm; }); -barProm = fooProm.then((value: Foo) => { +barOrVoidProm = fooProm.then((value: Foo) => { return bar; }, (reason: any) => { return; }); -barProm = fooProm.then((value: Foo) => { +barOrVoidProm = fooProm.then((value: Foo) => { return bar; }, (reason: any) => { return voidProm; diff --git a/bluebird/bluebird.d.ts b/bluebird/bluebird.d.ts index 042347f096..3dc66b78f0 100644 --- a/bluebird/bluebird.d.ts +++ b/bluebird/bluebird.d.ts @@ -47,8 +47,10 @@ class Bluebird implements Bluebird.Thenable, Bluebird.Inspection { /** * Promises/A+ `.then()`. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise. */ - then(onFulfill: (value: R) => U | Bluebird.Thenable, onReject?: (error: any) => U | Bluebird.Thenable): Bluebird; - then(onFulfill: (value: R) => U | Bluebird.Thenable, onReject?: (error: any) => void | Bluebird.Thenable): Bluebird; + then(onFulfill: (value: R) => U1 | Bluebird.Thenable, onReject: (error: any) => U2 | Bluebird.Thenable): Bluebird; + then(onFulfill: (value: R) => U | Bluebird.Thenable, onReject: (error: any) => U | Bluebird.Thenable): Bluebird; + then(onFulfill: (value: R) => U | Bluebird.Thenable): Bluebird; + then(): Bluebird; /** * This is a catch-all exception handler, shortcut for calling `.then(null, handler)` on this promise. Any exception happening in a `.then`-chain will propagate to nearest `.catch` handler. @@ -315,6 +317,13 @@ class Bluebird implements Bluebird.Thenable, Bluebird.Inspection { */ cancel(): void; + /** + * Basically sugar for doing: somePromise.catch(function(){}); + * + * Which is needed in case error handlers are attached asynchronously to the promise later, which would otherwise result in premature unhandled rejection reporting. + */ + suppressUnhandledRejections(): void; + /** * Start the chain of promises with `Promise.try`. Any synchronous exceptions will be turned into rejections on the returned promise. * diff --git a/bookshelf/bookshelf-tests.ts b/bookshelf/bookshelf-tests.ts index 5d6080b99a..818ea25f35 100644 --- a/bookshelf/bookshelf-tests.ts +++ b/bookshelf/bookshelf-tests.ts @@ -71,6 +71,12 @@ class Tag extends bookshelf.Model { get tableName() { return 'tags'; } } +User.where('id', 1).fetch({withRelated: ['posts.tags']}).then(function(user) { + console.log(user.related('posts').toJSON()); +}).catch(function(err) { + console.error(err); +}); + new User().where('id', 1).fetch({withRelated: ['posts.tags']}) .then(user => { const posts = user.related('posts'); diff --git a/bookshelf/bookshelf.d.ts b/bookshelf/bookshelf.d.ts index 34f58d62ed..ec340679e7 100644 --- a/bookshelf/bookshelf.d.ts +++ b/bookshelf/bookshelf.d.ts @@ -93,6 +93,8 @@ declare module 'bookshelf' { static fetchAll>() : Promise>; /** @deprecated should use `new` objects instead. */ static forge(attributes? : any, options? : ModelOptions) : T; + static where(properties: { [key: string]: any }): T; + static where(key: string, operatorOrValue: string | number | boolean, valueIfOperator?: string | number | boolean): T; belongsTo>(target : {new(...args : any[]) : R}, foreignKey? : string) : R; belongsToMany>(target : {new(...args : any[]) : R}, table? : string, foreignKey? : string, otherKey? : string) : Collection; diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index ce422de880..c94b60625f 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -9,7 +9,7 @@ interface BootboxBaseOptions { title?: string | Element; callback?: (result: boolean | string) => any; - onEscape?: () => any | boolean; + onEscape?: (() => any) | boolean; show?: boolean; backdrop?: boolean; closeButton?: boolean; diff --git a/bootstrap-notify/bootstrap-notify.d.ts b/bootstrap-notify/bootstrap-notify.d.ts index acdb83b9fd..77d249694e 100644 --- a/bootstrap-notify/bootstrap-notify.d.ts +++ b/bootstrap-notify/bootstrap-notify.d.ts @@ -36,7 +36,10 @@ interface NotifySettings { from?: string; align?: string; }; - offset?: number; + offset?: number | { + x?: number; + y?: number; + }; spacing?: number; z_index?: number; delay?: number; @@ -59,4 +62,4 @@ interface NotifyReturn { $ele: JQueryStatic; close: () => void; update: (command: string, update: any) => void; -} \ No newline at end of file +} diff --git a/bowser/bowser-tests.ts b/bowser/bowser-tests.ts index 2f7cb8904c..79a846f3fb 100644 --- a/bowser/bowser-tests.ts +++ b/bowser/bowser-tests.ts @@ -7,3 +7,13 @@ Bowser.test(['msie']) === true; Bowser.a === Bowser.c; Bowser.osversion > 10; Bowser.osversion === '10.1A'; + +bowser.msedge === true; +bowser.test(['msie']) === true; +bowser.a === bowser.c; +bowser.osversion > 10; +bowser.osversion === '10.1A'; +bowser.compareVersions(['9.0', '10']); +bowser() === {android: true, x: true}; +bowser.check({msie: "11"}, window.navigator.userAgent); +bowser.isUnsupportedBrowser({msie: "10"}, window.navigator.userAgent); \ No newline at end of file diff --git a/bowser/bowser.d.ts b/bowser/bowser.d.ts index 2bf1b3d510..4d1840ff6a 100644 --- a/bowser/bowser.d.ts +++ b/bowser/bowser.d.ts @@ -3,52 +3,104 @@ // Definitions by: Paulo Cesar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare var bowser: BowserModule.IBowser; + declare module 'bowser' { - var def: BowserModule.IBowser; - export = def; + export = bowser; } declare namespace BowserModule { - export interface IBowserUA { - msie: boolean; + export interface IBowserOS { + mac: boolean; + /**other than Windows Phone */ + windows: boolean; + windowsphone: boolean; + /**other than android, chromeos, webos, tizen, and sailfish */ + linux: boolean; + chromeos: boolean; + android: boolean; + /** also sets one of iphone/ipad/ipod */ + ios: boolean; + blackberry: boolean; + firefoxos: boolean; + /** may also set touchpad */ + webos: boolean; + bada: boolean; + tizen: boolean; + sailfish: boolean; + } + + export interface IBowserVersions { chrome: boolean; - webkit: boolean; - phantom: boolean; - opera: boolean; + firefox: boolean; + msie: boolean; + msedge: boolean; safari: boolean; android: boolean; ios: boolean; - webos: boolean; - msedge: boolean; - seamonkey: boolean; - firefox: boolean; - yandexbrowser: boolean; + opera: boolean; + phantom: boolean; blackberry: boolean; - tablet: boolean; - mobile: boolean; + webos: boolean; silk: boolean; bada: boolean; tizen: boolean; - windowsphone: boolean; - firefoxos: boolean; - gecko: boolean; + seamonkey: boolean; sailfish: boolean; - chromeBook: boolean; + ucbrowser: boolean; + qupzilla: boolean; + vivaldi: boolean; + sleipnir: boolean; + kMeleon: boolean; + } + + export interface IBowserEngines { + /** IE <= 11 */ + msie: boolean; + /**Chrome 0-27, Android <4.4, iOs, BB, etc. */ + webkit: boolean; + /**Chrome >=28, Android >=4.4, Opera, etc. */ + blink: boolean; + /**Firefox, etc. */ + gecko: boolean; + /** IE > 11 */ + msedge: boolean; + /** If a tablet device is detected, the flag tablet is set instead of mobile. */ + tablet: boolean; + /** All detected mobile OSes are additionally flagged mobile, unless it's a tablet */ + mobile: boolean; + + } + + export interface IBowserGrade { /** Grade A browser */ a: boolean; /** Grade C browser */ c: boolean; /** Grade X browser */ x: boolean; + /**A human readable name for this browser. E.g. 'Chrome', '' */ name: string; + /**Version number for the browser. E.g. '32.0' */ version: string|number; osversion: string|number; } - export interface IBowser extends IBowserUA { + export interface IBowserDetection extends IBowserGrade, IBowserEngines, IBowserOS, IBowserVersions { } + + export interface IBowserMinVersions { + // { msie: "11", "firefox": "4" } + [index: string]: string; + } + + export interface IBowser extends IBowserDetection { + (): IBowserDetection; test(browserList: string[]): boolean; _detect(ua: string): IBowser; + compareVersions(versions: string[]): number; + check(minVersions: IBowserMinVersions, strictMode?: boolean|string, ua?: string): Boolean; + isUnsupportedBrowser(minVersions: IBowserMinVersions, strictMode?: boolean|string, ua?: string): boolean; } } diff --git a/braintree-web/braintree-web-tests.ts b/braintree-web/braintree-web-tests.ts new file mode 100644 index 0000000000..40b34df418 --- /dev/null +++ b/braintree-web/braintree-web-tests.ts @@ -0,0 +1,432 @@ +/// + +let version: string = braintree.VERSION; + +let clientToken: string = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI0YjlhYzVmYmI4ZTNkYzQzMmFkZjJhNzBlNjZlMWNjY2M5ODRkYzE4ZTM4YmY4NjYzZTM5NjM3NWZjYmQzY2U5fGNyZWF0ZWRfYXQ9MjAxNi0wOS0wOFQwNTowMzo0MC4xNjk1NTUwMzUrMDAwMFx1MDAyNm1lcmNoYW50X2lkPTM0OHBrOWNnZjNiZ3l3MmJcdTAwMjZwdWJsaWNfa2V5PTJuMjQ3ZHY4OWJxOXZtcHIiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvMzQ4cGs5Y2dmM2JneXcyYi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzLzM0OHBrOWNnZjNiZ3l3MmIvY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tLzM0OHBrOWNnZjNiZ3l3MmIifSwidGhyZWVEU2VjdXJlRW5hYmxlZCI6dHJ1ZSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJtZXJjaGFudEFjY291bnRJZCI6ImFjbWV3aWRnZXRzbHRkc2FuZGJveCIsImN1cnJlbmN5SXNvQ29kZSI6IlVTRCJ9LCJjb2luYmFzZUVuYWJsZWQiOmZhbHNlLCJtZXJjaGFudElkIjoiMzQ4cGs5Y2dmM2JneXcyYiIsInZlbm1vIjoib2ZmIn0="; + +braintree.client.create({ + authorization: clientToken +}, function (error: BraintreeError, clientInstance: any) { + + var form: HTMLFormElement = document.getElementById('my-form-id') as HTMLFormElement; + var data: { creditCard: BraintreeWeb.CreditCardInfo } = { + creditCard: { + number: form['cc-number'].value, + cvv: form['cc-cvv'].value, + expirationDate: form['cc-date'].value, + billingAddress: { + postalCode: form['cc-postal'].value + } + } + }; + + clientInstance.request({ + endpoint: 'payment_methods/credit_cards', + method: 'post', + data: data + }, function (requestErr: BraintreeError, response: { creditCards: any[]; }) { + if (requestErr) { throw new Error(requestErr.message); } + + console.log('Got nonce:', response.creditCards[0].nonce); + }); + + braintree.hostedFields.create({ + client: clientInstance, + styles: { + 'input': { + 'font-size': '16pt', + 'color': '#3A3A3A' + }, + + '.number': { + 'font-family': 'monospace' + }, + '.valid': { + 'color': 'green' + } + }, + fields: { + number: { + selector: '#card-number' + }, + cvv: { + selector: '#cvv' + }, + expirationDate: { + selector: '#expiration-date' + } + } + }, function (hostedFieldsErr?: BraintreeError, hostedFieldsInstance?: any) { + + if (hostedFieldsErr) { + // Handle error in Hosted Fields creation + console.log(`Error Code: ${error.code}, Type: ${error.type}, Message: ${error.message}, Details: ${error.details}`); + return; + } + + let form = new HTMLFormElement(); + + form.addEventListener('submit', function (event: Event) { + event.preventDefault(); + + hostedFieldsInstance.tokenize(function (tokenizeErr: BraintreeError, payload: BraintreeWeb.HostedFieldsTokenizePayload) { + if (tokenizeErr) { + // Handle error in Hosted Fields tokenization + switch (tokenizeErr.code) { + case 'HOSTED_FIELDS_FIELDS_EMPTY': + console.error('All fields are empty! Please fill out the form.'); + break; + case 'HOSTED_FIELDS_FIELDS_INVALID': + console.error('Some fields are invalid:', tokenizeErr.details.invalidFieldKeys); + break; + case 'HOSTED_FIELDS_FAILED_TOKENIZATION': + console.error('Tokenization failed server side. Is the card valid?'); + break; + case 'HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR': + console.error('Network error occurred when tokenizing.'); + break; + default: + console.error('Something bad happened!', tokenizeErr); + } + return; + } + + // Put `payload.nonce` into the `payment-method-nonce` input, and then + // submit the form. Alternatively, you could send the nonce to your server + // with AJAX. + (document.querySelector('input[name="payment-method-nonce"]') as HTMLInputElement).value = payload.nonce; + form.submit(); + }); + }, false); + + hostedFieldsInstance.on('focus', function (event: BraintreeWeb.HostedFieldsStateObject) { + console.log(event.emittedBy, 'has been focused'); + }); + + hostedFieldsInstance.teardown(function (teardownErr: BraintreeError) { + if (teardownErr) { + console.error('Could not tear down Hosted Fields!'); + } else { + console.info('Hosted Fields has been torn down!'); + } + }); + + hostedFieldsInstance.tokenize({ + vault: true + }, function (tokenizeErr: BraintreeError, payload: BraintreeWeb.HostedFieldsTokenizePayload) { + if (tokenizeErr) { + console.error(tokenizeErr); + } else { + console.log('Got nonce:', payload.nonce); + } + }); + + hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: BraintreeError) { + if (addClassErr) { + console.error(addClassErr); + } + }); + + hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: BraintreeError) { + if (addClassErr) { + console.error(addClassErr); + return; + } + + // some time later... + hostedFieldsInstance.removeClass('number', 'custom-class'); + }); + + hostedFieldsInstance.setPlaceholder('number', '4111 1111 1111 1111', function (placeholderErr: BraintreeError) { + if (placeholderErr) { + console.error(placeholderErr); + } + }); + + hostedFieldsInstance.on('cardTypeChange', function (event: BraintreeWeb.HostedFieldsStateObject) { + // Update the placeholder value if there is only one possible card type + if (event.cards.length === 1) { + braintree.hostedFields.setPlaceholder('cvv', event.cards[0].code.name, function (placeholderErr: BraintreeError) { + if (placeholderErr) { + // Handle errors, such as invalid field name + console.error(placeholderErr); + } + }); + } + }); + + hostedFieldsInstance.clear('number', function (clearErr: BraintreeError) { + if (clearErr) { + console.error(clearErr); + } + }); + + hostedFieldsInstance.clear('number'); + hostedFieldsInstance.clear('cvv'); + hostedFieldsInstance.clear('expirationDate'); + + var state = braintree.hostedFields.getState(); + + var formValid = Object.keys(state.fields).every(function (key) { + return state.fields[key].isValid; + }); + }); + + braintree.applePay.create({ client: clientInstance }, function (createErr?: BraintreeError, applePayInstance?: any) { + if (createErr) { + // Handle error in client creation + console.log(`Error Code: ${error.code}, Type: ${error.type}, Message: ${error.message}, Details: ${error.details}`); + + return; + } + + let request = { + countryCode: 'US', + currencyCode: 'USD', + supportedNetworks: ['visa', 'masterCard'], + merchantCapabilities: ['supports3DS'], + total: { label: 'Your Label', amount: '10.00' }, + }; + + var paymentRequest = braintree.applePay.createPaymentRequest(request); + + console.log(paymentRequest); + // { total: { }, countryCode: 'US', currencyCode: 'USD', merchantCapabilities: [ ], supportedNetworks: [ ] } + }); + + braintree.applePay.create({ client: clientInstance }, function (createErr, applePayInstance) { + let request = { + countryCode: 'US', + currencyCode: 'USD', + supportedNetworks: ['visa', 'masterCard'], + merchantCapabilities: ['supports3DS'], + total: { label: 'Your Label', amount: '10.00' }, + }; + + var session = new ApplePaySession(1, request); + + session.onvalidatemerchant = function (event: { validationURL: string }) { + braintree.applePay.performValidation({ + validationURL: event.validationURL + }, function (err, validationData) { + if (err) { + console.error(err); + session.abort(); + return; + } + session.completeMerchantValidation(validationData); + }); + }; + }); + + braintree.applePay.create({ client: clientInstance }, function (createErr, applePayInstance) { + let request = { + countryCode: 'US', + currencyCode: 'USD', + supportedNetworks: ['visa', 'masterCard'], + merchantCapabilities: ['supports3DS'], + total: { label: 'Your Label', amount: '10.00' }, + }; + + var session = new ApplePaySession(1, request); + + session.onpaymentauthorized = function (event) { + braintree.applePay.tokenize({ + token: event.payment.token + }, function (err, tokenizedPayload) { + if (err) { + session.completePayment(ApplePayStatusCodes.STATUS_FAILURE); + return; + } + session.completePayment(ApplePayStatusCodes.STATUS_SUCCESS); + + // Send the tokenizedPayload to your server. + }); + }; + }); + + braintree.paypal.create({ + client: clientInstance + }, function (createErr, paypalInstance) { + if (createErr) { + if (createErr.code === 'PAYPAL_BROWSER_NOT_SUPPORTED') { + console.error('This browser is not supported.'); + } else { + console.error('Error!', createErr); + } + } + + let button = new HTMLButtonElement(); + + button.addEventListener('click', function () { + // Disable the button so that we don't attempt to open multiple popups. + button.setAttribute('disabled', 'disabled'); + + // Because PayPal tokenization opens a popup, this must be called + // as a result of a user action, such as a button click. + paypalInstance.tokenize({ + flow: 'vault' // Required + // Any other tokenization options + }, function (tokenizeErr: BraintreeError, payload: BraintreeWeb.PayPalTokenizePayload) { + button.removeAttribute('disabled'); + + if (tokenizeErr) { + // Handle tokenization errors or premature flow closure + + switch (tokenizeErr.code) { + case 'PAYPAL_POPUP_CLOSED': + console.error('Customer closed PayPal popup.'); + break; + case 'PAYPAL_ACCOUNT_TOKENIZATION_FAILED': + console.error('PayPal tokenization failed. See details:', tokenizeErr.details); + break; + case 'PAYPAL_FLOW_FAILED': + console.error('Unable to initialize PayPal flow. Are your options correct?', tokenizeErr.details); + break; + default: + console.error('Error!', tokenizeErr); + } + } else { + // Submit payload.nonce to your server + } + }); + }); + }); + + braintree.unionpay.create({ client: clientInstance }, function (createErr, unionpayInstance) { + if (createErr) { + console.error(createErr); + return; + } + + unionpayInstance.fetchCapabilities({ + card: { + number: '4111111111111111' + } + }, function (fetchErr: BraintreeError, cardCapabilities: BraintreeWeb.UnionPayFetchCapabilitiesPayload) { + if (fetchErr) { + console.error(fetchErr); + return; + } + + if (cardCapabilities.isUnionPay) { + if (cardCapabilities.unionPay && !cardCapabilities.unionPay.isSupported) { + // Braintree cannot process this UnionPay card. + // Ask the user for a different card. + return; + } + + if (cardCapabilities.isDebit) { + // CVV and expiration date are not required + } else { + // CVV and expiration date are required + } + + // Show mobile phone number field for enrollment + } + }); + + unionpayInstance.enroll({ + card: { + number: '4111111111111111', + expirationMonth: '12', + expirationYear: '2038' + }, + mobile: { + countryCode: '62', + number: '111111111111' + } + }, function (enrollErr: BraintreeError, response: BraintreeWeb.UnionPayEnrollPayload) { + if (enrollErr) { + console.error(enrollErr); + return; + } + + if (response.smsCodeRequired) { + // If smsCodeRequired, wait for SMS auth code from customer + // Then use response.enrollmentId during {@link UnionPay#tokenize} + } else { + // SMS code is not required from the user. + // {@link UnionPay#tokenize} can be called immediately + } + }); + + let enrollResponse: { + enrollmentId: string + }; + + unionpayInstance.tokenize({ + card: { + number: '4111111111111111', + expirationMonth: '12', + expirationYear: '2038', + cvv: '123' + }, + enrollmentId: enrollResponse.enrollmentId, // Returned from enroll + smsCode: '11111' // Received by customer's phone, if SMS enrollment was required. Otherwise it should be omitted + }, function (tokenizeErr: BraintreeError, response: BraintreeWeb.UnionPayTokenizePayload) { + if (tokenizeErr) { + console.error(tokenizeErr); + return; + } + + // Send response.nonce to your server + }); + + unionpayInstance.teardown(function (teardownErr: BraintreeError) { + if (teardownErr) { + console.error('Could not tear down UnionPay.'); + } else { + console.log('UnionPay has been torn down.'); + } + }); + }); +}); + +let existingNonce = "fake-valid-nonce"; +let submitNonceToServer: (nonce: string) => void; + +braintree.threeDSecure.verifyCard({ + nonce: existingNonce, + amount: 123.45, + addFrame: function (err, iframe) { + // Set up your UI and add the iframe. + let my3DSContainer = document.createElement('div'); + my3DSContainer.appendChild(iframe); + document.body.appendChild(my3DSContainer); + }, + removeFrame: function () { + let my3DSContainer = document.createElement('div'); + + // Remove UI that you added in addFrame. + document.body.removeChild(my3DSContainer); + } +}, function (err: BraintreeError, payload: BraintreeWeb.ThreeDSecureVerifyPayload) { + if (err) { + console.error(err); + return; + } + + if (payload.liabilityShifted) { + // Liablity has shifted + submitNonceToServer(payload.nonce); + } else if (payload.liabilityShiftPossible) { + // Liablity may still be shifted + // Decide if you want to submit the nonce + } else { + // Liablity has not shifted and will not shift + // Decide if you want to submit the nonce + } +}); + +braintree.threeDSecure.cancelVerifyCard(function (err: BraintreeError, verifyPayload: BraintreeWeb.ThreeDSecureVerifyPayload) { + if (err) { + // Handle error + console.log(err.message); // No verification payload available + return; + } + + verifyPayload.nonce; // The nonce returned from the 3ds lookup call + verifyPayload.liabilityShifted; // boolean + verifyPayload.liabilityShiftPossible; // boolean +}); \ No newline at end of file diff --git a/braintree-web/braintree-web.d.ts b/braintree-web/braintree-web.d.ts new file mode 100644 index 0000000000..2cf2d89467 --- /dev/null +++ b/braintree-web/braintree-web.d.ts @@ -0,0 +1,1738 @@ +// Type definitions for Braintree-web v3.0.2 +// Project: https://github.com/braintree/braintree-web +// Definitions by: Guy Shahine +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * @module braintree-web/american-express + * @description This module is for use with Amex Express Checkout. To accept American Express cards, use Hosted Fields. + */ +declare namespace BraintreeWeb { + export interface AmericanExpress { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {callback} callback The second argument, `data`, is the {@link AmericanExpress} instance. + * @returns {void} + */ + create: (options: { client: Client }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {object} options Options + * @description You cannot use this constructor directly. Use {@link module:braintree-web/american-express.create|braintree.american-express.create} instead. + * @classdesc This class allows you use a nonce to interact with American Express Checkout. To accept American Express cards, use Hosted Fields. + */ + export class AmericanExpress { + /** + * @class + * @param {object} options Options + * @description You cannot use this constructor directly. Use {@link module:braintree-web/american-express.create|braintree.american-express.create} instead. + * @classdesc This class allows you use a nonce to interact with American Express Checkout. To accept American Express cards, use Hosted Fields. + */ + constructor(options: any); + + /** + * Gets the rewards balance associated with a Braintree nonce. + * @public + * @param {object} options Request options + * @param {string} options.nonce An existing Braintree nonce. + * @param {callback} callback The second argument, data, is the returned server data. + * @returns {void} + * @example + * var americanExpress = require('braintree-web/american-express'); + * + * americanExpress.create({client: clientInstance}, function (createErr, americanExpressInstance) { + * var options = {nonce: existingBraintreeNonce}; + * americanExpressInstance.getRewardsBalance(options, function (getErr, payload) { + * if (getErr || payload.error) { + * // Handle error + * return; + * } + * + * console.log('Rewards amount: ' + payload.rewardsAmount); + * }); + * }); + */ + public getRewardsBalance(options: { nonce: string }, callback: callback): void; + + /** + * Gets the Express Checkout nonce profile given a nonce from American Express. + * @public + * @param {object} options Request options + * @param {string} options.nonce An existing nonce from American Express (note that this is not a nonce from Braintree). + * @param {callback} callback The second argument, data, is the returned server data. + * @returns {void} + * @example + * var americanExpress = require('braintree-web/american-express'); + * + * americanExpress.create({client: clientInstance}, function (createErr, americanExpressInstance) { + * var options = {nonce: existingAmericanExpressNonce}; + * americanExpressInstance.getExpressCheckoutProfile(options, function (getErr, payload) { + * if (getErr) { + * // Handle error + * return; + * } + * + * console.log('Number of cards: ' + payload.amexExpressCheckoutCards.length); + * }); + * }); + */ + public getExpressCheckoutProfile(options: { nonce: string }, callback: callback): void; + } +} + + +// more info https://developer.apple.com/reference/applepayjs/1916082-applepay_js_data_types/paymentrequest + +// billingContact +// Billing contact information for the user. +// countryCode +//Required.The merchant’s two- letter ISO 3166 country code. +// currencyCode +// Required.The three- letter ISO 4217 currency code for the payment. +// lineItems +//A set of line items that explain recurring payments and additional charges. +// merchantCapabilities +// Required.The payment capabilities supported by the merchant.The value must be one or more of supports3DS, supportsEMV, supportsCredit, or supportsDebit. +// requiredBillingContactFields +// The billing information that is required from the user.The value must be one or more of postalAddress, phone, email, or name. +// requiredShippingContactFields +// The shipping information that is required from the user.The value must be one or more of postalAddress, phone, email, or name. +// shippingContact +// Shipping contact information for the user. +// shippingMethods +//A set of available shipping methods.Totals for all shipping methods must be non- negative to pass validation. +// shippingType +// How the items are to be shipped.This property is optional.If specified, it must be one or more of shipping, delivery, storePickup, or servicePickup.The default value is shipping. +// supportedNetworks +// Required.The payment networks supported by the merchant.The value must be one or more of amex, discover, interac, masterCard, privateLabel, or visa. +// total +// Required.The total amount for the payment.The total must be greater than zero and have a label to pass validation. +interface ApplePayPaymentRequest { + total: { + label: string; + amount: string; + }; + countryCode: string; + currencyCode: string; + supportedNetworks: string[]; + merchantCapabilities: string[]; + + billingContact?: any; + shippingContact?: any; + shippingMethods?: any; + shippingType?: any; + requiredBillingContactFields?: any; + requiredShippingContactFields?: any; +} + +declare enum ApplePayStatusCodes { + // The requested action succeeded. + STATUS_SUCCESS = 1, + // The requested action failed. + STATUS_FAILURE, + // The billing address is not valid. + STATUS_INVALID_BILLING_POSTAL_ADDRESS, + // The shipping address is not valid. + STATUS_INVALID_SHIPPING_POSTAL_ADDRESS, + // The shipping contact information is not valid. + STATUS_INVALID_SHIPPING_CONTACT, + // The required PIN information was not provided. Cards on the China Union Pay payment network may require a PIN to authenticate the transaction. + STATUS_PIN_REQUIRED, + // The PIN information is not valid.Cards on the China Union Pay network may require a PIN. + STATUS_PIN_INCORRECT, + // The maximum number of tries for a PIN has been reached and the user has been locked out. Cards on the China Union Pay network may require a PIN. + STATUS_PIN_LOCKOUT, +} + +interface ApplePayPayload { + merchantIdentifier: string; + domainName: string; + displayName: string; +} + +declare class ApplePaySession { + constructor(version: number, request: ApplePayPaymentRequest); + + canMakePayments(): boolean; + + canMakePaymentsWithActiveCard(merchantIdentifier: string): boolean; + + completeMerchantValidation(merchantSession: any): void; + + abort(): void; + + begin(): void; + + completePayment(status: ApplePayStatusCodes): void; + + completePaymentMethodSelection(newTotal: any, newLineItems: any): void; + + completeShippingContactSelection(status: ApplePayStatusCodes, newShippingMethods: any, newTotal: any, newLineItems: any): void; + + completeShippingMethodSelection(status: ApplePayStatusCodes, newTotal: any, newLineItems: any): void; + + supportsVersion(version: number): boolean; + + oncancel: (event: any) => void; + + onpaymentauthorized: (event: any) => void; + + onpaymentmethodselected: (event: any) => void; + + onshippingcontactselected: (event: any) => void; + + onshippingmethodselected: (event: any) => void; + + onvalidatemerchant: (event: any) => void; +} + +/** + * @module braintree-web/apple-pay + * @description Accept Apple Pay on the Web. *This component is currently in beta and is subject to change.* + */ +declare namespace BraintreeWeb { + export interface ApplePay { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {callback} callback The second argument, `data`, is the {@link ApplePay} instance. + * @returns {void} + */ + create: (options: { client: Client }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {object} options Options + * @description You cannot use this constructor directly. Use {@link module:braintree-web/apple-pay.create|braintree.apple-pay.create} instead. + * @classdesc This class represents an Apple Pay component. Instances of this class have methods for validating the merchant server and tokenizing payments. + */ + export class ApplePay { + /** + * @class + * @param {object} options Options + * @description You cannot use this constructor directly. Use {@link module:braintree-web/apple-pay.create|braintree.apple-pay.create} instead. + * @classdesc This class represents an Apple Pay component. Instances of this class have methods for validating the merchant server and tokenizing payments. + */ + constructor(options: any); + + /** + * Merges a payment request with Braintree defaults + * The following properties are assigned to `paymentRequest` if not already defined + * - countryCode + * - currencyCode + * - merchantCapabilities + * - supportedNetworks + * @public + * @param {external:ApplePayPaymentRequest} paymentRequest The payment request details to apply on top of those from Braintree. + * @returns {external:ApplePayPaymentRequest} The decorated `paymentRequest`. + * @example + * var applePay = require('braintree-web/apple-pay'); + * + * applePay.create({client: clientInstance}, function (createErr, applePayInstance) { + * // ... + * var paymentRequest = applePay.createPaymentRequest({ + * total: { + * label: 'My Company', + * amount: '19.99' + * }); + * + * console.log(paymentRequest); + * // { total: { }, countryCode: 'US', currencyCode: 'USD', merchantCapabilities: [ ], supportedNetworks: [ ] } + * + */ + public createPaymentRequest(paymentRequest: ApplePayPaymentRequest): ApplePayPaymentRequest + + /** + * Validates the merchant website, as required by ApplePaySession before payment can be authorized. + * @public + * @param {object} options Options + * @param {string} options.validationURL The validationURL fram an ApplePayValidateMerchantEvent. + * @param {string} [options.displayName] + * - The canonical name for your store. + * - The system may display this name to the user. + * - Use a 128-character or less, UTF-8 string. + * - Do not localize the name. + * @param {string} [options.merchantIdentifier] + * Your Apple merchant identifier. This is the Apple Merchant ID created on the Apple Developer Portal. + * Defaults to the merchant identifier specified in the Braintree Control Panel. + * You can use this field to override the merchant identifier for this transaction. + * @param {callback} callback The second argument, data, is the Apple Pay merchant session object. + * Pass the merchant session to your Apple Pay session's completeMerchantValidation method. + * @returns {void} + * @example + * var applePay = require('braintree-web/apple-pay'); + * + * applePay.create({client: clientInstance}, function (createErr, applePayInstance) { + * var session = new ApplePaySession(1, { + * // This should be the payment request object that + * // contains the information needed to display the payment sheet. + * }); + * + * session.onvalidatemerchant = function (event) { + * applePay.performValidation({ + * validationURL: event.validationURL + * }, function(err, validationData) { + * if (err) { + * console.error(err); + * session.abort(); + * return; + * } + * session.completeMerchantValidation(validationData); + * }); + * }; + * }); + */ + public performValidation(options: { validationURL: string, displayName?: string, merchantIdentifier?: string }, callback: callback): void; + + /** + * Tokenizes an Apple Pay payment. + * @public + * @param {object} options Options + * @param {object} options.token The `payment.token` property of an {@link external:ApplePayPaymentAuthorizedEvent} + * @param {callback} callback The second argument, data, is the tokenized payload. + * @returns {void} + * @example + * var applePay = require('braintree-web/apple-pay'); + * + * applePay.create({client: clientInstance}, function (createErr, applePayInstance) { + * var session = new ApplePaySession(1, { }); + * + * session.onpaymentauthorized = function (event) { + * applePay.tokenize({ + * token: event.payment.token + * }, function (err, tokenizedPayload) { + * if (err) { + * session.completePayment(ApplePaySession.STATUS_FAILURE); + * return; + * } + * session.completePayment(ApplePaySession.STATUS_SUCCESS); + * + * // Send the tokenizedPayload to your server. + * }); + * }; + * }); + */ + public tokenize(options: { token: any }, callback: callback): void; + + } +} + +/** @module braintree-web/client */ +declare namespace BraintreeWeb { + /** + * This object is returned by {@link Client#getConfiguration|getConfiguration}. This information is used extensively by other Braintree modules to properly configure themselves. + * @typedef {object} Client~configuration + * @property {object} client The braintree-web/client parameters. + * @property {string} client.authorization A tokenizationKey or clientToken. + * @property {object} gatewayConfiguration Gateway-supplied configuration. + * @property {object} analyticsMetadata Analytics-specific data. + * @property {string} analyticsMetadata.sessionId Uniquely identifies a browsing session. + * @property {string} analyticsMetadata.sdkVersion The braintree.js version. + * @property {string} analyticsMetadata.merchantAppId Identifies the merchant's web app. + */ + interface ClientAnalyticsMetadata { + sessionId: string; + sdkVersion: string; + merchantAppId: string; + } + + interface Configuration { + client: Client; + gatewayConfiguration: any; + analyticsMetadata: ClientAnalyticsMetadata; + } + + interface CreditCardInfo { + number: string; + cvv: string; + expirationDate: string; + billingAddress: { + postalCode?: string; + } + } + + export interface Client { + authorization: string; + + /** + * @function + * @description This function is the entry point for the braintree.client module. It is used for creating {@link Client} instances that service communication to Braintree servers. + * @param {object} options Object containing all {@link Client} options: + * @param {string} options.authorization A tokenizationKey or clientToken. + * @param {callback} callback The second argument, data, is the {@link Client} instance. + * @returns {void} + * @example + * var createClient = require('braintree-web/client').create; + * + * createClient({ + * authorization: CLIENT_AUTHORIZATION + * }, function (createErr, clientInstance) { + * ... + * }); + * @static + */ + create: (options: { authorization: string }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {Client~configuration} configuration Options + * @description Do not use this constructor directly. Use {@link module:braintree-web/client.create|braintree.client.create} instead. + * @classdesc This class is required by many other Braintree components. It serves as the base API layer that communicates with our servers. It is also capable of being used to formulate direct calls to our servers, such as direct credit card tokenization. See {@link Client#request}. + */ + export class Client { + /** + * @class + * @param {Client~configuration} configuration Options + * @description Do not use this constructor directly. Use {@link module:braintree-web/client.create|braintree.client.create} instead. + * @classdesc This class is required by many other Braintree components. It serves as the base API layer that communicates with our servers. It is also capable of being used to formulate direct calls to our servers, such as direct credit card tokenization. See {@link Client#request}. + */ + constructor(configuration: Configuration); + + + /** + * Returns a copy of the configuration values. + * @public + * @returns {Client~configuration} configuration + */ + public getConfiguration(): Configuration; + + /** + * Used by other modules to formulate all network requests to the Braintree gateway. It is also capable of being used directly from your own form to tokenize credit card information. However, be sure to satisfy PCI compliance if you use direct card tokenization. + * @public + * @param {object} options Request options: + * @param {string} options.method HTTP method. i.e. "get" or "post" + * @param {string} options.endpoint Enpoint path. i.e. "payment_methods" + * @param {object} options.data Data to send with the request + * @param {string} [options.timeout=60000] Timeout limit + * @param {callback} callback The second argument, data, is the returned server data. + * @example + * Direct Credit Card Tokenization + * var createClient = require('braintree-web/client').create; + * + * createClient({ + * authorization: CLIENT_AUTHORIZATION + * }, function (createErr, clientInstance) { + * var form = document.getElementById('my-form-id'); + * var data = { + * creditCard: { + * number: form['cc-number'].value, + * cvv: form['cc-cvv'].value, + * expirationDate: form['cc-date'].value, + * billingAddress: { + * postalCode: form['cc-postal'].value + * } + * } + * }; + * + * // Warning: For a merchant to be eligible for the easiest level of PCI compliance (SAQ A), + * // payment fields cannot be hosted on your checkout page. + * // For an alternative to the following, use Hosted Fields. + * clientInstance.request({ + * endpoint: 'payment_methods/credit_cards', + * method: 'post', + * data: data + * }, function (requestErr, response) { + * if (requestErr) { throw new Error(requestErr); } + * + * console.log('Got nonce:', response.creditCards[0].nonce); + * }); + * }); + * @returns {void} + */ + public request(options: { method: string, endpoint: string, data: any, timeout?: number }, callback: callback): void; + + } +} + +/** @module braintree-web/data-collector */ +declare namespace BraintreeWeb { + export interface DataCollector { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {boolean} [options.kount] If true, Kount fraud data collection is enabled. + * @param {boolean} [options.paypal] If true, PayPal fraud data collection is enabled. + * @param {callback} callback The second argument, `data`, is the {@link DataCollector} instance. + * @returns {void} + */ + create: (options: { client: Client, kount: boolean, paypal: boolean }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @global + * @name DataCollector + * @description Do not use this constructor directly. Use {@link module:braintree-web/data-collector.create|braintree-web.data-collector.create} instead. + * @classdesc This class is used for advanced fraud integration with PayPal and Kount. Instances of this class have {@link DataCollector#deviceData|deviceData} which is used to correlate user sessions with server transactions. + */ + export class DataCollector { + /** + * @class + * @global + * @name DataCollector + * @description Do not use this constructor directly. Use {@link module:braintree-web/data-collector.create|braintree-web.data-collector.create} instead. + * @classdesc This class is used for advanced fraud integration with PayPal and Kount. Instances of this class have {@link DataCollector#deviceData|deviceData} which is used to correlate user sessions with server transactions. + */ + constructor(); + + /** + * @memberof DataCollector + * @name deviceData + * @type string + * @description JSON string to pass with server transactions. + * @instance + */ + deviceData: string; + + /** + * @memberof DataCollector + * @name teardown + * @function + * @description Cleanly remove all event handlers and DOM nodes that were added. + * @param {callback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. + * @instance + * @returns {void} + */ + teardown(callback?: callback): void; + + } +} + +/** @module braintree-web/hosted-fields */ +declare namespace BraintreeWeb { + /** + * Fields used in {@link module:braintree-web/hosted-fields~fieldOptions fields options} + * @typedef {object} field + * @property {string} selector A CSS selector to find the container where the hosted field will be inserted. + * @property {string} [placeholder] Will be used as the `placeholder` attribute of the input. If `placeholder` is not natively supported by the browser, it will be polyfilled. + * @property {boolean} [formatInput=true] - Enable or disable automatic formatting on this field. Note: Input formatting does not work properly on Android and iOS, so input formatting is automatically disabled on those browsers. + */ + interface HostedFieldsField { + selector: string; + placeholder?: string; + formatInput?: boolean; + } + + /** + * An object that has {@link module:braintree-web/hosted-fields~field field objects} for each field. Used in {@link module:braintree-web/hosted-fields~create create}. + * @typedef {object} fieldOptions + * @property {field} [number] A field for card number. + * @property {field} [expirationDate] A field for expiration date in `MM/YYYY` format. This should not be used with the `expirationMonth` and `expirationYear` properties. + * @property {field} [expirationMonth] A field for expiration month in `MM` format. This should be used with the `expirationYear` property. + * @property {field} [expirationYear] A field for expiration year in `YYYY` format. This should be used with the `expirationMonth` property. + * @property {field} [cvv] A field for 3 or 4 digit CVV or CID. + * @property {field} [postalCode] A field for postal or region code. + */ + interface HostedFieldFieldOptions { + number: HostedFieldsField; + expirationDate?: HostedFieldsField; + expirationMonth?: HostedFieldsField; + expirationYear?: HostedFieldsField; + cvv: HostedFieldsField; + postalCode?: HostedFieldsField; + } + + /** + * @typedef {object} HostedFields~hostedFieldsCard + * @description Information about the card type, sent in {@link HostedFields~stateObject|stateObjects}. + * @property {string} type The code-friendly representation of the card type. It will be one of the following strings: + * - `american-express` + * - `diners-club` + * - `discover` + * - `jcb` + * - `maestro` + * - `master-card` + * - `unionpay` + * - `visa` + * @property {string} niceType The pretty-printed card type. It will be one of the following strings: + * - `American Express` + * - `Diners Club` + * - `Discover` + * - `JCB` + * - `Maestro` + * - `MasterCard` + * - `UnionPay` + * - `Visa` + * @property {object} code + * This object contains data relevant to the security code requirements of the card brand. + * For example, on a Visa card there will be a CVV of 3 digits, whereas an + * American Express card requires a 4-digit CID. + * @property {string} code.name "CVV" "CID" "CVC" + * @property {number} code.size The expected length of the security code. Typically, this is 3 or 4. + */ + + interface HostedFieldsCardCode { + name: string; + size: number; + } + + interface HostedFieldsHostedFieldsCard { + type: string; + niceType: string; + code: HostedFieldsCardCode; + } + + /** + * @typedef {object} HostedFields~hostedFieldsFieldData + * @description Data about Hosted Fields fields, sent in {@link HostedFields~stateObject|stateObjects}. + * @property {HTMLElement} container Reference to the container DOM element on your page associated with the current event. + * @property {boolean} isFocused Whether or not the input is currently focused. + * @property {boolean} isEmpty Whether or not the user has entered a value in the input. + * @property {boolean} isPotentiallyValid + * A determination based on the future validity of the input value. + * This is helpful when a user is entering a card number and types "41". + * While that value is not valid for submission, it is still possible for + * it to become a fully qualified entry. However, if the user enters "4x" + * it is clear that the card number can never become valid and isPotentiallyValid will + * return false. + * @property {boolean} isValid Whether or not the value of the associated input is fully qualified for submission. + */ + interface HostedFieldsHostedFieldsFieldData { + container: HTMLElement; + isFocused: boolean; + isEmpty: boolean; + isPotentiallyValid: boolean; + isValid: boolean; + } + + /** + * @typedef {object} HostedFields~stateObject + * @description The event payload sent from {@link HostedFields#on|on} or {@link HostedFields#getState|getState}. + * @property {HostedFields~hostedFieldsCard[]} cards + * This will return an array of potential {@link HostedFields~hostedFieldsCard|cards}. If the card type has been determined, the array will contain only one card. + * Internally, Hosted Fields uses credit-card-type, + * an open-source card detection library. + * @property {string} emittedBy + * The name of the field associated with an event. This will not be included if returned by {@link HostedFields#getState|getState}. It will be one of the following strings:
+ * - `"number"` + * - `"cvv"` + * - `"expirationDate"` + * - `"expirationMonth"` + * - `"expirationYear"` + * - `"postalCode"` + * @property {object} fields + * @property {?HostedFields~hostedFieldsFieldData} fields.number {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the number field, if it is present. + * @property {?HostedFields~hostedFieldsFieldData} fields.cvv {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the CVV field, if it is present. + * @property {?HostedFields~hostedFieldsFieldData} fields.expirationDate {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the expiration date field, if it is present. + * @property {?HostedFields~hostedFieldsFieldData} fields.expirationMonth {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the expiration month field, if it is present. + * @property {?HostedFields~hostedFieldsFieldData} fields.expirationYear {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the expiration year field, if it is present. + * @property {?HostedFields~hostedFieldsFieldData} fields.postalCode {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the postal code field, if it is present. + */ + interface HostedFieldsFieldDataFields { + number: HostedFieldsHostedFieldsFieldData; + cvv: HostedFieldsHostedFieldsFieldData; + expirationDate: HostedFieldsHostedFieldsFieldData; + expirationMonth: HostedFieldsHostedFieldsFieldData; + expirationYear: HostedFieldsHostedFieldsFieldData; + postalCode: HostedFieldsHostedFieldsFieldData; + } + + interface HostedFieldsStateObject { + cards: HostedFieldsHostedFieldsCard[]; + emittedBy: string; + fields: HostedFieldsFieldDataFields; + } + + /** + * @typedef {object} HostedFields~tokenizePayload + * @property {string} nonce The payment method nonce. + * @property {object} details Additional account details. + * @property {string} details.cardType Type of card, ex: Visa, MasterCard. + * @property {string} details.lastTwo Last two digits of card number. + * @property {string} description A human-readable description. + * @property {string} type The payment method type, always `CreditCard`. + */ + interface HostedFieldsAccountDetails { + cardType: string; + lastTwo: string; + } + + interface HostedFieldsTokenizePayload { + nonce: string; + details: HostedFieldsAccountDetails; + type: string; + description: string; + } + + export interface HostedFields { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {fieldOptions} options.fields A {@link module:braintree-web/hosted-fields~fieldOptions set of options for each field}. + * @param {styleOptions} options.styles {@link module:braintree-web/hosted-fields~styleOptions Styles} applied to each field. + * @param {callback} callback The second argument, `data`, is the {@link HostedFields} instance. + * @returns {void} + * @example + * braintree.hostedFields.create({ + * client: clientInstance, + * styles: { + * 'input': { + * 'font-size': '16pt', + * 'color': '#3A3A3A' + * }, + * '.number': { + * 'font-family': 'monospace' + * }, + * '.valid': { + * 'color': 'green' + * } + * }, + * fields: { + * number: { + * selector: '#card-number' + * }, + * cvv: { + * selector: '#cvv' + * }, + * expirationDate: { + * selector: '#expiration-date' + * } + * } + * }, callback); + */ + create: (options: { client: Client, fields: HostedFieldFieldOptions, styles: any }, callback: callback) => void; + + + /** + * An object that represents CSS that will be applied in each hosted field. This object looks similar to CSS. Typically, these styles involve fonts (such as `font-family` or `color`). + * + * These are the CSS properties that Hosted Fields supports. Any other CSS should be specified on your page and outside of any Braintree configuration. Trying to set unsupported properties will fail and put a warning in the console. + * + * `color` `font-family` `font-size-adjust` `font-size` `font-stretch` `font-style` `font-variant-alternates` `font-variant-caps` `font-variant-east-asian` `font-variant-ligatures` `font-variant-numeric` `font-variant` `font-weight` `font` `line-height` `opacity` `outline` `text-shadow` `transition` `-moz-osx-font-smoothing` `-moz-tap-highlight-color` `-moz-transition` `-webkit-font-smoothing` `-webkit-tap-highlight-color` `-webkit-transition` + * @typedef {object} styleOptions + */ + styleOptions: any; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class HostedFields + * @param {object} options The Hosted Fields {@link module:braintree-web/hosted-fields.create create} options. + * @description Do not use this constructor directly. Use {@link module:braintree-web/hosted-fields.create|braintree-web.hosted-fields.create} instead. + * @classdesc This class represents a Hosted Fields component produced by {@link module:braintree-web/hosted-fields.create|braintree-web/hosted-fields.create}. Instances of this class have methods for interacting with the input fields within Hosted Fields' iframes. + */ + export class HostedFields { + /** + * @class HostedFields + * @param {object} options The Hosted Fields {@link module:braintree-web/hosted-fields.create create} options. + * @description Do not use this constructor directly. Use {@link module:braintree-web/hosted-fields.create|braintree-web.hosted-fields.create} instead. + * @classdesc This class represents a Hosted Fields component produced by {@link module:braintree-web/hosted-fields.create|braintree-web/hosted-fields.create}. Instances of this class have methods for interacting with the input fields within Hosted Fields' iframes. + */ + constructor(options: any); + + /** + * @name HostedFields#on + * @function + * @param {string} event The name of the event to which you are subscribing. + * @param {function} handler A callback to handle the event. + * @description Subscribes a handler function to a named event. `event` should be {@link HostedFields#event:blur|blur}, {@link HostedFields#event:focus|focus}, {@link HostedFields#event:empty|empty}, {@link HostedFields#event:notEmpty|notEmpty}, {@link HostedFields#event:cardTypeChange|cardTypeChange}, or {@link HostedFields#event:validityChange|validityChange}. Events will emit a {@link HostedFields~stateObject|stateObject}. + * @example + * Listening to a Hosted Field event, in this case 'focus' + * hostedFields.create({ ... }, function (createErr, hostedFieldsInstance) { + * hostedFieldsInstance.on('focus', function (event) { + * console.log(event.emittedBy, 'has been focused'); + * }); + * }); + * @returns {void} + */ + on(event: string, handler: (() => any)): void; + + /** + * Cleanly tear down anything set up by {@link module:braintree-web/hosted-fields.create|create} + * @public + * @param {callback} [callback] Callback executed on completion, containing an error if one occurred. No data is returned if teardown completes successfully. + * @example + * hostedFieldsInstance.teardown(function (teardownErr) { + * if (teardownErr) { + * console.error('Could not tear down Hosted Fields!'); + * } else { + * console.info('Hosted Fields has been torn down!'); + * } + * }); + * @returns {void} + */ + public teardown(callback?: callback): void; + + /** + * Tokenizes fields and returns a nonce payload. + * @public + * @param {object} [options] All tokenization options for the Hosted Fields component. + * @param {boolean} [options.vault=false] When true, will vault the tokenized card. Cards will only be vaulted when using a client created with a client token that includes a customer ID. + * @param {callback} callback The second argument, data, is a {@link HostedFields~tokenizePayload|tokenizePayload} + * @example Tokenize a card + * hostedFieldsInstance.tokenize(function (tokenizeErr, payload) { + * if (tokenizeErr) { + * switch (tokenizeErr.code) { + * case 'HOSTED_FIELDS_FIELDS_EMPTY': + * console.error('All fields are empty! Please fill out the form.'); + * break; + * case 'HOSTED_FIELDS_FIELDS_INVALID': + * console.error('Some fields are invalid:', tokenizeErr.details.invalidFieldKeys); + * break; + * case 'HOSTED_FIELDS_FAILED_TOKENIZATION': + * console.error('Tokenization failed server side. Is the card valid?'); + * break; + * case 'HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR': + * console.error('Network error occurred when tokenizing.'); + * break; + * default: + * console.error('Something bad happened!', tokenizeErr); + * } + * } else { + * console.log('Got nonce:', payload.nonce); + * } + * }); + * @example Tokenize and vault a card + * hostedFieldsInstance.tokenize({ + * vault: true + * }, function (tokenizeErr, payload) { + * if (tokenizeErr) { + * console.error(tokenizeErr); + * } else { + * console.log('Got nonce:', payload.nonce); + * } + * }); + * @returns {void} + */ + public tokenize(options?: { vault: boolean }, callback?: callback): void; + + /** + * Add a class to a {@link module:braintree-web/hosted-fields~field field}. Useful for updating field styles when events occur elsewhere in your checkout. + * @public + * @param {string} field The field you wish to add a class to. Must be a valid {@link module:braintree-web/hosted-fields~fieldOptions fieldOption}. + * @param {string} classname The class to be added. + * @param {callback} [callback] Callback executed on completion, containing an error if one occurred. No data is returned if the class is added successfully. + * + * @example + * hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr) { + * if (addClassErr) { + * console.error(addClassErr); + * } + * }); + * @returns {void} + */ + public addClass(field: string, classname: string, callback?: callback): void; + + /** + * Removes a class to a {@link module:braintree-web/hosted-fields~field field}. Useful for updating field styles when events occur elsewhere in your checkout. + * @public + * @param {string} field The field you wish to remove a class from. Must be a valid {@link module:braintree-web/hosted-fields~fieldOptions fieldOption}. + * @param {string} classname The class to be removed. + * @param {callback} [callback] Callback executed on completion, containing an error if one occurred. No data is returned if the class is removed successfully. + * + * @example + * hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr) { + * if (addClassErr) { + * console.error(addClassErr); + * return; + * } + * + * // some time later... + * hostedFieldsInstance.removeClass('number', 'custom-class'); + * }); + * @returns {void} + */ + public removeClass(field: string, classname: string, callback?: callback): void; + + /** + * Sets the placeholder of a {@link module:braintree-web/hosted-fields~field field}. + * @public + * @param {string} field The field whose placeholder you wish to change. Must be a valid {@link module:braintree-web/hosted-fields~fieldOptions fieldOption}. + * @param {string} placeholder Will be used as the `placeholder` attribute of the input. + * @param {callback} [callback] Callback executed on completion, containing an error if one occurred. No data is returned if the placeholder updated successfully. + * + * @example + * hostedFieldsInstance.setPlaceholder('number', '4111 1111 1111 1111', function (placeholderErr) { + * if (placeholderErr) { + * console.error(placeholderErr); + * } + * }); + * + * @example Update CVV field on card type change + * hostedFieldsInstance.on('cardTypeChange', function (event) { + * // Update the placeholder value if there is only one possible card type + * if (event.cards.length === 1) { + * hostedFields.setPlaceholder('cvv', event.cards[0].code.name, function (placeholderErr) { + * if (placeholderErr) { + * // Handle errors, such as invalid field name + * console.error(placeholderErr); + * } + * }); + * } + * }); + * @returns {void} + */ + public setPlaceholder(field: string, placeholder: string, callback?: callback): void; + + /** + * Clear the value of a {@link module:braintree-web/hosted-fields~field field}. + * @public + * @param {string} field The field whose placeholder you wish to clear. Must be a valid {@link module:braintree-web/hosted-fields~fieldOptions fieldOption}. + * @param {callback} [callback] Callback executed on completion, containing an error if one occurred. No data is returned if the field cleared successfully. + * @returns {void} + * @example + * hostedFieldsInstance.clear('number', function (clearErr) { + * if (clearErr) { + * console.error(clearErr); + * } + * }); + * + * @example Clear several fields + * hostedFieldsInstance.clear('number'); + * hostedFieldsInstance.clear('cvv'); + * hostedFieldsInstance.clear('expirationDate'); + */ + public clear(field: string, callback?: callback): void; + + /** + * Returns an {@link HostedFields~stateObject|object} that includes the state of all fields and possible card types. + * @public + * @returns {object} {@link HostedFields~stateObject|stateObject} + * @example Check if all fields are valid + * var state = hostedFields.getState(); + * + * var formValid = Object.keys(state.fields).every(function (key) { + * return state.fields[key].isValid; + * }); + */ + public getState(): any; + } +} + +/** @module braintree-web/paypal */ +declare namespace BraintreeWeb { + /** + * @typedef {object} PayPal~tokenizeReturn + * @property {Function} close A handle to close the PayPal checkout flow. + */ + interface PayPalTokenizeReturn { + close: (() => any); + } + + /** + * @typedef {object} PayPal~tokenizePayload + * @property {string} nonce The payment method nonce. + * @property {string} type The payment method type, always `PayPalAccount`. + * @property {object} details Additional PayPal account details. + * @property {string} details.email User's email address. + * @property {string} details.payerId User's payer ID, the unique identifier for each PayPal account. + * @property {string} details.firstName User's given name. + * @property {string} details.lastName User's surname. + * @property {?string} details.countryCode User's 2 character country code. + * @property {?string} details.phone User's phone number (e.g. 555-867-5309). + * @property {?object} details.shippingAddress User's shipping address details, only available if shipping address is enabled. + * @property {string} details.shippingAddress.recipientName Recipient of postage. + * @property {string} details.shippingAddress.line1 Street number and name. + * @property {string} details.shippingAddress.line2 Extended address. + * @property {string} details.shippingAddress.city City or locality. + * @property {string} details.shippingAddress.state State or region. + * @property {string} details.shippingAddress.postalCode Postal code. + * @property {string} details.shippingAddress.countryCode 2 character country code (e.g. US). + * @property {?object} details.billingAddress User's billing address details. + * You will also need to enable the PayPal Billing Address Request feature in your PayPal account. + * To enable this feature, [contact PayPal](https://developers.braintreepayments.com/support/guides/paypal/setup-guide#contacting-paypal-support). + * @property {string} details.billingAddress.line1 Street number and name. + * @property {string} details.billingAddress.line2 Extended address. + * @property {string} details.billingAddress.city City or locality. + * @property {string} details.billingAddress.state State or region. + * @property {string} details.billingAddress.postalCode Postal code. + * @property {string} details.billingAddress.countryCode 2 character country code (e.g. US). + */ + interface PayPalShippingAddress { + recipientName: string; + line1: string; + line2: string; + city: string; + state: string; + postalCode: string; + countryCode: string; + } + + interface PayPalBillingAddress { + line1: string; + line2: string; + city: string; + state: string; + postalCode: string; + countryCode: string; + } + + interface PayPalAccountDetails { + email: string; + payerId: string; + firstName: string; + lastName: string; + countryCode: string; + phone: string; + shippingAddress: PayPalShippingAddress; + billingAddress: PayPalBillingAddress; + } + + interface PayPalTokenizePayload { + nonce: string; + type: string; + details: PayPalAccountDetails; + } + + export interface PayPal { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {callback} callback The second argument, `data`, is the {@link PayPal} instance. + * @example + * braintree.paypal.create( + * client: clientInstance + * }, function (createErr, paypalInstance) { + * if (createErr) { + * if (createErr.code === 'PAYPAL_BROWSER_NOT_SUPPORTED') { + * console.error('This browser is not supported.'); + * } else { + * console.error('Error!', createErr); + * } + * } + * } + * @returns {void} + */ + create: (options: { client: Client }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {object} options see {@link module:braintree-web/paypal.create|paypal.create} + * @classdesc This class represents a PayPal component. Instances of this class have methods for launching auth dialogs and other programmatic interactions with the PayPal component. + */ + export class PayPal { + /** + * @class + * @param {object} options see {@link module:braintree-web/paypal.create|paypal.create} + * @classdesc This class represents a PayPal component. Instances of this class have methods for launching auth dialogs and other programmatic interactions with the PayPal component. + */ + constructor(options: any); + + /** + * Launches the PayPal login flow and returns a nonce payload. Only one PayPal login flow should be active at a time. One way to achieve this is to disable your PayPal button while the flow is open. + * @public + * @param {object} options All tokenization options for the PayPal component. + * @param {string} options.flow Set to 'checkout' for one-time payment flow, or 'vault' for Vault flow. If 'vault' is used with a client token generated with a customer id, the PayPal account will be added to that customer as a saved payment method. + * @param {string} [options.intent=authorize] + * Checkout flows only. + * * `authorize` - Submits the transaction for authorization but not settlement. + * * `sale` - Payment will be immediately submitted for settlement upon creating a transaction. + * @param {boolean} [options.offerCredit=false] Offers the customer PayPal Credit if they qualify. Checkout flows only. + * @param {string} [options.useraction] + * Changes the call-to-action in the PayPal flow. By default the final button will show the localized + * word for "Continue" and implies that the final amount billed is not yet known. + * + * Setting this option to `commit` changes the button text to "Pay Now" and page text will convey to + * the user that billing will take place immediately. + * @param {string|number} [options.amount] The amount of the transaction. Required when using the Checkout flow. + * @param {string} [options.currency] The currency code of the amount, such as 'USD'. Required when using the Checkout flow. + * @param {string} [options.displayName] The merchant name displayed inside of the PayPal lightbox; defaults to the company name on your Braintree account + * @param {string} [options.locale=en_US] Use this option to change the language, links, and terminology used in the PayPal flow to suit the country and language of your customer. + * @param {boolean} [options.enableShippingAddress=false] Returns a shipping address object in {@link PayPal#tokenize}. + * @param {object} [options.shippingAddressOverride] Allows you to pass a shipping address you have already collected into the PayPal payment flow. + * @param {string} options.shippingAddressOverride.line1 Street address. + * @param {string} [options.shippingAddressOverride.line2] Street address (extended). + * @param {string} options.shippingAddressOverride.city City. + * @param {string} options.shippingAddressOverride.state State. + * @param {string} options.shippingAddressOverride.postalCode Postal code. + * @param {string} options.shippingAddressOverride.countryCode Country. + * @param {string} [options.shippingAddressOverride.phone] Phone number. + * @param {string} [options.shippingAddressOverride.recipientName] Recipient's name. + * @param {boolean} [options.shippingAddressEditable=true] Set to false to disable user editing of the shipping address. + * @param {string} [options.billingAgreementDescription] Use this option to set the description of the preapproved payment agreement visible to customers in their PayPal profile during Vault flows. Max 255 characters. + * @param {callback} callback The second argument, data, is a {@link PayPal~tokenizePayload|tokenizePayload}. + * @example + * button.addEventListener('click', function () { + * // Disable the button so that we don't attempt to open multiple popups. + * button.setAttribute('disabled', 'disabled'); + * + * // Because PayPal tokenization opens a popup, this must be called + * // as a result of a user action, such as a button click. + * paypalInstance.tokenize({ + * flow: 'vault' // Required + * // Any other tokenization options + * }, function (tokenizeErr, payload) { + * button.removeAttribute('disabled'); + * + * if (tokenizeErr) { + * // Handle tokenization errors or premature flow closure + * + * switch (tokenizeErr.code) { + * case 'PAYPAL_POPUP_CLOSED': + * console.error('Customer closed PayPal popup.'); + * break; + * case 'PAYPAL_ACCOUNT_TOKENIZATION_FAILED': + * console.error('PayPal tokenization failed. See details:', tokenizeErr.details); + * break; + * case 'PAYPAL_FLOW_FAILED': + * console.error('Unable to initialize PayPal flow. Are your options correct?', tokenizeErr.details); + * break; + * default: + * console.error('Error!', tokenizeErr); + * } + * } else { + * // Submit payload.nonce to your server + * } + * }); + * }); + * @returns {PayPal~tokenizeReturn} A handle to close the PayPal checkout frame. + */ + public tokenize(options: { flow: string, intent: string, offerCredit: boolean, useraction: string, amount: (string | number), currency: string, displayName: string, locale: string, enableShippingAddress: boolean, shippingAddressOverride: PayPalShippingAddress, shippingAddressEditable: boolean, billingAgreementDescription: string }, callback: callback): PayPalTokenizeReturn; + + /** + * Cleanly tear down anything set up by {@link module:braintree-web/paypal.create|create}. + * @public + * @param {callback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. + * @returns {void} + */ + public teardown(callback?: () => void): void; + + } +} + +/** @module braintree-web/three-d-secure */ +declare namespace BraintreeWeb { + /** + * @typedef {object} ThreeDSecure~verifyPayload + * @property {string} nonce The new payment method nonce produced by the 3D Secure lookup. The original nonce passed into {@link ThreeDSecure#verifyCard|verifyCard} was consumed. This new nonce should be used to transact on your server. + * @property {object} details Additional account details. + * @property {string} details.cardType Type of card, ex: Visa, MasterCard. + * @property {string} details.lastTwo Last two digits of card number. + * @property {string} description A human-readable description. + * @property {boolean} liabilityShiftPossible Indicates whether the card was eligible for 3D Secure. + * @property {boolean} liabilityShifted Indicates whether the liability for fraud has been shifted away from the merchant. + */ + interface ThreeDSecureAccountDetails { + cardType: string; + lastTwo: string; + } + + interface ThreeDSecureVerifyPayload { + nonce: string; + details: ThreeDSecureAccountDetails; + description: string; + liabilityShiftPossible: boolean; + liabilityShifted: boolean; + } + + export interface ThreeDSecure { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {callback} callback The second argument, `data`, is the {@link ThreeDSecure} instance. + * @returns {void} + * @example + * braintree.threeDSecure.create({ + * client: client + * }, callback); + */ + create: (options: { client: Client }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {object} options 3D Secure {@link module:braintree-web/three-d-secure.create create} options + * @description Do not use this constructor directly. Use {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create} instead. + * @classdesc This class represents a ThreeDSecure component produced by {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create}. Instances of this class have a method for launching a 3D Secure authentication flow. + */ + export class ThreeDSecure { + /** + * @class + * @param {object} options 3D Secure {@link module:braintree-web/three-d-secure.create create} options + * @description Do not use this constructor directly. Use {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create} instead. + * @classdesc This class represents a ThreeDSecure component produced by {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create}. Instances of this class have a method for launching a 3D Secure authentication flow. + */ + constructor(options: any); + + + /** + * @callback ThreeDSecure~addFrameCallback + * @param {?BraintreeError} [err] `null` or `undefined` if there was no error. + * @param {HTMLIFrameElement} iframe An iframe element containing the bank's authentication page that you must put on your page. + * @description The callback used for options.addFrame in {@link ThreeDSecure#verifyCard|verifyCard}. + * @returns {void} + */ + addFrameCallback: (err?: BraintreeError, iframe?: HTMLIFrameElement) => void; + + /** + * @callback ThreeDSecure~removeFrameCallback + * @description The callback used for options.removeFrame in {@link ThreeDSecure#verifyCard|verifyCard}. + * @returns {void} + */ + removeFrameCallback: () => void; + + /** + * Launch the 3D Secure login flow, returning a nonce payload. + * @public + * @param {object} options Options for card verification. + * @param {string} options.nonce A nonce referencing the card to be verified. For example, this can be a nonce that was returned by Hosted Fields. + * @param {number} options.amount The amount of the transaction in the current merchant account's currency. For example, if you are running a transaction of $123.45 US dollars, `amount` would be 123.45. + * @param {errback} options.addFrame This {@link ThreeDSecure~addFrameCallback|addFrameCallback} will be called when the bank frame needs to be added to your page. + * @param {callback} options.removeFrame This {@link ThreeDSecure~removeFrameCallback|removeFrameCallback} will be called when the bank frame needs to be removed from your page. + * @param {errback} callback The second argument, data, is a {@link ThreeDSecure~verifyPayload|verifyPayload} + * @returns {void} + * @example + * Verifying an existing nonce with 3DS + * var my3DSContainer; + * + * threeDSecure.verifyCard({ + * nonce: existingNonce, + * amount: 123.45, + * addFrame: function (err, iframe) { + * // Set up your UI and add the iframe. + * my3DSContainer = document.createElement('div'); + * my3DSContainer.appendChild(iframe); + * document.body.appendChild(my3DSContainer); + * }, + * removeFrame: function () { + * // Remove UI that you added in addFrame. + * document.body.removeChild(my3DSContainer); + * } + * }, function (err, payload) { + * if (err) { + * console.error(err); + * return; + * } + * + * if (payload.liabilityShifted) { + * // Liablity has shifted + * submitNonceToServer(payload.nonce); + * } else if (payload.liabilityShiftPossible) { + * // Liablity may still be shifted + * // Decide if you want to submit the nonce + * } else { + * // Liablity has not shifted and will not shift + * // Decide if you want to submit the nonce + * } + * }); + */ + public verifyCard(options: { nonce: string, amount: number, addFrame: (err?: BraintreeError, iframe?: HTMLIFrameElement) => void, removeFrame: () => void }, callback: callback): void; + + /** + * Cancel the 3DS flow and return the verification payload if available. + * @public + * @param {errback} callback The second argument is a {@link ThreeDSecure~verifyPayload|verifyPayload}. If there is no verifyPayload (the initial lookup did not complete), an error will be returned. + * @returns {void} + * @example + * threeDSecure.cancelVerifyCard(function (err, verifyPayload) { + * if (err) { + * // Handle error + * console.log(err.message); // No verification payload available + * return; + * } + * + * verifyPayload.nonce; // The nonce returned from the 3ds lookup call + * verifyPayload.liabilityShifted; // boolean + * verifyPayload.liabilityShiftPossible; // boolean + * }); + */ + public cancelVerifyCard(callback: callback): void; + + /** + * Cleanly tear down anything set up by {@link module:braintree-web/three-d-secure.create|create} + * @public + * @param {errback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. + * @returns {void} + */ + public teardown(callback?: callback): void; + } +} + +/** + * @module braintree-web/unionpay + * @description This module allows you to accept UnionPay payments. *It is currently in beta and is subject to change.* + */ +declare namespace BraintreeWeb { + /** + * @typedef {object} UnionPay~tokenizePayload + * @property {string} nonce The payment method nonce. + * @property {string} type Always CreditCard. + * @property {object} details Additional account details: + * @property {string} details.cardType Type of card, ex: Visa, MasterCard. + * @property {string} details.lastTwo Last two digits of card number. + * @property {string} description A human-readable description. + */ + interface UnionPayAccountDetails { + cardType: string; + lastTwo: string; + description: string; + } + + interface UnionPayTokenizePayload { + nonce: string; + type: string; + details: UnionPayAccountDetails; + } + + /** + * @typedef {object} UnionPay~enrollPayload + * @property {string} enrollmentId UnionPay enrollment ID. This value should be passed to `tokenize`. + * @property {boolean} smsCodeRequired UnionPay `smsCodeRequired` flag. + *

true - the user will receive an SMS code that needs to be supplied for tokenization. + *

false - the card can be immediately tokenized. + */ + interface UnionPayEnrollPayload { + enrollmentId: string; + smsCodeRequired: boolean; + } + + /** + * @typedef {object} UnionPay~fetchCapabilitiesPayload + * @property {boolean} isUnionPay Determines if this card is a UnionPay card. + * @property {boolean} isDebit Determines if this card is a debit card. This property is only present if `isUnionPay` is `true`. + * @property {object} unionPay UnionPay specific properties. This property is only present if `isUnionPay` is `true`. + * @property {boolean} unionPay.supportsTwoStepAuthAndCapture Determines if the card allows for an authorization, but settling the transaction later. + * @property {boolean} unionPay.isSupported Determines if Braintree can process this UnionPay card. When false, Braintree cannot process this card and the user should use a different card. + */ + + interface UnionPayProperties { + supportsTwoStepAuthAndCapture: boolean; + isSupported: boolean; + } + + interface UnionPayFetchCapabilitiesPayload { + isUnionPay: boolean; + isDebit: boolean; + unionPay: UnionPayProperties; + } + + export interface UnionPay { + /** + * @static + * @function create + * @param {object} options Creation options: + * @param {Client} options.client A {@link Client} instance. + * @param {callback} callback The second argument, `data`, is the {@link UnionPay} instance. + * @returns {void} + * @example + * braintree.unionpay.create({ client: clientInstance }, function (createErr, unionpayInstance) { + * if (createErr) { + * console.error(createErr); + * return; + * } + * // ... + * }); + */ + create: (options: { client: Client }, callback: callback) => void; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; + } + + /** + * @class + * @param {object} options See {@link module:braintree-web/unionpay.create|unionpay.create}. + * @description You cannot use this constructor directly. Use {@link module:braintree-web/unionpay.create|braintree-web.unionpay.create} instead. + * @classdesc This class represents a UnionPay component. Instances of this class have methods for {@link UnionPay#fetchCapabilities fetching capabilities} of UnionPay cards, {@link UnionPay#enroll enrolling} a UnionPay card, and {@link UnionPay#tokenize tokenizing} a UnionPay card. + */ + export class UnionPay { + /** + * @class + * @param {object} options See {@link module:braintree-web/unionpay.create|unionpay.create}. + * @description You cannot use this constructor directly. Use {@link module:braintree-web/unionpay.create|braintree-web.unionpay.create} instead. + * @classdesc This class represents a UnionPay component. Instances of this class have methods for {@link UnionPay#fetchCapabilities fetching capabilities} of UnionPay cards, {@link UnionPay#enroll enrolling} a UnionPay card, and {@link UnionPay#tokenize tokenizing} a UnionPay card. + */ + constructor(options: any); + + /** + * Fetches the capabilities of a card, including whether or not the SMS enrollment process is required. + * @public + * @param {object} options UnionPay {@link UnionPay#fetchCapabilities fetchCapabilities} options + * @param {object} [options.card] The card from which to fetch capabilities. Note that this will only have one property, `number`. Required if you are not using the `hostedFields` option. + * @param {string} options.card.number Card number. + * @param {HostedFields} [options.hostedFields] The Hosted Fields instance used to collect card data. Required if you are not using the `card` option. + * @param {callback} callback The second argument, data, is a {@link UnionPay#fetchCapabilitiesPayload fetchCapabilitiesPayload}. + * @example With raw card data + * unionpayInstance.fetchCapabilities({ + * card: { + * number: '4111111111111111' + * } + * }, function (fetchErr, cardCapabilities) { + * if (fetchErr) { + * console.error(fetchErr); + * return; + * } + * + * if (cardCapabilities.isUnionPay) { + * if (cardCapabilities.unionPay && !cardCapabilities.unionPay.isSupported) { + * // Braintree cannot process this UnionPay card. + * // Ask the user for a different card. + * return; + * } + * + * if (cardCapabilities.isDebit) { + * // CVV and expiration date are not required + * } else { + * // CVV and expiration date are required + * } + * + * // Show mobile phone number field for enrollment + * } + * }); + * @example With Hosted Fields + * // Fetch capabilities on `blur` inside of the Hosted Fields `create` callback + * hostedFieldsInstance.on('blur', function (event) { + * // Only attempt to fetch capabilities when a valid card number has been entered + * if (event.emittedBy === 'number' && event.fields.number.isValid) { + * unionpayInstance.fetchCapabilities({ + * hostedFields: hostedFieldsInstance + * }, function (fetchErr, cardCapabilities) { + * if (fetchErr) { + * console.error(fetchErr); + * return; + * } + * + * if (cardCapabilities.isUnionPay) { + * if (cardCapabilities.unionPay && !cardCapabilities.unionPay.isSupported) { + * // Braintree cannot process this UnionPay card. + * // Ask the user for a different card. + * return; + * } + * if (cardCapabilities.isDebit) { + * // CVV and expiration date are not required + * // Hide the containers with your `cvv` and `expirationDate` fields + * } else { + * // CVV and expiration date are required + * } + * } else { + * // Not a UnionPay card + * // When form is complete, tokenize using your Hosted Fields instance + * } + * + * // Show your own mobile country code and phone number inputs for enrollment + * }); + * }); + * }); + * @returns {void} + */ + public fetchCapabilities(options: { card: any, hostedFields: HostedFields }, callback: callback): void; + + /** + * Enrolls a UnionPay card. Use {@link UnionPay#fetchCapabilities|fetchCapabilities} to determine if the SMS enrollment process is required. + * @public + * @param {object} options UnionPay enrollment options: + * @param {object} [options.card] The card to enroll. Required if you are not using the `hostedFields` option. + * @param {string} options.card.number The card number. + * @param {string} [options.card.expirationDate] The card's expiration date. May be in the form `MM/YY` or `MM/YYYY`. When defined `expirationMonth` and `expirationYear` are ignored. + * @param {string} [options.card.expirationMonth] The card's expiration month. This should be used with the `expirationYear` parameter. When `expirationDate` is defined this parameter is ignored. + * @param {string} [options.card.expirationYear] The card's expiration year. This should be used with the `expirationMonth` parameter. When `expirationDate` is defined this parameter is ignored. + * @param {HostedFields} [options.hostedFields] The Hosted Fields instance used to collect card data. Required if you are not using the `card` option. + * @param {object} options.mobile The mobile information collected from the customer. + * @param {string} options.mobile.countryCode The country code of the customer's mobile phone number. + * @param {string} options.mobile.number The customer's mobile phone number. + * @param {callback} callback The second argument, data, is a {@link UnionPay~enrollPayload|enrollPayload}. + * @example With raw card data + * unionpayInstance.enroll({ + * card: { + * number: '4111111111111111', + * expirationMonth: '12', + * expirationYear: '2038' + * }, + * mobile: { + * countryCode: '62', + * number: '111111111111' + * } + * }, function (enrollErr, response) { + * if (enrollErr) { + * console.error(enrollErr); + * return; + * } + * + * if (response.smsCodeRequired) { + * // If smsCodeRequired, wait for SMS auth code from customer + * // Then use response.enrollmentId during {@link UnionPay#tokenize} + * } else { + * // SMS code is not required from the user. + * // {@link UnionPay#tokenize} can be called immediately + * }); + * @example With Hosted Fields + * unionpayInstance.enroll({ + * hostedFields: hostedFields, + * mobile: { + * countryCode: '62', + * number: '111111111111' + * } + * }, function (enrollErr, response) { + * if (enrollErr) { + * console.error(enrollErr); + * return; + * } + * + * if (response.smsCodeRequired) { + * // If smsCodeRequired, wait for SMS auth code from customer + * // Then use response.enrollmentId during {@link UnionPay#tokenize} + * } else { + * // SMS code is not required from the user. + * // {@link UnionPay#tokenize} can be called immediately + * } + * }); + * @returns {void} + */ + public enroll(options: { card: any, hostedFields: HostedFields, mobile: any }, callback: callback): void; + + /** + * Tokenizes a UnionPay card and returns a nonce payload. + * @public + * @param {object} options UnionPay tokenization options: + * @param {object} [options.card] The card to enroll. Required if you are not using the `hostedFields` option. + * @param {string} options.card.number The card number. + * @param {string} [options.card.expirationDate] The card's expiration date. May be in the form `MM/YY` or `MM/YYYY`. When defined `expirationMonth` and `expirationYear` are ignored. + * @param {string} [options.card.expirationMonth] The card's expiration month. This should be used with the `expirationYear` parameter. When `expirationDate` is defined this parameter is ignored. + * @param {string} [options.card.expirationYear] The card's expiration year. This should be used with the `expirationMonth` parameter. When `expirationDate` is defined this parameter is ignored. + * @param {string} [options.card.cvv] The card's security number. + * @param {HostedFields} [options.hostedFields] The Hosted Fields instance used to collect card data. Required if you are not using the `card` option. + * @param {string} options.enrollmentId The enrollment ID from {@link UnionPay#enroll}. + * @param {string} [options.smsCode] The SMS code received from the user if {@link UnionPay#enroll} payload have `smsCodeRequired`. if `smsCodeRequired` is false, smsCode should not be passed. + * @param {callback} callback The second argument, data, is a {@link UnionPay~tokenizePayload|tokenizePayload}. + * @example With raw card data + * unionpayInstance.tokenize({ + * card: { + * number: '4111111111111111', + * expirationMonth: '12', + * expirationYear: '2038', + * cvv: '123' + * }, + * enrollmentId: enrollResponse.enrollmentId, // Returned from enroll + * smsCode: '11111' // Received by customer's phone, if SMS enrollment was required. Otherwise it should be omitted + * }, function (tokenizeErr, response) { + * if (tokenizeErr) { + * console.error(tokenizeErr); + * return; + * } + * + * // Send response.nonce to your server + * }); + * @example With Hosted Fields + * unionpayInstance.tokenize({ + * hostedFields: hostedFieldsInstance, + * enrollmentId: enrollResponse.enrollmentId, // Returned from enroll + * smsCode: '11111' // Received by customer's phone, if SMS enrollment was required. Otherwise it should be omitted + * }, function (tokenizeErr, response) { + * if (tokenizeErr) { + * console.error(tokenizeErr); + * return; + * } + * + * // Send response.nonce to your server + * }); + * @returns {void} + */ + public tokenize(options: { card: any, hostedFields: HostedFields, enrollmentId: string, smsCode: string }, callback: callback): void; + + /** + * Cleanly tear down anything set up by {@link module:braintree-web/unionpay.create|create}. This only needs to be called when using UnionPay with Hosted Fields. + * @public + * @param {callback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. + * @example + * unionpayInstance.teardown(function (teardownErr) { + * if (teardownErr) { + * console.error('Could not tear down UnionPay.'); + * } else { + * console.log('UnionPay has been torn down.'); + * } + * }); + * @returns {void} + */ + public teardown(callback?: callback): void; + + } +} + +declare namespace BraintreeError { + /** + * Enum for {@link BraintreeError} types. + * @name BraintreeError.types + * @enum + * @readonly + * @memberof BraintreeError + * @property {string} CUSTOMER An error caused by the customer. + * @property {string} MERCHANT An error that is actionable by the merchant. + * @property {string} NETWORK An error due to a network problem. + * @property {string} INTERNAL An error caused by Braintree code. + * @property {string} UNKNOWN An error where the origin is unknown. + */ + export enum Types { + CUSTOMER, + MERCHANT, + NETWORK, + INTERNAL, + UNKNOWN + } +} + +/** + * @class + * @global + * @param {object} options Construction options + * @classdesc This class is used to report error conditions, frequently as the first parameter to callbacks throughout the Braintree SDK. + * @description You cannot use this constructor directly. Interact with instances of this class through {@link callback callbacks}. + */ +declare class BraintreeError { + /** + * @class + * @global + * @param {object} options Construction options + * @classdesc This class is used to report error conditions, frequently as the first parameter to callbacks throughout the Braintree SDK. + * @description You cannot use this constructor directly. Interact with instances of this class through {@link callback callbacks}. + */ + constructor(options: any); + + /** + * @type {string} + * @description A code that corresponds to specific errors. + */ + code: string; + + /** + * @type {string} + * @description A short description of the error. + */ + message: string; + + /** + * @type {BraintreeError.types} + * @description The type of error. + */ + type: BraintreeError.Types; + + /** + * @type {object=} + * @description Additional information about the error, such as an underlying network error response. + */ + details: any; +} + +declare namespace BraintreeWeb { + /** + * @global + * @callback callback + * @param {?BraintreeError} [err] `null` or `undefined` if there was no error. + * @param {?any} [data] The successful result of the asynchronous function call (if data exists). + * @description The Node.js-style callback pattern used throughout the SDK. + * @returns {void} + */ + type callback = (err?: BraintreeError, data?: any) => void; +} + +/** + * @module braintree-web + * @description This is the top-level module exported by the Braintree JavaScript SDK. In a browser environment, this will be the global braintree object. In a CommonJS environment (like Browserify or Webpack), it will be the default export of the braintree-web package. In AMD environments (like RequireJS), it can be `require`d like other modules. + * @example + * CommonJS + * var braintree = require('braintree-web'); + * + * braintree.client.create(...); + * @example + * In the browser + * + * + * @example + * AMD + * // main.js + * require.config({ + * paths: { + * braintreeClient: 'https://js.braintreegateway.com/web/3.0.2/js/client.min' + * } + * }); + * + * require(['braintreeClient'], function (braintreeClient) { + * braintreeClient.create(...); + * }); + */ +interface BraintreeStatic { + /** @type {module:braintree-web/client} */ + client: BraintreeWeb.Client; + + /** @type {module:braintree-web/paypal} */ + paypal: BraintreeWeb.PayPal; + + /** @type {module:braintree-web/hosted-fields} */ + hostedFields: BraintreeWeb.HostedFields; + + /** @type {module:braintree-web/three-d-secure} */ + threeDSecure: BraintreeWeb.ThreeDSecure; + + /** @type {module:braintree-web/data-collector} */ + dataCollector: BraintreeWeb.DataCollector; + + /** @type {module:braintree-web/american-express} */ + americanExpress: BraintreeWeb.AmericanExpress; + + /** @type {module:braintree-web/unionpay} */ + unionpay: BraintreeWeb.UnionPay; + + /** @type {module:braintree-web/apple-pay} */ + applePay: BraintreeWeb.ApplePay; + + /** + * @description The current version of the SDK, i.e. `3.0.2`. + * @type {string} + */ + VERSION: string; +} + +declare var braintree: BraintreeStatic; \ No newline at end of file diff --git a/browser-sync/browser-sync.d.ts b/browser-sync/browser-sync.d.ts index 00d234f958..54b42aff4a 100644 --- a/browser-sync/browser-sync.d.ts +++ b/browser-sync/browser-sync.d.ts @@ -288,11 +288,11 @@ declare module "browser-sync" { middleware?: MiddlewareHandler; ws: boolean; reqHeaders: (config: any) => Hash; - proxyRes: (res: http.ServerResponse, req: http.ServerRequest, next: Function) => any; + proxyRes: (res: http.ServerResponse, req: http.IncomingMessage, next: Function) => any; } interface MiddlewareHandler { - (req: http.ServerRequest, res: http.ServerResponse, next: Function): any; + (req: http.IncomingMessage, res: http.ServerResponse, next: Function): any; } interface PerRouteMiddleware { diff --git a/bufferstream/bufferstream.d.ts b/bufferstream/bufferstream.d.ts index ee115d0ab5..c43a716d4b 100644 --- a/bufferstream/bufferstream.d.ts +++ b/bufferstream/bufferstream.d.ts @@ -104,7 +104,7 @@ declare module 'bufferstream/postbuffer' { http client buffer */ - constructor(req: http.ServerRequest); + constructor(req: http.IncomingMessage); /* set a callback to get all post data from a http server request */ diff --git a/bunnymq/bunnymq-tests.ts b/bunnymq/bunnymq-tests.ts new file mode 100644 index 0000000000..208eb7e992 --- /dev/null +++ b/bunnymq/bunnymq-tests.ts @@ -0,0 +1,36 @@ +/// + +import * as bunnymq from "bunnymq"; + +// Basic usage +var instance = bunnymq({ host: 'amqp://localhost' }); + +// Publisher +instance.producer.produce('queue:name', 'Hello World!'); +// Subscriber +instance.consumer.consume('queue:name', message => { }); + +// RPC Support +instance.producer.produce('queue:name', { message: 'content' }, { rpc: true }) + .then(function (consumerResponse) { + console.log(consumerResponse); + }); + +// Routing keys +instance.producer.produce('queue:name', { message: 'content' }, { routingKey: 'my-routing-key' }); + +// Config +var custom = bunnymq({ + host: 'amqp://localhost', + //number of fetched messages at once on the channel + prefetch: 5, + //requeue put back message into the broker if consumer crashes/trigger exception + requeue: true, + //time between two reconnect (ms) + timeout: 1000, + consumerSuffix: '', + //generate a hostname so we can track this connection on the broker (rabbitmq management plugin) + hostname: "", + //the transport to use to debug. if provided, bunnymq will show some logs + transport: new Object() +}); \ No newline at end of file diff --git a/bunnymq/bunnymq.d.ts b/bunnymq/bunnymq.d.ts new file mode 100644 index 0000000000..1167db21ed --- /dev/null +++ b/bunnymq/bunnymq.d.ts @@ -0,0 +1,120 @@ +// Type definitions for node-bunnymq 2.2.1 +// Project: https://github.com/dial-once/node-bunnymq +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "bunnymq" { + namespace bunnymq { + export type ConsumerCallback = (message: Object) => void; + + /** + * Consumer. + * @interface + */ + export interface Consumer { + /** + * Handle messages from a named queue. + * @param {string} queue A named queue. + * @param {ConsumerCallback} callback A callback. + */ + consume(queue: string, callback: ConsumerCallback): void; + } + + /** + * bunnymq instance. + * @interface + */ + export interface Instance { + /** + * Consumer. + * @type {Consumer} + */ + consumer: Consumer; + + /** + * Producer. + * @type {Producer} + */ + producer: Producer; + } + + /** + * Options. + * @interface + */ + export interface Options { + /** + * Consumer suffix. + * @type {string} + */ + consumerSuffix?: string; + + /** + * Host. + * @type {string} + */ + host?: string; + + /** + * Hostname. + * @type {string} + */ + hostname?: string; + + /** + * Number of fetched messages at once on the channel. + * @type {number} + */ + prefetch?: number; + + /** + * Requeue put back message into the broker if consumer crashes/trigger exception. + * @type {boolean} + */ + requeue?: boolean; + + /** + * Time between two reconnect (in milliseconds). + * @type {number} + */ + timeout?: number; + + /** + * Transport. + * @type {any} + */ + transport?: any; + } + + /** + * Producer. + * @inteface + */ + export interface Producer { + /** + * Send messages to a named queue. + * @param {string} queue A named queue. + * @param {Object} message A message. + * @return {Object} The consumer response. + */ + produce(queue: string, message: Object, options?: ProducerOptions): PromiseLike; + } + + /** + * Options for producer. + * @interface + */ + export interface ProducerOptions { + routingKey?: string; + rpc?: boolean; + } + } + + /** + * Constructor. + * @param {Options} [options] Options. + * @return {Instance} A instance of bunnymq. + */ + function bunnymq(options?: bunnymq.Options): bunnymq.Instance; + export = bunnymq; +} diff --git a/bunyan-config/bunyan-config-tests.ts b/bunyan-config/bunyan-config-tests.ts new file mode 100644 index 0000000000..71d22ee2a4 --- /dev/null +++ b/bunyan-config/bunyan-config-tests.ts @@ -0,0 +1,41 @@ +/// + +import * as bunyan from "bunyan"; +import bunyanConfig = require("bunyan-config"); + +var jsonConfig = { + name: "myLogger", + streams: [{ + stream: "stdout" + }, { + stream: { name: "stderr" } + }, { + type: "raw", + stream: { + name: "bunyan-logstash", + params: { + host: "localhost", + port: 5005 + } + } + }, { + type: "raw", + stream: { + name: "bunyan-redis", + params: { + host: "localhost", + port: 6379 + } + } + }], serializers: { + req: "bunyan:stdSerializers.req", + fromNodeModules: "someNodeModule", + fromNodeModulesWithProps: "someNodeModule:a.b.c", + custom: "./lib/customSerializers:custom", + another: "./lib/anotherSerializer", + absolutePath: "/path/to/serializer:xyz" + } +}; + +var config = bunyanConfig(jsonConfig); +var logger = require("bunyan").createLogger(bunyanConfig); diff --git a/bunyan-config/bunyan-config.d.ts b/bunyan-config/bunyan-config.d.ts new file mode 100644 index 0000000000..fb68702aee --- /dev/null +++ b/bunyan-config/bunyan-config.d.ts @@ -0,0 +1,31 @@ +// Type definitions for bunyan-config 0.2.0 +// Project: https://github.com/LSEducation/bunyan-config +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "bunyan-config" { + import * as bunyan from "bunyan"; + + /** + * Configuration. + * @interface + */ + interface Configuration { + name: string; + streams?: bunyan.Stream[]; + level?: string | number; + stream?: NodeJS.WritableStream; + serializers?: {}; + src?: boolean; + } + + /** + * Constructor. + * @param {Configuration} [jsonConfig] A JSON configuration. + * @return {LoggerOptions} A logger options. + */ + function bunyanConfig(jsonConfig?: Configuration): bunyan.LoggerOptions; + export = bunyanConfig; +} diff --git a/busboy/busboy-tests.ts b/busboy/busboy-tests.ts new file mode 100644 index 0000000000..11e8b6c9ad --- /dev/null +++ b/busboy/busboy-tests.ts @@ -0,0 +1,39 @@ +/// +/// + +import * as Busboy from 'busboy'; +import * as http from 'http'; +import * as util from 'util'; + +function serverFn(req: http.IncomingMessage, res: http.ServerResponse) { + if (req.method === 'POST') { + var busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + console.log('File [' + fieldname + ']: filename: ' + filename + ', encoding: ' + encoding + ', mimetype: ' + mimetype); + file.on('data', function(data: Buffer) { + console.log('File [' + fieldname + '] got ' + data.length + ' bytes'); + }); + file.on('end', function() { + console.log('File [' + fieldname + '] Finished'); + }); + }); + busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) { + console.log('Field [' + fieldname + ']: value: ' + util.inspect(val)); + }); + busboy.on('finish', function() { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end('\ +
\ +
\ +
\ + \ +
\ + '); + } +} diff --git a/busboy/busboy.d.ts b/busboy/busboy.d.ts new file mode 100644 index 0000000000..3b64f3d112 --- /dev/null +++ b/busboy/busboy.d.ts @@ -0,0 +1,60 @@ +// Type definitions for busboy v0.2.13 +// Project: https://www.npmjs.com/package/busboy +// Definitions by: Jacob Baskin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +declare namespace busboy { + interface Options { + headers: any; + } + + interface BusboyConfig { + headers?: any; + highWaterMark?: number; + fileHwm?: number; + defCharset?: string; + preservePath?: boolean; + limits?: { + fieldNameSize?: number; + fieldSize?: number; + fields?: number; + fileSize?: number; + files?: number; + parts?: number; + headerPairs?: number; + }; + } + + interface Busboy extends NodeJS.WritableStream { + on(event: 'field', + listener: ( + fieldname: string, + val: any, + fieldnameTruncated: boolean, + valTruncated: boolean, + encoding: string, + mimetype: string) => void): this; + on(event: 'file', + listener: ( + fieldname: string, + file: NodeJS.ReadableStream, + filename: string, + encoding: string, + mimetype: string) => void): this; + on(event: 'finish', callback: () => void): this; + on(event: 'partsLimit', callback: () => void): this; + on(event: 'filesLimit', callback: () => void): this; + on(event: 'fieldsLimit', callback: () => void): this; + on(event: string, listener: Function): this; + } + + interface BusboyConstructor { + new (options: BusboyConfig): Busboy; + } +} + +declare module 'busboy' { + const temp: busboy.BusboyConstructor; + export = temp; +} diff --git a/c3/c3.d.ts b/c3/c3.d.ts index 2838ba2675..83ccf85853 100644 --- a/c3/c3.d.ts +++ b/c3/c3.d.ts @@ -385,10 +385,10 @@ declare namespace c3 { * - d is the data where mouse cursor moves out. In this callback, this will be the Chart object. */ onmouseout?: (d: any, element?: any) => void; - // onselected?: any; - // onunselected?: any; - // ondragstart?: any; - // ondragend?: any; + + onselected?: (d: any, element?: any) => void; + + onunselected?: (d: any, element?: any) => void; } interface Axis { @@ -681,7 +681,7 @@ declare namespace c3 { * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. * If undefined returned, the row of that value will be skipped. */ - value?: (name: string, ratio: number, id: string, index: number) => string; + value?: (value: any, ratio: number, id: string, index: number) => string; }; /** * Set custom position for the tooltip. This option can be used to modify the tooltip position by returning object that has top and left. diff --git a/cache-manager/cache-manager.d.ts b/cache-manager/cache-manager.d.ts index 9570857f01..de6cf867a7 100644 --- a/cache-manager/cache-manager.d.ts +++ b/cache-manager/cache-manager.d.ts @@ -28,7 +28,7 @@ declare module 'cache-manager' { module cacheManager { - function caching(ICongig: StoreConfig): Cache; + function caching(IConfig: StoreConfig): Cache; function multiCaching(Caches: Cache[]): Cache; } diff --git a/canvas-gauges/canvas-gauges-tests.ts b/canvas-gauges/canvas-gauges-tests.ts new file mode 100644 index 0000000000..015bdfd7e2 --- /dev/null +++ b/canvas-gauges/canvas-gauges-tests.ts @@ -0,0 +1,22 @@ +/// + +import { + LinearGaugeOptions, + RadialGaugeOptions, + LinearGauge, + RadialGauge +} from 'canvas-gauges'; + +let linearOptions: LinearGaugeOptions = { + renderTo: document.createElement('canvas'), + fontNumbersStyle: 'italic' +}; +let radialOptions: RadialGaugeOptions = { + renderTo: 'gauge-id', + fontNumbersWeight: 'bold' +}; + +new LinearGauge(linearOptions); +new RadialGauge(radialOptions); + +console.log(document.gauges.length); diff --git a/canvas-gauges/canvas-gauges.d.ts b/canvas-gauges/canvas-gauges.d.ts new file mode 100644 index 0000000000..5dbd361872 --- /dev/null +++ b/canvas-gauges/canvas-gauges.d.ts @@ -0,0 +1,278 @@ +// Type definitions for canvas-gauges +// Project: https://github.com/Mikhus/canvas-gauges +// Definitions by: Mikhus +// Definitions: https://github.com/Mikhus/DefinitelyTyped + +declare namespace CanvasGauges { + export type FontStyle = 'normal' | 'italic' | 'oblique'; + export type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | + '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; + + export type RenderTarget = string|HTMLElement; + + export interface AnimationRule { + (percent: number): number; + } + + export interface Highlight { + from: number, + to: number, + color: string + } + + export type MajorTicks = string[]|number[]; + + export interface GenericOptions { + renderTo: RenderTarget, + width?: number, + height?: number, + minValue?: number, + maxValue?: number, + value?: number, + units?: string|boolean, + majorTicks?: MajorTicks, + minorTicks?: number, + strokeTicks?: boolean, + animatedValue?: boolean, + animateOnInit?: boolean, + title?: string|boolean, + borders?: boolean, + valueInt?: number, + valueDec?: number, + majorTicksInt?: number, + majorTicksDec?: number, + animation?: boolean, + animationDuration?: number, + animationRule?: string|AnimationRule, + colorPlate?: string, + colorMajorTicks?: string, + colorMinorTicks?: string, + colorTitle?: string, + colorUnits?: string, + colorNumbers?: string, + colorNeedle?: string, + colorNeedleEnd?: string, + colorValueText?: string, + colorValueTextShadow?: string, + colorBorderShadow?: string, + colorBorderOuter?: string, + colorBorderOuterEnd?: string, + colorBorderMiddle?: string, + colorBorderMiddleEnd?: string, + colorBorderInner?: string, + colorBorderInnerEnd?: string, + colorValueBoxRect?: string, + colorValueBoxRectEnd?: string, + colorValueBoxBackground?: string, + colorValueBoxShadow?: string, + colorNeedleShadowUp?: string, + colorNeedleShadowDown?: string, + needle?: boolean, + needleShadow?: boolean, + needleType?: string, + needleStart?: number, + needleEnd?: number, + needleWidth?: number, + borderOuterWidth?: number, + borderMiddleWidth?: number, + borderInnerWidth?: number, + borderShadowWidth?: number, + valueBox?: boolean, + valueBoxWidth?: number, + valueBoxStroke?: number, + valueText?: string, + valueTextShadow?: boolean, + valueBoxBorderRadius?: number, + highlights?: Highlight[], + highlightsWidth?: number, + fontNumbers?: string, + fontTitle?: string, + fontUnits?: string, + fontValue?: string, + fontTitleSize?: number, + fontValueSize?: number, + fontUnitsSize?: number, + fontNumbersSize?: number, + fontTitleStyle?: FontStyle, + fontValueStyle?: FontStyle, + fontUnitsStyle?: FontStyle, + fontNumbersStyle?: FontStyle, + fontTitleWeight?: FontWeight, + fontValueWeight?: FontWeight, + fontUnitsWeight?: FontWeight, + fontNumbersWeight?: FontWeight + } + + export interface RadialGaugeOptions extends GenericOptions { + ticksAngle?: number, + startAngle?: number, + colorNeedleCircleOuter?: string, + colorNeedleCircleOuterEnd?: string, + colorNeedleCircleInner?: string, + colorNeedleCircleInnerEnd?: string, + needleCircleSize?: number, + needleCircleInner?: boolean, + needleCircleOuter?: boolean, + animationTarget?: string + } + + export interface LinearGaugeOptions extends GenericOptions { + borderRadius?: number, + barBeginCircle?: number, + barWidth?: number, + barStrokeWidth?: number, + barProgress?: boolean, + colorBar?: string, + colorBarEnd?: string, + colorBarStroke?: string, + colorBarProgress?: string, + colorBarProgressEnd?: string, + tickSide?: string, + needleSide?: string, + numberSide?: string, + ticksWidth?: number, + ticksWidthMinor?: number, + ticksPadding?: number, + barLength?: number + } + + export interface DrawEventCallback { + (percent: number): any; + } + + export interface EndEventCallback { + (): any; + } + + export interface rules { + linear: AnimationRule, + quad: AnimationRule, + dequad: AnimationRule, + quint: AnimationRule, + dequint: AnimationRule, + cycle: AnimationRule, + decycle: AnimationRule, + bounce: AnimationRule, + debounce: AnimationRule, + elastic: AnimationRule, + delastic: AnimationRule + } + + export class Animation { + public duration: number; + public rule: string|AnimationRule; + public draw: DrawEventCallback; + public end: EndEventCallback; + + public static rules: rules; + + constructor(rule?: string|AnimationRule, duration?: number, + draw?: DrawEventCallback, end?: EndEventCallback); + + public animate(draw?: DrawEventCallback, end?: EndEventCallback): any; + public destroy(): any; + } + + export class SmartCanvas { + public element: HTMLCanvasElement; + public elementClone: HTMLCanvasElement; + public context: CanvasRenderingContext2D; + public contextClone: CanvasRenderingContext2D; + public drawWidth: number; + public drawHeight: number; + public drawX: number; + public drawY: number; + public minSide: number; + public width: number; + public height: number; + + constructor(element: HTMLCanvasElement, + width?: number, + height?: number); + + public init(): any; + public onRedraw(): any; + public destroy(): any; + public commit(): SmartCanvas; + public redraw(): SmartCanvas; + + public pixelRatio: number; + public static redraw(): any; + public static collection: Array; + } + + export class DomObserver { + public Type: BaseGauge; + public mutationsObserved: boolean; + public isObservable: boolean; + public options: GenericOptions; + public element: string; + public type: string; + + constructor(options: GenericOptions, + element: string, + type: string); + + public isValidNode(node: Node|HTMLElement): boolean; + public traverse(): any; + public observe(records: MutationRecord[]): any; + public process(node: Node|HTMLElement): BaseGauge; + + public static parse(value: any): any; + public static toDashed(camelCase: string): string; + public static toAttributeName(str: string): string; + static domReady(handler: Function): any; + } + + export abstract class BaseGauge { + public type: BaseGauge; + public options: GenericOptions; + public canvas: SmartCanvas; + public animation: Animation; + public value: number; + + constructor(options: GenericOptions); + + public update(options: GenericOptions): BaseGauge; + public destroy(): any; + public abstract draw(): BaseGauge; + + public static initialize(type: string, options: GenericOptions): any; + } + + export class RadialGauge extends BaseGauge { + public type: RadialGauge; + public options: RadialGaugeOptions; + + constructor(options: RadialGaugeOptions); + + public draw(): RadialGauge; + } + + export class LinearGauge extends BaseGauge { + public type: LinearGauge; + public options: LinearGaugeOptions; + + constructor(options: LinearGaugeOptions); + + public draw(): LinearGauge; + } + + export interface Collection extends Array { + get: (id: number | string) => BaseGauge; + } +} + +declare module 'canvas-gauges' { + export = CanvasGauges; +} + +interface Document { + gauges: CanvasGauges.Collection; +} + +interface Window { + BaseGauge: CanvasGauges.BaseGauge; + RadialGauge: CanvasGauges.RadialGauge; + LinearGauge: CanvasGauges.LinearGauge; +} diff --git a/cash/cash.d.ts b/cash/cash.d.ts new file mode 100644 index 0000000000..efa108e5f8 --- /dev/null +++ b/cash/cash.d.ts @@ -0,0 +1,495 @@ +// Type definitions for Cash +// Project: https://github.com/kenwheeler/cash +// Definitions by: Ashok Vishwakarma +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * OffsetType + * return type for cash.offset(), cash.position() + */ +interface OffsetType { + top: number; + left: number; +} + +/** + * CashStatic + * Static declaration for CashJs accessible directly using Cash object or $ + */ +interface CashStatic { + /** + * isArray + * Check if the argument is an array. + * @type method + * @argument any + * @return boolean + */ + isArray(n: any): boolean; + + /** + * isFunction + * Check if the argument is a function. + * @type method + * @argument any + * @return boolean + */ + isFunction(n: any): boolean; + + /** + * isNumeric + * Check if the argument is numeric. + * @type method + * @type method + * @argument any + * @return boolean + */ + isNumeric(n: any): boolean; + + /** + * isString + * Check if the argument is a string. + * @type method + * @argument str any + * @return boolean + */ + isString(str: any): boolean; + + /** + * extend + * Extends target object with properties from the source object. If no target is provided, cash itself will be extended. + * @type method + * @argument target any, source any + */ + extend(target: any, source: any): any; + + /** + * matches + * Checks a selector against an element, returning a boolean value for match. + * @type method + * @argument element Cash, selector string + * @return boolean + */ + matches(element: Cash, selector: string): boolean; + + /** + * parseHTML + * Returns a collection from an HTML string. + * @type method + * @argument htmlString string + * @return Cash + */ + parseHTML(htmlString: string): Cash; + + /** + * each + * Iterates through a collection and calls the callback method on each. + * @type method + * @argument collection Array, callback Function + * @return Array + */ + each(collection: Array, callback: Function): Array; + + /** + * fn: use to extend cash for plugin development + * @type property + */ + fn: any; + + /** + * selector declaration for Cash to use $() + */ + (selector: string, context?: Element|Cash): Cash; + (element: Element): Cash; + (elementArray: Element[]): Cash; +} + +/** + * Cash + * Interface for CashJs + * Refer https://github.com/kenwheeler/cash for documentation and uses of the methods and properties + */ +interface Cash { + /** + * add + * Returns a new collection with the element(s) added to the end. + */ + add(selector: string|Cash|Element, context?: Element): Cash; + + /** + * addClass + * Adds the className argument to collection elements. + */ + addClass(c: string): Cash; + + /** + * after + * Inserts content or elements after the collection. + */ + after(selector: Element|String): Cash; + + /** + * append + * Appends the target element to the each element in the collection. + */ + append(content: string|Element|Cash): Cash; + + /** + * appendTo + * Adds the elements in a collection to the target element(s). + */ + appendTo(parent: string|Element|Cash): Cash; + + /** + * attr + * Without attrValue, returns the attribute value of the first element in the collection. + * With attrValue, sets the attribute value of each element of the collection. + */ + attr(name: string): any; + attr(name: string, value: string): Cash; + + /** + * before + * Inserts content or elements before the collection. + */ + before(selector: string|Element): Cash; + + /** + * children + * Without a selector specified, returns a collection of child elements. + * With a selector, returns child elements that match the selector. + */ + children(selector?: string): Cash; + + /** + * closest + * Returns the closest matching selector up the DOM tree. + */ + closest(selector?: string): Cash; + + /** + * clone + * Returns a clone of the collection. + */ + clone(): Cash; + + /** + * css + * Returns a CSS property value when just property is supplied. + * Sets a CSS property when property and value are supplied, and set multiple properties when an object is supplied. + * Properties will be autoprefixed if needed for the user's browser. + */ + css(prop: any): any; + css(prop: string, value: any): Cash; + + /** + * data + * Link some data (string, object, array, etc.) to an element when both key and value are supplied. + * If only a key is supplied, returns the linked data and falls back to data attribute value if no data is already linked. + * Multiple data can be set when an object is supplied. + */ + data(name: any): any; + data(name: string, value: any): Cash; + + /** + * each + * Iterates over a collection with callback(value, index, array). + */ + each(callback: Function): Cash; + + /** + * empty + * Empties an elements interior markup. + */ + empty(): Cash; + + /** + * eq + * Returns a collection with the element at index. + */ + eq(index: number): Cash; + + /** + * extend + * Adds properties to the cash collection prototype. + */ + extend(target: any): any; + + /** + * filter + * Returns the collection that results from applying the filter method. + */ + filter(selector: Function): Cash; + + /** + * find + * Returns selector match descendants from the first element in the collection. + */ + find(selector: string): Cash; + + /** + * first + * Returns the first element in the collection. + */ + first(): Cash; + + /** + * get + * Returns the element at the index. + */ + get(index: number): HTMLElement; + + /** + * has + * Returns boolean result of the selector argument against the collection. + */ + has(selector: string): boolean; + + /** + * hasClass + * Returns the boolean result of checking if the first element in the collection has the className attribute. + */ + hasClass(c: string): boolean; + + /** + * height + * Returns the height of the element. + */ + height(): number; + + /** + * html + * Returns the HTML text of the first element in the collection, sets the HTML if provided. + */ + html(): string; + html(content: string): Cash; + + /** + * index + * Returns the index of the element in its parent if an element or selector isn't provided. + * Returns index within element or selector if it is. + */ + index(elem?: Element): number; + + /** + * innerHeight + * Returns the height of the element + padding. + */ + innerHeight(): number; + + /** + * innerWidth + * Returns the width of the element + padding. + */ + innerWidth(): number; + + /** + * insertAfter + * Inserts collection after specified element. + */ + insertAfter(selector: string|Element|Cash): Cash; + + /** + * insertBefore + * Inserts collection before specified element. + */ + insertBefore(selector: string|Element|Cash): Cash; + + /** + * is + * Returns whether the provided selector, element or collection matches any element in the collection. + */ + is(selector: string|Element|Cash): boolean; + + /** + * last + * Returns last element in the collection. + */ + last(): Cash; + + /** + * next + * Returns next sibling. + */ + next(): Cash; + + /** + * not + * Filters collection by false match on selector. + */ + not(selector: string|Element|Cash): Cash; + + /** + * off + * Removes event listener from collection elements. + */ + off(eventName: string, callback: Function): Cash; + + /** + * offset + * Get the coordinates of the first element in a collection relative to the document. + */ + offset(): OffsetType; + + /** + * offsetParent + * Get the first element's ancestor that's positioned. + */ + offsetParent(): OffsetType; + + /** + * on + * Adds event listener to collection elements. Event is delegated if delegate is supplied. + */ + on(eventName: string|Array, delegate: any, callback?: Function, runOnce?: boolean): Cash; + + /** + * one + * Adds event listener to collection elements that only triggers once for each element. + * Event is delegated if delegate is supplied. + */ + one(eventName: string|Array, delegate: any, callback?: Function, runOnce?: boolean): Cash; + + /** + * outerHeight + * Returns the outer height of the element. Includes margins if margin is set to true. + */ + outerHeight(flag?: boolean): number; + + /** + * outerWidth + * Returns the outer width of the element. Includes margins if margin is set to true. + */ + outerWidth(flag?: boolean): number; + + /** + * parent + * Returns parent element. + */ + parent(): Cash; + + /** + * parents + * Returns collection of elements who are parents of element. Optionally filtering by selector. + */ + parents(selector?: string): Cash; + + /** + * position + * Get the coordinates of the first element in a collection relative to its offsetParent. + */ + position(): OffsetType; + + /** + * prepend + * Prepends element to the each element in collection. + */ + prepend(content: string): Cash; + + /** + * prependTo + * Prepends elements in a collection to the target element(s). + */ + prependTo(parent: string|Element|Cash): Cash; + + /** + * prev + * Returns the previous adjacent element. + */ + prev(): Cash; + + /** + * prop + * Returns a property value when just property is supplied. + * Sets a property when property and value are supplied, and sets multiple properties when an object is supplied. + */ + prop(name: string): any; + prop(name: string, value: string): Cash; + + /** + * ready + * Calls callback method on DOMContentLoaded. + */ + ready(fn: Function): void; + + /** + * remove + * Removes collection elements from the DOM. + */ + remove(): Cash; + + /** + * removeAttr + * Removes attribute from collection elements. + */ + removeAttr(name: string): Cash; + + /** + * removeClass + * Removes className from collection elements. + * Accepts space-separated classNames for removing multiple classes. + * Providing no arguments will remove all classes. + */ + removeClass(c?: string): Cash; + + /** + * removeData + * Removes linked data and data-attributes from collection elements. + */ + removeData(key: string): Cash; + + /** + * removeProp + * Removes property from collection elements. + */ + removeProp(name: string): Cash; + + /** + * serialize + * When called on a form, serializes and returns form data. + */ + serialize(): string; + + /** + * siblings + * Returns a collection of sibling elements. + */ + siblings(): Cash; + + /** + * text + * Returns the inner text of the first element in the collection, sets the text if textContent is provided. + */ + text(): string; + text(content?: string): Cash; + + /** + * toggleClass + * Adds or removes className from collection elements based on if the element already has the class. + * Accepts space-separated classNames for toggling multiple classes, and an optional force boolean to ensure classes are added (true) or removed (false). + */ + toggleClass(c: string, state?: boolean): Cash; + + /** + * trigger + * Triggers supplied event on elements in collection. Data can be passed along as the second parameter. + */ + trigger(eventName: string, data?: any): Cash; + + /** + * val + * Returns an inputs value. If value is supplied, sets all inputs in collection's value to the value argument. + */ + val(): any; + val(value?: string): Cash; + + /** + * width + * Returns the width of the element. + */ + width(): number; +} + +declare module "cash" { + export = CashStatic; +} +declare var cash: CashStatic; diff --git a/chai-things/chai-things-tests.ts b/chai-things/chai-things-tests.ts index de6a4c3ffe..c49ac3b468 100644 --- a/chai-things/chai-things-tests.ts +++ b/chai-things/chai-things-tests.ts @@ -18,9 +18,19 @@ function test_somethingSyntax() { array.should.include.something.with.property('b', 2); array.should.not.include.something.with.property('b', 3); + chai.expect(array).to.include.something(); + chai.expect(array).to.include.something.that.deep.equals({ b: 2 }); + chai.expect(array).to.include.something.that.not.deep.equals({ b: 2 }); + chai.expect(array).not.to.include.something.that.deep.equals({ c: 3 }); + chai.expect(array).to.include.something.that.not.deep.equals({ c: 3 }); + chai.expect(array).to.include.something.with.property('b', 2); + chai.expect(array).not.to.include.something.with.property('b', 3); + var array2 = [{ a: 'b' }, { a: 'b' }]; array2.should.include.something.that.have.property("a"); array2.should.include.something.that.have.property("a").not.equal("d"); + chai.expect(array2).to.include.something.that.have.property("a"); + chai.expect(array2).to.include.something.that.have.property("a").not.equal("d"); } function test_somethingVariantsSyntax() { @@ -35,6 +45,16 @@ function test_somethingVariantsSyntax() { array.should.include.one.that.deep.equals({ b: 2 }); array.should.include.some(); array.should.include.some.that.deep.equal({ b: 2 }); + + chai.expect(array).to.include.a.thing(); + chai.expect(array).to.include.a.thing.that.deep.equals({ b: 2 }); + chai.expect(array).to.include.an.item(); + chai.expect(array).to.include.an.item.that.deep.equals({ b: 2 }); + chai.expect(array).to.include.one.that.deep.equals({ b: 2 }); + chai.expect(array).to.include.some(); + chai.expect(array).to.include.some.that.deep.equal({ b: 2 }); + chai.expect(array).to.contain.a.thing(); + chai.expect(array).to.contain.a.thing.with.property('a', 1); } function test_allSyntax() { diff --git a/chai-things/chai-things.d.ts b/chai-things/chai-things.d.ts index 2636c9dcea..18c138ff38 100644 --- a/chai-things/chai-things.d.ts +++ b/chai-things/chai-things.d.ts @@ -23,6 +23,15 @@ declare namespace Chai { any: Anything; } + interface Include { + (item: any): any; + a: Item; + an: Item; + one: Something; + some: Something; + something: Something; + } + interface Anything extends Assertion { (): any; that: Assertion; diff --git a/chance/chance.d.ts b/chance/chance.d.ts index 290cde8048..6390b57864 100644 --- a/chance/chance.d.ts +++ b/chance/chance.d.ts @@ -114,8 +114,16 @@ declare namespace Chance { capitalize(str: string): string; mixin(desc: MixinDescriptor): any; pad(num: number, width: number, padChar?: string): string; + /** + * @deprecated Use pickone + */ pick(arr: T[]): T; + pickone(arr: T[]): T; + /** + * @deprecated Use pickset + */ pick(arr: T[], count: number): T[]; + pickset(arr: T[], count: number): T[]; set: Setter; shuffle(arr: T[]): T[]; diff --git a/change-emitter/change-emitter-tests.ts b/change-emitter/change-emitter-tests.ts new file mode 100644 index 0000000000..379c7636a5 --- /dev/null +++ b/change-emitter/change-emitter-tests.ts @@ -0,0 +1,124 @@ +/// + +import { createChangeEmitter, ChangeEmitterOf0 } from "change-emitter"; + +function usage() { + // https://github.com/acdlite/change-emitter#usage + + const emitter = createChangeEmitter() + + // Called `listen` instead of `subscribe` to avoid confusion with observable spec + const unlisten = emitter.listen((...args) => { + console.log(args) + }) + + emitter.emit(1, 2, 3) // logs `[1, 2, 3]` + unlisten() + emitter.emit(4, 5, 6) // doesn't log +} + +function largerExample() { + // https://github.com/acdlite/change-emitter#larger-example + + const createStore = (reducer: Function, initialState: any) => { + let state = initialState + const emitter = createChangeEmitter() + + function dispatch(action: any) { + state = reducer(state, action) + emitter.emit() + return action + } + + function getState() { + return state + } + + return { + dispatch, + getState, + subscribe: emitter.listen + } + } +} + +function untypedEmitter() { + const { emit, listen } = createChangeEmitter(); + + const unlisten0 = listen(() => {/* do something */}); + const unlisten1 = listen(value => {/* do something with value */}); + const unlisten2 = listen((value1, value2) => {/* do something with values */}); + const unlistenArgs = listen((...args: any[]) => {/* do something with values */}); + + emit(); + emit("hello"); + emit("hello", "world"); + emit(1, 2, 3, 4, 5); + + unlisten0(); + unlisten1(); + unlisten2(); + unlistenArgs(); +} + +function emitterOf0Args() { + const { emit, listen }: ChangeEmitterOf0 = createChangeEmitter(); + + const unlisten = listen(() => { }); + // const unlisten = listen(value => {}); // SYNTAX ERROR + + emit(); + // emit("hello"); // SYNTAX ERROR + + unlisten(); +} + +function emitterOf1Args() { + const { emit, listen } = createChangeEmitter(); + + const unlisten = listen(value => { value.length }); + + emit("hello"); + + unlisten(); +} + +function emitterOf2Args() { + const { emit, listen } = createChangeEmitter(); + + const unlisten = listen((value, success) => { value.length > 0 === success }); + + emit("hello", true); + + unlisten(); +} + +function emitterOf3Args() { + const { emit, listen } = createChangeEmitter(); + + const unlisten = listen((value, success, count) => { value.length > count === success }); + + emit("hello", true, 3); + + unlisten(); +} + +function emitterOf4Args() { + const { emit, listen } = createChangeEmitter(); + + const unlisten = listen((v1, v2, v3, v4) => { }); + + emit("hello", true, 3, new Date()); + + unlisten(); +} + +function emitterOf5Args() { + const { emit, listen } = createChangeEmitter(); + + const unlisten = listen((v1, v2, v3, v4, v5) => { }); + + emit("hello", true, 3, new Date(), "world"); + + unlisten(); +} diff --git a/change-emitter/change-emitter.d.ts b/change-emitter/change-emitter.d.ts new file mode 100644 index 0000000000..85abf116ed --- /dev/null +++ b/change-emitter/change-emitter.d.ts @@ -0,0 +1,58 @@ +// Type definitions for change-emitter v0.1.2 +// Project: https://github.com/acdlite/change-emitter +// Definitions by: Iskander Sierra +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'change-emitter' { + + type Unlisten = () => void; + type Listener = (...args: any[]) => void; + type ListenerOf0 = () => void; + type ListenerOf1 = (value: T) => void; + type ListenerOf2 = (value1: T1, value2: T2) => void; + type ListenerOf3 = (value1: T1, value2: T2, value3: T3) => void; + type ListenerOf4 = (value1: T1, value2: T2, value3: T3, value4: T4) => void; + type ListenerOf5 = (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => void; + + interface ChangeEmitter { + listen(listener: Listener): Unlisten; + emit(...args: any[]): void; + } + + interface ChangeEmitterOf1 { + listen(listener: ListenerOf1): Unlisten; + emit(value: T): void; + } + + interface ChangeEmitterOf0 { + listen(listener: ListenerOf0): Unlisten; + emit(): void; + } + + interface ChangeEmitterOf2 { + listen(listener: ListenerOf2): Unlisten; + emit(value1: T1, value2: T2): void; + } + + interface ChangeEmitterOf3 { + listen(listener: ListenerOf3): Unlisten; + emit(value1: T1, value2: T2, value3: T3): void; + } + + interface ChangeEmitterOf4 { + listen(listener: ListenerOf4): Unlisten; + emit(value1: T1, value2: T2, value3: T3, value4: T4): void; + } + + interface ChangeEmitterOf5 { + listen(listener: ListenerOf5): Unlisten; + emit(value1: T1, value2: T2, value3: T3, value4: T4, value5: T5): void; + } + + export function createChangeEmitter(): ChangeEmitter; + export function createChangeEmitter(): ChangeEmitterOf1; + export function createChangeEmitter(): ChangeEmitterOf2; + export function createChangeEmitter(): ChangeEmitterOf3; + export function createChangeEmitter(): ChangeEmitterOf4; + export function createChangeEmitter(): ChangeEmitterOf5; +} diff --git a/chart.js/chart.js.d.ts b/chart.js/chart.js.d.ts index e05d930d4e..57389ee4ea 100644 --- a/chart.js/chart.js.d.ts +++ b/chart.js/chart.js.d.ts @@ -73,7 +73,7 @@ interface ChartOptions { onClick?: (any?: any) => any; title?: ChartTitleOptions; legend?: ChartLegendOptions; - tooltip?: ChartTooltipOptions; + tooltips?: ChartTooltipOptions; hover?: ChartHoverOptions; animation?: ChartAnimationOptions; elements?: ChartElementsOptions; diff --git a/cheap-ruler/cheap-ruler-tests.ts b/cheap-ruler/cheap-ruler-tests.ts new file mode 100644 index 0000000000..6e2a2d45e7 --- /dev/null +++ b/cheap-ruler/cheap-ruler-tests.ts @@ -0,0 +1,63 @@ +/// + +import * as cheapRuler from 'cheap-ruler' + +// -- Fixtures -- +const bbox = [30.5, 50.5, 31, 51] +const point1 = [30.5, 50.5] +const point2 = [30.51, 50.49] +const unit = 'miles' +const lineString = { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "LineString", + "coordinates": [ + [-77.031669, 38.878605], + [-77.029609, 38.881946], + [-77.020339, 38.884084], + [-77.025661, 38.885821], + [-77.021884, 38.889563], + [-77.019824, 38.892368] + ] + } +} +const line = lineString.geometry.coordinates +const polygon = [[ + [-67.031, 50.458], [-67.031, 50.534], [-66.929, 50.534], + [-66.929, 50.458], [-67.031, 50.458] +]] +const points = [ + [-67.031, 50.458], [-67.031, 50.534], + [-66.929, 50.534], [-66.929, 50.458] +] + +// -- Test initiators -- +cheapRuler(35.05) +cheapRuler(35.05, 'miles') +cheapRuler(35.05, unit) +cheapRuler.fromTile(1567, 12) +cheapRuler.fromTile(1567, 12, 'miles') +cheapRuler.fromTile(1567, 12, unit) + +// -- Test units -- +cheapRuler.units +cheapRuler.units.miles +cheapRuler.units.kilometers +50 * cheapRuler.units.yards / cheapRuler.units.meters + +// -- Test cheapRuler -- +const ruler = cheapRuler(35.05) + +ruler.distance(point1, point2) +ruler.bearing(point1, point2) +ruler.destination(point1, 0.1, 90) +ruler.lineDistance(points) +ruler.area(polygon) +ruler.along(line, 2.5) +ruler.pointOnLine(line, point1).point +ruler.lineSlice(point1, point2, line) +ruler.lineSliceAlong(10, 20, line) +ruler.bufferPoint(point1, 0.01) +ruler.bufferBBox(bbox, 0.2) +ruler.insideBBox(point1, bbox) \ No newline at end of file diff --git a/cheap-ruler/cheap-ruler.d.ts b/cheap-ruler/cheap-ruler.d.ts new file mode 100644 index 0000000000..91f417d490 --- /dev/null +++ b/cheap-ruler/cheap-ruler.d.ts @@ -0,0 +1,216 @@ +// Type definitions for cheap-ruler 2.4.1 +// Project: https://github.com/mapbox/cheap-ruler +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "cheap-ruler" { + type BBox = [number, number, number, number] | number[] + type Point = [number, number] | number[] + type Line = Array + type Points = Array + type Polygon = Array> + + interface TemplateUnits { + kilometers: number + miles: number + nauticalmiles: number + meters: number + metres: number + yards: number + feet: number + inches: number + } + interface InterfacePointOnLine { + point: Point + index: number + t: number + } + class CheapRuler { + /** + * Given two points of the form [longitude, latitude], returns the distance. + * + * @param {Point} a point [longitude, latitude] + * @param {Point} b point [longitude, latitude] + * @returns {number} distance + * @example + * var distance = ruler.distance([30.5, 50.5], [30.51, 50.49]); + * //=distance + */ + distance(a: Point, b: Point): number; + + /** + * Returns the bearing between two points in angles. + * + * @param {Point} a point [longitude, latitude] + * @param {Point} b point [longitude, latitude] + * @returns {number} bearing + * @example + * var bearing = ruler.bearing([30.5, 50.5], [30.51, 50.49]); + * //=bearing + */ + bearing(a: Point, b: Point): number; + + /** + * Returns a new point given distance and bearing from the starting point. + * + * @param {Point} p point [longitude, latitude] + * @param {number} dist distance + * @param {number} bearing + * @returns {Point} point [longitude, latitude] + * @example + * var point = ruler.destination([30.5, 50.5], 0.1, 90); + * //=point + */ + destination(p: Point, dist: number, bearing: number): Point; + + /** + * Given a line (an array of points), returns the total line distance. + * + * @param {Points} points [longitude, latitude] + * @returns {number} total line distance + * @example + * var length = ruler.lineDistance([ + * [-67.031, 50.458], [-67.031, 50.534], + * [-66.929, 50.534], [-66.929, 50.458] + * ]); + * //=length + */ + lineDistance(points: Points): number; + + /** + * Given a polygon (an array of rings, where each ring is an array of points), returns the area. + * + * @param {Polygon} polygon + * @returns {number} area value in the specified units (square kilometers by default) + * @example + * var area = ruler.area([[ + * [-67.031, 50.458], [-67.031, 50.534], [-66.929, 50.534], + * [-66.929, 50.458], [-67.031, 50.458] + * ]]); + * //=area + */ + area(polygon: Polygon): number; + + /** + * Returns the point at a specified distance along the line. + * + * @param {Line} line + * @param {number} dist distance + * @returns {Point} point [longitude, latitude] + * @example + * var point = ruler.along(line, 2.5); + * //=point + */ + along(line: Line, dist: number): Point + + /** + * Returns an object of the form {point, index} where point is closest point on the line from the given point, and index is the start index of the segment with the closest point. + * + * @pointOnLine + * @param {Line} line + * @param {Point} p point [longitude, latitude] + * @returns {Object} {point, index} + * @example + * var point = ruler.pointOnLine(line, [-67.04, 50.5]).point; + * //=point + */ + pointOnLine(line: Line, p: Point): InterfacePointOnLine + + /** + * Returns a part of the given line between the start and the stop points (or their closest points on the line). + * + * @param {Point} start point [longitude, latitude] + * @param {Point} stop point [longitude, latitude] + * @param {Line} line + * @returns {Line} line part of a line + * @example + * var line2 = ruler.lineSlice([-67.04, 50.5], [-67.05, 50.56], line1); + * //=line2 + */ + lineSlice(start: Point, stop: Point, line: Line): Line + + /** + * Returns a part of the given line between the start and the stop points indicated by distance along the line. + * + * @param {number} start distance + * @param {number} stop distance + * @param {Line} line + * @returns {Line} line part of a line + * @example + * var line2 = ruler.lineSliceAlong(10, 20, line1); + * //=line2 + */ + lineSliceAlong(start: number, stop: number, line: Line): Line + + /** + * Given a point, returns a bounding box object ([w, s, e, n]) created from the given point buffered by a given distance. + * + * @param {Point} p point [longitude, latitude] + * @param {number} buffer + * @returns {BBox} box object ([w, s, e, n]) + * @example + * var bbox = ruler.bufferPoint([30.5, 50.5], 0.01); + * //=bbox + */ + bufferPoint(p: Point, buffer: number): BBox + + /** + * Given a bounding box, returns the box buffered by a given distance. + * + * @param {BBox} box object ([w, s, e, n]) + * @param {number} buffer + * @returns {BBox} box object ([w, s, e, n]) + * @example + * var bbox = ruler.bufferBBox([30.5, 50.5, 31, 51], 0.2); + * //=bbox + */ + bufferBBox(bbox: BBox, buffer: number): BBox + + /** + * Returns true if the given point is inside in the given bounding box, otherwise false. + * + * @param {Point} p point [longitude, latitude] + * @param {Point} box object ([w, s, e, n]) + * @returns {boolean} + * @example + * var inside = ruler.insideBBox([30.5, 50.5], [30, 50, 31, 51]); + * //=inside + */ + insideBBox(p: Point, bbox: BBox): boolean + } + /** + * A collection of very fast approximations to common geodesic measurements. Useful for performance-sensitive code that measures things on a city scale. + * + * @param {number} lat latitude + * @param {string} [units='kilometers'] + * @returns {CheapRuler} + * @example + * var ruler = cheapRuler(35.05, 'miles'); + * //=ruler + */ + function cheapRuler(lat: number, units?: string): CheapRuler; + namespace cheapRuler { + /** + * Multipliers for converting between units. + * + * @example + * // convert 50 meters to yards + * 50 * cheapRuler.units.yards / cheapRuler.units.meters; + */ + const units: TemplateUnits + + /** + * Creates a ruler object from tile coordinates (y and z). Convenient in tile-reduce scripts. + * + * @param {number} y + * @param {number} z + * @param {string} [units='kilometers'] + * @returns {CheapRuler} + * @example + * var ruler = cheapRuler.fromTile(1567, 12); + * //=ruler + */ + function fromTile(y: number, z: number, units?: string): CheapRuler; + } + export = cheapRuler +} \ No newline at end of file diff --git a/cheerio/cheerio-tests.ts b/cheerio/cheerio-tests.ts index c1b5eda894..f6b184be8e 100644 --- a/cheerio/cheerio-tests.ts +++ b/cheerio/cheerio-tests.ts @@ -20,6 +20,12 @@ cheerio(html); cheerio('ul', html); cheerio('li', 'ul', html); +const $fromElement = cheerio.load($("ul").get(0)); + +if ($fromElement("ul > li").length !== 3) { + throw new Error("Expecting 3 elements when passing `CheerioElement` to `load()`"); +} + $ = cheerio.load(html, { normalizeWhitespace: true, xmlMode: true diff --git a/cheerio/cheerio.d.ts b/cheerio/cheerio.d.ts index afc8ebaa71..e94eb1a68c 100644 --- a/cheerio/cheerio.d.ts +++ b/cheerio/cheerio.d.ts @@ -259,6 +259,7 @@ interface CheerioElement { interface CheerioAPI extends CheerioSelector { load(html: string, options?: CheerioOptionsInterface): CheerioStatic; + load(element: CheerioElement, options?: CheerioOptionsInterface): CheerioStatic; } declare var cheerio:CheerioAPI; diff --git a/ckeditor/ckeditor-tests.ts b/ckeditor/ckeditor-tests.ts index f7deb67069..bcf2a7807b 100644 --- a/ckeditor/ckeditor-tests.ts +++ b/ckeditor/ckeditor-tests.ts @@ -300,3 +300,22 @@ function test_adding_widget() { }); } } + +function test_focusManager() { + var textarea = document.createElement('textarea'); + var instance = CKEDITOR.replace(textarea); + var element = CKEDITOR.document.getById('myElement'); + + instance.focusManager.focus(); + instance.focusManager.focus(element); + instance.focusManager.lock(); + instance.focusManager.unlock(); + instance.focusManager.blur(); + instance.focusManager.blur(true); + instance.focusManager.add(element, true); + instance.focusManager.remove(element); + + var focusManager = new CKEDITOR.focusManager(instance); + var object: CKEDITOR.dom.domObject = focusManager.currentActive; + var bool: boolean = focusManager.hasFocus; +} diff --git a/ckeditor/ckeditor.d.ts b/ckeditor/ckeditor.d.ts index 60b6491407..b5009fa031 100644 --- a/ckeditor/ckeditor.d.ts +++ b/ckeditor/ckeditor.d.ts @@ -544,8 +544,19 @@ declare namespace CKEDITOR { } - interface focusManager { + class focusManager { + // Properties + currentActive: dom.domObject; + hasFocus: boolean; + // Methods + constructor(editor: editor); + focus(currentActive?: dom.element): void; + lock(): void; + unlock(): void; + blur(noDelay?: boolean): void; + add(element: dom.element, isCapture: boolean): void; + remove(element: dom.element): void; } interface keystrokeHandler { diff --git a/colors/colors-tests.ts b/colors/colors-tests.ts index 15fd5ab4e5..ff838da995 100644 --- a/colors/colors-tests.ts +++ b/colors/colors-tests.ts @@ -3,9 +3,17 @@ import colors = require("colors"); +colors.enabled = true; + console.log(colors.black.underline('test')); console.log(colors.rainbow.black.blue.gray('test')); console.log(colors.random.reset.bgWhite.dim('test')); +console.log(colors.random.reset.bgWhite.strip('test')); console.log('test'.black.underline); console.log('test'.rainbow.black.blue.gray); console.log('test'.random.reset.bgWhite.dim); +console.log('test'.random.reset.bgWhite.dim.stripColors); + +colors.enabled = false; + +console.log(colors.black.underline('test')); diff --git a/colors/colors.d.ts b/colors/colors.d.ts index 7a78240287..50e960c416 100644 --- a/colors/colors.d.ts +++ b/colors/colors.d.ts @@ -7,6 +7,9 @@ declare module "colors" { interface Color { (text: string): string; + strip: Color; + stripColors: Color; + black: Color; red: Color; green: Color; @@ -47,6 +50,11 @@ declare module "colors" { namespace e { export function setTheme(theme:any): void; + export var enabled: boolean; + + export var strip: Color; + export var stripColors: Color; + export var black: Color; export var red: Color; export var green: Color; @@ -88,6 +96,9 @@ declare module "colors" { } interface String { + strip: string; + stripColors: string; + black: string; red: string; green: string; diff --git a/concaveman/concaveman-tests.ts b/concaveman/concaveman-tests.ts new file mode 100644 index 0000000000..ddb1e6d125 --- /dev/null +++ b/concaveman/concaveman-tests.ts @@ -0,0 +1,5 @@ +/// +import * as concaveman from 'concaveman'; + +var points = [[10, 20], [30, 12.5]]; +var polygon = concaveman(points); \ No newline at end of file diff --git a/concaveman/concaveman.d.ts b/concaveman/concaveman.d.ts new file mode 100644 index 0000000000..a5b55c8fa3 --- /dev/null +++ b/concaveman/concaveman.d.ts @@ -0,0 +1,24 @@ +// Type definitions for concaveman 1.1.0 +// Project: https://github.com/mapbox/concaveman +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "concaveman" { + /** + * A very fast 2D concave hull algorithm in JavaScript (generates a general outline of a point set). + * + * @name concaveman + * @param {Array>} points is an array of [x, y] points. + * @param {number} [concavity=2] is a relative measure of concavity. 1 results in a relatively detailed shape, Infinity results in a convex hull. You can use values lower than 1, but they can produce pretty crazy shapes. + * @param {number} [lengthThreshold=0] when a segment length is under this threshold, it stops being considered for further detalization. Higher values result in simpler shapes. + * @return {Array>} + * @example + * var points = [[10, 20], [30, 12.5], ...]; + * var polygon = concaveman(points); + * + * //=hull + */ + function concaveman(points: number[][], concavity?: number, lengthThreshold?: number): number[][]; + namespace concaveman {} + export = concaveman; +} diff --git a/connect-mongo/connect-mongo.d.ts b/connect-mongo/connect-mongo.d.ts index 49f93e2d46..7c779e2d07 100644 --- a/connect-mongo/connect-mongo.d.ts +++ b/connect-mongo/connect-mongo.d.ts @@ -78,6 +78,12 @@ declare module "connect-mongo" { * (Default: 10) */ autoRemoveInterval?: number; + + + /** + * don't save session if unmodified + */ + touchAfter?: number; } export interface MongoUrlOptions extends DefaultOptions { diff --git a/cordova/cordova-tests.ts b/cordova/cordova-tests.ts index 7e97305a25..6d98471b12 100644 --- a/cordova/cordova-tests.ts +++ b/cordova/cordova-tests.ts @@ -126,12 +126,27 @@ function fsaccessor(fs: FileSystem) { (err: FileError)=> { alert('Error: ' + err.code); }); } + + +//---------------------------------------------------------------------- +// FileSystem plugin +// +//cordova states that the enums for requestFileSystem live on LocalFileSystem +// window.requestFileSystem( - window.TEMPORARY, + LocalFileSystem.TEMPORARY, 1024 * 1024 * 5, fsaccessor, (err: FileError) => { alert('Error: ' + err.code); } ); +window.requestFileSystem( + LocalFileSystem.PERSISTENT, + 1024 * 1024 * 5, + fsaccessor, + (err: FileError) => { alert('Error: ' + err.code); } +); +// FileSystem plugin +//---------------------------------------------------------------------- window.resolveLocalFileSystemURI(cordova.file.applicationDirectory, (entry: Entry)=> { diff --git a/cordova/plugins/Contacts.d.ts b/cordova/plugins/Contacts.d.ts index d940fccd77..90b21ae2bb 100644 --- a/cordova/plugins/Contacts.d.ts +++ b/cordova/plugins/Contacts.d.ts @@ -42,6 +42,40 @@ interface Contacts { */ pickContact(onSuccess: (contact: Contact) => void, onError: (error: ContactError) => void): void + + /** + * This allows us to use an enumeration when setting the desired fields for the ContactFindOptions. + * The values will correspond to the type of string literals in ContactFieldType. + */ + fieldType: { + addresses: "addresses", + birthday: "birthday", + categories: "categories", + country: "country", + department: "department", + displayName: "displayName", + emails: "emails", + familyName: "familyName", + formatted: "formatted", + givenName: "givenName", + honorificPrefix: "honorificPrefix", + honorificSuffix: "honorificSuffix", + id: "id", + ims: "ims", + locality: "locality", + middleName: "middleName", + name: "name", + nickname: "nickname", + note: "note", + organizations: "organizations", + phoneNumbers: "phoneNumbers", + photos: "photos", + postalCode: "postalCode", + region: "region", + streetAddress: "streetAddress", + title: "title", + urls: "urls" + } } interface ContactProperties { @@ -105,7 +139,7 @@ interface Contact extends ContactProperties { declare var Contact: { /** Constructor of Contact object */ - new(id?: string, + new (id?: string, displayName?: string, name?: ContactName, nickname?: string, @@ -130,7 +164,7 @@ interface ContactError { } declare var ContactError: { - new(code: number): ContactError; + new (code: number): ContactError; UNKNOWN_ERROR: number; INVALID_ARGUMENT_ERROR: number; TIMEOUT_ERROR: number; @@ -158,7 +192,7 @@ interface ContactName { declare var ContactName: { /** Constructor for ContactName object */ - new(formatted?: string, + new (formatted?: string, familyName?: string, givenName?: string, middleName?: string, @@ -189,7 +223,7 @@ interface ContactField { declare var ContactField: { /** Constructor for ContactField object */ - new(type?: string, + new (type?: string, value?: string, pref?: boolean): ContactField }; @@ -219,7 +253,7 @@ interface ContactAddress { declare var ContactAddress: { /** Constructor of ContactAddress object */ - new(pref?: boolean, + new (pref?: boolean, type?: string, formatted?: string, streetAddress?: string, @@ -248,7 +282,7 @@ interface ContactOrganization { declare var ContactOrganization: { /** Constructor for ContactOrganization object */ - new(pref?: boolean, + new (pref?: boolean, type?: string, name?: string, department?: string, @@ -262,12 +296,42 @@ interface ContactFindOptions { /** Determines if the find operation returns multiple navigator.contacts. */ multiple?: boolean; /* Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */ - desiredFields?: string[]; + desiredFields?: ContactFieldType[]; } +/** these are the string values that are valid for the desired fields in ContactFindOptions */ +declare type ContactFieldType = + "addresses" + | "birthday" + | "categories" + | "country" + | "department" + | "displayName" + | "emails" + | "familyName" + | "formatted" + | "givenName" + | "honorificPrefix" + | "honorificSuffix" + | "id" + | "ims" + | "locality" + | "middleName" + | "name" + | "nickname" + | "note" + | "organizations" + | "phoneNumbers" + | "photos" + | "postalCode" + | "region" + | "streetAddress" + | "title" + | "urls"; + declare var ContactFindOptions: { /** Constructor for ContactFindOptions object */ - new(filter?: string, + new (filter?: string, multiple?: boolean, - desiredFields?: string[]): ContactFindOptions -}; \ No newline at end of file + desiredFields?: ContactFieldType[]): ContactFindOptions +}; diff --git a/cordova/plugins/FileSystem.d.ts b/cordova/plugins/FileSystem.d.ts index 66a6014dea..f9471eda72 100644 --- a/cordova/plugins/FileSystem.d.ts +++ b/cordova/plugins/FileSystem.d.ts @@ -15,7 +15,7 @@ interface Window { * @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied. */ requestFileSystem( - type: number, + type: LocalFileSystem, size: number, successCallback: (fileSystem: FileSystem) => void, errorCallback?: (fileError: FileError) => void): void; @@ -371,3 +371,8 @@ interface Cordova { } } + +declare enum LocalFileSystem { + PERSISTENT=0, + TEMPORARY=1 +} diff --git a/core-js/core-js.d.ts b/core-js/core-js.d.ts index c633dc4ef6..1ad88ff41a 100644 --- a/core-js/core-js.d.ts +++ b/core-js/core-js.d.ts @@ -1889,7 +1889,7 @@ declare module "core-js/fn/number/max-safe-integer" { var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; export = MAX_SAFE_INTEGER; } -declare module "core-js/fn/number/min-safe-interger" { +declare module "core-js/fn/number/min-safe-integer" { var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; export = MIN_SAFE_INTEGER; } @@ -2668,7 +2668,7 @@ declare module "core-js/library/fn/number/max-safe-integer" { var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; export = MAX_SAFE_INTEGER; } -declare module "core-js/library/fn/number/min-safe-interger" { +declare module "core-js/library/fn/number/min-safe-integer" { var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; export = MIN_SAFE_INTEGER; } diff --git a/couchbase/couchbase.d.ts b/couchbase/couchbase.d.ts index 351c9a806d..2508f0e1d5 100644 --- a/couchbase/couchbase.d.ts +++ b/couchbase/couchbase.d.ts @@ -159,6 +159,14 @@ declare module 'couchbase' { * Creates a manager allowing the management of a Couchbase cluster. */ manager(): ClusterManager; + + + /** + * Creates a manager allowing the management of a Couchbase cluster using credentials. + * @param username The username for your cluster. + * @param password The password for your cluster. + */ + manager(username: string, password: string): ClusterManager; /** * Open a bucket to perform operations. This will begin the handshake process immediately and operations will complete later. Subscribe to the connect event to be alerted when the connection is ready, though be aware operations can be successfully queued before this. diff --git a/countdown/countdown-tests.ts b/countdown/countdown-tests.ts index c803f1acc2..3ad8890aab 100644 --- a/countdown/countdown-tests.ts +++ b/countdown/countdown-tests.ts @@ -1,15 +1,15 @@ /// -import { countdown, Timespan, CountdownStatic, Format } from 'countdown'; +import * as countdown from 'countdown'; -let ts: Timespan; +let ts: countdown.Timespan; let interval: number; -ts = countdown(new Date()); -ts = countdown(150); +ts = countdown(new Date()); +ts = countdown(150); interval = countdown(new Date(), - function (ts: Timespan) { + function (ts: countdown.Timespan) { document.getElementById('pageTimer').innerHTML = ts.toHTML('strong'); }, countdown.HOURS | countdown.MINUTES | countdown.SECONDS, diff --git a/countdown/countdown.d.ts b/countdown/countdown.d.ts index 5b40541dd0..bcb0d07976 100644 --- a/countdown/countdown.d.ts +++ b/countdown/countdown.d.ts @@ -3,11 +3,11 @@ // Definitions by: Gabriel Juchault // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'countdown' { - export type DateFunction = (timespan: Timespan) => void; - export type DateTime = number | Date | DateFunction; +declare namespace countdown { + type DateFunction = (timespan: Timespan) => void; + type DateTime = number | Date | DateFunction; - export interface Timespan { + interface Timespan { start?: Date; end?: Date; units?: number; @@ -26,7 +26,7 @@ declare module 'countdown' { toHTML(tagName?: string, label?: string): string; } - export interface Format { + interface Format { singular?: string | Array; plural?: string | Array; last?: string; @@ -36,7 +36,7 @@ declare module 'countdown' { formatter?(value: number, unit: number): string; } - export interface CountdownStatic { + interface CountdownStatic { (start: DateTime, end?: DateTime, units?: number, max?: number, digits?: number): Timespan | number; MILLENNIA: number; CENTURIES: number; @@ -64,6 +64,9 @@ declare module 'countdown' { resetFormat(): void; setFormat(format: Format): void; } +} - export let countdown: CountdownStatic; +declare module 'countdown' { + let countdown: countdown.CountdownStatic; + export = countdown; } diff --git a/cropperjs/cropperjs-tests.ts b/cropperjs/cropperjs-tests.ts index 82232c268a..d5cc14db82 100644 --- a/cropperjs/cropperjs-tests.ts +++ b/cropperjs/cropperjs-tests.ts @@ -1,5 +1,5 @@ /// -import * as Cropper from 'cropperjs'; +import Cropper from 'cropperjs'; var image = document.getElementById('image'); var cropper = new Cropper(image, { diff --git a/cropperjs/cropperjs.d.ts b/cropperjs/cropperjs.d.ts index c76b4c7766..3353737622 100644 --- a/cropperjs/cropperjs.d.ts +++ b/cropperjs/cropperjs.d.ts @@ -467,5 +467,5 @@ declare module cropperjs { declare module "cropperjs" { const Cropper: typeof cropperjs.Cropper; - export = Cropper; + export default Cropper; } diff --git a/crossfilter/crossfilter.d.ts b/crossfilter/crossfilter.d.ts index 646d8abeb0..ed888f6959 100644 --- a/crossfilter/crossfilter.d.ts +++ b/crossfilter/crossfilter.d.ts @@ -1,6 +1,6 @@ // Type definitions for CrossFilter // Project: https://github.com/square/crossfilter -// Definitions by: Schmulik Raskin +// Definitions by: Schmulik Raskin , Izaak Baker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace CrossFilter { @@ -111,3 +111,8 @@ declare namespace CrossFilter { } declare var crossfilter: CrossFilter.CrossFilterStatic; +declare module "crossfilter" { + var crossfilter: CrossFilter.CrossFilterStatic; + export = crossfilter; +} + diff --git a/css-modules-require-hook/css-modules-require-hook-tests.ts b/css-modules-require-hook/css-modules-require-hook-tests.ts new file mode 100644 index 0000000000..8fde182571 --- /dev/null +++ b/css-modules-require-hook/css-modules-require-hook-tests.ts @@ -0,0 +1,174 @@ +/// +/// + +import * as hook from 'css-modules-require-hook'; +import * as path from 'path'; + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#usage +// + +hook({ generateScopedName: '[name]__[local]___[hash:base64:5]' }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#adding-custom-postcss-plugins +// + +hook({ + prepend: [ + () => { + // my prepender + }, + ], +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#specify-custom-pattern-to-build-generic-names +// + +hook({ generateScopedName: '[name]__[local]___[hash:base64:5]' }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#using-stylus-as-a-preprocessor +// + +hook({ + extensions: ['.styl'], + preprocessCss: (css: string, filepath: string) => { + // my preprocesser + }, +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#tuning-options +// + +hook({ /* my option */ }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#devmode-boolean +// + +hook({ devMode: false }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#extensions-array +// + +hook({ extensions: ['.scss', '.sass'] }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#ignore-functionregexstring +// + +hook({ ignore: (file: string) => false }); +hook({ ignore: 'unused' }); +hook({ ignore: /\.test\.(css|scss|sass)/$ }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#preprocesscss-function +// + +hook({ preprocessCss: (css: string, filepath: string) => css }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#processcss-function +// + +hook({ processCss: (css: string, filepath: string) => css }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#processoropts-object +// + +hook({ + extensions: '.scss', + processorOpts: { + parser: () => { + // my parser + }, + }, +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#camelcase-boolean +// + +hook({ camelCase: true }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#append-array +// + +hook({ + append: [ + () => { + // another plugin + }, + ], +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#prepend-array +// + +hook({ + prepend: [ + () => { + // again, another plugin + }, + ], +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#use-array +// + +hook({ + use: [ + () => { + // they like plugins very much + }, + ], +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#createimportedname-function +// + +hook({ + createImportedName: (css: string, filepath: string) => { + // my import name creator + }, +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#generatescopedname-stringfunction +// + +hook({ generateScopedName: '[name]__[local]___[hash:base64:5]' }); +hook({ + generateScopedName: () => { + // should generate something + }, +}); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#hashprefix-string +// + +hook({ hashPrefix: 'awesome_' }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#mode-string +// + +hook({ mode: 'global' }); +hook({ mode: 'local' }); +hook({ mode: 'pure' }); + +// +// https://github.com/css-modules/css-modules-require-hook/blob/master/README.md#rootdir-string +// + +hook({ rootDir: path.resolve('./my-folder') }); diff --git a/css-modules-require-hook/css-modules-require-hook.d.ts b/css-modules-require-hook/css-modules-require-hook.d.ts new file mode 100644 index 0000000000..b990ffb90f --- /dev/null +++ b/css-modules-require-hook/css-modules-require-hook.d.ts @@ -0,0 +1,43 @@ +// Type definitions for css-modules-require-hook 4.0.3 +// Project: https://github.com/css-modules/css-modules-require-hook +// Definitions by: Cedric van Putten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'css-modules-require-hook' { + interface Options { + /** Helps you to invalidate cache of all require calls. */ + devMode?: boolean; + /** Attach the require hook to additional file extensions. */ + extensions?: string | string[]; + /** Provides possibility to exclude particular files from processing. */ + ignore?: string | RegExp | ((filepath: string) => boolean); + /** In rare cases you may want to precompile styles, before they will be passed to the PostCSS pipeline. */ + preprocessCss?: Function; + /** In rare cases you may want to get compiled styles in runtime, so providing this option helps. */ + processCss?: Function; + /** Provides possibility to pass custom options to the LazyResult instance. */ + processorOpts?: Object; + /** Camelizes exported class names. */ + camelCase?: boolean; + /** Appends custom plugins to the end of the PostCSS pipeline. */ + append?: any[]; + /** Prepends custom plugins to the beginning of the PostCSS pipeline. */ + prepend?: any[]; + /** Provides the full list of PostCSS plugins to the pipeline. */ + use?: any[]; + /** Short alias for the postcss-modules-extract-imports plugin's createImportedName option. */ + createImportedName?: Function; + /** Short alias for the postcss-modules-scope plugin's option. */ + generateScopedName?: string | Function; + /** Short alias for the generic-names helper option. */ + hashPrefix?: string; + /** Short alias for the postcss-modules-local-by-default plugin's option. */ + mode?: string; + /** Provides absolute path to the project directory. */ + rootDir?: string; + } + + var requireHook: (options?: Options) => void; + + export = requireHook; +} diff --git a/cucumber/cucumber-tests.ts b/cucumber/cucumber-tests.ts index d6ada278c2..aa17cd331e 100644 --- a/cucumber/cucumber-tests.ts +++ b/cucumber/cucumber-tests.ts @@ -1,30 +1,32 @@ /// +/// function StepSample() { type Callback = cucumber.CallbackStepDefinition; + type Table = cucumber.TableDefinition; var step = this; var hook = this; - + hook.Before(function(scenario, callback){ scenario.isFailed() && callback.pending(); }) - + hook.Around(function(scenario, runScenario) { scenario.isFailed() && runScenario(null, function(){ console.log('finish tasks'); }); }); - + hook.registerHandler('AfterFeatures', function (event, callback) { callback(); }); - + step.Given(/^I am on the Cucumber.js GitHub repository$/, function(callback:Callback) { this.visit('https://github.com/cucumber/cucumber-js', callback); }); step.When(/^I go to the README file$/, function(title:string, callback:Callback) { - callback.pending(); + callback(null, 'pending'); }); step.Then(/^I should see "(.*)" as the page title$/, { timeout:60*1000}, function(title:string, callback:Callback) { @@ -36,5 +38,43 @@ function StepSample() { callback(new Error("Expected to be on page with title " + title)); } }); + + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + step.Given(/^a table step with Table raw$/, function(table:Table){ + var expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + + assert.deepEqual(table.raw(), expected); + }); + + step.Given(/^a table step with Table rows$/, function(table: Table){ + var expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + assert.deepEqual(table.rows(), expected) + }); + + step.Given(/^a table step with Table rowHash$/, function(table:Table){ + var expected = { + 'Cucumber': 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + assert.deepEqual(table.rowsHash(), expected) + }); + + step.Given(/^a table step$/, function(table:Table){ + var expected = [ + {'Vegetable': 'Apricot', 'Rating': '5'}, + {'Vegetable': 'Brocolli', 'Rating': '2'}, + {'Vegetable': 'Cucumber', 'Rating': '10'} + ]; + assert.deepEqual(table.hashes(), expected) + }); } diff --git a/cucumber/cucumber.d.ts b/cucumber/cucumber.d.ts index 6c4273e4e0..a415a478e2 100644 --- a/cucumber/cucumber.d.ts +++ b/cucumber/cucumber.d.ts @@ -7,11 +7,20 @@ declare namespace cucumber { export interface CallbackStepDefinition{ pending : () => PromiseLike; - (errror?:any):void; + (errror?:any, pending?: string):void; } + export interface TableDefinition{ + raw: () => Array; + rows: () => Array; + rowsHash: () => {}; + hashes: () => {}; + } + + type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; + interface StepDefinitionCode { - (...stepArgs: Array): PromiseLike | any | void; + (...stepArgs: Array): PromiseLike | any | void; } interface StepDefinitionOptions{ diff --git a/d3-tip/d3-tip-tests.ts b/d3-tip/d3-tip-tests.ts new file mode 100644 index 0000000000..aa5e9b179c --- /dev/null +++ b/d3-tip/d3-tip-tests.ts @@ -0,0 +1,53 @@ +/// +/// + +// test variables + +interface dataType { + Title: string, + Number: number +} + +let data: dataType[] = [ { Title: "one", Number: 1 }, { Title: "two", Number: 2} ]; +let svgElement: SVGElement; +let root: HTMLElement; + +// start tests + +let d3tip: d3.Tooltip = d3.tip(); + +d3tip = d3tip.hide(); + +d3tip = d3tip.show(); +d3tip = d3tip.show(data); +d3tip = d3tip.show(svgElement); +d3tip = d3tip.show(data, svgElement); + +let attributeValue: string = d3tip.attr("library"); +d3tip = d3tip.attr("library","d3"); +d3tip = d3tip.attr("library", (d, i, o) => (d as dataType).Title); +d3tip = d3tip.attr("library", (d, i, o) => d.Title); + +let styleValue: string = d3tip.style("library"); +d3tip = d3tip.style("library","d3"); +d3tip = d3tip.style("library", (d, i, o) => (d as dataType).Title); +d3tip = d3tip.style("library", (d, i, o) => d.Title); + +let offsetValue: [number, number] = d3tip.offset(); +d3tip = d3tip.offset([-1, -1]); +d3tip = d3tip.offset((d, i, o) => [-1, -1]); + +let directionValue: ("n" | "s" | "e" | "w" | "nw" | "ne" | "sw" | "se") = d3tip.direction(); +d3tip = d3tip.direction("n"); +d3tip = d3tip.direction((d, i ,o) => "n"); + +let htmlValue: string = d3tip.html(); +d3tip = d3tip.html(""); +d3tip = d3tip.html((d, i ,o) => ""); + +let rootElementValue: HTMLElement = d3tip.rootElement(); +d3tip = d3tip.rootElement(root); +d3tip = d3tip.rootElement((d, i ,o) => root); + +d3tip = d3tip.destroy(); + diff --git a/d3-tip/d3-tip.d.ts b/d3-tip/d3-tip.d.ts new file mode 100644 index 0000000000..08f0d37f5f --- /dev/null +++ b/d3-tip/d3-tip.d.ts @@ -0,0 +1,40 @@ +// Type definitions for d3-tip +// Project: https://github.com/Caged/d3-tip +// Definitions by: Gert Braspenning +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace d3 { + type TooltipDirection = ("n" | "s" | "e" | "w" | "nw" | "ne" | "sw" | "se"); + interface Tooltip { + hide(): Tooltip; + show(): Tooltip; + show(data: Datum[]): Tooltip; + show(target: SVGElement): Tooltip; + show(data: Datum[], target: SVGElement): Tooltip; + attr(name: string): string; + attr(name: string, value: Primitive): Tooltip; + attr(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive): Tooltip; + attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }): Tooltip; + style(name: string): string; + style(name: string, value: Primitive, priority?: string): Tooltip; + style(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive, priority?: string): Tooltip; + style(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }, priority?: string): Tooltip; + offset(): [number, number]; + offset(tuple: [number, number]): Tooltip; + offset(func: (datum: Datum, index: number, outerIndex: number) => [number, number]): Tooltip; + direction(): TooltipDirection; + direction(direction: TooltipDirection): Tooltip; + direction(func: (datum: Datum, index: number, outerIndex: number) => TooltipDirection): Tooltip; + html(): string; + html(content: string): Tooltip; + html(func: (datum: Datum, index: number, outerIndex: number) => string): Tooltip; + rootElement(): HTMLElement; + rootElement(element: HTMLElement): Tooltip; + rootElement(func: (datum: Datum, index: number, outerIndex: number) => HTMLElement): Tooltip; + destroy(): Tooltip; + } + export function tip(): Tooltip; +} + diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 3ad327ffc3..d539b7439d 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -297,7 +297,7 @@ declare namespace d3 { * @param value the function to compute data for each node */ datum(value: (datum: Datum, index: number, outerIndex: number) => NewDatum): Update; - + /** * Set the data item for each node in the selection. * @param value the constant element to use for each node @@ -415,7 +415,7 @@ declare namespace d3 { select(name: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection; call(func: (selection: Enter, ...args: any[]) => any, ...args: any[]): Enter; - + empty(): boolean; size(): number; } @@ -1078,7 +1078,7 @@ declare namespace d3 { * Return the min and max simultaneously. */ export function extent(array: T[], accessor: (datum: T, index: number) => string): [string, string]; - + /** * Return the min and max simultaneously. */ @@ -2928,6 +2928,8 @@ declare namespace d3 { start(): Force; + tick(): Force; + alpha(): number; alpha(value: number): Force; diff --git a/date-fns/date-fns-tests.ts b/date-fns/date-fns-tests.ts new file mode 100644 index 0000000000..4c1dfc2476 --- /dev/null +++ b/date-fns/date-fns-tests.ts @@ -0,0 +1,16 @@ +/// + +import {addDays, closestIndexTo, differenceInCalendarWeeks, max, isDate} from 'date-fns'; +import * as addHours from 'date-fns/add_hours'; + +function test() { + + addDays(new Date(), 5); + closestIndexTo(new Date(), [new Date(), new Date()]); + addHours(new Date(), 5); + differenceInCalendarWeeks(new Date(), new Date()); + differenceInCalendarWeeks(new Date(), new Date(), {weekStartsOn: 1}); + max(new Date(), new Date()); + isDate({}); + +} \ No newline at end of file diff --git a/date-fns/date-fns.d.ts b/date-fns/date-fns.d.ts new file mode 100644 index 0000000000..d0582c2571 --- /dev/null +++ b/date-fns/date-fns.d.ts @@ -0,0 +1,1195 @@ +// Type definitions for date-fns +// Project: https://date-fns.org/ +// Definitions by: Matt Lewis +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type DateOrStringOrNumber = Date | string | number; + +declare module 'date-fns' { + + function addDays(date: DateOrStringOrNumber, amount: number): Date; + namespace addDays {} + + function addHours(date: DateOrStringOrNumber, amount: number): Date; + namespace addHours {} + + function addISOYears(date: DateOrStringOrNumber, amount: number): Date; + namespace addISOYears {} + + function addMilliseconds(date: DateOrStringOrNumber, amount: number): Date; + namespace addMilliseconds {} + + function addMinutes(date: DateOrStringOrNumber, amount: number): Date; + namespace addMinutes {} + + function addMonths(date: DateOrStringOrNumber, amount: number): Date; + namespace addMonths {} + + function addQuarters(date: DateOrStringOrNumber, amount: number): Date; + namespace addQuarters {} + + function addSeconds(date: DateOrStringOrNumber, amount: number): Date; + namespace addSeconds {} + + function addWeeks(date: DateOrStringOrNumber, amount: number): Date; + namespace addWeeks {} + + function addYears(date: DateOrStringOrNumber, amount: number): Date; + namespace addYears {} + + function closestIndexTo(dateToCompare: DateOrStringOrNumber, datesArray: DateOrStringOrNumber[]): number; + namespace closestIndexTo {} + + function closestTo(dateToCompare: DateOrStringOrNumber, datesArray: DateOrStringOrNumber[]): Date; + namespace closestTo {} + + function compareAsc(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace compareAsc {} + + function compareDesc(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace compareDesc {} + + function differenceInCalendarDays(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInCalendarDays {} + + function differenceInCalendarISOWeeks(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInCalendarISOWeeks {} + + function differenceInCalendarISOYears(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInCalendarISOYears {} + + function differenceInCalendarMonths(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInCalendarMonths {} + + function differenceInCalendarQuarters(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInCalendarQuarters {} + + function differenceInCalendarWeeks(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber, options?: {weekStartsOn: number}): number; + namespace differenceInCalendarWeeks {} + + function differenceInCalendarYears(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInCalendarYears {} + + function differenceInDays(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInDays {} + + function differenceInHours(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInHours {} + + function differenceInISOYears(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInISOYears {} + + function differenceInMilliseconds(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInMilliseconds {} + + function differenceInMinutes(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInMinutes {} + + function differenceInMonths(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInMonths {} + + function differenceInQuarters(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInQuarters {} + + function differenceInSeconds(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInSeconds {} + + function differenceInWeeks(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInWeeks {} + + function differenceInYears(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): number; + namespace differenceInYears {} + + function distanceInWords(dateFrom: DateOrStringOrNumber, dateTo: DateOrStringOrNumber, options?: {includeSeconds: boolean}): string; + namespace distanceInWords {} + + function distanceInWordsToNow(date: DateOrStringOrNumber, options?: {includeSeconds: boolean}): string; + namespace distanceInWordsToNow {} + + function eachDay(startDate: DateOrStringOrNumber, endDate: DateOrStringOrNumber): Date[]; + namespace eachDay {} + + function endOfDay(date: DateOrStringOrNumber): Date; + namespace endOfDay {} + + function endOfHour(date: DateOrStringOrNumber): Date; + namespace endOfHour {} + + function endOfISOWeek(date: DateOrStringOrNumber): Date; + namespace endOfISOWeek {} + + function endOfISOYear(date: DateOrStringOrNumber): Date; + namespace endOfISOYear {} + + function endOfMinute(date: DateOrStringOrNumber): Date; + namespace endOfMinute {} + + function endOfMonth(date: DateOrStringOrNumber): Date; + namespace endOfMonth {} + + function endOfQuarter(date: DateOrStringOrNumber): Date; + namespace endOfQuarter {} + + function endOfSecond(date: DateOrStringOrNumber): Date; + namespace endOfSecond {} + + function endOfToday(): Date; + namespace endOfToday {} + + function endOfTomorrow(): Date; + namespace endOfTomorrow {} + + function endOfWeek(date: DateOrStringOrNumber, options?: {weekStartsOn: number}): Date; + namespace endOfWeek {} + + function endOfYear(date: DateOrStringOrNumber): Date; + namespace endOfYear {} + + function endOfYesterday(): Date; + namespace endOfYesterday {} + + function format(date: DateOrStringOrNumber, format?: string): string; + namespace format {} + + function getDate(date: DateOrStringOrNumber): number; + namespace getDate {} + + function getDay(date: DateOrStringOrNumber): number; + namespace getDay {} + + function getDayOfYear(date: DateOrStringOrNumber): number; + namespace getDayOfYear {} + + function getDaysInMonth(date: DateOrStringOrNumber): number; + namespace getDaysInMonth {} + + function getDaysInYear(date: DateOrStringOrNumber): number; + namespace getDaysInYear {} + + function getHours(date: DateOrStringOrNumber): number; + namespace getHours {} + + function getISOWeek(date: DateOrStringOrNumber): number; + namespace getISOWeek {} + + function getISOWeeksInYear(date: DateOrStringOrNumber): number; + namespace getISOWeeksInYear {} + + function getISOYear(date: DateOrStringOrNumber): number; + namespace getISOYear {} + + function getMilliseconds(date: DateOrStringOrNumber): number; + namespace getMilliseconds {} + + function getMinutes(date: DateOrStringOrNumber): number; + namespace getMinutes {} + + function getMonth(date: DateOrStringOrNumber): number; + namespace getMonth {} + + function getQuarter(date: DateOrStringOrNumber): number; + namespace getQuarter {} + + function getSeconds(date: DateOrStringOrNumber): number; + namespace getSeconds {} + + function getYear(date: DateOrStringOrNumber): number; + namespace getYear {} + + function isAfter(dateToCompare: DateOrStringOrNumber, date: DateOrStringOrNumber): boolean; + namespace isAfter {} + + function isBefore(dateToCompare: DateOrStringOrNumber, date: DateOrStringOrNumber): boolean; + namespace isBefore {} + + function isDate(argument: any): boolean; + namespace isDate {} + + function isEqual(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isEqual {} + + function isFirstDayOfMonth(date: DateOrStringOrNumber): boolean; + namespace isFirstDayOfMonth {} + + function isFriday(date: DateOrStringOrNumber): boolean; + namespace isFriday {} + + function isFuture(date: DateOrStringOrNumber): boolean; + namespace isFuture {} + + function isLastDayOfMonth(date: DateOrStringOrNumber): boolean; + namespace isLastDayOfMonth {} + + function isLeapYear(date: DateOrStringOrNumber): boolean; + namespace isLeapYear {} + + function isMonday(date: DateOrStringOrNumber): boolean; + namespace isMonday {} + + function isPast(date: DateOrStringOrNumber): boolean; + namespace isPast {} + + function isSameDay(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameDay {} + + function isSameHour(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameHour {} + + function isSameISOWeek(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameISOWeek {} + + function isSameISOYear(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameISOYear {} + + function isSameMinute(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameMinute {} + + function isSameMonth(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameMonth {} + + function isSameQuarter(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameQuarter {} + + function isSameSecond(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameSecond {} + + function isSameWeek(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber, options?: {weekStartsOn: number}): boolean; + namespace isSameWeek {} + + function isSameYear(dateLeft: DateOrStringOrNumber, dateRight: DateOrStringOrNumber): boolean; + namespace isSameYear {} + + function isSaturday(date: DateOrStringOrNumber): boolean; + namespace isSaturday {} + + function isSunday(date: DateOrStringOrNumber): boolean; + namespace isSunday {} + + function isThisHour(date: DateOrStringOrNumber): boolean; + namespace isThisHour {} + + function isThisISOWeek(date: DateOrStringOrNumber): boolean; + namespace isThisISOWeek {} + + function isThisISOYear(date: DateOrStringOrNumber): boolean; + namespace isThisISOYear {} + + function isThisMinute(date: DateOrStringOrNumber): boolean; + namespace isThisMinute {} + + function isThisMonth(date: DateOrStringOrNumber): boolean; + namespace isThisMonth {} + + function isThisQuarter(date: DateOrStringOrNumber): boolean; + namespace isThisQuarter {} + + function isThisSecond(date: DateOrStringOrNumber): boolean; + namespace isThisSecond {} + + function isThisWeek(date: DateOrStringOrNumber, options?: {weekStartsOn: number}): boolean; + namespace isThisWeek {} + + function isThisYear(date: DateOrStringOrNumber): boolean; + namespace isThisYear {} + + function isThursday(date: DateOrStringOrNumber): boolean; + namespace isThursday {} + + function isToday(date: DateOrStringOrNumber): boolean; + namespace isToday {} + + function isTomorrow(date: DateOrStringOrNumber): boolean; + namespace isTomorrow {} + + function isTuesday(date: DateOrStringOrNumber): boolean; + namespace isTuesday {} + + function isValid(date: DateOrStringOrNumber): boolean; + namespace isValid {} + + function isWednesday(date: DateOrStringOrNumber): boolean; + namespace isWednesday {} + + function isWeekend(date: DateOrStringOrNumber): boolean; + namespace isWeekend {} + + function isWithinRange(date: DateOrStringOrNumber, startDate: DateOrStringOrNumber, endDate: DateOrStringOrNumber): boolean; + namespace isWithinRange {} + + function isYesterday(date: DateOrStringOrNumber): boolean; + namespace isYesterday {} + + function lastDayOfISOWeek(date: DateOrStringOrNumber): Date; + namespace lastDayOfISOWeek {} + + function lastDayOfISOYear(date: DateOrStringOrNumber): Date; + namespace lastDayOfISOYear {} + + function lastDayOfMonth(date: DateOrStringOrNumber): Date; + namespace lastDayOfMonth {} + + function lastDayOfQuarter(date: DateOrStringOrNumber): Date; + namespace lastDayOfQuarter {} + + function lastDayOfWeek(date: DateOrStringOrNumber, options?: {weekStartsOn: number}): Date; + namespace lastDayOfWeek {} + + function lastDayOfYear(date: DateOrStringOrNumber): Date; + namespace lastDayOfYear {} + + function max(...dates: DateOrStringOrNumber[]): Date; + namespace max {} + + function min(...dates: DateOrStringOrNumber[]): Date; + namespace min {} + + function parse(dateString: string): Date; + namespace parse {} + + function setDate(date: DateOrStringOrNumber, dayOfMonth: number): Date; + namespace setDate {} + + function setDay(date: DateOrStringOrNumber, day: number, options?: {weekStartsOn: number}): Date; + namespace setDay {} + + function setDayOfYear(date: DateOrStringOrNumber, dayOfYear: number): Date; + namespace setDayOfYear {} + + function setHours(date: DateOrStringOrNumber, hours: number): Date; + namespace setHours {} + + function setISOWeek(date: DateOrStringOrNumber, isoWeek: number): Date; + namespace setISOWeek {} + + function setISOYear(date: DateOrStringOrNumber, isoYear: number): Date; + namespace setISOYear {} + + function setMilliseconds(date: DateOrStringOrNumber, milliseconds: number): Date; + namespace setMilliseconds {} + + function setMinutes(date: DateOrStringOrNumber, minutes: number): Date; + namespace setMinutes {} + + function setMonth(date: DateOrStringOrNumber, month: number): Date; + namespace setMonth {} + + function setQuarter(date: DateOrStringOrNumber, quarter: number): Date; + namespace setQuarter {} + + function setSeconds(date: DateOrStringOrNumber, seconds: number): Date; + namespace setSeconds {} + + function setYear(date: DateOrStringOrNumber, year: number): Date; + namespace setYear {} + + function startOfDay(date: DateOrStringOrNumber): Date; + namespace startOfDay {} + + function startOfHour(date: DateOrStringOrNumber): Date; + namespace startOfHour {} + + function startOfISOWeek(date: DateOrStringOrNumber): Date; + namespace startOfISOWeek {} + + function startOfISOYear(date: DateOrStringOrNumber): Date; + namespace startOfISOYear {} + + function startOfMinute(date: DateOrStringOrNumber): Date; + namespace startOfMinute {} + + function startOfMonth(date: DateOrStringOrNumber): Date; + namespace startOfMonth {} + + function startOfQuarter(date: DateOrStringOrNumber): Date; + namespace startOfQuarter {} + + function startOfSecond(date: DateOrStringOrNumber): Date; + namespace startOfSecond {} + + function startOfToday(): Date; + namespace startOfToday {} + + function startOfTomorrow(): Date; + namespace startOfTomorrow {} + + function startOfWeek(date: DateOrStringOrNumber, options?: {weekStartsOn: number}): Date; + namespace startOfWeek {} + + function startOfYear(date: DateOrStringOrNumber): Date; + namespace startOfYear {} + + function startOfYesterday(): Date; + namespace startOfYesterday {} + + function subDays(date: DateOrStringOrNumber, amount: number): Date; + namespace subDays {} + + function subHours(date: DateOrStringOrNumber, amount: number): Date; + namespace subHours {} + + function subISOYears(date: DateOrStringOrNumber, amount: number): Date; + namespace subISOYears {} + + function subMilliseconds(date: DateOrStringOrNumber, amount: number): Date; + namespace subMilliseconds {} + + function subMinutes(date: DateOrStringOrNumber, amount: number): Date; + namespace subMinutes {} + + function subMonths(date: DateOrStringOrNumber, amount: number): Date; + namespace subMonths {} + + function subQuarters(date: DateOrStringOrNumber, amount: number): Date; + namespace subQuarters {} + + function subSeconds(date: DateOrStringOrNumber, amount: number): Date; + namespace subSeconds {} + + function subWeeks(date: DateOrStringOrNumber, amount: number): Date; + namespace subWeeks {} + + function subYears(date: DateOrStringOrNumber, amount: number): Date; + namespace subYears {} + +} + +declare module 'date-fns/add_days' { + import {addDays} from 'date-fns'; + export = addDays; +} + +declare module 'date-fns/add_hours' { + import {addHours} from 'date-fns'; + export = addHours; +} + +declare module 'date-fns/add_iso_years' { + import {addISOYears} from 'date-fns'; + export = addISOYears; +} + +declare module 'date-fns/add_milliseconds' { + import {addMilliseconds} from 'date-fns'; + export = addMilliseconds; +} + +declare module 'date-fns/add_minutes' { + import {addMinutes} from 'date-fns'; + export = addMinutes; +} + +declare module 'date-fns/add_months' { + import {addMonths} from 'date-fns'; + export = addMonths; +} + +declare module 'date-fns/add_quarters' { + import {addQuarters} from 'date-fns'; + export = addQuarters; +} + +declare module 'date-fns/add_seconds' { + import {addSeconds} from 'date-fns'; + export = addSeconds; +} + +declare module 'date-fns/add_weeks' { + import {addWeeks} from 'date-fns'; + export = addWeeks; +} + +declare module 'date-fns/add_years' { + import {addYears} from 'date-fns'; + export = addYears; +} + +declare module 'date-fns/closest_index_to' { + import {closestIndexTo} from 'date-fns'; + export = closestIndexTo; +} + +declare module 'date-fns/closest_to' { + import {closestTo} from 'date-fns'; + export = closestTo; +} + +declare module 'date-fns/compare_asc' { + import {compareAsc} from 'date-fns'; + export = compareAsc; +} + +declare module 'date-fns/compare_desc' { + import {compareDesc} from 'date-fns'; + export = compareDesc; +} + +declare module 'date-fns/difference_in_calendar_days' { + import {differenceInCalendarDays} from 'date-fns'; + export = differenceInCalendarDays; +} + +declare module 'date-fns/difference_in_calendar_iso_weeks' { + import {differenceInCalendarISOWeeks} from 'date-fns'; + export = differenceInCalendarISOWeeks; +} + +declare module 'date-fns/difference_in_calendar_iso_years' { + import {differenceInCalendarISOYears} from 'date-fns'; + export = differenceInCalendarISOYears; +} + +declare module 'date-fns/difference_in_calendar_months' { + import {differenceInCalendarMonths} from 'date-fns'; + export = differenceInCalendarMonths; +} + +declare module 'date-fns/difference_in_calendar_quarters' { + import {differenceInCalendarQuarters} from 'date-fns'; + export = differenceInCalendarQuarters; +} + +declare module 'date-fns/difference_in_calendar_weeks' { + import {differenceInCalendarWeeks} from 'date-fns'; + export = differenceInCalendarWeeks; +} + +declare module 'date-fns/difference_in_calendar_years' { + import {differenceInCalendarYears} from 'date-fns'; + export = differenceInCalendarYears; +} + +declare module 'date-fns/difference_in_days' { + import {differenceInDays} from 'date-fns'; + export = differenceInDays; +} + +declare module 'date-fns/difference_in_hours' { + import {differenceInHours} from 'date-fns'; + export = differenceInHours; +} + +declare module 'date-fns/difference_in_iso_years' { + import {differenceInISOYears} from 'date-fns'; + export = differenceInISOYears; +} + +declare module 'date-fns/difference_in_milliseconds' { + import {differenceInMilliseconds} from 'date-fns'; + export = differenceInMilliseconds; +} + +declare module 'date-fns/difference_in_minutes' { + import {differenceInMinutes} from 'date-fns'; + export = differenceInMinutes; +} + +declare module 'date-fns/difference_in_months' { + import {differenceInMonths} from 'date-fns'; + export = differenceInMonths; +} + +declare module 'date-fns/difference_in_quarters' { + import {differenceInQuarters} from 'date-fns'; + export = differenceInQuarters; +} + +declare module 'date-fns/difference_in_seconds' { + import {differenceInSeconds} from 'date-fns'; + export = differenceInSeconds; +} + +declare module 'date-fns/difference_in_weeks' { + import {differenceInWeeks} from 'date-fns'; + export = differenceInWeeks; +} + +declare module 'date-fns/difference_in_years' { + import {differenceInYears} from 'date-fns'; + export = differenceInYears; +} + +declare module 'date-fns/distance_in_words' { + import {distanceInWords} from 'date-fns'; + export = distanceInWords; +} + +declare module 'date-fns/distance_in_words_to_now' { + import {distanceInWordsToNow} from 'date-fns'; + export = distanceInWordsToNow; +} + +declare module 'date-fns/each_day' { + import {eachDay} from 'date-fns'; + export = eachDay; +} + +declare module 'date-fns/end_of_day' { + import {endOfDay} from 'date-fns'; + export = endOfDay; +} + +declare module 'date-fns/end_of_hour' { + import {endOfHour} from 'date-fns'; + export = endOfHour; +} + +declare module 'date-fns/end_of_iso_week' { + import {endOfISOWeek} from 'date-fns'; + export = endOfISOWeek; +} + +declare module 'date-fns/end_of_iso_year' { + import {endOfISOYear} from 'date-fns'; + export = endOfISOYear; +} + +declare module 'date-fns/end_of_minute' { + import {endOfMinute} from 'date-fns'; + export = endOfMinute; +} + +declare module 'date-fns/end_of_month' { + import {endOfMonth} from 'date-fns'; + export = endOfMonth; +} + +declare module 'date-fns/end_of_quarter' { + import {endOfQuarter} from 'date-fns'; + export = endOfQuarter; +} + +declare module 'date-fns/end_of_second' { + import {endOfSecond} from 'date-fns'; + export = endOfSecond; +} + +declare module 'date-fns/end_of_today' { + import {endOfToday} from 'date-fns'; + export = endOfToday; +} + +declare module 'date-fns/end_of_tomorrow' { + import {endOfTomorrow} from 'date-fns'; + export = endOfTomorrow; +} + +declare module 'date-fns/end_of_week' { + import {endOfWeek} from 'date-fns'; + export = endOfWeek; +} + +declare module 'date-fns/end_of_year' { + import {endOfYear} from 'date-fns'; + export = endOfYear; +} + +declare module 'date-fns/end_of_yesterday' { + import {endOfYesterday} from 'date-fns'; + export = endOfYesterday; +} + +declare module 'date-fns/format' { + import {format} from 'date-fns'; + export = format; +} + +declare module 'date-fns/get_date' { + import {getDate} from 'date-fns'; + export = getDate; +} + +declare module 'date-fns/get_day' { + import {getDay} from 'date-fns'; + export = getDay; +} + +declare module 'date-fns/get_day_of_year' { + import {getDayOfYear} from 'date-fns'; + export = getDayOfYear; +} + +declare module 'date-fns/get_days_in_month' { + import {getDaysInMonth} from 'date-fns'; + export = getDaysInMonth; +} + +declare module 'date-fns/get_days_in_year' { + import {getDaysInYear} from 'date-fns'; + export = getDaysInYear; +} + +declare module 'date-fns/get_hours' { + import {getHours} from 'date-fns'; + export = getHours; +} + +declare module 'date-fns/get_iso_week' { + import {getISOWeek} from 'date-fns'; + export = getISOWeek; +} + +declare module 'date-fns/get_iso_weeks_in_year' { + import {getISOWeeksInYear} from 'date-fns'; + export = getISOWeeksInYear; +} + +declare module 'date-fns/get_iso_year' { + import {getISOYear} from 'date-fns'; + export = getISOYear; +} + +declare module 'date-fns/get_milliseconds' { + import {getMilliseconds} from 'date-fns'; + export = getMilliseconds; +} + +declare module 'date-fns/get_minutes' { + import {getMinutes} from 'date-fns'; + export = getMinutes; +} + +declare module 'date-fns/get_month' { + import {getMonth} from 'date-fns'; + export = getMonth; +} + +declare module 'date-fns/get_quarter' { + import {getQuarter} from 'date-fns'; + export = getQuarter; +} + +declare module 'date-fns/get_seconds' { + import {getSeconds} from 'date-fns'; + export = getSeconds; +} + +declare module 'date-fns/get_year' { + import {getYear} from 'date-fns'; + export = getYear; +} + +declare module 'date-fns/is_after' { + import {isAfter} from 'date-fns'; + export = isAfter; +} + +declare module 'date-fns/is_before' { + import {isBefore} from 'date-fns'; + export = isBefore; +} + +declare module 'date-fns/is_date' { + import {isDate} from 'date-fns'; + export = isDate; +} + +declare module 'date-fns/is_equal' { + import {isEqual} from 'date-fns'; + export = isEqual; +} + +declare module 'date-fns/is_first_day_of_month' { + import {isFirstDayOfMonth} from 'date-fns'; + export = isFirstDayOfMonth; +} + +declare module 'date-fns/is_friday' { + import {isFriday} from 'date-fns'; + export = isFriday; +} + +declare module 'date-fns/is_future' { + import {isFuture} from 'date-fns'; + export = isFuture; +} + +declare module 'date-fns/is_last_day_of_month' { + import {isLastDayOfMonth} from 'date-fns'; + export = isLastDayOfMonth; +} + +declare module 'date-fns/is_leap_year' { + import {isLeapYear} from 'date-fns'; + export = isLeapYear; +} + +declare module 'date-fns/is_monday' { + import {isMonday} from 'date-fns'; + export = isMonday; +} + +declare module 'date-fns/is_past' { + import {isPast} from 'date-fns'; + export = isPast; +} + +declare module 'date-fns/is_same_day' { + import {isSameDay} from 'date-fns'; + export = isSameDay; +} + +declare module 'date-fns/is_same_hour' { + import {isSameHour} from 'date-fns'; + export = isSameHour; +} + +declare module 'date-fns/is_same_iso_week' { + import {isSameISOWeek} from 'date-fns'; + export = isSameISOWeek; +} + +declare module 'date-fns/is_same_iso_year' { + import {isSameISOYear} from 'date-fns'; + export = isSameISOYear; +} + +declare module 'date-fns/is_same_minute' { + import {isSameMinute} from 'date-fns'; + export = isSameMinute; +} + +declare module 'date-fns/is_same_month' { + import {isSameMonth} from 'date-fns'; + export = isSameMonth; +} + +declare module 'date-fns/is_same_quarter' { + import {isSameQuarter} from 'date-fns'; + export = isSameQuarter; +} + +declare module 'date-fns/is_same_second' { + import {isSameSecond} from 'date-fns'; + export = isSameSecond; +} + +declare module 'date-fns/is_same_week' { + import {isSameWeek} from 'date-fns'; + export = isSameWeek; +} + +declare module 'date-fns/is_same_year' { + import {isSameYear} from 'date-fns'; + export = isSameYear; +} + +declare module 'date-fns/is_saturday' { + import {isSaturday} from 'date-fns'; + export = isSaturday; +} + +declare module 'date-fns/is_sunday' { + import {isSunday} from 'date-fns'; + export = isSunday; +} + +declare module 'date-fns/is_this_hour' { + import {isThisHour} from 'date-fns'; + export = isThisHour; +} + +declare module 'date-fns/is_this_iso_week' { + import {isThisISOWeek} from 'date-fns'; + export = isThisISOWeek; +} + +declare module 'date-fns/is_this_iso_year' { + import {isThisISOYear} from 'date-fns'; + export = isThisISOYear; +} + +declare module 'date-fns/is_this_minute' { + import {isThisMinute} from 'date-fns'; + export = isThisMinute; +} + +declare module 'date-fns/is_this_month' { + import {isThisMonth} from 'date-fns'; + export = isThisMonth; +} + +declare module 'date-fns/is_this_quarter' { + import {isThisQuarter} from 'date-fns'; + export = isThisQuarter; +} + +declare module 'date-fns/is_this_second' { + import {isThisSecond} from 'date-fns'; + export = isThisSecond; +} + +declare module 'date-fns/is_this_week' { + import {isThisWeek} from 'date-fns'; + export = isThisWeek; +} + +declare module 'date-fns/is_this_year' { + import {isThisYear} from 'date-fns'; + export = isThisYear; +} + +declare module 'date-fns/is_thursday' { + import {isThursday} from 'date-fns'; + export = isThursday; +} + +declare module 'date-fns/is_today' { + import {isToday} from 'date-fns'; + export = isToday; +} + +declare module 'date-fns/is_tomorrow' { + import {isTomorrow} from 'date-fns'; + export = isTomorrow; +} + +declare module 'date-fns/is_tuesday' { + import {isTuesday} from 'date-fns'; + export = isTuesday; +} + +declare module 'date-fns/is_valid' { + import {isValid} from 'date-fns'; + export = isValid; +} + +declare module 'date-fns/is_wednesday' { + import {isWednesday} from 'date-fns'; + export = isWednesday; +} + +declare module 'date-fns/is_weekend' { + import {isWeekend} from 'date-fns'; + export = isWeekend; +} + +declare module 'date-fns/is_within_range' { + import {isWithinRange} from 'date-fns'; + export = isWithinRange; +} + +declare module 'date-fns/is_yesterday' { + import {isYesterday} from 'date-fns'; + export = isYesterday; +} + +declare module 'date-fns/last_day_of_iso_week' { + import {lastDayOfISOWeek} from 'date-fns'; + export = lastDayOfISOWeek; +} + +declare module 'date-fns/last_day_of_iso_year' { + import {lastDayOfISOYear} from 'date-fns'; + export = lastDayOfISOYear; +} + +declare module 'date-fns/last_day_of_month' { + import {lastDayOfMonth} from 'date-fns'; + export = lastDayOfMonth; +} + +declare module 'date-fns/last_day_of_quarter' { + import {lastDayOfQuarter} from 'date-fns'; + export = lastDayOfQuarter; +} + +declare module 'date-fns/last_day_of_week' { + import {lastDayOfWeek} from 'date-fns'; + export = lastDayOfWeek; +} + +declare module 'date-fns/last_day_of_year' { + import {lastDayOfYear} from 'date-fns'; + export = lastDayOfYear; +} + +declare module 'date-fns/max' { + import {max} from 'date-fns'; + export = max; +} + +declare module 'date-fns/min' { + import {min} from 'date-fns'; + export = min; +} + +declare module 'date-fns/parse' { + import {parse} from 'date-fns'; + export = parse; +} + +declare module 'date-fns/set_date' { + import {setDate} from 'date-fns'; + export = setDate; +} + +declare module 'date-fns/set_day' { + import {setDay} from 'date-fns'; + export = setDay; +} + +declare module 'date-fns/set_day_of_year' { + import {setDayOfYear} from 'date-fns'; + export = setDayOfYear; +} + +declare module 'date-fns/set_hours' { + import {setHours} from 'date-fns'; + export = setHours; +} + +declare module 'date-fns/set_iso_week' { + import {setISOWeek} from 'date-fns'; + export = setISOWeek; +} + +declare module 'date-fns/set_iso_year' { + import {setISOYear} from 'date-fns'; + export = setISOYear; +} + +declare module 'date-fns/set_milliseconds' { + import {setMilliseconds} from 'date-fns'; + export = setMilliseconds; +} + +declare module 'date-fns/set_minutes' { + import {setMinutes} from 'date-fns'; + export = setMinutes; +} + +declare module 'date-fns/set_month' { + import {setMonth} from 'date-fns'; + export = setMonth; +} + +declare module 'date-fns/set_quarter' { + import {setQuarter} from 'date-fns'; + export = setQuarter; +} + +declare module 'date-fns/set_seconds' { + import {setSeconds} from 'date-fns'; + export = setSeconds; +} + +declare module 'date-fns/set_year' { + import {setYear} from 'date-fns'; + export = setYear; +} + +declare module 'date-fns/start_of_day' { + import {startOfDay} from 'date-fns'; + export = startOfDay; +} + +declare module 'date-fns/start_of_hour' { + import {startOfHour} from 'date-fns'; + export = startOfHour; +} + +declare module 'date-fns/start_of_iso_week' { + import {startOfISOWeek} from 'date-fns'; + export = startOfISOWeek; +} + +declare module 'date-fns/start_of_iso_year' { + import {startOfISOYear} from 'date-fns'; + export = startOfISOYear; +} + +declare module 'date-fns/start_of_minute' { + import {startOfMinute} from 'date-fns'; + export = startOfMinute; +} + +declare module 'date-fns/start_of_month' { + import {startOfMonth} from 'date-fns'; + export = startOfMonth; +} + +declare module 'date-fns/start_of_quarter' { + import {startOfQuarter} from 'date-fns'; + export = startOfQuarter; +} + +declare module 'date-fns/start_of_second' { + import {startOfSecond} from 'date-fns'; + export = startOfSecond; +} + +declare module 'date-fns/start_of_today' { + import {startOfToday} from 'date-fns'; + export = startOfToday; +} + +declare module 'date-fns/start_of_tomorrow' { + import {startOfTomorrow} from 'date-fns'; + export = startOfTomorrow; +} + +declare module 'date-fns/start_of_week' { + import {startOfWeek} from 'date-fns'; + export = startOfWeek; +} + +declare module 'date-fns/start_of_year' { + import {startOfYear} from 'date-fns'; + export = startOfYear; +} + +declare module 'date-fns/start_of_yesterday' { + import {startOfYesterday} from 'date-fns'; + export = startOfYesterday; +} + +declare module 'date-fns/sub_days' { + import {subDays} from 'date-fns'; + export = subDays; +} + +declare module 'date-fns/sub_hours' { + import {subHours} from 'date-fns'; + export = subHours; +} + +declare module 'date-fns/sub_iso_years' { + import {subISOYears} from 'date-fns'; + export = subISOYears; +} + +declare module 'date-fns/sub_milliseconds' { + import {subMilliseconds} from 'date-fns'; + export = subMilliseconds; +} + +declare module 'date-fns/sub_minutes' { + import {subMinutes} from 'date-fns'; + export = subMinutes; +} + +declare module 'date-fns/sub_months' { + import {subMonths} from 'date-fns'; + export = subMonths; +} + +declare module 'date-fns/sub_quarters' { + import {subQuarters} from 'date-fns'; + export = subQuarters; +} + +declare module 'date-fns/sub_seconds' { + import {subSeconds} from 'date-fns'; + export = subSeconds; +} + +declare module 'date-fns/sub_weeks' { + import {subWeeks} from 'date-fns'; + export = subWeeks; +} + +declare module 'date-fns/sub_years' { + import {subYears} from 'date-fns'; + export = subYears; +} + diff --git a/dateformat/dateformat-tests.ts b/dateformat/dateformat-tests.ts new file mode 100644 index 0000000000..95d642b922 --- /dev/null +++ b/dateformat/dateformat-tests.ts @@ -0,0 +1,58 @@ +/// + +/** + * https://github.com/felixge/node-dateformat#usage + */ + +import * as dateFormat from 'dateformat' +const now = new Date() + +// Basic usage +dateFormat(now, 'dddd, mmmm dS, yyyy, h:MM:ss TT') +// Saturday, June 9th, 2007, 5:46:21 PM + +// You can use one of several named masks +dateFormat(now, 'isoDateTime') +// 2007-06-09T17:46:21 + +// ...Or add your own +dateFormat.masks['hammerTime'] = `HH:MM! "Can't touch this!"` +dateFormat(now, 'hammerTime') +// 17:46! Can't touch this! + +// When using the standalone dateFormat function, +// you can also provide the date as a string +dateFormat('Jun 9 2007', 'fullDate') +// Saturday, June 9, 2007 + +// Note that if you don't include the mask argument, +// dateFormat.masks.default is used +dateFormat(now) +// Sat Jun 09 2007 17:46:21 + +// And if you don't include the date argument, +// the current date and time is used +dateFormat() +// Sat Jun 09 2007 17:46:22 + +// You can also skip the date argument (as long as your mask doesn't +// contain any numbers), in which case the current date/time is used +dateFormat('longTime') +// 5:46:22 PM EST + +// And finally, you can convert local time to UTC time. Simply pass in +// true as an additional argument (no argument skipping allowed in this case): +dateFormat(now, 'longTime', true) +// 10:46:21 PM UTC + +// ...Or add the prefix 'UTC:' or 'GMT:' to your mask. +dateFormat(now, 'UTC:h:MM:ss TT Z') +// 10:46:21 PM UTC + +// You can also get the ISO 8601 week of the year: +dateFormat(now, 'W') +// 42 + +// and also get the ISO 8601 numeric representation of the day of the week: +dateFormat(now, 'N') +// 6 diff --git a/dateformat/dateformat.d.ts b/dateformat/dateformat.d.ts new file mode 100644 index 0000000000..9a97ba620f --- /dev/null +++ b/dateformat/dateformat.d.ts @@ -0,0 +1,77 @@ +// Type definitions for dateformat v1.0.12 +// Project: https://github.com/felixge/node-dateformat +// Definitions by: Kombu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * dateFormat.masks + * + * Predefined Formats + * + * https://github.com/felixge/node-dateformat/blob/master/lib/dateformat.js#L107 + */ +interface DateFormatMasks { + default: string; + shortDate: string; + mediumDate: string; + longDate: string; + fullDate: string; + shortTime: string; + mediumTime: string; + longTime: string; + isoDate: string; + isoTime: string; + isoDateTime: string; + isoUtcDateTime: string; + expiresHeaderFormat: string; + [key: string]: string; +} + +/** + * dateFormat.i18n + * + * Internationalization strings + * + * Example: + * + * ``` + * dateFormat.i18n = { + * dayNames: [ + * 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', + * 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + * ], + * monthNames: [ + * 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', + * 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' + * ] + * } + * ``` + * + * https://github.com/felixge/node-dateformat/blob/master/lib/dateformat.js#L124 + */ +interface DateFormatI18n { + dayNames: string[]; + monthNames: string[]; +} + +/** + * dateFormat() + * + * Accepts a date, a mask, or a date and a mask. + * Returns a formatted version of the given date. + * The date defaults to the current date/time. + * The mask defaults to dateFormat.masks.default. + * + * https://github.com/felixge/node-dateformat/blob/master/lib/dateformat.js#L18 + */ +interface DateFormatStatic { + (date?: Date | string | number, mask?: string, utc?: boolean, gmt?: boolean): string; + (mask?: string, utc?: boolean, gmt?: boolean): string; + masks: DateFormatMasks; + i18n: DateFormatI18n; +} + +declare module 'dateformat' { + const dateFormat: DateFormatStatic; + export = dateFormat; +} diff --git a/daterangepicker/daterangepicker.d.ts b/daterangepicker/daterangepicker.d.ts index f3534a197e..a86614cfe8 100644 --- a/daterangepicker/daterangepicker.d.ts +++ b/daterangepicker/daterangepicker.d.ts @@ -11,7 +11,7 @@ interface JQuery { daterangepicker(settings?: daterangepicker.Settings, callback?: (start?: string | Date | moment.Moment, end?: string | Date | moment.Moment, label?: string) => any): JQuery; } -declare module daterangepicker { +declare namespace daterangepicker { interface DatepickerEventObject extends JQueryEventObject { date: Date; @@ -164,3 +164,7 @@ declare module daterangepicker { monthNames?: string[]; } } + +declare module "daterangepicker" { + export = daterangepicker; +} diff --git a/defaults/defaults-tests.ts b/defaults/defaults-tests.ts new file mode 100644 index 0000000000..1e82a2c95d --- /dev/null +++ b/defaults/defaults-tests.ts @@ -0,0 +1,6 @@ +/// + +import defaults = require('defaults'); + +defaults({}, {user: 'developer', locale: 'fr-FR'}); +defaults(undefined, 'hello world'); diff --git a/defaults/defaults.d.ts b/defaults/defaults.d.ts new file mode 100644 index 0000000000..024df0558b --- /dev/null +++ b/defaults/defaults.d.ts @@ -0,0 +1,10 @@ +// Type definitions for defaults 1.0.3 +// Project: https://github.com/tmpvar/defaults/ +// Definitions by: Ibtihel CHNAB +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function defaults(options: any, defaultOptions: any): any; + +declare module "defaults" { + export = defaults; +} diff --git a/devexpress-web/devexpress-web.d.ts b/devexpress-web/devexpress-web.d.ts index c2e0014f85..7c3eeda936 100644 --- a/devexpress-web/devexpress-web.d.ts +++ b/devexpress-web/devexpress-web.d.ts @@ -619,7 +619,7 @@ interface ASPxClientDashboardDesigner extends ASPxClientControl { */ DashboardStateChanged: ASPxClientEvent>; /** - * Occurs after a dashboard displayed in the ASPxClientDashboardDesigner is changed. + * Occurs after another dashboard is loaded to the ASPxClientDashboardDesigner. */ DashboardChanged: ASPxClientEvent>; /** @@ -1670,9 +1670,9 @@ interface ASPxClientBinaryImage extends ASPxClientEdit { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -3407,9 +3407,9 @@ interface ASPxClientGaugeControl extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -8023,9 +8023,9 @@ interface ASPxClientPivotGrid extends ASPxClientControl { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; } @@ -8304,9 +8304,9 @@ interface ASPxClientRichEdit extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -9358,6 +9358,8 @@ interface AbstractNumberingList { * Exposes the settings providing the information about the essential document functionality. */ interface SubDocument { + id: number; + type: any; /** * Provides information about paragraphs contained in the document. * Value: An array of Paragraph objects storing information about document paragraphs. @@ -9645,6 +9647,12 @@ declare enum HeaderFooterType { Primary=1, Even=2 } +declare enum SubDocumentType { + Main=0, + Header=1, + Footer=2, + TextBox=3 +} /** * Contains a set of methods and properties to work with the document selection. */ @@ -9825,6 +9833,9 @@ interface RichEditSelection { * Selects the editor's entire content. */ selectAll(): void; + setMainSubDocumentAsActive(): void; + setFooterSubDocumentAsActiveByPageIndex(pageIndex: number): void; + setHeaderSubDocumentAsActiveByPageIndex(pageIndex: number): void; } /** * Defines a document's interval. @@ -10199,11 +10210,6 @@ interface FileSaveCommand extends CommandWithSimpleStateBase { * Executes the FileSaveCommand command by imitating the corresponding end-user action made in the RichEdit's UI. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. */ execute(): boolean; - /** - * Executes the FileSaveCommand command by applying the specified setting. May result in taking no action if the command's state does not allow command execution. Use the object's getState method to check the command state. - * @param path A string value specifying path to the saving file. - */ - execute(path: string): boolean; } /** * A command to invoke the Save As dialog that prompts for a file name and saves the current document in a file with the specified path. @@ -10657,7 +10663,7 @@ declare enum ListLevelFormat { DecimalEnclosedCircle=12, DecimalEnclosedCircleChinese=13, DecimalEnclosedFullstop=14, - DecimalEnclosedParenthses=15, + DecimalEnclosedParentheses=15, DecimalFullWidth=16, DecimalFullWidth2=17, DecimalHalfWidth=18, @@ -12125,6 +12131,170 @@ declare enum BorderLineStyle { ThreeDEngrave=23, Outset=24, Inset=25, + Apples=26, + ArchedScallops=27, + BabyPacifier=28, + BabyRattle=29, + Balloons3Colors=30, + BalloonsHotAir=31, + BasicBlackDashes=32, + BasicBlackDots=33, + BasicBlackSquares=34, + BasicThinLines=35, + BasicWhiteDashes=36, + BasicWhiteDots=37, + BasicWhiteSquares=38, + BasicWideInline=39, + BasicWideMidline=40, + BasicWideOutline=41, + Bats=42, + Birds=43, + BirdsFlight=44, + Cabins=45, + CakeSlice=46, + CandyCorn=47, + CelticKnotwork=48, + CertificateBanner=49, + ChainLink=50, + ChampagneBottle=51, + CheckedBarBlack=52, + CheckedBarColor=53, + Checkered=54, + ChristmasTree=55, + CirclesLines=56, + CirclesRectangles=57, + ClassicalWave=58, + Clocks=59, + Compass=60, + Confetti=61, + ConfettiGrays=62, + ConfettiOutline=63, + ConfettiStreamers=64, + ConfettiWhite=65, + CornerTriangles=66, + CouponCutoutDashes=67, + CouponCutoutDots=68, + CrazyMaze=69, + CreaturesButterfly=70, + CreaturesFish=71, + CreaturesInsects=72, + CreaturesLadyBug=73, + CrossStitch=74, + Cup=75, + DecoArch=76, + DecoArchColor=77, + DecoBlocks=78, + DiamondsGray=79, + DoubleD=80, + DoubleDiamonds=81, + Earth1=82, + Earth2=83, + EclipsingSquares1=84, + EclipsingSquares2=85, + EggsBlack=86, + Fans=87, + Film=88, + Firecrackers=89, + FlowersBlockPrint=90, + FlowersDaisies=91, + FlowersModern1=92, + FlowersModern2=93, + FlowersPansy=94, + FlowersRedRose=95, + FlowersRoses=96, + FlowersTeacup=97, + FlowersTiny=98, + Gems=99, + GingerbreadMan=100, + Gradient=101, + Handmade1=102, + Handmade2=103, + HeartBalloon=104, + HeartGray=105, + Hearts=106, + HeebieJeebies=107, + Holly=108, + HouseFunky=109, + Hypnotic=110, + IceCreamCones=111, + LightBulb=112, + Lightning1=113, + Lightning2=114, + MapleLeaf=115, + MapleMuffins=116, + MapPins=117, + Marquee=118, + MarqueeToothed=119, + Moons=120, + Mosaic=121, + MusicNotes=122, + Northwest=123, + Ovals=124, + Packages=125, + PalmsBlack=126, + PalmsColor=127, + PaperClips=128, + Papyrus=129, + PartyFavor=130, + PartyGlass=131, + Pencils=132, + People=133, + PeopleHats=134, + PeopleWaving=135, + Poinsettias=136, + PostageStamp=137, + Pumpkin1=138, + PushPinNote1=139, + PushPinNote2=140, + Pyramids=141, + PyramidsAbove=142, + Quadrants=143, + Rings=144, + Safari=145, + Sawtooth=146, + SawtoothGray=147, + ScaredCat=148, + Seattle=149, + ShadowedSquares=150, + SharksTeeth=151, + ShorebirdTracks=152, + Skyrocket=153, + SnowflakeFancy=154, + Snowflakes=155, + Sombrero=156, + Southwest=157, + Stars=158, + Stars3d=159, + StarsBlack=160, + StarsShadowed=161, + StarsTop=162, + Sun=163, + Swirligig=164, + TornPaper=165, + TornPaperBlack=166, + Trees=167, + TriangleParty=168, + Triangles=169, + Tribal1=170, + Tribal2=171, + Tribal3=172, + Tribal4=173, + Tribal5=174, + Tribal6=175, + TwistedLines1=176, + TwistedLines2=177, + Vine=178, + Waveline=179, + WeavingAngles=180, + WeavingBraid=181, + WeavingRibbon=182, + WeavingStrips=183, + WhiteFlowers=184, + Woodwork=185, + XIllusions=186, + ZanyTriangles=187, + ZigZag=188, + ZigZagStitch=189, Nil=-1 } /** @@ -14070,6 +14240,11 @@ interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs { * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. */ operation: ASPxClientAppointmentOperation; + /** + * Provides information about dragged appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; } interface AppointmentResizeEventHandler { /** @@ -14093,6 +14268,51 @@ interface ASPxClientAppointmentResizeEventArgs extends ASPxClientEventArgs { * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. */ operation: ASPxClientAppointmentOperation; + /** + * Gets the resized appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before resizing. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets the appointment's interval after resizing. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; +} +/** + * Stores information about an appointment drag operation. + */ +interface ASPxClientAppointmentDragInfo { + /** + * Gets the dragged appointment's identifier. + * Value: A string containing an appointment identifier. + */ + appointmentId: string; + /** + * Gets the appointment's interval before the drag operation. + * Value: An object representing the interval assigned to the appointment. + */ + oldInterval: ASPxClientTimeInterval; + /** + * Gets resources that were associated with the appointment before the drag operation. + * Value: A array of strings containing resource identifiers. + */ + oldResources: string[]; + /** + * Gets the appointment's interval after the drag operation. + * Value: An object representing the interval assigned to the appointment. + */ + newInterval: ASPxClientTimeInterval; + /** + * Gets resources associated with the appointment after the drag operation. + * Value: An array of strings containing resource identifiers. + */ + newResources: string[]; } /** * Contains information about a client tooltip. @@ -14429,9 +14649,9 @@ interface ASPxClientSpreadsheet extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -14580,6 +14800,9 @@ interface ASPxClientTreeList extends ASPxClientControl { * Sets input focus to the ASPxTreeList. */ Focus(): void; + /** + * Gets the Popup Edit Form. + */ GetPopupEditForm(): ASPxClientPopupControl; /** * Returns the focused node's key value. @@ -14638,9 +14861,9 @@ interface ASPxClientTreeList extends ASPxClientControl { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** @@ -15219,9 +15442,9 @@ interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the Callback Panel by processing the passed information on the server, in an Action specified by the Callback Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15230,9 +15453,9 @@ interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15250,9 +15473,9 @@ interface MVCxClientCardView extends ASPxClientCardView { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the CardView by processing the passed information on the server, in an Action specified via the CardView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CardView's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15287,9 +15510,9 @@ interface MVCxClientChart extends ASPxClientWebChartControl { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update a Chart by processing the passed information on the server, in an Action specified via the Chart's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15298,9 +15521,9 @@ interface MVCxClientChart extends ASPxClientWebChartControl { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; } @@ -15318,9 +15541,9 @@ interface MVCxClientComboBox extends ASPxClientComboBox { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the ComboBox by processing the passed information on the server, in an Action specified by the ComboBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15343,9 +15566,9 @@ interface MVCxClientDataView extends ASPxClientDataView { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the DataView by processing the passed information on the server, in an Action specified via the DataView's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15354,9 +15577,9 @@ interface MVCxClientDataView extends ASPxClientDataView { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15375,9 +15598,9 @@ interface MVCxClientDockManager extends ASPxClientDockManager { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the DockManager by processing the passed information on the server, in an Action specified by the DockManager's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15386,9 +15609,9 @@ interface MVCxClientDockManager extends ASPxClientDockManager { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15406,9 +15629,9 @@ interface MVCxClientDockPanel extends ASPxClientDockPanel { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the DockPanel by processing the passed information on the server, in an Action specified by the DockPanel's DockPanelSettings.CallbackRouteValues) property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15431,9 +15654,9 @@ interface MVCxClientFileManager extends ASPxClientFileManager { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param data A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15442,9 +15665,9 @@ interface MVCxClientFileManager extends ASPxClientFileManager { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; } @@ -15462,9 +15685,9 @@ interface MVCxClientGridView extends ASPxClientGridView { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the GridView by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15525,9 +15748,9 @@ interface MVCxClientImageGallery extends ASPxClientImageGallery { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the ImageGallery by processing the passed information on the server, in an Action specified via the ImageGallery's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15536,9 +15759,9 @@ interface MVCxClientImageGallery extends ASPxClientImageGallery { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15556,9 +15779,9 @@ interface MVCxClientListBox extends ASPxClientListBox { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the ListBox by processing the passed information on the server, in an Action specified by the ListBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15590,9 +15813,9 @@ interface MVCxClientPivotGrid extends ASPxClientPivotGrid { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the PivotGrid by processing the passed information on the server, in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15606,9 +15829,9 @@ interface MVCxClientPivotGrid extends ASPxClientPivotGrid { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; } @@ -15626,9 +15849,9 @@ interface MVCxClientPopupControl extends ASPxClientPopupControl { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the PopupControl by processing the passed information on the server, in an Action specified via the PopupControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15644,10 +15867,10 @@ interface MVCxClientPopupControl extends ASPxClientPopupControl { */ PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; /** - * - * @param window - * @param parameter - * @param onSuccess + * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -15721,9 +15944,9 @@ interface MVCxClientReportDesigner extends ASPxClientReportDesigner { */ PerformCallback(arg: Object): void; /** - * - * @param arg - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(arg: Object, onSuccess: (arg1: string) => void): void; /** @@ -15732,9 +15955,9 @@ interface MVCxClientReportDesigner extends ASPxClientReportDesigner { */ PerformCallback(arg: string): void; /** - * - * @param arg - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; } @@ -15773,9 +15996,9 @@ interface MVCxClientRichEdit extends ASPxClientRichEdit { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the RichEdit by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15784,9 +16007,9 @@ interface MVCxClientRichEdit extends ASPxClientRichEdit { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15804,9 +16027,9 @@ interface MVCxClientRoundPanel extends ASPxClientRoundPanel { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the Round Panel by processing the passed information on the server, in an Action specified by the Round Panel's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15815,9 +16038,9 @@ interface MVCxClientRoundPanel extends ASPxClientRoundPanel { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15836,9 +16059,9 @@ interface MVCxClientScheduler extends ASPxClientScheduler { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the Scheduler by processing the passed information on the server, in an Action specified via the Scheduler's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15890,9 +16113,9 @@ interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the Spreadsheet by processing the passed information on the server, in an Action specified via the CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15901,9 +16124,9 @@ interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15921,9 +16144,9 @@ interface MVCxClientPageControl extends ASPxClientPageControl { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the PageControl by processing the passed information on the server, in an Action specified by the PageControl's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15932,9 +16155,9 @@ interface MVCxClientPageControl extends ASPxClientPageControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -15952,9 +16175,9 @@ interface MVCxClientTokenBox extends ASPxClientTokenBox { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the TokenBox by processing the passed information on the server, in an Action specified by the TokenBox's CallbackRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15977,9 +16200,9 @@ interface MVCxClientTreeList extends ASPxClientTreeList { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the TreeList by processing the passed information on the server, in an Action specified via the TreeList's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -15993,9 +16216,9 @@ interface MVCxClientTreeList extends ASPxClientTreeList { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** @@ -16095,9 +16318,9 @@ interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid { */ PerformCallback(data: Object): void; /** - * - * @param data - * @param onSuccess + * Sends a callback with a parameter to update the VerticalGrid by processing the passed information on the server in an Action specified via the grid's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the grid's CustomActionRouteValues property. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(data: Object, onSuccess: (arg1: string) => void): void; /** @@ -16221,9 +16444,9 @@ interface ASPxClientCallback extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -16280,9 +16503,9 @@ interface ASPxClientCallbackPanel extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -16788,9 +17011,9 @@ interface ASPxClientDataView extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -16858,9 +17081,9 @@ interface ASPxClientDockManager extends ASPxClientControl { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that contains any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -17604,9 +17827,9 @@ interface ASPxClientFileManager extends ASPxClientControl { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param args A string value that specifies any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; } @@ -18889,6 +19112,9 @@ interface ASPxClientMenuBase extends ASPxClientControl { * Represents a client collection that maintains client menu objects. */ interface ASPxClientMenuCollection extends ASPxClientControlCollection { + /** + * Recalculates the position of visible sub menus. + */ RecalculateAll(): void; /** * Hides all menus maitained by the collection. @@ -19589,10 +19815,10 @@ interface ASPxClientPopupControl extends ASPxClientPopupControlBase { */ PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; /** - * - * @param window - * @param parameter - * @param onSuccess + * Sends a callback with parameters to update the popup window by processing the related popup window and the passed information on the server. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -20479,9 +20705,9 @@ interface ASPxClientRoundPanel extends ASPxClientPanelBase { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side ContentCallback event, passing it the specified argument. + * @param parameter A string value that is any information that needs to be sent to the server-side ContentCallback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; /** @@ -20854,9 +21080,9 @@ interface ASPxClientPageControl extends ASPxClientTabControlBase { */ PerformCallback(parameter: string): void; /** - * - * @param parameter - * @param onSuccess + * Sends a callback to the server and generates the server-side Callback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side Callback event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(parameter: string, onSuccess: (arg1: string) => void): void; } @@ -21712,9 +21938,9 @@ interface ASPxClientChartDesigner extends ASPxClientControl { */ PerformCallback(arg: string): void; /** - * - * @param arg - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; /** @@ -21871,9 +22097,9 @@ interface ASPxClientWebChartControl extends ASPxClientControl { */ PerformCallback(args: string): void; /** - * - * @param args - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param args A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(args: string, onSuccess: (arg1: string) => void): void; /** @@ -22103,7 +22329,7 @@ interface ASPxClientWebChartHitInfo { */ inChartTitle: boolean; /** - * Gets a value indicating whether the test point is within the axis. + * Gets a value indicating whether the test point is within the . * Value: true if the test point is within an axis; otherwise, false. */ inAxis: boolean; @@ -22333,17 +22559,17 @@ interface ASPxClientDiagramCoordinates { */ dateTimeValue: Date; /** - * Gets the X-axis of the diagram point. + * Gets the X- of the diagram point. * Value: An ASPxClientAxisBase descendant, representing the axis of arguments (X-axis). */ axisX: ASPxClientAxisBase; /** - * Gets the Y-axis of the diagram point. + * Gets the Y- of the diagram point. * Value: An ASPxClientAxisBase descendant, representing the axis of values (Y-axis). */ axisY: ASPxClientAxisBase; /** - * Gets the pane of the diagram point. + * Gets the of the diagram point. * Value: An ASPxClientXYDiagramPane descendant, representing the pane. */ pane: ASPxClientXYDiagramPane; @@ -22562,12 +22788,12 @@ interface ASPxClientXYDiagram2D extends ASPxClientXYDiagramBase { */ secondaryAxesY: ASPxClientAxis[]; /** - * Provides access to a default pane object. + * Provides access to a default object. * Value: An ASPxClientXYDiagramPane object which represents the default pane of a chart. */ defaultPane: ASPxClientXYDiagramPane; /** - * Provides access to an array of a diagram's panes. + * Provides access to an array of a diagram's . * Value: An array of ASPxClientXYDiagramPane objects. */ panes: ASPxClientXYDiagramPane[]; @@ -22699,7 +22925,7 @@ interface ASPxClientRadarAxis extends ASPxClientAxisBase { */ interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement { /** - * Gets the axis to which the axis title belongs. + * Gets the to which the axis title belongs. * Value: An ASPxClientAxisBase descendant, which identifies the axis. */ axis: ASPxClientAxisBase; @@ -22714,7 +22940,7 @@ interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement { */ interface ASPxClientAxisLabelItem extends ASPxClientWebChartRequiredElement { /** - * Gets the axis to which an axis label item belongs. + * Gets the to which an axis label item belongs. * Value: An ASPxClientAxisBase descendant, which identifies the axis. */ axis: ASPxClientAxisBase; @@ -23875,9 +24101,9 @@ interface ASPxClientQueryBuilder extends ASPxClientControl { */ PerformCallback(arg: string): void; /** - * - * @param arg - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; /** @@ -24036,9 +24262,9 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ PerformCallback(arg: string): void; /** - * - * @param arg - * @param onSuccess + * Sends a callback to the server and generates the server-side event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side event. + * @param onSuccess A client action to perform if the server round-trip completed successfully. */ PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; /** @@ -25128,6 +25354,7 @@ interface ASPxClientButtonEditStatic extends ASPxClientButtonEditBaseStatic { Cast(obj: Object): ASPxClientButtonEdit; } interface ASPxClientTokenBoxStatic extends ASPxClientComboBoxStatic { + Cast(obj: Object): ASPxClientTokenBox; } interface ASPxClientTrackBarStatic extends ASPxClientEditStatic { /** @@ -25909,6 +26136,7 @@ interface ASPxClientPivotGridStatic extends ASPxClientControlStatic { interface ASPxClientPivotCustomizationStatic extends ASPxClientControlStatic { } interface ASPxClientRichEditStatic extends ASPxClientControlStatic { + Cast(obj: Object): ASPxClientRichEdit; } interface ASPxSchedulerDateTimeHelperStatic { /** @@ -25922,10 +26150,11 @@ interface ASPxSchedulerDateTimeHelperStatic { */ ToDayTime(date: Date): any; /** - * Adds the specified number of days to a DateTime object and returns the result. - * @param date A DateTime object to which to add days. + * + * @param date + * @param dayCount */ - AddDays(date: Date): Date; + AddDays(date: Date, dayCount: number): Date; /** * Adds the specified timespan to a DateTime object and returns the result. * @param date A DateTime object to which to add a timespan. @@ -25978,6 +26207,7 @@ interface ASPxClientSpellCheckerStatic extends ASPxClientControlStatic { Cast(obj: Object): ASPxClientSpellChecker; } interface ASPxClientSpreadsheetStatic extends ASPxClientControlStatic { + Cast(obj: Object): ASPxClientSpreadsheet; } interface ASPxClientTreeListStatic extends ASPxClientControlStatic { /** @@ -26393,6 +26623,11 @@ interface ASPxClientFileManagerErrorConstsStatic { AlreadyExists: number; } interface ASPxClientFormLayoutStatic extends ASPxClientControlStatic { + /** + * Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress. + * @param obj The client object to be type cast. Represents an instance of a DevExpress web control's client object. + */ + Cast(obj: Object): ASPxClientFormLayout; } interface ASPxClientHiddenFieldStatic extends ASPxClientControlStatic { /** diff --git a/dhtmlxscheduler/dhtmlxscheduler.d.ts b/dhtmlxscheduler/dhtmlxscheduler.d.ts index 40123827ca..3f075861ab 100644 --- a/dhtmlxscheduler/dhtmlxscheduler.d.ts +++ b/dhtmlxscheduler/dhtmlxscheduler.d.ts @@ -3,12 +3,12 @@ // Definitions by: Maksim Kozhukh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface SchedulerCallback { (...args: any[]) : any } +interface SchedulerCallback { (...args: any[]): any } interface SchedulerFilterCallback { (id: string | number, event: any): boolean } -type SchedulerEventName ='onAfterEventDisplay'|'onAfterFolderToggle'|'onAfterLightbox'|'onAfterSchedulerResize'|'onBeforeCollapse'|'onBeforeDrag'|'onBeforeEventChanged'|'onBeforeEventCreated'|'onBeforeEventDelete'|'onBeforeEventDisplay'|'onBeforeEventDragIn'|'onBeforeEventDragOut'|'onBeforeExpand'|'onBeforeExternalDragIn'|'onBeforeFolderToggle'|'onBeforeLightbox'|'onBeforeSectionRender'|'onBeforeTodayDisplayed'|'onBeforeTooltip'|'onBeforeViewChange'|'onCellClick'|'onCellDblClick'|'onClearAll'|'onClick'|'onCollapse'|'onConfirmedBeforeEventDelete'|'onContextMenu'|'onDblClick'|'onDragEnd'|'onEmptyClick'|'onEventAdded'|'onEventCancel'|'onEventChanged'|'onEventCollision'|'onEventCopied'|'onEventCreated'|'onEventCut'|'onEventDeleted'|'onEventDrag'|'onEventDragIn'|'onEventDragOut'|'onEventDropOut'|'onEventIdChange'|'onEventLoading'|'onEventPasted'|'onEventSave'|'onExpand'|'onExternalDragIn'|'onLightbox'|'onLightboxButton'|'onLimitViolation'|'onLoadError'|'onLocationError'|'onMouseDown'|'onMouseMove'|'onOptionsLoad'|'onOptionsLoadFinal'|'onOptionsLoadStart'|'onSaveError'|'onScaleAdd'|'onScaleDblClick'|'onSchedulerReady'|'onSchedulerResize'|'onTemplatesReady'|'onTimelineCreated'|'onViewChange'|'onViewMoreClick'|'onXLE'|'onXLS'|'onXScaleClick'|'onXScaleDblClick'|'onYScaleClick'|'onYScaleDblClick'; +type SchedulerEventName = 'onAfterEventDisplay' | 'onAfterFolderToggle' | 'onAfterLightbox' | 'onAfterSchedulerResize' | 'onBeforeCollapse' | 'onBeforeDrag' | 'onBeforeEventChanged' | 'onBeforeEventCreated' | 'onBeforeEventDelete' | 'onBeforeEventDisplay' | 'onBeforeEventDragIn' | 'onBeforeEventDragOut' | 'onBeforeExpand' | 'onBeforeExternalDragIn' | 'onBeforeFolderToggle' | 'onBeforeLightbox' | 'onBeforeSectionRender' | 'onBeforeTodayDisplayed' | 'onBeforeTooltip' | 'onBeforeViewChange' | 'onCellClick' | 'onCellDblClick' | 'onClearAll' | 'onClick' | 'onCollapse' | 'onConfirmedBeforeEventDelete' | 'onContextMenu' | 'onDblClick' | 'onDragEnd' | 'onEmptyClick' | 'onEventAdded' | 'onEventCancel' | 'onEventChanged' | 'onEventCollision' | 'onEventCopied' | 'onEventCreated' | 'onEventCut' | 'onEventDeleted' | 'onEventDrag' | 'onEventDragIn' | 'onEventDragOut' | 'onEventDropOut' | 'onEventIdChange' | 'onEventLoading' | 'onEventPasted' | 'onEventSave' | 'onExpand' | 'onExternalDragIn' | 'onLightbox' | 'onLightboxButton' | 'onLimitViolation' | 'onLoadError' | 'onLocationError' | 'onMouseDown' | 'onMouseMove' | 'onOptionsLoad' | 'onOptionsLoadFinal' | 'onOptionsLoadStart' | 'onSaveError' | 'onScaleAdd' | 'onScaleDblClick' | 'onSchedulerReady' | 'onSchedulerResize' | 'onTemplatesReady' | 'onTimelineCreated' | 'onViewChange' | 'onViewMoreClick' | 'onXLE' | 'onXLS' | 'onXScaleClick' | 'onXScaleDblClick' | 'onYScaleClick' | 'onYScaleDblClick'; -interface SchedulerTemplates{ +interface SchedulerTemplates { /** * specifies the date in the header of the view * @param start the start date of the view @@ -458,7 +458,7 @@ interface SchedulerTemplates{ } -interface SchedulerConfigOptions{ +interface SchedulerConfigOptions { /** * 'says' to present the numbers of days in the Month view as clickable links that open the related day in the specified view */ @@ -477,12 +477,12 @@ interface SchedulerConfigOptions{ /** * specifies how to display the default error notification in case the XML data loading failed */ - ajax_error: string|boolean; + ajax_error: string | boolean; /** * 'says' to show multi-day events in the regular way (as one-day events are displayed) */ - all_timed: boolean|string; + all_timed: boolean | string; /** * sets the date format that will be used by the addEvent() method to parse the start_date, end_date properties in case they are specified as strings @@ -812,7 +812,7 @@ interface SchedulerConfigOptions{ /** * sets the height of the area that displays multi-day events */ - multi_day_height_limit: number|boolean; + multi_day_height_limit: number | boolean; /** * enables the possibility to render the same events in several sections of the Timeline or Units view @@ -942,12 +942,12 @@ interface SchedulerConfigOptions{ /** * enables/disables the touch support in the scheduler */ - touch: boolean|string; + touch: boolean | string; /** * defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture */ - touch_drag: number|boolean; + touch_drag: number | boolean; /** * enables/disables prompting messages in the right top corner of the screen @@ -996,7 +996,7 @@ interface SchedulerConfigOptions{ } -interface SchedulerDateHelpers{ +interface SchedulerDateHelpers { add(origin: Date, count: number, unit: string): Date; copy(origin: Date): Date; @@ -1017,19 +1017,19 @@ interface SchedulerDateHelpers{ to_fixed(value: number): string; } -interface SchedulerHotkeys{ +interface SchedulerHotkeys { edit_save: number; edit_cancel: number; } -interface SchedulerLocaleDate{ +interface SchedulerLocaleDate { month_full: string[]; month_short: string[]; day_full: string[]; day_short: string[]; } -interface SchedulerLocaleLabels{ +interface SchedulerLocaleLabels { dhx_cal_today_button: string; day_tab: string; week_tab: string; @@ -1046,13 +1046,13 @@ interface SchedulerLocaleLabels{ section_time: string; } -interface SchedulerLocale{ +interface SchedulerLocale { date: SchedulerLocaleDate; labels: SchedulerLocaleLabels; } -interface SchedulerSizes{ +interface SchedulerSizes { /** * the height of day cells in the month view */ @@ -1124,14 +1124,14 @@ interface SchedulerSizes{ scroll_width: number; } -interface SchedulerEnterprise{ +interface SchedulerEnterprise { /** * Creates a new instance of Scheduler */ getSchedulerInstance(): SchedulerStatic; } -interface SchedulerStatic{ +interface SchedulerStatic { templates: SchedulerTemplates; config: SchedulerConfigOptions; date: SchedulerDateHelpers; @@ -1238,7 +1238,7 @@ interface SchedulerStatic{ * @param time_points an array [start_minute,end_minute,..,start_minute_N,end_minute_N],
where each pair sets a certain limit range. The array can have any number of
such pairs * @param items defines specific items of view(s) to block */ - blockTime(date: Date|number, time_points: any[], items?: any): void; + blockTime(date: Date | number, time_points: any[], items?: any): void; /** * calls an inner event @@ -1327,7 +1327,7 @@ interface SchedulerStatic{ * deletes the specified event * @param id the event's id */ - deleteEvent(id: string|number): void; + deleteEvent(id: string | number): void; /** * removes marking/blocking set by the addMarkedTimespan() and blockTime() methods @@ -1393,39 +1393,39 @@ interface SchedulerStatic{ * returns the event object by its id * @param event_id the event's id */ - getEvent(event_id: string|number): void; + getEvent(event_id: string | number): any; /** * gets the event's end date * @param id the event's id */ - getEventEndDate(id: string): Date; + getEventEndDate(id: string | number): Date; /** * gets the event's start date * @param id the event's id */ - getEventStartDate(id: string): Date; + getEventStartDate(id: string | number): Date; /** * gets the event's text * @param id the event's id */ - getEventText(id: string): string; + getEventText(id: string | number): string; /** * returns a collection of events which occur during the specified period * @param from the start date of the period * @param to the end date of the period */ - getEvents(from?: Date, to?: Date): void; + getEvents(from?: Date, to?: Date): any; /** * gets the label of a select control in the lightbox * @param property the name of a data property that the control is mapped to * @param key the option's id. This parameter is compared with the event's data property
to assign the select's option to an event */ - getLabel(property: string, key: string|number): void; + getLabel(property: string, key: string | number): any; /** * gets the lightbox's HTML object element @@ -1486,7 +1486,7 @@ interface SchedulerStatic{ * @param date the initial date of the scheduler (by default, the current date) * @param view the name of the initial view (by default, "week") */ - init(container: string|HTMLElement, date?: Date, view?: string): void; + init(container: string | HTMLElement, date?: Date, view?: string): void; /** * inverts the specified time zones @@ -1497,7 +1497,7 @@ interface SchedulerStatic{ /** * checks whether the calendar is currently opened in the scheduler */ - isCalendarVisible(): boolean|HTMLElement; + isCalendarVisible(): boolean | HTMLElement; /** * checks whether the specified event one-day or multi-day @@ -1607,7 +1607,7 @@ interface SchedulerStatic{ * @param id the event's id * @param event the event object */ - setEvent(id: string|number, event: any): void; + setEvent(id: string | number, event: any): void; /** * sets the event's end date @@ -1739,7 +1739,7 @@ interface SchedulerStatic{ * removes marking/blocking set by the markTimespan() method * @param divs a timespan to remove marking/blocking from (or an array of timespans) */ - unmarkTimespan(divs: HTMLElement|any[]): void; + unmarkTimespan(divs: HTMLElement | any[]): void; /** * unselects the specified event @@ -1776,7 +1776,5 @@ interface SchedulerStatic{ } - - declare var scheduler: SchedulerStatic; declare var Scheduler: SchedulerEnterprise; \ No newline at end of file diff --git a/diff-match-patch/diff-match-patch.d.ts b/diff-match-patch/diff-match-patch.d.ts index 028fe9d65c..b648363ead 100644 --- a/diff-match-patch/diff-match-patch.d.ts +++ b/diff-match-patch/diff-match-patch.d.ts @@ -5,6 +5,13 @@ declare module "diff-match-patch" { type Diff = [number, string]; + export class Patch { + diffs: Diff[]; + start1: number; + start2: number; + length1: number; + length2: number; + } export class diff_match_patch { static new (): diff_match_patch; @@ -31,6 +38,12 @@ declare module "diff-match-patch" { diff_levenshtein(diffs: Diff[]): number; diff_toDelta(diffs: Diff[]): string; diff_fromDelta(text1: string, delta: string): Diff[]; + + patch_make(text1: any, text2?: string): Patch[]; + patch_deepCopy(patches: Patch[]): Patch[]; + patch_apply(patches: Patch[], text: string): [string, boolean[]]; + patch_fromText(text: string): Patch[]; + patch_toText(patches: Patch[]): string; } export var DIFF_DELETE: number; diff --git a/diff2html/diff2html-tests.ts b/diff2html/diff2html-tests.ts new file mode 100644 index 0000000000..35448baa90 --- /dev/null +++ b/diff2html/diff2html-tests.ts @@ -0,0 +1,26 @@ +/// + +import Diff2Html = require('diff2html'); + +let d2h = Diff2Html.Diff2Html; + +class Diff2HtmlOptionsImpl implements Diff2Html.Options { + constructor (public inputFormat: string) { + } +} + +let strInput = + 'diff --git a/sample b/sample\n' + + 'index 0000001..0ddf2ba\n' + + '--- a/sample\n' + + '+++ b/sample\n' + + '@@ -1 +1 @@\n' + + '-test\n' + + '+test1r\n'; + +let strConfiguration = new Diff2HtmlOptionsImpl('diff'); +let diffInput = d2h.getJsonFromDiff(strInput, strConfiguration); + +let diffConfiguration = new Diff2HtmlOptionsImpl('json'); +let htmlString = d2h.getPrettyHtml(diffInput, diffConfiguration); +console.log(htmlString); diff --git a/diff2html/diff2html.d.ts b/diff2html/diff2html.d.ts new file mode 100644 index 0000000000..398cb1aba1 --- /dev/null +++ b/diff2html/diff2html.d.ts @@ -0,0 +1,66 @@ +// Type definitions for diff2html +// Project: https://github.com/rtfpessoa/diff2html +// Definitions by: rtfpessoa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Diff2Html { + + export interface Options { + inputFormat?: string; + outputFormat?: string; + showFiles?: boolean; + matching?: string; + synchronisedScroll?: boolean; + matchWordsThreshold?: number; + matchingMaxComparisons?: number; + } + + export interface Line { + content: string; + type: string; + oldNumber: number; + newNumber: number; + } + + export interface Block { + oldStartLine: number; + oldStartLine2?: number; + newStartLine: number; + header: string; + lines: Line[]; + } + + export interface Result { + addedLines: number; + deletedLines: number; + isCombined: boolean; + isGitDiff: boolean; + oldName: string; + newName: string; + language: string; + blocks: Block[]; + oldMode?: string; + newMode?: string; + deletedFileMode?: string; + newFileMode?: string; + isDeleted?: boolean; + isNew?: boolean; + isCopy?: boolean; + isRename?: boolean; + unchangedPercentage?: number; + changedPercentage?: number; + checksumBefore?: string; + checksumAfter?: string; + mode?: string; + } + + export interface Diff2Html { + getJsonFromDiff(input: string, configuration?: Options): Result; + getPrettyHtml(input: any, configuration?: Options): string; + } +} + +declare module "diff2html" { + var d2h: { "Diff2Html": Diff2Html.Diff2Html }; + export = d2h; +} diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts index bca5721240..eaab995a36 100644 --- a/dojo/dojo.d.ts +++ b/dojo/dojo.d.ts @@ -5686,7 +5686,23 @@ declare namespace dojo { * @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins. * @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins". */ - mixin(dest: Object, source: Object, sources?: Object[]): Object; + mixin(dest: T): T; + mixin( + dest: T, + source: U + ): T & U; + mixin( + dest: T, + source1: U, + source2: V + ): T & U & V; + mixin( + dest: T, + source1: U, + source2: V, + source3: W + ): T & U & V & W; + mixin(dest: Object, ...sources: Object[]): T; /** * similar to hitch() except that the scope object is left to be * whatever the execution context eventually becomes. diff --git a/dropzone/dropzone-commonjs-tests.ts b/dropzone/dropzone-commonjs-tests.ts index 8b5fd0a693..98c16bc185 100644 --- a/dropzone/dropzone-commonjs-tests.ts +++ b/dropzone/dropzone-commonjs-tests.ts @@ -189,4 +189,94 @@ dropzone.processFiles(addedFiles); dropzone.processQueue(); dropzone.removeAllFiles(true); +dropzone + .on("drop", () => { + console.count('drop'); + }) + .on("dragstart", () => { + console.count('dragstart'); + }) + .on("dragend", () => { + console.count('dragend'); + }) + .on("dragenter", () => { + console.count('dragenter'); + }) + .on("dragover", () => { + console.count('dragover'); + }) + .on("dragleave", () => { + console.count('dragleave'); + }) + .on("paste", () => { + console.count('paste'); + }) + .on("reset", () => { + console.count('reset'); + }) + .on("addedfile", () => { + console.count('addedfile'); + }) + .on("addedfiles", () => { + console.count('addedfiles'); + }) + .on("removedfile", () => { + console.count('removedfile'); + }) + .on("thumbnail", () => { + console.count('thumbnail'); + }) + .on("error", () => { + console.count('error'); + }) + .on("errormultiple", () => { + console.count('errormultiple'); + }) + .on("processing", () => { + console.count('processing'); + }) + .on("processingmultiple", () => { + console.count('processingmultiple'); + }) + .on("uploadprogress", () => { + console.count('uploadprogress'); + }) + .on("totaluploadprogress", () => { + console.count('totaluploadprogress'); + }) + .on("sending", () => { + console.count('sending'); + }) + .on("sendingmultiple", () => { + console.count('sendingmultiple'); + }) + .on("success", () => { + console.count('success'); + }) + .on("successmultiple", () => { + console.count('successmultiple'); + }) + .on("canceled", () => { + console.count('canceled'); + }) + .on("canceledmultiple", () => { + console.count('canceledmultiple'); + }) + .on("complete", () => { + console.count('complete'); + }) + .on("completemultiple", () => { + console.count('completemultiple'); + }) + .on("maxfilesexceeded", () => { + console.count('maxfilesexceeded'); + }) + .on("maxfilesreached", () => { + console.count('maxfilesreached'); + }) + .on("queuecomplete", () => { + console.count('queuecomplete'); + }); + + dropzone.destroy(); diff --git a/dropzone/dropzone-tests.ts b/dropzone/dropzone-tests.ts index 249d90a707..bde33458bb 100644 --- a/dropzone/dropzone-tests.ts +++ b/dropzone/dropzone-tests.ts @@ -197,4 +197,93 @@ dropzone.processFiles(addedFiles); dropzone.processQueue(); dropzone.removeAllFiles(true); +dropzone + .on("drop", () => { + console.count('drop'); + }) + .on("dragstart", () => { + console.count('dragstart'); + }) + .on("dragend", () => { + console.count('dragend'); + }) + .on("dragenter", () => { + console.count('dragenter'); + }) + .on("dragover", () => { + console.count('dragover'); + }) + .on("dragleave", () => { + console.count('dragleave'); + }) + .on("paste", () => { + console.count('paste'); + }) + .on("reset", () => { + console.count('reset'); + }) + .on("addedfile", () => { + console.count('addedfile'); + }) + .on("addedfiles", () => { + console.count('addedfiles'); + }) + .on("removedfile", () => { + console.count('removedfile'); + }) + .on("thumbnail", () => { + console.count('thumbnail'); + }) + .on("error", () => { + console.count('error'); + }) + .on("errormultiple", () => { + console.count('errormultiple'); + }) + .on("processing", () => { + console.count('processing'); + }) + .on("processingmultiple", () => { + console.count('processingmultiple'); + }) + .on("uploadprogress", () => { + console.count('uploadprogress'); + }) + .on("totaluploadprogress", () => { + console.count('totaluploadprogress'); + }) + .on("sending", () => { + console.count('sending'); + }) + .on("sendingmultiple", () => { + console.count('sendingmultiple'); + }) + .on("success", () => { + console.count('success'); + }) + .on("successmultiple", () => { + console.count('successmultiple'); + }) + .on("canceled", () => { + console.count('canceled'); + }) + .on("canceledmultiple", () => { + console.count('canceledmultiple'); + }) + .on("complete", () => { + console.count('complete'); + }) + .on("completemultiple", () => { + console.count('completemultiple'); + }) + .on("maxfilesexceeded", () => { + console.count('maxfilesexceeded'); + }) + .on("maxfilesreached", () => { + console.count('maxfilesreached'); + }) + .on("queuecomplete", () => { + console.count('queuecomplete'); + }); + dropzone.destroy(); diff --git a/dropzone/dropzone.d.ts b/dropzone/dropzone.d.ts index 7464151b3b..b8c784505b 100644 --- a/dropzone/dropzone.d.ts +++ b/dropzone/dropzone.d.ts @@ -95,8 +95,8 @@ interface DropzoneOptions { uploadprogress?(file:DropzoneFile, progress:number, bytesSent:number):void; totaluploadprogress?(totalProgress:number, totalBytes:number, totalBytesSent:number):void; - sending?(file:DropzoneFile, xhr:XMLHttpRequest, formData:{}):void; - sendingmultiple?(files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}):void; + sending?(file:DropzoneFile, xhr:XMLHttpRequest, formData:FormData):void; + sendingmultiple?(files:DropzoneFile[], xhr:XMLHttpRequest, formData:FormData):void; success?(file: DropzoneFile, response: Object|string): void; successmultiple?(files:DropzoneFile[], responseText:string):void; @@ -176,91 +176,91 @@ declare class Dropzone { createThumbnailFromUrl(file:DropzoneFile, url:string, callback?:(...args:any[]) => void):any; - on(eventName:string, callback:(...args:any[]) => void):void; + on(eventName:string, callback:(...args:any[]) => void):Dropzone; - off(eventName:string):void; + off(eventName:string):Dropzone; - emit(eventName:string, ...args:any[]):void; + emit(eventName:string, ...args:any[]):Dropzone; - on(eventName:"drop", callback:(e:DragEvent) => any):void; - on(eventName:"dragstart", callback:(e:DragEvent) => any):void; - on(eventName:"dragend", callback:(e:DragEvent) => any):void; - on(eventName:"dragenter", callback:(e:DragEvent) => any):void; - on(eventName:"dragover", callback:(e:DragEvent) => any):void; - on(eventName:"dragleave", callback:(e:DragEvent) => any):void; - on(eventName:"paste", callback:(e:DragEvent) => any):void; + on(eventName:"drop", callback:(e:DragEvent) => any):Dropzone; + on(eventName:"dragstart", callback:(e:DragEvent) => any):Dropzone; + on(eventName:"dragend", callback:(e:DragEvent) => any):Dropzone; + on(eventName:"dragenter", callback:(e:DragEvent) => any):Dropzone; + on(eventName:"dragover", callback:(e:DragEvent) => any):Dropzone; + on(eventName:"dragleave", callback:(e:DragEvent) => any):Dropzone; + on(eventName:"paste", callback:(e:DragEvent) => any):Dropzone; - on(eventName:"reset"):void; + on(eventName:"reset"):Dropzone; - on(eventName:"addedfile", callback:(file:DropzoneFile) => any):void; - on(eventName:"addedfiles", callback:(files:DropzoneFile[]) => any):void; - on(eventName:"removedfile", callback:(file:DropzoneFile) => any):void; - on(eventName:"thumbnail", callback:(file:DropzoneFile, dataUrl:string) => any):void; + on(eventName:"addedfile", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"addedfiles", callback:(files:DropzoneFile[]) => any):Dropzone; + on(eventName:"removedfile", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"thumbnail", callback:(file:DropzoneFile, dataUrl:string) => any):Dropzone; - on(eventName:"error", callback:(file:DropzoneFile, message:string|Error) => any):void; - on(eventName:"errormultiple", callback:(files:DropzoneFile[], message:string|Error) => any):void; + on(eventName:"error", callback:(file:DropzoneFile, message:string|Error) => any):Dropzone; + on(eventName:"errormultiple", callback:(files:DropzoneFile[], message:string|Error) => any):Dropzone; - on(eventName:"processing", callback:(file:DropzoneFile) => any):void; - on(eventName:"processingmultiple", callback:(files:DropzoneFile[]) => any):void; + on(eventName:"processing", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"processingmultiple", callback:(files:DropzoneFile[]) => any):Dropzone; - on(eventName:"uploadprogress", callback:(file:DropzoneFile, progress:number, bytesSent:number) => any):void; - on(eventName:"totaluploadprogress", callback:(totalProgress:number, totalBytes:number, totalBytesSent:number) => any):void; + on(eventName:"uploadprogress", callback:(file:DropzoneFile, progress:number, bytesSent:number) => any):Dropzone; + on(eventName:"totaluploadprogress", callback:(totalProgress:number, totalBytes:number, totalBytesSent:number) => any):Dropzone; - on(eventName:"sending", callback:(file:DropzoneFile, xhr:XMLHttpRequest, formData:{}) => any):void; - on(eventName:"sendingmultiple", callback:(files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}) => any):void; + on(eventName:"sending", callback:(file:DropzoneFile, xhr:XMLHttpRequest, formData:FormData) => any):Dropzone; + on(eventName:"sendingmultiple", callback:(files:DropzoneFile[], xhr:XMLHttpRequest, formData:FormData) => any):Dropzone; - on(eventName:"success", callback:(file:DropzoneFile) => any):void; - on(eventName:"successmultiple", callback:(files:DropzoneFile[]) => any):void; + on(eventName:"success", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"successmultiple", callback:(files:DropzoneFile[]) => any):Dropzone; - on(eventName:"canceled", callback:(file:DropzoneFile) => any):void; - on(eventName:"canceledmultiple", callback:(file:DropzoneFile[]) => any):void; + on(eventName:"canceled", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"canceledmultiple", callback:(file:DropzoneFile[]) => any):Dropzone; - on(eventName:"complete", callback:(file:DropzoneFile) => any):void; - on(eventName:"completemultiple", callback:(file:DropzoneFile[]) => any):void; + on(eventName:"complete", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"completemultiple", callback:(file:DropzoneFile[]) => any):Dropzone; - on(eventName:"maxfilesexceeded", callback:(file:DropzoneFile) => any):void; - on(eventName:"maxfilesreached", callback:(files:DropzoneFile[]) => any):void; - on(eventName:"queuecomplete"):void; + on(eventName:"maxfilesexceeded", callback:(file:DropzoneFile) => any):Dropzone; + on(eventName:"maxfilesreached", callback:(files:DropzoneFile[]) => any):Dropzone; + on(eventName:"queuecomplete"):Dropzone; - emit(eventName:"drop", e:DragEvent):void; - emit(eventName:"dragstart", e:DragEvent):void; - emit(eventName:"dragend", e:DragEvent):void; - emit(eventName:"dragenter", e:DragEvent):void; - emit(eventName:"dragover", e:DragEvent):void; - emit(eventName:"dragleave", e:DragEvent):void; - emit(eventName:"paste", e:DragEvent):void; + emit(eventName:"drop", e:DragEvent):Dropzone; + emit(eventName:"dragstart", e:DragEvent):Dropzone; + emit(eventName:"dragend", e:DragEvent):Dropzone; + emit(eventName:"dragenter", e:DragEvent):Dropzone; + emit(eventName:"dragover", e:DragEvent):Dropzone; + emit(eventName:"dragleave", e:DragEvent):Dropzone; + emit(eventName:"paste", e:DragEvent):Dropzone; - emit(eventName:"reset"):void; + emit(eventName:"reset"):Dropzone; - emit(eventName:"addedfile", file:DropzoneFile):void; - emit(eventName:"addedfiles", files:DropzoneFile[]):void; - emit(eventName:"removedfile", file:DropzoneFile):void; - emit(eventName:"thumbnail", file:DropzoneFile, dataUrl:string):void; + emit(eventName:"addedfile", file:DropzoneFile):Dropzone; + emit(eventName:"addedfiles", files:DropzoneFile[]):Dropzone; + emit(eventName:"removedfile", file:DropzoneFile):Dropzone; + emit(eventName:"thumbnail", file:DropzoneFile, dataUrl:string):Dropzone; - emit(eventName:"error", file:DropzoneFile, message:string|Error):void; - emit(eventName:"errormultiple", files:DropzoneFile[], message:string|Error):void; + emit(eventName:"error", file:DropzoneFile, message:string|Error):Dropzone; + emit(eventName:"errormultiple", files:DropzoneFile[], message:string|Error):Dropzone; - emit(eventName:"processing", file:DropzoneFile):void; - emit(eventName:"processingmultiple", files:DropzoneFile[]):void; + emit(eventName:"processing", file:DropzoneFile):Dropzone; + emit(eventName:"processingmultiple", files:DropzoneFile[]):Dropzone; - emit(eventName:"uploadprogress", file:DropzoneFile, progress:number, bytesSent:number):void; - emit(eventName:"totaluploadprogress", totalProgress:number, totalBytes:number, totalBytesSent:number):void; + emit(eventName:"uploadprogress", file:DropzoneFile, progress:number, bytesSent:number):Dropzone; + emit(eventName:"totaluploadprogress", totalProgress:number, totalBytes:number, totalBytesSent:number):Dropzone; - emit(eventName:"sending", file:DropzoneFile, xhr:XMLHttpRequest, formData:{}):void; - emit(eventName:"sendingmultiple", files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}):void; + emit(eventName:"sending", file:DropzoneFile, xhr:XMLHttpRequest, formData:FormData):Dropzone; + emit(eventName:"sendingmultiple", files:DropzoneFile[], xhr:XMLHttpRequest, formData:FormData):Dropzone; - emit(eventName:"success", file:DropzoneFile):void; - emit(eventName:"successmultiple", files:DropzoneFile[]):void; + emit(eventName:"success", file:DropzoneFile):Dropzone; + emit(eventName:"successmultiple", files:DropzoneFile[]):Dropzone; - emit(eventName:"canceled", file:DropzoneFile):void; - emit(eventName:"canceledmultiple", file:DropzoneFile[]):void; + emit(eventName:"canceled", file:DropzoneFile):Dropzone; + emit(eventName:"canceledmultiple", file:DropzoneFile[]):Dropzone; - emit(eventName:"complete", file:DropzoneFile):void; - emit(eventName:"completemultiple", file:DropzoneFile[]):void; + emit(eventName:"complete", file:DropzoneFile):Dropzone; + emit(eventName:"completemultiple", file:DropzoneFile[]):Dropzone; - emit(eventName:"maxfilesexceeded", file:DropzoneFile):void; - emit(eventName:"maxfilesreached", files:DropzoneFile[]):void; - emit(eventName:"queuecomplete"):void; + emit(eventName:"maxfilesexceeded", file:DropzoneFile):Dropzone; + emit(eventName:"maxfilesreached", files:DropzoneFile[]):Dropzone; + emit(eventName:"queuecomplete"):Dropzone; } diff --git a/durandal/durandal.d.ts b/durandal/durandal.d.ts index 97e1307a0b..1b28ca7bc3 100644 --- a/durandal/durandal.d.ts +++ b/durandal/durandal.d.ts @@ -690,6 +690,11 @@ declare module 'plugins/dialog' { * @param {object} context The composition context. */ compositionComplete(child: HTMLElement, parent: HTMLElement, context: composition.CompositionContext): void; + + /** + * Opacity of the blockout. The default is 0.6. + */ + blockoutOpacity?: number; } interface Dialog { @@ -728,7 +733,7 @@ declare module 'plugins/dialog' { * @param {string} [name] The name of the context to retrieve. * @returns {DialogContext} True context. */ - export function getContext(name: string): DialogContext; + export function getContext(name?: string): DialogContext; /** * Adds (or replaces) a dialog context. diff --git a/dustjs-linkedin/dustjs-linkedin.d.ts b/dustjs-linkedin/dustjs-linkedin.d.ts index 70bd288a39..9bb05b1424 100644 --- a/dustjs-linkedin/dustjs-linkedin.d.ts +++ b/dustjs-linkedin/dustjs-linkedin.d.ts @@ -89,7 +89,7 @@ declare module "dustjs-linkedin" { * Registers an event listener. Streams accept a single listener for a given event. * @param evt the event. Possible values are data, end, error (maybe more, look in the source). */ - on(evt: string, callback: (data?: any) => any); + on(evt: string, callback: (data?: any) => any): this; pipe(stream: Stream): Stream; } @@ -126,8 +126,8 @@ declare module "dustjs-linkedin" { * @param name the template name. * @param context a plain object or an instance of dust.Context. */ - export function render(name: string, context: any, callback: (err: any, out: string) => any); - export function render(name: string, context: Context, callback: (err: any, out: string) => any); + export function render(name: string, context: any, callback: (err: any, out: string) => any): void; + export function render(name: string, context: Context, callback: (err: any, out: string) => any): void; /** * Compiles and renders source, invoking callback on completion. If no callback is supplied this function returns a Stream object. Use this function when precompilation is not required. diff --git a/dva/dva-tests.tsx b/dva/dva-tests.tsx new file mode 100644 index 0000000000..917ee69e60 --- /dev/null +++ b/dva/dva-tests.tsx @@ -0,0 +1,48 @@ +/// +/// + +import React = __React; + +import dva from 'dva'; +import { connect } from 'dva'; +import { Router, Route } from 'dva/router'; + +// 1. Initialize +const app = dva(); + +// 2. Model +app.model({ + namespace: 'count', + state: 0, + reducers: { + add(count: number) { + return count + 1 + }, + minus(count: number) { + return count - 1 + }, + }, +}); + +// 3. View +const App = connect(({ count }) => ({ + count +}))(function ({ count, dispatch }) { + return ( +
+

{ count }

+ + +
+ ); +}); + +// 4. Router +app.router(({ history }) => + + + +); + +// 5. Start +const countApp = app.start(); diff --git a/dva/dva.d.ts b/dva/dva.d.ts new file mode 100644 index 0000000000..0cf7206e63 --- /dev/null +++ b/dva/dva.d.ts @@ -0,0 +1,61 @@ +// Type definitions for dva v1.0.0 +// Project: https://github.com/dvajs/dva +// Definitions by: nikogu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +declare module 'dva' { + /** connecting Container Components */ + export function connect(maps:Object):Function; + + export default function dva(opts?:Object):{ + + /** dva plugin */ + use: (hooks:Object)=>void, + + /** dva bootstrap */ + start: (selector?:String|HTMLElement)=>void, + + /** dva add model */ + model: (model:Object)=>void, + + /** dva setting router */ + router: (router:Object)=>Object|JSX.Element, + }; +} + +/** + * https://github.com/reactjs/react-router + */ +declare module 'dva/router' { + import React = __React; + + interface RouterProps { + history?: Object + } + export class Router extends React.Component { + render():JSX.Element + } + + + interface RouteProps { + path?: string, + component?: React.ReactNode + } + export class Route extends React.Component { + render():JSX.Element + } + + /** + * https://github.com/reactjs/react-router-redux + */ + export class routerRedux {} + +} + +/** + * https://github.com/fis-components/whatwg-fetch + */ +declare module 'dva/fetch' { + export default Function; +} diff --git a/dygraphs/dygraphs-tests.ts b/dygraphs/dygraphs-tests.ts new file mode 100644 index 0000000000..bd99fc0ac1 --- /dev/null +++ b/dygraphs/dygraphs-tests.ts @@ -0,0 +1,599 @@ +// These tests are copied more or less directly from http://dygraphs.com/tests/ + +/// + +function demo() { + const g14 = new Dygraph( + document.getElementById("div_g14"), + 'data', { + rollPeriod: 14, + errorBars: true, + labelsDivWidth: 100, + labelsDivStyles: { + 'boxShadow': '4px 4px 4px #888' + }, + labelsSeparateLines: true, + } + ); +} + +function twoAxes() { + var data = [] as number[][]; + + var g = new Dygraph( + document.getElementById("demodiv"), + data, + { + labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], + series: { + 'Y3': { + axis: 'y2' + }, + 'Y4': { + axis: 'y2' + }, + }, + axes: { + y2: { + // set axis-related properties here + labelsKMB: true + }, + y: { + axisLabelWidth: 60 + } + }, + ylabel: 'Primary y-axis', + y2label: 'Secondary y-axis', + } + ); + + var g2 = new Dygraph( + document.getElementById("demodiv_y2_primary"), + data, + { + labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], + ylabel: 'Primary y-axis', + y2label: 'Secondary y-axis', + series : { + 'Y3': { + axis: 'y2' + }, + 'Y4': { + axis: 'y2' + } + }, + axes: { + y: { + // set axis-related properties here + drawGrid: false, + independentTicks: false + }, + y2: { + // set axis-related properties here + labelsKMB: true, + drawGrid: true, + independentTicks: true + } + } + } + ); + + var g3 = new Dygraph( + document.getElementById("demodiv_two_grids"), + data, + { + labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], + ylabel: 'Primary y-axis', + y2label: 'Secondary y-axis', + series : { + 'Y3': { + axis: 'y2' + }, + 'Y4': { + axis: 'y2' + } + }, + axes: { + y2: { + // set axis-related properties here + labelsKMB: true, + drawGrid: true, + independentTicks: true, + gridLinePattern: [2,2] + } + } + } + ); + + var g4 = new Dygraph( + document.getElementById("demodiv_one"), + data, + { + labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], + labelsKMB: true, + ylabel: 'Primary y-axis', + y2label: 'Secondary y-axis', + } + ); + + var g5 = new Dygraph( + document.getElementById("demodiv_one_right"), + data, + { + labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], + ylabel: 'Primary y-axis', + y2label: 'Secondary y-axis', + series : { + 'Y1': { + axis: 'y2' + }, + 'Y2': { + axis: 'y2' + }, + 'Y3': { + axis: 'y2' + }, + 'Y4': { + axis: 'y2' + } + }, + axes: { + y: { + // set axis-related properties here + drawGrid: false, + independentTicks: false + }, + y2: { + // set axis-related properties here + labelsKMB: true, + drawGrid: true, + independentTicks: true + } + } + } + ); + + function update(el: HTMLInputElement) { + g.updateOptions( { fillGraph: el.checked } ); + g2.updateOptions( { fillGraph: el.checked } ); + g3.updateOptions( { fillGraph: el.checked } ); + g4.updateOptions( { fillGraph: el.checked } ); + g5.updateOptions( { fillGraph: el.checked } ); + } +} + +function perSeries() { + var data = '1234'; + var g = new Dygraph( + document.getElementById("demodiv"), + data, + { + strokeWidth: 2, + series : { + 'parabola': { + strokeWidth: 0.0, + drawPoints: true, + pointSize: 4, + highlightCircleSize: 6 + }, + 'line': { + strokeWidth: 1.0, + drawPoints: true, + pointSize: 1.5 + }, + 'sine wave': { + strokeWidth: 3, + highlightCircleSize: 10 + }, + 'sine wave2': { + strokePattern: [10, 2, 5, 2], + strokeWidth: 2, + highlightCircleSize: 3 + } + } + } + ); + + var g2 = new Dygraph( + document.getElementById("demodiv2"), + data, + { + legend: 'always', + strokeWidth: 2, + series: { + 'parabola': { + strokePattern: null, + drawPoints: true, + pointSize: 4, + highlightCircleSize: 6 + }, + 'line': { + strokePattern: Dygraph.DASHED_LINE, + strokeWidth: 1.0, + drawPoints: true, + pointSize: 1.5 + }, + 'another line': { + strokePattern: [25, 5] + }, + 'sine wave': { + strokePattern: Dygraph.DOTTED_LINE, + strokeWidth: 3, + highlightCircleSize: 10 + }, + 'sine wave2': { + strokePattern: Dygraph.DOT_DASH_LINE, + strokeWidth: 2, + highlightCircleSize: 3 + } + } + } + ); + + var g3 = new Dygraph( + document.getElementById("demodiv3"), + data, + { + strokeWidth: 2, + series: { + 'parabola': { + strokeWidth: 0.0, + drawPoints: true, + pointSize: 4, + highlightCircleSize: 6 + }, + 'line': { + strokeWidth: 1.0, + drawPoints: true, + pointSize: 1.5 + }, + 'sine wave': { + strokeWidth: 3, + highlightCircleSize: 10 + }, + 'sine wave2': { + strokePattern: [10, 2, 5, 2], + strokeWidth: 2, + highlightCircleSize: 3 + } + } + } + ); +} + +function highlightedRegion() { + var highlight_start = 0, highlight_end = 0; + var g = new Dygraph( + document.getElementById("div_g"), + [], + { + labels: ['X', 'Est.', 'Actual'], + animatedZooms: true, + underlayCallback: function(canvas, area, g) { + var bottom_left = g.toDomCoords(highlight_start, -20); + var top_right = g.toDomCoords(highlight_end, +20); + + var left = bottom_left[0]; + var right = top_right[0]; + + canvas.fillStyle = "rgba(255, 255, 102, 1.0)"; + canvas.fillRect(left, area.y, right - left, area.h); + } + + } + ); +} + +function makeGraph(className: string, numSeries: number, numRows: number, isStacked: boolean) { + var div = document.createElement('div'); + div.className = className; + div.style.display = 'inline-block'; + document.body.appendChild(div); + + var labels = ['x']; + for (var i = 0; i < numSeries; ++i) { + var label = '' + i; + label = 's' + '000'.substr(label.length) + label; + labels[i + 1] = label; + } + var g = new Dygraph( + div, + 'data', + { + width: 480, + height: 320, + labels: labels.slice(), + stackedGraph: isStacked, + + highlightCircleSize: 2, + strokeWidth: 1, + strokeBorderWidth: isStacked ? null : 1, + + highlightSeriesOpts: { + strokeWidth: 3, + strokeBorderWidth: 1, + highlightCircleSize: 5, + }, + }); + g.setSelection(false, 's005'); +}; + +function linearRegressionAddSeries() { + var labels = ['X', 'Y1', 'Y2']; + var orig_colors = [] as string[]; + + var g = new Dygraph( + document.getElementById("demodiv"), + 'data', + { + labels: labels, + drawPoints: true, + strokeWidth: 0.0, + drawCallback: function(g, is_initial) { + if (!is_initial) return; + var c = g.getColors(); + for (var i = 0; i < c.length; i++) orig_colors.push(c[i]); + } + } + ); +} + +function callbacks() { + var s = document.getElementById("status"); + var g: Dygraph = null; + var pts_info = function(e: MouseEvent, x: number, pts: dygraphs.Point[], row?: number) { + var str = "(" + x + ") "; + for (var i = 0; i < pts.length; i++) { + var p = pts[i]; + if (i) str += ", "; + str += p.name + ": " + p.yval; + } + + var x = e.offsetX; + var y = e.offsetY; + var dataXY = g.toDataCoords(x, y); + str += ", (" + x + ", " + y + ")"; + str += " -> (" + dataXY[0] + ", " + dataXY[1] + ")"; + str += ", row #"+row; + + return str; + }; + + g = new Dygraph( + document.getElementById("div_g"), + 'NoisyData', { + rollPeriod: 7, + showRoller: true, + errorBars: true, + + highlightCallback: function(e, x, pts, row) { + s.innerHTML += "Highlight " + pts_info(e,x,pts,row) + "
"; + }, + + unhighlightCallback: function(e) { + s.innerHTML += "Unhighlight
"; + }, + + clickCallback: function(e, x, pts) { + s.innerHTML += "Click " + pts_info(e,x,pts) + "
"; + }, + + pointClickCallback: function(e, p) { + s.innerHTML += "Point Click " + p.name + ": " + p.x + "
"; + }, + + zoomCallback: function(minX, maxX, yRanges) { + s.innerHTML += "Zoom [" + minX + ", " + maxX + ", [" + yRanges + "]]
"; + }, + + drawCallback: function(g) { + s.innerHTML += "Draw [" + g.xAxisRange() + "]
"; + } + } + ); +} + +function valueAxisFormatters() { + function formatDate(d: Date) { + var yyyy = d.getFullYear(), + mm = d.getMonth() + 1, + dd = d.getDate(); + return yyyy + '-' + (mm < 10 ? '0' : '') + mm + (dd < 10 ? '0' : '') + dd; + } + + var g = new Dygraph( + document.getElementById("demodiv"), + 'data', + { + labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], + width: 640, + height: 350, + series: { + 'Y3': { axis: 'y2' }, + 'Y4': { axis: 'y2' } + }, + axes: { + x: { + valueFormatter: function(ms) { + return 'xvf(' + formatDate(new Date(ms)) + ')'; + }, + axisLabelFormatter: function(d: Date) { + return 'xalf(' + formatDate(d) + ')'; + }, + pixelsPerLabel: 100, + axisLabelWidth: 100, + }, + y: { + valueFormatter: function(y) { + return 'yvf(' + y.toPrecision(2) + ')'; + }, + axisLabelFormatter: function(y: number) { + return 'yalf(' + y.toPrecision(2) + ')'; + }, + axisLabelWidth: 100, + }, + y2: { + valueFormatter: function(y2) { + return 'y2vf(' + y2.toPrecision(2) + ')'; + }, + axisLabelFormatter: function(y2: number) { + return 'y2alf(' + y2.toPrecision(2) + ')'; + } + } + } + }); +} + +function annotation() { +var eventDiv = document.getElementById("events"); + function nameAnnotation(ann: dygraphs.Annotation) { + return "(" + ann.series + ", " + ann.x + ")"; + } + + var annotations = [] as dygraphs.Annotation[]; + var graph_initialized = false; + + var g = new Dygraph( + document.getElementById("g_div"), + function() { + var zp = function(x: number) { if (x < 10) return "0"+x; else return ''+x; }; + var r = "date,parabola,line,another line,sine wave\n"; + for (var i=1; i<=31; i++) { + r += "200610" + zp(i); + r += "," + 10*(i*(31-i)); + r += "," + 10*(8*i); + r += "," + 10*(250 - 8*i); + r += "," + 10*(125 + 125 * Math.sin(0.3*i)); + r += "\n"; + } + return r; + }, + { + rollPeriod: 1, + showRoller: true, + width: 480, + height: 320, + drawCallback: function(g, is_initial) { + if (is_initial) { + graph_initialized = true; + if (annotations.length > 0) { + g.setAnnotations(annotations); + } + } + + var ann = g.annotations(); + var html = ""; + for (var i = 0; i < ann.length; i++) { + var name = nameAnnotation(ann[i]); + html += "" + html += name + ": " + (ann[i].shortText || '(icon)') + html += " -> " + ann[i].text + "
"; + } + document.getElementById("list").innerHTML = html; + } + } + ); + + var last_ann = 0; + for (var x = 10; x < 15; x += 2) { + annotations.push( { + series: 'sine wave', + x: "200610" + x, + shortText: '' + x, + text: 'Stock Market Crash ' + x + } ); + last_ann = x; + } + annotations.push( { + series: 'another line', + x: "20061013", + icon: 'dollar.png', + width: 18, + height: 23, + tickHeight: 4, + text: 'Another one', + cssClass: 'annotation', + clickHandler: function() { + document.getElementById("events").innerHTML += "special handler
"; + } + } ); + annotations.push( { + series: 'parabola', + x: '20061012', + shortText: 'P', + text: 'Parabola Annotation at same x-coord' + } ); + + if (graph_initialized) { + g.setAnnotations(annotations); + } + + function add() { + var x = last_ann + 2; + var annnotations = g.annotations(); + annotations.push({ + series: 'line', + x: "200610" + x, + shortText: ''+x, + text: 'Line ' + x, + tickHeight: 10 + } ); + last_ann = x; + g.setAnnotations(annotations); + } + + function bottom(el: HTMLInputElement) { + var to_bottom = true; + if (el.value != 'Shove to bottom') to_bottom = false; + + var anns = g.annotations(); + for (var i = 0; i < anns.length; i++) { + anns[i].attachAtBottom = to_bottom; + } + g.setAnnotations(anns); + + if (to_bottom) { + el.value = 'Lift back up'; + } else { + el.value = 'Shove to bottom'; + } + } + + var saveBg = ''; + var num = 0; + g.updateOptions( { + annotationClickHandler: function(ann, point, dg, event) { + eventDiv.innerHTML += "click: " + nameAnnotation(ann) + "
"; + }, + annotationDblClickHandler: function(ann, point, dg, event) { + eventDiv.innerHTML += "dblclick: " + nameAnnotation(ann) + "
"; + }, + annotationMouseOverHandler: function(ann, point, dg, event) { + document.getElementById(nameAnnotation(ann)).style.fontWeight = 'bold'; + saveBg = ann.div.style.backgroundColor; + ann.div.style.backgroundColor = '#ddd'; + }, + annotationMouseOutHandler: function(ann, point, dg, event) { + document.getElementById(nameAnnotation(ann)).style.fontWeight = 'normal'; + ann.div.style.backgroundColor = saveBg; + }, + + pointClickCallback: function(event, p) { + // Check if the point is already annotated. + if (p.annotation) return; + + // If not, add one. + var ann = { + series: p.name, + xval: p.xval, + shortText: '' + num, + text: "Annotation #" + num + }; + var anns = g.annotations(); + anns.push(ann); + g.setAnnotations(anns); + + num++; + } + }); +} diff --git a/dygraphs/dygraphs.d.ts b/dygraphs/dygraphs.d.ts new file mode 100644 index 0000000000..0fbb4fae74 --- /dev/null +++ b/dygraphs/dygraphs.d.ts @@ -0,0 +1,1270 @@ +// Type definitions for dygraphs 1.1.1 +// Project: http://dygraphs.com +// Definitions by: Dan Vanderkam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace dygraphs { + type DataArray = number[][]; + + type Data = string|DataArray|google.visualization.DataTable; + + interface PerSeriesOptions { + /** + * Set to either 'y1' or 'y2' to assign a series to a y-axis (primary or secondary). Must be + * set per-series. + */ + axis?: 'y1' | 'y2'; + + /** + * A per-series color definition. Used in conjunction with, and overrides, the colors option. + */ + color?: string; + + /** + * Draw a small dot at each point, in addition to a line going through the point. This makes + * the individual data points easier to see, but can increase visual clutter in the chart. + * The small dot can be replaced with a custom rendering by supplying a drawPointCallback. + */ + drawPoints?: boolean; + + /** + * Error bars (or custom bars) for each series are drawn in the same color as the series, but + * with partial transparency. This sets the transparency. A value of 0.0 means that the error + * bars will not be drawn, whereas a value of 1.0 means that the error bars will be as dark + * as the line for the series itself. This can be used to produce chart lines whose thickness + * varies at each point. + */ + fillAlpha?: number; + + /** + * Should the area underneath the graph be filled? This option is not compatible with error + * bars. This may be set on a per-series basis. + */ + fillGraph?: boolean; + + /** + * The size in pixels of the dot drawn over highlighted points. + */ + highlightCircleSize?: number; + + /** + * The size of the dot to draw on each point in pixels (see drawPoints). A dot is always + * drawn when a point is "isolated", i.e. there is a missing point on either side of it. This + * also controls the size of those dots. + */ + pointSize?: number; + + /** + * Mark this series for inclusion in the range selector. The mini plot curve will be an + * average of all such series. If this is not specified for any series, the default behavior + * is to average all the series. Setting it for one series will result in that series being + * charted alone in the range selector. + */ + showInRangeSelector?: boolean; + + /** + * When set, display the graph as a step plot instead of a line plot. This option may either + * be set for the whole graph or for single series. + */ + stepPlot?: boolean; + + /** + * Draw a border around graph lines to make crossing lines more easily distinguishable. + * Useful for graphs with many lines. + */ + strokeBorderWidth?: number; + + /** + * Color for the line border used if strokeBorderWidth is set. + */ + strokeBorderColor?: string; + + /** + * A custom pattern array where the even index is a draw and odd is a space in pixels. If + * null then it draws a solid line. The array should have a even length as any odd lengthed + * array could be expressed as a smaller even length array. This is used to create dashed + * lines. + */ + strokePattern?: number[]; + + /** + * The width of the lines connecting data points. This can be used to increase the contrast + * or some graphs. + */ + strokeWidth?: number; + } + + interface PerAxisOptions { + /** + * Color for x- and y-axis labels. This is a CSS color string. + */ + axisLabelColor?: string; + + /** + * Size of the font (in pixels) to use in the axis labels, both x- and y-axis. + */ + axisLabelFontSize?: number; + + /** + * Function to call to format the tick values that appear along an axis. This is usually set + * on a per-axis basis. + */ + axisLabelFormatter?: (v: number|Date, granularity: number, opts: (name: string) => any, dygraph: Dygraph) => any; + + /** + * Width (in pixels) of the containing divs for x- and y-axis labels. For the y-axis, this + * also controls the width of the y-axis. Note that for the x-axis, this is independent from + * pixelsPerLabel, which controls the spacing between labels. + */ + axisLabelWidth?: number; + + /** + * Color of the x- and y-axis lines. Accepts any value which the HTML canvas strokeStyle + * attribute understands, e.g. 'black' or 'rgb(0, 100, 255)'. + */ + axisLineColor?: string; + + /** + * Thickness (in pixels) of the x- and y-axis lines. + */ + axisLineWidth?: number; + + /** + * The size of the line to display next to each tick mark on x- or y-axes. + */ + axisTickSize?: number; + + /** + * Whether to draw the specified axis. This may be set on a per-axis basis to define the + * visibility of each axis separately. Setting this to false also prevents axis ticks from + * being drawn and reclaims the space for the chart grid/lines. + */ + drawAxis?: boolean; + + /** + * The color of the gridlines. This may be set on a per-axis basis to define each axis' grid + * separately. + */ + gridLineColor?: string; + + /** + * A custom pattern array where the even index is a draw and odd is a space in pixels. If + * null then it draws a solid line. The array should have a even length as any odd lengthed + * array could be expressed as a smaller even length array. This is used to create dashed + * gridlines. + */ + gridLinePattern?: number[]; + + /** + * Thickness (in pixels) of the gridlines drawn under the chart. The vertical/horizontal + * gridlines can be turned off entirely by using the drawXGrid and drawYGrid options. This + * may be set on a per-axis basis to define each axis' grid separately. + */ + gridLineWidth?: number; + + /** + * Only valid for y and y2, has no effect on x: This option defines whether the y axes should + * align their ticks or if they should be independent. Possible combinations: 1.) y=true, + * y2=false (default): y is the primary axis and the y2 ticks are aligned to the the ones of + * y. (only 1 grid) 2.) y=false, y2=true: y2 is the primary axis and the y ticks are aligned + * to the the ones of y2. (only 1 grid) 3.) y=true, y2=true: Both axis are independent and + * have their own ticks. (2 grids) 4.) y=false, y2=false: Invalid configuration causes an + * error. + */ + independentTicks?: boolean; + + /** + * When set for the y-axis or x-axis, the graph shows that axis in log scale. Any values less + * than or equal to zero are not displayed. Showing log scale with ranges that go below zero + * will result in an unviewable graph. + * + * Not compatible with showZero. connectSeparatedPoints is ignored. This is ignored for + * date-based x-axes. + */ + logscale?: boolean; + + /** + * When displaying numbers in normal (not scientific) mode, large numbers will be displayed + * with many trailing zeros (e.g. 100000000 instead of 1e9). This can lead to unwieldy y-axis + * labels. If there are more than maxNumberWidth digits to the left of the + * decimal in a number, dygraphs will switch to scientific notation, even when not operating + * in scientific mode. If you'd like to see all those digits, set this to something large, + * like 20 or 30. + */ + maxNumberWidth?: number; + + /** + * Number of pixels to require between each x- and y-label. Larger values will yield a + * sparser axis with fewer ticks. This is set on a per-axis + * basis. + */ + pixelsPerLabel?: number; + + /** + * By default, dygraphs displays numbers with a fixed number of digits after the decimal + * point. If you'd prefer to have a fixed number of significant figures, set this option to + * that number of sig figs. A value of 2, for instance, would cause 1 to be display as 1.0 + * and 1234 to be displayed as 1.23e+3. + */ + sigFigs?: number; + + /** + * This lets you specify an arbitrary function to generate tick marks on an axis. The tick + * marks are an array of (value, label) pairs. The built-in functions go to great lengths to + * choose good tick marks so, if you set this option, you'll most likely want to call one of + * them and modify the result. See dygraph-tickers.js for an extensive discussion. This is + * set on a per-axis basis. + */ + ticker?: ( + min: number, + max: number, + pixels: number, + opts: (name: string) => any, + dygraph: Dygraph, + vals: number[]) => Array<{v: number, label: string}>; + + + /** + * Function to provide a custom display format for the values displayed on mouseover. This + * does not affect the values that appear on tick marks next to the axes. To format those, + * see axisLabelFormatter. This is usually set on a per-axis + * basis. + */ + valueFormatter?: ( + v: number, + opts: (name: string) => any, + seriesName: string, + dygraph: Dygraph, + row: number, + col: number) => any; + + /** + * Explicitly set the vertical range of the graph to [low, high]. This may be set on a + * per-axis basis to define each y-axis separately. If either limit is unspecified, it will + * be calculated automatically (e.g. [null, 30] to automatically calculate just the lower + * bound) + */ + valueRange?: number[]; + + /** + * Whether to display gridlines in the chart. This may be set on a per-axis basis to define + * the visibility of each axis' grid separately. + */ + drawGrid?: boolean; + + /** + * Show K/M/B for thousands/millions/billions on y-axis. + */ + labelsKMB?: boolean; + + /** + * Show k/M/G for kilo/Mega/Giga on y-axis. This is different than labelsKMB in + * that it uses base 2, not 10. + */ + labelsKMG2?: boolean; + } + + interface Options extends PerSeriesOptions, PerAxisOptions { + /** + * Set this option to animate the transition between zoom windows. Applies to programmatic + * and interactive zooms. Note that if you also set a drawCallback, it will be called several + * times on each zoom. If you set a zoomCallback, it will only be called after the animation + * is complete. + */ + animatedZooms?: boolean + + /** + * If provided, this function is called whenever the user clicks on an annotation. + */ + annotationClickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** + * If provided, this function is called whenever the user double-clicks on an annotation. + */ + annotationDblClickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** + * If provided, this function is called whenever the user mouses out of an annotation. + */ + annotationMouseOutHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** + * If provided, this function is called whenever the user mouses over an annotation. + */ + annotationMouseOverHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** + * Defines per-axis options. Valid keys are 'x', 'y' and 'y2'. Only some options may be set + * on a per-axis basis. If an option may be set in this way, it will be noted on this page. + * See also documentation on per-series and + * per-axis options. + */ + axes?: { + x?: PerAxisOptions; + y?: PerAxisOptions; + y2?: PerAxisOptions; + }; + + /** + * A function to call when the canvas is clicked. + */ + clickCallback?: (e: MouseEvent, xval: number, points: Point[]) => any; + + /** + * If colors is not specified, saturation of the automatically-generated + * data series colors. (0.0-1.0). + */ + colorSaturation?: number; + + /** + * If colors is not specified, value of the data series colors, as in hue/saturation/value. + * (0.0-1.0, default 0.5) + */ + colorValue?: number; + + /** + * List of colors for the data series. These can be of the form "#AABBCC" or + * "rgb(255,100,200)" or "yellow", etc. If not specified, equally-spaced points around a + * color wheel are used. Overridden by the 'color' option. + */ + colors?: string[]; + + /** + * Usually, when Dygraphs encounters a missing value in a data series, it interprets this as + * a gap and draws it as such. If, instead, the missing values represents an x-value for + * which only a different series has data, then you'll want to connect the dots by setting + * this to true. To explicitly include a gap with this option set, use a value of NaN. + */ + connectSeparatedPoints?: boolean; + + /** + * When set, parse each CSV cell as "low;middle;high". Error bars will be drawn for each + * point between low and high, with the series itself going through middle. + */ + customBars?: boolean + + /** + * Custom DataHandler. This is an advanced customization. See http://bit.ly/151E7Aq. + */ + dataHandler?: any; + + /** + * Initially zoom in on a section of the graph. Is of the form [earliest, latest], where + * earliest/latest are milliseconds since epoch. If the data for the x-axis is numeric, the + * values in dateWindow must also be numbers. + */ + dateWindow?: number[]; + + /** + * The delimiter to look for when separating fields of a CSV file. Setting this to a tab is + * not usually necessary, since tab-delimited data is auto-detected. + */ + delimiter?: string; + + /** + * Unless it's run in scientific mode (see the sigFigs option), dygraphs + * displays numbers with digitsAfterDecimal digits after the decimal point. + * Trailing zeros are not displayed, so with a value of 2 you'll get '0', '0.1', '0.12', + * '123.45' but not '123.456' (it will be rounded to '123.46'). Numbers with absolute value + * less than 0.1^digitsAfterDecimal (i.e. those which would show up as '0.00') will be + * displayed in scientific notation. + */ + digitsAfterDecimal?: number; + + /** + * Only applies when Dygraphs is used as a GViz chart. Causes string columns following a data + * series to be interpreted as annotations on points in that series. This is the same format + * used by Google's AnnotatedTimeLine chart. + */ + displayAnnotations?: boolean; + + /** + * When set, draw the X axis at the Y=0 position and the Y axis at the X=0 position if those + * positions are inside the graph's visible area. Otherwise, draw the axes at the bottom or + * left graph edge as usual. + */ + drawAxesAtZero?: boolean; + + /** + * When set, this callback gets called every time the dygraph is drawn. This includes the + * initial draw, after zooming and repeatedly while panning. + */ + drawCallback?: (dygraph: Dygraph, is_initial: boolean) => any; + + /** + * Draw points at the edges of gaps in the data. This improves visibility of small data + * segments or other data irregularities. + */ + drawGapEdgePoints?: boolean; + + /** + * Draw a custom item when a point is highlighted. Default is a small dot matching the + * series color. This method should constrain drawing to within pointSize pixels from (cx, + * cy) Also see drawPointCallback + */ + drawHighlightPointCallback?: ( + g: Dygraph, + seriesName: string, + canvasContext: CanvasRenderingContext2D, + cx: number, + cy: number, + color: string, + pointSize: number) => any; + + /** + * Draw a custom item when drawPoints is enabled. Default is a small dot matching the series + * color. This method should constrain drawing to within pointSize pixels from (cx, cy). + * Also see drawHighlightPointCallback + */ + drawPointCallback?: ( + g: Dygraph, + seriesName: string, + canvasContext: CanvasRenderingContext2D, + cx: number, + cy: number, + color: string, + pointSize: number) => any; + + /** + * Does the data contain standard deviations? Setting this to true alters the input format. + */ + errorBars?: boolean; + + /** + * Sets the data being displayed in the chart. This can only be set when calling + * updateOptions; it cannot be set from the constructor. For a full description of valid data + * formats, see the Data Formats page. + */ + file?: Data; + + /** + * When set, attempt to parse each cell in the CSV file as "a/b", where a and b are integers. + * The ratio will be plotted. This allows computation of Wilson confidence intervals (see + * below). + */ + fractions?: boolean; + + /** + * Height, in pixels, of the chart. If the container div has been explicitly sized, this will + * be ignored. + */ + height?: number; + + /** + * Whether to hide the legend when the mouse leaves the chart area. + */ + hideOverlayOnMouseOut?: boolean; + + /** + * When set, this callback gets called every time a new point is highlighted. + */ + highlightCallback?: ( + event: MouseEvent, + xval: number, + points: Point[], + row: number, + seriesName: string) => any; + + /** + * Fade the background while highlighting series. 1=fully visible background (disable + * fading), 0=hiddden background (show highlighted series only). + */ + highlightSeriesBackgroundAlpha?: number; + + /** + * When set, the options from this object are applied to the timeseries closest to the mouse + * pointer for interactive highlighting. See also 'highlightCallback'. Example: + * highlightSeriesOpts: { strokeWidth: 3 }. + */ + highlightSeriesOpts?: PerSeriesOptions; + + /** + * Usually, dygraphs will use the range of the data plus some padding to set the range of the + * y-axis. If this option is set, the y-axis will always include zero, typically as the + * lowest value. This can be used to avoid exaggerating the variance in the data + */ + includeZero?: boolean; + + interactionModel?: any; + + /** + * When this option is passed to updateOptions() along with either the + * dateWindow or valueRange options, the zoom flags are not changed + * to reflect a zoomed state. This is primarily useful for when the display area of a chart + * is changed programmatically and also where manual zooming is allowed and use is made of + * the isZoomed method to determine this. + */ + isZoomedIgnoreProgrammaticZoom?: boolean; + + /** + * A name for each data series, including the independent (X) series. For CSV files and + * DataTable objections, this is determined by context. For raw data, this must be specified. + * If it is not, default values are supplied and a warning is logged. + */ + labels?: string[]; + + /** + * Show data labels in an external div, rather than on the graph. This value can either be a + * div element or a div id. + */ + labelsDiv?: string|HTMLElement; + + /** + * Additional styles to apply to the currently-highlighted points div. For example, { + * 'fontWeight': 'bold' } will make the labels bold. In general, it is better to use CSS to + * style the .dygraph-legend class than to use this property. + */ + labelsDivStyles?: {[cssProperty: string]: string}; + + /** + * Width (in pixels) of the div which shows information on the currently-highlighted points. + */ + labelsDivWidth?: number; + + /** + * Put <br/> between lines in the label string. Often used in conjunction + * with labelsDiv. + */ + labelsSeparateLines?: boolean; + + /** + * Show zero value labels in the labelsDiv. + */ + labelsShowZeroValues?: boolean; + + /** + * Show date/time labels according to UTC (instead of local time). + */ + labelsUTC?: boolean; + + /** + * When to display the legend. By default, it only appears when a user mouses over the chart. + * Set it to "always" to always display a legend of some sort. When set to "follow", legend + * follows highlighted points. + */ + legend?: 'always' | 'follow' | 'onmouseover'; + + /** + * A value representing the farthest a graph may be panned, in percent of the display. For + * example, a value of 0.1 means that the graph can only be panned 10% pased the edges of the + * displayed values. null means no bounds. + */ + panEdgeFraction?: number; + + /** + * A function (or array of functions) which plot each data series on the chart. + * TODO(danvk): more details! May be set per-series. + */ + plotter?: any; + + /** + * Defines per-graph plugins. Useful for per-graph customization + */ + plugins?: any[]; + + /** + * A function to call when a data point is clicked. and the point that was clicked. + */ + pointClickCallback?: (e: MouseEvent, point: Point) => any; + + /** + * Height, in pixels, of the range selector widget. This option can only be specified at + * Dygraph creation time. + */ + rangeSelectorHeight?: number; + + /** + * The range selector mini plot fill color. This can be of the form "#AABBCC" or + * "rgb(255,100,200)" or "yellow". You can also specify null or "" to turn off fill. + */ + rangeSelectorPlotFillColor?: string; + + /** + * The range selector mini plot stroke color. This can be of the form "#AABBCC" or + * "rgb(255,100,200)" or "yellow". You can also specify null or "" to turn off stroke. + */ + rangeSelectorPlotStrokeColor?: string; + + /** + * Number of pixels to leave blank at the right edge of the Dygraph. This makes it easier to + * highlight the right-most data point. + */ + rightGap?: number; + + /** + * Number of days over which to average data. Discussed extensively above. + */ + rollPeriod?: number; + + /** + * Defines per-series options. Its keys match the y-axis label names, and the values are + * dictionaries themselves that contain options specific to that series. When this option is + * missing, it falls back on the old-style of per-series options comingled with global + * options. + */ + series?: { + [seriesName: string]: PerSeriesOptions + }; + + /** + * Whether to show the legend upon mouseover. + */ + showLabelsOnHighlight?: boolean; + + /** + * Show or hide the range selector widget. + */ + showRangeSelector?: boolean; + + /** + * If the rolling average period text box should be shown. + */ + showRoller?: boolean; + + /** + * When errorBars is set, shade this many standard deviations above/below each point. + */ + sigma?: number; + + /** + * If set, stack series on top of one another rather than drawing them independently. The + * first series specified in the input data will wind up on top of the chart and the last + * will be on bottom. NaN values are drawn as white areas without a line on top, see + * stackedGraphNaNFill for details. + */ + stackedGraph?: boolean; + + /** + * Controls handling of NaN values inside a stacked graph. NaN values are + * interpolated/extended for stacking purposes, but the actual point value remains NaN in the + * legend display. Valid option values are "all" (interpolate internally, repeat leftmost and + * rightmost value as needed), "inside" (interpolate internally only, use zero outside + * leftmost and rightmost value), and "none" (treat NaN as zero everywhere). + */ + stackedGraphNaNFill?: string; + + /** + * Text to display above the chart. You can supply any HTML for this value, not just text. If + * you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-title' classes. + */ + title?: string; + + /** + * Height of the chart title, in pixels. This also controls the default font size of the + * title. If you style the title on your own, this controls how much space is set aside above + * the chart for the title's div. + */ + titleHeight?: number; + + /** + * When set, this callback gets called before the chart is drawn. It details on how to use + * this. + */ + underlayCallback?: (context: CanvasRenderingContext2D, area: dygraphs.Area, dygraph: Dygraph) => any; + + /** + * When set, this callback gets called every time the user stops highlighting any point by + * mousing out of the graph. + */ + unhighlightCallback?: (event: MouseEvent) => any; + + /** + * Which series should initially be visible? Once the Dygraph has been constructed, you can + * access and modify the visibility of each series using the visibility and + * setVisibility methods. + */ + visibility?: boolean[]; + + /** + * Width, in pixels, of the chart. If the container div has been explicitly sized, this will + * be ignored. + */ + width?: number; + + /** + * Use in conjunction with the "fractions" option. Instead of plotting +/- N standard + * deviations, dygraphs will compute a Wilson confidence interval and plot that. This has + * more reasonable behavior for ratios close to 0 or 1. + */ + wilsonInterval?: boolean; + + /** + * Height, in pixels, of the x-axis. If not set explicitly, this is computed based on + * axisLabelFontSize and axisTickSize. + */ + xAxisHeight?: number; + + /** + * Height of the x-axis label, in pixels. This also controls the default font size of the + * x-axis label. If you style the label on your own, this controls how much space is set + * aside below the chart for the x-axis label's div. + */ + xLabelHeight?: number; + + /** + * Add the specified amount of extra space (in pixels) around the X-axis value range to + * ensure points at the edges remain visible. + */ + xRangePad?: number; + + /** + * A function which parses x-values (i.e. the dependent series). Must return a number, even + * when the values are dates. In this case, millis since epoch are used. This is used + * primarily for parsing CSV data. *=Dygraphs is slightly more accepting in the dates which + * it will parse. See code for details. + */ + xValueParser?: (val: string) => number; + + /** + * Text to display below the chart's x-axis. You can supply any HTML for this value, not just + * text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-xlabel' + * classes. + */ + xlabel?: string; + + /** + * Text to display to the right of the chart's secondary y-axis. This label is only displayed + * if a secondary y-axis is present. See this test for an example of how to do + * this. The comments for the 'ylabel' option generally apply here as well. This label gets a + * 'dygraph-y2label' instead of a 'dygraph-ylabel' class. + */ + y2label?: string; + + /** + * Width of the div which contains the y-axis label. Since the y-axis label appears rotated + * 90 degrees, this actually affects the height of its div. + */ + yLabelWidth?: number; + + /** + * If set, add the specified amount of extra space (in pixels) around the Y-axis value range + * to ensure points at the edges remain visible. If unset, use the traditional Y padding + * algorithm. + */ + yRangePad?: number; + + /** + * Text to display to the left of the chart's y-axis. You can supply any HTML for this value, + * not just text. If you wish to style it using CSS, use the 'dygraph-label' or + * 'dygraph-ylabel' classes. The text will be rotated 90 degrees by default, so CSS rules may + * behave in unintuitive ways. No additional space is set aside for a y-axis label. If you + * need more space, increase the width of the y-axis tick labels using the yAxisLabelWidth + * option. If you need a wider div for the y-axis label, either style it that way with CSS + * (but remember that it's rotated, so width is controlled by the 'height' property) or set + * the yLabelWidth option. + */ + ylabel?: string; + + /** + * A function to call when the zoom window is changed (either by zooming in or out). + */ + zoomCallback?: (minDate: number, maxDate: number, yRanges: [number, number][]) => any; + } + + interface SeriesProperties { + name: string; + column: number; + visible: boolean; + color: string; + axis: number; + } + + interface Area { + x: number; + y: number; + w: number; + h: number; + } + + /** + * Point structure. + * + * xval_* and yval_* are the original unscaled data values, + * while x_* and y_* are scaled to the range (0.0-1.0) for plotting. + * yval_stacked is the cumulative Y value used for stacking graphs, + * and bottom/top/minus/plus are used for error bar graphs. + */ + interface Point { + idx: number; + name: string; + x?: number; + xval?: number; + y_bottom?: number; + y?: number; + y_stacked?: number; + y_top?: number; + yval_minus?: number; + yval?: number; + yval_plus?: number; + yval_stacked?: number; + annotation?: dygraphs.Annotation; + } + + interface Annotation { + /** The name of the series to which the annotated point belongs. */ + series: string; + + /** + * The x value of the point. This should be the same as the value + * you specified in your CSV file, e.g. "2010-09-13". + * You must set either x or xval. + */ + x?: number|string; + + /** + * numeric value of the point, or millis since epoch. + */ + xval?: number; + + /** Text that will appear on the annotation's flag. */ + shortText?: string; + + /** A longer description of the annotation which will appear when the user hovers over it. */ + text?: string; + + /** + * Specify in place of shortText to mark the annotation with an image rather than text. + * If you specify this, you must specify width and height. + */ + icon?: string; + + /** Width (in pixels) of the annotation flag or icon. */ + width?: number; + /** Height (in pixels) of the annotation flag or icon. */ + height?: number; + + /** CSS class to use for styling the annotation. */ + cssClass?: string; + + /** Height of the tick mark (in pixels) connecting the point to its flag or icon. */ + tickHeight?: number; + + /** If true, attach annotations to the x-axis, rather than to actual points. */ + attachAtBottom?: boolean; + + div?: HTMLDivElement; + + /** This function is called whenever the user clicks on this annotation. */ + clickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** This function is called whenever the user mouses over this annotation. */ + mouseOverHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** This function is called whenever the user mouses out of this annotation. */ + mouseOutHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + + /** this function is called whenever the user double-clicks on this annotation. */ + dblClickHandler?: (annotation: dygraphs.Annotation, point: Point, dygraph: Dygraph, event: MouseEvent) => any; + } + + type Axis = 'x' | 'y' | 'y2'; +} + +declare class Dygraph { + constructor( + container: HTMLElement | string, + data: dygraphs.Data|(()=>dygraphs.Data), + options?: dygraphs.Options); + + /** + * Returns the zoomed status of the chart for one or both axes. + * + * Axis is an optional parameter. Can be set to 'x' or 'y'. + * + * The zoomed status for an axis is set whenever a user zooms using the mouse + * or when the dateWindow or valueRange are updated (unless the + * isZoomedIgnoreProgrammaticZoom option is also specified). + */ + isZoomed(axis?: 'x' | 'y'): boolean; + + /** + * Returns information about the Dygraph object, including its containing ID. + */ + toString(): string; + + /** + * Returns the current value for an option, as set in the constructor or via + * updateOptions. You may pass in an (optional) series name to get per-series + * values for the option. + * + * All values returned by this method should be considered immutable. If you + * modify them, there is no guarantee that the changes will be honored or that + * dygraphs will remain in a consistent state. If you want to modify an option, + * use updateOptions() instead. + * + * @param {string} name The name of the option (e.g. 'strokeWidth') + * @param {string=} opt_seriesName Series name to get per-series values. + * @return {*} The value of the option. + */ + getOption(name: string, seriesName?: string): any; + + /** + * Get the value of an option on a per-axis basis. + */ + getOptionForAxis(name: string, axis: dygraphs.Axis): any; + + /** + * Returns the current rolling period, as set by the user or an option. + */ + rollPeriod(): number; + + /** + * Returns the currently-visible x-range. This can be affected by zooming, + * panning or a call to updateOptions. + * Returns a two-element array: [left, right]. + * If the Dygraph has dates on the x-axis, these will be millis since epoch. + */ + xAxisRange(): [number, number]; + + /** + * Returns the lower- and upper-bound x-axis values of the data set. + */ + xAxisExtremes(): [number, number]; + + /** + * Returns the currently-visible y-range for an axis. This can be affected by + * zooming, panning or a call to updateOptions. Axis indices are zero-based. If + * called with no arguments, returns the range of the first axis. + * Returns a two-element array: [bottom, top]. + */ + yAxisRange(idx?: number): [number, number]; + + /** + * Returns the currently-visible y-ranges for each axis. This can be affected by + * zooming, panning, calls to updateOptions, etc. + * Returns an array of [bottom, top] pairs, one for each y-axis. + */ + yAxisRanges(): [number, number][]; + + /** + * Convert from data coordinates to canvas/div X/Y coordinates. + * If specified, do this conversion for the coordinate system of a particular + * axis. Uses the first axis by default. + * Returns a two-element array: [X, Y] + * + * Note: use toDomXCoord instead of toDomCoords(x, null) and use toDomYCoord + * instead of toDomCoords(null, y, axis). + */ + toDomCoords(x: number, y: number, axis?: number): [number, number]; + + /** + * Convert from data x coordinates to canvas/div X coordinate. + * If specified, do this conversion for the coordinate system of a particular + * axis. + * Returns a single value or null if x is null. + */ + toDomXCoord(x: number): number; + + /** + * Convert from data y coordinates to canvas/div Y coordinate and optional + * axis. Uses the first axis by default. + * + * returns a single value or null if y is null. + */ + toDomYCoord(y: number, axis?: number): number; + + /** + * Convert from canvas/div coords to data coordinates. + * If specified, do this conversion for the coordinate system of a particular + * axis. Uses the first axis by default. + * Returns a two-element array: [X, Y]. + * + * Note: use toDataXCoord instead of toDataCoords(x, null) and use toDataYCoord + * instead of toDataCoords(null, y, axis). + */ + toDataCoords(x: number, y: number, axis?: number): [number, number]; + + /** + * Convert from canvas/div x coordinate to data coordinate. + * + * If x is null, this returns null. + */ + toDataXCoord(x: number): number; + + /** + * Convert from canvas/div y coord to value. + * + * If y is null, this returns null. + * if axis is null, this uses the first axis. + */ + toDataYCoord(y: number, axis?: number): number; + + /** + * Converts a y for an axis to a percentage from the top to the + * bottom of the drawing area. + * + * If the coordinate represents a value visible on the canvas, then + * the value will be between 0 and 1, where 0 is the top of the canvas. + * However, this method will return values outside the range, as + * values can fall outside the canvas. + * + * If y is null, this returns null. + * if axis is null, this uses the first axis. + * + * @param {number} y The data y-coordinate. + * @param {number} [axis] The axis number on which the data coordinate lives. + * @return {number} A fraction in [0, 1] where 0 = the top edge. + */ + toPercentYCoord(y: number, axis?: number): number; + + /** + * Converts an x value to a percentage from the left to the right of + * the drawing area. + * + * If the coordinate represents a value visible on the canvas, then + * the value will be between 0 and 1, where 0 is the left of the canvas. + * However, this method will return values outside the range, as + * values can fall outside the canvas. + * + * If x is null, this returns null. + * @param {number} x The data x-coordinate. + * @return {number} A fraction in [0, 1] where 0 = the left edge. + */ + toPercentXCoord(x: number): number; + + /** + * Returns the number of columns (including the independent variable). + */ + numColumns(): number; + + /** + * Returns the number of rows (excluding any header/label row). + */ + numRows(): number; + + /** + * Returns the value in the given row and column. If the row and column exceed + * the bounds on the data, returns null. Also returns null if the value is + * missing. + * @param {number} row The row number of the data (0-based). Row 0 is the + * first row of data, not a header row. + * @param {number} col The column number of the data (0-based) + * @return {number} The value in the specified cell or null if the row/col + * were out of range. + */ + getValue(row: number, col: number): number; + + /** + * Detach DOM elements in the dygraph and null out all data references. + * Calling this when you're done with a dygraph can dramatically reduce memory + * usage. See, e.g., the tests/perf.html example. + */ + destroy(): void; + + /** + * Return the list of colors. This is either the list of colors passed in the + * attributes or the autogenerated list of rgb(r,g,b) strings. + * This does not return colors for invisible series. + * @return {Array.} The list of colors. + */ + getColors(): string[]; + + /** + * Returns a few attributes of a series, i.e. its color, its visibility, which + * axis it's assigned to, and its column in the original data. + * Returns null if the series does not exist. + * Otherwise, returns an object with column, visibility, color and axis properties. + * The "axis" property will be set to 1 for y1 and 2 for y2. + * The "column" property can be fed back into getValue(row, column) to get + * values for this series. + */ + getPropertiesForSeries(series_name: string): dygraphs.SeriesProperties; + + /** + * Reset the zoom to the original view coordinates. This is the same as + * double-clicking on the graph. + */ + resetZoom(): void; + + /** + * Get the current graph's area object. + */ + getArea(): dygraphs.Area; + + /** + * Convert a mouse event to DOM coordinates relative to the graph origin. + * + * Returns a two-element array: [X, Y]. + */ + eventToDomCoords(event: MouseEvent): [number, number]; + + /** + * Manually set the selected points and display information about them in the + * legend. The selection can be cleared using clearSelection() and queried + * using getSelection(). + * @param {number} row Row number that should be highlighted (i.e. appear with + * hover dots on the chart). + * @param {seriesName} optional series name to highlight that series with the + * the highlightSeriesOpts setting. + * @param { locked } optional If true, keep seriesName selected when mousing + * over the graph, disabling closest-series highlighting. Call clearSelection() + * to unlock it. + */ + setSelection(row: number|boolean, seriesName?: string, locked?: boolean): void; + + /** + * Clears the current selection (i.e. points that were highlighted by moving + * the mouse over the chart). + */ + clearSelection(): void; + + /** + * Returns the number of the currently selected row. To get data for this row, + * you can use the getValue method. + * @return {number} row number, or -1 if nothing is selected + */ + getSelection(): number; + + /** + * Returns the name of the currently-highlighted series. + * Only available when the highlightSeriesOpts option is in use. + */ + getHighlightSeries(): string; + + /** + * Returns true if the currently-highlighted series was locked + * via setSelection(..., seriesName, true). + */ + isSeriesLocked(): boolean; + + /** + * Returns the number of y-axes on the chart. + */ + numAxes(): number; + + /** + * Changes various properties of the graph. These can include: + *
    + *
  • file: changes the source data for the graph
  • + *
  • errorBars: changes whether the data contains stddev
  • + *
+ * + * There's a huge variety of options that can be passed to this method. For a + * full list, see http://dygraphs.com/options.html. + * + * @param {Object} input_attrs The new properties and values + * @param {boolean} block_redraw Usually the chart is redrawn after every + * call to updateOptions(). If you know better, you can pass true to + * explicitly block the redraw. This can be useful for chaining + * updateOptions() calls, avoiding the occasional infinite loop and + * preventing redraws when it's not necessary (e.g. when updating a + * callback). + */ + updateOptions(input_attrs: dygraphs.Options, block_redraw?: boolean): void; + + /** + * Resizes the dygraph. If no parameters are specified, resizes to fill the + * containing div (which has presumably changed size since the dygraph was + * instantiated. If the width/height are specified, the div will be resized. + * + * This is far more efficient than destroying and re-instantiating a + * Dygraph, since it doesn't have to reparse the underlying data. + * + * @param {number} width Width (in pixels) + * @param {number} height Height (in pixels) + */ + resize(width: number, height: number): void; + + /** + * Adjusts the number of points in the rolling average. Updates the graph to + * reflect the new averaging period. + * @param {number} length Number of points over which to average the data. + */ + adjustRoll(length: number): void; + + /** + * Returns a boolean array of visibility statuses. + */ + visibility(): boolean[]; + + /** + * Changes the visiblity of a series. + * + * @param {number} num the series index + * @param {boolean} value true or false, identifying the visibility. + */ + setVisibility(num: number, value: boolean): void; + + /** + * Update the list of annotations and redraw the chart. + * See dygraphs.com/annotations.html for more info on how to use annotations. + * @param ann {Array} An array of annotation objects. + * @param suppressDraw {Boolean} Set to "true" to block chart redraw (optional). + */ + setAnnotations(ann: dygraphs.Annotation[], suppressDraw?: boolean): void; + + /** + * Return the list of annotations. + */ + annotations(): dygraphs.Annotation[]; + + /** + * Get the list of label names for this graph. The first column is the + * x-axis, so the data series names start at index 1. + * + * Returns null when labels have not yet been defined. + */ + getLabels(): string[]; + + /** + * Get the index of a series (column) given its name. The first column is the + * x-axis, so the data series start with index 1. + */ + indexFromSetName(name: string): number; + + /** + * Trigger a callback when the dygraph has drawn itself and is ready to be + * manipulated. This is primarily useful when dygraphs has to do an XHR for the + * data (i.e. a URL is passed as the data source) and the chart is drawn + * asynchronously. If the chart has already drawn, the callback will fire + * immediately. + * + * This is a good place to call setAnnotations(). + */ + ready(callback: (g: Dygraph) => any): void; + + // Tick granularities (passed to ticker). + static SECONDLY: number; + static TWO_SECONDLY: number; + static FIVE_SECONDLY: number; + static TEN_SECONDLY: number; + static THIRTY_SECONDLY: number; + static MINUTELY: number; + static TWO_MINUTELY: number; + static FIVE_MINUTELY: number; + static TEN_MINUTELY: number; + static THIRTY_MINUTELY: number; + static HOURLY: number; + static TWO_HOURLY: number; + static SIX_HOURLY: number; + static DAILY: number; + static TWO_DAILY: number; + static WEEKLY: number; + static MONTHLY: number; + static QUARTERLY: number; + static BIANNUAL: number; + static ANNUAL: number; + static DECADAL: number; + static CENTENNIAL: number; + static NUM_GRANULARITIES: number; + + static defaultInteractionModel: any; + + static DOTTED_LINE: number[]; + static DASHED_LINE: number[]; + static DOT_DASH_LINE: number[]; + + static Plotters: { + errorPlotter: any; + linePlotter: any; + fillPlotter: any; + } +} + +declare module "dygraphs" { + export = Dygraph; +} \ No newline at end of file diff --git a/easeljs/easeljs.d.ts b/easeljs/easeljs.d.ts index 3ddeabdef9..ab8cd5a0e1 100644 --- a/easeljs/easeljs.d.ts +++ b/easeljs/easeljs.d.ts @@ -650,6 +650,7 @@ declare namespace createjs { autoReset: boolean; static buildDate: string; currentFrame: number; + totalFrames: number; currentLabel: string; frameBounds: Rectangle[]; framerate: number; @@ -662,6 +663,7 @@ declare namespace createjs { startPosition: number; static SYNCHED: string; timeline: Timeline; + duration: number; static version: string; // methods diff --git a/ej.web.all/ej.web.all-tests.ts b/ej.web.all/ej.web.all-tests.ts new file mode 100644 index 0000000000..6b3ac0d3e2 --- /dev/null +++ b/ej.web.all/ej.web.all-tests.ts @@ -0,0 +1,3193 @@ +/// +/// + + + +module AccordionComponent { + $(function () { + var sample = new ej.Accordion($("#basicAccordion"), { + width: "100%", + allowKeyboardNavigation: true, + collapseSpeed: 500, + collapsible: true, + enableAnimation: true, + enableMultipleOpen: true, + events: "click", + expandSpeed: 500, + headerSize: "40px", + height: "500px", + heightAdjustMode: ej.Accordion.HeightAdjustMode.Auto, + htmlAttributes: { title: "Demo" }, + selectedItemIndex: 1, + showCloseButton: true, + showRoundedCorner: true + }); + }); +} + + + +module AutocompleteComponent{ + var carList = [ + "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", + "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", + "Chevrolet Camaro", "Cadillac", + "Duesenberg J", "Dodge Sprinter", + "Elantra", "Excavator", + "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", + "GAZ Siber", + "Honda S2000", "Hyundai Santro", + "Isuzu Swift", "Infiniti Skyline", + "Jaguar XJS", + "Kia Sedona EX", "Koenigsegg Agera", + "Lotus Esprit", "Lamborghini Diablo", + "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", + "Nissan Qashqai", + "Oldsmobile S98", "Opel Superboss", + "Porsche 356", "Pontiac Sunbird", + "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", + "Triumph Spitfire", "Toyota 2000GT", + "Volvo P1800", "Volkswagen Shirako" + ]; + $(function () { + var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { + width: "100%", + watermarkText: "Select a car", + dataSource: carList, + enableAutoFill: true, + showPopupButton: true, + multiSelectMode: "delimiter" + }); + }); +} + + + + + +module Barcodecomponent { + $(function () { + var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { + text:"http://www.syncfusion.com" + }); + }); +} + + + + + +module Bulletgraphcomponent { + $(function () { + var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { + isResponsive: true, + tooltipSettings: { visible: true }, + quantitativeScaleSettings: { + featureMeasures: [{ + value: 8, comparativeMeasureValue:6.7 + }] + }, + qualitativeRanges: [{ + rangeEnd: 4.3, rangeStroke:"#ebebeb", + }, + { + rangeEnd: 7.3, rangeStroke:"#d8d8d8" + }, + { + rangeEnd: 10, rangeStroke: "#7f7f7f" + } + ], + captionSettings: { + textPosition: 'right', text: 'Revenue YTD', + subTitle: { + text: "$ in Thousands", textPosition:"right" + } + } + }); + }); +} + + + + + +module ButtonComponent { + $(function () { + var basicButton = new ej.Button($("#buttonnormal"), { + size: "large", + showRoundedCorner: true, + contentType: "textandimage", + prefixIcon: "e-icon e-save", + text: "Save" + }); + var toggleButton = new ej.ToggleButton($("#TextOnly"), { + showRoundedCorner: true, + size: "large", + contentType: "textandimage", + defaultPrefixIcon: "e-icon e-save", + activePrefixIcon: "e-icon e-delete", + defaultText: "Save", + activeText: "Delete" + }); + var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { + showRoundedCorner: true, + size: "large", + prefixIcon: "e-icon e-file-empty", + targetID: "menu1", + contentType: "textandimage", + text: "File" + }); + var groupButton = new ej.GroupButton($("#groupButton"), { + showRoundedCorner: true, + size: "large" + }); + var check1 = new ej.CheckBox($("#check1"), { + size: "medium", enableTriState: true + }); + var check2 = new ej.CheckBox($("#check2"), { + size: "medium", enableTriState: true + }); + var radio1 = new ej.RadioButton($("#radio1"), { + size: "medium" + }); + var radio2 = new ej.RadioButton($("#radio2"), { + size: "medium", checked: true + }); + }); +} + + + + +module ChartComponent { + $(function () { + var chartsample = new ej.datavisualization.Chart($("#Chart"), { + primaryXAxis: { + range: { min: 2005, max: 2011, interval: 1 }, + title: { text: "Year" }, + valueType: "category" + }, + primaryYAxis: { + range: { min: 25, max: 50, interval: 5 }, + labelFormat: "{value}%", + title: { text: "Efficiency" }, + + }, + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : {width: 2} + }, + series: + [ + { + points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 },{ x: 2007, y: 26 }, { x: 2008, y: 27 }, + { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], + name: 'India' + }, + { + points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 },{ x: 2007, y: 30 }, { x: 2008, y: 36 }, + { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], + name: 'Germany' + }, + { + points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 },{ x: 2007, y: 34 }, { x: 2008, y: 41 }, + { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], + name: 'England' + }, + { + points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 },{ x: 2007, y: 40 }, { x: 2008, y: 44 }, + { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], + name: 'France' + } + ], + isResponsive: true, + load: function () { + var sender = $("#Chart").data("ejChart"); + if (!!window.orientation && sender) { //to modify chart properties for mobile view + var model = sender.model, + seriesLength = model.series.length; + model.legend.visible = false; + model.size.height = null; + model.size.width = null; + for (var i = 0; i < seriesLength; i++) { + if (!model.series[i].marker) + model.series[i].marker = {}; + if (!model.series[i].marker.size) + model.series[i].marker.size = {}; + model.series[i].marker.size.width = 6; + model.series[i].marker.size.height = 6; + } + model.primaryXAxis.labelIntersectAction = "rotate45"; + if (model.primaryXAxis.title) + model.primaryXAxis.title.text = ""; + if (model.primaryYAxis.title) + model.primaryYAxis.title.text = ""; + model.primaryXAxis.edgeLabelPlacement = "hide"; + model.primaryYAxis.labelIntersectAction = "rotate45"; + model.primaryYAxis.edgeLabelPlacement = "hide"; + } + }, + title: { text: 'Efficiency of oil-fired power production' }, + size: { height: "600" }, + legend: { visible: true} + }); + }); +} + + + + + +module circulargaugecomponent { + $(function () { + var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { + enableAnimation: false, + isResponsive: true, + 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" } + }] + }] + }); + }); +} + + + + +module ColorPickerComponent { + $(function () { + var colorSample = new ej.ColorPicker($("#colorpick"), { + value: "#278787" + }); + }); +} + + + + +module DatePickerComponent { + $(function () { + var dateSample = new ej.DatePicker($("#datepick"), { + width: "100%" + }); + }); +} + + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { + width: "100%" + }); + }); +} + + + +$(function () { + var diagram = new ej.datavisualization.Diagram($("#diagram"), { + width: "1000px", + height: "600px", + pageSettings: { + //Sets page size + pageHeight: 500, + pageWidth: 500, + //Customizes the appearance of page + pageBorderWidth: 4, + pageBackgroundColor: "white", + pageBorderColor: "lightgray", + pageMargin: 25, + showPageBreak: true, + multiplePage: true, + pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait + }, + scrollSettings: { + horizontalOffset: 0, + verticalOffset: 0 + }, + snapSettings: { + snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines + }, + nodes: [ + createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: "terminator" }), + createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: "process" }), + createNode({ name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], type: "flow", shape: "decision" }), + createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: "decision" }), + createNode({ name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: "process" }), + createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: "card", fillColor: "#858585", borderColor: "#858585" }), + createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: "process" }), + createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: "process" }) + ], + connectors: [ + createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), + createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), + createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), + createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) + ] + }); + +}); + +function createNode(option: ej.datavisualization.Diagram.Node) { + if (!option.fillColor) { + option.borderColor = "#1BA0E2"; + option.fillColor = "#1BA0E2"; + } + option.labels[0].fontColor = "white"; + return option; +} + +function createConnector(option: ej.datavisualization.Diagram.Connector) { + option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; + option.lineColor = "#606060"; + if (option.labels && option.labels.length > 0) { + option.labels[0].fillColor = "white"; + } + return option; +} + +function createLabel(options : any) { + return options; +} + + + +module DialogComponent { + $(function () { + var dialogInstance = new ej.Dialog($("#basicDialog"), { + width: 550, + minWidth: 310, + minHeight: 215, + target:".control", + close:()=>{this.onDialogClose()} + }); + var btnInstance = new ej.Button($("#btnOpen"), { + size: "medium", + click: ()=>{this.onOpen()}, + type: "button", + height: 30, + width: 150 + }); + }); +} + +function onDialogClose(args:any) { + $("#btnOpen").show(); +} +function onOpen() { + $("#btnOpen").hide(); + $("#basicDialog").ejDialog("open"); +} + + + +module digitalgaugecomponent { + $(function () { + var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { + width: 525, + height: 305, + isResponsive: true, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "Syncfusion", + position: { x: 52, y: 52 } + }] + }); + }); +} + + + + + + +module DropDownListComponent { + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var sample = new ej.DropDownList($("#bikeList"),{ + dataSource: BikeList, + width: "100%", + watermarkText: "Select a bike", + fields: { id: "empid", text: "text", value: "text" }, + enableFilterSearch: true, + caseSensitiveSearch: true, + enableIncrementalSearch: true, + enablePopupResize: true, + delimiterChar: ";", + multiSelectMode: ej.MultiSelectMode.Delimiter, + maxPopupHeight: "300px", + minPopupHeight: "150px", + maxPopupWidth: "500px", + minPopupWidth: "350px", + selectedIndex: 1, + showCheckbox: true, + showPopupOnLoad: true, + showRoundedCorner: true + }); + }); + +} + + + + + + +module ExplorerComponent { + $(function () { + var file = new ej.FileExplorer($("#fileExplorer"), { + path: (window).baseurl + "webapi/FileExplorer/FileBrowser/", + width: "100%", + minWidth: "150px", + layout: "tile", + isResponsive: true, + ajaxAction: (window).baseurl + "api/fileoperation/doJSONAction" + }); + }); +} + + + + +module GanttComponent { + $(function () { + var ganttInstance = new ej.Gantt($("#GanttContainer"), { + dataSource: (window).projectData, + allowColumnResize: true, + allowSorting: true, + allowSelection: true, + enableContextMenu: true, + taskIdMapping: "taskID", + allowDragAndDrop: true, + taskNameMapping: "taskName", + startDateMapping: "startDate", + showColumnChooser: true, + showColumnOptions: true, + progressMapping: "progress", + durationMapping: "duration", + endDateMapping: "endDate", + childMapping: "subtasks", + scheduleStartDate: "02/01/2014", + scheduleEndDate: "04/09/2014", + //Resources mapping + resourceInfoMapping: "resourceId", + resourceNameMapping: "resourceName", + resourceIdMapping: "resourceId", + resources: (window).projectResources, + predecessorMapping: "predecessor", + showResourceNames: true, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","indent","outdent","expandAll","collapseAll","search"] + }, + editSettings: { + allowEditing: true, + allowAdding: true, + allowDeleting: true, + allowIndent: true, + editMode: "cellEditing" + }, + sizeSettings: { + width: "100%", + height: "100%" + }, + dragTooltip: { showTooltip: true }, + showGridCellTooltip: true, + treeColumnIndex: 1, + isResponsive: true, + }); +}); +} + + + +module GridComponent { + $(function () { + var gridInstance = new ej.Grid($("#Grid"), { + dataSource: (window).gridData, + allowGrouping: true, + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowPaging: true, + allowReordering: true, + allowResizing: true, + allowFiltering: true, + allowScrolling: true, + enableRowHover: true, + selectionType: "multiple", + selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, + allowKeyboardNavigation: true, + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, + toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, + columns: [ + { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, + { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, + { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, + { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, + { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, + { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } + ], + isResponsive: true, + minWidth: 700, + showSummary: true, + summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] + }); + }); +} + + + +var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] +var itemSource: any[] = []; +for (var i = 0; i < columns.length; i++) { + for (var j = 0; j < 6; j++) { + var value = Math.floor((Math.random() * 100) + 1); + itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) + } +} + +$(function () { + var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + isResponsive: true, + itemsSource: itemSource, + width: "100%", + itemsMapping: { + column: { propertyName: "ProductName", displayName: "Product Name" }, + row: { propertyName: "Year", displayName: "Year" }, + value: { propertyName: "Value" }, + columnMapping: [ + { "propertyName": columns[0], "displayName": columns[0] }, + { "propertyName": columns[1], "displayName": columns[1] }, + { "propertyName": columns[2], "displayName": columns[2] }, + { "propertyName": columns[3], "displayName": columns[3] }, + { "propertyName": columns[4], "displayName": columns[4] }, + { "propertyName": columns[5], "displayName": columns[5] } + ], + headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, + }, + legendCollection: ["heatmap_legend"] + }); + var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + height: "50px", + width: "75%", + isResponsive: true + }); +}); + + + + +declare var window:myWindow; +export interface myWindow extends Window{ +kanbanData:any; +} +module KanbanComponent { + $(function () { + var sample = new ej.Kanban($("#Kanban"), { + dataSource: new ej.DataManager(window["kanbanData"]).executeLocal(new ej.Query().take(20)), + columns: [ + { headerText: "Backlog", key: "Open" }, + { headerText: "In Progress", key: "InProgress" }, + { headerText: "Testing", key: "Testing" }, + { headerText: "Done", key: "Close" } + ], + keyField: "Status", + allowTitle: true, + fields: { + content: "Summary", + primaryKey: "Id", + imageUrl: "ImgUrl" + }, + allowSelection: false + }); + }); +} + + + + +module lineargaugecomponent { + $(function () { + var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { + labelColor: "#8c8c8c", width: 500, + isResponsive: true, enableAnimation: false, + 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 + }] + }] + }); + }); +} + + + + + +module ListBoxComponent { + $(function () { + var listboxInstance = new ej.ListBox($("#selectcar"), { + showCheckbox: true + }); + }); +} + + + +module ListviewComponent { + $(function () { + var listviewInstance = new ej.ListView($("#defaultlistview"), { + enableCheckMark: true, + width: 400 + }); + }); +} + + +var world_map= + { + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + "features": [ + { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, + { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, + { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, + { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, + { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, + { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, + { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, + { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, + { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, + { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, + { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, + { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, + { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, + { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, + { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, + { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, + { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, + { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, + { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, + { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, + { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, + { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, + { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, + { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, + { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, + { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, + { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, + { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, + { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, + { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, + { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, + { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, + { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, + { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, + { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, + { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, + { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, + { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, + { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, + { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, + { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, + { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, + { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, + { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, + { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, + { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, + { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, + { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, + { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, + { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, + { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, + { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, + { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, + { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, + { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, + { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, + { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, + { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, + { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, + { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, + { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, + { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, + { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, + { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, + { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, + { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, + { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, + { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, + { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, + { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, + { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, + { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, + { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, + { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, + { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, + { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, + { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, + { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, + { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, + { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, + { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, + { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, + { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, + { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, + { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, + { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, + { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, + { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, + { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, + { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, + { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, + { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, + { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, + { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, + { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, + { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, + { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, + { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, + { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, + { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, + { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, + { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, + { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, + { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, + { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, + { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, + { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, + { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, + { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, + { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, + { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, + { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, + { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, + { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, + { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, + { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, + { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, + { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, + { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, + { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, + { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, + { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, + { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, + { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, + { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, + { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, + { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, + { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, + { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, + { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, + { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, + { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, + { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, + { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, + { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, + { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, + { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, + { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, + { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, + { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, + { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, + { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, + { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, + { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, + { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, + { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, + { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, + { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, + { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, + { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, + { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, + { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, + { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, + { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, + { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, + { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } + ] + }; + +var randomcountriesData1 = [ + { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, + { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, + { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, + { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, + { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, + { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, + { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, +]; + +module mapcomponenet { + $(function () { + var mapsample = new ej.datavisualization.Map($("#map"), { + enableAnimation: true, + navigationControl: { + enableNavigation: true, + orientation: 'vertical', + absolutePosition: { x: 5, y: 15 }, + dockPosition: 'none' + }, + layers: [ + { + layerType: 'geometry', + enableMouseHover: false, + enableSelection: false, + shapeSettings: { + fill: "#626171", + autoFill: false, + highlightStroke: "white", + stroke: "white", + strokeThickness: 0.5, + highlightColor: "#BFBFBF" + }, + shapeData: world_map, + legendSettings: { dockOnMap: false } + } + ] + }); + }); +} + + + + + + + +module MenuComponent { + $(function () { + var sample = new ej.Menu($("#syncfusionProducts"),{ + width: "100%", + animationType: ej.AnimationType.Default, + cssClass: 'gradient-lime ', + enableAnimation: true, + enableSeparator: true, + height: 40, + htmlAttributes: { "aria-label": "menu" }, + menuType: "normalmenu", + orientation: ej.Orientation.Horizontal, + showRootLevelArrows: true, + showSubLevelArrows: true, + subMenuDirection: ej.Direction.Right, + titleText: "Menu", + + }); + }); + +} + + + + + + + + +module NavigationDrawerComponent { + $(function () { + var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { + targetId: "butdrawer", + contentId: "content_container", + type: "overlay", + direction: "left", + enableListView: true, + listViewSettings: { + width: 300, + selectedItemIndex: 0, + mouseUp: "headChange" + }, + position: "normal" + }); + }); + function headChange(e:any) { + $("#butdrawer").parent().children("h2").text(e.text); + } +} + + + +module PDFViewerComponent { + $(function () { + var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { + serviceUrl: (window).baseurl + "api/PdfViewer", + isResponsive: true + }); + }); +} + + + +module PivotChartOlap { + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: "http://bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + } + ], + axis: "columns" + } + ], + filters:[] + }, + isResponsive: true, + commonSeriesOptions: { + enableAnimation: true, + type: "column", tooltip: { visible: true } + }, + size: { height: "460px", width: "950px" }, + primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, + primaryYAxis: { title: { text: "Internet Sales Amount" } }, + legend: { visible: true, rowCount: 2 } + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotChartRelational { + + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + }, + { + fieldName: "Date", + fieldCaption: "Date" + } + ], + columns: [ + { + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + } + ], + filters:[] + }, + isResponsive: true, + commonSeriesOptions: { + enableAnimation: true, + type: "column", tooltip: { visible: true } + }, + size: { height: "460px", width: "950px" }, + primaryYAxis: { title: { text: "Amount" } }, + legend: { visible: true } + }); + }); +} + + + +module PivotGaugeOlap { + + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: "http://bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]", + filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } + }, + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + }, + { + fieldName: "[Measures].[Internet Revenue Status]" + }, + { + fieldName: "[Measures].[Internet Revenue Trend]" + }, + { + fieldName: "[Measures].[Internet Revenue Goal]" + }, + ], + axis: "columns" + } + ], + filters:[] + }, + enableTooltip: true, isResponsive: true, + backgroundColor: "transparent", + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGaugeRelational { + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + } + ], + columns: [ + { + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + }, + { + fieldName: "Quantity", + fieldCaption: "Quantity" + } + ] + }, + enableTooltip: true, isResponsive: true, + backgroundColor: "transparent", + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +module PivotGridOlap { + + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: "http://bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]", + } + ], + axis: "columns" + } + ], + filters:[] + }, + hyperlinkSettings: { + enableValueCellHyperlink: true, + enableRowHeaderHyperlink: true, + enableColumnHeaderHyperlink: true, + enableSummaryCellHyperlink: true + }, + enableGroupingBar: true, + enableCellEditing: true, + enableCellSelection: true, + renderSuccess: function (args) {$("#PivotSchemaDesigner").ejPivotSchemaDesigner({ pivotControl: args, layout: "excel" });} + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGridRelational { + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + } + ], + columns: + [{ + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + }, + { + fieldName: "Quantity", + fieldCaption: "Quantity" + } + ], + filters:[] + }, + hyperlinkSettings: { + enableValueCellHyperlink: true, + enableRowHeaderHyperlink: true, + enableColumnHeaderHyperlink: true, + enableSummaryCellHyperlink: true + }, + enableGroupingBar: true, + enableCellEditing: true, + enableCellSelection: true, + renderSuccess: function (args) {$("#PivotSchemaDesigner").ejPivotSchemaDesigner({ pivotControl: args, layout: "excel" });} + }); + }); +} + + + +module PivotTreeMap { + $(function () { + var sample = new ej.PivotTreeMap($("#PivotTreeMap"),{ + dataSource: { + data: "http://bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + columns: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Customer Count]", + } + ], + axis: "columns" + } + ], + filters:[] + } + }); + }); +} + + + +module ProgressBarComponent { + $(function () { + var sample = new ej.ProgressBar($("#progressBar"),{ + width: 200, + value: 45, + height: 20, + enablePersistence: true, + maxValue: 200, + minValue: 0, + showRoundedCorner: true, + text: 'loading...' + }); + }); + +} + + + + +declare var rteObj: any; +declare var data: any; +var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; +var rteEle = $("#rteSample1"); +module AccordionComponent { + $(function () { + + if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { + var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { + imageClass: "imageclass", + backImageClass: "backimageclass", + targetElementId: "radialtarget1" + }); + } + else { + $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); + } + var rteInstance = new ej.RTE($("#rteSample1"), { + width: "100%", + minWidth: "10px", + change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, + select: (e) => { + var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, + // To get Iframe positions + iframeY = target.offset().top + e.event.clientY, iframeX = target.offset().left + e.event.clientX, + // To set Radial Menu position within target + x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), + y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); + radialEle.ejRadialMenu("setPosition", x, y); + radialEle.focus(); + $('iframe').contents().find('body').blur(); + }, + showToolbar: false, + showContextMenu: false + }); + $(window).resize(function () { + if (ej.isMobile() && ej.isPortrait()) + $('#defaultradialmenu').css({ "left": 25 }); + }); + }); +} + + +function bold(e: any) { + + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("bold"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function italic(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("italic"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function undo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("undo"); + action -= 1; + if (action == 0) + radialEle.ejRadialMenu("disableItem", "Undo"); + radialEle.ejRadialMenu("enableItem", "Redo"); + radialEle.focus(); +} +function redo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("redo"); + action += 1; + if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); + radialEle.ejRadialMenu("enableItem", "Undo"); + radialEle.focus(); +} + + + + +module RadialSliderComponent { + $(function () { + var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { + innerCircleImageUrl: "../images/radialslider/chevron-right.png" + }); + }); +} + + +module rangecomponent { + $(function () { + var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { + enableDeferredUpdate: true, + padding: "15", + allowSnapping: true, + selectedRangeSettings: { + start: "2010/5/1", end: "2011/10/1" + }, + isResponsive: true, + tooltipSettings: { + visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" + }, + load: () => { + var rn = $("#RangeNavigator").data("ejRangeNavigator"); + rn.model.series = [ + { + type: 'line', + dataSource: data.Open, xName: "XValue", yName: "YValue", + fill: '#69D2E7' + } + ]; + } + + }); + }); +} +var data; +data = GetData(); + +function GetData() { + var series1:any[]=[]; + var series2:any[]= []; + var value = 100; + var value1 = 120; + for (var i = 1; i < 730; i++) { + + if (Math.random() > .5) { + value += Math.random(); + value1 += Math.random(); + } else { + value -= Math.random(); + value1 -= Math.random(); + } + var point1 = { XValue: new Date(2010, 0, i), YValue: value }; + var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; + series1.push(point1); + series2.push(point2); + } + + data = { Open: series1, Close: series2 }; + return data; +}; + + + +module RatingComponent { + $(function () { + + var sample1 = new ej.Rating($("#fullRating"),{ + value: 4, + precision: ej.Rating.Precision.Full, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: ej.Orientation.Horizontal, + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample2 = new ej.Rating($("#halfRating"),{ + precision: ej.Rating.Precision.Half, + value: 3.5, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample3 = new ej.Rating($("#exactRating"),{ + precision: ej.Rating.Precision.Exact, + value: 3.7, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + }); + +} + + + +module ReportViewerComponent { + $(function () { + var report = new ej.ReportViewer($("#territoryReportViewer"), { + reportServiceUrl: (window).baseurl + 'api/SSRSReport', + reportServerUrl: 'http://mvc.syncfusion.com/reportserver', + processingMode: ej.ReportViewer.ProcessingMode.Remote, + reportPath: "/SSRSSamples2/Territory Sales new", + isResponsive: true + }); + }); +} + + + +var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; +module RibbonComponent { + $(function () { + var sample = new ej.Ribbon($("#defaultRibbon"), { + width: "100%", + expandPinSettings: { + toolTip: "Collapse the Ribbon" + }, + collapsePinSettings: { + toolTip: "Pin the Ribbon" + }, + applicationTab: { + type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } + }, + tabs: [{ + id: "home", text: "HOME", groups: [{ + text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "new", + text: "New", + toolTip: "New", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-new" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "paste", + text: "paste", + toolTip: "Paste", + splitButtonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-ribbonpaste", + targetID: "pasteSplit", + buttonMode: "dropdown", + arrowPosition: ej.ArrowPosition.Bottom + } + } + ], + defaults: { + type: "splitbutton", + width: 50, + height: 70 + } + }, + { + groups: [{ + id: "cut", + text: "Cut", + toolTip: "Cut", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + prefixIcon: "e-icon e-ribbon e-ribboncut" + } + }, + { + id: "copy", + text: "Copy", + toolTip: "Copy", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + prefixIcon: "e-icon e-ribbon e-ribboncopy" + } + }, + { + id: "clear", + text: "Clear", + toolTip: "Clear All", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + prefixIcon: "e-icon e-ribbon clearAll" + } + }], + defaults: { + type: "button", + width: 60, + isBig: false + } + }] + }, + { + text: "Font", alignType: "rows", content: [{ + groups: [{ + id: "fontfamily", + toolTip: "Font", + dropdownSettings: { + dataSource: fontfamily, + text: "Segoe UI", + width: 150 + } + }, + { + id: "fontsize", + toolTip: "FontSize", + dropdownSettings: { + dataSource: fontsize, + text: "1pt", + width: 65 + } + }], + defaults: { + type: "dropdownlist", + height: 28 + } + }, + { + groups: [{ + id: "bold", + toolTip: "Bold", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Bold", + activeText: "Bold", + defaultPrefixIcon: "e-icon e-ribbon bold", + activePrefixIcon: "e-icon e-ribbon bold" + } + }, + { + id: "italic", + toolTip: "Italic", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Italic", + activeText: "Italic", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", + activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" + } + }, + { + id: "underline", + text: "Underline", + toolTip: "Underline", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Underline", + activeText: "Underline", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", + activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" + } + }, + { + id: "strikethrough", + text: "strikethrough", + toolTip: "Strikethrough", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Strikethrough", + activeText: "Strikethrough", + defaultPrefixIcon: "e-icon e-ribbon strikethrough", + activePrefixIcon: "e-icon e-ribbon strikethrough" + } + }, + { + id: "superscript", + text: "superscript", + toolTip: "Superscript", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-superscripticon" + } + }, + { + id: "subscript", + text: "subscript", + toolTip: "Subscript", + enableSeparator: true, + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-subscripticon" + } + }, + { + id: "fontcolor", + text: "Font Color", + toolTip: "Font Color", + type: ej.Ribbon.Type.Custom, + contentID: "fontcolor" + }, + { + id: "fillcolor", + text: "Fill Color", + toolTip: "Fill Color", + type: ej.Ribbon.Type.Custom, + contentID: "fillcolor" + } + ], + defaults: { + isBig: false + } + }] + }, + { + text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ + { + groups: [{ + id: "bullet", + text: "Bullet Format", + toolTip: "Bullets", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-bullet" + } + }, + { + id: "number", + text: "Number Format", + toolTip: "Numbering", + enableSeparator: true, + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-numbericon" + } + }, + { + id: "textindent", + text: "Indent", + toolTip: "Text Indent", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-indent" + } + }, + { + id: "textoudent", + text: "Outdent", + toolTip: "Text Outdent", + enableSeparator: true, + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-outdent" + } + }, + { + id: "sortascending", + text: "Sort", + toolTip: "Sort", + enableSeparator: true, + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-sort" + } + }, + { + id: "border", + text: "Border", + toolTip: "Border", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-border" + } + }], + defaults: { + type: "button", + isBig: false + } + }, + { + groups: [{ + id: "alignleft", + text: "JustifyLeft", + toolTip: "Align Left", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignleft" + } + }, + { + id: "aligncenter", + text: "JustifyCenter", + toolTip: "Align Center", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon aligncenter" + } + }, + { + id: "alignright", + text: "JustifyRight", + toolTip: "Align Right", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignright" + } + }, + { + id: "justify", + text: "JustifyFull", + toolTip: "Justify", + enableSeparator: true, + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon justify" + } + }, + { + id: "uppercase", + text: "Upper Case", + toolTip: "Upper Case", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-uppercase" + } + }, + { + id: "lowercase", + text: "Lower Case", + toolTip: "Lower Case", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-lowercase" + } + }], + defaults: { + type: "button", + isBig: false + } + }] + }, + { + text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "undo", + text: "Undo", + toolTip: "Undo", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-undo" + } + }, + { + id: "redo", + text: "Redo", + toolTip: "Redo", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-redo" + } + } + ], + defaults: { + type: "button", + width: 40, + height: 70 + } + }] + }, + { + text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "zoomin", + text: "Zoom In", + toolTip: "Zoom In", + buttonSettings: { + width: 58, + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomin" + } + }, + { + id: "zoomout", + text: "Zoom Out", + toolTip: "Zoom Out", + buttonSettings: { + width: 70, + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomout" + } + }, + { + id: "fullscreen", + text: "Full Screen", + toolTip: "Full Screen", + buttonSettings: { + width: 73, + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-fullscreen" + } + } + ], + defaults: { + type: "button", + height: 70 + } + }] + }] + },{ + id: "insert", text: "INSERT", groups: [{ + text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "tables", + text: "Tables", + toolTip: "Tables", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-table" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + }, + { + text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "pictures", + text: "Pictures", + toolTip: "Pictures", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-picture" + } + }, + { + id: "videos", + text: "Videos", + toolTip: "Videos", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-video" + } + }, + { + id: "shapes", + text: "Shapes", + toolTip: "Shapes", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-shape" + } + }, + { + id: "charts", + text: "Charts", + toolTip: "Charts", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-chart" + } + } + ], + defaults: { + type: "button", + width: 56, + height: 70 + } + }] + }, + { + text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "comments", + text: "Comments", + toolTip: "Comments", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-comment" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "text", + text: "Text", + toolTip: "Text", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-text", + width: 50 + } + }, + { + id: "datetime", + text: "Date Time", + toolTip: "DateTime", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-datetimenew" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "hyperlink", + text: "Hyperlink", + toolTip: "Hyperlink", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-hyperlink" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "equation", + text: "Equation", + toolTip: "Equation", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-equation" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "printlayout", + text: "Print Layout", + toolTip: "Print Layout", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-printlayout" + } + } + ], + defaults: { + type: "button", + width: 80, + height: 70 + } + }] + }, + { + text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "print", + text: "Print", + toolTip: "Print", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-print" + } + }, + { + id: "save", + text: "Save", + toolTip: "Save", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-save" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + } + ] + } + ], + create: function createControl(args) { + var ribbon = $("#defaultRibbon").data("ejRibbon"); + $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); + $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); + } + }); + }); +} +function colorHandler(args:any) { + (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); +} + + + + + + +module RotatorComponent { + $(function () { + var rotatorInstance = new ej.Rotator($("#sliderContent"), { + slideWidth: "100%", + frameSpace: "0px", + slideHeight: "auto", + displayItemsCount: "1", + navigateSteps: "1", + pagerPosition:"outside", + orientation: "horizontal", + showPager: true, + enabled: true, + showCaption: true, + allowKeyboardNavigation: true, + showPlayButton: true, + isResponsive:true, + animationType: "slide", + }); + }); +} + + + +module RTEComponent { + $(function () { + var sample = new ej.RTE($("#rteSample"),{ + width: "100%", + minWidth: "150px", + showFooter: true, + showHtmlSource: true, + allowEditing: true, + allowKeyboardNavigation: true, + autoFocus: true, + autoHeight: true, + colorPaletteColumns: 10, + colorPaletteRows: 5, + cssClass: 'gradient-lime', + enableResize: true, + enableTabKeyNavigation: true, + fileBrowser: { + filePath: "../FileExplorerContent/", + extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", + ajaxAction: "http://mvc.syncfusion.com/OdataServices/api/fileoperation/", + }, + imageBrowser: { + filePath: "../FileExplorerContent/", + extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", + ajaxAction: "http://mvc.syncfusion.com/OdataServices/api/fileoperation/", + }, + isResponsive: true, + showClearAll: true, + showClearFormat: true, + showDimensions: true, + showCharCount: true, + tools: { + formatStyle: ["format"], + edit: ["findAndReplace"], + font: ["fontName", "fontSize", "fontColor", "backgroundColor"], + style: ["bold", "italic", "underline", "strikethrough"], + alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], + lists: ["unorderedList", "orderedList"], + clipboard: ["cut", "copy", "paste"], + doAction: ["undo", "redo"], + indenting: ["outdent", "indent"], + clear: ["clearFormat", "clearAll"], + links: ["createLink", "removeLink"], + images: ["image"], + media: ["video"], + tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], + effects: ["superscript", "subscript"], + casing: ["upperCase", "lowerCase"], + view: ["fullScreen", "zoomIn", "zoomOut"], + print: ["print"], + customUnorderedList: [{ + name: "unOrderInsert", + tooltip: "Custom UnOrderList", + css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", + text: "Smiley", + listImage: "url('../content/images/rte/Smiley-GIF.gif')" + }], + customOrderedList: [{ + name: "orderInsert", + tooltip: "Custom OrderList", + css: "e-rte-toolbar-icon e-rte-listitems customOrder", + text: "Lower-Greek", + listStyle: "lower-greek" + }] + } + }); + }); + +} + + + +declare var window :myWindow; +export interface myWindow extends Window{ +Default:any; +} +module ScheduleComponent { + $(function () { + var sample = new ej.Schedule($("#Schedule1"), { + width: "100%", + height: "525px", + currentDate: new Date(2014, 4, 5), + timeScale: { + minorSlotCount: 4, + majorSlot: 60 + }, + contextMenuSettings: { + enable: true, + menuItems: { + appointment: [ + { id: "open", text: "Open Appointment" }, + { id: "delete", text: "Delete Appointment" }, + { id: "customMenu3", text: "Menu Item 3" }, + { id: "customMenu4", text: "Menu Item 4" } + ], + cells: [ + { id: "new", text: "New Appointment" }, + { id: "recurrence", text: "New Recurring Appointment" }, + { id: "today", text: "Today" }, + { id: "gotodate", text: "Go to date" }, + { id: "settings", text: "Settings" }, + { id: "view", text: "View", parentId: "settings" }, + { id: "timemode", text: "TimeMode", parentId: "settings" }, + { id: "view_Day", text: "Day", parentId: "view" }, + { id: "view_Week", text: "Week", parentId: "view" }, + { id: "view_Workweek", text: "Workweek", parentId: "view" }, + { id: "view_Month", text: "Month", parentId: "view" }, + { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, + { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, + { id: "workhours", text: "Work Hours", parentId: "settings" }, + { id: "customMenu1", text: "Menu Item 1" }, + { id: "customMenu2", text: "Menu Item 2" } + ] + } + }, + resources: [{ + field: "ownerId", + title: "Owner", + name: "Owners", allowMultiple: true, + resourceSettings: { + dataSource: [ + { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, + { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, + { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } + ], + text: "text", id: "id", groupId: "groupId", color: "color" + } + }], + appointmentSettings: { + dataSource: new ej.DataManager(window.Default).executeLocal(new ej.Query().take(10)), + id: "Id", + subject: "Subject", + startTime: "StartTime", + endTime: "EndTime", + description: "Description", + allDay: "AllDay", + recurrence: "Recurrence", + recurrenceRule: "RecurrenceRule", + resourceFields: "ownerId" + } + }); + }); +} + + + +module ScrollerComponent { + $(function () { + var scrollerSample = new ej.Scroller($("#scrollcontent"), { + height: "300px", + width: "100%" + }); + $(window).bind('resize', function () { + scrollerSample.refresh(); + }); + }); +} + + + + + +module SliderComponent { + $(function () { + var slider = new ej.Slider($("#minSlider"), { + sliderType: "MinRange", + height: "16px", + width: "300px", + value: 60, + minValue: 0, + maxValue: 100 + }); + var rangeslider = new ej.Slider($("#rangeSlider"), { + sliderType: "Range", + height: "16px", + width: "300px", + values: [30, 60], + minValue: 0 + }); + + }); +} + + + + + + +module linesparkline { + $(function () { + + var sparklinesample = new ej.Sparkline($("#line"), { + dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], + tooltip: { + visible: true, + font: { size:"12px" } + }, + type: "line", + size: { height: "40", width:"170" }, + }); + }); +} + +module columnsparkline { + $(function () { + var sparkcolumnsample = new ej.Sparkline($("#column"), { + dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10,], + negativePointColor: "red", + highPointColor: "blue", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + type: "column", + size: { height: "100", width: "150" }, + }); + }); +} + +module areasparkline { + $(function () { + var sparkareasample = new ej.Sparkline($("#area"), { + dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10,], + markerSettings: { visible: true }, + highPointColor: "blue", + lowPointColor: "orange", + type: "area", + opacity: 0.5, + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "100", width: "150" }, + }); + }); +} + +module windlosssparkline { + $(function () { + var sparkwinlosssample = new ej.Sparkline($("#winloss"), { + dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10,], + type: "winloss", + size: { height: "100", width: "150" }, + }); + }); +} + +module piesparkline1 { + $(function () { + var sparkpiesample1 = new ej.Sparkline($("#pie1"), { + dataSource: [4, 6, 7], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline2 { + $(function () { + var sparkpiesample2 = new ej.Sparkline($("#pie2"), { + dataSource: [8, 9, 1,], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline3 { + $(function () { + var sparkpiesample3 = new ej.Sparkline($("#pie3"), { + dataSource: [2, 3, 5], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline4 { + $(function () { + var sparkpiesample4 = new ej.Sparkline($("#pie4"), { + dataSource: [10, 12, 11], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + + + + + + +module SplitterComponent { + $(function () { + var splitterInstance = new ej.Splitter($("#outterSpliter"), { + height: "250px", + width: "50%", + orientation: ej.Orientation.Vertical, + properties: [{}, { paneSize: 80 }], + isResponsive:true + }); + var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { + isResponsive:true, + }); + }); +} + + + +module SpreadsheetComponent { +$(function () { + var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { + scrollSettings: { + height: 550, + }, + importSettings: { + importMapper: (window).baseurl + "api/JSXLExport/Import" + }, + exportSettings: { + excelUrl: (window).baseurl + "api/JSXLExport/ExportToExcel", + csvUrl: (window).baseurl + "api/JSXLExport/ExportToCsv", + pdfUrl: (window).baseurl + "api/JSXLExport/ExportToPdf" + }, + sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], + loadComplete: () => { + var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; + if (!(spreadsheet).isImport) { + spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); + xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); + xlFormat.format({ "type": "currency" }, "E2:H11"); + spreadsheet.XLRibbon.updateRibbonIcons(); + }} + }); + }); +} + + + + +module TabComponent { + $(function () { + var sample = new ej.Tab($("#defaultTab"),{ + width: "500px", + collapsible: true, + events: "click", + heightAdjustMode: ej.Tab.HeightAdjustMode.Content, + showCloseButton: true, + showRoundedCorner: false + }); + }); +} + + + +module TagCloudComponent { + + + var websiteCollection = [ + { text: "Google", url: "http://www.google.com", frequency: 12 }, + { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, + { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, + { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, + { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, + { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, + { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, + { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, + { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, + { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, + { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, + { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, + { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, + { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, + { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, + { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, + { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, + { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } + ]; + + $(function () { + var sample = new ej.TagCloud($("#techWebList"), { + titleText: "Tech Sites", + dataSource: websiteCollection, + cssClass: "gradient-lime", + fields: { + text: "text", url: "url", frequency: "frequency" + } + }); + + }); +} + + + +module EditorComponent { + $(function () { + var num = new ej.NumericTextbox($("#numeric"), { + value: 30, + minValue: 1, + maxValue: 100, + name: "numeric", + width: "100%" + }); + var per = new ej.PercentageTextbox($("#percent"), { + value: 60, + minValue: 10, + maxValue: 1000, + name: "percent", + width: "100%" + }); + var cur = new ej.CurrencyTextbox($("#currency"), { + value: 100, + minValue: 10, + maxValue: 1000, + name: "currency", + width: "100%" + }); + var mask = new ej.MaskEdit($("#maskedit"), { + name: "mask", + value: "4242422424", + maskFormat: "99 999-99999", + width: "100%" + }) + }); +} + + + + + +module AccordionComponent { + $(function () { + var tile1 = new ej.Tile($("#tile1"), { + imagePosition:"fill", + caption:{text:"People"}, + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_1.png' + }); + var tile2 = new ej.Tile($("#tile2"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/alerts.png', + + }); + var tile3 = new ej.Tile($("#tile3"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/bing.png', + }); + var tile4 = new ej.Tile($("#tile4"), { + tileSize:"small", + imageUrl:'content/images/tile/windows/camera.png', + }); + var tile5 = new ej.Tile($("#tile5"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/messages.png', + }); + var tile6 = new ej.Tile($("#tile6"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/games.png', + caption:{text:"Play"} + }); + var tile7 = new ej.Tile($("#tile7"), { + tileSize:"medium", + imageUrl:'content/images/tile/windows/map.png', + caption:{text:"Maps"} + }); + var tile8 = new ej.Tile($("#tile8"), { + imagePosition:"fill", + tileSize:"wide", + imageUrl:'content/images/tile/windows/sports.png', + caption:{text:"Sports"} + }); + var tile9 = new ej.Tile($("#tile9"), { + imagePosition:"fill", + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_2.png', + caption:{text:"People"} + }); + var tile10 = new ej.Tile($("#tile10"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/pictures.png', + caption:{text:"Photo"} + }); + var tile11 = new ej.Tile($("#tile11"), { + imagePosition:"center", + tileSize:"wide", + imageUrl:'content/images/tile/windows/weather.png', + caption:{text:"Weather"} + }); + var tile12 = new ej.Tile($("#tile12"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/music.png', + caption:{text:"Music"} + }); + var tile13 = new ej.Tile($("#tile13"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/favs.png', + caption:{text:"Favorites"} + }); + }); +} + + + +module TimePickerComponent { + $(function () { + var timeSample = new ej.TimePicker($("#timepick"), { + width: "100%" + }); + }); +} + + + + +module ToolbarComponent { + + $(function () { + var sample = new ej.Toolbar($("#editingToolbar"),{ + width: "100%", + cssClass: "gradient-lime", + enableSeparator: true, + height: 30, + isResponsive: true, + orientation: ej.Orientation.Horizontal, + showRoundedCorner: true + }); + }); + +} + + + + +module TooltipComponent { + + $(function () { + + var sample1 = new ej.Tooltip($("#link1"),{ + content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample2 = new ej.Tooltip($("#link2"),{ + content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", + position: { + stem: { + horizontal: "left", + vertical: "center" + }, + target: { + horizontal: "right", + vertical: "center", + }, + }, + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample3 = new ej.Tooltip($("#link3"),{ + content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center", + }, + }, + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + }); +} + + + +module TreeGridComponent { + $(function () { + var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { + dataSource: (window).treeGridData, + childMapping: "subtasks", + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowFiltering: true, + treeColumnIndex: 1, + allowKeyboardNavigation: true, + showColumnChooser: true, + showColumnOptions: true, + contextMenuSettings: { + showContextMenu: true, + contextMenuItems: ["add", "edit", "delete"] + }, + columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], + editSettings: { + allowAdding: true, + allowEditing: true, + allowDeleting: true, + editMode: "cellEditing", + rowPosition: "belowSelectedRow" + }, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","expandAll","collapseAll"] + }, + columns: [ + { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker" }, + { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker" }, + { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } + ], + isResponsive: true, + }); +}); +} + + + + +var population_data: Array = [ + { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, + { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, + { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, + { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, + { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, + { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, + { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, + { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, + { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, + { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, + { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, + { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, + { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } +]; + +module treemapcomponent { + $(function () { + var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { + leafItemSettings: { showLabels: true, labelPath: "Country" }, + rangeColorMapping: [ + { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, + { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, + { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, + { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } + ], + levels: [ + { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } + ], + dataSource: population_data, + colorValuePath: "Growth", + weightValuePath: "Population", + borderThickness: 0, + showLegend: true + }); + }); +} + + + + + +module TreeViewComponent { + $(function () { + var tree = new ej.TreeView($("#treeView"), { + allowEditing: true, + allowDragAndDrop: true, + allowDropChild: true, + allowDropSibling: true, + }); + }); +} + + + + +module UploadboxComponent { + + $(function () { + var sample = new ej.Uploadbox($("#UploadDefault"),{ + saveUrl: "uploadbox/saveFiles.ashx", + removeUrl: "uploadbox/removeFiles.ashx", + buttonText: { + browse: "Choose File", upload: "Upload the File", cancel: "Cancel the Upload" + }, + cssClass: "gradient- purple", + dialogAction: { + modal: false, closeOnComplete: false, drag: true + }, + extensionsAllow: ".zip", + multipleFilesSelection: true, + showFileDetails: true + }); + }); + +} + + + + +module WaitingPopupComponent { + $(function () { + var sample = new ej.WaitingPopup($("#target"),{ + showOnInit: true, + showImage: true, + text: 'waiting…' + }); + }); + +} diff --git a/ej.web.all/ej.web.all.d.ts b/ej.web.all/ej.web.all.d.ts new file mode 100644 index 0000000000..9d0a97ef38 --- /dev/null +++ b/ej.web.all/ej.web.all.d.ts @@ -0,0 +1,56236 @@ +// Type definitions for ej.web.all v14.3.0.49 +// Project: http://help.syncfusion.com/js/typescript +// Definitions by: Syncfusion +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/*! +* filename: ej.web.all.d.ts +* version : 14.3.0.49 +* 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: any): JQuery; + function createObject(element : any , eventEmitter :any, model : any): any; + function getObject(element :string, model :any ): T; + 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, fromdata?: any): 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, printWindow: any): void; + function proxy(fn: Object, context?: string, arg?: string): any; + 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; + var util: { + valueFunction(val: string): any; + } + 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; + _trigger(eventName?: string, eventProp?: Object): any; + _on(element: JQuery, eventType?: string, handler?: (eventObject: JQueryEventObject) => any): any; + _on(element: JQuery, eventType ?: string, selector ?: string, handler ?: (eventObject: JQueryEventObject) => any): any; + _off(element: JQuery, eventName: string, handler ?: (eventObject: JQueryEventObject) => any): any; + _off(element: JQuery, eventType ?: string, selector ?: string, handler ?: (eventObject: JQueryEventObject) => any): 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: any, 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 remoteSaveAdaptor extends ej.UrlAdaptor { + constructor(); + 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 }; + } + 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(); + 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; + or(predicate: Array): any; + 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?: Draggable.Model); + constructor(element: Element, options?: Draggable.Model); + model:Draggable.Model; + defaults:Draggable.Model; + + /** destroy in the draggable. + * @returns {void} + */ + _destroy(): void; +} +export module Draggable{ + +export interface Model { + + /** If clone is specified. + * @Default {false} + */ + clone?: boolean; + + /** Sets the offset of the dragging helper relative to the mouse cursor. + * @Default {{ top: -1, left: -2 }} + */ + cursorAt?: any; + + /** Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element. + * @Default {1} + */ + distance?: number; + + /** The drag area is used to restrict the dragging element bounds. + * @Default {false} + */ + dragArea?: boolean; + + /** If specified, restricts drag start click to the specified element(s). + * @Default {null} + */ + handle?: string; + + /** Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable. + * @Default {'default'} + */ + scope?: string; + + /** This event is triggered when dragging element is destroyed. */ + destroy? (e: DestroyEventArgs): void; + + /** This event is triggered when the mouse is moved during the dragging. */ + drag? (e: DragEventArgs): void; + + /** Supply a callback function to handle the drag start event as an init option. */ + dragStart? (e: DragStartEventArgs): void; + + /** This event is triggered when the mouse is moved during the dragging. */ + dragStop? (e: DragStopEventArgs): void; + + /** This event is triggered when dragged. */ + helper? (e: HelperEventArgs): void; +} + +export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; +} + +export interface DragEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the draggable model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event model values + */ + event?: any; + + /** returns the exact mouse down target element + */ + target?: any; +} + +export interface DragStartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the draggable model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event model values + */ + event?: any; + + /** returns the exact mouse down target element + */ + target?: any; +} + +export interface DragStopEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the draggable model + */ + model?: ej.Draggable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the event model values + */ + event?: any; + + /** returns the exact mouse down target element + */ + target?: any; +} + +export interface HelperEventArgs { + + /** returns the draggable element object + */ + element?: any; + + /** returns the event model values + */ + sender?: any; +} +} + +class Droppable extends ej.Widget { + static fn: Droppable; + constructor(element: JQuery, options?: Droppable.Model); + constructor(element: Element, options?: Droppable.Model); + model:Droppable.Model; + defaults:Droppable.Model; + + /** destroy in the Droppable. + * @returns {void} + */ + _destroy(): void; +} +export module Droppable{ + +export interface Model { + + /** Used to accept the specified draggable items. + * @Default {null} + */ + accept?: any; + + /** Used to group sets of droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable. + * @Default {'default'} + */ + scope?: string; + + /** This event is triggered when the mouse up is moved during the dragging. */ + drop? (e: DropEventArgs): void; + + /** This event is triggered when the mouse is moved out. */ + out? (e: OutEventArgs): void; + + /** This event is triggered when the mouse is moved over. */ + over? (e: OverEventArgs): void; +} + +export interface DropEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Droppable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the element which accepts the droppable element. + */ + targetElement?: any; +} + +export interface OutEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Droppable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse out over the element + */ + targetElement?: any; +} + +export interface OverEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Droppable.Model; + + /** returns the name of the event + */ + type?: string; + + /** returns the mouse over the element + */ + targetElement?: any; +} +} + +class Resizable extends ej.Widget { + static fn: Resizable; + constructor(element: JQuery, options?: Resizable.Model); + constructor(element: Element, options?: Resizable.Model); + model:Resizable.Model; + defaults:Resizable.Model; + + /** destroy in the Resizable. + * @returns {void} + */ + _destroy(): void; +} +export module Resizable{ + +export interface Model { + + /** Sets the offset of the resizing helper relative to the mouse cursor. + * @Default {{ top: -1, left: -2 }} + */ + cursorAt?: any; + + /** Distance in pixels after mousedown the mouse must move before resizing should start. This option can be used to prevent unwanted drags when clicking on an element. + * @Default {1} + */ + distance?: number; + + /** If specified, restricts resize start click to the specified element(s). + * @Default {null} + */ + handle?: string; + + /** Sets the max height for resizing + * @Default {null} + */ + maxHeight?: number; + + /** Sets the max width for resizing + * @Default {null} + */ + maxWidth?: number; + + /** Sets the min Height for resizing + * @Default {10} + */ + minHeight?: number; + + /** Sets the min Width for resizing + * @Default {10} + */ + minWidth?: number; + + /** Used to group sets of resizable items. + * @Default {'default'} + */ + scope?: string; + + /** This event is triggered when the widget destroys. */ + destroy? (e: DestroyEventArgs): void; + + /** This event is triggered when resized. */ + helper? (e: HelperEventArgs): void; +} + +export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Resizable.Model; + + /** returns the name of the event + */ + type?: string; +} + +export interface HelperEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the autocomplete model + */ + model?: ej.Resizable.Model; + + /** returns the name of the event + */ + type?: string; +} +} + + + 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 { + + /** Specifies the swipe scrolling speed(in millisecond). + * @Default {600} + */ + animationSpeed?: number; + + /** 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|string; + + /** 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|string; + + /** Fires when Scroller control is created. */ + create? (e: CreateEventArgs): void; + + /** Fires when Scroller control is destroyed. */ + destroy? (e: DestroyEventArgs): void; + + /** It will fire when mouse trackball has been start to wheel. */ + wheelStart? (e: WheelStartEventArgs): void; + + /** It fires whenever the mouse wheel is rotated either in upwards or downwards */ + wheelMove? (e: WheelMoveEventArgs): void; + + /** It will fire when mouse trackball has been stop to wheel. */ + wheelStop? (e: WheelStopEventArgs): 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 { + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface WheelStartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; + + /** returns the current data related to the event. + */ + scrollData?: any; + + /** returns the name of the event. + */ + type?: string; +} + +export interface WheelMoveEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the scroller model + */ + model?: ej.Scroller.Model; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; +} + +export interface WheelStopEventArgs { + + /** 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; + + /** returns the original event name and its event properties of the current event. + */ + originalEvent?: any; +} +} + +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; + + /** This method used to Collapses the specified items in accordion at a time. + * @returns {void} + */ + collapsePanel(): 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; + + /** This method used to Expand the specified items in accordion at a time. + * @returns {void} + */ + expandPanel(): 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; + + /** 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; + + /** Returns the current active text value in the Autocomplete suggestion list. + * @returns {void} + */ + getActiveText(): 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; + + /** Enables or disables selecting the animation style for the popup list. Animation types can be selected through either of the following options, + * @Default {slide} + */ + animateType?: ej.Autocomplete.Animation|string; + + /** 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?: Fields; + + /** 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; + + /** An Autocomplete column collection can be defined and customized through the multiColumnSettings property.Column's header, field, and stringFormat can be define via multiColumnSettings properties. + */ + multiColumnSettings?: MultiColumnSettings; + + /** 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; + + /** Sets the value for the Autocomplete textbox based on the given input key value. + */ + selectValueByKey?: number; + + /** 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; + + /** Enables or disables reset icon to clear the textbox values. + * @Default {false} + */ + showResetIcon?: 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 AJAX requests Begins. */ + actionBegin? (e: ActionBeginEventArgs): void; + + /** 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 ActionBeginEventArgs { +} + +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; +} + +export interface Fields { + + /** Used to group the suggestion list items. + */ + groupBy?: string; + + /** Defines the HTML attributes such as id, class, styles for the item. + */ + htmlAttributes?: any; + + /** Defines the specific field name which contains unique key values for the list items. + */ + key?: string; + + /** Defines the specific field name in the data source to load the suggestion list with data. + */ + text?: string; +} + +export interface MultiColumnSettingsColumn { + + /** Get or set a value that indicates to display the columns in the autocomplete mapping with column name of the dataSource. + */ + field?: string; + + /** Get or set a value that indicates to display the title of that particular column. + */ + headerText?: string; + + /** Gets or sets a value that indicates to render the multicolumn with custom theme. + */ + cssClass?: string; + + /** Specifies the search data type. There are four types of data types available such as string, ‘number’, ‘boolean’ and ‘date’. + * @Default {ej.Type.String} + */ + type?: ej.Type|string; + + /** 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?: ej.filterType|string; + + /** This defines the text alignment of a particular column header cell value. See headerTextAlign + * @Default {ej.TextAlign.Left} + */ + headerTextAlign?: ej.TextAlign|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; +} + +export interface MultiColumnSettings { + + /** Allow list of data to be displayed in several columns. + * @Default {false} + */ + enable?: boolean; + + /** Allow header text to be displayed in corresponding columns. + * @Default {true} + */ + showHeader?: boolean; + + /** Displayed selected value and autocomplete search based on mentioned column value specified in that format. + */ + stringFormat?: string; + + /** Field and Header Text collections can be defined and customized through columns field. + */ + columns?: Array; +} + +enum Animation{ + + ///Supports to animation type with none type only. + None, + + ///Supports to animation type with slide type only. + Slide, + + ///Supports to animation type with fade type only. + Fade +} + + +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 {100px} + */ + width?: string|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 Built-in default size height, width specified +Normal, +//Creates button with Built-in mini size height, width specified +Mini, +//Creates button with Built-in small size height, width specified +Small, +//Creates button with Built-in medium size height, width specified +Medium, +//Creates button with Built-in large size height, width specified +Large, +} +enum ButtonType +{ +//Creates button with Built-in button type specified +Button, +//Creates button with Built-in reset type specified +Reset, +//Creates button with Built-in 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 appearance 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 captcha refresh begins. */ + refreshBegin? (e: RefreshBeginEventArgs): void; + + /** Fires after captcha refresh completed. */ + refreshComplete? (e: RefreshCompleteEventArgs): void; + + /** Fires when captcha refresh fails to load. */ + refreshFailure? (e: RefreshFailureEventArgs): void; + + /** Fires after captcha 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 item using its text value. + * @param {string} Text of the listbox item to be selected. + * @returns {void} + */ + selectItemByText(text: string): void; + + /** Selects list item 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?: Array; + + /** 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; + + /** Specifies ellipsis ("...") representation in an overflowed list item content when it is set to false. + * @Default {true} + */ + enableWordWrap?: boolean; + + /** Mapping fields for the data items of the ListBox widget. + * @Default {null} + */ + fields?: Fields; + + /** 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 AngularJS and KnockoutJS. + * @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; + + /** ExecuteQuery 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; +} + +export interface Fields { + + /** Defines the specific field name which contains Boolean values to specify whether the list items to be checked by default or not. + */ + checkBy?: boolean; + + /** The grouping in the ListBox widget can be defined using this field. + */ + groupBy?: string; + + /** Defines the HTML attributes such as id, class, styles for the specific ListBox item. + */ + htmlAttributes?: any; + + /** Defines the specific field name which contains id values for the list items. + */ + id?: string; + + /** Defines the imageURL for the image to be displayed in the ListBox item. + */ + imageUrl?: string; + + /** Defines the image attributes such as height, width, styles and so on. + */ + imageAttributes?: string; + + /** Defines the specific field name which contains Boolean values to specify whether the list items to be selected by default or not. + */ + selectBy?: boolean; + + /** Defines the sprite CSS class for the image to be displayed. + */ + spriteCssClass?: string; + + /** Defines the table name to get the specific set of list items to be loaded in the ListBox widget while rendering with remote data. + */ + tableName?: string; + + /** Defines the specific field name in the data source to load the list with data. + */ + text?: string; + + /** Defines the specific field name in the data source to load the list with data value property. + */ + value?: string; +} +} + +class Calculate { + static fn: Calculate; + constructor(element: JQuery, options?: Calculate.Model); + constructor(element: Element, options?: Calculate.Model); + model:Calculate.Model; + defaults:Calculate.Model; + + /** Add the custom formulas 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 {{ apply: Apply, cancel: Cancel, swatches: Swatches }} + */ + buttonText?: ButtonText; + + /** 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|string; + + /** 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|string; + + /** 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; + + /** Allows to show/hides the switcher button in ColorPicker control.It helps to switch palette or picker mode in colorpicker. + * @Default {true} + */ + showSwitcher?: 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 {{ 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?: TooltipText; + + /** 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; +} + +export interface ButtonText { + + /** Sets the text for the apply button. + */ + apply?: string; + + /** Sets the text for the cancel button. + */ + cancel?: string; + + /** Sets the header text for the swatches area. + */ + swatches?: string; +} + +export interface TooltipText { + + /** Sets the tooltip text for the switcher button. + */ + switcher?: string; + + /** Sets the tooltip text for the add button. + */ + addbutton?: string; + + /** Sets the tooltip text for the basic preset. + */ + basic?: string; + + /** Sets the tooltip text for the mono chrome preset. + */ + monochrome?: string; + + /** Sets the tooltip text for the flat colors preset. + */ + flatcolors?: string; + + /** Sets the tooltip text for the sea wolf preset. + */ + seawolf?: string; + + /** Sets the tooltip text for the web colors preset. + */ + webcolors?: string; + + /** Sets the tooltip text for the sandy preset. + */ + sandy?: string; + + /** Sets the tooltip text for the pink shades preset. + */ + pinkshades?: string; + + /** Sets the tooltip text for the misty preset. + */ + misty?: string; + + /** Sets the tooltip text for the citrus preset. + */ + citrus?: string; + + /** Sets the tooltip text for the vintage preset. + */ + vintage?: string; + + /** Sets the tooltip text for the moon light preset. + */ + moonlight?: string; + + /** Sets the tooltip text for the candy crush preset. + */ + candycrush?: string; + + /** Sets the tooltip text for the current color area. + */ + currentcolor?: string; + + /** Sets the tooltip text for the selected color area. + */ + selectedcolor?: 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 FileExplorer. + */ + 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: {}, search: {}}} + */ + ajaxSettings?: any; + + /** The FileExplorer allows to move the files from one folder to another folder of FileExplorer by using drag and drop option. Also it supports to upload a file by dragging it from windows explorer to the necessary folder of ejFileExplorer. + * @Default {true} + */ + allowDragAndDrop?: boolean; + + /** 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; + + /** By using the contextMenuSettings property, you can customize the ContextMenu in the FileExplorer control. + */ + contextMenuSettings?: ContextMenuSettings; + + /** 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; + + /** Enables or disables the thumbnail image compression option in FileExplorer control. By enabling this option, you can reduce the thumbnail image size while loading. + * @Default {false} + */ + enableThumbnailCompress?: 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 three view types available such as Grid, Tile and Large icons. 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 {250px} + */ + minHeight?: string|number; + + /** Sets the minimum width of FileExplorer control. + * @Default {400px} + */ + 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 checkbox option in FileExplorer control. + * @Default {true} + */ + showCheckbox?: boolean; + + /** 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; + + /** FileExplorer control is displayed with rounded corner when this property is set to true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** FileExplorer control is rendered with thumbnail preview of images in Tile and LargeIcons layout when this property set to true. + * @Default {true} + */ + showThumbnail?: 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], navigation: [Back, Forward, Upward], addressBar: [Addressbar], editing: [Refresh, Upload, Delete, Rename, Download], copyPaste: [Cut, Copy, Paste], getProperties: [Details], searchBar: [Searchbar], layout: [Layout]}} + */ + tools?: any; + + /** The toolsList property is used to arrange the toolbar items in the FileExplorer control. + * @Default {[layout, 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 getting a requested image from server. Also this event will be triggered when you have enabled thumbnail image compression option in FileExplorer.Using this event, you can customize the image compression size. */ + beforeGetImage? (e: BeforeGetImageEventArgs): void; + + /** Fires before files or folders open. */ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /** Fires before uploading the files. */ + beforeUpload? (e: BeforeUploadEventArgs): void; + + /** Fires when FileExplorer control was created */ + create? (e: CreateEventArgs): 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 FileExplorer is destroyed successfully. */ + destroy? (e: DestroyEventArgs): void; + + /** Fires when the files or directory has been started to drag over on the FileExplorer */ + dragStart? (e: DragStartEventArgs): void; + + /** Fires when the files or directory is dragging over on the FileExplorer. */ + drag? (e: DragEventArgs): void; + + /** Fires when the files or directory has been stopped to drag over on FileExplorer */ + dragStop? (e: DragStopEventArgs): void; + + /** Fires when the files or directory is dropped to the target folder of FileExplorer */ + drop? (e: DropEventArgs): void; + + /** Fires after loading the requested image from server. Using this event, you can get the details of loaded image. */ + getImage? (e: GetImageEventArgs): void; + + /** Fires when the file view type is changed. */ + layoutChange? (e: LayoutChangeEventArgs): void; +} + +export interface BeforeAjaxRequestEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the AJAX request 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 BeforeGetImageEventArgs { + + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** enable or disable the image compress option. + */ + canCompress?: boolean; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the expected image size. + */ + size?: any; + + /** 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 CreateEventArgs { + + /** 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 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 DestroyEventArgs { + + /** 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 the event. + */ + type?: string; +} + +export interface DragStartEventArgs { + + /** 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 the event. + */ + type?: string; + + /** returns the dragging element. + */ + target?: any; + + /** returns the path of dragging element. + */ + targetPath?: string; + + /** returns the dragging file details. + */ + selectedItems?: any; +} + +export interface DragEventArgs { + + /** 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 the event. + */ + type?: string; + + /** returns the target element. + */ + target?: any; + + /** returns the name of target element. + */ + targetElementName?: string; + + /** returns the path of target element. + */ + targetPath?: string; +} + +export interface DragStopEventArgs { + + /** 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 the event. + */ + type?: string; + + /** returns the target element. + */ + target?: any; + + /** returns the path of target element. + */ + targetPath?: string; + + /** returns the name of target element + */ + targetElementName?: string; + + /** returns the action, which is performed after dropping the files (upload/ move). + */ + dropAction?: string; + + /** returns the dragging file details + */ + fileInfo?: any; +} + +export interface DropEventArgs { + + /** 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 the event. + */ + type?: string; + + /** returns the target element. + */ + target?: any; + + /** returns the name of target folder. + */ + targetFolder?: string; + + /** returns the path of target folder. + */ + targetPath?: string; + + /** returns the dragging element details. + */ + fileInfo?: any; + + /** returns the action, which is performed after dropping the files (upload/ move). + */ + dropAction?: string; +} + +export interface GetImageEventArgs { + + /** set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** loaded image path. + */ + path?: string; + + /** loaded image element + */ + element?: any; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** original arguments of image load or error event + */ + originalArgs?: any; + + /** returns the action type, which specifies thumbnail preview or opening image. + */ + action?: 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; + + /** return true when we change the layout via interaction, else false. + */ + isInteraction?: boolean; + + /** returns the FileExplorer model. + */ + model?: ej.FileExplorer.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface ContextMenuSettings { + + /** The items property is used to configure and group the required ContextMenu items in FileExplorer control. + * @Default {{% highlight javascript %}{navbar: [NewFolder, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, Getinfo],cwd: [Refresh, Paste,|, Sortby, |, NewFolder, Upload, |, Getinfo],files: [Open, Download, |, Upload, |, Delete, Rename, |, Cut, Copy, Paste, |, OpenFolderLocation, Getinfo]}{% endhighlight %}} + */ + items?: any; + + /** The customMenuFields property is used to define custom functionality for custom ContextMenu item's which are defined in items property. + * @Default {[]} + */ + customMenuFields?: Array; +} + +export interface FilterSettings { + + /** It allows to search the text given in search Textbox in every keyup event. When this property was set as false, searching will works only on Enter key and searchbar blur. + * @Default {true} + */ + allowSearchOnTyping?: boolean; + + /** 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 { + + /** Allows to Resize the width of the columns by simply click and move the particular column header line. + * @Default {true} + */ + allowResizing?: 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 {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: 30% }, { field: dateModified, headerText: Date Modified, width: 30% }, { field: type, headerText: Type, width: 15% }, { field: size, headerText: Size, width: 12%, 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; + + /** Disable the list of specified date value. + * @Default {{}} + */ + blackoutDates?: any; + + /** Sets the specified text value to the today button in the DatePicker calendar. + * @Default {Today} + */ + buttonText?: string; + + /** Sets the root CSS class for DatePicker 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.Short} + */ + 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 allow to show/hide the disabled date ranges + * @Default {true} + */ + showDisabledRange?: 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; + + /** Fires when DatePicker input gets focus. */ + focusIn? (e: FocusInEventArgs): void; + + /** Fires when DatePicker input loses the focus. */ + focusOut? (e: FocusOutEventArgs): void; + + /** Fires when calender view navigates to month/year/decade/century. */ + navigate? (e: NavigateEventArgs): 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; + + /** returns the currently created date as string type. + */ + value?: string; +} + +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 current date object. + */ + date?: any; + + /** 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 NavigateEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the current date object. + */ + date?: any; + + /** returns the DatePicker model. + */ + model?: ej.DatePicker.Model; + + /** returns the previous view state of calendar. + */ + navigateFrom?: string; + + /** returns the current view state of calendar. + */ + navigateTo?: string; + + /** returns the name of the event + */ + type?: string; + + /** returns the current date value. + */ + value?: string; +} + +export interface OpenEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the current date object. + */ + date?: any; + + /** 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 selected date object. + */ + date?: any; + + /** 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; + + /** Specifies the CSS class to customize the date. + */ + cssClass?: 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.Short} + */ + dayHeaderFormat?: ej.DatePicker.Header|string; + + /** Specifies the navigation depth level in DatePicker calendar inside DateTimePicker popup. This option is not applied when start level view option is lower than depth level view. 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; + + /** Specifies the water mark text to be displayed in input text. + * @Default {Select date and time} + */ + watermarkText?: string; + + /** Defines the width of the DateTimePicker textbox. + * @Default {143} + */ + width?: string|number; + + /** Fires before the datetime popup closed in the DateTimePicker. */ + beforeClose? (e: BeforeCloseEventArgs): void; + + /** Fires before the datetime popup open in the DateTimePicker. */ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /** 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 BeforeCloseEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the DateTimePicker model. + */ + model?: ej.DateTimePicker.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the event parameters from DateTimePicker. + */ + events?: any; + + /** returns the DateTimePicker popup. + */ + element?: HTMLElement; +} + +export interface BeforeOpenEventArgs { + + /** Set to true when the event has to be canceled, else false. + */ + cancel?: boolean; + + /** returns the DateTimePicker model. + */ + model?: ej.DateTimePicker.Model; + + /** returns the name of the event. + */ + type?: string; + + /** returns the event parameters from DateTimePicker. + */ + events?: any; + + /** returns the DateTimePicker popup. + */ + element?: HTMLElement; +} + +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; + + /** 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. + */ + height?: string|number; + + /** Enable or disables responsive behavior. + */ + isResponsive?: boolean; + + /** Set the localization culture for Dialog Widget. + */ + 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. + */ + width?: string|number; + + /** Sets the z-index value for the Dialog widget. + */ + zIndex?: number; + + /** Sets the Footer for the Dialog widget. + */ + showFooter?: boolean; + + /** Sets the FooterTemplate for the Dialog widget. + */ + footerTemplateId?: string; + + /** 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; + + /** Triggered when the custom action button clicked. */ + actionButtonClick? (e: ActionButtonClickEventArgs): 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; +} + +export interface ActionButtonClickEventArgs { + + /** Set this option to true to cancel the event. + */ + cancel?: boolean; + + /** Name of the event target attribute. + */ + buttonID?: string; + + /** Name of the event. + */ + type?: string; + + /** Instance of the dialog model object. + */ + model?: ej.Dialog.Model; + + /** Name of the event current target title. + */ + currentTarget?: 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 relates 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 relates to given values + * @returns {void} + */ + unselectItemByValue(index: string|number|Array): void; +} +export module DropDownList{ + +export interface Model { + + /** The Virtual Scrolling(lazy loading) feature is used to display a large amount of data that you require without buffering the entire load of a huge database 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. + * @Default {false} + */ + allowVirtualScrolling?: boolean; + + /** 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; + + /** Allows the user to set the particular country or region language for the DropDownList. + * @Default {en-US} + */ + locale?: string; + + /** 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 when the DropDownList is focused. */ + focusIn? (e: FocusInEventArgs): void; + + /** Fires the action when the DropDownList is about to lose focus. */ + focusOut? (e: FocusOutEventArgs): 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 FocusInEventArgs { + + /** 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 FocusOutEventArgs { + + /** 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 separated 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 Tooltip extends ej.Widget { + static fn: Tooltip; + constructor(element: JQuery, options?: Tooltip.Model); + constructor(element: Element, options?: Tooltip.Model); + model:Tooltip.Model; + defaults:Tooltip.Model; + + /** Destroys the Tooltip control. + * @returns {void} + */ + destroy(): void; + + /** Disables the Tooltip control. + * @returns {void} + */ + disable(): void; + + /** Enables the Tooltip control. + * @returns {void} + */ + enable(): void; + + /** Hide the Tooltip popup. + * @param {string} optional Determines the type of effect that takes place when hiding the tooltip. + * @param {Function} optional custom effect takes place when hiding the tooltip. + * @returns {void} + */ + hide(effect?: string, func?: Function): void; + + /** Shows the Tooltip popup for the given target element with the specified effect. + * @param {string} optional Determines the type of effect that takes place when showing the tooltip. + * @param {Function} optional custom effect takes place when showing the tooltip. + * @param {JQuery} optional Tooltip will be shown for the given element + * @returns {void} + */ + show(effect?: string, func?: Function, target?: JQuery): void; +} +export module Tooltip{ + +export interface Model { + + /** Tooltip control can be accessed through the keyboard shortcut keys. + * @Default {true} + */ + allowKeyboardNavigation?: boolean; + + /** Specifies the animation behavior in Tooltip. It contains the following sub properties. + */ + animation?: Animation; + + /** Sets the position related to target element, window, mouse or (x,y) co-ordinates. + * @Default {ej.Tooltip.Associate.Target} + */ + associate?: ej.Tooltip.Associate|string; + + /** Specified the delay to hide Tooltip when closeMode is auto. + * @Default {4000} + */ + autoCloseTimeout?: number; + + /** Specifies the closing behavior of Tooltip popup. + * @Default {ej.Tooltip.CloseMode.None} + */ + closeMode?: ej.Tooltip.CloseMode|string; + + /** Sets the Tooltip in alternate position when collision occurs. + * @Default {ej.Tooltip.Collision.FlipFit} + */ + collision?: ej.Tooltip.Collision|string; + + /** Specified the selector for the container element. + * @Default {body} + */ + containment?: string; + + /** Specifies the text for Tooltip. + * @Default {null} + */ + content?: string; + + /** Sets the root CSS class for Tooltip for the customization. + * @Default {null} + */ + cssClass?: string; + + /** Enables or disables the Tooltip. + * @Default {true} + */ + enabled?: boolean; + + /** Sets the Tooltip direction from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Defines the height of the Tooltip popup. + * @Default {auto} + */ + height?: string|number; + + /** Enables the arrow in Tooltip. + * @Default {true} + */ + isBalloon?: boolean; + + /** defines various attributes of the Tooltip position + */ + position?: Position; + + /** Enables or disables rounded corner. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Enables or disables shadow effect. + * @Default {false} + */ + showShadow?: boolean; + + /** Specified a selector for elements, within the container. + * @Default {null} + */ + target?: string; + + /** The title text to be displayed in the Tooltip header. + * @Default {null} + */ + title?: string; + + /** Specified the event action to show case the Tooltip. + * @Default {ej.Tooltip.Trigger.Hover} + */ + trigger?: ej.Tooltip.Trigger|string; + + /** Defines the width of the Tooltip popup. + * @Default {auto} + */ + width?: string|number; + + /** This event is triggered before the Tooltip widget get closed. */ + beforeClose? (e: BeforeCloseEventArgs): void; + + /** This event is triggered before the Tooltip widget gets open. */ + beforeOpen? (e: BeforeOpenEventArgs): void; + + /** Fires on clicking to the target element. */ + click? (e: ClickEventArgs): void; + + /** This event is triggered after the Tooltip widget is closed. */ + close? (e: CloseEventArgs): void; + + /** This event is triggered after the Tooltip is created successfully. */ + create? (e: CreateEventArgs): void; + + /** This event is triggered after the Tooltip widget is destroyed successfully. */ + destroy? (e: DestroyEventArgs): void; + + /** This event is triggered while hovering the target element, when tooltip positioning relates to target element. */ + hover? (e: HoverEventArgs): void; + + /** This event is triggered after the Tooltip is opened. */ + open? (e: OpenEventArgs): void; + + /** This event is triggered while hover the target element, when the tooltip positioning is relates to the mouse. */ + tracking? (e: TrackingEventArgs): void; +} + +export interface BeforeCloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the Tooltip's content + */ + content?: string; +} + +export interface BeforeOpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the Tooltip's content + */ + content?: string; +} + +export interface ClickEventArgs { + + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + event?: any; +} + +export interface CloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the Tooltip's content + */ + content?: string; +} + +export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface HoverEventArgs { + + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + event?: any; +} + +export interface OpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the Tooltip's content + */ + content?: string; +} + +export interface TrackingEventArgs { + + /** its value is set as true,if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Tooltip model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the event object + */ + event?: any; +} + +export interface Animation { + + /** Determines the type of effect. + * @Default {ej.Tooltip.Effect.None} + */ + effect?: ej.Tooltip.effect|string; + + /** Sets the animation speed in milliseconds. + * @Default {4000} + */ + speed?: number; +} + +export interface PositionTarget { + + /** Sets the Tooltip position against target based on horizontal(x) value. + * @Default {center} + */ + horizontal?: string|number; + + /** Sets the Tooltip position against target based on vertical(y) value. + * @Default {top} + */ + vertical?: string|number; +} + +export interface PositionStem { + + /** Sets the arrow position again popup based on horizontal(x) value + * @Default {center} + */ + horizontal?: string; + + /** Sets the arrow position again popup based on vertical(y) value + * @Default {bottom} + */ + vertical?: string; +} + +export interface Position { + + /** Sets the Tooltip position against target. + */ + target?: PositionTarget; + + /** Sets the arrow position again popup. + */ + stem?: PositionStem; +} + +enum effect{ + + ///No animation takes place when showing/hiding the Tooltip + None, + + ///Sliding effect takes place when showing/hiding the Tooltip + Slide, + + ///Fade the Tooltip in and out of visibility. + Fade +} + + +enum Associate{ + + ///Sets the position related to target element. + Target, + + ///Sets the position related to mouse. + MouseFollow, + + ///Sets the position related to mouse, first entry to the target element. + MouseEnter, + + ///Sets the position related to (x,y) co-ordinates. + Axis, + + ///Sets the position related to browser window. + Window +} + + +enum CloseMode{ + + ///Enables close button in Tooltip. + Sticky, + + ///Sets the delay for Tooltip close + Auto, + + ///The Tooltip will be display normally. + None +} + + +enum Collision{ + + ///Flips the Tooltip to the opposite side of the target, if collision is occurs. + Flip, + + ///Shift the Tooltip popup away from the edge of the window(collision side) that means adjacent position. + Fit, + + ///Ensure as much of the element is visible as possible to showcase. + FlipFit, + + ///No collision detection is take place + None +} + + +enum Trigger{ + + ///The Tooltip to be shown when the target element is clicked. + Click, + + ///Enables the Tooltip when hover on the target element. + Hover, + + ///Enables the Tooltip when focus is set to target element. + Focus +} + +} + +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 Editors which allow us to customize the appearance. + */ + cssClass?: string; + + /** Specifies the number of digits that should be allowed after the decimal point. + * @Default {0} + */ + decimalPlaces?: number; + + /** Specifies the editor control state. + * @Default {true} + */ + enabled?: boolean; + + /** Specify the enablePersistence to editor to save current editor control value to browser cookies for state maintenance. + * @Default {false} + */ + enablePersistence?: boolean; + + /** Specifies the Right to Left Direction to editor. + * @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 number of digits in each group to the editor. + * @Default {Based on the culture.} + */ + groupSize?: string; + + /** 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 incrementStep value. + * @Default {1} + */ + incrementStep?: number; + + /** Defines the localization culture for 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; + + /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the negative pattern. you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. + * @Default {Based on the culture} + */ + negativePattern?: string; + + /** Specifies the pattern for formatting positive values in editor.We have maintained some standard to define the positive pattern. you have to specify 'n' to place the digit in your pattern.ejTextbox allows you to define a currency or percent symbol where you want to place it. + * @Default {Based on the culture} + */ + positivePattern?: string; + + /** Toggles the readonly state of the editor. When the Editor is readonly it doesn't allow user interactions. + * @Default {false} + */ + readOnly?: boolean; + + /** Specifies to Change the sharped edges into rounded corner for the 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; + + /** Specifies 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. If you have enabled grouping in ListView then you need to pass the corresponding group list title to add item in it. + * @param {any} Specifies the item to be added in ListView + * @param {number} Specifies the index where item to be added + * @param {string} optionalThis is an optional parameter. You must pass the group list title here if grouping is enabled in the ListView + * @returns {void} + */ + addItem(item: any, index: number, groupid: string): 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 text value. + * @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?: string|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 {null} + */ + templateId?: string; + + /** Specifies the width. + * @Default {null} + */ + width?: string|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; + + /** when showPromptChar is true, the hide the prompt characters are shown in focus of the control and hides in focus out of the control. + * @Default {true} + */ + showPromptChar?: 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; + + /** Hides the specific items in Menu control. + * @returns {void} + */ + hideItems(): 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; + + /** Show the specific items in Menu control. + * @returns {void} + */ + showItems(): 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 data bind 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; + + /** Enables/disables responsive support for the Menu control during the window resizing time. + * @Default {true} + */ + isResponsive?: boolean; + + /** 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?: ej.Orientation|string; + + /** Specifies the main menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showRootLevelArrows?: boolean; + + /** Specifies the sub menu items arrows only to be shown if it contains child items. + * @Default {true} + */ + showSubLevelArrows?: boolean; + + /** Specifies position of pull down submenu 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 pager control. + * @param {number} Specifies the index to be navigated + * @returns {void} + */ + gotoPage(pageIndex: number): void; + + /** refreshPager() helps to refresh the model value of pager control. + * @returns {void} + */ + refreshPager(): void; +} +export module Pager{ + +export interface Model { + + /** Gets or sets a value that indicates whether to display the custom text message in Pager. + */ + customText?: string; + + /** Gets or sets a value that indicates whether to define which page to display currently in pager. + * @Default {1} + */ + currentPage?: number; + + /** Gets or sets a value that indicates whether to display the external Message in Pager. + * @Default {false} + */ + enableExternalMessage?: boolean; + + /** 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; + + /** Align content in the pager control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** Gets or sets a value that indicates whether to display the external Message in Pager. + */ + externalMessage?: string; + + /** 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 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 the number of records displayed per page. + * @Default {12} + */ + pageSize?: number; + + /** Get or sets a value of total number of pages in the pager. The totalPages value is calculated based on page size and total records. + * @Default {null} + */ + totalPages?: number; + + /** Get the value of total number of records which is bound to a data item. + * @Default {null} + */ + totalRecordsCount?: number; + + /** Shows or hides the current page information in pager footer. + * @Default {true} + */ + showPageInfo?: 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 list of HTML attributes to be added to rating control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** 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?: number; + + /** 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?: number; + + /** 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?: number; + + /** 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?: number; + + /** 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; + + /** Add new option to Backstage page. + * @param {any} select the object to add the backstage item + * @param {number} index to the backstage item this is optional. + * @returns {void} + */ + addBackStageItem(item: 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(text: 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(text: 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(text: 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(text: string): void; + + /** To customize Group alone in the inside content. + * @param {number} ribbon tab index. + * @param {string} group id to be displayed in ribbon tab . + * @param {any} contentGroup is used in the object + * @returns {void} + */ + updateGroup(tabIndex: number, groupId: string, contentGroup?: any): void; + + /** Update option in existing Backstage. + * @param {number} index to the backstage item + * @param {any} select the object to add the backstage item + * @returns {void} + */ + updateBackStageItem(index: number, item?: any): void; + + /** To customize whole content from Tab Group. + * @param {number} ribbon tab index. + * @param {string} ribbon group index. + * @param {number} sub group index in the ribbon group, + * @returns {void} + */ + removeTabGroupContent(tabIndex: number, groupIndex: string, subGroupIndex?: number): void; + + /** Remove option from Backstage. + * @param {number} index to the backstage item + * @returns {void} + */ + removeBackStageItem(index: number): void; +} +export module Ribbon{ + +export interface Model { + + /** Enables the ribbon resize feature.allowResizing is a deprecated property of isResponsive. + * @Default {false} + */ + allowResizing?: boolean; + + /** When set to true, adapts the Ribbon layout to fit the screen size of devices on which it renders. + * @Default {false} + */ + isResponsive?: boolean; + + /** When isMobileOnly is true,its shows in mobile toolbar. + * @Default {false} + */ + isMobileOnly?: 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; + + /** Align content in the ribbon control from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: any; + + /** 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 group expander 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 before the ribbon control is load. */ + load? (e: LoadEventArgs): 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 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 GroupClickEventArgs { + + /** 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 control clicked in the group. + */ + target?: number; +} + +export interface GroupExpandEventArgs { + + /** 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 clicked group expander. + */ + target?: number; +} + +export interface GalleryItemClickEventArgs { + + /** Set to true when the event has to be canceled, 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 LoadEventArgs { + + /** 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 ApplicationTabBackstageSettingsPage { + + /** 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 ContextualTab { + + /** 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 TabsGroupsContentDefaults { + + /** Specifies the controls height such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {null} + */ + height?: string|number; + + /** Specifies the controls width such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {null} + */ + width?: string|number; + + /** Specifies the controls type such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {ej.Ribbon.Type.Button} + */ + type?: string; + + /** Specifies the controls size such as Syncfusion button,split button,dropdown list,toggle button in the subgroup of the ribbon tab. + * @Default {false} + */ + isBig?: boolean; +} + +export interface TabsGroupsContentGroupsCustomGalleryItem { + + /** 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 TabsGroupsContentGroupsGalleryItem { + + /** 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 TabsGroupsContentGroup { + + /** 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?: TabsGroupsContentDefaults; + + /** 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 TabsGroup { + + /** 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 Tab { + + /** 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 or remove columns in Kanban columns collections.Default action is add. + * @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 key value 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; + + /** 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; + + /** Refresh the Kanban with new data source. + * @param {Array} Pass new data source to the Kanban + * @returns {void} + */ + dataSource(datasource: Array): 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 id of card to be toggle + * @returns {void} + */ + toggleCard(key: string|number): 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; + + /** Get the table details based on the given header table in Kanban. + * @returns {string} + */ + getHeaderTable(): 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; + + /** Print the Kanban Board + * @returns {void} + */ + print(): 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; + + /** 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; + + KanbanSelection: Kanban.KanbanSelection; + + KanbanSwimlane: Kanban.KanbanSwimlane; + + KanbanFilter: Kanban.KanbanFilter; + + KanbanEdit: Kanban.KanbanEdit; +} +export module Kanban{ + +export interface KanbanSelection { + + /** It is used to clear all the card selection. + * @returns {void} + */ + clear(): void; +} + +export interface KanbanSwimlane { + + /** Expand all the swimlane rows in Kanban. + * @returns {void} + */ + expandAll(): void; + + /** Collapse all the swimlane rows in Kanban. + * @returns {void} + */ + collapseAll(): 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} + */ + toggle($div: any): void; +} + +export interface KanbanFilter { + + /** Method used for send a clear search request to Kanban. + * @returns {void} + */ + clearSearch(): 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; + + /** Send a clear request to filter cards in the kanban. + * @returns {void} + */ + clearFilter(): void; + + /** Send a filtering request to cards in the kanban. + * @returns {void} + */ + filterCards(): void; +} + +export interface KanbanEdit { + + /** 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; + + /** Send a cancel request of add/edit card in Kanban. + * @returns {void} + */ + cancelEdit(): 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; + + /** Send a save request in Kanban when any card is in edit/new add card state. + * @returns {void} + */ + endEdit(): 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; + + /** 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; +} + +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 swim lane. + * @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; + + /** To enable filtering behavior on Kanban.User can specify query in filterSettings collection after enabling allowFiltering. + * @Default {false} + */ + allowFiltering?: 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 {false} + */ + 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 a value that indicates whether to enable printing option. + * @Default {false} + */ + allowPrinting?: 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 settings. + * @Default {Object} + */ + cardSettings?: CardSettings; + + /** Gets or sets a value that indicates whether to add customToolbarItems within the toolbar to perform any action in the Kanban. + * @Default {[]} + */ + customToolbarItems?: Array; + + /** Gets or sets a value that indicates to render the Kanban with custom theme. + */ + cssClass?: string; + + /** Gets or sets the data to render the Kanban with cards. + * @Default {null} + */ + dataSource?: any; + + /** To perform kanban functionalities with touch interaction. + * @Default {true} + */ + enableTouch?: boolean; + + /** Align content in the Kanban control align from right to left by setting the property as true. + * @Default {false} + */ + enableRTL?: boolean; + + /** To show total count of cards in each column. + * @Default {false} + */ + enableTotalCount?: 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; + + /** When set to true, adapts the Kanban layout to fit the screen size of devices on which it renders. + * @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. + * @Default {0} + */ + minWidth?: number; + + /** To customize the filtering behavior based on queries given. + * @Default {array} + */ + filterSettings?: Array; + + /** ej Query to query database of Kanban. + * @Default {null} + */ + query?: any; + + /** To change the key in keyboard interaction to Kanban control. + * @Default {null} + */ + keySettings?: any; + + /** Gets or sets an object that indicates whether to customize the scrolling behavior of the Kanban. + * @Default {Object} + */ + scrollSettings?: ScrollSettings; + + /** 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 an object that indicates to render the Kanban with specified workflows. + * @Default {array} + */ + workflows?: 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. + * @Default {en-US} + */ + locale?: string; + + /** Triggered for every Kanban action before its starts. */ + actionBegin? (e: ActionBeginEventArgs): void; + + /** Triggered 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 card is going to be added */ + beginAdd? (e: BeginAddEventArgs): void; + + /** Triggered before the card is selected. */ + 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 Dropped. */ + cardDrop? (e: CardDropEventArgs): void; + + /** Triggered after the card is selected. */ + 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 begin edit 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 card drag start 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 drag 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 previous parent of dragged element + */ + draggedParent?: 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 swim lane. + * @Default {true} + */ + showCount?: boolean; + + /** To enable or disable DragAndDrop across swim lane. + * @Default {false} + */ + allowDragAndDrop?: boolean; +} + +export interface ContextMenuSettingsCustomMenuItem { + + /** Its sets target element to custom context menu item. + * @Default {ej.Kanban.Target.All} + */ + target?: ej.Kanban.Target|string; + + /** Gets the display name to custom menu item. + * @Default {null} + */ + text?: string; + + /** Gets the template to render custom context menu item. + * @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 disable from default context menu items. + * @Default {array} + */ + disableDefaultItems?: Array; + + /** Its used to add specific default context menu items. + * @Default {array} + */ + menuItems?: 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 of constraints as 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 Column { + + /** Gets or sets an object that indicates to render the Kanban with specified columns header text. + * @Default {null} + */ + headerText?: string; + + /** To customize the totalCount properties. + * @Default {false} + */ + totalCount?: string; + + /** Gets or sets an object that indicates to render the Kanban with specified columns key. + * @Default {null} + */ + key?: string|number; + + /** To enable/disable allowDrop for specific column wise. + * @Default {false} + */ + allowDrop?: boolean; + + /** To enable/disable allowDrag for specific column wise. + * @Default {false} + */ + allowDrag?: boolean; + + /** To set column collapse or expand state + * @Default {false} + */ + isCollapsed?: boolean; + + /** To customize the column level constraints with minimum ,maximum limit validation. + * @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 set specific column visibility. + * @Default {true} + */ + visible?: boolean; + + /** Gets or sets an object that indicates whether to show add new button. + * @Default {false} + */ + showAddButton?: boolean; +} + +export interface CardSettings { + + /** Gets or sets a value that indicates to add the template for card . + * @Default {null} + */ + template?: string; + + /** To customize the card border color based on assigned task. Colors and corresponding values defined here will be mapped with colorField mapped data source column. + * @Default {Object} + */ + colorMapping?: any; +} + +export interface CustomToolbarItem { + + /** Gets the template to render customToolbarItems. + * @Default {null} + */ + template?: string; +} + +export interface EditSettingsEditItem { + + /** It is used to map editing field from the data source. + * @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 for the fields while adding new 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; + + /** This specifies the id of the template which is require to be edited using the External edit form. + * @Default {null} + */ + externalFormTemplate?: string; + + /** This specifies to set the position of an External edit form either in the right or bottom of the Kanban. + * @Default {ej.Kanban.FormPosition.Bottom} + */ + formPosition?: ej.Kanban.FormPosition|string; +} + +export interface Fields { + + /** The primarykey field is mapped to data source field. 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 from datasource mapping. + * @Default {null} + */ + swimlaneKey?: string; + + /** Priority field has been mapped data source field to maintain cards priority. + * @Default {null} + */ + priority?: string; + + /** Content field has been Mapped into card text. + * @Default {null} + */ + content?: string; + + /** Tag field has been Mapped into card tag. + * @Default {null} + */ + tag?: string; + + /** Title field has been Mapped to field in datasource for title content. If title field 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 color field. + * @Default {null} + */ + color?: string; + + /** ImageUrl field has been Mapped into card image. + * @Default {null} + */ + imageUrl?: string; +} + +export interface FilterSetting { + + /** 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 ScrollSettings { + + /** Gets or sets an object that indicates to render the Kanban with specified scroll height. + * @Default {0} + */ + height?: string|number; + + /** Gets or sets an object that indicates to render the Kanban with specified scroll width. + * @Default {auto} + */ + width?: string|number; + + /** To allow the Kanban to freeze particular swimlane at the time of scrolling , until scroll reaches next swimlane and it continues. + * @Default {false} + */ + allowFreezeSwimlane?: boolean; +} + +export interface SearchSettings { + + /** To customize the fields the searching operation can be perform. + * @Default {Array} + */ + fields?: Array; + + /** To customize the searching string. + */ + key?: string; + + /** To customize the operator based on searching. + * @Default {contains} + */ + operator?: string; + + /** To customize the ignore case based on searching. + * @Default {true} + */ + ignoreCase?: boolean; +} + +export interface StackedHeaderRowsStackedHeaderColumn { + + /** 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 StackedHeaderRow { + + /** 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; +} + +export interface Workflow { + + /** Gets or sets an object that indicates to render the Kanban with specified workflows key. + * @Default {null} + */ + key?: string|number; + + /** Gets or sets an object that indicates to render the Kanban with specified workflows allowed Transitions. + * @Default {null} + */ + allowedTransitions?: string; +} + +enum Target{ + + ///Sets context menu to Kanban header + Header, + + ///Sets context menu to Kanban content + Content, + + ///Sets context menu to Kanban card + Card, + + ///Sets context menu to Kanban + All +} + + +enum EditMode{ + + ///Creates Kanban with editMode as Dialog + Dialog, + + ///Creates Kanban with editMode as DialogTemplate + DialogTemplate, + + ///Creates Kanban with editMode as ExternalForm + ExternalForm, + + ///Creates Kanban with editMode as ExternalFormTemplate + ExternalFormTemplate +} + + +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 FormPosition{ + + ///Form position is bottom. + Bottom, + + ///Form position is right. + Right +} + + +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; + + /** This method is used to update/modify the slide content of template rotator by using id based on index value. + * @param {number} index of an slide + * @param {string} id of a new updated slide + * @returns {void} + */ + updateTemplateById(index: number, id: string): 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; + + /** The template to display the Rotator widget with customized appearance. + * @Default {null} + */ + template?: string; + + /** 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; + + /** Add a table column at the right or left of the specified cell + * @param {boolean} If it’s true, add a column at the left of the cell, otherwise add a column at the right of the cell + * @param {JQuery} Column will be added based on the given cell element + * @returns {void} + */ + insertColumn(before?: boolean, cell?: JQuery): void; + + /** To add a table row below or above the specified cell. + * @param {boolean} If it’s true, add a row before the cell, otherwise add a row after the cell + * @param {JQuery} Row will be added based on the given cell element + * @returns {void} + */ + insertRow(before?: boolean, cell?: JQuery): 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 specified table column. + * @param {JQuery} Remove the given column element + * @returns {void} + */ + removeColumn(cell?: JQuery): void; + + /** Removes the specified table row. + * @param {JQuery} Remove the given row element + * @returns {void} + */ + removeRow(cell?: JQuery): void; + + /** Deletes the specified table. + * @param {JQuery} Remove the given table + * @returns {void} + */ + removeTable(table?: JQuery): 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; + + /** The showContextMenu property helps to enable custom context menu within editor area. + * @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; + + /** Enables or disables rounded corner UI look for RTE. + * @Default {false} + */ + showRoundedCorner?: 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; + + /** Display the hints for the tools in the Toolbar. + * @Default {{ associate: mouseenter, showShadow: true, position: { stem: { horizontal: left, vertical: top } }, tip: { size: { width: 5, height: 5 }, isBalloon: false }} + */ + tooltipSettings?: any; + + /** 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; + + /** Fires when the text is selected in the text area */ + select? (e: SelectEventArgs): 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 SelectEventArgs { + + /** When the event is canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the RTE model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the event object + */ + event?: any; +} + +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.By defaut animation is false while set the value. If you want to enable the animation, pass the enableAnimation as true to this method. + * @returns {void} + */ + setValue(): void; +} +export module Slider{ + +export interface Model { + + /** Specifies the allowMouseWheel of the slider. + * @Default {false} + */ + allowMouseWheel?: boolean; + + /** 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; + + /** Fires when display the custom tooltip */ + tooltipChange? (e: TooltipChangeEventArgs): 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; +} + +export interface TooltipChangeEventArgs { +} +} +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?: boolean; + + /** 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 splitter control. See orientation + * @Default {ej.orientation.Horizontal or “horizontal”} + */ + orientation?: ej.Orientation|string; + + /** Specify properties for each pane like paneSize, minSize, maxSize, collapsible, expandable, 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 canceled; 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 canceled; 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 canceled; 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 canceled; 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 canceled; 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 available 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; + + /** Specifies the list of HTML attributes to be added to TagCloud control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** 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 column number to categorize the font size. + */ + frequency?: string; + + /** Defines the HTML attributes column for the anchor elements inside the each tag items. + */ + htmlAttributes?: string; + + /** 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 list of time range to be disabled. + * @Default {{}} + */ + disableTimeRanges?: any; + + /** 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 the list of HTML attributes to be added to toolbar control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** 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 after Toolbar control is focused. */ + focusOut? (e: FocusOutEventArgs): 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 FocusOutEventArgs { + + /** 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; + + /** This method is used to collapse all nodes in TreeView control. If you want to collapse all nodes up to the specific level in TreeView control then we need to pass level as argument to this method. + * @param {number} TreeView nodes will collapse until the given level + * @returns {void} + */ + collapseAll(levelUntil?: number): 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; + + /** This method is used to expand all nodes in TreeView control. If you want to expand all nodes up to the specific level in TreeView control then we need to pass level as argument to this method. + * @param {number} TreeView nodes will expand until the given level + * @returns {void} + */ + expandAll(levelUntil?: number): 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; + + /** This method is used to get immediate child nodes of a node in TreeView control. If you want to get the all child nodes include nested child nodes then we need to pass includeNestedChild as true along with element arguments to this method. + * @param {string|any} ID of TreeView node/object of TreeView node + * @param {boolean} Weather include nested child nodes of TreeView node + * @returns {Array} + */ + getChildren(element: string|any, includeNestedChild?: boolean): 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, childes 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 currently selected nodes in TreeView. + * @returns {Array} + */ + getSelectedNodes(): Array; + + /** To get the index position of currently selected node in TreeView. + * @returns {number} + */ + getSelectedNodeIndex(): number; + + /** To get the index positions of currently selected nodes in TreeView. + * @returns {Array} + */ + getSelectedNodesIndex(): Array; + + /** 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. + * @param {string|number} ID of TreeView node + * @returns {Array} + */ + getTreeData(id?: string|number): 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 position of given TreeView node will be based on destination 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 all the TreeView nodes when enable allowMultiSelection property. + * @returns {void} + */ + selectAll(): void; + + /** This method is used to select a node in TreeView control. If you want to select the collection of nodes in TreeView control then we need to enable allowMultiSelection property. + * @param {string|any|Array} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes + * @returns {void} + */ + selectNode(element: string|any|Array): 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 all the TreeView nodes when enable allowMultiSelection property. + * @returns {void} + */ + unselectAll(): void; + + /** This method is used to unselect a node in TreeView control. If you want to unselect the collection of nodes in TreeView control then we need to enable allowMultiSelection property. + * @param {string|any|Array} ID of TreeView node/object of TreeView node/ collection of ID/object of TreeView nodes + * @returns {void} + */ + unselectNode(element: string|any|Array): 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; + + /** Gets or sets a value that indicates whether to enable multi selection support for TreeView. + * @Default {false} + */ + allowMultiSelection?: 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 the selectedNodes index collection as an array. The given array index position denotes the nodes, that are selected while rendering TreeView. + * @Default {[]} + */ + selectedNodes?: Array; + + /** 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; + + /** Fires once node unselected successfully. */ + nodeUnselect? (e: NodeUnselectEventArgs): void; + + /** Fires when TreeView nodes are loaded successfully */ + ready? (e: ReadyEventArgs): 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 key pressed key code 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; + + /** returns the currently removed nodes + */ + removedNodes?: Array; +} + +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 key pressed key code 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 key pressed key code 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 key pressed key code 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; + + /** returns the currently removed nodes + */ + removedNodes?: Array; +} + +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 key pressed key code 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 current selected nodes index of TreeView + */ + selectedNodes?: Array; + + /** 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 NodeUnselectEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the current element of the node unselected + */ + currentElement?: any; + + /** returns the id of the current element of the node unselected + */ + id?: string; + + /** returns the TreeView model + */ + model?: ej.TreeView.Model; + + /** returns the id of the parent element of current element of the node unselected + */ + parentId?: string; + + /** returns the current selected nodes index of TreeView + */ + selectedNodes?: Array; + + /** returns the name of the event + */ + type?: string; + + /** returns the value of the node + */ + value?: string; +} + +export interface ReadyEventArgs { + + /** 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 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; + + /** Refresh the Uploadbox control + * @returns {void} + */ + refresh(): 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 drag and drop support is enabled in the Uploadbox control. + * @Default {Drop files or click to upload} + */ + dropAreaText?: string; + + /** Specifies the dropAreaHeight when the drag and drop support is enabled in the Uploadbox control. + * @Default {100%} + */ + dropAreaHeight?: number|string; + + /** Specifies the dropAreaWidth when the drag and drop 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; + + /** Specifies the list of HTML attributes to be added to uploadbox control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** 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; + + /** Specifies the file details to be displayed when selected for uploading. This can be done when the showFileDetails is set to true. + * @Default {true} + */ + showRoundedCorner?: 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 beforeSend. */ + beforeSend? (e: BeforeSendEventArgs): void; + + /** 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 successed. */ + 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 file is uploading. */ + inProgress? (e: InProgressEventArgs): void; + + /** Fires when the uploaded file is removed successfully. */ + remove? (e: RemoveEventArgs): void; +} + +export interface BeforeSendEventArgs { + + /** Selected FileList Object. + */ + files?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Uploadbox model + */ + model?: any; + + /** XHR-AJAX Object for reference. + */ + xhr?: any; + + /** returns the name of the event. + */ + type?: string; +} + +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 InProgressEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** AJAX event argument for reference. + */ + e?: any; + + /** returns Selected FileList objects + */ + files?: any; + + /** returns the Uploadbox model + */ + model?: any; + + /** returns the current progress percentage. + */ + percentage?: 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; + + /** Specifies the list of HTML attributes to be added to waitingpopup control. + * @Default {{}} + */ + htmlAttributes?: any; + + /** Enables or disables the default loading icon. + * @Default {true} + */ + showImage?: boolean; + + /** Enables the visibility of the WaitingPopup control + * @Default {false} + */ + showOnInit?: boolean; + + /** Specified a selector for elements, within the container. + * @Default {null} + */ + target?: string; + + /** Waitingpopup element append to given container element. + * @Default {null} + */ + appendTo?: string; + + /** 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. + * @param {Array} Pass the array of parameters which need to be ignored on exporting + * @returns {void} + */ + addIgnoreOnExport(propertyNames: Array): void; + + /** Add a new record in grid control when allowAdding is set as true. + * @returns {void} + */ + addRecord(): void; + + /** Add a new record in grid control when allowAdding is set as true. + * @param {Array} Pass the array of added Records + * @param {Array} optionalIf we pass serverChange as true, send post to server side for server action. + * @returns {void} + */ + addRecord(data: Array, serverChange?: Array): 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 specified cell selection based on the rowIndex and columnIndex provided. + * @param {number} It is used to pass the row index of the cell + * @param {number} It is used to pass the column index of the cell. + * @returns {boolean} + */ + clearCellSelection(rowIndex: number, columnIndex: number): 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 + * @param {boolean} optional When templateRefresh is set true, both header and contents get refreshed + * @returns {void} + */ + dataSource(datasource: Array, templateRefresh?: boolean): 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; + + /** 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 + * @returns {void} + */ + export(action: string, serverEvent?: string, multipleExport?: boolean): void; + + /** Send a filtering request to filter one column in grid. + * @param {Array} Pass the field name of the column + * @param {string} string/integer/dateTime operator + * @param {string} 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 + * @param {any} optionalactualFilterValue denote the filter object of current filtered columns.Pass the value to filtered in a column + * @returns {void} + */ + filterColumn(fieldName: Array, filterOperator: string, filterValue: string, predicate: string, matchcase?: boolean, actualFilterValue?: any): 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 calculated summary values of JSON data passed to it + * @param {any} Pass Summary Column details + * @param {any} Pass JSON Array for which its field values to be calculated + * @returns {number} + */ + getSummaryValues(summaryCol: any, summaryData: any): number; + + /** 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; + + /** We can prevent the client side cellSave event triggering by passing the preventSaveEvent argument as true. + * @param {boolean} optionalIf we pass preventSaveEvent as true, it prevents the client side cellSave event triggering + * @returns {void} + */ + saveCell(preventSaveEvent: boolean): void; + + /** Set dimension for grid with corresponding to grid parent. + * @param {number} Pass the height of the grid container + * @param {number} Pass the width of the grid container + * @returns {void} + */ + setDimension(height: number, width: number): 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 the specified columns in grid based on Index provided. + * @param {number} It is used to set the starting index of column for selecting columns. + * @param {number} optionalIt is used to set the ending index of column for selecting columns. + * @returns {boolean} + */ + selectColumns(columnIndex: number, toIndex?: number): boolean; + + /** 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 specified rows in grid based on Index provided. + * @param {Array|number} It is used to set the starting index of row for selecting rows. + * @param {number} optionalIt is used to set the ending index of row for selecting rows. + * @param {any} optionalTarget element which is clicked. + * @returns {void} + */ + selectRows(from: Array|number, to: number, target?: any): 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. + * @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 rows reordering in Grid and drag & drop rows between multiple Grid. + * @Default {false} + */ + allowRowDragAndDrop?: 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. + */ + cssClass?: string; + + /** Gets or sets the data to render the grid with records + * @Default {null} + */ + dataSource?: any; + + /** This specifies the grid to add the details row for the corresponding master row + * @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 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 an object that indicates whether to modify the resizing behaviour. + */ + resizeSettings?: ResizeSettings; + + /** 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 drag and drop behavior of the grid rows + */ + rowDropSettings?: RowDropSettings; + + /** 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; + + /** Gets or sets an object that indicates whether to customize the scrolling behavior of the grid. + */ + scrollSettings?: ScrollSettings; + + /** Gets or sets a value that indicates whether to enable column chooser on grid. On enabling feature able to show/hide grid columns + * @Default {false} + */ + showColumnChooser?: 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 auto wrap the grid header or content or both + */ + textWrapSettings?: TextWrapSettings; + + /** 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 when the row is being dragged. */ + rowDrag? (e: RowDragEventArgs): void; + + /** Triggered when row dragging begins. */ + rowDragStart? (e: RowDragStartEventArgs): void; + + /** Triggered when the row is dropped. */ + rowDrop? (e: RowDropEventArgs): 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 current filtering object. + */ + currentFilterObject?: 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 current filtering object. + */ + currentFilterObject?: any; + + /** 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 current filtering object. + */ + currentFilterObject?: any; + + /** 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 RowDragEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns draggable element type. + */ + draggableType?: any; + + /** Returns the draggable row object. + */ + target?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns target elements based on mouse move position. + */ + currentTarget?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns JSON data of dragged rows. + */ + data?: any; +} + +export interface RowDragStartEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns draggable element type. + */ + draggableType?: any; + + /** Returns the draggable row object. + */ + target?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns drag start element cell. + */ + currentTarget?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the JSON data of dragged rows. + */ + data?: any; +} + +export interface RowDropEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns draggable element type. + */ + draggableType?: string; + + /** Returns the draggable row object. + */ + rows?: any; + + /** Returns the grid model. + */ + model?: any; + + /** Returns the current mouse position cell element. + */ + target?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the JSON data of dragged rows. + */ + data?: any; +} + +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; + + /** Returns the Id of the current toolbar element. + */ + itemId?: string; + + /** Returns the index of the current toolbar element. + */ + itemIndex?: number; + + /** Returns the name of the current toolbar element. + */ + itemName?: string; +} + +export interface ColumnsCommand { + + /** 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 Column { + + /** 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 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; + + /** 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 column editType 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 the order of Column that are to be hidden or visible when Grid element is in responsive mode and could not occupy all columns. + * @Default {null} + */ + priority?: number; + + /** Used to hide the particular column in column chooser by giving value as false. + * @Default {true} + */ + showInColumnChooser?: 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 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; + + /** 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 FilterSettingsFilteredColumn { + + /** 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 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 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 ResizeSettings { + + /** Gets or sets a value that indicates whether to define the mode of resizing.Accepting types are "normal", "nextcolumn" and "control". + * @Default {ej.Grid.ResizeMode.Normal} + */ + resizeMode?: ej.Grid.ResizeMode|string; +} + +export interface RowDropSettings { + + /** This specifies the grid to drop the grid rows only at particular target element. + * @Default {null} + */ + dropTargetID?: any; + + /** This helps in mapping server-side action when rows are dragged from Grid. + * @Default {null} + */ + dragMapper?: string; + + /** This helps in mapping server-side action when rows are dropped in Grid. + * @Default {null} + */ + dropMapper?: string; +} + +export interface SearchSettings { + + /** This specify the grid to search for the value in particular columns that is mentioned in the field. + * @Default {[]} + */ + fields?: 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 selection 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 selection mode.See selectionMode + * @Default {[row]} + */ + selectionMode?: Array; +} + +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?: string|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 is used to enable the enhanced virtual scrolling in Grid. + * @Default {false} + */ + enableVirtualization?: boolean; + + /** This specify the grid to show the horizontal scroll bar, to scroll and view the grid contents + * @Default {250} + */ + width?: string|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 SortSettingsSortedColumn { + + /** 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 StackedHeaderRowsStackedHeaderColumn { + + /** Gets or sets a value that indicates the header text for the particular stacked header column. + * @Default {null} + */ + column?: any; + + /** 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 StackedHeaderRow { + + /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows + * @Default {[]} + */ + stackedHeaderColumns?: Array; +} + +export interface SummaryRowsSummaryColumn { + + /** 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 SummaryRow { + + /** 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 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 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?: Array; +} + +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 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 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 EditMode{ + + ///Edit mode is normal. + Normal, + + ///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 PrintMode{ + + ///Prints all pages. + AllPages, + + ///Prints current page. + CurrentPage +} + + +enum ResizeMode{ + + ///New column size will be adjusted by all other Columns + Normal, + + ///New column Size will be adjusted using next column. + NextColumn, + + ///New column Size will be adjusted using entire control + Control +} + + +enum SelectionType{ + + ///Specifies the selection type as single. + Single, + + ///Specifies the selection type as multiple. + Multiple +} + + +enum VirtualScrollMode{ + + ///virtual scroll mode is normal. + Normal, + + ///virtual scroll mode is continuous. + Continuous +} + + +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 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 +} + +} + +class Sparkline extends ej.Widget { + static fn: Sparkline; + constructor(element: JQuery, options?: Sparkline.Model); + constructor(element: Element, options?: Sparkline.Model); + model:Sparkline.Model; + defaults:Sparkline.Model; + + /** Redraws the entire sparkline. 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 Sparkline{ + +export interface Model { + + /** Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /** Fill color for the sparkline series. + * @Default {#33ccff} + */ + fill?: string; + + /** Border color of the series. + * @Default {null} + */ + stroke?: string; + + /** Options for customizing the color, opacity and width of the sparkline border. + */ + border?: Border; + + /** Border width of the series. + * @Default {1} + */ + width?: number; + + /** Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Color for series high point. + * @Default {null} + */ + highPointColor?: string; + + /** Color for series low point. + * @Default {null} + */ + lowPointColor?: string; + + /** Color for series start point. + * @Default {null} + */ + startPointColor?: string; + + /** Color for series end point. + * @Default {null} + */ + endPointColor?: string; + + /** Color for series negative point. + * @Default {null} + */ + negativePointColor?: string; + + /** Options for customizing the color, opacity of the sparkline start and end range. + */ + rangeBandSettings?: RangeBandSettings; + + /** Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /** Controls whether sparkline has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Controls whether Sparkline has to be rendered as Canvas or SVG.Canvas rendering supports all functionalities in SVG rendering. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Gap or padding for sparkline. + * @Default {8} + */ + padding?: number; + + /** Specifies the type of the series to render in sparkline. + * @Default {line. See Type} + */ + type?: ej.datavisualization.Sparkline.Type|string; + + /** Specifies the theme for Sparkline. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sparkline.Theme|string; + + /** Options to customize the tooltip. + */ + tooltip?: Tooltip; + + /** Options for displaying and customizing marker for a data point. + */ + markerSettings?: MarkerSettings; + + /** Options to customize the Sparkline size. + */ + size?: Size; + + /** Options for customizing the color,dashArray and width of the axisLine. + */ + axisLineSettings?: AxisLineSettings; + + /** Fires before loading the sparkline. */ + load? (e: LoadEventArgs): void; + + /** Fires after loaded the sparkline. */ + loaded? (e: LoadedEventArgs): void; + + /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. */ + tooltipInitialize? (e: TooltipInitializeEventArgs): void; + + /** Fires before rendering a series. This event is fired for each series in Sparkline. */ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /** Fires when mouse is moved over a point. */ + pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + + /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. */ + pointRegionMouseClick? (e: PointRegionMouseClickEventArgs): void; + + /** Fires on moving mouse over the sparkline. */ + sparklineMouseMove? (e: SparklineMouseMoveEventArgs): void; + + /** Fires on moving mouse outside the sparkline. */ + sparklineMouseLeave? (e: SparklineMouseLeaveEventArgs): void; +} + +export interface LoadEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface TooltipInitializeEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** X Location of the trackball tooltip in pixels + */ + locationX?: any; + + /** Y Location of the trackball tooltip in pixels + */ + locationY?: any; + + /** Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; + + /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; +} + +export interface SeriesRenderingEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** Minimum x value of the data point + */ + minX?: any; + + /** Minimum y value of the data point + */ + minY?: any; + + /** Maximum x value of the data point + */ + maxX?: any; + + /** Maximum y value of the data point + */ + maxY?: any; +} + +export interface PointRegionMouseMoveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline 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; + + /** Type of the series + */ + seriesType?: string; +} + +export interface PointRegionMouseClickEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline 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; + + /** Type of the series + */ + seriesType?: string; +} + +export interface SparklineMouseMoveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface SparklineMouseLeaveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface Border { + + /** Border color of the sparkline. + * @Default {transparent} + */ + color?: string; + + /** Width of the Sparkline border. + * @Default {1} + */ + width?: number; +} + +export interface RangeBandSettings { + + /** Start value of the range band. + * @Default {null} + */ + startRange?: number; + + /** End value of the range band. + * @Default {null} + */ + endRange?: number; + + /** Range band opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Range band color of the series. + * @Default {transparent} + */ + color?: string; +} + +export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {transparent} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {#111111} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sparkline.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sparkline.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {8px} + */ + size?: string; +} + +export interface Tooltip { + + /** Show/hides the tooltip visibility. + * @Default {false} + */ + visible?: boolean; + + /** Fill color for the sparkline tooltip. + * @Default {white} + */ + fill?: string; + + /** Custom template to the tooltip. + */ + template?: string; + + /** Options for customizing the border of the tooltip. + */ + border?: TooltipBorder; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; +} + +export interface MarkerSettingsBorder { + + /** Border color of the marker shape. + * @Default {transparent} + */ + color?: string; + + /** Controls the opacity of the marker border. + * @Default {1} + */ + opacity?: number; + + /** Border width of the marker shape. + * @Default {null} + */ + width?: number; +} + +export interface MarkerSettings { + + /** Controls the opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + + /** width of the marker shape. + * @Default {2} + */ + width?: number; + + /** Color of the marker shape. + * @Default {white} + */ + fill?: string; + + /** Options for customizing the border of the marker shape. + */ + border?: MarkerSettingsBorder; +} + +export interface Size { + + /** Height of the Sparkline. Height can be specified in either pixel or percentage. + * @Default {''} + */ + height?: string; + + /** Width of the Sparkline. Width can be specified in either pixel or percentage. + * @Default {''} + */ + width?: string; +} + +export interface AxisLineSettings { + + /** Controls the visibility of the axis. + * @Default {false} + */ + visible?: boolean; + + /** Color of the axis line. + * @Default {'#111111'} + */ + color?: string; + + /** Width of the axis line. + * @Default {1} + */ + width?: number; + + /** Dash array of the axis line. + * @Default {1} + */ + dashArray?: number; +} +} +module Sparkline +{ +enum Type +{ +//string +Area, +//string +Line, +//string +Column, +//string +Pie, +//string +WinLoss, +} +} +module Sparkline +{ +enum Theme +{ +//string +Azure, +//string +FlatLight, +//string +FlatDark, +//string +Azuredark, +//string +Lime, +//string +LimeDark, +//string +Saffron, +//string +SaffronDark, +//string +GradientLight, +//string +GradientDark, +} +} +module Sparkline +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +} +} +module Sparkline +{ +enum FontWeight +{ +//string +Regular, +//string +Bold, +//string +Lighter, +} +} + +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 is helps to update or refresh the PivotGrid with modified data source in client-mode. + * @returns {void} + */ + refreshPivotGrid(): void; + + /** This function allows user to change the caption of the Pivot Item (name displayed in UI) on-demand for relational datasource in client-mode. + * @returns {void} + */ + refreshFieldCaption(): 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?: ej.PivotGrid.AnalysisMode|string; + + /** 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 mouse right-click. + * @Default {false} + */ + enableCellContext?: boolean; + + /** Enables the cell selection for a specified range of value cells. And, the individual row/column cells can be selected by clicking its headers. + * @Default {false} + */ + enableCellSelection?: boolean; + + /** Enables the Drill-Through feature which retrieves the raw items that are used to create a specified cell in PivotGrid. This is only applicable in server mode component. + * @Default {false} + */ + enableDrillThrough?: boolean; + + /** Allows user to get the cell details in JSON format when double clicking the cell. + * @Default {false} + */ + enableCellDoubleClick?: boolean; + + /** Allows user to edit the value cells for write-back support in PivotGrid. This is applicable only for server-mode. + * @Default {false} + */ + enableCellEditing?: 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 layout of the PivotGrid from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to enable ToolTip option. + * @Default {false} + */ + enableToolTip?: boolean; + + /** Allows the user to enable the animation effects in tooltip. + * @Default {false} + */ + enableToolTipAnimation?: 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?: ej.PivotGrid.OperationalMode|string; + + /** 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 before Pivot Engine starts to populate. */ + beforePivotEnginePopulate? (e: BeforePivotEnginePopulateEventArgs): void; + + /** Triggers when double click action is performed over a cell. */ + cellDoubleClick? (e: CellDoubleClickEventArgs): 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 while clicking "OK" button in the drill-through dialog. */ + drillThrough? (e: DrillThroughEventArgs): 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 BeforePivotEnginePopulateEventArgs { + + /** returns the PivotGrid object + */ + pivotObject?: any; + + /** returns the PivotGrid model + */ + model?: ej.PivotGrid.Model; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the name of the event + */ + type?: string; +} + +export interface CellDoubleClickEventArgs { + + /** return the JSON details of the double clicked cell. + */ + selectedData?: any; + + /** return the custom object bounds with PivotGrid widget. + */ + 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 DrillThroughEventArgs { + + /** return the JSON records of the generated cells on drill-through operation. + */ + data?: 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 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 DataSourceColumnsAdvancedFilter { + + /** Allows the user to provide level unique name to do advanced filtering (excel-like) for OLAP data source in client-mode. + */ + name?: string; + + /** Allows the user to set the operator for label filtering to do advanced filtering (excel-like) for OLAP data source in client-mode. + */ + labelFilterOperator?: string; + + /** Allows the user to set the operator for value filtering to do advanced filtering (excel-like) for OLAP data source in client-mode. + */ + valueFilterOperator?: string; + + /** Allows the user to set the filtering type while doing advanced filtering (excel-like) for OLAP data source in client-mode. + */ + advancedFilterType?: string; + + /** Allows the user to holds the filter value in advanced filtering (excel-like) option for OLAP data source in client-mode. + */ + values?: string; +} + +export interface DataSourceColumn { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {[]} + */ + advancedFilter?: Array; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceRowsAdvancedFilter { + + /** Allows the user to provide level unique name to do advanced filtering (excel-like) for OLAP data source in client-mode. + */ + name?: string; + + /** Allows the user to set the operator for label filtering to do advanced filtering (excel-like) for OLAP data source in client-mode. + */ + labelFilterOperator?: string; + + /** Allows the user to set the operator for value filtering to do advanced filtering (excel-like) for OLAP data source in client-mode. + */ + valueFilterOperator?: string; + + /** Allows the user to set the filtering type while doing advanced filtering (excel-like) for OLAP data source in client-mode. + */ + advancedFilterType?: string; + + /** Allows the user to holds the filter value in advanced filtering (excel-like) option for OLAP data source in client-mode. + */ + values?: string; +} + +export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {[]} + */ + advancedFilter?: Array; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceValue { + + /** This holds the measures unique name to bind them from the Cube. + * @Default {[]} + */ + measures?: Array; + + /** Allows to set the axis name to place the measures items. + * @Default {“”} + */ + axis?: string; + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to create new fields by enabling the calculated field option for relational data source at client-side. + * @Default {false} + */ + isCalculatedField?: boolean; + + /** Allows the user to apply the formula as an expression in-order to create new field using calculated field option (in code-behind) for relational data source at client-side. + */ + formula?: string; +} + +export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +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 from database 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; + + /** Allows user to filter the members (by its name and values) by enable the advanced filtering (excel-like) option for OLAP data source in client-mode. + * @Default {false} + */ + enableAdvancedFilter?: boolean; + + /** 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; + + /** Allows the user to set the custom name for the service method that’s responsible for expanding members inside member editor. + * @Default {MemberExpanded} + */ + memberExpand?: string; + + /** Allows the user to set the custom name for the service method that’s responsible for write-back operation in OLAP Cube. This is only applicable in server-side component. + * @Default {WriteBack} + */ + writeBack?: string; +} + +enum AnalysisMode{ + + ///To bind an OLAP data source to PivotGrid. + OLAP, + + ///To bind a relational data source to PivotGrid. + Relational +} + + +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 +} + + +enum OperationalMode{ + + ///To bind data source completely from client-side. + ClientMode, + + ///To bind data source completely from server-side. + ServerMode +} + +} + +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 view PivotTable Field List from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to view the KPI elements in tree-view inside PivotTable Field List. This is only applicable for OLAP datasource. + * @Default {false} + */ + showKPI?: boolean; + + /** Allows the user to view the named sets in tree-view inside PivotTable Field List. This is only applicable for OLAP datasource. + * @Default {false} + */ + showNamedSets?: boolean; + + /** Allows the user to restrict drag and drop operation within the PivotTable Field List. + * @Default {true} + */ + enableDragDrop?: 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; + + /** Triggers when we start dragging any field from PivotSchemaDesigner. */ + dragMove? (e: DragMoveEventArgs): 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 DragMoveEventArgs { + + /** return the HTML of the dragged field from PivotSchemaDesigner. + */ + dragTarget?: any; + + /** return the JSON details of the dragged field. + */ + draggedElementData?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotSchemaDesigner model + */ + model?: ej.PivotSchemaDesigner.Model; +} + +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 PivotChart extends ej.Widget { + static fn: PivotChart; + constructor(element: JQuery, options?: PivotChart.Model); + constructor(element: Element, options?: PivotChart.Model); + model:PivotChart.Model; + defaults:PivotChart.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** Exports the PivotChart to an appropriate format based on the parameter passed. + * @returns {void} + */ + exportPivotChart(): void; + + /** This function receives the JSON formatted datasource to render the PivotChart 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 PivotChart{ + +export interface Model { + + /** Sets the mode for the PivotChart widget for binding either OLAP or Relational data source. + * @Default {ej.PivotChart.AnalysisMode.Olap} + */ + analysisMode?: any; + + /** Specifies the CSS class to PivotChart to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Options available to configure the properties of entire series. You can also override the options for specific series by using series collection. + * @Default {{}} + */ + commonSeriesOptions?: any; + + /** Contains the serialized OlapReport at that instant, that is, current OlapReport. + * @Default {“”} + */ + currentReport?: string; + + /** Initializes the data source for the PivotChart widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /** Allows the user to enable 3D view of PivotChart. + * @Default {false} + */ + enable3D?: boolean; + + /** Allows the user to view PivotChart from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to enable PivotChart’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Options available to customize the legend items and its title. + * @Default {{}} + */ + legend?: any; + + /** Allows the user to set the localized language for the widget. + * @Default {en-US} + */ + locale?: string; + + /** Sets the mode for the PivotChart widget for binding data source either in server-side or client-side. + * @Default {ej.PivotChart.OperationalMode.ClientMode} + */ + operationalMode?: any; + + /** 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. + * @Default {{}} + */ + primaryXAxis?: any; + + /** 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. + * @Default {{}} + */ + primaryYAxis?: any; + + /** Allows the user to rotate the angle of PivotChart 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; + + /** Options to customize the Chart size. + * @Default {{}} + */ + size?: any; + + /** Connects the service using the specified URL for any server updates. + * @Default {“”} + */ + url?: string; + + /** Triggers when PivotChart starts to render. */ + load? (e: LoadEventArgs): void; + + /** Triggers when it reaches client-side after any AJAX request. */ + afterServiceInvoke? (e: AfterServiceInvokeEventArgs): void; + + /** Triggers before any AJAX request is passed from PivotChart to service methods. */ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /** Triggers when drill up/down happens in PivotChart control. */ + drillSuccess? (e: DrillSuccessEventArgs): void; + + /** Triggers when PivotChart 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 PivotChart successfully reaches client-side after any AJAX request. */ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface LoadEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface AfterServiceInvokeEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface DrillSuccessEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the error stack trace of the original exception. + */ + message?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotChart.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface DataSourceColumn { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceValue { + + /** This holds the measures unique name to bind them from the Cube. + * @Default {[]} + */ + measures?: Array; + + /** Allows to set the axis name to place the measures items. + * @Default {“”} + */ + axis?: string; + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; +} + +export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +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 PivotChart. + * @Default {[]} + */ + columns?: Array; + + /** Contains the respective Cube name from database as string type. + * @Default {“”} + */ + cube?: string; + + /** Provides the raw data source for the PivotChart. + * @Default {null} + */ + data?: any; + + /** Lists out the items to be arranged in row section of PivotChart. + * @Default {[]} + */ + rows?: Array; + + /** Lists out the items which supports calculation in PivotChart. + * @Default {[]} + */ + values?: Array; + + /** Lists out the items which supports filtering of values in PivotChart. + * @Default {[]} + */ + filters?: Array; +} + +export interface ServiceMethodSettings { + + /** Allows the user to set the custom name for the service method that’s responsible for drilling up/down operation in PivotChart. + * @Default {DrillChart} + */ + drillDown?: string; + + /** Allows the user to set the custom name for the service method that’s responsible for exporting. + * @Default {Export} + */ + exportPivotChart?: string; + + /** Allows the user to set the custom name for the service method that’s responsible for initializing PivotChart. + * @Default {InitializeChart} + */ + initialize?: string; +} +} + +class PivotClient extends ej.Widget { + static fn: PivotClient; + constructor(element: JQuery, options?: PivotClient.Model); + constructor(element: Element, options?: PivotClient.Model); + model:PivotClient.Model; + defaults:PivotClient.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; +} +export module PivotClient{ + +export interface Model { + + /** Allows the user to set the specific chart type for PivotChart. + * @Default {ej.PivotChart.ChartTypes.Column} + */ + chartType?: ej.PivotChart.ChartTypes|string; + + /** Sets the mode to export the OLAP visualization components such as PivotChart and PivotGrid in PivotClient. Based on the option, either Chart or Grid or both gets exported. + * @Default {ej.PivotClient.ClientExportMode.ChartAndGrid} + */ + clientExportMode?: string; + + /** Specifies the CSS class to PivotClient 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; + + /** Allows the user to view the layout of PivotClient from right to left. + * @Default {false} + */ + enableRTL?: 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 PivotClient 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 PivotClient to service methods. */ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /** Triggers before rendering the PivotChart. */ + chartLoad? (e: ChartLoadEventArgs): void; + + /** Triggers while we initiate loading of the widget. */ + load? (e: LoadEventArgs): void; + + /** Triggers when PivotClient 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 PivotClient successfully reaches client-side after any AJAX request. */ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /** return the current action of PivotClient control. + */ + action?: string; + + /** return the custom object bounds with PivotClient control. + */ + customObject?: any; + + /** return the outer HTML of PivotClient control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotClient model. + */ + model?: ej.PivotClient.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /** return the current action of PivotClient control. + */ + action?: string; + + /** return the custom object bounds with PivotClient control. + */ + customObject?: any; + + /** return the outer HTML of PivotClient control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotClient model. + */ + model?: ej.PivotClient.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface ChartLoadEventArgs { + + /** return the current action of PivotChart control. + */ + action?: string; + + /** return the custom object bounds with PivotChart control. + */ + customObject?: any; + + /** return the outer HTML of PivotChart control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotChart model. + */ + model?: ej.PivotClient.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /** returns the outer HTML of PivotClient component. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotClient model. + */ + model?: ej.PivotClient.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 PivotClient control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotClient model. + */ + model?: ej.PivotClient.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 PivotClient control. + */ + element?: string; + + /** returns the error message with error code. + */ + message?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotClient model. + */ + model?: ej.PivotClient.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 PivotClient control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotClient model. + */ + model?: ej.PivotClient.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface DisplaySettings { + + /** Let’s the user to customize the display of PivotChart and PivotGrid widgets, either in tab view or in tile view. + * @Default {ej.PivotClient.ControlPlacement.Tab} + */ + controlPlacement?: ej.PivotClient.ControlPlacement|string; + + /** Let’s the user to set either Chart or Grid as the start-up widget. + * @Default {ej.PivotClient.DefaultView.Grid} + */ + defaultView?: ej.PivotClient.DefaultView|string; + + /** Enables/disables the full screen view of PivotChart and PivotGrid in PivotClient. + * @Default {false} + */ + enableFullScreen?: boolean; + + /** Enhances the space for PivotGrid and PivotChart, by hiding Cube Browser and Axis Element Builder. + * @Default {false} + */ + enableTogglePanel?: boolean; + + /** Allows the user to enable PivotClient’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Sets the display mode (Only Chart/Only Grid/Both) in PivotClient. + * @Default {ej.PivotClient.DisplayMode.ChartAndGrid} + */ + mode?: ej.PivotClient.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} + */ + exportPivotClient?: 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 PivotClient. + * @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; +} + +enum ControlPlacement{ + + ///To display PivotChart and PivotGrid widgets in tab view. + Tab, + + ///To display PivotChart and PivotGrid widgets within the same view, one below the other. + Tile +} + + +enum DefaultView{ + + ///To set PivotChart as a default control in view when the PivotClient widget is loaded for the first time. + Chart, + + ///To set PivotGrid as a default control in view when the PivotClient widget is loaded for the first time. + Grid +} + + +enum DisplayMode{ + + ///To display only PivotChart widget. + ChartOnly, + + ///To display only PivotGrid widget. + GridOnly, + + ///To display both PivotChart and PivotGrid widgets. + ChartAndGrid +} + +} +module PivotChart +{ +enum ChartTypes +{ +//To render a Line type for PivotChart. +Line, +//To render a Spline type for PivotChart. +Spline, +//To render a Column type for PivotChart. +Column, +//To render a Area type for PivotChart. +Area, +//To render a SplineArea type for PivotChart. +SplineArea, +//To render a StepLine type for PivotChart. +StepLine, +//To render a StepArea type for PivotChart. +StepArea, +//To render a Pie type for PivotChart. +Pie, +//To render a Bar type for PivotChart. +Bar, +//To render a StackingArea type for PivotChart. +StackingArea, +//To render a StackingColumn type for PivotChart. +StackingColumn, +//To render a StackingBar type for PivotChart. +StackingBar, +//To render a Pyramid type for PivotChart. +Pyramid, +//To render a Funnel type for PivotChart. +Funnel, +//To render a Doughnut type for PivotChart. +Doughnut, +//To render a Scatter type for PivotChart. +Scatter, +//To render a Bubble type for PivotChart. +Bubble, +} +} + +class PivotGauge extends ej.Widget { + static fn: PivotGauge; + constructor(element: JQuery, options?: PivotGauge.Model); + constructor(element: Element, options?: PivotGauge.Model); + model:PivotGauge.Model; + defaults:PivotGauge.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** This function is used to refresh the PivotGauge at client-side itself. + * @returns {void} + */ + refresh(): void; + + /** This function removes the KPI related images from PivotGauge. + * @returns {void} + */ + removeImg(): void; + + /** This function receives the JSON formatted datasource to render the PivotGauge control. + * @returns {void} + */ + renderControlFromJSON(): void; +} +export module PivotGauge{ + +export interface Model { + + /** Specifies the background color of pivot gauge. + * @Default {null} + */ + backgroundColor?: string; + + /** Sets the number of column count to arrange the PivotGauge's. + * @Default {0} + */ + columnsCount?: number; + + /** Specify the CSS class to PivotGauge to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /** Initializes the data source for the PivotGauge widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Enables/disables tooltip visibility in PivotGauge. + * @Default {false} + */ + enableTooltip?: boolean; + + /** Allows the user to view PivotGauge from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to enable PivotGauge’s responsiveness in the browser layout. + * @Default {false} + */ + isResponsive?: boolean; + + /** Allows the user to change the format of the label values in PivotGauge. + * @Default {null} + */ + labelFormatSettings?: LabelFormatSettings; + + /** 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 PivotGauge's. + * @Default {0} + */ + rowsCount?: number; + + /** Sets the scale values such as pointers, indicators, etc... for PivotGauge. + * @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 PivotGauge. + * @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 PivotGauge to service methods. */ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /** Triggers when PivotGauge started loading at client-side. */ + load? (e: LoadEventArgs): void; + + /** Triggers when PivotGauge 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 PivotGauge successfully reaches client-side after any AJAX request. */ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /** return the current action of PivotGauge control. + */ + action?: string; + + /** return the custom object bounds with PivotGauge control. + */ + customObject?: any; + + /** return the outer HTML of PivotGauge control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotGauge model. + */ + model?: ej.PivotGauge.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /** return the current action of PivotGauge control. + */ + action?: string; + + /** return the custom object bounds with PivotGauge control. + */ + customObject?: any; + + /** return the outer HTML of PivotGauge control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotGauge model. + */ + model?: ej.PivotGauge.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface LoadEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotGauge model. + */ + model?: ej.PivotGauge.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderCompleteEventArgs { + + /** returns the outer HTML of PivotGauge 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 PivotGauge model. + */ + model?: ej.PivotGauge.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /** returns the outer HTML of PivotGauge 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 PivotGauge model. + */ + model?: ej.PivotGauge.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 PivotGauge 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 PivotGauge model. + */ + model?: ej.PivotGauge.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface DataSourceColumn { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceRowsFilterItems { + + /** Allows the user to set the type of filtering for an item. + * @Default {exclude} + */ + filterType?: string; + + /** Allows the user to set the values for filtering an item. + * @Default {[]} + */ + values?: Array; +} + +export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to set the filtering values name for an item. + * @Default {null} + */ + filterItems?: DataSourceRowsFilterItems; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceValue { + + /** This holds the measures unique name to bind them from the Cube. + * @Default {[]} + */ + measures?: Array; + + /** Allows to set the axis name to place the measures items. + * @Default {“”} + */ + axis?: string; + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; +} + +export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +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 PivotGauge. + * @Default {[]} + */ + columns?: Array; + + /** Contains the respective Cube name from database as string type. + * @Default {“”} + */ + cube?: string; + + /** Provides the raw data source for the PivotGauge. + * @Default {null} + */ + data?: any; + + /** Lists out the items to be arranged in row section of PivotGauge. + * @Default {[]} + */ + rows?: Array; + + /** Lists out the items which supports calculation in PivotGauge. + * @Default {[]} + */ + values?: Array; + + /** Lists out the items which supports filtering of values in PivotGauge. + * @Default {[]} + */ + filters?: Array; +} + +export interface LabelFormatSettings { + + /** Allows the user to change the number format of the label values in PivotGauge. + * @Default {ej.PivotGauge.NumberFormat.Default} + */ + numberFormat?: ej.PivotGauge.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 PivotGauge. + * @Default {InitializeGauge} + */ + initialize?: string; +} + +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 +} + +} + +class PivotTreeMap extends ej.Widget { + static fn: PivotTreeMap; + constructor(element: JQuery, options?: PivotTreeMap.Model); + constructor(element: Element, options?: PivotTreeMap.Model); + model:PivotTreeMap.Model; + defaults:PivotTreeMap.Model; + + /** Perform an asynchronous HTTP (AJAX) request. + * @returns {void} + */ + doAjaxPost(): void; + + /** Perform an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + + /** This function receives the JSON formatted datasource to render the PivotTreeMap control. + * @returns {void} + */ + renderTreeMapFromJSON(): void; + + /** This function receives the update from service-end, which would be utilized for rendering the widget. + * @returns {void} + */ + renderControlSuccess(): void; +} +export module PivotTreeMap{ + +export interface Model { + + /** Specifies the CSS class to PivotTreeMap to achieve custom theme. + * @Default {“”} + */ + cssClass?: string; + + /** Contains the serialized Report at that instant, that is, current Report. + * @Default {“”} + */ + currentReport?: string; + + /** Initializes the data source for the PivotTreeMap widget, when it functions completely on client-side. + * @Default {{}} + */ + dataSource?: DataSource; + + /** Object utilized to pass additional information between client-end and service-end. + * @Default {{}} + */ + customObject?: any; + + /** Allows the user to view the layout of PivotTreeMap from right to left. + * @Default {false} + */ + enableRTL?: boolean; + + /** Allows the user to enable PivotTreeMap’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; + + /** Sets the mode for the PivotTreeMap widget for binding data source either in server-side or client-side. + * @Default {ej.PivotTreeMap.OperationalMode.ClientMode} + */ + operationalMode?: any; + + /** 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 PivotTreeMap to service methods. */ + beforeServiceInvoke? (e: BeforeServiceInvokeEventArgs): void; + + /** Triggers when drill up/down happens in PivotTreeMap control. And it returns the outer HTML of PivotTreeMap control. */ + drillSuccess? (e: DrillSuccessEventArgs): void; + + /** Triggers when PivotTreeMap 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 PivotTreeMap successfully reaches client-side after any AJAX request. */ + renderSuccess? (e: RenderSuccessEventArgs): void; +} + +export interface AfterServiceInvokeEventArgs { + + /** return the current action of PivotTreeMap control. + */ + action?: string; + + /** return the custom object bounds with PivotTreeMap control. + */ + customObject?: any; + + /** return the outer HTML of PivotTreeMap control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotTreeMap model. + */ + model?: ej.PivotTreeMap.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface BeforeServiceInvokeEventArgs { + + /** return the current action of PivotTreeMap control. + */ + action?: string; + + /** return the custom object bounds with PivotTreeMap control. + */ + customObject?: any; + + /** return the outer HTML of PivotTreeMap control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotTreeMap model. + */ + model?: ej.PivotTreeMap.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface DrillSuccessEventArgs { +} + +export interface RenderCompleteEventArgs { + + /** return the current action of PivotTreeMap control. + */ + action?: string; + + /** return the custom object bounds with PivotTreeMap control. + */ + customObject?: any; + + /** return the outer HTML of PivotTreeMap control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotTreeMap model. + */ + model?: ej.PivotTreeMap.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderFailureEventArgs { + + /** return the current action of PivotTreeMap control. + */ + action?: string; + + /** return the custom object bounds with PivotTreeMap control. + */ + customObject?: any; + + /** return the error stack trace of the original exception. + */ + message?: any; + + /** return the outer HTML of PivotTreeMap control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotTreeMap model. + */ + model?: ej.PivotTreeMap.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface RenderSuccessEventArgs { + + /** return the current action of PivotTreeMap control. + */ + action?: string; + + /** return the custom object bounds with PivotTreeMap control. + */ + customObject?: any; + + /** return the outer HTML of PivotTreeMap control. + */ + element?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the PivotTreeMap model. + */ + model?: ej.PivotTreeMap.Model; + + /** returns the name of the event. + */ + type?: string; +} + +export interface DataSourceColumn { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceRow { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +export interface DataSourceValue { + + /** This holds the measures unique name to bind them from the Cube. + * @Default {[]} + */ + measures?: Array; + + /** Allows to set the axis name to place the measures items. + * @Default {“”} + */ + axis?: string; + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; +} + +export interface DataSourceFilter { + + /** Allows the user to bind the item by using its unique name as field name. + */ + fieldName?: string; + + /** Allows the user to set the display name for an item. + */ + fieldCaption?: string; + + /** Allows the user to enable the usage of named set items in respective axis. This is only applicable for OLAP datasource. + * @Default {false} + */ + isNamedSets?: boolean; +} + +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 PivotTreeMap. + * @Default {[]} + */ + columns?: Array; + + /** Contains the respective Cube name from database as string type. + * @Default {“”} + */ + cube?: string; + + /** Provides the raw data source for the PivotTreeMap. + * @Default {null} + */ + data?: any; + + /** Lists out the items to be arranged in row section of PivotTreeMap. + * @Default {[]} + */ + rows?: Array; + + /** Lists out the items which supports calculation in PivotTreeMap. + * @Default {[]} + */ + values?: Array; + + /** Lists out the items which supports filtering of values in PivotTreeMap. + * @Default {[]} + */ + filters?: Array; +} + +export interface ServiceMethodSettings { + + /** Allows the user to set the custom name for the service method that’s responsible for initializing PivotTreeMap. + * @Default {InitializeTreemap} + */ + initialize?: string; + + /** Allows the user to set the custom name for the service method that’s responsible for drilling up/down operation in PivotTreeMap. + * @Default {DrillTreeMap} + */ + drillDown?: string; +} +} + +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 and filters 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 complete appointment list of Schedule control. + * @returns {void} + */ + getAppointments(): void; + + /** Prints the entire Scheduler or a single appointment based on the appointment data passed as an argument to it. Simply calling the print() method, without passing any argument will print the entire Scheduler. + * @param {any} Either accepts no arguments at all or else accepts an appointment object. + * @returns {void} + */ + print(data: any): void; + + /** Refreshes the Scroller of Scheduler while using it within some other controls or application. + * @returns {void} + */ + refreshScroller(): void; + + /** It is used to save the appointment. The appointment object is based on the argument passed to this method. + * @param {any} appointment object which includes appointment details + * @returns {void} + */ + saveAppointment(appointmentObject: any): void; + + /** Generate the recurrence rule as a string, based on the repeat options selected. + * @returns {void} + */ + getRecurrenceRule(): 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 based on the provided search string in its argument list. + * @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; + + /** Refreshes the entire Schedule control. + * @returns {void} + */ + refresh(): void; + + /** Refreshes only the appointment elements within the Schedule control. + * @returns {void} + */ + refreshAppointments(): 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; + + /** Template design that applies on the Schedule appointments. All the field names that are mapped from dataSource to the appropriate field properties within the appointmentSettings can be used within the template. + * @Default {null} + */ + appointmentTemplateId?: string; + + /** Accepts the custom CSS class name that defines specific user-defined styles and themes to be applied for partial or complete elements of the Schedule. + */ + 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 Scheduler. + */ + 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 ej.Schedule.CurrentView.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 false, doesn't render the start and end timezone fields on the Schedule appointment window. + * @Default {true} + */ + showTimeZoneFields?: boolean; + + /** When set to true, displays the quick window for every single click made on the Schedule cells or appointments. + * @Default {true} + */ + showQuickWindow?: 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; + + /** Sets specific day as the starting day of the week. + * @Default {null} + */ + firstDayOfWeek?: string; + + /** Sets different day collection within workWeek view. + * @Default {[Monday, Tuesday, Wednesday, Thursday, Friday]} + */ + workWeek?: Array; + + /** Allows to pop-up appointment details in a tooltip while hovering over the appointments. + */ + 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 and customizes it. + * @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 and customizes it. + * @Default {null} + */ + dateHeaderTemplateId?: string; + + /** when set to false, allows the height of the work-cells to adjust automatically (either expand or collapse) 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; + + /** Blocks the user-specific time interval on the Scheduler, so that no appointments can be created on that particular time slots. It includes the dataSource option and also the fields related to block intervals. + */ + blockoutSettings?: BlockoutSettings; + + /** Triggers on the beginning of every action that starts within the Schedule. */ + actionBegin? (e: ActionBeginEventArgs): void; + + /** Triggers after the completion of every action within the Schedule. */ + actionComplete? (e: ActionCompleteEventArgs): void; + + /** Triggers after an 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 on hovering the mouse over the appointments. */ + appointmentHover? (e: AppointmentHoverEventArgs): void; + + /** Triggers before the new 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 on hovering the mouse overs the cells. */ + cellHover? (e: CellHoverEventArgs): void; + + /** Triggers when the Scheduler completely renders on the page. */ + create? (e: CreateEventArgs): void; + + /** Triggers when the Scheduler and all its sub-components gets destroyed. */ + destroy? (e: DestroyEventArgs): 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 menu/sub-menu items within 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 based on the alertBefore value. */ + 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 an 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 new appointment is saved. */ + appointmentCreated? (e: AppointmentCreatedEventArgs): void; + + /** Triggers after an existing 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 CreateEventArgs { + + /** 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 DestroyEventArgs { + + /** 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 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 appointment 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 start time, end time 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 start time, end time 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 { + + /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule appointments. + * @Default {[]} + */ + dataSource?: any|Array; + + /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. + * @Default {null} + */ + query?: string; + + /** Assign the table name from where the records are to be fetched for the Schedule. + * @Default {null} + */ + tableName?: string; + + /** When set to false, doesn't consider the time difference offset calculation on appointment time. + * @Default {true} + */ + applyTimeOffset?: boolean; + + /** Binds the id field name in dataSource to the id of Schedule appointments. It denotes the unique id assigned to appointments. + * @Default {null} + */ + 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. + * @Default {null} + */ + 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. + * @Default {null} + */ + 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. + * @Default {null} + */ + subject?: string; + + /** Binds the description field name in dataSource. It indicates the appointment description. + * @Default {null} + */ + description?: string; + + /** Binds the name of recurrence field in dataSource. It indicates whether the appointment is a recurrence appointment or not. + * @Default {null} + */ + recurrence?: string; + + /** Binds the name of recurrenceRule field in dataSource. It indicates the recurrence pattern associated with appointments. + * @Default {null} + */ + recurrenceRule?: string; + + /** Binds the name of allDay field in dataSource. It indicates whether the appointment is an all-day appointment or not. + * @Default {null} + */ + allDay?: string; + + /** Binds one or more fields in resource collection dataSource. It maps the resource field names with appointments denoting the resource of appointments actually belongs. + * @Default {null} + */ + resourceFields?: string; + + /** Binds the name of categorize field in dataSource. It indicates the categorize value, red categorize, green, yellow and so on applied to the appointments. + * @Default {null} + */ + categorize?: string; + + /** Binds the name of location field in dataSource. It indicates the appointment location. + * @Default {null} + */ + location?: string; + + /** Binds the name of the priority field in dataSource. It indicates the priority, high, low, medium and none of the appointments. + * @Default {null} + */ + priority?: string; + + /** Binds the name of start timezone field in dataSource. It indicates the timezone of appointment start date. When startTimeZone field is not mentioned, the appointment uses the Schedule timeZone or System timeZone. + * @Default {null} + */ + startTimeZone?: string; + + /** Binds the name of end timezone field in dataSource. It indicates the timezone of appointment end date. When the endTimeZone field is not mentioned, the appointment uses the Schedule timeZone or System timeZone. + * @Default {null} + */ + endTimeZone?: string; +} + +export interface CategorizeSettings { + + /** When set to true, enables the multiple selection of categories to be applied for the appointments. + * @Default {false} + */ + allowMultiple?: boolean; + + /** When set to true, enables the categories option to be applied for the appointments. + * @Default {false} + */ + enable?: boolean; + + /** The dataSource option accepts either the JSON object collection or DataManager [ej.DataManager] instance that contains the categorize data. + */ + 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 ContextMenuSettingsMenuItems { + + /** All the appointment related context menu items are grouped under this appointment menu collection. + */ + appointment?: Array; + + /** All the Scheduler cell related context menu items are grouped under this cells menu item collection. + */ + cells?: Array; +} + +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. + */ + menuItems?: ContextMenuSettingsMenuItems; +} + +export interface Group { + + /** Holds the array of resource names to be grouped on the Schedule. + */ + resources?: Array; +} + +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 {9} + */ + start?: number; + + /** Sets the end time to depict the end of working or business hour in a day. + * @Default {18} + */ + 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 {{% highlight js%}[{ text: None, value: none },{ text: High, value: high },{ text: Medium, value: medium },{ text: Low, value: low }]{% endhighlight %}} + */ + 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 (ejDataManager) instance that contains the resources related data. + * @Default {[]} + */ + 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. + * @Default {null} + */ + text?: string; + + /** Binds id field name in the dataSource to resourceSettings id. + * @Default {null} + */ + id?: string; + + /** Binds groupId field name in the dataSource to resourceSettings groupId. + * @Default {null} + */ + 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. + * @Default {null} + */ + color?: string; + + /** Binds the starting work hour field name in the dataSource. It's optional, but providing it with some numeric value will set the starting work hour for specific resources. + * @Default {null} + */ + start?: string; + + /** Binds the end work hour field name in the dataSource. It's optional, but providing it with some numeric value will set the end work hour for specific resources. + * @Default {null} + */ + 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 specific collection of days (array of day names), only those days will render for the specific resources. + * @Default {null} + */ + workWeek?: string; + + /** Binds appointmentClass field name in the dataSource. It applies custom CSS class name to appointments depicting to the resource it belongs. + * @Default {null} + */ + appointmentClass?: string; +} + +export interface Resource { + + /** It holds the name of the resource field to be bound to the Schedule appointments that contains the resource Id. + * @Default {null} + */ + field?: string; + + /** It holds the title name of the resource field to be displayed on the Schedule appointment window. + * @Default {null} + */ + title?: string; + + /** A unique resource name that is used for differentiating various resource objects while grouping it in various levels. + * @Default {null} + */ + name?: string; + + /** When set to true, allows multiple selection of resource names, thus creating multiple instances of same appointment for the selected resources. + * @Default {false} + */ + allowMultiple?: boolean; + + /** 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. + * @Default {text} + */ + text?: string; + + /** Binds id field name in the dataSource to timeZoneCollection id. + * @Default {id} + */ + id?: string; + + /** Binds value field name in the dataSource to timeZoneCollection value. + * @Default {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 { + + /** Enables or disables the tooltip display. + * @Default {false} + */ + enable?: boolean; + + /** Template design that customizes the tooltip. All the field names that are mapped from dataSource to the appropriate field properties within the appointmentSettings can be accessed within the template. + * @Default {null} + */ + templateId?: string; +} + +export interface TimeScale { + + /** When set to true, displays the time slots on the Scheduler. + * @Default {true} + */ + 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; + + /** Template design that customizes the timecells (minor slots) that are partitioned based on minorSlotCount. Accepts id value of the template defined for minor time slots. + * @Default {null} + */ + minorSlotTemplateId?: string; + + /** Template design that customizes the timecells (major slots). Accepts id value of the template defined for major time slots. + * @Default {null} + */ + majorSlotTemplateId?: string; +} + +export interface BlockoutSettings { + + /** When set to true, enables the blockout option to be applied on the Scheduler cells. + * @Default {false} + */ + enable?: boolean; + + /** Template design that applies on the Schedule block intervals. All the field names that are mapped from dataSource to the appropriate field properties within the blockoutSettings can be used within the template. + * @Default {null} + */ + templateId?: string; + + /** The dataSource option accepts either JSON object collection or DataManager (ej.DataManager) instance that contains Schedule block intervals. + * @Default {[]} + */ + dataSource?: any|Array; + + /** It holds either the ej.Query() object or simply the query string that retrieves the specified records from the table. + * @Default {null} + */ + query?: string; + + /** Assign the table name from where the records are to be fetched for the Schedule. + * @Default {null} + */ + tableName?: string; + + /** Binds the id field name in dataSource to the id of block time interval. It denotes the unique id assigned to each of the block records. + * @Default {null} + */ + id?: string; + + /** Binds the name of startTime field in the dataSource with start time of block time interval. It indicates the date and time, when the block interval actually starts in the Scheduler. + * @Default {null} + */ + startTime?: string; + + /** Binds the name of endTime field in dataSource with the end time of block time interval. It indicates the date and time, when the block interval actually ends in the Scheduler. + * @Default {null} + */ + endTime?: string; + + /** Binds the name of subject field in the dataSource to block time Subject. Indicates the Subject or title that gets displayed on the Schedule block intervals. + * @Default {null} + */ + subject?: string; + + /** Binds the name of isBlockAppointment field in dataSource. When set to true, disables the appointments that lies on the blocked area and restrict to perform CRUD operations in it. + * @Default {null} + */ + isBlockAppointment?: string; + + /** Binds the name of isAllDay field in dataSource. It indicates whether an entire day is blocked or not. + * @Default {null} + */ + isAllDay?: string; + + /** Binds the name of resourceId field in dataSource. Specifies the id of the resources, to which the time intervals are needed to be blocked. + * @Default {null} + */ + resourceId?: string; + + /** Binds the name of customStyle field in dataSource. It applies the custom CSS to the block intervals. + * @Default {null} + */ + customStyle?: string; +} + +enum CurrentView{ + + ///Sets currentView of the Scheduler as Day + Day, + + ///Sets currentView of the Scheduler as Week + Week, + + ///Sets currentView of the Scheduler as WorkWeek + Workweek, + + ///Sets currentView of the Scheduler as Month + Month, + + ///Sets currentView of the Scheduler as Agenda + Agenda, + + ///Sets currentView of the Scheduler as CustomView with user-specified date range. + CustomView +} + + +enum Orientation{ + + ///Set orientation as vertical to Scheduler + Vertical, + + ///Set orientation as horizontal to Scheduler + Horizontal +} + + +enum TimeMode{ + + ///Sets 12 hour time mode to Scheduler + Hour12, + + ///Sets 24 hour time mode to Scheduler + Hour24 +} + +} + +class RecurrenceEditor extends ej.Widget { + static fn: RecurrenceEditor; + constructor(element: JQuery, options?: RecurrenceEditor.Model); + constructor(element: Element, options?: RecurrenceEditor.Model); + model:RecurrenceEditor.Model; + defaults:RecurrenceEditor.Model; + + /** Generates the recurrence rule with the options selected within the Recurrence Editor. + * @returns {void} + */ + getRecurrenceRule(): void; + + /** Generates the collection of date, that lies within the selected recurrence start and end date for which the recurrence pattern applies. + * @param {string} It refers the recurrence rule. + * @param {any} It refers the start date of the recurrence. + * @returns {void} + */ + recurrenceDateGenerator(recurrenceString: string, startDate: any): void; + + /** It splits and returns the recurrence rule string into object collection. + * @param {string} It refers the recurrence rule string. + * @param {any} It refers the appointment dates (ExDate) to be excluded + * @returns {void} + */ + recurrenceRuleSplit(recurrenceRule: string, exDate: any): void; +} +export module RecurrenceEditor{ + +export interface Model { + + /** Defines the collection of recurrence frequencies within Recurrence Editor such as Never, Daily, Weekly, Monthly, Yearly and Every Weekday. + * @Default {[never, daily, weekly, monthly, yearly, everyweekday]} + */ + frequencies?: Array; + + /** Sets the starting day of the week. + * @Default {null} + */ + firstDayOfWeek?: string; + + /** When set to true, enables the spin button of numeric textboxes within the Recurrence Editor. + * @Default {true} + */ + enableSpinners?: boolean; + + /** Sets the start date of the recurrence. The Recurrence Editor initially displays the current date as its start date. + * @Default {new Date()} + */ + startDate?: any; + + /** Sets the specific culture to the Recurrence Editor. + * @Default {en-US} + */ + locale?: string; + + /** Sets the date format for the datepickers available within the Recurrence Editor. + */ + dateFormat?: string; + + /** When set to true, renders the Recurrence Editor options from Right-to-Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets the active/current repeat type(frequency) on Recurrence Editor based on the index value provided. For example, setting the value 1 will initially set the repeat type as Daily and display its related options. + * @Default {0} + */ + selectedRecurrenceType?: number; + + /** Sets the minimum date limit to display on the datepickers defined within the Recurrence Editor. Setting minDate with specific date value disallows the datepickers within Recurrence Editor to navigate beyond that date. + * @Default {new Date(1900, 01, 01)} + */ + minDate?: any; + + /** Sets the maximum date limit to display on the datepickers used within the Recurrence Editor. Setting maxDate with specific date value disallows the datepickers within the Recurrence Editor to navigate beyond that date. + * @Default {new Date(2099, 12, 31)} + */ + maxDate?: any; + + /** Accepts the custom CSS class name, that defines user-defined styles and themes to be applied on partial or complete elements of the Recurrence Editor. + */ + cssClass?: string; + + /** Triggers whenever any of the Recurrence Editor’s value is changed. */ + change? (e: ChangeEventArgs): void; +} + +export interface ChangeEventArgs { + + /** When set to true, event gets canceled. + */ + cancel?: boolean; + + /** Returns the Recurrence Editor model + */ + model?: ej.RecurrenceEditor.Model; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the recurrence rule value. + */ + recurrenceRule?: 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; + + /** To select cell based on the cell and row index dynamically. + * @param {Array} array of cell indexes to be select + * @param {boolean} Defines that we need to preserve the previously selected cells of not + * @returns {void} + */ + selectCells(Indexes: Array, preservePreviousSelectedCell: boolean): 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} Expand 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; + + /** Enables or disables the ability to drag and drop the row interactively to reorder the rows + * @Default {false} + */ + allowDragAndDrop?: 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; + + /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. + * @Default {[]} + */ + columnDialogFields?: Array; + + /** 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; + + /** Specifies the template for cell tooltip + * @Default {null} + */ + cellTooltipTemplate?: string; + + /** Option for customizing the drag tooltip while reordering the rows. + */ + dragTooltip?: DragTooltip; + + /** 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; + + /** Enables or disables the responsiveness of Gantt + * @Default {false} + */ + isResponsive?: boolean; + + /** 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/disables work breakdown structure column. + * @Default {false} + */ + enableWBS?: boolean; + + /** Enables/disables WBS predecessor column. + * @Default {false} + */ + enableWBSPredecessor?: boolean; + + /** Enables or disables the collapse all records when loading the Gantt. + * @Default {false} + */ + enableCollapseAll?: boolean; + + /** Specifies the data source field name to be displayed as left task label + */ + leftTaskLabelMapping?: string; + + /** Specifies the data source field name to be displayed as right task label + */ + rightTaskLabelMapping?: string; + + /** Specifies the template for left task label + */ + leftTaskLabelTemplate?: string; + + /** Specifies the template for right task label + */ + rightTaskLabelTemplate?: string; + + /** 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. + * @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; + + /** Enables/disables the options for inserting , deleting and renaming columns. + * @Default {false} + */ + showColumnOptions?: boolean; + + /** Specifies the template for parent taskbar + */ + parentTaskbarTemplate?: string; + + /** Specifies the row selection type. + * @Default {ej.Gantt.SelectionType.Single} + */ + selectionType?: ej.Gantt.SelectionType|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 , the row with given index will highlighted + * @Default {-1} + */ + selectedRowIndex?: number; + + /** Enables or disables the column chooser. + * @Default {false} + */ + showColumnChooser?: boolean; + + /** Specifies the template for 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 selected cell information on rendering Gantt. + */ + selectedCellIndexes?: Array; + + /** 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; + + /** To Specify the JsRender script Id to customize the task bar with our preference + */ + taskbarTemplate?: string; + + /** To Specify the JsRender script Id to customize the mile stone with our preference + */ + milestoneTemplate?: string; + + /** Enables or disables Gantt to read-only mode + * @Default {false} + */ + readOnly?: boolean; + + /** 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 type of selection whether to select row or cell. + * @Default {ej.Gantt.SelectionMode.Row} + */ + selectionMode?: ej.Gantt.SelectionMode|string; + + /** 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 TreeGrid cell */ + beginEdit? (e: BeginEditEventArgs): void; + + /** Triggered before selecting a cell */ + cellSelecting? (e: CellSelectingEventArgs): void; + + /** Triggered after selected a cell */ + cellSelected? (e: CellSelectedEventArgs): void; + + /** Triggered while dragging a row in Gantt control */ + rowDrag? (e: RowDragEventArgs): void; + + /** Triggered while start to drag row in Gantt control */ + rowDragStart? (e: RowDragStartEventArgs): void; + + /** Triggered while drop a row in Gantt control */ + rowDragStop? (e: RowDragStopEventArgs): 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 when Gantt is rendered completely. */ + create? (e: CreateEventArgs): 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 TreeGrid */ + queryCellInfo? (e: QueryCellInfoEventArgs): void; + + /** Triggered while rendering each taskbar in the Gantt */ + 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 CellSelectingEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the cell index on the selection. + */ + cellIndex?: number; + + /** Returns the row index on the selection + */ + rowIndex?: number; + + /** Returns the selecting cell element + */ + targetCell?: any; + + /** Returns the selecting row element + */ + targetRow?: any; + + /** Returns the selecting record object + */ + data?: any; + + /** Returns the Gantt object Model + */ + model?: any; +} + +export interface CellSelectedEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the cell index on the selection. + */ + cellIndex?: number; + + /** Returns the row index on the selection + */ + rowIndex?: number; + + /** Returns the selecting cell element + */ + targetCell?: any; + + /** Returns the selecting row element + */ + targetRow?: any; + + /** Returns the selecting record object + */ + data?: any; + + /** Returns the Gantt object Model + */ + model?: any; + + /** Returns the previously selected row data + */ + previousData?: any; + + /** Returns the previously selected cell index + */ + previousCellIndex?: any; + + /** Returns the previously selected row index + */ + previousRowIndex?: any; + + /** Returns the previously selected cell element + */ + previousTargetCell?: any; + + /** Returns the previously selected row element + */ + previousTargetRow?: 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 Gantt 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 Gantt 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 Gantt model. + */ + model?: any; + + /** Returns request type. + */ + requestType?: string; + + /** Returns the name of the event. + */ + type?: string; +} + +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 CreateEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the Gantt model + */ + model?: any; + + /** 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 DragTooltip { + + /** Specifies option to enable/disable tooltip while drag and drop a row. + * @Default {true} + */ + showTooltip?: boolean; + + /** Specifies the data source fields to be displayed in the drag tooltip. + * @Default {[]} + */ + tooltipItems?: Array; + + /** Specifies the custom template for drag tooltip. + * @Default {null} + */ + tooltipTemplate?: 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 option for enabling or disabling indent action in Gantt. + * @Default {false} + */ + allowIndent?: boolean; + + /** Specifies the option for enabling or disabling outdent action in Gantt + * @Default {false} + */ + allowOutdent?: boolean; + + /** Specifies the mouse action whether single click or double click to begin the editing + * @Default {ej.Gantt.BeginEditAction.DblClick} + */ + beginEditAction?: ej.Gantt.BeginEditAction|string; + + /** 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; + + /** Specifies the round-off mode for the start date in schedule header. + * @Default {ej.Gantt.TimescaleRoundMode.Auto} + */ + timescaleStartDateMode?: ej.Gantt.TimescaleRoundMode|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 SelectedCellIndex { + + /** Specifies the row index of the cell to be selected Gantt control + */ + rowIndex?: number; + + /** Specifies the cell index to be selected in the row. + * @Default { } + */ + cellIndex?: number; +} + +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 be rendered in Gantt 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 BeginEditAction{ + + ///you can begin the editing at double click + DblClick, + + ///you can begin the editing at single click + Click +} + + +enum SelectionType{ + + ///you can select a single row. + Single, + + ///you can select a multiple row. + Multiple +} + + +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 TimescaleRoundMode{ + + ///The round-off value will be automatically calculated based on the data source values. + Auto, + + ///Schedule header start date will round-off to the immediate week. + Week, + + ///Schedule headers start date will round off to the immediate month + Month, + + ///Schedule headers start date will round off to the immediate year + Year +} + + +enum SelectionMode{ + + ///you can select a row. + Row, + + ///you can select a cell. + Cell +} + + +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 DataSource { + + /** 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 Parameter { + + /** 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 available 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; + + /** Adds a new row in TreeGrid, while allowAdding is set to true + * @param {any} Item to add in TreeGrid row. + * @param {string} Defines in which position the row wants to be added + * @returns {void} + */ + addRow(data: any, rowPosition: string): void; + + /** 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 select cell based on the cell and row index dynamically. + * @param {Array} array of cell indexes to be select + * @param {boolean} Defines that we need to preserve the previously selected cells or not + * @returns {void} + */ + selectCells(Indexes: Array, preservePreviousSelectedCell: boolean): void; + + /** To rename a column with the specified name + * @param {number} Index of the column to be renamed + * @param {string} Header text of the column + * @returns {void} + */ + renameColumn(columnIndex: number, name: string): void; + + /** To delete the specified column + * @param {number} Index of the column to be deleted + * @returns {void} + */ + deleteColumn(columnIndex: 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; + + /** Expands the records at specific hierarchical level + * @param {number} you can pass the level as index number to expand + * @returns {void} + */ + expandAtLevel(index: number): void; + + /** Collapses the records at specific hierarchical level + * @param {number} you can pass the particular level as index. + * @returns {void} + */ + collapseAtLevel(index: number): 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; + + /** Enables/disables pagination of rows in TreeGrid + * @Default {false} + */ + allowPaging?: 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; + + /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. + * @Default {[]} + */ + columnDialogFields?: Array; + + /** Options for displaying and customizing context menu items. + */ + contextMenuSettings?: ContextMenuSettings; + + /** Specify the CSS class for TreeGrid to achieve custom theme. + */ + cssClass?: string; + + /** 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; + + /** Options for filtering and customizing filter actions. + */ + filterSettings?: FilterSettings; + + /** Specifies the localization information to customize the User Interface (UI) to support regional language and culture + * @Default {en-US} + */ + locale?: string; + + /** Specifies the name of the field in the dataSource, which contains the id of that row. + */ + idMapping?: string; + + /** Enables or disables the responsiveness of TreeGrid + * @Default {false} + */ + isResponsive?: boolean; + + /** 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 the options for customizing the pager. + */ + pageSettings?: PageSettings; + + /** Specifies the template for cell tooltip + * @Default {null} + */ + cellTooltipTemplate?: 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 row or cell. + * @Default {ej.TreeGrid.SelectionMode.Row} + */ + selectionMode?: ej.TreeGrid.SelectionMode|string; + + /** Specifies the type of selection whether to select single row or multiple rows. + * @Default {ej.TreeGrid.SelectionType.Single} + */ + selectionType?: ej.TreeGrid.SelectionType|string; + + /** Enables/disables the options for inserting , deleting and renaming columns. + * @Default {false} + */ + showColumnOptions?: boolean; + + /** 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 the visibility of details view + * @Default {false} + */ + showDetailsRow?: boolean; + + /** Specifies the visibility of the expander column which is used to expand or collapse the details view + * @Default {false} + */ + showDetailsRowInfoColumn?: boolean; + + /** Specifies the template for details view + */ + detailsTemplate?: string; + + /** Specifies the row height of the details view + * @Default {100} + */ + detailsRowHeight?: number; + + /** Specifies the visibility of summary row + * @Default {false} + */ + showSummaryRow?: boolean; + + /** Specifies the visibility of total summary row for the corresponding summary column + * @Default {false} + */ + showTotalSummary?: boolean; + + /** Specifies the summary row collection object to be displayed + * @Default {[]} + */ + summaryRows?: Array; + + /** 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 after a column resized */ + columnResized? (e: ColumnResizedEventArgs): void; + + /** Triggered while start to resize a column */ + columnResizeStart? (e: ColumnResizeStartEventArgs): void; + + /** Triggered when a column has been resized */ + columnResizeEnd? (e: ColumnResizeEndEventArgs): void; + + /** Triggered while Context Menu is rendered in TreeGrid control */ + contextMenuOpen? (e: ContextMenuOpenEventArgs): void; + + /** Triggered when TreeGrid is rendered completely */ + create? (e: CreateEventArgs): 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 before selecting a cell */ + cellSelecting? (e: CellSelectingEventArgs): void; + + /** Triggered after selected a cell */ + cellSelected? (e: CellSelectedEventArgs): 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 collapsed 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 ColumnResizedEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the control model values. + */ + model?: any; + + /** Returns the event Type. + */ + type?: string; + + /** Returns the column data which is resized + */ + column?: any; + + /** Returns the index of the column being resized. + */ + columnIndex?: number; + + /** Returns resized column width after resized. + */ + newWidth?: number; + + /** Returns resized column width before resizing + */ + oldWidth?: number; +} + +export interface ColumnResizeStartEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the control model values. + */ + model?: any; + + /** Returns the event Type. + */ + type?: string; + + /** Returns the column data in which the resizing started + */ + column?: any; + + /** Returns the column index in which the resizing started + */ + columnIndex?: number; + + /** Returns column width before dragging + */ + oldWidth?: number; + + /** Returns initial column element object. + */ + target?: any; +} + +export interface ColumnResizeEndEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the control model values. + */ + model?: any; + + /** Returns the event Type. + */ + type?: string; + + /** Returns the column data in which the resizing started + */ + column?: any; + + /** Returns the column index in which the resizing started + */ + columnIndex?: number; + + /** Returns the column width difference, before and after the resizing + */ + extra?: number; + + /** Returns the new column width after resized + */ + newWidth?: number; + + /** Returns column width before dragging + */ + oldWidth?: number; + + /** Returns initial column element object. + */ + target?: any; +} + +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 CreateEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the TreeGrid model + */ + model?: any; + + /** 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 CellSelectingEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the cell index on the selection. + */ + cellIndex?: number; + + /** Returns the row index on the selection + */ + rowIndex?: number; + + /** Returns the selecting cell element + */ + targetCell?: any; + + /** Returns the selecting row element + */ + targetRow?: any; + + /** Returns the selecting record object + */ + data?: any; + + /** Returns the Gantt object Model + */ + model?: any; +} + +export interface CellSelectedEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the cell index on the selection. + */ + cellIndex?: number; + + /** Returns the row index on the selection + */ + rowIndex?: number; + + /** Returns the selecting cell element + */ + targetCell?: any; + + /** Returns the selecting row element + */ + targetRow?: any; + + /** Returns the selecting record object + */ + data?: any; + + /** Returns the Gantt object Model + */ + model?: any; + + /** Returns the previously selected row data + */ + previousData?: any; + + /** Returns the previously selected cell index + */ + previousCellIndex?: any; + + /** Returns the previously selected row index + */ + previousRowIndex?: any; + + /** Returns the previously selected cell element + */ + previousTargetCell?: any; + + /** Returns the previously selected row element + */ + previousTargetRow?: 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; + + /** 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 Column { + + /** 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; + + /** Enables/disables cell selection. + * @Default {false} + */ + allowCellSelection?: 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 the display format of a column + * @Default {null} + */ + format?: any; + + /** Specifies whether the column is a template column + * @Default {false} + */ + isTemplateColumn?: boolean; + + /** Specifies the alignment of the column header text + * @Default {ej.TextAlign.Left} + */ + headerTextAlign?: ej.TextAlign|string; + + /** Specifies whether the column is frozen + * @Default {false} + */ + isFrozen?: boolean; + + /** Specifies the text alignment for the column + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + + /** Specifies the template for the TreeGrid column + */ + templateID?: string; + + /** Enables or disables the ability to edit a row or cell. + * @Default {false} + */ + allowEditing?: 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 mouse action whether single click or double click to begin the editing + * @Default {ej.TreeGrid.BeginEditAction.DblClick} + */ + beginEditAction?: ej.TreeGrid.BeginEditAction|string; + + /** 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 FilterSettings { + + /** Specifies the mode on which column filtering should start + * @Default {immediate} + */ + filterBarMode?: string; + + /** Specifies the column collection for filtering the TreeGrid content on initial load + * @Default {[]} + */ + filteredColumns?: Array; +} + +export interface PageSettings { + + /** Using this property we can specify the number of pages should pager contains, according to this count TreeGrid height will be updated. + * @Default {8} + */ + pageCount?: number; + + /** This specifies the number of rows to display in each page. + * @Default {12} + */ + pageSize?: number; + + /** Get the value of records which is bound to TreeGrid. The totalRecordsCount value is calculated based on the datasource bound to TreeGrid. + * @Default {null} + */ + totalRecordsCount?: number; + + /** Specifies the current page to display at load time. + * @Default {1} + */ + currentPage?: number; + + /** Specifies the mode of record count in a page, whether it should count all the records or the root to count zero level parent records. + * @Default {ej.TreeGrid.PageSizeMode.All} + */ + pageSizeMode?: ej.TreeGrid.PageSizeMode|string; + + /** Specifies the Custom template for Pager control. + * @Default {null} + */ + template?: 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; + + /** Specifies the list of toolbar items to be rendered in TreeGrid 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 BeginEditAction{ + + ///you can begin the editing at double click + DblClick, + + ///you can begin the editing at single click + Click +} + + +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 +} + + +enum PageSizeMode{ + + ///To count all the parent and child records. + All, + + ///To count the Zeroth level parent records. + Root +} + + +enum SelectionMode{ + + ///you can select a row. + Row, + + ///you can select a cell. + Cell +} + + +enum SelectionType{ + + ///you can select a single row. + Single, + + ///you can select a multiple row. + Multiple +} + +} + +class GroupButton extends ej.Widget { + static fn: GroupButton; + constructor(element: JQuery, options?: GroupButton.Model); + constructor(element: Element, options?: GroupButton.Model); + model:GroupButton.Model; + defaults:GroupButton.Model; + + /** Remove the selection state of the specified the button element from the GroupButton + * @param {JQuery} Specific button element + * @returns {void} + */ + deselectItem(element: JQuery): void; + + /** Destroy the GroupButton 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 GroupButton control + * @returns {void} + */ + disable(): void; + + /** Disable the specified button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + disableItem(element: JQuery): void; + + /** Enables the disabled ejGroupButton control. + * @returns {void} + */ + enable(): void; + + /** Enable the specified disabled button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + enableItem(element: JQuery): void; + + /** Returns the index value for specified button element in the GroupButton control. + * @param {JQuery} Specific button element + * @returns {number} + */ + getIndex(element: JQuery): number; + + /** This method returns the list of active state button elements from the GroupButton control. + * @param {JQuery} Specific button element + * @returns {number} + */ + getSelectedItem(element: JQuery): number; + + /** Hides the GroupButton control + * @returns {void} + */ + hide(): void; + + /** Hide the specified button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + hideItem(element: JQuery): void; + + /** Returns the disabled state of the specified element button element in GroupButton as Boolean. + * @returns {boolean} + */ + isDisabled(): boolean; + + /** Returns the state of the specified button element as Boolean. + * @returns {boolean} + */ + isSelected(): boolean; + + /** Public method used to select the specified button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + selectItem(element: JQuery): void; + + /** Shows the GroupButton control, if its hide. + * @returns {void} + */ + show(): void; + + /** Show the specified hidden button element from the ejGroupButton control. + * @param {JQuery} Specific button element + * @returns {void} + */ + showItem(element: JQuery): void; +} +export module GroupButton{ + +export interface Model { + + /** Sets the specified class to GroupButton wrapper element, which allows for custom skinning option in ejGroupButton control. + */ + cssClass?: string; + + /** To set the local JSON data, define a JSON array and initialize the GroupButton with dataSource property. Specify the column names in the fields property. + * @Default {null} + */ + dataSource?: any; + + /** Displays the ejGroupButton in Right to Left direction. + * @Default {false} + */ + enableRTL?: boolean; + + /** Used to enable or disable the ejGroupButton control. + * @Default {true} + */ + enabled?: boolean; + + /** Gets or sets a value that indicates to display the values of the data. + * @Default {null} + */ + fields?: any; + + /** Sets the GroupButton behavior to works as Checkbox mode/ radio button mode based on the specified option. + * @Default {ej.GroupButtonMode.RadioButton} + */ + groupButtonMode?: ej.GroupButtonMode | string; + + /** Used to sets the height of the ejGroupButton control. + * @Default {28} + */ + height?: string|number; + + /** Defines the characteristics of the ejGroupButton control and extend the capability of an HTML element by adding specified attributes to element tag and by performing the related actions + * @Default {{}} + */ + htmlAttributes?: any; + + /** Specify the orientation of the GroupButton. See below to get available orientations + * @Default {ej.Orientation.Horizontal} + */ + orientation?: ej.Orientation|string; + + /** Query the dataSource from the table for Groupbutton + * @Default {null} + */ + query?: any; + + /** Sets the list of button elements to be selected. To enable this option groupButtonMode should be in “checkbox” mode. + * @Default {[]} + */ + selectedItemIndex?: number[]|string[]; + + /** Sets the rounder corner to the GroupButton, if sets as true. + * @Default {false} + */ + showRoundedCorner?: boolean; + + /** Specifies the size of the button. See available size + * @Default {ej.ButtonSize.Normal} + */ + size?: ej.ButtonSize|string; + + /** Defines the width of the ejGroupButton control. + */ + width?: string|number; + + /** Triggered before any button element in the GroupButton get selected. */ + beforeSelect? (e: BeforeSelectEventArgs): void; + + /** Fires after GroupButton 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 GroupButton 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; + + /** Triggered once the key is pressed, when the control is in focused state. */ + keyPress? (e: KeyPressEventArgs): void; + + /** Triggered when the button element get selected. */ + select? (e: SelectEventArgs): void; +} + +export interface BeforeSelectEventArgs { + + /** Boolean value based on whether the button element is disabled or not. + */ + disabled?: boolean; + + /** Returns the selection button element. + */ + element?: any; + + /** Event object + */ + event?: any; + + /** Return the button element ID. + */ + id?: string; + + /** Button item index. + */ + index?: number; + + /** returns the button model + */ + model?: ej.GroupButton.Model ; + + /** Boolean value based on whether the button element is selected or not. + */ + selected?: boolean; + + /** returns the name of the event + */ + type?: string; + + /** return the button state + */ + status?: boolean; +} + +export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the GroupButton model + */ + model?: ej.GroupButton.Model; + + /** returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the GroupButton model + */ + model?: ej.GroupButton.Model; + + /** returns the name of the event + */ + type?: string; +} + +export interface KeyPressEventArgs { + + /** Boolean value based on whether the button element is disabled or not. + */ + disabled?: boolean; + + /** Returns the selection button element. + */ + element?: any; + + /** Event object + */ + event?: any; + + /** Return the button element ID. + */ + id?: string; + + /** Button item index. + */ + index?: number; + + /** returns the button model + */ + model?: ej.GroupButton.Model; + + /** Boolean value based on whether the button element is selected or not. + */ + selected?: boolean; + + /** returns the name of the event + */ + type?: string; + + /** return the button state + */ + status?: boolean; +} + +export interface SelectEventArgs { + + /** Boolean value based on whether the selected button element is disabled or not. + */ + disabled?: boolean; + + /** Returns the selection button element. + */ + element?: any; + + /** Event object + */ + event?: any; + + /** Return the selected button element ID. + */ + id?: string; + + /** Selected button item index. + */ + index?: number; + + /** returns the button model + */ + model?: ej.GroupButton.Model; + + /** Boolean value based on whether the button element is selected or not. + */ + selected?: boolean; + + /** returns the name of the event + */ + type?: string; + + /** return the button state + */ + status?: boolean; +} +} +enum GroupButtonMode +{ +//Sets the GroupButton to work as checkbox mode +CheckBox, +//Sets the RadioButton to work as radio button mode +RadioButton, +} + +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; +} + +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; +} + +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; +} +} + +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 radialmenu + * @returns {void} + */ + hide(): void; + + /** To hide the radialmenu items + * @returns {void} + */ + hideMenu(): void; + + /** To Show the radial menu + * @returns {void} + */ + show(): void; + + /** To show menu items + * @returns {void} + */ + showMenu(): void; + + /** To enable menu item using index + * @returns {void} + */ + enableItemByIndex(): void; + + /** To enable menu items using indices + * @returns {void} + */ + enableItemsByIndices(): void; + + /** To disable menu item using index + * @returns {void} + */ + disableItemByIndex(): void; + + /** To disable menu items using indices + * @returns {void} + */ + disableItemsByIndices(): void; + + /** To enable menu item using item text + * @returns {void} + */ + enableItem(): void; + + /** To disable menu item using item text + * @returns {void} + */ + disableItem(): void; + + /** To enable menu items using item texts + * @returns {void} + */ + enableItems(): void; + + /** To disable menu items using item texts + * @returns {void} + */ + disableItems(): void; + + /** To update menu item badge value + * @returns {void} + */ + updateBadgeValue(): void; + + /** To show menu item badge + * @returns {void} + */ + showBadge(): void; + + /** To hide menu item badge + * @returns {void} + */ + hideBadge(): void; +} +export module RadialMenu{ + +export interface Model { + + /** To show the Radial in initial 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; + + /** Specify the items of radial menu + */ + items?: Array; + + /** Specifies the radius of radial menu + */ + radius?: number; + + /** To show the Radial while clicking given target element. + */ + targetElementId?: string; + + /** To set radial render position. + */ + position?: any; + + /** Event triggers when we click an item. */ + click? (e: ClickEventArgs): void; + + /** Event triggers when the menu is opened. */ + open? (e: OpenEventArgs): void; + + /** Event triggers when the menu is closed. */ + close? (e: CloseEventArgs): void; +} + +export interface ClickEventArgs { + + /** 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 OpenEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialmenu model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface CloseEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialmenu model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface ItemsBadge { + + /** Specifies whether to enable radialmenu item badge or not. + */ + enabled?: boolean; + + /** Specifies the value of radial menu item badge. + */ + value?: number; +} + +export interface ItemsSliderSettings { + + /** Specifies the sliderSettings ticks values of nested radial menu items. + */ + ticks?: Array; + + /** Specifies the sliderSettings stroke Width value. + */ + strokeWidth?: number; + + /** Specifies the value of sliderSettings labelSpace . + */ + labelSpace?: number; +} + +export interface Item { + + /** Specify the URL of the frame background image for radial menu item. + */ + imageUrl?: string; + + /** Specifies the text of RadialMenu item. + */ + text?: string; + + /** Specifies the enable state of RadialMenu item. + */ + enabled?: boolean; + + /** specify the click event to corresponding image/text for performing some specific action. + */ + click?: string; + + /** Specifies radialmenu item badges. + */ + badge?: ItemsBadge; + + /** Specifies the type of nested radial menu item. + */ + type?: string; + + /** Specifies the sliderSettings ticks for nested radial menu items. + */ + sliderSettings?: ItemsSliderSettings; + + /** Specifies to add sub level items . + */ + items?: Array; +} +} + +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 + * @param {number} index of the tile + * @returns {void} + */ + updateTemplate(id: string, index: number): void; +} +export module Tile{ + +export interface Model { + + /** Section for badge specific functionalities and it represents the notification for tile items. + */ + badge?: Badge; + + /** Section for caption specific functionalities and it represents the notification for tile items. + */ + caption?: Caption; + + /** 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. + * @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 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 {null} + */ + backgroundColor?: string; + + /** Event triggers when the mouseDown happens in the tile */ + mouseDown? (e: MouseDownEventArgs): void; + + /** Event triggers when the mouseUp 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 Caption { + + /** Specifies whether the tile text to be shown or hidden. + * @Default {true} + */ + enabled?: boolean; + + /** Changes the text of a tile. + * @Default {Text} + */ + text?: string; + + /** It is used to align the text of a tile. + * @Default {normal} + */ + alignment?: ej.Tile.CaptionAlignment|string; + + /** It is used to specify the caption position like Inner top, inner bottom and outer. + * @Default {Innerbottom} + */ + position?: ej.Tile.CaptionPosition|string; + + /** sets the icon instead of text. + * @Default {null} + */ + icon?: string; +} + +export interface LiveTile { + + /** Specifies whether to enable liveTile or not. + * @Default {false} + */ + enabled?: boolean; + + /** Specifies liveTile images in CSS classes. + * @Default {null} + */ + imageClass?: Array; + + /** Specifies liveTile images in templates. + * @Default {null} + */ + imageTemplateId?: Array; + + /** Specifies liveTile images in CSS classes. + * @Default {null} + */ + imageUrl?: Array; + + /** 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 badge + Bottomright +} + + +enum CaptionAlignment{ + + ///To set the normal alignment of text in tile control + Normal, + + ///To set the left alignment of text in tile control + Left, + + ///To set the right alignment of text in tile control + Right, + + ///To set the center alignment of text in tile control + Center +} + + +enum CaptionPosition{ + + ///To set the inner top position of the tile text + Innertop, + + ///To set the inner bottom position of the tile text + Innerbottom, + + ///To set the outer position of the tile text + Outer +} + + +enum ImagePosition{ + + ///To set the center position of tile image + Center, + + ///To set the top center position of tile image + TopCenter, + + ///To set the bottom center position of tile image + BottomCenter, + + ///To set the right center position of tile image + RightCenter, + + ///To set the left center position of tile image + LeftCenter, + + ///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 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; + constructor(element: JQuery, options?: RadialSlider.Model); + constructor(element: Element, options?: RadialSlider.Model); + model:RadialSlider.Model; + defaults:RadialSlider.Model; + + /** To show the radialslider + * @returns {void} + */ + show(): void; + + /** To hide the radialslider + * @returns {void} + */ + hide(): void; +} +export module RadialSlider{ + +export interface Model { + + /** To show the RadialSlider in initial render. + * @Default {false} + */ + autoOpen?: boolean; + + /** Sets the root class for RadialSlider theme. This cssClass API helps to use custom skinning option for RadialSlider 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 Slider. + * @Default {true} + */ + enableAnimation?: boolean; + + /** Enable/Disable the Roundoff property of RadialSlider + * @Default {true} + */ + enableRoundOff?: boolean; + + /** Specifies the endAngle value for radial slider circle. + * @Default {360} + */ + endAngle?: number; + + /** Specifies the inline for label show or not on given radius. + * @Default {false} + */ + inline?: boolean; + + /** Specifies innerCircleImageClass, using this property we can give images for center radial circle through CSS classes. + * @Default {null} + */ + innerCircleImageClass?: string; + + /** Specifies the file name of center circle icon + * @Default {null} + */ + innerCircleImageUrl?: string; + + /** Specifies the Space between the radial slider element and the label. + * @Default {30} + */ + labelSpace?: number; + + /** Specifies the radius of radial slider + * @Default {200} + */ + radius?: number; + + /** To show the RadialSlider inner circle. + * @Default {true} + */ + showInnerCircle?: boolean; + + /** Specifies the endAngle value for radial slider circle. + * @Default {0} + */ + startAngle?: number; + + /** Specifies the strokeWidth for customize the needle, outer circle and inner circle. + * @Default {2} + */ + strokeWidth?: number; + + /** Specifies the ticks value of radial slider + */ + ticks?: Array; + + /** Specifies the value of radial slider + * @Default {10} + */ + value?: number; + + /** Event triggers when the change occurs. */ + change? (e: ChangeEventArgs): void; + + /** Event triggers when the radial slider is created. */ + create? (e: CreateEventArgs): void; + + /** Event triggers when the mouse pointer is dragged over the radial slider. */ + mouseover? (e: MouseoverEventArgs): void; + + /** Event triggers when the Radial slider slides. */ + slide? (e: SlideEventArgs): void; + + /** Event triggers when the radial slider starts. */ + start? (e: StartEventArgs): void; + + /** Event triggers when the radial slider stops. */ + stop? (e: StopEventArgs): void; +} + +export interface ChangeEventArgs { + + /** returns the Radialslider model + */ + model?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the initial value of Radial slider + */ + oldValue?: number; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value of the Radial slider + */ + value?: number; +} + +export interface CreateEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model /td> + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface MouseoverEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the value selected + */ + selectedValue?: number; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value selected in Radial slider + */ + value?: number; +} + +export interface SlideEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the value selected in Radial slider + */ + selectedValue?: number; + + /** returns the name of the event + */ + type?: string; + + /** returns the currently selected value + */ + value?: number; +} + +export interface StartEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value selected in Radial slider + */ + value?: number; +} + +export interface StopEventArgs { + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the Radialslider model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; + + /** returns the current value selected in Radial slider + */ + value?: 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 custom formulas in Spreadsheet. + * @param {string} Pass the name of the formula. + * @param {string} Pass the name of the function. + * @returns {void} + */ + addCustomFormula(formulaName: string, functionName: string): void; + + /** 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 {any} Optional. + * @param {boolean} Optional. If pass true, if you want to skip the hidden rows + * @param {any} Optional. Pass the status to perform undo and redo operation. + * @param {any} Optional. It specifies whether to skip element processing or not. + * @returns {void} + */ + clearRangeData(range?: Array|string, property?: string, cells?: any, skipHiddenRow?: boolean, status?: any, skipCell?: any): void; + + /** This method is used to copy or move the sheets in Spreadsheet. + * @param {number} Pass the sheet index that you want to copy or move. + * @param {number} Pass the position index where you want to copy or move. + * @param {boolean} Pass true,If you want to copy sheet or else it will move sheet. + * @returns {void} + */ + copySheet(fromIdx: number, toIdx: number, isCopySheet: boolean): 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 data settings in the Spreadsheet. + * @param {number} Pass the sheet index. + * @returns {number} + */ + getDataSettings(sheetIdx: number): number; + + /** 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 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 {any} Optional. Pass the range, property, sheetIdx, valueOnly in options. + * @returns {Array} + */ + getRangeData(options?: any): 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} Optional. 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} Optional. 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 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 refresh the content in Spreadsheet. + * @param {number} Pass the index of the sheet. + * @returns {void} + */ + refreshContent(sheetIdx: number): void; + + /** This method is used to refresh the Spreadsheet. + * @returns {void} + */ + refreshSpreadsheet(): void; + + /** This method is used to remove custom formulae in Spreadsheet. + * @param {string} Pass the name of the formula. + * @param {string} Pass the name of the function. + * @returns {void} + */ + removeCustomFormula(formulaName: string, functionName: string): 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. + * @param {boolean} Optional. Pass the status to perform undo and redo operations. + * @param {any} Optional. Pass the cells that you want to remove hyperlink. + * @param {boolean} Optional. Pass true, if you want to skip the hidden rows. + * @returns {void} + */ + removeHyperlink(range: string, isClearHLink?: boolean, status?: boolean, cells?: any, skipHiddenRow?: 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 save JSON data in Spreadsheet. + * @returns {void} + */ + saveAsJSON(): void; + + /** This method is used to save batch changes in Spreadsheet. + * @param {number} Pass the sheet index for Spreadsheet. + * @returns {void} + */ + saveBatchChanges(sheetIdx: number): 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 column index and width of the columns. + * @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} Optional. 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/hide gridlines in active sheet in the Spreadsheet. + * @param {boolean} Pass true to show the gridlines + * @returns {void} + */ + showGridlines(status: boolean): void; + + /** This method is used to show/hide the headers in active sheet in the Spreadsheet. + * @param {boolean} Pass true to show the sheet headers. + * @returns {void} + */ + showHeadings(startRow: boolean): 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} Optional. 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; + + XLPivot: Spreadsheet.XLPivot; + + 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} Optional. 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} Optional. 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 the style in the specified range. + * @param {Array|string} Pass the cell range . + * @param {any} Optional. Pass the options for which the style gets removed. + * @returns {void} + */ + removeStyle(range: Array|string,options: any): 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 XLPivot { + + /** This property is used to clear the pivot table list in Spreadsheet. + * @param {string} Pass the name of the pivot table. + * @returns {void} + */ + clearPivotFieldList(pivotName: string): void; + + /** This method is used to create pivot table. + * @param {string} It specifies the range for which the pivot table is created. + * @param {string} It specifies the location in which the pivot table is created. + * @param {string} It specifies the name of the pivot table. + * @param {any} Pass the pivot table settings. + * @param {any} Pass the pivot range, sheet index, address and data source . + * @returns {void} + */ + createPivotTable(range: string,location: string,name: string,settings: any,pvt: any): void; + + /** This method is used to delete the pivot table which is selected. + * @param {string} Pass the name of the pivot table. + * @returns {void} + */ + deletePivotTable(pivotName: string): void; + + /** This method is used to refresh data in pivot table. + * @param {string} Optional. Pass the name of the pivot table. + * @param {number} Optional. Pass the index of the sheet. + * @returns {void} + */ + refreshDataSource(name: string,sheetIdx: number): 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; + + /** This method is used to update the ribbon icons in the Spreadsheet. + * @returns {void} + */ + updateRibbonIcons(): 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. + * @returns {void} + */ + selectRange(range: string): 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.). + * @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 {300} + */ + 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 {64} + */ + columnWidth?: number; + + /** Gets or sets a value to add root css class for customizing Spreadsheet skins. + */ + cssClass?: string; + + /** Gets or sets a value that indicates custom formulas in Spreadsheet. + * @Default {[]} + */ + customFormulas?: Array; + + /** Gets or sets a value that indicates whether to enable or disable context menu in the Spreadsheet. + * @Default {true} + */ + enableContextMenu?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable pivot table in the Spreadsheet. + * @Default {false} + */ + enablePivotTable?: boolean; + + /** Gets or sets a value that indicates whether to enable or disable touch support in the Spreadsheet. + * @Default {true} + */ + enableTouch?: 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 an object that indicates to customize the ribbon settings in Spreadsheet. + */ + ribbonSettings?: RibbonSettings; + + /** 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 pager in the Spreadsheet. + * @Default {true} + */ + showPager?: boolean; + + /** 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 batch save. */ + beforeBatchSave? (e: BeforeBatchSaveEventArgs): 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 while cell is formatting. */ + cellFormatting? (e: CellFormattingEventArgs): 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 the cell is selected. */ + cellSelected? (e: CellSelectedEventArgs): 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 a file is imported. */ + onImport? (e: OnImportEventArgs): 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 BeforeBatchSaveEventArgs { + + /** Returns the sheet index. + */ + sheetIdx?: number; + + /** Returns the query, primary key,batch changes for the data Source. + */ + dataSetting?: any; + + /** Returns the changed record object. + */ + batchChanges?: any; +} + +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; + + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns the value of the cell. + */ + value?: string; + + /** Returns the cancel option value. + */ + cancel?: boolean; +} + +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 target element. + */ + target?: HTMLElement; + + /** Returns the cancel option value. + */ + cancel?: boolean; +} + +export interface CellFormattingEventArgs { + + /** Returns the sheet index + */ + SheetIdx?: number; + + /** Returns the applied style format object + */ + Format?: any; + + /** Returns the cell index. + */ + Cell?: number; + + /** Returns the name of the css theme. + */ + cssClass?: string; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns the Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; +} + +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 index of the row. + */ + rowIndex?: number; + + /** Returns the index of the column. + */ + colIndex?: number; + + /** 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 target element. + */ + target?: HTMLElement; + + /** Returns the cell value. + */ + value?: string; +} + +export interface CellSelectedEventArgs { + + /** Returns the active sheet index. + */ + sheetIdx?: number; + + /** Returns the selected range. + */ + selectedRange?: Array; + + /** Returns the target element. + */ + target?: HTMLElement; + + /** Returns Spreadsheet model. + */ + model?: ej.Spreadsheet.Model; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the cancel option value. + */ + cancel?: boolean; +} + +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 OnImportEventArgs { + + /** 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 imported data. + */ + importData?: any; +} + +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 target element. + */ + target?: HTMLElement; + + /** 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 target element. + */ + target?: HTMLElement; + + /** 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 target element. + */ + target?: HTMLElement; + + /** 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 target element. + */ + target?: HTMLElement; + + /** 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. + * @Default {null} + */ + excelUrl?: string; + + /** Gets or sets a value that indicates to define password while export to excel format. + * @Default {null} + */ + password?: string; + + /** Gets or sets a value that indicates to define pdfUrl for export to pdf format. + * @Default {null} + */ + pdfUrl?: 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; + + /** Gets or sets a value that indicates whether to enable or disable import while initial loading. + * @Default {false} + */ + importOnLoad?: boolean; + + /** 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 RibbonSettingsApplicationTabMenuSettings { + + /** Gets or sets a value that indicates whether to enable or disable isAppend property in ribbon settings. + * @Default {false} + */ + isAppend?: boolean; + + /** Specifies the data source to append in applicationtab. + * @Default {[]} + */ + dataSource?: Array; +} + +export interface RibbonSettingsApplicationTab { + + /** Gets or sets a value that indicates to set application tab type in Spreadsheet. It has two types, Menu and Backstage. + * @Default {ej.Ribbon.ApplicationTabType.Backstage} + */ + type?: ej.Ribbon.ApplicationTabType|string; + + /** Gets or sets an object that indicates menu settings for application tab in Spreadsheet. + */ + menuSettings?: RibbonSettingsApplicationTabMenuSettings; +} + +export interface RibbonSettings { + + /** Gets or sets an object that indicates application tab settings in Spreadsheet. + */ + applicationTab?: RibbonSettingsApplicationTab; +} + +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 {100%} + */ + height?: number|string; + + /** Gets or sets the value that indicates whether to enable or disable responsive mode in the Spreadsheet. + * @Default {true} + */ + 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 of the spreadsheet. + * @Default {100%} + */ + 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. + * @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 SheetsBorder { + + /** + */ + type?: ej.Spreadsheet.BorderType|string; + + /** Specifies border color for range of cells in Spreadsheet. + */ + color?: string; + + /** To apply border for the specified range of cell. + */ + range?: string; +} + +export interface SheetsCFormatRule { + + /** Specifies the conditions to apply for the range of cells in Spreadsheet. + */ + action?: ej.Spreadsheet.CFormatRule|string; + + /** Specifies the color to apply for the range of cell while conditional formatting. + */ + color?: ej.Spreadsheet.CFormatHighlightColor|string; + + /** Specifies the inputs for conditional formatting in Spreadsheet. + * @Default {[]} + */ + inputs?: Array; + + /** Specifies the range for conditional formatting in Spreadsheet. + */ + range?: string; +} + +export interface SheetsRangeSetting { + + /** Gets or sets the data to render the Spreadsheet. + * @Default {null} + */ + dataSource?: any; + + /** Specifies the header styles for the headers in datasource range. + * @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 SheetsRowsCellsComment { + + /** Get or sets the value that indicates whether to show or hide comments in Spreadsheet. + * @Default {false} + */ + isVisible?: boolean; + + /** Specifies the value for the comment in Spreadsheet. + */ + value?: string; +} + +export interface SheetsRowsCellsFormat { + + /** Specifies the type of the format in Spreadsheet. + */ + type?: string; +} + +export interface SheetsRowsCellsHyperlink { + + /** Specifies the web address for the hyperlink of a cell. + */ + webAddr?: string; + + /** Specifies the cell address for the hyperlink of a cell. + */ + cellAddr?: string; + + /** Specifies the sheet index to which the cell is referred. + * @Default {1} + */ + sheetIndex?: number; +} + +export interface SheetsRowsCellsStyle { + + /** Specifies the background color of a cell in the Spreadsheet. + */ + backgroundColor?: string; + + /** Specifies the font color of a cell in the Spreadsheet. + */ + color?: string; + + /** Specifies the font weight of a cell in the Spreadsheet. + */ + fontWeight?: string; +} + +export interface SheetsRowsCell { + + /** Specifies the comment for a cell in Spreadsheet. + * @Default {null} + */ + comment?: SheetsRowsCellsComment; + + /** Specifies the format of a cell in Spreadsheet. + * @Default {null} + */ + format?: SheetsRowsCellsFormat; + + /** Specifies the hyperlink for a cell in Spreadsheet. + * @Default {null} + */ + hyperlink?: SheetsRowsCellsHyperlink; + + /** Specifies the index of a cell in Spreadsheet. + * @Default {0} + */ + index?: number; + + /** Specifies the styles of a cell in Spreadsheet. + * @Default {null} + */ + style?: SheetsRowsCellsStyle; + + /** Specifies the value for a cell in Spreadsheet. + */ + value?: string; +} + +export interface SheetsRow { + + /** Gets or sets the height of a row in Spreadsheet. + * @Default {20} + */ + height?: number; + + /** Specifies the cells of a row in Spreadsheet. + * @Default {[]} + */ + cells?: Array; + + /** Gets or sets the index of a row in Spreadsheet. + * @Default {0} + */ + index?: number; +} + +export interface Sheet { + + /** Specifies the border for the cell in the Spreadsheet. + * @Default {[]} + */ + border?: Array; + + /** Specifies the conditional formatting for the range of cell in Spreadsheet. + * @Default {[]} + */ + cFormatRule?: Array; + + /** 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. + * @Default {null} + */ + 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 headers in datasource range. + * @Default {null} + */ + headerStyles?: any; + + /** To hide the specified columns in Spreadsheet. + * @Default {[]} + */ + hideColumns?: Array; + + /** To hide the specified rows in Spreadsheet. + * @Default {[]} + */ + hideRows?: Array; + + /** To merge specified ranges in Spreadsheet. + * @Default {[]} + */ + mergeCells?: Array; + + /** 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. + * @Default {[]} + */ + rangeSettings?: Array; + + /** Gets or sets a value that indicates to define row count in the Spreadsheet. + * @Default {20} + */ + rowCount?: number; + + /** Specifies the rows for a sheet in Spreadsheet. + * @Default {[]} + */ + rows?: Array; + + /** 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 +} + + +enum BorderType{ + + ///To apply top border for the given range of cell. + Top, + + ///To apply left border for the given range of cell. + Left, + + ///To apply right border for the given range of cell. + Right, + + ///To apply bottom border for the given range of cell. + Bottom, + + ///To apply outside border for the given range of cell. + OutSide, + + ///To apply all border for the given range of cell. + AllBorder, + + ///To apply thick box border for the given range of cell. + ThickBox, + + ///To apply thick bottom border for the given range of cell. + ThickBottom, + + ///To apply top and bottom border for the given range of cell. + TopandBottom, + + ///To apply top and thick bottom border for the given range of cell. + TopandThickBottom +} + + +enum CFormatRule{ + + ///To identify greater than values in the given range of cells. + GreaterThan, + + ///To identify less than values in the given range of cells. + LessThan, + + ///To identify in between values in the given range of cells. + Between, + + ///To identify the equal values in the given range of cells. + EqualTo, + + ///To identify the specified text in the range of cells. + TextContains, + + ///To identify the specified date in the range of cells. + DateOccurs +} + + +enum CFormatHighlightColor{ + + ///Highlights red with dark red text color. + RedFillwithDarkRedText, + + ///Highlights yellow with dark yellow text color. + YellowFillwithDarkYellowText, + + ///Highlights green with dark green text color. + GreenFillwithDarkGreenText, + + ///Highlights with red fill. + RedFill, + + ///Highlights with red text. + RedText +} + +} + +class PdfViewer extends ej.Widget { + static fn: PdfViewer; + constructor(element: JQuery, options?: PdfViewer.Model); + constructor(element: Element, options?: PdfViewer.Model); + model:PdfViewer.Model; + defaults:PdfViewer.Model; + + /** Loads the document with the filename and displays it in PDF viewer. + * @returns {void} + */ + load(): void; + + /** Shows/hides the tool bar in the PDF viewer. + * @returns {void} + */ + showToolbar(): void; + + /** Prints the PDF document. + * @returns {void} + */ + print(): void; + + /** Shows/hides the page navigation tools in the toolbar + * @returns {void} + */ + showPageNavigationTools(): void; + + /** Navigates to the specific page in the PDF document. If the page is not available for the given pageNumber, PDF viewer retains the existing page in view. + * @returns {void} + */ + goToPage(): void; + + /** Navigates to the last page of the PDF document. + * @returns {void} + */ + goToLastPage(): void; + + /** Navigates to the first page of PDF document. + * @returns {void} + */ + goToFirstPage(): void; + + /** Navigates to the next page of the PDF document. + * @returns {void} + */ + goToNextPage(): void; + + /** Navigates to the previous page of the PDF document. + * @returns {void} + */ + goToPreviousPage(): void; + + /** Shows/hides the zoom tools in the tool bar. + * @returns {void} + */ + showMagnificationTools(): void; + + /** Scales the page to fit the page in the container in the control. + * @returns {void} + */ + fitToPage(): void; + + /** Scales the page to fit the page width to the width of the container in the control. + * @returns {void} + */ + fitToWidth(): void; + + /** Magnifies the page to the next value in the zoom drop down list. + * @returns {void} + */ + zoomIn(): void; + + /** Shrinks the page to the previous value in the magnification in the drop down list. + * @returns {void} + */ + zoomOut(): void; + + /** Scales the page to the specified percentage ranging from 50 to 400. If the given zoomValue is less than 50 or greater than 400; the PDF viewer scales the page to 50 and 400 respectively. + * @returns {void} + */ + zoomTo(): void; +} +export module PdfViewer{ + +export interface Model { + + /** Specifies the locale information of the PDF viewer. + */ + locale?: string; + + /** Specifies the toolbar settings. + */ + toolbarSettings?: ToolbarSettings; + + /** Shows or hides the grouped items in the toolbar with the help of enum ej.PdfViewer.ToolbarItems + */ + toolbarItems?: ej.PdfViewer.ToolbarItems|string; + + /** Sets the PDF Web API service URL + */ + serviceUrl?: string; + + /** Gets the total number of pages in PDF document. + */ + pageCount?: number; + + /** Gets the number of the page being displayed in the PDF Viewer. + */ + currentPageNumber?: number; + + /** Gets the current zoom percentage of the PDF document in viewer. + */ + zoomPercentage?: number; + + /** Specifies the location of the supporting PDF service + */ + pdfService?: ej.PdfViewer.PdfService|string; + + /** Specifies the open state of the hyperlink in the PDF document. + */ + hyperlinkOpenState?: ej.PdfViewer.LinkTarget|string; + + /** Enables or disables the responsive support for PDF Viewer control during the window resizing time. + */ + isResponsive?: boolean; + + /** Gets the name of the PDF document which loaded in the ejPdfViewer control for downloading. + */ + fileName?: string; + + /** Triggers when the PDF document gets loaded and is ready to view in the Control. */ + documentLoad? (e: DocumentLoadEventArgs): void; + + /** Triggers when there is change in current page number. */ + pageChange? (e: PageChangeEventArgs): void; + + /** Triggers when there is change in the magnification value. */ + zoomChange? (e: ZoomChangeEventArgs): void; + + /** Triggers when hyperlink in the PDF Document is clicked */ + hyperlinkClick? (e: HyperlinkClickEventArgs): void; + + /** Triggers before the printing starts. */ + beforePrint? (e: BeforePrintEventArgs): void; + + /** Triggers after the printing is completed. */ + afterPrint? (e: AfterPrintEventArgs): void; + + /** Triggers when PDF viewer control is destroyed successfully. */ + destroy? (e: DestroyEventArgs): void; +} + +export interface DocumentLoadEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + Cancel?: boolean; + + /** Returns the PDF viewer model + */ + Model?: any; + + /** Returns the name of the event + */ + Type?: string; +} + +export interface PageChangeEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the current page number in view. + */ + currentPageNumber?: number; +} + +export interface ZoomChangeEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event. + */ + type?: string; + + /** Returns the previous zoom percentage of the PDF viewer control + */ + previousZoomPercentage?: number; + + /** Returns the current zoom percentage of the PDF viewer control + */ + currentZoomPercentage?: number; +} + +export interface HyperlinkClickEventArgs { + + /** true, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; + + /** Returns the clicked hyperlink + */ + hyperlink?: string; +} + +export interface BeforePrintEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; +} + +export interface AfterPrintEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; +} + +export interface DestroyEventArgs { + + /** True, if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** Returns the PDF viewer model + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; +} + +export interface ToolbarSettings { + + /** Shows or hides the tooltip of the toolbar items. + */ + showToolTip?: boolean; +} + +enum ToolbarItems{ + + ///Shows only magnification tools in the toolbar. + MagnificationTools, + + ///Shows only page navigation tools in the toolbar. + PageNavigationTools, + + ///Shows only print tool in the toolbar. + PrintTools, + + ///Shows only download tool in the toolbar. + DownloadTool, + + ///Shows all the toolbar items. + All +} + + +enum PdfService{ + + ///Denotes that the service is located in the local project + Local, + + ///Denotes that the service is hosted in the remote server + Remote +} + + +enum LinkTarget{ + + ///Opens the hyperlink in the same tab of the browser. + Default, + + ///Opens the hyperlink in a new tab of the browser. + NewTab, + + ///Opens the hyperlink in a new window of the browser. + NewWindow +} + +} + +} +declare module ej.datavisualization { + +class SymbolPalette extends ej.Widget { + static fn: SymbolPalette; + constructor(element: JQuery, options?: SymbolPalette.Model); + constructor(element: Element, options?: SymbolPalette.Model); + model:SymbolPalette.Model; + defaults:SymbolPalette.Model; +} +export module SymbolPalette{ + +export interface Model { + + /** Defines whether the symbols can be dragged from palette or not + * @Default {true} + */ + allowDrag?: boolean; + + /** Customizes the style of the symbol palette + * @Default {e-symbolpalette} + */ + cssClass?: string; + + /** Defines the default properties of nodes and connectors + */ + defaultSettings?: DefaultSettings; + + /** Sets the Id of the diagram, over which the symbols will be dropped + * @Default {null} + */ + diagramId?: string; + + /** Sets the height of the palette headers + * @Default {30} + */ + headerHeight?: number; + + /** Defines the height of the symbol palette + * @Default {400} + */ + height?: number; + + /** Defines the height of the palette items + * @Default {50} + */ + paletteItemHeight?: number; + + /** Defines the width of the palette items + * @Default {50} + */ + paletteItemWidth?: number; + + /** An array of JSON objects, where each object represents a node/connector + * @Default {[]} + */ + palettes?: Array; + + /** Defines the preview height of the symbols + * @Default {100} + */ + previewHeight?: number; + + /** Defines the offset value to be left between the mouse cursor and symbol previews + * @Default {(110, 110)} + */ + previewOffset?: any; + + /** Defines the width of the symbol previews + * @Default {100} + */ + previewWidth?: number; + + /** Enable or disable the palette item text + * @Default {true} + */ + showPaletteItemText?: boolean; + + /** The width of the palette + * @Default {250} + */ + width?: number; + + /** Triggers when a palette item is selected or unselected */ + selectionChange? (e: SelectionChangeEventArgs): void; +} + +export interface SelectionChangeEventArgs { + + /** returns whether an element is selected or unselected + */ + changeType?: string; + + /** returns the node or connector that is selected or unselected + */ + element?: any; +} + +export interface DefaultSettings { + + /** Defines the default properties of the nodes + * @Default {null} + */ + node?: any; + + /** Defines the default properties of the connectors + * @Default {null} + */ + connector?: any; +} + +export interface Palette { + + /** Defines the name of the palette + * @Default {null} + */ + name?: string; + + /** Defines whether the palette must be in expanded state or in collapsed state + * @Default {true} + */ + expanded?: boolean; + + /** Defines the palette items + * @Default {[]} + */ + items?: Array; +} +} + +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} + */ + isResponsive?: 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 ScalesBarPointer { + + /** 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 ScalesCustomLabel { + + /** 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 ScalesIndicatorsStateRange { + + /** 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 ScalesIndicator { + + /** 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 ScalesLabel { + + /** 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 ScalesMarkerPointer { + + /** 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 ScalesRange { + + /** 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 ScalesTick { + + /** 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 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; + + /** Specify isResponsive value of circular gauge + * @Default {false} + */ + isResponsive?: 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 ScalesCustomLabelsPosition { + + /** Specify x-axis position of label + * @Default {0} + */ + x?: number; + + /** Specify y-axis position of labels. + * @Default {0} + */ + y?: number; +} + +export interface ScalesCustomLabelsFont { + + /** Specify font fontFamily for custom labels. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specify font Style for custom labels. + * @Default {Bold} + */ + fontStyle?: string; + + /** Specify font size for custom labels. + * @Default {12px} + */ + size?: string; +} + +export interface ScalesCustomLabel { + + /** Value of the custom labels. + */ + value?: string; + + /** Color of the custom labels. + */ + color?: string; + + /** Specify position of custom labels + * @Default {Object} + */ + position?: ScalesCustomLabelsPosition; + + /** Specify font for custom labels + * @Default {Object} + */ + font?: ScalesCustomLabelsFont; +} + +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 ScalesIndicatorsStateRange { + + /** 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 ScalesIndicator { + + /** 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 ScalesLabel { + + /** 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 ScalesPointer { + + /** 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 ScalesRange { + + /** 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 ScalesSubGauge { + + /** 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 ScalesTick { + + /** 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 the custom labels for the scales. + * @Default {Array} + */ + customLabels?: Array; + + /** 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 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 resize option of the DigitalGauge. + * @Default {false} + */ + isResponsive?: boolean; + + /** 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 {any} If an array collection is passed as parameter, series and indicator objects passed in array collection are animated.ExampleIf a series or indicator object is passed to this method, then the specific series or indicator is animated.Example, + * @returns {void} + */ + animate(options: 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; + + /** This provides options for customizing export settings + */ + exportSettings?: ExportSettings; + + /** 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; + + /** Controls whether Chart has to be responsive while resizing. + * @Default {false} + */ + isResponsive?: boolean; + + /** 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; + + /** Trigger, after the scrollbar position is changed. */ + scrollChanged? (e: ScrollChangedEventArgs): void; + + /** Event triggered when scroll starts */ + scrollStart? (e: ScrollStartEventArgs): void; + + /** Event triggered when scroll end */ + scrollEnd? (e: ScrollEndEventArgs): 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 ScrollChangedEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position old start and end range value on changing scrollbar + */ + dataoldRange?: any; + + /** returns the scrollbar position new start and end range value on changing scrollbar + */ + datanewRange?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface ScrollStartEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position starting range value on changing scrollbar + */ + datastartRange?: string; + + /** returns the scrollbar position end range value on changing scrollbar + */ + dataendRange?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface ScrollEndEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position old start and end range value on change end of scrollbar + */ + dataoldRange?: any; + + /** returns the scrollbar position new start and end range value on change end of scrollbar + */ + datanewRange?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +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 Annotation { + + /** 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 ExportSettings { + + /** Specifies the downloading filename + * @Default {chart} + */ + filename?: string; + + /** Specifies the name of the action URL + */ + action?: string; + + /** Specifies the angle for rotation + * @Default {0} + */ + angle?: number; + + /** Specifies the format of the file to export + * @Default {png} + */ + type?: ej.datavisualization.Chart.ExportingType|string; + + /** Specifies the orientation of the document + * @Default {portrait} + */ + orientation?: ej.datavisualization.Chart.ExportingOrientation|string; + + /** Specifies the mode of exporting + * @Default {client} + */ + mode?: ej.datavisualization.Chart.ExportingMode|string; + + /** Enable/ disable the multiple excel exporting + * @Default {false} + */ + multipleExport?: boolean; +} + +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 ColumnDefinition { + + /** 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; + + /** Color of the connector line. + * @Default {#565656} + */ + color?: string; + + /** Height of the connector line. + * @Default {null} + */ + height?: string; +} + +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 CommonSeriesOptionsTrendline { + + /** 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; + + /** Specifies the drawn rectangle type. + * @Default {xy} + */ + rangeType?: ej.datavisualization.Chart.RangeType|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; + + /** Relative width of the columns in column type series. Value ranges from 0 to 1. Width also depends upon columnSpacing property. + * @Default {0.7} + */ + columnWidth?: number; + + /** Spacing between columns of different series. Value ranges from 0 to 1 + * @Default {0} + */ + columnSpacing?: number; + + /** Enables or disables the visibility of legend item. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** 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; + + /** Name of the property in the datasource that contains fill color for the series. + * @Default {null} + */ + pointColorMappingName?: string; + + /** 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; + + /** zOrder of the series. + * @Default {0} + */ + zOrder?: number; + + /** 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 CrosshairLine { + + /** Color of the crosshair line. + * @Default {transparent} + */ + color?: string; + + /** Width of the crosshair line. + * @Default {1} + */ + width?: number; +} + +export interface Crosshair { + + /** Options for customizing the marker in crosshair. + */ + marker?: CrosshairMarker; + + /** Options for customizing the crosshair line. + */ + line?: CrosshairLine; + + /** 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 Indicator { + + /** 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; + + /** Color of the major grid line. + * @Default {null} + */ + color?: 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} + */ + min?: number; + + /** Maximum value of the axis range. + * @Default {null} + */ + max?: 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 Z-order 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; + + /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. + * @Default {null} + */ + crossesAt?: number; + + /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, then primary X axis or primary Y axis will be used for crossing + * @Default {null} + */ + crossesInAxis?: string; + + /** Category axis can also plot points based on index value of data points. Index based plotting can be enabled by setting ‘isIndexed’ property to true. + * @Default {false} + */ + isIndexed?: boolean; + + /** 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; + + /** Color of the major grid lines. + * @Default {null} + */ + color?: 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 PrimaryYAxisRange { + + /** Minimum value of the axis range. + * @Default {null} + */ + min?: number; + + /** Maximum value of the axis range. + * @Default {null} + */ + max?: number; + + /** Interval for the range. + * @Default {null} + */ + interval?: 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 Z-order 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; + + /** Specifies where horizontal axis should intersect the vertical axis or vice versa. Value should be provided in axis co-ordinates. If provided value is greater than the maximum value of crossing axis, then axis will be placed at the opposite side. + * @Default {null} + */ + crossesAt?: number; + + /** Name of the axis used for crossing. Vertical axis name should be provided for horizontal axis and vice versa. If the provided name does not belongs to a valid axis, then primary X axis or primary Y axis will be used for crossing + * @Default {null} + */ + crossesInAxis?: string; + + /** 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; + + /** Specifies the position of the axis labels. + * @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; + + /** Options to customize the range of the axis. + */ + range?: PrimaryYAxisRange; + + /** 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 RowDefinition { + + /** 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; + + /** Color of the connector. + * @Default {null} + */ + color?: string; + + /** Height of the connector. + * @Default {null} + */ + height?: 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; + + /** Opacity 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 SeriesPoint { + + /** Options for customizing the border of a point. This is applicable only for column type series and accumulation type series. + */ + border?: SeriesPointsBorder; + + /** Enables or disables the visibility of legend item. + * @Default {visible} + */ + visibleOnLegend?: string; + + /** 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 SeriesTrendline { + + /** 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; + + /** Specifies the drawn rectangle type. + * @Default {xy} + */ + rangeType?: ej.datavisualization.Chart.RangeType|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; + + /** Relative width of the columns in column type series. Value ranges from 0 to 1. Width also depends upon columnSpacing property. + * @Default {0.7} + */ + columnWidth?: number; + + /** Spacing between columns of different series. Value ranges from 0 to 1 + * @Default {0} + */ + columnSpacing?: number; + + /** 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; + + /** Name of the series, that is to be displayed in the legend. + * @Default {Add a comment to this line} + */ + name?: string; + + /** 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; + + /** Enables or disables the visibility of legend item. + * @Default {visible} + */ + visibleOnLegend?: 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 fill color for the series. + * @Default {null} + */ + pointColorMappingName?: string; + + /** zOrder of the series. + * @Default {0} + */ + zOrder?: number; + + /** 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; + + /** Enables or disables pinch zooming. + * @Default {true} + */ + enablePinching?: 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 ExportingType +{ +//string +PNG, +//string +JPG, +//string +PDF, +//string +DOCX, +//string +XLSX, +//string +SVG, +} +} +module Chart +{ +enum ExportingOrientation +{ +//string +Portrait, +//string +Landscape, +} +} +module Chart +{ +enum ExportingMode +{ +//string +ServerSide, +//string +ClientSide, +} +} +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, +//string +Range, +} +} +module Chart +{ +enum SelectionType +{ +//string +Single, +//string +Multiple, +} +} +module Chart +{ +enum RangeType +{ +//string +XY, +//string +X, +//string +Y, +} +} +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; + + /** Options for customizing the color, opacity and width of the chart border. + */ + border?: Border; + + /** Specifies the data source for range navigator. + */ + dataSource?: any; + + /** Specifies the properties used for customizing the range series. + */ + series?: Array; + + /** Toggles the redrawing of chart on moving the sliders. + * @Default {true} + */ + enableDeferredUpdate?: boolean; + + /** Enable the scrollbar option in the rangenavigator. + * @Default {false} + */ + enableScrollbar?: boolean; + + /** Toggles the direction of rendering the range navigator control. + * @Default {false} + */ + enableRTL?: boolean; + + /** Sets a value whether to make the range navigator responsive on resize. + * @Default {false} + */ + isResponsive?: 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; + + /** Options for rendering scrollbar based on the start and end range values. + */ + scrollRangeSettings?: ScrollRangeSettings; + + /** 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; + + /** Fires on changing the scrollbar position of range navigator. */ + scrollChanged? (e: ScrollChangedEventArgs): void; + + /** Fires on when starting to change the scrollbar position of range navigator. */ + scrollStart? (e: ScrollStartEventArgs): void; + + /** Fires on changes ending the scrollbar position of range navigator. */ + scrollEnd? (e: ScrollEndEventArgs): 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 ScrollChangedEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position old start and end range value on changing scrollbar + */ + dataoldRange?: any; + + /** returns the scrollbar position new start and end range value on changing scrollbar + */ + datanewRange?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface ScrollStartEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position starting range value on changing scrollbar + */ + datastartRange?: string; + + /** returns the scrollbar position end range value on changing scrollbar + */ + dataendRange?: string; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface ScrollEndEventArgs { + + /** parameters from RangeNavigator + */ + data?: any; + + /** returns the scrollbar position old start and end range value on change end of scrollbar + */ + dataoldRange?: any; + + /** returns the scrollbar position new start and end range value on change end of scrollbar + */ + datanewRange?: any; + + /** if the event should be canceled; otherwise, false. + */ + cancel?: boolean; + + /** returns the RangeNavigator model + */ + model?: any; + + /** returns the name of the event + */ + type?: string; +} + +export interface Border { + + /** Border color of rangenavigator. When enable the scrollbar, the default color will be set as "#B4B4B4". + * @Default {transparent} + */ + color?: string; + + /** Opacity of the rangeNavigator border. + * @Default {1} + */ + opacity?: number; + + /** Width of the RangeNavigator border. + * @Default {1} + */ + width?: number; +} + +export interface Series { + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: 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; + + /** Specifies the type of the series to render in chart. + * @Default {column. see Type} + */ + type?: ej.datavisualization.RangeNavigator.Type|string; + + /** Enable/disable the animation of series. + * @Default {false} + */ + enableAnimation?: boolean; + + /** Fill color of the series. + * @Default {null} + */ + fill?: 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 {auto} + */ + 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 {auto} + */ + 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 label 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 NavigatorStyleSettingsHighlightSettingsBorder { + + /** To set the border color to the highlight. + * @Default {null} + */ + color?: string; + + /** To set the border width to the highlight. + * @Default {1} + */ + width?: number; +} + +export interface NavigatorStyleSettingsHighlightSettings { + + /** Enable the highlight settings in range navigator. + * @Default {false} + */ + enable?: boolean; + + /** To set the color to the highlight. + * @Default {null} + */ + color?: string; + + /** To set the opacity to the highlight. + * @Default {0.5} + */ + opacity?: number; + + /** Contains the border properties for highlighting rectangle. + */ + border?: NavigatorStyleSettingsHighlightSettingsBorder; +} + +export interface NavigatorStyleSettingsSelectionSettingsBorder { + + /** To set the border color to the selection. + * @Default {null} + */ + color?: string; + + /** To set the border width to the selection. + * @Default {1} + */ + width?: number; +} + +export interface NavigatorStyleSettingsSelectionSettings { + + /** Enable the selection settings in range navigator. + * @Default {false} + */ + enable?: boolean; + + /** To set the color to the selection. + * @Default {null} + */ + color?: string; + + /** To set the opacity to the selection. + * @Default {0.5} + */ + opacity?: number; + + /** Contains the border properties for selecting the rectangle. + */ + border?: NavigatorStyleSettingsSelectionSettingsBorder; +} + +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; + + /** Contains the options for highlighting the range navigator on mouse over. + */ + highlightSettings?: NavigatorStyleSettingsHighlightSettings; + + /** Contains the options for selection the range navigator on mouse over. + */ + selectionSettings?: NavigatorStyleSettingsSelectionSettings; +} + +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 ScrollRangeSettings { + + /** Specifies the ending range of range navigator scrollbar and that should be greater than the rangenavigator datasource end value. + * @Default {null} + */ + end?: string; + + /** Specifies the starting range of range navigator scrollbar and that should be less than the rangenavigator datasource start value. + * @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 Type +{ +//string +Area, +//string +Line, +//string +Spline, +//string +StepArea, +//string +SplineArea, +//string +StepLine, +} +} +module RangeNavigator +{ +enum IntervalType +{ +//string +Years, +//string +Quarters, +//string +Months, +//string +Weeks, +//string +Days, +//string +Hours, +//string +Minutes, +} +} +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 bullet 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; + + /** 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; + + /** Sets a value whether to make the bullet graph responsive on resize. + * @Default {true} + */ + isResponsive?: boolean; + + /** 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 rendering 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 canceling 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 alignment 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} + */ + visible?: 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 QualitativeRange { + + /** 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 QuantitativeScaleSettingsFeatureMeasure { + + /** 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 zoom level. + * @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 {transparent} + */ + background?: string; + + /** Specifies the index of the map to determine the shape layer 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 for map. + */ + zoomSettings?: ZoomSettings; + + /** Enables or Disables the navigation control for map to perform zooming and panning on map shapes. + */ + navigationControl?: NavigationControl; + + /** Layer for holding the map shapes + */ + layers?: Array; + + /** 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 ZoomSettings { + + /** 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; + + /** Specifies the zoom level value for which map to be zoomed + * @Default {1} + */ + level?: number; + + /** Specifies the minimum zoomSettings level of the map + * @Default {1} + */ + minValue?: number; + + /** Specifies the maximum zoom level of the map + * @Default {100} + */ + maxValue?: number; +} + +export interface NavigationControl { + + /** Set the absolutePosition for navigation control + * @Default {{x:0,y:0}} + */ + absolutePosition?: any; + + /** Specifies the navigation control template for map + * @Default {null} + */ + content?: string; + + /** Set the dockPosition value for navigation control + * @Default {centerleft} + */ + dockPosition?: ej.datavisualization.Map.Position|string; + + /** Enables or Disables the Navigation for handling zooming map + * @Default {false} + */ + enableNavigation?: boolean; + + /** Set the orientation value for navigation control + * @Default {vertical} + */ + orientation?: ej.datavisualization.Map.LabelOrientation|string; +} + +export interface LayersBubbleSettings { + + /** 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 LayersLabelSettings { + + /** 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; + + /** The property specifies whether to show labels or not. + * @Default {false} + */ + showLabels?: boolean; + + /** set the smartLabelSize property + * @Default {fixed} + */ + smartLabelSize?: ej.datavisualization.Map.LabelSize|string; +} + +export interface LayersLegendSettings { + + /** 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.Mode|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 LayersShapeSettingsColorMappingsRangeColorMapping { + + /** Specifies the start range colorMappings in the shape layer of map. + * @Default {null} + */ + from?: number; + + /** Specifies the to range colorMappings in the shape layer of map. + * @Default {null} + */ + to?: number; + + /** Specifies the gradientColors in the shape layer of map. + * @Default {null} + */ + gradientColors?: Array; +} + +export interface LayersShapeSettingsColorMappingsEqualColorMapping { + + /** Specifies the equalColorMapping value in the shape layer of map. + * @Default {null} + */ + value?: string; + + /** Specifies the equalColorMapping color in the shape layer of map. + * @Default {null} + */ + color?: string; +} + +export interface LayersShapeSettingsColorMappings { + + /** Specifies the range colorMappings in the shape layer of map. + * @Default {null} + */ + rangeColorMapping?: Array; + + /** Specifies the equalColorMapping in the shape layer of map. + * @Default {null} + */ + equalColorMapping?: Array; +} + +export interface LayersShapeSettings { + + /** 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?: LayersShapeSettingsColorMappings; + + /** Specifies the shape color palette value of the shape layer in map. Accepted colorPalette values are palette1, palette2, palette3 and custompalette. + * @Default {palette1} + */ + colorPalette?: ej.datavisualization.Map.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 Layer { + + /** to get the type of bing map. + * @Default {aerial} + */ + bingMapType?: ej.datavisualization.Map.BingMapType|string; + + /** Specifies the bubble settings for map + */ + bubbleSettings?: LayersBubbleSettings; + + /** Specifies the datasource for the shape layer + */ + dataSource?: any; + + /** Specifies the data path of shape + */ + shapeDataPath?: string; + + /** Specifies the data path of shape + */ + shapePropertyPath?: string; + + /** Enables or disables the shape mouse hover + * @Default {false} + */ + enableMouseHover?: boolean; + + /** Enables or disables the shape selection + * @Default {true} + */ + enableSelection?: boolean; + + /** } + * @Default {null} + */ + key?: string; + + /** Options for enabling and configuring labelSettings labelPath, smartLabelSize, labelLength etc., + */ + labelSettings?: LayersLabelSettings; + + /** 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?: LayersLegendSettings; + + /** 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 + */ + shapeData?: any; + + /** Specifies the shape settings of map layer + */ + shapeSettings?: LayersShapeSettings; + + /** Shows or hides the map items. + * @Default {false} + */ + showMapItems?: boolean; + + /** Shows or hides the tooltip for shapes + * @Default {false} + */ + showTooltip?: boolean; + + /** 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 LabelOrientation +{ +//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 Mode +{ +//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, +} +} +module Map +{ +enum ColorPalette +{ +//specifies the palette1 color +Palette1, +//specifies the palette2 color +Palette2, +//specifies the palette3 color +Palette3, +//specifies the custom color +Custompalette, +} +} + +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 uniColorMapping settings of the treemap + */ + uniColorMapping?: UniColorMapping; + + /** Specifies the desaturationColorMapping settings of the treemap + */ + desaturationColorMapping?: DesaturationColorMapping; + + /** Specifies the paletteColorMapping of the treemap + */ + paletteColorMapping?: PaletteColorMapping; + + /** Specifies the color value path of the treemap + * @Default {null} + */ + colorValuePath?: string; + + /** Specifies the datasource of the treemap + * @Default {null} + */ + dataSource?: 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; + + /** Controls whether Treemap has to be responsive while resizing the window. + * @Default {true} + */ + isResponsive?: boolean; + + /** Specifies whether treemap need to resize when container is resized + * @Default {true} + */ + enableResize?: boolean; + + /** This property is used to select treemap items while clicking and dragging + * @Default {false} + */ + draggingOnSelection?: boolean; + + /** This property is used to select group of treemap items while clicking and dragging + * @Default {false} + */ + draggingGroupOnSelection?: boolean; + + /** Specifies the group color mapping of the treemap + * @Default {[]} + */ + groupColorMapping?: Array; + + /** Specifies the legend settings of the treemap + */ + legendSettings?: LegendSettings; + + /** 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 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 rangeColorMapping settings of the treemap + * @Default {[]} + */ + rangeColorMapping?: Array; + + /** Specifies the selection mode of treemap item. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + selectionMode?: ej.datavisualization.TreeMap.selectionMode|string; + + /** Specifies the selection mode of the treemap. Accepted selection mode values are Default and Multiple. + * @Default {default} + */ + groupSelectionMode?: ej.datavisualization.TreeMap.groupSelectionMode|string; + + /** Specifies the legend visibility status of the treemap + * @Default {false} + */ + showLegend?: boolean; + + /** Specifies whether gradient color has to be applied for treemap items + * @Default {false} + */ + enableGradient?: boolean; + + /** Specifies whether treemap showTooltip need to be visible + */ + showTooltip?: boolean; + + /** Specifies the tooltip template of the treemap + * @Default {null} + */ + tooltipTemplate?: string; + + /** Hold the treeMapItems to be displayed in treemap + * @Default {[]} + */ + treeMapItems?: Array; + + /** Specify levels of treemap for grouped visualization of data + * @Default {[]} + */ + levels?: Array; + + /** Specifies the weight value path of the treemap + * @Default {null} + */ + weightValuePath?: string; + + /** Triggers on treemap item selected. */ + treeMapItemSelected? (e: TreeMapItemSelectedEventArgs): void; +} + +export interface TreeMapItemSelectedEventArgs { + + /** Returns selected treeMapItem object. + */ + originalEvent?: any; +} + +export interface UniColorMapping { + + /** Specifies the uniform color mapping of the treemap + * @Default {null} + */ + color?: string; +} + +export interface DesaturationColorMapping { + + /** Specifies the to value for desaturation color mapping + * @Default {0} + */ + to?: number; + + /** Specifies the color for desaturationColorMapping + * @Default {null} + */ + color?: string; + + /** Specifies the from value for desaturation color mapping + * @Default {0} + */ + from?: number; + + /** Specifies the rangeMaximum value for desaturation color mapping + * @Default {0} + */ + rangeMaximum?: number; + + /** Specifies the rangeMinimum value for desaturation color mapping + * @Default {0} + */ + rangeMinimum?: number; +} + +export interface PaletteColorMapping { + + /** Specifies the colors of the paletteColorMapping + * @Default {[]} + */ + colors?: Array; +} + +export interface GroupColorMapping { + + /** Specifies the groupID for GroupColorMapping. + * @Default {null} + */ + groupID?: string; +} + +export interface LegendSettings { + + /** Specifies the height for legend + * @Default {30} + */ + height?: number; + + /** Specifies the width for legend + * @Default {100} + */ + width?: number; + + /** Specifies the iconHeight for legend + * @Default {15} + */ + iconHeight?: number; + + /** Specifies the iconWidth for legend + * @Default {15} + */ + iconWidth?: number; + + /** Specifies the template for legendSettings + * @Default {null} + */ + template?: string; + + /** Specifies the mode for legendSettings whether defaul or interactive mode + * @Default {default} + */ + mode?: string; + + /** Specifies the title text for legend + */ + title?: string; + + /** Specifies the leftLabel text for legend + */ + leftLabel?: string; + + /** Specifies the rightLabel text for legend + */ + rightLabel?: string; + + /** Specifies the dockPosition text for legend + * @Default {top} + */ + dockPosition?: string; + + /** Specifies the alignment text for legend + * @Default {near} + */ + alignment?: string; + + /** Specifies the alignment text for legend + * @Default {0} + */ + columnCount?: number; +} + +export interface LeafItemSettings { + + /** Specifies the border brush 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 RangeColorMapping { + + /** Specifies the color value for rangeColorMapping. + * @Default {null} + */ + color?: string; + + /** specifies the gradient colors for th given range value + * @Default {[]} + */ + gradientColors?: Array; + + /** Specifies the from value for rangeColorMapping. + * @Default {-1} + */ + from?: number; + + /** Specifies the legend label value for rangeColorMapping. + * @Default {null} + */ + legendLabel?: string; + + /** Specifies the to value for rangeColorMapping. + * @Default {-1} + */ + to?: number; +} + +export interface Level { + + /** 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 hide on exceeded length mode +Hideonexceededlength, +} +} +module TreeMap +{ +enum selectionMode +{ +//specifies the default mode +Default, +//specifies the multiple mode +Multiple, +} +} +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 user handles 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 + */ + 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 change is reverted or restored(undo/redo) */ + historyChange? (e: HistoryChangeEventArgs): 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; + + /** Triggered when the diagram is rendered completely. */ + create? (e: CreateEventArgs): 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 HistoryChangeEventArgs { + + /** An array of objects, where each object represents the changes made in last undo/redo. To explore how the changes are defined, refer [Undo Redo Changes](#undo-redo-changes) + */ + changes?: Array; + + /** A collection of objects that are changed in the last undo/redo + */ + Source?: Array; +} + +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 CreateEventArgs { + + /** Returns the diagram model. + */ + model?: any; + + /** Returns the name of the event + */ + type?: string; +} + +export interface BackgroundImage { + + /** Defines how to align the background image over the diagram area. + * @Default {ej.datavisualization.Diagram.ImageAlignment.XMidYMid} + */ + alignment?: ej.datavisualization.Diagram.ImageAlignment |string; + + /** Defines how the background image should be scaled/stretched + * @Default {ej.datavisualization.Diagram.ScaleConstraints.Meet} + */ + scale?: ej.datavisualization.Diagram.ScaleConstraints |string; + + /** Sets the source path of the background image + * @Default {null} + */ + source?: 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 ConnectorsLabelsMargin { + + /** To set the margin of the label in right direction + * @Default {0} + */ + right?: number; + + /** To set the margin of the label in left direction + * @Default {0} + */ + left?: number; + + /** To set the margin of the label in top direction + * @Default {0} + */ + top?: number; + + /** To set the margin of the label in bottom direction + * @Default {0} + */ + bottom?: number; +} + +export interface ConnectorsLabel { + + /** Defines how the label should be aligned with respect to the segment + * @Default {ej.datavisualization.Diagram.Alignment.Center} + */ + alignment?: ej.datavisualization.Diagram.Alignment|string; + + /** 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; + + /** Defines whether the label should be aligned within the connector boundaries + * @Default {true} + */ + boundaryConstraints?: boolean; + + /** 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; + + /** 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 connector) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + offset?: any; + + /** Sets the fraction/ratio(relative to connector) that defines the position of the label + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + margin?: ConnectorsLabelsMargin; + + /** Defines the transparency of labels + * @Default {1} + */ + opacity?: number; + + /** Defines whether the label is editable or not + * @Default {false} + */ + readOnly?: boolean; + + /** Defines whether the label should be positioned whether relative to segments or connector boundaries + * @Default {ej.datavisualization.Diagram.LabelRelativeMode.SegmentPath} + */ + relativeMode?: ej.datavisualization.Diagram.LabelRelativeMode|string; + + /** Defines the angle to which the label needs to be rotated + * @Default {0} + */ + rotateAngle?: number; + + /** Sets the position of the label with respect to the total segment length + * @Default {0.5} + */ + segmentOffset?: string; + + /** 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 connector 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 ConnectorsSegment { + + /** 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 ConnectorsShape { + + /** Sets the type of the connector + * @Default {ej.datavisualization.Diagram.ConnectorShapes.BPMN} + */ + type?: ej.datavisualization.Diagram.ConnectorShapes|string; + + /** Sets the type of the flow in a BPMN Process + * @Default {ej.datavisualization.Diagram.BPMNFlows.Sequence} + */ + flow?: ej.datavisualization.Diagram.BPMNFlows|string; + + /** Sets the type of the Association in a BPMN Process + * @Default {ej.datavisualization.Diagram.AssociationFlows.Default} + */ + association?: ej.datavisualization.Diagram.AssociationFlows|string; + + /** Sets the type of the message flow. Applicable, if the connector is of type "BPMN" + * @Default {ej.datavisualization.Diagram.BPMNMessageFlows.Default} + */ + message?: ej.datavisualization.Diagram.BPMNMessageFlows|string; + + /** Sets the type of BPMN sequence flow + * @Default {ej.datavisualization.Diagram.BPMNSequenceFlows.Normal} + */ + sequence?: ej.datavisualization.Diagram.BPMNSequenceFlows|string; + + /** Defines the role of the connector in a UML Class Diagram. Applicable, if the type of the connector is "classifier". + * @Default {ej.datavisualization.Diagram.ClassifierShapes.Association} + */ + relationship?: string; + + /** Defines the multiplicity of a relationship in UML class diagram + */ + multiplicity?: string; +} + +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 Connector { + + /** 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. + * @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 role/meaning of the connector + * @Default {null} + */ + shape?: ConnectorsShape; + + /** 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 { + + /** Specifies the custom bounds to arrange/align the layout + * @Default {ej.datavisualization.Diagram.Rectangle()} + */ + bounds?: any; + + /** 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; + + /** Defines the space to be left between layout bounds and layout. + * @Default {ej.datavisualization.Diagram.Margin()} + */ + margin?: any; + + /** Defines how to horizontally align the layout within the layout bounds + * @Default {ej.datavisualization.Diagram.HorizontalAlignment.Center} + */ + horizontalAlignment?: ej.datavisualization.Diagram.HorizontalAlignment|string; + + /** Defines how to vertically align the layout within the layout bounds + * @Default {ej.datavisualization.Diagram.VerticalAlignment.Center} + */ + verticalAlignment?: ej.datavisualization.Diagram.VerticalAlignment|string; + + /** 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 NodesAnnotation { + + /** Sets the angle between the BPMN shape and the annotation + * @Default {0} + */ + angle?: number; + + /** Sets the direction of the text annotation + * @Default {ej.datavisualization.Diagram.BPMNAnnotationDirections.Left} + */ + direction?: ej.datavisualization.Diagram.BPMNAnnotationDirection|string; + + /** Sets the height of the text annotation + * @Default {20} + */ + height?: number; + + /** Sets the distance between the BPMN shape and the annotation + * @Default {0} + */ + length?: number; + + /** Defines the additional information about the flow object in a BPMN Process + */ + text?: string; + + /** Sets the width of the text annotation + * @Default {20} + */ + width?: number; +} + +export interface NodesClassAttribute { + + /** Sets the name of the attribute + */ + name?: string; + + /** Sets the data type of attribute + */ + type?: string; + + /** Defines the visibility of the attribute + * @Default {ej.datavisualization.Diagram.ScopeValueDefaults.Public} + */ + scope?: string; +} + +export interface NodesClassMethod { + + /** Sets the visibility of the method. + * @Default {ej.datavisualization.Diagram.ScopeValueDefaults.Public} + */ + scope?: string; +} + +export interface NodesClass { + + /** Sets the name of class. + */ + name?: string; + + /** Defines the collection of attributes + * @Default {[]} + */ + attributes?: Array; + + /** Defines the collection of methods of a Class. + * @Default {[]} + */ + methods?: Array; +} + +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 NodesData { + + /** Sets the type of the BPMN Data object + * @Default {ej.datavisualization.Diagram.BPMNDataObjects.None} + */ + type?: ej.datavisualization.Diagram.BPMNDataObjects|string; + + /** Defines whether the BPMN data object is a collection or not + * @Default {false} + */ + collection?: boolean; +} + +export interface NodesEnumerationMember { + + /** Sets the name of the enumeration member + */ + name?: string; +} + +export interface NodesEnumeration { + + /** Sets the name of the Enumeration + */ + name?: string; + + /** Defines the collection of enumeration members + * @Default {[]} + */ + members?: Array; +} + +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 NodesInterfaceAttribute { + + /** Sets the name of the attribute + */ + name?: string; + + /** Sets the type of the attribute + */ + type?: string; + + /** Sets the visibility of the attribute + */ + scope?: string; +} + +export interface NodesInterfaceMethod { + + /** Sets the visibility of the method + */ + scope?: string; +} + +export interface NodesInterface { + + /** Sets the name of the interface + */ + name?: string; + + /** Defines a collection of attributes of the interface + * @Default {[]} + */ + attributes?: Array; + + /** Defines the collection of public methods of an interface + * @Default {[]} + */ + methods?: Array; +} + +export interface NodesLabel { + + /** 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 the transparency of the labels + * @Default {1} + */ + opacity?: number; + + /** 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 NodesLane { + + /** Defines the width of lane + * @Default {0} + */ + width?: number; + + /** Defines the height of lane + * @Default {0} + */ + height?: number; + + /** Defines the z-index of the lane + * @Default {0} + */ + zorder?: number; + + /** 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 NodesPhase { + + /** 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 NodesPort { + + /** 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; + + /** Sets whether the BPMN subprocess is triggered as a collapsed of a specific activity + * @Default {true} + */ + collapsed?: boolean; + + /** Sets the type of the event by which the sub-process will be triggered + * @Default {ej.datavisualization.Diagram.BPMNEvents.Start} + */ + event?: ej.datavisualization.Diagram.BPMNEvents|string; + + /** Defines the collection of events that need to be appended with BPMN Sub-Process + */ + events?: Array; + + /** Defines the loop type of a sub process. + * @Default {ej.datavisualization.Diagram.BPMNLoops.None} + */ + loop?: ej.datavisualization.Diagram.BPMNLoops|string; + + /** Defines the type of the event trigger + * @Default {ej.datavisualization.Diagram.BPMNTriggers.Message} + */ + trigger?: ej.datavisualization.Diagram.BPMNTriggers|string; + + /** Defines the type of a sub process + * @Default {ej.datavisualization.Diagram.BPMNSubProcessTypes.None} + */ + type?: ej.datavisualization.Diagram.BPMNSubProcessTypes|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 Node { + + /** 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; + + /** Defines the additional information of a process. It is not directly related to the message flows or sequence flows of the process. + * @Default {ej.datavisualization.Diagram.BPMNTextAnnotation()} + */ + annotation?: NodesAnnotation; + + /** 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; + + /** Sets the type of UML classifier. Applicable, if the node is a UML Class Diagram shape. + * @Default {ej.datavisualization.Diagram.ClassifierShapes.Class} + */ + classifier?: ej.datavisualization.Diagram.ClassifierShapes|string; + + /** Defines the name, attributes and methods of a Class. Applicable, if the node is a Class. + * @Default {null} + */ + class?: NodesClass; + + /** 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; + + /** Defines the BPMN data object + */ + data?: NodesData; + + /** Defines an Enumeration in a UML Class Diagram + * @Default {null} + */ + enumeration?: NodesEnumeration; + + /** 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; + + /** Sets the type of the BPMN Shapes as group. Applicable, if the node is a BPMN. + * @Default {ej.datavisualization.Diagram.BPMNShapes} + */ + group?: any; + + /** 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 an interface in a UML Class Diagram + * @Default {null} + */ + interface?: NodesInterface; + + /** 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 how the node should be scaled/stretched + * @Default {ej.datavisualization.Diagram.ScaleConstraints.Meet} + */ + scale?: ej.datavisualization.Diagram.ScaleConstraints |string; + + /** 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; + + /** Defines the draggable region of diagram elements. + * @Default {ej.datavisualization.Diagram.BoundaryConstraints.Infinite} + */ + boundaryConstraints?: ej.datavisualization.Diagram.BoundaryConstraints|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 SelectedItemsUserHandle { + + /** Defines the background color of the user handle + * @Default {#2382c3} + */ + backgroundColor?: string; + + /** Sets the border color of the user handle + * @Default {transparent} + */ + borderColor?: string; + + /** Defines whether the user handle should be added, when more than one element is selected + * @Default {false} + */ + enableMultiSelection?: boolean; + + /** Sets the stroke color of the user handle + * @Default {transparent} + */ + pathColor?: string; + + /** Defines the custom shape of the user handle + */ + pathData?: string; + + /** Defines the position of the user handle + * @Default {ej.datavisualization.Diagram.UserHandlePositions.BottomCenter} + */ + position?: ej.datavisualization.Diagram.UserHandlePositions |string; + + /** Defines the size of the user handle + * @Default {8} + */ + size?: number; + + /** Defines the interactive behaviors of the user handle + */ + tool?: any; + + /** Defines the visibility of the user handle + * @Default {true} + */ + visible?: boolean; +} + +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 used commands that will 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 and sets the snapConstraints + */ + snapConstraints?: ej.datavisualization.Diagram.SnapConstraints|string; + + /** 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 ImageAlignment +{ +//Scales the graphic content non-uniformly to the width and height of the diagram area +None, +//Used to align the image at the top left of diagram area +XMinYMin, +//Used to align the image at the left center of diagram area +XMinYMid, +//Used to align the image at the bottom left of diagram area +XMinYMax, +//Used to align the image at the top center of diagram area +XMidYMin, +//Used to align the image at the center of diagram area +XMidYMid, +//Used to align the image at the bottom center of diagram area +XMidYMax, +//Used to align the image at the top right of diagram area/node +XMaxYMin, +//Used to align the image at the right center of diagram area/node +XMaxYMid, +//Used to align the image at the bottom right of diagram area/node +XMaxYMax, +} +} +module Diagram +{ +enum ScaleConstraints +{ +//Used to scale the image non-uniformly to the given width/height +None, +//Used to scale the image uniformly so that it fits the viewport +Meet, +//Used to scale the image uniformly to the maximum +Slice, +} +} +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 user interaction to the connector +PointerEvents, +//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 Alignment +{ +//Used to align the label either top or left(before) of the connector segment +Before, +//Used to align the label at center of the connector segment +Center, +//Used to align the label either bottom or right(after) of the connector segment +After, +} +} +module Diagram +{ +enum LabelRelativeMode +{ +//Sets the relativeMode as SegmentPath +SegmentPath, +//Sets the relativeMode as SegmentBounds +SegmentBounds, +} +} +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 ConnectorShapes +{ +//Used to specify connector type as BPMN +BPMN, +//Used to specify connector type as Classifier +Classifier, +} +} +module Diagram +{ +enum BPMNFlows +{ +//Used to specify the Sequence flow in a BPMN Process +Sequence, +//Used to specify the Association flow in a BPMN Process +Association, +//Used to specify the Message flow in a BPMN Process +Message, +} +} +module Diagram +{ +enum AssociationFlows +{ +//Used to notate default association in a BPMN Process +Default, +//Used to notate directional association in a BPMN Process +Directional, +//User to notate bi-directional association in a BPMN Process +BiDirectional, +} +} +module Diagram +{ +enum BPMNMessageFlows +{ +//Used to notate the default message flow in a BPMN Process +Default, +//Used to notate the instantiating message flow in a BPMN Process +InitiatingMessage, +//Used to notate the non-instantiating message flow in a BPMN Process +NonInitiatingMessage, +} +} +module Diagram +{ +enum BPMNSequenceFlows +{ +//Used to notate the normal sequence flow in a BPMN Process +Normal, +//Used to notate the conditional sequence flow in a BPMN Process +Conditional, +//Used to notate the default sequence flow in a BPMN Process +Default, +} +} +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 BPMNAnnotationDirection +{ +//Used to set the direction of BPMN Annotation as left +Left, +//Used to set the direction of BPMN Annotation as right +Right, +//Used to set the direction of BPMN Annotation as top +Top, +//Used to set the direction of BPMN Annotation as bottom +Bottom, +} +} +module Diagram +{ +enum ClassifierShapes +{ +//Used to define a Class +Class, +//Used to define an Interface +Interface, +//Used to define an Enumeration +Enumeration, +} +} +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 the user interaction with the node +PointerEvents, +//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 BPMNDataObjects +{ +//Used to notate the Input type BPMN data object +Input, +//Used to notate the Output type BPMN data object +Output, +//Used to set BPMN data object type as None +None, +} +} +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, +//Used to set BPMN Event as ThrowingIntermediate +ThrowingIntermediate, +} +} +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, +//Used to set BPMN Gateway as ExclusiveEventBased +ExclusiveEventBased, +//Used to set BPMN Gateway as ParallelEventBased +ParallelEventBased, +} +} +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 BPMNSubProcessTypes +{ +//Used to set BPMN SubProcess type as None +None, +//Used to set BPMN SubProcess type as Transaction +Transaction, +//Used to set BPMN SubProcess type as Event +Event, +} +} +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, +//Used to set Event Trigger as Conditional +Conditional, +//Used to set Event Trigger as Termination +Termination, +//Used to set Event Trigger as Cancel +Cancel, +} +} +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 BoundaryConstraints +{ +//Used to set boundaryConstraints as Infinite +Infinite, +//Used to set boundaryConstraints as Diagram +Diagram, +//Used to set boundaryConstraints as Page +Page, +} +} +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 UserHandlePositions +{ +//Set the position of the userhandle as topleft +TopLeft, +//Set the position of the userhandle as topcenter +TopCenter, +//Set the position of the userhandle as topright +TopRight, +//Set the position of the userhandle as middleleft +MiddleLeft, +//Set the position of the userhandle as middleright +MiddleRight, +//Set the position of the userhandle as bottomleft +BottomLeft, +//Set the position of the userhandle as bottomcenter +BottomCenter, +//Set the position of the userhandle as bottom right +BottomRight, +} +} +module Diagram +{ +enum SnapConstraints +{ +//Enables node to be snapped to horizontal gridlines +None, +//Enables node to be snapped to vertical gridlines +SnapToHorizontalLines, +//Enables node to be snapped to horizontal gridlines +SnapToVerticalLines, +//Enables node to be snapped to gridlines +SnapToLines, +//Enable horizontal lines +ShowHorizontalLines, +//Enable vertical lines +ShowVerticalLines, +//Enable both horizontal and vertical lines +ShowLines, +//Enable all the constraints +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, +} +} + +class HeatMap extends ej.Widget { + static fn: HeatMap; + constructor(element: JQuery, options?: HeatMap.Model); + constructor(element: Element, options?: HeatMap.Model); + model:HeatMap.Model; + defaults:HeatMap.Model; +} +export module HeatMap{ + +export interface Model { + + /** Specifies the width of the heat map. + * @Default {null} + */ + width?: any; + + /** Specifies the width of the heat map. + * @Default {null} + */ + height?: any; + + /** Specifies the name of the heat map. + * @Default {null} + */ + id?: number; + + /** Specifies the source data of the heat map. + * @Default {[]} + */ + itemsSource?: any; + + /** Specifies the property of the heat map cell. + * @Default {Null} + */ + heatMapCell?: HeatMapCell; + + /** Specifies can enable responsive mode or not for heat map. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies whether the virtualization can be enable or not. + * @Default {false} + */ + enableVirtualization?: boolean; + + /** Specifies the default column properties for all the column style not specified in column properties. + * @Default {[]} + */ + defaultColumnStyle?: DefaultColumnStyle; + + /** Specifies the no of legends can sync with heat map. + * @Default {[]} + */ + legendCollection?: Array; + + /** Specifies the property and display value of the heat map column. + * @Default {[]} + */ + itemsMapping?: ItemsMapping; + + /** Specifies the color values of the heat map column data. + * @Default {[]} + */ + colorMappingCollection?: Array; + + /** Triggered when the mouse over on the cell. */ + cellMouseOver? (e: CellMouseOverEventArgs): void; + + /** Triggered when the mouse over on the cell. */ + cellMouseEnter? (e: CellMouseEnterEventArgs): void; + + /** Triggered when the mouse over on the cell. */ + cellMouseLeave? (e: CellMouseLeaveEventArgs): void; + + /** Triggered when the mouse over on the cell. */ + cellSelected? (e: CellSelectedEventArgs): void; +} + +export interface CellMouseOverEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; +} + +export interface CellMouseEnterEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; +} + +export interface CellMouseLeaveEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; +} + +export interface CellSelectedEventArgs { + + /** Value displayed on the cell + */ + cellValue?: string; + + /** Returns the HeatMap cell data + */ + source?: any; + + /** Returns the specific HeatMap cell + */ + cell?: any; +} + +export interface HeatMapCell { + + /** Specifies whether the cell content can be visible or not. + * @Default {ej.HeatMap.CellVisibility.Visible} + */ + showContent?: ej.datavisualization.HeatMap.CellVisibility|string; + + /** Specifies whether the cell color can be visible or not. + * @Default {true} + */ + showColor?: boolean; +} + +export interface DefaultColumnStyle { + + /** Specifies the alignment mode of the heat map column. + * @Default {ej.HeatMap.TextAlign.Center} + */ + textAlign?: any; + + /** Specifies the template id of the heat map column header. + */ + headerTemplateID?: string; + + /** Specifies the template id of all individual cell data of the heat map. + */ + templateID?: string; +} + +export interface ItemsMappingColumnStyle { + + /** Specifies the width of the heat map column. + * @Default {0} + */ + width?: number; + + /** Specifies the text align mode of the heat map column. + * @Default {ej.HeatMap.TextAlign.Center} + */ + textAlign?: string; + + /** Specifies the template id of the column header. + */ + headerTemplateID?: string; + + /** Specifies the template id of all individual cell data. + */ + templateID?: string; +} + +export interface ItemsMappingColumn { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; +} + +export interface ItemsMappingRow { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; +} + +export interface ItemsMappingValue { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; +} + +export interface ItemsMappingHeaderMapping { + + /** Specifies the name of the column or row. + */ + propertyName?: string; + + /** Specifies the value of the column or row. + */ + displayName?: string; + + /** Specifies the property and display value of the header. + * @Default {null} + */ + columnStyle?: any; +} + +export interface ItemsMapping { + + /** Column settings for the individual heat map column. + * @Default {null} + */ + columnStyle?: ItemsMappingColumnStyle; + + /** Specifies the property and display value of the column. + * @Default {null} + */ + column?: ItemsMappingColumn; + + /** Specifies the property and display value of the heat map.row + * @Default {null} + */ + row?: ItemsMappingRow; + + /** Specifies the property and display value of the column value. + * @Default {null} + */ + value?: ItemsMappingValue; + + /** Specifies the property and display value of the header. + * @Default {null} + */ + headerMapping?: ItemsMappingHeaderMapping; + + /** Specifies the property and display value of the collection of column. + * @Default {[]} + */ + columnMapping?: Array; +} + +export interface ColorMappingCollectionLabel { + + /** Enables/disables the bold style of the heat map label. + * @Default {false} + */ + bold?: boolean; + + /** Enables/disables the italic style of the heat map label. + * @Default {false} + */ + italic?: boolean; + + /** specifies the text value of the heat map label. + */ + text?: string; + + /** Specifies the text style of the heat map label. + * @Default {ej.HeatMap.TextDecoration.None} + */ + textDecoration?: ej.datavisualization.HeatMap.TextDecoration |string; + + /** Specifies the font size of the heat map label. + * @Default {10} + */ + fontSize?: number; + + /** Specifies the font family of the heat map label. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the font color of the heat map label. + * @Default {black} + */ + fontColor?: string; +} + +export interface ColorMappingCollection { + + /** Specifies the color of the heat map column data. + * @Default {white} + */ + color?: string; + + /** Specifies the color values of the heat map column data. + * @Default {0} + */ + value?: number; + + /** Specifies the label properties of the heat map color. + * @Default {null} + */ + label?: ColorMappingCollectionLabel; +} +} +module HeatMap +{ +enum CellVisibility +{ +//Display the content of the cell +Visible, +//Hide the content of the cell +Hidden, +} +} +module HeatMap +{ +enum TextDecoration +{ +//Defines a line below the text +Underline, +//Defines a line above the text +Overline, +//Defines a line through the text +LineThrough, +//Defines a normal text. This is default +None, +} +} + +class HeatMapLegend extends ej.Widget { + static fn: HeatMapLegend; + constructor(element: JQuery, options?: HeatMapLegend.Model); + constructor(element: Element, options?: HeatMapLegend.Model); + model:HeatMapLegend.Model; + defaults:HeatMapLegend.Model; +} +export module HeatMapLegend{ + +export interface Model { + + /** Specifies the width of the heatmap legend. + * @Default {null} + */ + width?: any; + + /** Specifies the height of the heatmap legend. + * @Default {null} + */ + height?: any; + + /** Specifies can enable responsive mode or not for heatmap legend. + * @Default {false} + */ + isResponsive?: boolean; + + /** Specifies whether the cell label can be shown or not. + * @Default {false} + */ + showLabel?: boolean; + + /** Specifies the color values of the column data. + * @Default {[]} + */ + colorMappingCollection?: Array; + + /** Specifies the orientation of the heatmap legend + * @Default {ej.HeatMap.LegendOrientation.Horizontal} + */ + orientation?: ej.datavisualization.HeatMap.LegendOrientation|string; + + /** Specifies the legend mode as gradient or list. + * @Default {ej.HeatMap.LegendMode.Gradient} + */ + legendMode?: ej.datavisualization.HeatMap.LegendMode|string; +} + +export interface ColorMappingCollectionLabel { + + /** Enables/disables the bold style of the heatmap legend label. + * @Default {false} + */ + bold?: boolean; + + /** Enables/disables the italic style of the heatmap legend label. + * @Default {false} + */ + italic?: boolean; + + /** specifies the text value of the heatmap legend label. + */ + text?: string; + + /** Specifies the text style of the heatmap legend label. + * @Default {ej.HeatMap.TextDecoration.None} + */ + textDecoration?: ej.datavisualization.HeatMap.TextDecoration|string; + + /** Specifies the font size of the heatmap legend label. + * @Default {10} + */ + fontSize?: number; + + /** Specifies the font family of the heatmap legend label. + * @Default {Arial} + */ + fontFamily?: string; + + /** Specifies the font color of the heatmap legend label. + * @Default {black} + */ + fontColor?: string; +} + +export interface ColorMappingCollection { + + /** Specifies the color of the heatmap legend data. + * @Default {white} + */ + color?: string; + + /** Specifies the color values of the heatmap legend column data. + * @Default {0} + */ + value?: number; + + /** Specifies the label properties of the heatmap legend color. + * @Default {null} + */ + label?: ColorMappingCollectionLabel; +} +} +module HeatMap +{ +enum LegendOrientation +{ +//Scales the graphic content non-uniformly to the width and height of the diagram area +Horizontal, +//Used to align the image at the top left of diagram area +Vertical, +} +} +module HeatMap +{ +enum LegendMode +{ +//Scales the graphic content non-uniformly to the width and height of the diagram area +Gradient, +//Used to align the image at the top left of diagram area +List, +} +} + +class Sparkline extends ej.Widget { + static fn: Sparkline; + constructor(element: JQuery, options?: Sparkline.Model); + constructor(element: Element, options?: Sparkline.Model); + model:Sparkline.Model; + defaults:Sparkline.Model; + + /** Redraws the entire sparkline. 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 Sparkline{ + +export interface Model { + + /** Background color of the plot area. + * @Default {transparent} + */ + background?: string; + + /** Fill color for the sparkline series. + * @Default {#33ccff} + */ + fill?: string; + + /** Border color of the series. + * @Default {null} + */ + stroke?: string; + + /** Options for customizing the color, opacity and width of the sparkline border. + */ + border?: Border; + + /** Border width of the series. + * @Default {1} + */ + width?: number; + + /** Opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Color for series high point. + * @Default {null} + */ + highPointColor?: string; + + /** Color for series low point. + * @Default {null} + */ + lowPointColor?: string; + + /** Color for series start point. + * @Default {null} + */ + startPointColor?: string; + + /** Color for series end point. + * @Default {null} + */ + endPointColor?: string; + + /** Color for series negative point. + * @Default {null} + */ + negativePointColor?: string; + + /** Options for customizing the color, opacity of the sparkline start and end range. + */ + rangeBandSettings?: RangeBandSettings; + + /** Name of a field in data source, where the fill color for all the data points is generated. + */ + palette?: string; + + /** Controls whether sparkline has to be responsive or not. + * @Default {true} + */ + isResponsive?: boolean; + + /** Controls whether Sparkline has to be rendered as Canvas or SVG.Canvas rendering supports all functionalities in SVG rendering. + * @Default {false} + */ + enableCanvasRendering?: boolean; + + /** Specifies the dataSource for the series. It can be an array of JSON objects or an instance of ej.DataManager. + * @Default {null} + */ + dataSource?: any; + + /** Name of the property in the datasource that contains x value for the series. + * @Default {null} + */ + xName?: string; + + /** Name of the property in the datasource that contains y value for the series. + * @Default {null} + */ + yName?: string; + + /** Gap or padding for sparkline. + * @Default {8} + */ + padding?: number; + + /** Specifies the type of the series to render in sparkline. + * @Default {line. See Type} + */ + type?: ej.datavisualization.Sparkline.Type|string; + + /** Specifies the theme for Sparkline. + * @Default {Flatlight. See Theme} + */ + theme?: ej.datavisualization.Sparkline.Theme|string; + + /** Options to customize the tooltip. + */ + tooltip?: Tooltip; + + /** Options for displaying and customizing marker for a data point. + */ + markerSettings?: MarkerSettings; + + /** Options to customize the Sparkline size. + */ + size?: Size; + + /** Options for customizing the color,dashArray and width of the axisLine. + */ + axisLineSettings?: AxisLineSettings; + + /** Fires before loading the sparkline. */ + load? (e: LoadEventArgs): void; + + /** Fires after loaded the sparkline. */ + loaded? (e: LoadedEventArgs): void; + + /** Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip. */ + tooltipInitialize? (e: TooltipInitializeEventArgs): void; + + /** Fires before rendering a series. This event is fired for each series in Sparkline. */ + seriesRendering? (e: SeriesRenderingEventArgs): void; + + /** Fires when mouse is moved over a point. */ + pointRegionMouseMove? (e: PointRegionMouseMoveEventArgs): void; + + /** Fires on clicking a point in sparkline. You can use this event to handle clicks made on points. */ + pointRegionMouseClick? (e: PointRegionMouseClickEventArgs): void; + + /** Fires on moving mouse over the sparkline. */ + sparklineMouseMove? (e: SparklineMouseMoveEventArgs): void; + + /** Fires on moving mouse outside the sparkline. */ + sparklineMouseLeave? (e: SparklineMouseLeaveEventArgs): void; +} + +export interface LoadEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface LoadedEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface TooltipInitializeEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** X Location of the trackball tooltip in pixels + */ + locationX?: any; + + /** Y Location of the trackball tooltip in pixels + */ + locationY?: any; + + /** Index of the point for which trackball tooltip is displayed + */ + pointIndex?: number; + + /** Text to be displayed in trackball tooltip. Use this option to add custom text in trackball tooltip + */ + currentText?: string; +} + +export interface SeriesRenderingEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** Minimum x value of the data point + */ + minX?: any; + + /** Minimum y value of the data point + */ + minY?: any; + + /** Maximum x value of the data point + */ + maxX?: any; + + /** Maximum y value of the data point + */ + maxY?: any; +} + +export interface PointRegionMouseMoveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline 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; + + /** Type of the series + */ + seriesType?: string; +} + +export interface PointRegionMouseClickEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline 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; + + /** Type of the series + */ + seriesType?: string; +} + +export interface SparklineMouseMoveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface SparklineMouseLeaveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the sparkline model object + */ + model?: any; + + /** Name of the event + */ + type?: string; +} + +export interface Border { + + /** Border color of the sparkline. + * @Default {transparent} + */ + color?: string; + + /** Width of the Sparkline border. + * @Default {1} + */ + width?: number; +} + +export interface RangeBandSettings { + + /** Start value of the range band. + * @Default {null} + */ + startRange?: number; + + /** End value of the range band. + * @Default {null} + */ + endRange?: number; + + /** Range band opacity of the series. + * @Default {1} + */ + opacity?: number; + + /** Range band color of the series. + * @Default {transparent} + */ + color?: string; +} + +export interface TooltipBorder { + + /** Border color of the tooltip. + * @Default {transparent} + */ + color?: string; + + /** Border width of the tooltip. + * @Default {1} + */ + width?: number; +} + +export interface TooltipFont { + + /** Font color of the text in the tooltip. + * @Default {#111111} + */ + color?: string; + + /** Font Family for the tooltip. + * @Default {Segoe UI} + */ + fontFamily?: string; + + /** Specifies the font Style for the tooltip. + * @Default {Normal} + */ + fontStyle?: ej.datavisualization.Sparkline.FontStyle|string; + + /** Specifies the font weight for the tooltip. + * @Default {Regular} + */ + fontWeight?: ej.datavisualization.Sparkline.FontWeight|string; + + /** Opacity for text in the tooltip. + * @Default {1} + */ + opacity?: number; + + /** Font size for text in the tooltip. + * @Default {8px} + */ + size?: string; +} + +export interface Tooltip { + + /** Show/hides the tooltip visibility. + * @Default {false} + */ + visible?: boolean; + + /** Fill color for the sparkline tooltip. + * @Default {white} + */ + fill?: string; + + /** Custom template to the tooltip. + */ + template?: string; + + /** Options for customizing the border of the tooltip. + */ + border?: TooltipBorder; + + /** Options for customizing the font of the tooltip. + */ + font?: TooltipFont; +} + +export interface MarkerSettingsBorder { + + /** Border color of the marker shape. + * @Default {transparent} + */ + color?: string; + + /** Controls the opacity of the marker border. + * @Default {1} + */ + opacity?: number; + + /** Border width of the marker shape. + * @Default {null} + */ + width?: number; +} + +export interface MarkerSettings { + + /** Controls the opacity of the marker. + * @Default {1} + */ + opacity?: number; + + /** Controls the visibility of the marker shape. + * @Default {false} + */ + visible?: boolean; + + /** width of the marker shape. + * @Default {2} + */ + width?: number; + + /** Color of the marker shape. + * @Default {white} + */ + fill?: string; + + /** Options for customizing the border of the marker shape. + */ + border?: MarkerSettingsBorder; +} + +export interface Size { + + /** Height of the Sparkline. Height can be specified in either pixel or percentage. + * @Default {''} + */ + height?: string; + + /** Width of the Sparkline. Width can be specified in either pixel or percentage. + * @Default {''} + */ + width?: string; +} + +export interface AxisLineSettings { + + /** Controls the visibility of the axis. + * @Default {false} + */ + visible?: boolean; + + /** Color of the axis line. + * @Default {'#111111'} + */ + color?: string; + + /** Width of the axis line. + * @Default {1} + */ + width?: number; + + /** Dash array of the axis line. + * @Default {1} + */ + dashArray?: number; +} +} +module Sparkline +{ +enum Type +{ +//string +Area, +//string +Line, +//string +Column, +//string +Pie, +//string +WinLoss, +} +} +module Sparkline +{ +enum Theme +{ +//string +Azure, +//string +FlatLight, +//string +FlatDark, +//string +Azuredark, +//string +Lime, +//string +LimeDark, +//string +Saffron, +//string +SaffronDark, +//string +GradientLight, +//string +GradientDark, +} +} +module Sparkline +{ +enum FontStyle +{ +//string +Normal, +//string +Italic, +} +} +module Sparkline +{ +enum FontWeight +{ +//string +Regular, +//string +Bold, +//string +Lighter, +} +} + +class Overview extends ej.Widget { + static fn: Overview; + constructor(element: JQuery, options?: Overview.Model); + constructor(element: Element, options?: Overview.Model); + model:Overview.Model; + defaults:Overview.Model; +} +export module Overview{ + +export interface Model { + + /** The sourceId property of overview should be set with the corresponding Diagram ID for you need the overall view. + * @Default {null} + */ + sourceID?: string; + + /** Defines the height of the overview + * @Default {400} + */ + height?: number; + + /** Defines the width of the overview + * @Default {250} + */ + width?: number; +} +} + +} + +interface JQueryXHR { +} +interface JQueryPromise { +} +interface JQueryDeferred extends JQueryPromise { +} +interface JQueryParam { +} +interface JQuery { + data(key: any): any; +} +interface Window { + ej: typeof ej; +} +interface JQuery { + +ejAccordion(): JQuery; +ejAccordion(options?: ej.Accordion.Model): JQuery; +ejAccordion(memberName: any, value?: any, param?: any): any; +data(key: "ejAccordion"): ej.Accordion; + +ejAutocomplete(): JQuery; +ejAutocomplete(options?: ej.Autocomplete.Model): JQuery; +ejAutocomplete(memberName: any, value?: any, param?: any): any; +data(key: "ejAutocomplete"): ej.Autocomplete; + +ejBarcode(): JQuery; +ejBarcode(options?: ej.datavisualization.Barcode.Model): JQuery; +ejBarcode(memberName: any, value?: any, param?: any): any; +data(key: "ejBarcode"): ej.datavisualization.Barcode; + +ejBulletGraph(): JQuery; +ejBulletGraph(options?: ej.datavisualization.BulletGraph.Model): JQuery; +ejBulletGraph(memberName: any, value?: any, param?: any): any; +data(key: "ejBulletGraph"): ej.datavisualization.BulletGraph; + +ejButton(): JQuery; +ejButton(options?: ej.Button.Model): JQuery; +ejButton(memberName: any, value?: any, param?: any): any; +data(key: "ejButton"): ej.Button; + +ejCaptcha(): JQuery; +ejCaptcha(options?: ej.Captcha.Model): JQuery; +ejCaptcha(memberName: any, value?: any, param?: any): any; +data(key: "ejCaptcha"): ej.Captcha; + +ejChart(): JQuery; +ejChart(options?: ej.datavisualization.Chart.Model): JQuery; +ejChart(memberName: any, value?: any, param?: any): any; +data(key: "ejChart"): ej.datavisualization.Chart; + +ejCheckBox(): JQuery; +ejCheckBox(options?: ej.CheckBox.Model): JQuery; +ejCheckBox(memberName: any, value?: any, param?: any): any; +data(key: "ejCheckBox"): ej.CheckBox; + +ejCircularGauge(): JQuery; +ejCircularGauge(options?: ej.datavisualization.CircularGauge.Model): JQuery; +ejCircularGauge(memberName: any, value?: any, param?: any): any; +data(key: "ejCircularGauge"): ej.datavisualization.CircularGauge; + +ejColorPicker(): JQuery; +ejColorPicker(options?: ej.ColorPicker.Model): JQuery; +ejColorPicker(memberName: any, value?: any, param?: any): any; +data(key: "ejColorPicker"): ej.ColorPicker; + +ejDatePicker(): JQuery; +ejDatePicker(options?: ej.DatePicker.Model): JQuery; +ejDatePicker(memberName: any, value?: any, param?: any): any; +data(key: "ejDatePicker"): ej.DatePicker; + +ejDateTimePicker(): JQuery; +ejDateTimePicker(options?: ej.DateTimePicker.Model): JQuery; +ejDateTimePicker(memberName: any, value?: any, param?: any): any; +data(key: "ejDateTimePicker"): ej.DateTimePicker; + +ejDiagram(): JQuery; +ejDiagram(options?: ej.datavisualization.Diagram.Model): JQuery; +ejDiagram(memberName: any, value?: any, param?: any): any; +data(key: "ejDiagram"): ej.datavisualization.Diagram; + +ejDialog(): JQuery; +ejDialog(options?: ej.Dialog.Model): JQuery; +ejDialog(memberName: any, value?: any, param?: any): any; +data(key: "ejDialog"): ej.Dialog; + +ejDigitalGauge(): JQuery; +ejDigitalGauge(options?: ej.datavisualization.DigitalGauge.Model): JQuery; +ejDigitalGauge(memberName: any, value?: any, param?: any): any; +data(key: "ejDigitalGauge"): ej.datavisualization.DigitalGauge; + +ejDraggable(): JQuery; +ejDraggable(options?: ej.Draggable.Model): JQuery; +ejDraggable(memberName: any, value?: any, param?: any): any; +data(key: "ejDraggable"): ej.Draggable; + +ejDropDownList(): JQuery; +ejDropDownList(options?: ej.DropDownList.Model): JQuery; +ejDropDownList(memberName: any, value?: any, param?: any): any; +data(key: "ejDropDownList"): ej.DropDownList; + +ejDroppable(): JQuery; +ejDroppable(options?: ej.Droppable.Model): JQuery; +ejDroppable(memberName: any, value?: any, param?: any): any; +data(key: "ejDroppable"): ej.Droppable; + +ejFileExplorer(): JQuery; +ejFileExplorer(options?: ej.FileExplorer.Model): JQuery; +ejFileExplorer(memberName: any, value?: any, param?: any): any; +data(key: "ejFileExplorer"): ej.FileExplorer; + +ejGantt(): JQuery; +ejGantt(options?: ej.Gantt.Model): JQuery; +ejGantt(memberName: any, value?: any, param?: any): any; +data(key: "ejGantt"): ej.Gantt; + +ejGrid(): JQuery; +ejGrid(options?: ej.Grid.Model): JQuery; +ejGrid(memberName: any, value?: any, param?: any): any; +data(key: "ejGrid"): ej.Grid; + +ejGroupButton(): JQuery; +ejGroupButton(options?: ej.GroupButton.Model): JQuery; +ejGroupButton(memberName: any, value?: any, param?: any): any; +data(key: "ejGroupButton"): ej.GroupButton; + +ejHeatMap(): JQuery; +ejHeatMap(options?: ej.datavisualization.HeatMap.Model): JQuery; +ejHeatMap(memberName: any, value?: any, param?: any): any; +data(key: "ejHeatMap"): ej.datavisualization.HeatMap; + +ejHeatMapLegend(): JQuery; +ejHeatMapLegend(options?: ej.datavisualization.HeatMapLegend.Model): JQuery; +ejHeatMapLegend(memberName: any, value?: any, param?: any): any; +data(key: "ejHeatMapLegend"): ej.datavisualization.HeatMapLegend; + +ejKanban(): JQuery; +ejKanban(options?: ej.Kanban.Model): JQuery; +ejKanban(memberName: any, value?: any, param?: any): any; +data(key: "ejKanban"): ej.Kanban; + +ejLinearGauge(): JQuery; +ejLinearGauge(options?: ej.datavisualization.LinearGauge.Model): JQuery; +ejLinearGauge(memberName: any, value?: any, param?: any): any; +data(key: "ejLinearGauge"): ej.datavisualization.LinearGauge; + +ejListBox(): JQuery; +ejListBox(options?: ej.ListBox.Model): JQuery; +ejListBox(memberName: any, value?: any, param?: any): any; +data(key: "ejListBox"): ej.ListBox; + +ejListView(): JQuery; +ejListView(options?: ej.ListView.Model): JQuery; +ejListView(memberName: any, value?: any, param?: any): any; +data(key: "ejListView"): ej.ListView; + +ejMap(): JQuery; +ejMap(options?: ej.datavisualization.Map.Model): JQuery; +ejMap(memberName: any, value?: any, param?: any): any; +data(key: "ejMap"): ej.datavisualization.Map; + +ejMaskEdit(): JQuery; +ejMaskEdit(options?: ej.MaskEdit.Model): JQuery; +ejMaskEdit(memberName: any, value?: any, param?: any): any; +data(key: "ejMaskEdit"): ej.MaskEdit; + +ejMenu(): JQuery; +ejMenu(options?: ej.Menu.Model): JQuery; +ejMenu(memberName: any, value?: any, param?: any): any; +data(key: "ejMenu"): ej.Menu; + +ejNavigationDrawer(): JQuery; +ejNavigationDrawer(options?: ej.NavigationDrawer.Model): JQuery; +ejNavigationDrawer(memberName: any, value?: any, param?: any): any; +data(key: "ejNavigationDrawer"): ej.NavigationDrawer; + +ejOverview(): JQuery; +ejOverview(options?: ej.datavisualization.Overview.Model): JQuery; +ejOverview(memberName: any, value?: any, param?: any): any; +data(key: "ejOverview"): ej.datavisualization.Overview; + +ejPager(): JQuery; +ejPager(options?: ej.Pager.Model): JQuery; +ejPager(memberName: any, value?: any, param?: any): any; +data(key: "ejPager"): ej.Pager; + +ejPdfViewer(): JQuery; +ejPdfViewer(options?: ej.PdfViewer.Model): JQuery; +ejPdfViewer(memberName: any, value?: any, param?: any): any; +data(key: "ejPdfViewer"): ej.PdfViewer; + +ejPivotChart(): JQuery; +ejPivotChart(options?: ej.PivotChart.Model): JQuery; +ejPivotChart(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotChart"): ej.PivotChart; + +ejPivotClient(): JQuery; +ejPivotClient(options?: ej.PivotClient.Model): JQuery; +ejPivotClient(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotClient"): ej.PivotClient; + +ejPivotGauge(): JQuery; +ejPivotGauge(options?: ej.PivotGauge.Model): JQuery; +ejPivotGauge(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotGauge"): ej.PivotGauge; + +ejPivotGrid(): JQuery; +ejPivotGrid(options?: ej.PivotGrid.Model): JQuery; +ejPivotGrid(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotGrid"): ej.PivotGrid; + +ejPivotPager(): JQuery; +ejPivotPager(options?: ej.PivotPager.Model): JQuery; +ejPivotPager(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotPager"): ej.PivotPager; + +ejPivotSchemaDesigner(): JQuery; +ejPivotSchemaDesigner(options?: ej.PivotSchemaDesigner.Model): JQuery; +ejPivotSchemaDesigner(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotSchemaDesigner"): ej.PivotSchemaDesigner; + +ejPivotTreeMap(): JQuery; +ejPivotTreeMap(options?: ej.PivotTreeMap.Model): JQuery; +ejPivotTreeMap(memberName: any, value?: any, param?: any): any; +data(key: "ejPivotTreeMap"): ej.PivotTreeMap; + +ejProgressBar(): JQuery; +ejProgressBar(options?: ej.ProgressBar.Model): JQuery; +ejProgressBar(memberName: any, value?: any, param?: any): any; +data(key: "ejProgressBar"): ej.ProgressBar; + +ejRadialMenu(): JQuery; +ejRadialMenu(options?: ej.RadialMenu.Model): JQuery; +ejRadialMenu(memberName: any, value?: any, param?: any): any; +data(key: "ejRadialMenu"): ej.RadialMenu; + +ejRadialSlider(): JQuery; +ejRadialSlider(options?: ej.RadialSlider.Model): JQuery; +ejRadialSlider(memberName: any, value?: any, param?: any): any; +data(key: "ejRadialSlider"): ej.RadialSlider; + +ejRadioButton(): JQuery; +ejRadioButton(options?: ej.RadioButton.Model): JQuery; +ejRadioButton(memberName: any, value?: any, param?: any): any; +data(key: "ejRadioButton"): ej.RadioButton; + +ejRangeNavigator(): JQuery; +ejRangeNavigator(options?: ej.datavisualization.RangeNavigator.Model): JQuery; +ejRangeNavigator(memberName: any, value?: any, param?: any): any; +data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; + +ejRating(): JQuery; +ejRating(options?: ej.Rating.Model): JQuery; +ejRating(memberName: any, value?: any, param?: any): any; +data(key: "ejRating"): ej.Rating; + +ejRecurrenceEditor(): JQuery; +ejRecurrenceEditor(options?: ej.RecurrenceEditor.Model): JQuery; +ejRecurrenceEditor(memberName: any, value?: any, param?: any): any; +data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; + +ejReportViewer(): JQuery; +ejReportViewer(options?: ej.ReportViewer.Model): JQuery; +ejReportViewer(memberName: any, value?: any, param?: any): any; +data(key: "ejReportViewer"): ej.ReportViewer; + +ejResizable(): JQuery; +ejResizable(options?: ej.Resizable.Model): JQuery; +ejResizable(memberName: any, value?: any, param?: any): any; +data(key: "ejResizable"): ej.Resizable; + +ejRibbon(): JQuery; +ejRibbon(options?: ej.Ribbon.Model): JQuery; +ejRibbon(memberName: any, value?: any, param?: any): any; +data(key: "ejRibbon"): ej.Ribbon; + +ejRotator(): JQuery; +ejRotator(options?: ej.Rotator.Model): JQuery; +ejRotator(memberName: any, value?: any, param?: any): any; +data(key: "ejRotator"): ej.Rotator; + +ejRTE(): JQuery; +ejRTE(options?: ej.RTE.Model): JQuery; +ejRTE(memberName: any, value?: any, param?: any): any; +data(key: "ejRTE"): ej.RTE; + +ejSchedule(): JQuery; +ejSchedule(options?: ej.Schedule.Model): JQuery; +ejSchedule(memberName: any, value?: any, param?: any): any; +data(key: "ejSchedule"): ej.Schedule; + +ejScroller(): JQuery; +ejScroller(options?: ej.Scroller.Model): JQuery; +ejScroller(memberName: any, value?: any, param?: any): any; +data(key: "ejScroller"): ej.Scroller; + +ejSlider(): JQuery; +ejSlider(options?: ej.Slider.Model): JQuery; +ejSlider(memberName: any, value?: any, param?: any): any; +data(key: "ejSlider"): ej.Slider; + +ejSparkline(): JQuery; +ejSparkline(options?: ej.datavisualization.Sparkline.Model): JQuery; +ejSparkline(memberName: any, value?: any, param?: any): any; +data(key: "ejSparkline"): ej.datavisualization.Sparkline; + +ejSplitButton(): JQuery; +ejSplitButton(options?: ej.SplitButton.Model): JQuery; +ejSplitButton(memberName: any, value?: any, param?: any): any; +data(key: "ejSplitButton"): ej.SplitButton; + +ejSplitter(): JQuery; +ejSplitter(options?: ej.Splitter.Model): JQuery; +ejSplitter(memberName: any, value?: any, param?: any): any; +data(key: "ejSplitter"): ej.Splitter; + +ejSpreadsheet(): JQuery; +ejSpreadsheet(options?: ej.Spreadsheet.Model): JQuery; +ejSpreadsheet(memberName: any, value?: any, param?: any): any; +data(key: "ejSpreadsheet"): ej.Spreadsheet; + +ejSymbolPalette(): JQuery; +ejSymbolPalette(options?: ej.datavisualization.SymbolPalette.Model): JQuery; +ejSymbolPalette(memberName: any, value?: any, param?: any): any; +data(key: "ejSymbolPalette"): ej.datavisualization.SymbolPalette; + +ejTab(): JQuery; +ejTab(options?: ej.Tab.Model): JQuery; +ejTab(memberName: any, value?: any, param?: any): any; +data(key: "ejTab"): ej.Tab; + +ejTagCloud(): JQuery; +ejTagCloud(options?: ej.TagCloud.Model): JQuery; +ejTagCloud(memberName: any, value?: any, param?: any): any; +data(key: "ejTagCloud"): ej.TagCloud; + +ejEditor(): JQuery; +ejEditor(options?: ej.Editor.Model): JQuery; +ejEditor(memberName: any, value?: any, param?: any): any; +data(key: "ejEditor"): ej.Editor; + +ejTile(): JQuery; +ejTile(options?: ej.Tile.Model): JQuery; +ejTile(memberName: any, value?: any, param?: any): any; +data(key: "ejTile"): ej.Tile; + +ejTimePicker(): JQuery; +ejTimePicker(options?: ej.TimePicker.Model): JQuery; +ejTimePicker(memberName: any, value?: any, param?: any): any; +data(key: "ejTimePicker"): ej.TimePicker; + +ejToggleButton(): JQuery; +ejToggleButton(options?: ej.ToggleButton.Model): JQuery; +ejToggleButton(memberName: any, value?: any, param?: any): any; +data(key: "ejToggleButton"): ej.ToggleButton; + +ejToolbar(): JQuery; +ejToolbar(options?: ej.Toolbar.Model): JQuery; +ejToolbar(memberName: any, value?: any, param?: any): any; +data(key: "ejToolbar"): ej.Toolbar; + +ejTooltip(): JQuery; +ejTooltip(options?: ej.Tooltip.Model): JQuery; +ejTooltip(memberName: any, value?: any, param?: any): any; +data(key: "ejTooltip"): ej.Tooltip; + +ejTreeGrid(): JQuery; +ejTreeGrid(options?: ej.TreeGrid.Model): JQuery; +ejTreeGrid(memberName: any, value?: any, param?: any): any; +data(key: "ejTreeGrid"): ej.TreeGrid; + +ejTreeMap(): JQuery; +ejTreeMap(options?: ej.datavisualization.TreeMap.Model): JQuery; +ejTreeMap(memberName: any, value?: any, param?: any): any; +data(key: "ejTreeMap"): ej.datavisualization.TreeMap; + +ejTreeView(): JQuery; +ejTreeView(options?: ej.TreeView.Model): JQuery; +ejTreeView(memberName: any, value?: any, param?: any): any; +data(key: "ejTreeView"): ej.TreeView; + +ejUploadbox(): JQuery; +ejUploadbox(options?: ej.Uploadbox.Model): JQuery; +ejUploadbox(memberName: any, value?: any, param?: any): any; +data(key: "ejUploadbox"): ej.Uploadbox; + +ejWaitingPopup(): JQuery; +ejWaitingPopup(options?: ej.WaitingPopup.Model): JQuery; +ejWaitingPopup(memberName: any, value?: any, param?: any): any; +data(key: "ejWaitingPopup"): ej.WaitingPopup; +} diff --git a/ej.widgets.all/ej.mobile.all-tests.ts b/ej.widgets.all/ej.mobile.all-tests.ts deleted file mode 100644 index 86381d522a..0000000000 --- a/ej.widgets.all/ej.mobile.all-tests.ts +++ /dev/null @@ -1,336 +0,0 @@ -/// -/// - -$(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 deleted file mode 100644 index cdf403f36c..0000000000 --- a/ej.widgets.all/ej.mobile.all.d.ts +++ /dev/null @@ -1,19908 +0,0 @@ -// 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 deleted file mode 100644 index 091359c821..0000000000 --- a/ej.widgets.all/ej.web.all-tests.ts +++ /dev/null @@ -1,1260 +0,0 @@ -/// -/// - -$(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 deleted file mode 100644 index de335df408..0000000000 --- a/ej.widgets.all/ej.web.all.d.ts +++ /dev/null @@ -1,47109 +0,0 @@ -// 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 deleted file mode 100644 index 1f8412ad8d..0000000000 --- a/ej.widgets.all/ej.widgets.all-tests.ts +++ /dev/null @@ -1,1260 +0,0 @@ -/// -/// - -$(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 deleted file mode 100644 index bd73834e52..0000000000 --- a/ej.widgets.all/ej.widgets.all.d.ts +++ /dev/null @@ -1,49995 +0,0 @@ -// 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 diff --git a/ejs/ejs.d.ts b/ejs/ejs.d.ts index 6e2347fbc5..e80b5794a1 100644 --- a/ejs/ejs.d.ts +++ b/ejs/ejs.d.ts @@ -16,9 +16,8 @@ declare module "ejs" { function renderFile(path: string, data?: Data, opts?: Options, cb?: Function): any;// TODO RenderFileCallback return type function clearCache(): any; - function TemplateFunction(data: Data): any; interface TemplateFunction { - dependencies: Dependencies; + (data: Data): any; } interface Options { cache?: any; diff --git a/elastic.js/elastic.js.d.ts b/elastic.js/elastic.js.d.ts index 850d1ccdfa..9bf5f6a9dc 100644 --- a/elastic.js/elastic.js.d.ts +++ b/elastic.js/elastic.js.d.ts @@ -19,7 +19,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -40,7 +40,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -58,7 +58,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -107,7 +107,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -139,7 +139,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -161,7 +161,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -226,7 +226,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets if the Query should be enhanced with a @@ -278,7 +278,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -298,7 +298,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost factor. @@ -314,7 +314,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -335,7 +335,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -362,7 +362,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -382,7 +382,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -425,7 +425,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -454,7 +454,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the analyzer name used to analyze the Query object. @@ -522,7 +522,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -536,7 +536,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets analyzer used to analyze the suggest text. @@ -593,7 +593,7 @@ declare module elasticjs { Retrieves the internal suggest object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets if transpositions should be counted as one or two changes, defaults @@ -635,7 +635,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -666,7 +666,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -693,7 +693,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -805,7 +805,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -839,7 +839,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enables caching of the facetFilter @@ -986,7 +986,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Allows you to specify a different value field to aggrerate over. @@ -1023,7 +1023,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -1086,7 +1086,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1110,7 +1110,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the decay value which defines how documents are scored at the distance @@ -1165,7 +1165,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1185,7 +1185,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the accuracy. How similar the suggested terms at least @@ -1285,7 +1285,7 @@ declare module elasticjs { Retrieves the internal generator object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1389,7 +1389,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -1419,7 +1419,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1438,7 +1438,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -1489,7 +1489,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -1521,7 +1521,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1531,7 +1531,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enables caching of the facetFilter @@ -1573,7 +1573,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1595,7 +1595,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -1616,7 +1616,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1636,7 +1636,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -1662,7 +1662,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1684,7 +1684,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -1734,7 +1734,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1766,7 +1766,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enables caching of the facetFilter @@ -1813,7 +1813,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1823,7 +1823,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -1864,7 +1864,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -1908,7 +1908,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -1946,7 +1946,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* The analyzer that will be used to analyze the text. Defaults to the @@ -2000,7 +2000,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -2035,7 +2035,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* The analyzer that will be used to analyze the text. Defaults to the @@ -2091,7 +2091,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -2116,7 +2116,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value of the Query. @@ -2179,7 +2179,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Set to false to use classic Levenshtein edit distance. @@ -2208,7 +2208,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the bottom-right coordinate of the bounding box @@ -2284,7 +2284,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -2344,7 +2344,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the distance unit. Valid values are: @@ -2383,7 +2383,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Adds a new bounded range. @@ -2479,7 +2479,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the distance unit. Valid values are "mi" for miles or "km" @@ -2515,7 +2515,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -2601,7 +2601,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -2728,7 +2728,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -2771,7 +2771,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -2792,7 +2792,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the GeoPoint from an array point. The array must contain only @@ -2834,7 +2834,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -2853,7 +2853,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -2921,7 +2921,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -3007,7 +3007,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -3059,7 +3059,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -3079,7 +3079,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -3100,7 +3100,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -3119,7 +3119,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -3185,7 +3185,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -3232,7 +3232,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the child document type to search against @@ -3256,7 +3256,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -3317,7 +3317,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -3360,7 +3360,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -3390,7 +3390,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Set's the boundary characters. When highlighting a field that is @@ -3462,7 +3462,7 @@ declare module elasticjs { Sets arbitrary options that can be passed to the highlighter implementation in use. */ - options(opts: string, oField: Object): Highlight; + options(opts: string, oField: string): Highlight; /* Sets the order of highlight fragments. You can apply the option @@ -3508,7 +3508,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the highligher type. You can apply the option @@ -3539,7 +3539,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -3621,7 +3621,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -3655,7 +3655,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enables caching of the facetFilter @@ -3762,7 +3762,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Allows you to specify a different value field to aggrerate over. @@ -3793,7 +3793,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -3848,7 +3848,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -3859,7 +3859,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the type as a single type or an array of types. If type is a @@ -3896,7 +3896,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the document id of the indexed shape. @@ -3919,7 +3919,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the type which the shape is indexed under. @@ -3945,7 +3945,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -4006,7 +4006,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -4036,7 +4036,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4057,7 +4057,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -4115,7 +4115,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4133,7 +4133,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -4177,7 +4177,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -4216,7 +4216,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -4227,7 +4227,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4248,7 +4248,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the analyzer name used to analyze the Query object. @@ -4377,7 +4377,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the type of the MatchQuery. Valid values are @@ -4411,7 +4411,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -4443,7 +4443,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4453,7 +4453,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -4485,7 +4485,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4507,7 +4507,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -4539,7 +4539,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4559,7 +4559,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -4585,7 +4585,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4603,7 +4603,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -4657,7 +4657,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* The analyzer that will be used to analyze the text. Defaults to the @@ -4748,7 +4748,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4767,7 +4767,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* The analyzer that will be used to analyze the text. Defaults to the @@ -4860,7 +4860,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -4883,7 +4883,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the analyzer name used to analyze the Query object. @@ -5022,7 +5022,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the type of the MultiMatchQuery. Valid values are @@ -5061,7 +5061,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -5087,7 +5087,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -5113,7 +5113,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value of the nested Query. @@ -5190,7 +5190,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -5227,7 +5227,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -5246,7 +5246,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -5300,7 +5300,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -5388,7 +5388,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -5437,7 +5437,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Compression controls memory usage and approximation error. The compression @@ -5496,7 +5496,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -5518,7 +5518,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets analyzer used to analyze the suggest text. @@ -5625,7 +5625,7 @@ declare module elasticjs { Retrieves the internal suggest object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the token limit. @@ -5649,7 +5649,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -5698,7 +5698,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value of the Query. @@ -5743,7 +5743,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* The prefix value. @@ -5780,7 +5780,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enables caching of the facetFilter @@ -5827,7 +5827,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -5853,7 +5853,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -5888,7 +5888,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -5899,7 +5899,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -5922,7 +5922,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets whether or not wildcard characters (* and ?) are allowed as the @@ -6114,7 +6114,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets whether or not queries against multiple fields should be combined using Lucene's @@ -6140,7 +6140,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Adds a filter whose matching documents will have the score function applied. @@ -6156,7 +6156,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -6181,7 +6181,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -6223,7 +6223,7 @@ declare module elasticjs { /* Adds a range to the list of exsiting range expressions. */ - range(from: string, to: string, key: string): RangeAggregation; + range(from: number, to?: number, key?: string): RangeAggregation; /* Allows you generate or modify the terms using a script. @@ -6239,7 +6239,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -6271,7 +6271,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Adds a new bounded range. @@ -6356,7 +6356,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Allows you to specify an alternate value field to be used to compute statistical information. @@ -6385,7 +6385,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -6476,7 +6476,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value of the Query. @@ -6537,7 +6537,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -6557,7 +6557,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -6630,7 +6630,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value of the Query. @@ -6698,7 +6698,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* The regexp value. @@ -6721,7 +6721,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add an aggregation. This method can be called multiple times @@ -6769,7 +6769,7 @@ declare module elasticjs { by making multiple request. This parameters specifies the starting result/document number point. Combine with size() to achieve paging. */ - from(f: any[]): Request; + from(f: number): Request; /* Performs highlighting based on the Highlight @@ -6827,7 +6827,7 @@ declare module elasticjs { It is recommended to use Sort objects when possible. */ - sort(fieldName: string): Request; + sort(fieldName?: string | any[] | Sort, order?: string): Request; /* Allows to control how the _source field is returned with every hit. @@ -6859,7 +6859,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Enables score computation and tracking during sorting. Be default, @@ -6889,7 +6889,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the weight assigned to the original query of the rescoring. @@ -6921,7 +6921,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the window_size parameter of the rescoring. @@ -6936,7 +6936,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Adds a filter whose matching documents will have the score function applied. @@ -6947,7 +6947,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -6969,7 +6969,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* If execeptions thrown from the script should be ignored or not. @@ -6997,7 +6997,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7015,7 +7015,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -7071,7 +7071,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Adds a filter whose matching documents will have the score function applied. @@ -7098,7 +7098,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7119,7 +7119,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the coordinates for the shape definition. Note, the coordinates @@ -7137,7 +7137,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the shape type. Can be set to one of: point, linestring, polygon, @@ -7163,7 +7163,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -7237,7 +7237,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7258,7 +7258,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the sort order to ascending (asc). Same as calling @@ -7393,7 +7393,7 @@ declare module elasticjs { Retrieves the internal script object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the script sort type. Valid values are: @@ -7433,7 +7433,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -7454,7 +7454,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7474,7 +7474,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -7490,7 +7490,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7509,7 +7509,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -7543,7 +7543,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7562,7 +7562,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -7583,7 +7583,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7602,7 +7602,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -7620,7 +7620,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7640,7 +7640,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -7661,7 +7661,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7693,7 +7693,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enables caching of the facetFilter @@ -7762,7 +7762,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7786,7 +7786,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -7818,7 +7818,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7854,7 +7854,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the text to get suggestions for. If not set, the global @@ -7866,7 +7866,7 @@ declare module elasticjs { Retrieves the internal suggest object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7888,7 +7888,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -7920,7 +7920,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -7940,7 +7940,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -7994,7 +7994,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -8015,7 +8015,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -8034,7 +8034,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Add a nested aggregation. This method can be called multiple times @@ -8134,7 +8134,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the type of the field value for use in scripts. Current values are: @@ -8169,7 +8169,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Allows you to return all terms, even if the frequency count is 0. This should not be @@ -8301,7 +8301,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -8320,7 +8320,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -8416,7 +8416,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -8451,7 +8451,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -8483,7 +8483,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Allows you to return all terms, even if the frequency count is 0. This should not be @@ -8579,7 +8579,7 @@ declare module elasticjs { Retrieves the internal facet object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the field for which statistical information will be generated. @@ -8612,7 +8612,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the accuracy. How similar the suggested terms at least @@ -8716,7 +8716,7 @@ declare module elasticjs { Retrieves the internal suggest object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -8740,7 +8740,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -8787,7 +8787,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the child document type to search against @@ -8810,7 +8810,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Enable or disable caching of the filter @@ -8858,7 +8858,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the field to operate on. @@ -8890,7 +8890,7 @@ declare module elasticjs { Retrieves the internal agg object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; } @@ -8915,7 +8915,7 @@ declare module elasticjs { /* The type of ejs object. For internal use only. */ - _type(): String; + _type(): string; /* Sets the boost value for documents matching the Query. @@ -8960,7 +8960,7 @@ declare module elasticjs { Retrieves the internal query object. This is typically used by internal API functions so use with caution. */ - toJSON(): String; + toJSON(): any; /* Sets the wildcard query value. diff --git a/elasticsearch/elasticsearch-tests.ts b/elasticsearch/elasticsearch-tests.ts index 9a85f2c908..6d308dc6ed 100644 --- a/elasticsearch/elasticsearch-tests.ts +++ b/elasticsearch/elasticsearch-tests.ts @@ -32,4 +32,57 @@ client.indices.delete({ ignore: [404] }).then(function (body) { }, function (error) { +}); + +client.create({ + id: '123', + index: 'index', + type: 'type' +}); + +client.create({ + id: '123', + index: 'index', + type: 'type' +}, (err, repsonse, status) => { +}); + +client.cluster.getSettings({ + masterTimeout: 100 +}, (err, response) => { +}); + +client.cluster.health({ + masterTimeout: 100 +}, (err, response) => { +}); + +client.cluster.pendingTasks({ + ignore: 1 +}, (err, response) => { +}); + +client.cluster.putSettings({ + ignore: 1 +}, (err, response) => { +}); + +client.cluster.putSettings({ + ignore: 1 +}, (err, response) => { +}); + +client.cluster.reroute({ + ignore: 1 +}, (err, response) => { +}); + +client.cluster.state({ + ignore: 1 +}, (err, response) => { +}); + +client.cluster.stats({ + ignore: 1 +}, (err, response) => { }); \ No newline at end of file diff --git a/elasticsearch/elasticsearch.d.ts b/elasticsearch/elasticsearch.d.ts index b06c11f6bc..26a9a1e880 100644 --- a/elasticsearch/elasticsearch.d.ts +++ b/elasticsearch/elasticsearch.d.ts @@ -1,24 +1,30 @@ // Type definitions for elasticsearch // Project: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html -// Definitions by: Casper Skydt +// Definitions by: Casper Skydt , Blake Smith , Dave Dunkin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Elasticsearch { export class Client { constructor(params: ConfigOptions); indices: Indices; + cluster: Cluster; + cat: Cat; bulk(params: BulkIndexDocumentsParams): PromiseLike; bulk(params: BulkIndexDocumentsParams, callback: (error: any, response: any) => void): void; + create(params: CreateDocumentParams): PromiseLike; + create(params: CreateDocumentParams, callback: (err: any, response: any, status: any) => void): void; delete(params: DeleteDocumentParams): PromiseLike; delete(params: DeleteDocumentParams, callback: (error: any, response: any) => void): void; - get(params: GetParams, callback: (error: any, response: any) => void): void; + exists(params: ExistsParams): PromiseLike; + exists(params: ExistsParams, callback: (error: any, response: any, status?: any) => void): void; + get(params: GetParams, callback: (error: any, response: GetResponse) => void): void; get(params: GetParams): PromiseLike>; index(params: IndexDocumentParams): PromiseLike; index(params: IndexDocumentParams, callback: (error: any, response: any) => void): void; - mget(params: MGetParams, callback: (error: any, response: any) => void): void; - mget(params: MGetParams): PromiseLike>; - msearch(params: MSearchParams, callback: (error: any, response: any) => void): void; - msearch(params: MSearchParams): PromiseLike>; + mget(params: MGetParams, callback: (error: any, response: MGetResponse) => void): void; + mget(params: MGetParams): PromiseLike>; + msearch(params: MSearchParams, callback: (error: any, response: MSearchResponse) => void): void; + msearch(params: MSearchParams): PromiseLike>; ping(params: PingParams): PromiseLike; ping(params: PingParams, callback: (err: any, response: any, status: any) => void): void; scroll(params: ScrollParams): PromiseLike; @@ -91,6 +97,7 @@ declare module Elasticsearch { method?: string; body?: any; ignore?: number | number[]; + filterPath?: string | string[]; } export interface BulkIndexDocumentsParams extends GenericParams { @@ -102,6 +109,21 @@ declare module Elasticsearch { index?: string; } + export interface CreateDocumentParams extends GenericParams { + consistency?: "one" | "quorum" | "all"; + parent?: string; + refresh?: boolean; + routing?: string; + timeout?: number | Date; + timestamp?: number | Date; + ttl?: number; + version?: number; + versionType?: "internal" | "external" | "external_gte" | "force"; + id: string; + index: string; + type: string; + } + export interface IndicesGetParams extends GenericParams { ignoreUnavailable?: boolean; index: string | string[] | boolean; @@ -177,7 +199,8 @@ declare module Elasticsearch { versionType?: string; } - export interface GetResponse extends GenericParams { + export interface GetResponse { + _index: string; _type: string; _id: string; _version: number; @@ -185,6 +208,17 @@ declare module Elasticsearch { _source: T; } + export interface ExistsParams extends GenericParams { + id: string; + index: string; + parent?: string; + preference?: string; + realtime?: boolean; + refresh?: boolean; + routing?: string; + type: string; + } + export interface IndexDocumentParams extends GenericParams { index: string; type: string; @@ -213,6 +247,7 @@ declare module Elasticsearch { scroll?: string; search_type?: string; fields?: string[]; + from?: number; size?: number; sort?: string | string[] | boolean; _source?: string | string[] | boolean; @@ -259,6 +294,10 @@ declare module Elasticsearch { search_type?: string; } + export interface MSearchResponse { + responses?: SearchResponse[]; + } + export interface MGetParams extends GenericParams { fields?: string | string[] | Boolean; preference?: string; @@ -270,6 +309,10 @@ declare module Elasticsearch { type?: string; } + export interface MGetResponse { + docs?: GetResponse[]; + } + export interface IndicesIndexExitsParams extends GenericParams { index: string | string[] | boolean; ignoreUnavailable?: boolean; @@ -284,6 +327,7 @@ declare module Elasticsearch { index: string; type: string; id: string; + parent?: string; refresh?: boolean; } @@ -316,6 +360,91 @@ declare module Elasticsearch { body: string | any; index: string | string[] | boolean; } + + export interface Cat { + health(params: CatHealthOptions, callback: (error: any, response: any) => void): void; + health(params: CatHealthOptions): PromiseLike + } + + export interface CatHealthOptions extends GenericParams { + local?: boolean; + masterTimeout?: number | Date; + h?: string | string[] | boolean; + help?: boolean; + ts?: boolean; + v?: boolean; + } + + export interface Cluster { + getSettings(params: ClusterGetSettingsOptions, callback: (error: any, response: any) => void): void; + getSettings(params: ClusterGetSettingsOptions): PromiseLike; + health(params: ClusterHealthOptions, callback: (error: any, response: any) => void): void; + health(params: ClusterHealthOptions): PromiseLike; + pendingTasks(params: ClusterPendingTasksOptions, callback: (error: any, response: any) => void): void; + pendingTasks(params: ClusterPendingTasksOptions): PromiseLike; + putSettings(params: ClusterPutSettingsOptions, callback: (error: any, response: any) => void): void; + putSettings(params: ClusterPutSettingsOptions): PromiseLike; + reroute(params: ClusterRerouteOptions, callback: (error: any, response: any) => void): void; + reroute(params: ClusterRerouteOptions): PromiseLike; + state(params: ClusterStateOptions, callback: (error: any, response: any) => void): void; + state(params: ClusterStateOptions): PromiseLike; + stats(params: ClusterStatsOptions, callback: (error: any, response: any) => void): void; + stats(params: ClusterStatsOptions): PromiseLike; + } + + export interface ClusterGetSettingsOptions extends GenericParams { + flatSettings?: boolean; + masterTimeout?: number | Date; + timeout?: number | Date; + } + + export interface ClusterHealthOptions extends GenericParams { + level?: string; // cluster, indices, shards + local?: boolean; + masterTimeout?: number | Date; + waitForActiveShards?: number; + waitForNodes?: string; + waitForRelocatingShards?: number; + waitForStatus?: string; // green, yellow, red + index?: string | string[] | boolean; + } + + export interface ClusterPendingTasksOptions extends GenericParams { + local?: boolean; + masterTimeout?: number | Date; + } + + export interface ClusterPutSettingsOptions extends GenericParams { + flatSettings?: boolean; + masterTimeout?: number | Date; + timeout?: number | Date; + } + + export interface ClusterRerouteOptions extends GenericParams { + dryRun?: boolean; + explain?: boolean; + metric?: string | string[] | boolean; + masterTimeout?: number | Date; + timeout?: number | Date; + } + + export interface ClusterStateOptions extends GenericParams { + local?: boolean; + masterTimeout?: number | Date; + flatSettings?: boolean; + ignoreUnavailable?: boolean; + allowNoIndices?: boolean; + expandWildcards?: string; // open, closed, none, all (default open) + index?: string | string[] | boolean; + metric?: string | string[] | boolean; + } + + export interface ClusterStatsOptions extends GenericParams { + flatSettings?: boolean; + human?: boolean; + timeout?: number | Date; + nodeId?: string | string[] | boolean; + } } declare module "elasticsearch" { diff --git a/electron-devtools-installer/electron-devtools-installer-tests.ts b/electron-devtools-installer/electron-devtools-installer-tests.ts new file mode 100644 index 0000000000..daf19a1daf --- /dev/null +++ b/electron-devtools-installer/electron-devtools-installer-tests.ts @@ -0,0 +1,20 @@ +/// +/// + +import installExtension, { + EMBER_INSPECTOR, REACT_DEVELOPER_TOOLS, + BACKBONE_DEBUGGER, JQUERY_DEBUGGER, + ANGULARJS_BATARANG, VUEJS_DEVTOOLS, + REDUX_DEVTOOLS, REACT_PERF, +} from 'electron-devtools-installer'; + + +installExtension(EMBER_INSPECTOR); +installExtension(REACT_DEVELOPER_TOOLS); +installExtension(BACKBONE_DEBUGGER); +installExtension(JQUERY_DEBUGGER); +installExtension(ANGULARJS_BATARANG); +installExtension(VUEJS_DEVTOOLS); +installExtension(REDUX_DEVTOOLS); +installExtension(REACT_PERF); +installExtension('abcdefghijkl'); \ No newline at end of file diff --git a/electron-devtools-installer/electron-devtools-installer.d.ts b/electron-devtools-installer/electron-devtools-installer.d.ts new file mode 100644 index 0000000000..8a108c1d2f --- /dev/null +++ b/electron-devtools-installer/electron-devtools-installer.d.ts @@ -0,0 +1,24 @@ +// Type definitions for electron-devtools-installer v2.0.1 +// Project: https://github.com/MarshallOfSound/electron-devtools-installer +// Definitions by: Robin Van den Broeck +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "electron-devtools-installer" { + interface ExtensionReference { + id: string, + electron: string, + } + + // Default installation function + export default function (extensionReference: ExtensionReference | string, forceDownload?: boolean): Promise; + + // Devtools themself + export const EMBER_INSPECTOR: ExtensionReference; + export const REACT_DEVELOPER_TOOLS: ExtensionReference; + export const BACKBONE_DEBUGGER: ExtensionReference; + export const JQUERY_DEBUGGER: ExtensionReference; + export const ANGULARJS_BATARANG: ExtensionReference; + export const VUEJS_DEVTOOLS: ExtensionReference; + export const REDUX_DEVTOOLS: ExtensionReference; + export const REACT_PERF: ExtensionReference; +} \ No newline at end of file diff --git a/empower/empower.d.ts b/empower/empower.d.ts index 56a9757be5..0aa669829d 100644 --- a/empower/empower.d.ts +++ b/empower/empower.d.ts @@ -1,4 +1,4 @@ -// Type definitions for empower +// Type definitions for empower 1.2.1 // Project: https://github.com/twada/empower // Definitions by: vvakame // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/enzyme/enzyme.d.ts b/enzyme/enzyme.d.ts index 4a5bf2beac..31ffce8923 100644 --- a/enzyme/enzyme.d.ts +++ b/enzyme/enzyme.d.ts @@ -458,6 +458,7 @@ declare module "enzyme" { export interface ReactWrapper extends CommonWrapper { unmount(): ReactWrapper; mount(): ReactWrapper; + render(): CheerioWrapper; /** * Returns a wrapper of the node that matches the provided reference name. diff --git a/esprima-walk/esprima-walk-tests.ts b/esprima-walk/esprima-walk-tests.ts new file mode 100644 index 0000000000..4588ebb615 --- /dev/null +++ b/esprima-walk/esprima-walk-tests.ts @@ -0,0 +1,25 @@ +/// +/// + +import * as walk from 'esprima-walk' + +var program: ESTree.Program +var string: string +var node: ESTree.Node + +walk(program, _node => { + string = node.type + node = _node +}) + +walk.walk(program, _node => { + string = node.type + node = _node +}) + +walk.walkAddParent(program, _node => { + node = _node + node = _node.parent + string = node.type +}) + diff --git a/esprima-walk/esprima-walk.d.ts b/esprima-walk/esprima-walk.d.ts new file mode 100644 index 0000000000..d18cf96bb1 --- /dev/null +++ b/esprima-walk/esprima-walk.d.ts @@ -0,0 +1,40 @@ +// Type definitions for esprima-walk v0.1.0 +// Project: https://github.com/jrajav/esprima-walk +// Definitions by: tswaters +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "esprima-walk" { + + interface NodeWithParent extends ESTree.Node { + parent?: ESTree.Node + } + + /** + * Walk the provided AST; fn is called once for each node with a `type` + * @param {ESTree.Program} ast program to walk + * @param {function} fn function invoked for each node with type + */ + function walk (ast: ESTree.Program, fn:(node: ESTree.Node)=>void) :void + + namespace walk { + /** + * Walk the provided AST; fn is called once for each node with a `type` + * @param {ESTree.Program} ast program to walk + * @param {function} fn function invoked for each node + */ + export function walk (ast: ESTree.Program, fn:(node: ESTree.Node)=>void) :void + + /** + * Walk the provided AST; fn is called once for each node with a `type`. + * Adds a parent property prior to invoking fn when applicable + * @param {ESTree.Program} ast program to walk + * @param {function} fn function invoked for each node + */ + export function walkAddParent (ast: ESTree.Program, fn:(node: NodeWithParent)=>void) :void + } + + export = walk +} + diff --git a/esprima/esprima-tests.ts b/esprima/esprima-tests.ts index f1a0f7ad92..2bca0d5e54 100644 --- a/esprima/esprima-tests.ts +++ b/esprima/esprima-tests.ts @@ -12,6 +12,7 @@ var string: string; string = esprima.version; program = esprima.parse('code'); program = esprima.parse('code', {range: true}); +program = esprima.parse('import * as code from "code"', {sourceType: 'module'}) token = esprima.tokenize('code')[0]; token = esprima.tokenize('code', {range: true})[0]; diff --git a/esprima/esprima.d.ts b/esprima/esprima.d.ts index 30fe9512bf..64a9333fa3 100644 --- a/esprima/esprima.d.ts +++ b/esprima/esprima.d.ts @@ -30,6 +30,7 @@ declare namespace esprima { attachComment?: boolean; tolerant?: boolean; source?: boolean; + sourceType?: 'script' | 'module'; } const Syntax: { diff --git a/express-mung/express-mung-tests.ts b/express-mung/express-mung-tests.ts new file mode 100644 index 0000000000..c4ab59f0e6 --- /dev/null +++ b/express-mung/express-mung-tests.ts @@ -0,0 +1,9 @@ +/// + +import { Request, Response } from "express"; +import * as mung from "express-mung"; + +function redact(body: Object, req: Request, res: Response) { +    return body; +} +mung.json(redact); diff --git a/express-mung/express-mung.d.ts b/express-mung/express-mung.d.ts new file mode 100644 index 0000000000..6f9a844c7a --- /dev/null +++ b/express-mung/express-mung.d.ts @@ -0,0 +1,43 @@ +// Type definitions for express-mung 0.4.2 +// Project: https://github.com/richardschneider/express-mung +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare module "express-mung" { + import { Request, Response } from "express"; + import * as http from "http"; + + type Transform = (body: {}, request: Request, response: Response) => any; + type TransformHeader = (body: http.IncomingMessage, request: Request, response: Response) => any; + + /** + * Transform the JSON body of the response. + * @param {Transform} fn A transformation function. + * @return {any} The body. + */ + export function json(fn: Transform): any; + + /** + * Transform the JSON body of the response. + * @param {Transform} fn A transformation function. + * @return {any} The body. + */ + export function jsonAsync(fn: Transform): PromiseLike; + + /** + * Transform the HTTP headers of the response. + * @param {Transform} fn A transformation function. + * @return {any} The body. + */ + export function headers(fn: TransformHeader): any; + + /** + * Transform the HTTP headers of the response. + * @param {Transform} fn A transformation function. + * @return {any} The body. + */ + export function headersAsync(fn: TransformHeader): PromiseLike; +} diff --git a/express-serve-static-core/express-serve-static-core.d.ts b/express-serve-static-core/express-serve-static-core.d.ts index f83e509e63..648f1447a5 100644 --- a/express-serve-static-core/express-serve-static-core.d.ts +++ b/express-serve-static-core/express-serve-static-core.d.ts @@ -22,7 +22,7 @@ declare module "express-serve-static-core" { } interface RequestHandler { - (req: Request, res: Response, next?: NextFunction): any; + (req: Request, res: Response, next: NextFunction): any; } interface ErrorRequestHandler { @@ -97,6 +97,10 @@ declare module "express-serve-static-core" { use: IRouterHandler & IRouterMatcher; route(prefix: PathParams): IRoute; + /** + * Stack of configured routes + */ + stack: any[]; } interface IRoute { @@ -117,16 +121,16 @@ declare module "express-serve-static-core" { interface CookieOptions { maxAge?: number; signed?: boolean; - expires?: Date; + expires?: Date | boolean; httpOnly?: boolean; path?: string; domain?: string; - secure?: boolean; + secure?: boolean | 'auto'; } interface Errback { (err: Error): void; } - interface Request extends http.ServerRequest, Express.Request { + interface Request extends http.IncomingMessage, Express.Request { /** * Return request header. @@ -199,7 +203,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted charset of the specified character sets, - * based on the request’s Accept-Charset HTTP header field. + * based on the request's Accept-Charset HTTP header field. * If none of the specified charsets is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -212,7 +216,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted encoding of the specified encodings, - * based on the request’s Accept-Encoding HTTP header field. + * based on the request's Accept-Encoding HTTP header field. * If none of the specified encodings is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -225,7 +229,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted language of the specified languages, - * based on the request’s Accept-Language HTTP header field. + * based on the request's Accept-Language HTTP header field. * If none of the specified languages is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -818,6 +822,12 @@ declare module "express-serve-static-core" { } interface Application extends IRouter, Express.Application { + /** + * Express instance itself is a request handler, which could be invoked without + * third argument. + */ + (req: Request, res: Response): any; + /** * Initialize the server. * @@ -1046,6 +1056,11 @@ declare module "express-serve-static-core" { * simply by removing them from this object. */ routes: any; + + /** + * Used to get all registered routes in Express Application + */ + _router: any; } interface Express extends Application { diff --git a/express-session/express-session-tests.ts b/express-session/express-session-tests.ts index 1e1f909b14..0b8460214f 100644 --- a/express-session/express-session-tests.ts +++ b/express-session/express-session-tests.ts @@ -6,7 +6,8 @@ import session = require('express-session'); var app = express(); app.use(session({ - secret: 'keyboard cat' + secret: 'keyboard cat', + cookie: { secure: 'auto' } })); app.use(session({ secret: 'keyboard cat', diff --git a/express-session/express-session.d.ts b/express-session/express-session.d.ts index 156e9404fc..9af409ddc5 100644 --- a/express-session/express-session.d.ts +++ b/express-session/express-session.d.ts @@ -10,10 +10,12 @@ declare namespace Express { export interface Request { session?: Session; + sessionID?: string; } export interface Session { [key: string]: any; + id: string; regenerate: (callback: (err: any) => void) => void; destroy: (callback: (err: any) => void) => void; @@ -30,7 +32,7 @@ declare namespace Express { secure?: boolean; httpOnly: boolean; domain?: string; - expires: Date; + expires: Date | boolean; serialize: (name: string, value: string) => string; } } diff --git a/express/express-tests.ts b/express/express-tests.ts index 439ef95012..92cef00b85 100644 --- a/express/express-tests.ts +++ b/express/express-tests.ts @@ -1,101 +1,114 @@ /// /// - import * as express from 'express'; -var app = express(); - -app.engine('jade', require('jade').__express); -app.engine('html', require('ejs').renderFile); - -express.static.mime.define({ - 'application/fx': ['fx'] -}); -app.use('/static', express.static(__dirname + '/public')); - -// simple logger -app.use(function(req, res, next){ - console.log('%s %s', req.method, req.url); - next(); -}); - -app.use(function(err: any, req: express.Request, res: express.Response, next: express.NextFunction) { - console.error(err); - next(err); -}); -app.get('/', function(req, res){ - res.send('hello world'); -}); +namespace express_tests { -const router = express.Router(); + var app = express(); + app.engine('jade', require('jade').__express); + app.engine('html', require('ejs').renderFile); -const pathStr : string = 'test'; -const pathRE : RegExp = /test/; -const path = true? pathStr : pathRE; + express.static.mime.define({ + 'application/fx': ['fx'] + }); + app.use('/static', express.static(__dirname + '/public')); -router.get(path); -router.put(path) -router.post(path); -router.delete(path); -router.get(pathStr); -router.put(pathStr) -router.post(pathStr); -router.delete(pathStr); -router.get(pathRE); -router.put(pathRE) -router.post(pathRE); -router.delete(pathRE); - -router.use((req, res, next) => { next(); }) -router.route('/users') - .get((req, res, next) => { - let types: string[] = req.accepts(); - let type: string | boolean = req.accepts('json'); - type = req.accepts(['json', 'text']); - type = req.accepts('json', 'text'); - - let charsets: string[] = req.acceptsCharsets(); - let charset: string | boolean = req.acceptsCharsets('utf-8'); - charset = req.acceptsCharsets(['utf-8', 'utf-16']); - charset = req.acceptsCharsets('utf-8', 'utf-16'); - - let encodings: string[] = req.acceptsEncodings(); - let encoding: string | boolean = req.acceptsEncodings('gzip'); - encoding = req.acceptsEncodings(['gzip', 'deflate']); - encoding = req.acceptsEncodings('gzip', 'deflate'); - - let languages: string[] = req.acceptsLanguages(); - let language: string | boolean = req.acceptsLanguages('en'); - language = req.acceptsLanguages(['en', 'ja']); - language = req.acceptsLanguages('en', 'ja'); - - res.send(req.query['token']); + // simple logger + app.use(function(req, res, next) { + console.log('%s %s', req.method, req.url); + next(); }); -router.get('/user/:id', function(req, res, next) { - if (req.params.id == 0) next('route'); - else next(); -}, function(req, res, next) { - res.render('regular'); -}); + app.use(function(err: any, req: express.Request, res: express.Response, next: express.NextFunction) { + console.error(err); + next(err); + }); -app.use((req, res, next) => { - // hacky trick, router is just a handler - router(req, res, next); -}); -app.use(router); + app.get('/', function(req, res) { + res.send('hello world'); + }); -app.listen(3000); + const router = express.Router(); -const next: express.NextFunction = () => {}; -const nextWithArgument: express.NextFunction = (err: any) => {}; -/** - * The express.Application is compatible with http.createServer - */ + const pathStr: string = 'test'; + const pathRE: RegExp = /test/; + const path = true ? pathStr : pathRE; + router.get(path); + router.put(path) + router.post(path); + router.delete(path); + router.get(pathStr); + router.put(pathStr) + router.post(pathStr); + router.delete(pathStr); + router.get(pathRE); + router.put(pathRE) + router.post(pathRE); + router.delete(pathRE); + + router.use((req, res, next) => { next(); }) + router.route('/users') + .get((req, res, next) => { + let types: string[] = req.accepts(); + let type: string | boolean = req.accepts('json'); + type = req.accepts(['json', 'text']); + type = req.accepts('json', 'text'); + + let charsets: string[] = req.acceptsCharsets(); + let charset: string | boolean = req.acceptsCharsets('utf-8'); + charset = req.acceptsCharsets(['utf-8', 'utf-16']); + charset = req.acceptsCharsets('utf-8', 'utf-16'); + + let encodings: string[] = req.acceptsEncodings(); + let encoding: string | boolean = req.acceptsEncodings('gzip'); + encoding = req.acceptsEncodings(['gzip', 'deflate']); + encoding = req.acceptsEncodings('gzip', 'deflate'); + + let languages: string[] = req.acceptsLanguages(); + let language: string | boolean = req.acceptsLanguages('en'); + language = req.acceptsLanguages(['en', 'ja']); + language = req.acceptsLanguages('en', 'ja'); + + res.send(req.query['token']); + }); + + router.get('/user/:id', function(req, res, next) { + if (req.params.id == 0) next('route'); + else next(); + }, function(req, res, next) { + res.render('regular'); + }); + + app.use((req, res, next) => { + // hacky trick, router is just a handler + router(req, res, next); + }); + + app.use(router); + + app.listen(3000); + + const next: express.NextFunction = () => { }; +} + +/*************************** + * * + * Test with other modules * + * * + ***************************/ import * as http from 'http'; -http.createServer(app); + + +namespace node_tests { + + { + // http.createServer can take express application + const app: express.Application = express(); + http.createServer(app).listen(5678); + } +} diff --git a/fabricjs/fabricjs.d.ts b/fabricjs/fabricjs.d.ts index 727cb57f23..08fcdb6ec3 100644 --- a/fabricjs/fabricjs.d.ts +++ b/fabricjs/fabricjs.d.ts @@ -333,7 +333,6 @@ declare namespace fabric { on(eventName: {[key:string] : Function}): T; /** * Fires event with an optional options object - * @deprecated `fire` deprecated since 1.0.7 (use `trigger` instead) * @param {String} eventName Event name to fire * @param {Object} [options] Options object */ @@ -341,7 +340,6 @@ declare namespace fabric { /** * Stops event observing for a particular event handler. Calling this method * without arguments removes all handlers for all events - * @deprecated `stopObserving` deprecated since 0.8.34 (use `off` instead) * @param eventName Event name (eg. 'after:render') or object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler}) * @param handler Function to be deleted from EventListeners */ diff --git a/facebook-js-sdk/facebook-js-sdk-tests.ts b/facebook-js-sdk/facebook-js-sdk-tests.ts index 49e615f529..41c0eaff40 100644 --- a/facebook-js-sdk/facebook-js-sdk-tests.ts +++ b/facebook-js-sdk/facebook-js-sdk-tests.ts @@ -14,6 +14,12 @@ FB.getLoginStatus(function(response: fb.AuthResponse) { console.log(response.authResponse.accessToken); }); +FB.getLoginStatus(function(response: fb.AuthResponse) { + console.log(response); + console.log(response.status); + console.log(response.authResponse.accessToken); +}, true); + FB.getAuthResponse(function(response: fb.AuthResponse) { console.log(response); console.log(response.status); diff --git a/facebook-js-sdk/facebook-js-sdk.d.ts b/facebook-js-sdk/facebook-js-sdk.d.ts index 5353353911..bee34f0a2c 100644 --- a/facebook-js-sdk/facebook-js-sdk.d.ts +++ b/facebook-js-sdk/facebook-js-sdk.d.ts @@ -8,10 +8,11 @@ declare var FB: fb.FacebookStatic; declare namespace facebook { interface FacebookStatic { - // api: any; - // AppEvents: any; - // Canvas: any; - // Event: any; + api: any; + AppEvents: any; + Canvas: any; + Event: any; + /** * The method FB.getAuthResponse() is a synchronous accessor for the current authResponse. * The synchronous nature of this method is what sets it apart from the other login methods. @@ -25,7 +26,7 @@ declare namespace facebook { * * @param callback function to handle the response. */ - getLoginStatus(callback: (response: AuthResponse) => void): void; + getLoginStatus(callback: (response: AuthResponse) => void, roundtrip?: boolean ): void; /** * The method FB.init() is used to initialize and setup the SDK. * @@ -49,8 +50,9 @@ declare namespace facebook { * @param callback function to handle the response */ logout(callback: (response: AuthResponse) => void): void; - // ui: any; - // XFBML: any; + + ui: any; + XFBML: any; } interface InitParams { diff --git a/faker/faker-tests.ts b/faker/faker-tests.ts index 77f3a2c2ca..94ebe925e8 100644 --- a/faker/faker-tests.ts +++ b/faker/faker-tests.ts @@ -123,6 +123,7 @@ resultStr = faker.internet.mac(); resultStr = faker.internet.password(); resultStr = faker.internet.password(0, false, '#', 'foo'); +resultStr = faker.lorem.word(); resultStr = faker.lorem.words(); resultStr = faker.lorem.words(0); resultStr = faker.lorem.sentence(); @@ -169,5 +170,14 @@ resultStr = faker.random.objectElement({foo: 'bar', field: 'foo'}); resultStr = faker.random.uuid(); resultBool = faker.random.boolean(); +resultStr = faker.system.fileName( "foo", "bar" ); +resultStr = faker.system.commonFileName( "foo", "bar" ); +resultStr = faker.system.mimeType(); +resultStr = faker.system.commonFileType(); +resultStr = faker.system.commonFileExt(); +resultStr = faker.system.fileType(); +resultStr = faker.system.fileExt( "foo" ); +resultStr = faker.system.semver(); + import fakerEn = require('faker/locale/en'); resultStr = faker.name.firstName(); diff --git a/faker/faker.d.ts b/faker/faker.d.ts index 7860a72745..01e01b8b8b 100644 --- a/faker/faker.d.ts +++ b/faker/faker.d.ts @@ -1,4 +1,4 @@ -// Type definitions for faker +// Type definitions for faker v3.1 // Project: http://marak.com/faker.js/ // Definitions by: Bas Pennings , Yuki Kokubun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -135,6 +135,7 @@ declare namespace Faker { }; lorem: { + word(): string; words(num?: number): string; sentence(wordCount?: number, range?: number): string; sentences(sentenceCount?: number): string; @@ -172,6 +173,19 @@ declare namespace Faker { boolean(): boolean; }; + system: { + fileName(ext: string, type: string): string; + commonFileName(ext: string, type: string): string; + mimeType(): string; + commonFileType(): string; + commonFileExt(): string; + fileType(): string; + fileExt(mimeType: string): string; + //directoryPath(): string; + //filePath(): string; + semver(): string; + }; + seed(value: number): void; } diff --git a/fbsdk/fbsdk-tests.ts b/fbsdk/fbsdk-tests.ts index 8ec38d8bc4..596b6e70e6 100644 --- a/fbsdk/fbsdk-tests.ts +++ b/fbsdk/fbsdk-tests.ts @@ -3,16 +3,16 @@ window.fbAsyncInit = function() { FB.init( { - appId : '{your-app-id}', + appId : "{your-app-id}", xfbml : true, - version : 'v2.0' + version : "v2.0" } ); FB.ui( { - method: 'share', - href: 'https://developers.facebook.com/docs/dialogs/' + method: "share", + href: "https://developers.facebook.com/docs/dialogs/" }, function(response) { console.log(response); @@ -21,9 +21,24 @@ window.fbAsyncInit = function() { FB.api( "/me", - "POST", - function (fbResponse){ + "post", + function (fbResponse) { console.log(fbResponse); } ); -}; \ No newline at end of file + + function checkAuth(response: FB.LoginStatusResponse): void { + if (response.status === "connected") { + console.log(response.authResponse.accessToken); + console.log(response.authResponse.expiresIn); + console.log(response.authResponse.signedRequest); + console.log(response.authResponse.userID); + } else if (response.status === "unknown") { + console.log("not logged in"); + } + } + + FB.login(checkAuth); + + FB.getLoginStatus(checkAuth); +}; diff --git a/fbsdk/fbsdk.d.ts b/fbsdk/fbsdk.d.ts index 286eb86b8e..ddbe4d0264 100644 --- a/fbsdk/fbsdk.d.ts +++ b/fbsdk/fbsdk.d.ts @@ -171,23 +171,44 @@ interface FBResponseObject { error: any; } +declare type LoginStatus = "connected" | "not_authorized" | "unknown"; +declare type ApiMethod = "get" | "post" | "delete"; + +interface AuthResponse { + accessToken: string; + expiresIn: number; + signedRequest: string; + userID: string; +} + +interface FBError { + type: string; + message: string; + code: number; + error_subcode?: number; + error_user_msg?: string; + error_user_title?: string; + fbtrace_id: string; +} + interface FBSDK{ /* This method is used to initialize and setup the SDK. */ init(fbInitObject : FBInitParams) : void; /* This method lets you make calls to the Graph API. */ - api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object; - api(path : string, params : Object, callback : (fbResponseObject : FBResponseObject) => any) : Object; - api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object; + api(path: string, callback: (response: any) => void): void; + api(path: string, method: ApiMethod, callback: (response: any) => void): void; + api(path: string, params: any, callback: (response: any) => void): void; + api(path: string, method: ApiMethod, params: any, callback: (response: any) => void): void; /* This method is used to trigger different forms of Facebook created UI dialogs. */ ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void; /* Allows you to determine if a user is logged in to Facebook and has authenticated your app */ - getLoginStatus(handler : Function, force?: Boolean) : void; + getLoginStatus(handler : (fbResponseObject : FB.LoginStatusResponse) => any, force?: Boolean) : void; /* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */ - login(handler : (fbResponseObject : Object) => any, params?: FBLoginOptions): void; + login(handler : (fbResponseObject : FB.LoginStatusResponse) => any, params?: FBLoginOptions): void; /* Log the user out of your site and Facebook */ logout(handler : (fbResponseObject : Object) => any) : void; @@ -198,6 +219,7 @@ interface FBSDK{ Event : FBSDKEvents; XFBML : FBSDKXFBML; Canvas : FBSDKCanvas; + Error: FBError; } interface Window{ @@ -208,4 +230,11 @@ declare module "FB" { export = FB; } +declare namespace FB { + export interface LoginStatusResponse { + authResponse?: AuthResponse; + status: LoginStatus; + } +} + declare var FB : FBSDK; diff --git a/fetch-mock/fetch-mock-tests.ts b/fetch-mock/fetch-mock-tests.ts index defefa25a1..b630668e18 100644 --- a/fetch-mock/fetch-mock-tests.ts +++ b/fetch-mock/fetch-mock-tests.ts @@ -30,3 +30,15 @@ fetchMock.called("http://test.com"); (fetchMock.lastCall()[1] as RequestInit).body; fetchMock.lastUrl(); fetchMock.lastOptions(); + +fetchMock.get("http://test.com", 200) +fetchMock.post("http://test.com", 200) +fetchMock.put("http://test.com", 200) +fetchMock.delete("http://test.com", 200) +fetchMock.head("http://test.com", 200) + +fetchMock.get("http://test.com", 200, {method: "GET"}) +fetchMock.post("http://test.com", 200, {method: "POST"}) +fetchMock.put("http://test.com", 200, {method: "PUT"}) +fetchMock.delete("http://test.com", 200, {method: "DELETE"}) +fetchMock.head("http://test.com", 200, {method: "HEAD"}) diff --git a/fetch-mock/fetch-mock.d.ts b/fetch-mock/fetch-mock.d.ts index 490b4c7dfd..47c31e4c64 100644 --- a/fetch-mock/fetch-mock.d.ts +++ b/fetch-mock/fetch-mock.d.ts @@ -114,6 +114,26 @@ declare module "fetch-mock" { unmatched: Array; } + interface MockOptionsMethodGet extends MockOptions { + method: 'GET' + } + + interface MockOptionsMethodPost extends MockOptions { + method: 'POST' + } + + interface MockOptionsMethodPut extends MockOptions { + method: 'PUT' + } + + interface MockOptionsMethodDelete extends MockOptions { + method: 'DELETE' + } + + interface MockOptionsMethodHead extends MockOptions { + method: 'HEAD' + } + interface FetchMockStatic { /** * Replaces fetch() with a stub which records its calls, grouped by @@ -139,6 +159,56 @@ declare module "fetch-mock" { * @param options The route to mock */ mock(options: MockOptions): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the GET + method. Calls to .mock() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + get(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodGet): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the POST + method. Calls to .mock() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + post(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the PUT + method. Calls to .mock() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + put(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPut): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the + DELETE method. Calls to .mock() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + delete(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the HEAD + method. Calls to .mock() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + head(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; /** * Chainable method that restores fetch() to its unstubbed state and clears all data recorded for its calls. diff --git a/file-type/file-type-tests.ts b/file-type/file-type-tests.ts new file mode 100644 index 0000000000..ebbee83783 --- /dev/null +++ b/file-type/file-type-tests.ts @@ -0,0 +1,7 @@ +/// + +"use strict"; + +import fileType = require("file-type") + +fileType(new Buffer([0xFF, 0xD8, 0xFF])) diff --git a/file-type/file-type.d.ts b/file-type/file-type.d.ts new file mode 100644 index 0000000000..58c449ca3c --- /dev/null +++ b/file-type/file-type.d.ts @@ -0,0 +1,17 @@ +// Type definitions for file-type +// Project: https://github.com/sindresorhus/file-type +// Definitions by: KIM Jaesuck a.k.a. gim tcaesvk +// Definitions: https://github.com/DefinitelyType/DefinitelyTyped + +/// + +declare module "file-type" { + interface FileTypeResult { + ext: string + mime: string + } + + function FileType(buf: Buffer): FileTypeResult + + export = FileType +} diff --git a/fill-pdf/fill-pdf-tests.ts b/fill-pdf/fill-pdf-tests.ts new file mode 100644 index 0000000000..e5b34cd943 --- /dev/null +++ b/fill-pdf/fill-pdf-tests.ts @@ -0,0 +1,17 @@ +/// + +import * as fillPdf from 'fill-pdf'; + +var formData: fillPdf.FormData = { FieldName: 'Text to put into form field' }; +var pdfTemplatePath = 'templates.pdf'; +var extendArgs: string[] = []; + +fillPdf.generatePdf(formData, pdfTemplatePath, extendArgs, (err: Error, output: Buffer) => { + if ( !err ) { + console.log('Success!'); + // output is a buffer + } +}); + +var result = fillPdf.generateFdf(formData); +// result is a buffer diff --git a/fill-pdf/fill-pdf.d.ts b/fill-pdf/fill-pdf.d.ts new file mode 100644 index 0000000000..d35057f934 --- /dev/null +++ b/fill-pdf/fill-pdf.d.ts @@ -0,0 +1,16 @@ +// Type definitions for fill-pdf v0.5.0 +// Project: https://github.com/dommmel/fill-pdf +// Definitions by: Seth Westphal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module 'fill-pdf' { + + export interface FormData { + [name: string]: string; + } + + export function generatePdf(data: FormData, templatePath: string, extendArgs: string[], callback?: (err: Error, output: Buffer) => void): void; + export function generateFdf(data: FormData): Buffer; +} diff --git a/flexSlider/flexSlider.d.ts b/flexSlider/flexSlider.d.ts index c8fa3f949c..276bb35e84 100644 --- a/flexSlider/flexSlider.d.ts +++ b/flexSlider/flexSlider.d.ts @@ -78,10 +78,10 @@ interface FlexSliderOptions { // Callback API start?: (slider: SliderObject) => any; //Callback: function(slider) - Fires when the slider loads the first slide before?: (slider: SliderObject) => any; //Callback: function(slider) - Fires asynchronously with each slider animation - after?: () => any; //Callback: function(slider) - Fires after each slider animation completes - end?: () => any; //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) - added?: () => any; //{NEW} Callback: function(slider) - Fires after a slide is added - removed?: () => any; + after?: (slider: SliderObject) => any; //Callback: function(slider) - Fires after each slider animation completes + end?: (slider: SliderObject) => any; //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) + added?: (slider: SliderObject) => any; //{NEW} Callback: function(slider) - Fires after a slide is added + removed?: (slider: SliderObject) => any; } diff --git a/fluent-ffmpeg/fluent-ffmpeg-tests.ts b/fluent-ffmpeg/fluent-ffmpeg-tests.ts new file mode 100644 index 0000000000..8b1031ff58 --- /dev/null +++ b/fluent-ffmpeg/fluent-ffmpeg-tests.ts @@ -0,0 +1,7 @@ +/// + +import ffmpeg = require("fluent-ffmpeg") + +let source: string, format: string, output: string + +ffmpeg({ source: source }).format(format).save(output) diff --git a/fluent-ffmpeg/fluent-ffmpeg.d.ts b/fluent-ffmpeg/fluent-ffmpeg.d.ts new file mode 100644 index 0000000000..92e1a33891 --- /dev/null +++ b/fluent-ffmpeg/fluent-ffmpeg.d.ts @@ -0,0 +1,315 @@ +// Type definitions for node-fluent-ffmpeg +// Project: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg +// Definitions by: KIM Jaesuck a.k.a. gim tcaesvk +// Definitions: https://github.com/DefinitelyType/DefinitelyTyped + +/// + +declare module "fluent-ffmpeg" { + import * as events from "events" + import * as stream from "stream" + + interface FfmpegCommandLogger { + error(...data: any[]): void + warning(...data: any[]): void + info(...data: any[]): void + debug(...data: any[]): void + } + + interface FfmpegCommandOptions { + logger?: FfmpegCommandLogger + niceness?: number + priority?: number + presets?: string + preset?: string + stdoutLines?: number + timeout?: number + source?: string | stream.Readable + } + + interface FilterSpecification { + filter: string + inputs: string | string[] + outputs: string | string[] + options?: Object | string | any[] + } + + interface GetPreset { + (command: FfmpegCommand): string + } + + interface Filter { + description: string + input: string + multipleInputs: boolean + output: string + multipleOutputs: boolean + } + interface Filters { + [key: string]: Filter + } + interface FiltersCallback { + (err: Error, filters: Filters): void + } + + interface Codec { + type: string + description: string + canDecode: boolean + canEncode: boolean + drawHorizBand?: boolean + directRendering?: boolean + weirdFrameTruncation?: boolean + intraFrameOnly?: boolean + isLossy?: boolean + isLossless?: boolean + } + interface Codecs { + [key: string]: Codec + } + interface CodecsCallback { + (err: Error, codecs: Codecs): void + } + + interface Encoder { + type: string + description: string + frameMT: boolean + sliceMT: boolean + experimental: boolean + drawHorizBand: boolean + directRendering: boolean + } + interface Encoders { + [key: string]: Encoder + } + interface EncodersCallback { + (err: Error, encoders: Encoders): void + } + + interface Format { + description: string + canDemux: boolean + canMux: boolean + } + interface Formats { + [key: string]: Format + } + interface FormatsCallback { + (err: Error, formats: Formats): void + } + + interface FfprobeData { + stream: any[] + format: any + chapters: any[] + } + + interface ScreenshotsConfig { + count?: number + folder?: string + filename?: string + timemarks?: number[] | string[] + timestamps?: number[] | string[] + fastSeek?: boolean + size?: string + } + + interface FfmpegCommand extends events.EventEmitter { + constructor(): FfmpegCommand + constructor(options: FfmpegCommandOptions): FfmpegCommand + constructor(input: string | stream.Readable, options: FfmpegCommandOptions): FfmpegCommand + + // options/inputs + mergeAdd(source: string | stream.Readable): FfmpegCommand + addInput(source: string | stream.Readable): FfmpegCommand + input(source: string | stream.Readable): FfmpegCommand + withInputFormat(format: string): FfmpegCommand + inputFormat(format: string): FfmpegCommand + fromFormat(format: string): FfmpegCommand + withInputFps(fps: number): FfmpegCommand + withInputFPS(fps: number): FfmpegCommand + withFpsInput(fps: number): FfmpegCommand + withFPSInput(fps: number): FfmpegCommand + inputFPS(fps: number): FfmpegCommand + inputFps(fps: number): FfmpegCommand + fpsInput(fps: number): FfmpegCommand + FPSInput(fps: number): FfmpegCommand + nativeFramerate(): FfmpegCommand + withNativeFramerate(): FfmpegCommand + native(): FfmpegCommand + setStartTime(seek: string | number): FfmpegCommand + seekInput(seek: string | number): FfmpegCommand + loop(duration: string | number): FfmpegCommand + + // options/audio + withNoAudio(): FfmpegCommand + noAudio(): FfmpegCommand + withAudioCodec(codec: string): FfmpegCommand + audioCodec(codec: string): FfmpegCommand + withAudioBitrate(bitrate: string | number): FfmpegCommand + audioBitrate(bitrate: string | number): FfmpegCommand + withAudioChannels(channels: number): FfmpegCommand + audioChannels(channels: number): FfmpegCommand + withAudioFrequency(freq: number): FfmpegCommand + audioFrequency(freq: number): FfmpegCommand + withAudioQuality(quality: number): FfmpegCommand + audioQuality(quality: number): FfmpegCommand + withAudioFilter(filters: { filter: string, options: any }): FfmpegCommand + withAudioFilters(filters: { filter: string, options: any }): FfmpegCommand + audioFilter(filters: { filter: string, options: any }): FfmpegCommand + audioFilters(filters: { filter: string, options: any }): FfmpegCommand + + // options/video + withNoVideo(): FfmpegCommand + noVideo(): FfmpegCommand + withVideoCodec(codec: string): FfmpegCommand + videoCodec(codec: string): FfmpegCommand + withVideoBitrate(bitrate: string | number): FfmpegCommand + videoBitrate(bitrate: string | number): FfmpegCommand + withVideoFilter(filters: { filter: string, options: any }): FfmpegCommand + withVideoFilters(filters: { filter: string, options: any }): FfmpegCommand + videoFilter(filters: { filter: string, options: any }): FfmpegCommand + videoFilters(filters: { filter: string, options: any }): FfmpegCommand + withOutputFps(fps: number): FfmpegCommand + withOutputFPS(fps: number): FfmpegCommand + withFpsOutput(fps: number): FfmpegCommand + withFPSOutput(fps: number): FfmpegCommand + withFps(fps: number): FfmpegCommand + withFPS(fps: number): FfmpegCommand + outputFPS(fps: number): FfmpegCommand + outputFps(fps: number): FfmpegCommand + fpsOutput(fps: number): FfmpegCommand + FPSOutput(fps: number): FfmpegCommand + fps(fps: number): FfmpegCommand + FPS(fps: number): FfmpegCommand + takeFrames(frames: number): FfmpegCommand + withFrames(frames: number): FfmpegCommand + frames(frames: number): FfmpegCommand + + // options/videosize + keepPixelAspect(): FfmpegCommand + keepDisplayAspect(): FfmpegCommand + keepDisplayAspectRatio(): FfmpegCommand + keepDAR(): FfmpegCommand + withSize(size: string): FfmpegCommand + setSize(size: string): FfmpegCommand + size(size: string): FfmpegCommand + withAspect(aspect: string | number): FfmpegCommand + withAspectRatio(aspect: string | number): FfmpegCommand + setAspect(aspect: string | number): FfmpegCommand + setAspectRatio(aspect: string | number): FfmpegCommand + aspect(aspect: string | number): FfmpegCommand + aspectRatio(aspect: string | number): FfmpegCommand + applyAutopadding(pad: boolean, color: string): FfmpegCommand + applyAutoPadding(pad: boolean, color: string): FfmpegCommand + applyAutopad(pad: boolean, color: string): FfmpegCommand + applyAutoPad(pad: boolean, color: string): FfmpegCommand + withAutopadding(pad: boolean, color: string): FfmpegCommand + withAutoPadding(pad: boolean, color: string): FfmpegCommand + withAutopad(pad: boolean, color: string): FfmpegCommand + withAutoPad(pad: boolean, color: string): FfmpegCommand + autoPad(pad: boolean, color: string): FfmpegCommand + autopad(pad: boolean, color: string): FfmpegCommand + + // options/output + addOutput(target: string | stream.Writable, pipeopts?: { end?: boolean }): FfmpegCommand + output(target: string | stream.Writable, pipeopts?: { end?: boolean }): FfmpegCommand + seekOutput(seek: string | number): FfmpegCommand + seek(seek: string | number): FfmpegCommand + withDuration(duration: string | number): FfmpegCommand + setDuration(duration: string | number): FfmpegCommand + duration(duration: string | number): FfmpegCommand + toFormat(format: string): FfmpegCommand + withOutputFormat(format: string): FfmpegCommand + outputFormat(format: string): FfmpegCommand + format(format: string): FfmpegCommand + map(spec: string): FfmpegCommand + updateFlvMetadata(): FfmpegCommand + flvmeta(): FfmpegCommand + + // options/custom + addInputOption(options: string[]): FfmpegCommand + addInputOption(...options: string[]): FfmpegCommand + addInputOptions(options: string[]): FfmpegCommand + addInputOptions(...options: string[]): FfmpegCommand + withInputOption(options: string[]): FfmpegCommand + withInputOption(...options: string[]): FfmpegCommand + withInputOptions(options: string[]): FfmpegCommand + withInputOptions(...options: string[]): FfmpegCommand + inputOption(options: string[]): FfmpegCommand + inputOption(...options: string[]): FfmpegCommand + inputOptions(options: string[]): FfmpegCommand + inputOptions(...options: string[]): FfmpegCommand + addOutputOption(options: string[]): FfmpegCommand + addOutputOption(...options: string[]): FfmpegCommand + addOutputOptions(options: string[]): FfmpegCommand + addOutputOptions(...options: string[]): FfmpegCommand + addOption(options: string[]): FfmpegCommand + addOption(...options: string[]): FfmpegCommand + addOptions(options: string[]): FfmpegCommand + addOptions(...options: string[]): FfmpegCommand + withOutputOption(options: string[]): FfmpegCommand + withOutputOption(...options: string[]): FfmpegCommand + withOutputOptions(options: string[]): FfmpegCommand + withOutputOptions(...options: string[]): FfmpegCommand + withOption(options: string[]): FfmpegCommand + withOption(...options: string[]): FfmpegCommand + withOptions(options: string[]): FfmpegCommand + withOptions(...options: string[]): FfmpegCommand + outputOption(options: string[]): FfmpegCommand + outputOption(...options: string[]): FfmpegCommand + outputOptions(options: string[]): FfmpegCommand + outputOptions(...options: string[]): FfmpegCommand + filterGraph(spec: string | FilterSpecification[], map: string[]): FfmpegCommand + complexFilter(spec: string | FilterSpecification[], map: string[]): FfmpegCommand + + // options/misc + usingPreset(proset: string | GetPreset): FfmpegCommand + pnreset(proset: string | GetPreset): FfmpegCommand + + // processor + renice(niceness: number): FfmpegCommand + kill(signal: string): FfmpegCommand + + // capabilities + setFfmpegPath(path: string): FfmpegCommand + setFfprobePath(path: string): FfmpegCommand + setFlvtoolPath(path: string): FfmpegCommand + availableFilters(callback: FiltersCallback): void + getAvailableFilters(callback: FiltersCallback): void + availableCodecs(callback: CodecsCallback): void + getAvailableCodecs(callback: CodecsCallback): void + availableEncoders(callback: EncodersCallback): void + getAvailableEncoders(callback: EncodersCallback): void + availableFormats(callback: FormatsCallback): void + getAvailableFormats(callback: FormatsCallback): void + + // ffprobe + ffprobe(callback: (err: any, data: FfprobeData) => void): (err: any, data: FfprobeData) => void + ffprobe(index: number, callback: (err: any, data: FfprobeData) => void): (err: any, data: FfprobeData) => void + ffprobe(options: string[], callback: (err: any, data: FfprobeData) => void): (err: any, data: FfprobeData) => void + ffprobe(index: number, options: string[], callback: (err: any, data: FfprobeData) => void): (err: any, data: FfprobeData) => void + + // recipes + saveToFile(output: string): FfmpegCommand + save(output: string): FfmpegCommand + writeToStream(stream: stream.Writable, options?: { end?: boolean }): stream.Writable + pipe(stream: stream.Writable, options?: { end?: boolean }): stream.Writable + stream(stream: stream.Writable, options?: { end?: boolean }): stream.Writable + takeScreenshots(config: number | ScreenshotsConfig, folder?: string): FfmpegCommand + thumbnail(config: number | ScreenshotsConfig, folder?: string): FfmpegCommand + thumbnails(config: number | ScreenshotsConfig, folder?: string): FfmpegCommand + screenshot(config: number | ScreenshotsConfig, folder?: string): FfmpegCommand + screenshots(config: number | ScreenshotsConfig, folder?: string): FfmpegCommand + mergeToFile(target: string | stream.Writable, options?: { end?: boolean }): FfmpegCommand + concatenate(target: string | stream.Writable, options?: { end?: boolean }): FfmpegCommand + concat(target: string | stream.Writable, options?: { end?: boolean }): FfmpegCommand + } + + function Ffmpeg(): FfmpegCommand + function Ffmpeg(options: FfmpegCommandOptions): FfmpegCommand + function Ffmpeg(input: string | stream.Readable, options: FfmpegCommandOptions): FfmpegCommand + + export = Ffmpeg +} diff --git a/formidable/formidable-tests.ts b/formidable/formidable-tests.ts index a0f70a713c..4fdc5ba4cf 100644 --- a/formidable/formidable-tests.ts +++ b/formidable/formidable-tests.ts @@ -48,7 +48,7 @@ if (form.bytesReceived > 100) { if (form.bytesExpected > 100) { } -var req: http.ServerRequest; +var req: http.IncomingMessage; form.parse(req); form.parse(req, (err: any, fields: formidable.Fields, files: formidable.Files) => { diff --git a/fs-extra-promise/fs-extra-promise.d.ts b/fs-extra-promise/fs-extra-promise.d.ts index bdf8360b77..2243a4d1c5 100644 --- a/fs-extra-promise/fs-extra-promise.d.ts +++ b/fs-extra-promise/fs-extra-promise.d.ts @@ -6,7 +6,7 @@ // Imported from: https://github.com/soywiz/typescript-node-definitions/fs-extra.d.ts via TSD fs-extra definition /// -/// +/// declare module "fs-extra-promise" { import stream = require("stream"); diff --git a/fs-extra/fs-extra.d.ts b/fs-extra/fs-extra.d.ts index 39656ce685..7061f08746 100644 --- a/fs-extra/fs-extra.d.ts +++ b/fs-extra/fs-extra.d.ts @@ -79,8 +79,9 @@ declare module "fs-extra" { export interface CopyOptions { clobber?: boolean preserveTimestamps?: boolean - dereference?: boolean + dereference?: boolean filter?: CopyFilter + recursive?: boolean } export interface OpenOptions { diff --git a/fullCalendar/fullCalendar.d.ts b/fullCalendar/fullCalendar.d.ts index 65df012185..81ce91d119 100644 --- a/fullCalendar/fullCalendar.d.ts +++ b/fullCalendar/fullCalendar.d.ts @@ -25,15 +25,17 @@ declare namespace FullCalendar { end: moment.Moment; } + export interface Header { + left: string; + center: string; + right: string; + } + export interface Options extends AgendaOptions, EventDraggingResizingOptions, DroppingExternalElementsOptions, SelectionOptions { // General display - http://fullcalendar.io/docs/display/ - header?: { - left: string; - center: string; - right: string; - } - theme?: boolean + header?: boolean | Header; + theme?: boolean; buttonIcons?: { prev: string; next: string; @@ -50,7 +52,7 @@ declare namespace FullCalendar { contentHeight?: number; aspectRatio?: number; handleWindowResize?: boolean; - views?: ViewSpecificOptions; + views?: ViewSpecificOptions; viewRender?: (view: ViewObject, element: JQuery) => void; viewDestroy?: (view: ViewObject, element: JQuery) => void; dayRender?: (date: Date, cell: HTMLTableDataCellElement) => void; @@ -318,7 +320,7 @@ interface JQuery { /** * Moves the calendar to an arbitrary date. */ - fullCalendar(method: 'gotoDate', date: Date | string): void; + fullCalendar(method: 'gotoDate', date: moment.Moment | Date | string): void; /** * Moves the calendar forward/backward an arbitrary amount of time. @@ -403,4 +405,4 @@ interface JQuery { interface JQueryStatic { fullCalendar: FullCalendar.Calendar; -} \ No newline at end of file +} diff --git a/geojson2osm/geojson2osm-tests.ts b/geojson2osm/geojson2osm-tests.ts new file mode 100644 index 0000000000..c7bfc05b85 --- /dev/null +++ b/geojson2osm/geojson2osm-tests.ts @@ -0,0 +1,47 @@ +/// +/// + +import { geojson2osm } from 'geojson2osm' + +const features: GeoJSON.FeatureCollection = { + type: 'FeatureCollection', + features: [{ + type: 'Feature', + properties: { + 'building:colour': '#9F8169', + 'building:levels': 21, + building: 'yes', + height: 57, + }, + geometry: { + type: 'Polygon', + coordinates: [ + [ + [ + -434.2249470949173, + -13.15996269397843, + ], + [ + -434.2249470949173, + -13.159751140560356, + ], + [ + -434.2242631316185, + -13.159751140560356, + ], + [ + -434.2242631316185, + -13.15996269397843, + ], + [ + -434.2249470949173, + -13.15996269397843, + ], + ], + ], + }, + }, + ], +} + +geojson2osm(features) diff --git a/geojson2osm/geojson2osm.d.ts b/geojson2osm/geojson2osm.d.ts new file mode 100644 index 0000000000..58393411f1 --- /dev/null +++ b/geojson2osm/geojson2osm.d.ts @@ -0,0 +1,15 @@ +// Type definitions for geojson2osm 0.0.5 +// Project: https://github.com/Rub21/geojson2osm +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module 'geojson2osm' { + /** + * Converts GeoJSON features to OpenStreetMap XML. + * @param features Input features + * @returns OpenStreetMap XML + */ + export function geojson2osm(features: GeoJSON.Feature | GeoJSON.FeatureCollection): any +} diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index bebf0b99c8..966465ed3a 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -240,6 +240,63 @@ app.setUserTasks([ } ]); app.setUserTasks([]); + +app.setJumpList([ + { + type: 'custom', + name: 'Recent Projects', + items: [ + { type: 'file', path: 'C:\\Projects\\project1.proj' }, + { type: 'file', path: 'C:\\Projects\\project2.proj' } + ] + }, + { // has a name so type is assumed to be "custom" + name: 'Tools', + items: [ + { + type: 'task', + title: 'Tool A', + program: process.execPath, + args: '--run-tool-a', + iconPath: process.execPath, + iconIndex: 0, + description: 'Runs Tool A' + }, + { + type: 'task', + title: 'Tool B', + program: process.execPath, + args: '--run-tool-b', + iconPath: process.execPath, + iconIndex: 0, + description: 'Runs Tool B' + }] + }, + { + type: 'frequent' + }, + { // has no name and no type so type is assumed to be "tasks" + items: [ + { + type: 'task', + title: 'New Project', + program: process.execPath, + args: '--new-project', + description: 'Create a new project.' + }, + { + type: 'separator' + }, + { + type: 'task', + title: 'Recover Project', + program: process.execPath, + args: '--recover-project', + description: 'Recover Project' + }] + } +]); + if (app.isUnityRunning()) { } if (app.isAccessibilitySupportEnabled()) { diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index 7b246966ab..9541d64ac6 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Electron v1.3.3 +// Type definitions for Electron v1.4.1 // Project: http://electron.atom.io/ // Definitions by: jedmao , rhysd , Milan Burda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,7 +7,7 @@ declare namespace Electron { - class EventEmitter implements NodeJS.EventEmitter { + class EventEmitter extends NodeJS.EventEmitter { addListener(event: string, listener: Function): this; on(event: string, listener: Function): this; once(event: string, listener: Function): this; @@ -62,7 +62,7 @@ declare namespace Electron { /** * Emitted when Electron has finished initialization. */ - on(event: 'ready', listener: Function): this; + on(event: 'ready', listener: (event: Event, launchInfo: Object) => void): this; /** * Emitted when all windows have been closed. * @@ -176,7 +176,7 @@ declare namespace Electron { /** * Emitted when the gpu process crashes. */ - on(event: 'gpu-process-crashed', listener: Function): this; + on(event: 'gpu-process-crashed', listener: (event: Event, killed: boolean) => void): this; /** * Emitted when Chrome's accessibility support changes. * @@ -199,7 +199,7 @@ declare namespace Electron { * All windows will be closed immediately without asking user * and the before-quit and will-quit events will not be emitted. */ - exit(exitCode: number): void; + exit(exitCode?: number): void; /** * Relaunches the app when current instance exits. * @@ -218,6 +218,10 @@ declare namespace Electron { args?: string[], execPath?: string }): void; + /** + * @returns Whether Electron has finished initializing. + */ + isReady(): boolean; /** * On Linux, focuses on the first visible window. * On macOS, makes the application the active app. @@ -296,28 +300,56 @@ declare namespace Electron { * Once registered, all links with your-protocol:// will be opened with the current executable. * The whole link, including protocol, will be passed to your application as a parameter. * + * On Windows you can provide optional parameters path, the path to your executable, + * and args, an array of arguments to be passed to your executable when it launches. + * + * @param protocol The name of your protocol, without ://. + * @param path Defaults to process.execPath. + * @param args Defaults to an empty array. + * * Note: This is only implemented on macOS and Windows. * On macOS, you can only register protocols that have been added to your app's info.plist. */ - setAsDefaultProtocolClient(protocol: string): boolean; + setAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; /** * Removes the current executable as the default handler for a protocol (aka URI scheme). * + * @param protocol The name of your protocol, without ://. + * @param path Defaults to process.execPath. + * @param args Defaults to an empty array. + * * Note: This is only implemented on macOS and Windows. */ - removeAsDefaultProtocolClient(protocol: string): boolean; + removeAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; /** + * @param protocol The name of your protocol, without ://. + * @param path Defaults to process.execPath. + * @param args Defaults to an empty array. + * * @returns Whether the current executable is the default handler for a protocol (aka URI scheme). * * Note: This is only implemented on macOS and Windows. */ - isDefaultProtocolClient(protocol: string): boolean; + isDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; /** * Adds tasks to the Tasks category of JumpList on Windows. * * Note: This API is only available on Windows. */ setUserTasks(tasks: Task[]): boolean; + /** + * Note: This API is only available on Windows. + */ + getJumpListSettings(): JumpListSettings; + /** + * Sets or removes a custom Jump List for the application. + * + * If categories is null the previously set custom Jump List (if any) will be replaced + * by the standard Jump List for the app (managed by Windows). + * + * Note: This API is only available on Windows. + */ + setJumpList(categories: JumpListCategory[]): SetJumpListResult; /** * This method makes your application a Single Instance Application instead of allowing * multiple instances of your app to run, this will ensure that only a single instance @@ -545,6 +577,89 @@ declare namespace Electron { iconIndex?: number; } + /** + * ok - Nothing went wrong. + * error - One or more errors occured, enable runtime logging to figure out the likely cause. + * invalidSeparatorError - An attempt was made to add a separator to a custom category in the Jump List. + * Separators are only allowed in the standard Tasks category. + * fileTypeRegistrationError - An attempt was made to add a file link to the Jump List + * for a file type the app isn't registered to handle. + * customCategoryAccessDeniedError - Custom categories can't be added to the Jump List + * due to user privacy or group policy settings. + */ + type SetJumpListResult = 'ok' | 'error' | 'invalidSeparatorError' | 'fileTypeRegistrationError' | 'customCategoryAccessDeniedError'; + + interface JumpListSettings { + /** + * The minimum number of items that will be shown in the Jump List. + */ + minItems: number; + /** + * Items that the user has explicitly removed from custom categories in the Jump List. + */ + removedItems: JumpListItem[]; + } + + interface JumpListCategory { + /** + * tasks - Items in this category will be placed into the standard Tasks category. + * frequent - Displays a list of files frequently opened by the app, the name of the category and its items are set by Windows. + * recent - Displays a list of files recently opened by the app, the name of the category and its items are set by Windows. + * custom - Displays tasks or file links, name must be set by the app. + */ + type?: 'tasks' | 'frequent' | 'recent' | 'custom'; + /** + * Must be set if type is custom, otherwise it should be omitted. + */ + name?: string; + /** + * Array of JumpListItem objects if type is tasks or custom, otherwise it should be omitted. + */ + items?: JumpListItem[]; + } + + interface JumpListItem { + /** + * task - A task will launch an app with specific arguments. + * separator - Can be used to separate items in the standard Tasks category. + * file - A file link will open a file using the app that created the Jump List. + */ + type: 'task' | 'separator' | 'file'; + /** + * Path of the file to open, should only be set if type is file. + */ + path?: string; + /** + * Path of the program to execute, usually you should specify process.execPath which opens the current program. + * Should only be set if type is task. + */ + program?: string; + /** + * The command line arguments when program is executed. Should only be set if type is task. + */ + args?: string; + /** + * The text to be displayed for the item in the Jump List. Should only be set if type is task. + */ + title?: string; + /** + * Description of the task (displayed in a tooltip). Should only be set if type is task. + */ + description?: string; + /** + * The absolute path to an icon to be displayed in a Jump List, which can be an arbitrary + * resource file that contains an icon (e.g. .ico, .exe, .dll). + * You can usually specify process.execPath to show the program icon. + */ + iconPath?: string; + /** + * The index of the icon in the resource file. If a resource file contains multiple icons + * this value can be used to specify the zero-based index of the icon that should be displayed + * for this task. If a resource file contains only one icon, this property should be set to zero. + */ + iconIndex?: number; + } + interface LoginItemSettings { /** * True if the app is set to open at login. @@ -630,7 +745,7 @@ declare namespace Electron { * Emitted when the document changed its title, * calling event.preventDefault() would prevent the native window’s title to change. */ - on(event: 'page-title-updated', listener: (event: Event) => void): this; + on(event: 'page-title-updated', listener: (event: Event, title: string) => void): this; /** * Emitted when the window is going to be closed. It’s emitted before the beforeunload * and unload event of the DOM. Calling event.preventDefault() will cancel the close. @@ -726,6 +841,11 @@ declare namespace Electron { * Note: This is only implemented on macOS. */ on(event: 'scroll-touch-end', listener: Function): this; + /** + * Emitted when scroll wheel event phase filed upon reaching the edge of element. + * Note: This is only implemented on macOS. + */ + on(event: 'scroll-touch-edge', listener: Function): this; /** * Emitted on 3-finger swipe. * Note: This is only implemented on macOS. @@ -1256,6 +1376,12 @@ declare namespace Electron { } interface WebPreferences { + /** + * Whether to enable DevTools. + * If it is set to false, can not use BrowserWindow.webContents.openDevTools() to open DevTools. + * Default: true. + */ + devTools?: boolean; /** * Whether node integration is enabled. * Default: true. @@ -1846,7 +1972,7 @@ declare namespace Electron { interface CrashReporterStartOptions { /** - * Default: Electron + * Default: app.getName() */ productName?: string; companyName: string; @@ -2468,6 +2594,7 @@ declare namespace Electron { static createEmpty(): NativeImage; /** * Creates a new NativeImage instance from file located at path. + * This method returns an empty image if the path does not exist, cannot be read, or is not a valid image. */ static createFromPath(path: string): NativeImage; /** @@ -2648,8 +2775,18 @@ declare namespace Electron { referrer: string; method: string; uploadData?: { + /** + * Content being sent. + */ bytes: Buffer, - file: string + /** + * Path of file being uploaded. + */ + file: string, + /** + * UUID of blob data. Use session.getBlobData method to retrieve the data. + */ + blobUUID: string; }[]; } @@ -2895,6 +3032,10 @@ declare namespace Electron { * @returns The user agent for this session. */ getUserAgent(): string; + /** + * Returns the blob data associated with the identifier. + */ + getBlobData(identifier: string, callback: (result: Buffer) => void): void; /** * The webRequest API set allows to intercept and modify contents of a request at various stages of its lifetime. */ @@ -2947,18 +3088,22 @@ declare namespace Electron { interface NetworkEmulationOptions { /** * Whether to emulate network outage. + * Default: false. */ offline?: boolean; /** * RTT in ms. + * Default: 0, which will disable latency throttling. */ latency?: number; /** * Download rate in Bps. + * Default: 0, which will disable download throttling. */ downloadThroughput?: number; /** * Upload rate in Bps. + * Default: 0, which will disable upload throttling. */ uploadThroughput?: number; } @@ -3192,6 +3337,10 @@ declare namespace Electron { * Path of file being uploaded. */ file: string; + /** + * UUID of blob data. Use session.getBlobData method to retrieve the data. + */ + blobUUID: string; } interface BeforeRequestDetails extends Details { @@ -3277,16 +3426,18 @@ declare namespace Electron { interface Shell { /** * Show the given file in a file manager. If possible, select the file. + * @returns Whether the item was successfully shown. */ - showItemInFolder(fullPath: string): void; + showItemInFolder(fullPath: string): boolean; /** * Open the given file in the desktop's default manner. + * @returns Whether the item was successfully shown. */ - openItem(fullPath: string): void; + openItem(fullPath: string): boolean; /** * Open the given external protocol URL in the desktop's default manner * (e.g., mailto: URLs in the default mail user agent). - * @returns true if an application was available to open the URL, false otherwise. + * @returns Whether an application was available to open the URL. */ openExternal(url: string, options?: { /** @@ -3297,7 +3448,7 @@ declare namespace Electron { }): boolean; /** * Move the given file to trash. - * @returns boolean status for the operation. + * @returns Whether the item was successfully moved to the trash. */ moveItemToTrash(fullPath: string): boolean; /** @@ -3368,6 +3519,11 @@ declare namespace Electron { * Get system preferences. */ interface SystemPreferences { + /** + * Note: This is only implemented on Windows. + */ + on(event: 'accent-color-changed', listener: (event: Event, newColor: string) => void): this; + on(event: string, listener: Function): this; /** * @returns If the system is in Dark Mode. * @@ -3422,13 +3578,17 @@ declare namespace Electron { */ getUserDefault(key: string, type: 'string' | 'boolean' | 'integer' | 'float' | 'double' | 'url' | 'array' | 'dictionary'): 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). + * @returns Whether DWM composition (Aero Glass) is enabled. * * Note: This is only implemented on Windows. */ isAeroGlassEnabled(): boolean; + /** + * @returns The users current system wide color preference in the form of an RGBA hexadecimal string. + * + * Note: This is only implemented on Windows. + */ + getAccentColor(): string; } // https://github.com/electron/electron/blob/master/docs/api/tray.md @@ -3576,7 +3736,7 @@ declare namespace Electron { interface WebContentsStatic { /** - * @returns An array of all web contents. This will contain web contents for all windows, + * @returns An array of all WebContents instances. This will contain web contents for all windows, * webviews, opened devtools, and devtools extension background pages. */ getAllWebContents(): WebContents[]; @@ -3584,6 +3744,10 @@ declare namespace Electron { * @returns The web contents that is focused in this application, otherwise returns null. */ getFocusedWebContents(): WebContents; + /** + * Find a WebContents instance according to its ID. + */ + fromId(id: number): WebContents; } /** @@ -3687,11 +3851,11 @@ declare namespace Electron { * navigation outside of the page. Examples of this occurring are when anchor links * are clicked or when the DOM hashchange event is triggered. */ - on(event: 'did-navigate-in-page', listener: (event: Event, url: string) => void): this; + on(event: 'did-navigate-in-page', listener: (event: Event, url: string, isMainFrame: boolean) => void): this; /** * Emitted when the renderer process has crashed. */ - on(event: 'crashed', listener: Function): this; + on(event: 'crashed', listener: (event: Event, killed: boolean) => void): this; /** * Emitted when a plugin process has crashed. */ @@ -4106,6 +4270,10 @@ declare namespace Electron { * If offscreen rendering is enabled returns the current frame rate. */ getFrameRate(): number; + /** + * If offscreen rendering is enabled invalidates the frame and generates a new one through the 'paint' event. + */ + invalidate(): void; /** * Sets the item as dragging item for current drag-drop operation. */ @@ -4307,7 +4475,7 @@ declare namespace Electron { [key: string]: string; } - type NewWindowDisposition = 'default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'other'; + type NewWindowDisposition = 'default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'; /** * Specifies the action to take place when ending webContents.findInPage request. @@ -4382,7 +4550,7 @@ declare namespace Electron { /** * PEM encoded data. */ - data: Buffer; + data: string; /** * Issuer's Common Name. */ @@ -4750,6 +4918,15 @@ declare namespace Electron { * A list of strings which specifies the blink features to be disabled separated by ,. */ disableblinkfeatures: string; + /** + * A value that links the webview to a specific webContents. + * When a webview first loads a new webContents is created and this attribute is set + * to its instance identifier. Setting this attribute on a new or existing webview connects + * it to the existing webContents that currently renders in a different webview. + * + * The existing webview will see the destroy event and will then create a new webContents when a new url is loaded. + */ + guestinstance: string; /** * Loads the url in the webview, the url must contain the protocol prefix, e.g. the http:// or file://. */ @@ -4766,6 +4943,10 @@ declare namespace Electron { * @returns Whether the web page is destroyed. */ isDestroyed(): boolean; + /** + * @returns Whether the web page is focused. + */ + isFocused(): boolean; /** * @returns Whether guest page is still loading resources. */ @@ -4948,6 +5129,17 @@ declare namespace Electron { * See webContents.sendInputEvent for detailed description of event object. */ sendInputEvent(event: SendInputEvent): void + /** + * Changes the zoom factor to the specified factor. + * Zoom factor is zoom percent divided by 100, so 300% = 3.0. + */ + setZoomFactor(factor: number): void; + /** + * Changes the zoom level to the specified level. + * The original size is 0 and each increment above or below represents + * zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively. + */ + setZoomLevel(level: number): void; /** * Shows pop-up dictionary that searches the selected word on the page. * Note: This API is available only on macOS. @@ -5043,14 +5235,14 @@ declare namespace Electron { * * Calling event.preventDefault() does NOT have any effect. */ - addEventListener(type: 'will-navigate', listener: (event: WebViewElement.NavigateEvent) => void, useCapture?: boolean): void; + addEventListener(type: 'will-navigate', listener: (event: WebViewElement.WillNavigateEvent) => void, useCapture?: boolean): void; /** * Emitted when a navigation is done. * * This event is not emitted for in-page navigations, such as clicking anchor links * or updating the window.location.hash. Use did-navigate-in-page event for this purpose. */ - addEventListener(type: 'did-navigate', listener: (event: WebViewElement.NavigateEvent) => void, useCapture?: boolean): void; + addEventListener(type: 'did-navigate', listener: (event: WebViewElement.DidNavigateEvent) => void, useCapture?: boolean): void; /** * Emitted when an in-page navigation happened. * @@ -5058,7 +5250,7 @@ declare namespace Electron { * navigation outside of the page. Examples of this occurring are when anchor links * are clicked or when the DOM hashchange event is triggered. */ - addEventListener(type: 'did-navigate-in-page', listener: (event: WebViewElement.NavigateEvent) => void, useCapture?: boolean): void; + addEventListener(type: 'did-navigate-in-page', listener: (event: WebViewElement.DidNavigateInPageEvent) => void, useCapture?: boolean): void; /** * Fired when the guest page attempts to close itself. */ @@ -5182,10 +5374,19 @@ declare namespace Electron { options: BrowserWindowOptions; } - interface NavigateEvent extends Event { + interface WillNavigateEvent extends Event { url: string; } + interface DidNavigateEvent extends Event { + url: string; + } + + interface DidNavigateInPageEvent extends Event { + url: string; + isMainFrame: boolean; + } + interface IpcMessageEvent extends Event { channel: string; args: any[]; diff --git a/gl-matrix/gl-matrix-legacy-tests.ts b/gl-matrix/gl-matrix-legacy-tests.ts new file mode 100644 index 0000000000..5cfa9a1c3a --- /dev/null +++ b/gl-matrix/gl-matrix-legacy-tests.ts @@ -0,0 +1,362 @@ +/// + +// common +var result: number = glMatrix.toRadian(180); + +var out: GLM.IArray; +var outVal: number; +var outStr: string; + +// vec2 +var vecA: GLM.IArray, vecB: GLM.IArray, matA: GLM.IArray; +var vecArray: GLM.IArray; + +vecA = [1, 2]; +vecB = new Float32Array([3, 4]); +out = [0, 0]; +matA = [1, 2, 3, 4, 5, 6]; +vecArray = [1, 2, 3, 4, 0, 0]; + +out = vec2.create(); +out = vec2.clone(vecA); +out = vec2.fromValues(1, 2); +out = vec2.copy(out, vecA); +out = vec2.set(out, 1, 2); +out = vec2.add(out, vecA, vecB); +out = vec2.subtract(out, vecA, vecB); +out = vec2.sub(out, vecA, vecB); +out = vec2.multiply(out, vecA, vecB); +out = vec2.mul(out, vecA, vecB); +out = vec2.divide(out, vecA, vecB); +out = vec2.div(out, vecA, vecB); +out = vec2.min(out, vecA, vecB); +out = vec2.max(out, vecA, vecB); +out = vec2.scale(out, vecA, 2); +out = vec2.scaleAndAdd(out, vecA, vecB, 0.5); +outVal = vec2.distance(vecA, vecB); +outVal = vec2.dist(vecA, vecB); +outVal = vec2.squaredDistance(vecA, vecB); +outVal = vec2.sqrDist(vecA, vecB); +outVal = vec2.length(vecA); +outVal = vec2.len(vecA); +outVal = vec2.squaredLength(vecA); +outVal = vec2.sqrLen(vecA); +out = vec2.negate(out, vecA); +out = vec2.inverse(out, vecA); +out = vec2.normalize(out, vecA); +outVal = vec2.dot(vecA, vecB); +out = vec2.cross(out, vecA, vecB); +out = vec2.lerp(out, vecA, vecB, 0.5); +out = vec2.random(out); +out = vec2.random(out, 5.0); +out = vec2.transformMat2(out, vecA, matA); +out = vec2.transformMat2d(out, vecA, matA); +out = vec2.transformMat3(out, vecA, matA); +out = vec2.transformMat4(out, vecA, matA); +out = vec2.forEach(vecArray, 0, 0, 0, vec2.normalize); +outStr = vec2.str(vecA); + +// vec3 +var matr: GLM.IArray; +var q: GLM.IArray; + +vecA = [1, 2, 3]; +vecB = new Float32Array([4, 5, 6]); +out = [0, 0, 0]; +vecArray = [1, 2, 3, 4, 5, 6, 0, 0, 0]; +matr = [1, 0, 0, 0, 1, 0, 0, 0, 1 ]; + +out = vec3.create(); +out = vec3.clone(vecA); +out = vec3.fromValues(1, 2, 3); +out = vec3.copy(out, vecA); +out = vec3.set(out, 1, 2, 3); +out = vec3.add(out, vecA, vecB); +out = vec3.subtract(out, vecA, vecB); +out = vec3.sub(out, vecA, vecB); +out = vec3.multiply(out, vecA, vecB); +out = vec3.mul(out, vecA, vecB); +out = vec3.divide(out, vecA, vecB); +out = vec3.div(out, vecA, vecB); +out = vec3.min(out, vecA, vecB); +out = vec3.max(out, vecA, vecB); +out = vec3.scale(out, vecA, 2); +out = vec3.scaleAndAdd(out, vecA, vecB, 0.5); +outVal = vec3.distance(vecA, vecB); +outVal = vec3.dist(vecA, vecB); +outVal = vec3.squaredDistance(vecA, vecB); +outVal = vec3.sqrDist(vecA, vecB); +outVal = vec3.length(vecA); +outVal = vec3.len(vecA); +outVal = vec3.squaredLength(vecA); +outVal = vec3.sqrLen(vecA); +out = vec3.negate(out, vecA); +out = vec3.inverse(out, vecA); +out = vec3.normalize(out, vecA); +outVal = vec3.dot(vecA, vecB); +out = vec3.cross(out, vecA, vecB); +out = vec3.lerp(out, vecA, vecB, 0.5); +out = vec3.random(out); +out = vec3.random(out, 5.0); +out = vec3.rotateX(out, vecA, vecB, Math.PI); +out = vec3.rotateY(out, vecA, vecB, Math.PI); +out = vec3.rotateZ(out, vecA, vecB, Math.PI); +out = vec3.transformMat3(out, vecA, matr); + +matr = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]; +out = vec3.transformMat4(out, vecA, matr); + +q = [1, 2, 3, 4]; +out = vec3.transformQuat(out, vecA, matr); + +out = vec3.forEach(vecArray, 0, 0, 0, vec3.normalize); +outVal = vec3.angle(vecA, vecB); +outStr = vec3.str(vecA); + +// vec4 +var q: GLM.IArray; + +vecA = [1, 2, 3, 4]; +vecB = new Float32Array([5, 6, 7, 8]); +out = [0, 0, 0, 0]; +q = [1, 2, 3, 4]; + +out = vec4.create(); +out = vec4.clone(vecA); +out = vec4.fromValues(1, 2, 3, 4); +out = vec4.copy(out, vecA); +out = vec4.set(out, 1, 2, 3, 4); +out = vec4.add(out, vecA, vecB); +out = vec4.subtract(out, vecA, vecB); +out = vec4.sub(out, vecA, vecB); +out = vec4.multiply(out, vecA, vecB); +out = vec4.mul(out, vecA, vecB); +out = vec4.divide(out, vecA, vecB); +out = vec4.div(out, vecA, vecB); +out = vec4.min(out, vecA, vecB); +out = vec4.max(out, vecA, vecB); +out = vec4.scale(out, vecA, 2); +out = vec4.scaleAndAdd(out, vecA, vecB, 0.5); +outVal = vec4.distance(vecA, vecB); +outVal = vec4.dist(vecA, vecB); +outVal = vec4.squaredDistance(vecA, vecB); +outVal = vec4.sqrDist(vecA, vecB); +outVal = vec4.length(vecA); +outVal = vec4.len(vecA); +outVal = vec4.squaredLength(vecA); +outVal = vec4.sqrLen(vecA); +out = vec4.negate(out, vecA); +out = vec4.inverse(out, vecA); +out = vec4.normalize(out, vecA); +outVal = vec4.dot(vecA, vecB); +out = vec4.lerp(out, vecA, vecB, 0.5); +out = vec4.random(out); +out = vec4.random(out, 5.0); + +matr = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] +out = vec4.transformMat4(out, vecA, matr); +out = vec4.transformQuat(out, vecA, q); + +vecArray = [1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0]; +out = vec4.forEach(vecArray, 0, 0, 0, vec4.normalize); +outStr = vec4.str(vecA); + +// mat2 +var matB: GLM.IArray, identity: GLM.IArray; + +matA = [1, 2, 3, 4]; +matB = new Float32Array([5, 6, 7, 8]); +out = [0, 0, 0, 0]; +identity = [1, 0, 0, 1]; + +out = mat2.create(); +out = mat2.clone(matA); +out = mat2.copy(out, matA); +out = mat2.identity(out); +out = mat2.transpose(out, matA); +out = mat2.invert(out, matA); +out = mat2.adjoint(out, matA); +outVal = mat2.determinant(matA); +out = mat2.multiply(out, matA, matB); +out = mat2.mul(out, matA, matB); +out = mat2.rotate(out, matA, Math.PI * 0.5); + +vecA = [2, 3]; +out = mat2.scale(out, matA, vecA); +outStr = mat2.str(matA); +outVal = mat2.frob(matA); + +var L = mat2.create(); +var D = mat2.create(); +var U = mat2.create(); +out = mat2.LDU(L, D, U, [4,3,6,3]); + +// mat2d +matA = [1, 2, 3, 4, 5, 6]; +matB = [7, 8, 9, 10, 11, 12]; +out = [0, 0, 0, 0, 0, 0]; +identity = [1, 0, 0, 1, 0, 0]; + +out = mat2d.create(); +out = mat2d.clone(matA); +out = mat2d.copy(out, matA); +out = mat2d.identity(out); +out = mat2d.invert(out, matA); +outVal = mat2d.determinant(matA); +out = mat2d.multiply(out, matA, matB); +out = mat2d.mul(out, matA, matB); +out = mat2d.rotate(out, matA, Math.PI * 0.5); + +vecA = [2, 3]; +out = mat2d.scale(out, matA, vecA); +out = mat2d.translate(out, matA, vecA); +outStr = mat2d.str(matA); +outVal = mat2d.frob(matA); + +// mat3 +matA = [1, 0, 0, 0, 1, 0, 1, 2, 1]; +matB = [1, 0, 0, 0, 1, 0, 3, 4, 1]; +out = [0, 0, 0, 0, 0, 0, 0, 0, 0]; +identity = [1, 0, 0, 0, 1, 0, 0, 0, 1]; + +out = mat3.create(); +out = mat3.clone(matA); +out = mat3.copy(out, matA); +out = mat3.identity(out); +out = mat3.transpose(out, matA); +out = mat3.invert(out, matA); +out = mat3.adjoint(out, matA); +outVal = mat3.determinant(matA); +out = mat3.multiply(out, matA, matB); +out = mat3.mul(out, matA, matB); +outStr = mat3.str(matA); +outVal = mat3.frob(matA); + +matA = [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]; +out = mat3.normalFromMat4(out, matA); + +q = [ 0, -0.7071067811865475, 0, 0.7071067811865475 ]; +out = mat3.fromQuat(out, q); + +out = mat3.normalFromMat4(out, [ 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16]); +out = mat3.fromMat4(out, [ 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16]); +out = mat3.scale(out, matA, [2,2]); +out = mat3.fromMat2d(out, [1, 2, 3, 4, 5, 6]); + +out = mat3.translate(out, matA, [1, 2, 3]); +out = mat3.rotate(out, matA, Math.PI/2); + +// mat4 +matA = [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 1, 2, 3, 1]; + +matB = [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 4, 5, 6, 1]; + +out = [0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0]; + +identity = [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]; + +out = mat4.create(); +out = mat4.clone(matA); +out = mat4.copy(out, matA); +out = mat4.identity(out); +out = mat4.transpose(out, matA); +out = mat4.invert(out, matA); +out = mat4.adjoint(out, matA); +outVal = mat4.determinant(matA); +out = mat4.multiply(out, matA, matB); +out = mat4.mul(out, matA, matB); +out = mat4.translate(out, matA, [4, 5, 6]); +out = mat4.scale(out, matA, [4, 5, 6]); + +var rad = Math.PI * 0.5; +var axis = [1, 0, 0]; +out = mat4.rotate(out, matA, rad, axis); +out = mat4.rotateX(out, matA, rad); +out = mat4.rotateY(out, matA, rad); +out = mat4.rotateZ(out, matA, rad); + +out = mat4.frustum(out, -1, 1, -1, 1, -1, 1); + +var fovy = Math.PI * 0.5; +out = mat4.perspective(out, fovy, 1, 0, 1); +out = mat4.ortho(out, -1, 1, -1, 1, -1, 1); + +var eye = [0, 0, 1]; +var center = [0, 0, -1]; +var up = [0, 1, 0]; +out = mat4.lookAt(out, eye, center, up); + +outStr = mat4.str(matA); +outVal = mat4.frob(matA); + +q = [0, 0, 0, 1]; +out = mat4.fromRotationTranslation(out, q, [1, 2, 3]); +out = mat4.fromQuat(out, q); + +q = [0, 0, 0, 1]; +out = mat4.fromRotationTranslationScale(out, q, [1, 2, 3], [1, 2, 3]); +out = mat4.fromQuat(out, q); + + +// quat +var quatA = [1, 2, 3, 4]; +var quatB = [5, 6, 7, 8]; +out = [0, 0, 0, 0]; +var vec = [1, 1, -1]; +var id = [0, 0, 0, 1]; +var deg90 = Math.PI / 2; + +out = quat.create(); +out = quat.clone(quatA); +out = quat.fromValues(1, 2, 3, 4); +out = quat.copy(out, quatA); +out = quat.set(out, 1, 2, 3, 4); +out = quat.identity(out); +out = quat.setAxisAngle(out, [1, 0, 0], Math.PI * 0.5); +out = quat.add(out, quatA, quatB); +out = quat.multiply(out, quatA, quatB); +out = quat.mul(out, quatA, quatB); +out = quat.scale(out, quatA, 2); +outVal = quat.length(quatA); +outVal = quat.len(quatA); +outVal = quat.squaredLength(quatA); +outVal = quat.sqrLen(quatA); +out = quat.normalize(out, quatA); +outVal = quat.dot(out, quatA, quatB); +out = quat.lerp(out, quatA, quatB, 0.5); +out = quat.slerp(out, quatA, quatB, 0.5); +out = quat.invert(out, quatA); +out = quat.conjugate(out, quatA); +outStr = quat.str(quatA); +out = quat.rotateX(out, id, deg90); +out = quat.rotateY(out, id, deg90); +out = quat.rotateZ(out, id, deg90); + +matr = [ 1, 0, 0, + 0, 0, -1, + 0, 1, 0 ]; +out = quat.fromMat3(out, matr); + +var view = [-1, 0, 0]; +up = [ 0, 1, 0]; +var right= [ 0, 0,-1]; +out = quat.setAxes([], view, right, up); + +out = quat.rotationTo(out, [0, 1, 0], [1, 0, 0]); +out = quat.calculateW(out, quatA); + diff --git a/gl-matrix/gl-matrix-legacy.d.ts b/gl-matrix/gl-matrix-legacy.d.ts new file mode 100644 index 0000000000..16366f263a --- /dev/null +++ b/gl-matrix/gl-matrix-legacy.d.ts @@ -0,0 +1,2163 @@ +// Type definitions for gl-matrix 2.2.2 +// Project: https://github.com/toji/gl-matrix +// Definitions by: Tat +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace GLM { + interface IArray + { + /** + * Must be indexable like an array + */ + [index: number]: number; + } +} + +// Common +declare namespace glMatrix { + /** + * Convert Degree To Radian + * + * @param a Angle in Degrees + */ + export function toRadian(a: number): number; +} + +// vec2 +declare namespace vec2 { + /** + * Creates a new, empty vec2 + * + * @returns a new 2D vector + */ + export function create(): GLM.IArray; + + /** + * Creates a new vec2 initialized with values from an existing vector + * + * @param a a vector to clone + * @returns a new 2D vector + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Creates a new vec2 initialized with the given values + * + * @param x X component + * @param y Y component + * @returns a new 2D vector + */ + export function fromValues(x: number, y: number): GLM.IArray; + + /** + * Copy the values from one vec2 to another + * + * @param out the receiving vector + * @param a the source vector + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set the components of a vec2 to the given values + * + * @param out the receiving vector + * @param x X component + * @param y Y component + * @returns out + */ + export function set(out: GLM.IArray, x: number, y: number): GLM.IArray; + + /** + * Adds two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Subtracts vector b from vector a + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function subtract(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Subtracts vector b from vector a + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function sub(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Divides two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function divide(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Divides two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function div(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns the minimum of two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function min(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns the maximum of two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function max(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Scales a vec2 by a scalar number + * + * @param out the receiving vector + * @param a the vector to scale + * @param b amount to scale the vector by + * @returns out + */ + export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + + /** + * Adds two vec2's after scaling the second operand by a scalar value + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @param scale the amount to scale b by before adding + * @returns out + */ + export function scaleAndAdd(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, scale: number): GLM.IArray; + + /** + * Calculates the euclidian distance between two vec2's + * + * @param a the first operand + * @param b the second operand + * @returns distance between a and b + */ + export function distance(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the euclidian distance between two vec2's + * + * @param a the first operand + * @param b the second operand + * @returns distance between a and b + */ + export function dist(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the squared euclidian distance between two vec2's + * + * @param a the first operand + * @param b the second operand + * @returns squared distance between a and b + */ + export function squaredDistance(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the squared euclidian distance between two vec2's + * + * @param a the first operand + * @param b the second operand + * @returns squared distance between a and b + */ + export function sqrDist(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the length of a vec2 + * + * @param a vector to calculate length of + * @returns length of a + */ + export function length(a: GLM.IArray): number; + + /** + * Calculates the length of a vec2 + * + * @param a vector to calculate length of + * @returns length of a + */ + export function len(a: GLM.IArray): number; + + /** + * Calculates the squared length of a vec2 + * + * @param a vector to calculate squared length of + * @returns squared length of a + */ + export function squaredLength(a: GLM.IArray): number; + + /** + * Calculates the squared length of a vec2 + * + * @param a vector to calculate squared length of + * @returns squared length of a + */ + export function sqrLen(a: GLM.IArray): number; + + /** + * Negates the components of a vec2 + * + * @param out the receiving vector + * @param a vector to negate + * @returns out + */ + export function negate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Returns the inverse of the components of a vec2 + * + * @param out the receiving vector + * @param a vector to invert + * @returns out + */ + export function inverse(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Normalize a vec2 + * + * @param out the receiving vector + * @param a vector to normalize + * @returns out + */ + export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the dot product of two vec2's + * + * @param a the first operand + * @param b the second operand + * @returns dot product of a and b + */ + export function dot(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Computes the cross product of two vec2's + * Note that the cross product must by definition produce a 3D vector + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function cross(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Performs a linear interpolation between two vec2's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @param t interpolation amount between the two inputs + * @returns out + */ + export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + + /** + * Generates a random unit vector + * + * @param out the receiving vector + * @returns out + */ + export function random(out: GLM.IArray): GLM.IArray; + + /** + * Generates a random vector with the given scale + * + * @param out the receiving vector + * @param scale Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns out + */ + export function random(out: GLM.IArray, scale: number): GLM.IArray; + + /** + * Transforms the vec2 with a mat2 + * + * @param out the receiving vector + * @param a the vector to transform + * @param m matrix to transform with + * @returns out + */ + export function transformMat2(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Transforms the vec2 with a mat2d + * + * @param out the receiving vector + * @param a the vector to transform + * @param m matrix to transform with + * @returns out + */ + export function transformMat2d(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Transforms the vec2 with a mat3 + * 3rd vector component is implicitly '1' + * + * @param out the receiving vector + * @param a the vector to transform + * @param m matrix to transform with + * @returns out + */ + export function transformMat3(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Transforms the vec2 with a mat4 + * 3rd vector component is implicitly '0' + * 4th vector component is implicitly '1' + * + * @param out the receiving vector + * @param a the vector to transform + * @param m matrix to transform with + * @returns out + */ + export function transformMat4(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Perform some operation over an array of vec2s. + * + * @param a the array of vectors to iterate over + * @param stride Number of elements between the start of each vec2. If 0 assumes tightly packed + * @param offset Number of elements to skip at the beginning of the array + * @param count Number of vec2s to iterate over. If 0 iterates over entire array + * @param fn Function to call for each vector in the array + * @param arg additional argument to pass to fn + * @returns a + */ + export function forEach(a: GLM.IArray, stride: number, offset: number, count: number, + fn: (a: GLM.IArray, b: GLM.IArray, arg: any) => void, arg: any): GLM.IArray; + + /** + * Perform some operation over an array of vec2s. + * + * @param a the array of vectors to iterate over + * @param stride Number of elements between the start of each vec2. If 0 assumes tightly packed + * @param offset Number of elements to skip at the beginning of the array + * @param count Number of vec2s to iterate over. If 0 iterates over entire array + * @param fn Function to call for each vector in the array + * @returns a + */ + export function forEach(a: GLM.IArray, stride: number, offset: number, count: number, + fn: (a: GLM.IArray, b: GLM.IArray) => void): GLM.IArray; + + /** + * Returns a string representation of a vector + * + * @param vec vector to represent as a string + * @returns string representation of the vector + */ + export function str(a: GLM.IArray): string; +} + +// vec3 +declare namespace vec3 { + + /** + * Creates a new, empty vec3 + * + * @returns a new 3D vector + */ + export function create(): GLM.IArray; + + /** + * Creates a new vec3 initialized with values from an existing vector + * + * @param a vector to clone + * @returns a new 3D vector + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Creates a new vec3 initialized with the given values + * + * @param x X component + * @param y Y component + * @param z Z component + * @returns a new 3D vector + */ + export function fromValues(x: number, y: number, z: number): GLM.IArray; + + /** + * Copy the values from one vec3 to another + * + * @param out the receiving vector + * @param a the source vector + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set the components of a vec3 to the given values + * + * @param out the receiving vector + * @param x X component + * @param y Y component + * @param z Z component + * @returns out + */ + export function set(out: GLM.IArray, x: number, y: number, z: number): GLM.IArray; + + /** + * Adds two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Subtracts vector b from vector a + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function subtract(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Subtracts vector b from vector a + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function sub(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray + + /** + * Multiplies two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Divides two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function divide(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Divides two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function div(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns the minimum of two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function min(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns the maximum of two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function max(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Scales a vec3 by a scalar number + * + * @param out the receiving vector + * @param a the vector to scale + * @param b amount to scale the vector by + * @returns out + */ + export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + + /** + * Adds two vec3's after scaling the second operand by a scalar value + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @param scale the amount to scale b by before adding + * @returns out + */ + export function scaleAndAdd(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, scale: number): GLM.IArray; + + /** + * Calculates the euclidian distance between two vec3's + * + * @param a the first operand + * @param b the second operand + * @returns distance between a and b + */ + export function distance(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the euclidian distance between two vec3's + * + * @param a the first operand + * @param b the second operand + * @returns distance between a and b + */ + export function dist(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the squared euclidian distance between two vec3's + * + * @param a the first operand + * @param b the second operand + * @returns squared distance between a and b + */ + export function squaredDistance(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the squared euclidian distance between two vec3's + * + * @param a the first operand + * @param b the second operand + * @returns squared distance between a and b + */ + export function sqrDist(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the length of a vec3 + * + * @param a vector to calculate length of + * @returns length of a + */ + export function length(a: GLM.IArray): number; + + /** + * Calculates the length of a vec3 + * + * @param a vector to calculate length of + * @returns length of a + */ + export function len(a: GLM.IArray): number; + + /** + * Calculates the squared length of a vec3 + * + * @param a vector to calculate squared length of + * @returns squared length of a + */ + export function squaredLength(a: GLM.IArray): number; + + /** + * Calculates the squared length of a vec3 + * + * @param a vector to calculate squared length of + * @returns squared length of a + */ + export function sqrLen(a: GLM.IArray): number; + + /** + * Negates the components of a vec3 + * + * @param out the receiving vector + * @param a vector to negate + * @returns out + */ + export function negate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Returns the inverse of the components of a vec3 + * + * @param out the receiving vector + * @param a vector to invert + * @returns out + */ + export function inverse(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Normalize a vec3 + * + * @param out the receiving vector + * @param a vector to normalize + * @returns out + */ + export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the dot product of two vec3's + * + * @param a the first operand + * @param b the second operand + * @returns dot product of a and b + */ + export function dot(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Computes the cross product of two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function cross(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Performs a linear interpolation between two vec3's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @param t interpolation amount between the two inputs + * @returns out + */ + export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + + /** + * Generates a random unit vector + * + * @param out the receiving vector + * @returns out + */ + export function random(out: GLM.IArray): GLM.IArray; + + /** + * Generates a random vector with the given scale + * + * @param out the receiving vector + * @param [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns out + */ + export function random(out: GLM.IArray, scale: number): GLM.IArray; + + /** + * Rotate a 3D vector around the x-axis + * @param out The receiving vec3 + * @param a The vec3 point to rotate + * @param b The origin of the rotation + * @param c The angle of rotation + * @returns out + */ + export function rotateX(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, c: number): GLM.IArray; + + /** + * Rotate a 3D vector around the y-axis + * @param out The receiving vec3 + * @param a The vec3 point to rotate + * @param b The origin of the rotation + * @param c The angle of rotation + * @returns out + */ + export function rotateY(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, c: number): GLM.IArray; + + /** + * Rotate a 3D vector around the z-axis + * @param out The receiving vec3 + * @param a The vec3 point to rotate + * @param b The origin of the rotation + * @param c The angle of rotation + * @returns out + */ + export function rotateZ(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, c: number): GLM.IArray; + + /** + * Transforms the vec3 with a mat3. + * + * @param out the receiving vector + * @param a the vector to transform + * @param m the 3x3 matrix to transform with + * @returns out + */ + export function transformMat3(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Transforms the vec3 with a mat4. + * 4th vector component is implicitly '1' + * + * @param out the receiving vector + * @param a the vector to transform + * @param m matrix to transform with + * @returns out + */ + export function transformMat4(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Transforms the vec3 with a quat + * + * @param out the receiving vector + * @param a the vector to transform + * @param q quaternion to transform with + * @returns out + */ + export function transformQuat(out: GLM.IArray, a: GLM.IArray, q: GLM.IArray): GLM.IArray; + + + /** + * Perform some operation over an array of vec3s. + * + * @param a the array of vectors to iterate over + * @param stride Number of elements between the start of each vec3. If 0 assumes tightly packed + * @param offset Number of elements to skip at the beginning of the array + * @param count Number of vec3s to iterate over. If 0 iterates over entire array + * @param fn Function to call for each vector in the array + * @param arg additional argument to pass to fn + * @returns a + * @function + */ + export function forEach(out: GLM.IArray, string: number, offset: number, count: number, + fn: (a: GLM.IArray, b: GLM.IArray, arg: any) => void, arg: any): GLM.IArray; + + /** + * Perform some operation over an array of vec3s. + * + * @param a the array of vectors to iterate over + * @param stride Number of elements between the start of each vec3. If 0 assumes tightly packed + * @param offset Number of elements to skip at the beginning of the array + * @param count Number of vec3s to iterate over. If 0 iterates over entire array + * @param fn Function to call for each vector in the array + * @returns a + * @function + */ + export function forEach(out: GLM.IArray, string: number, offset: number, count: number, + fn: (a: GLM.IArray, b: GLM.IArray) => void): GLM.IArray; + + /** + * Get the angle between two 3D vectors + * @param a The first operand + * @param b The second operand + * @returns The angle in radians + */ + export function angle(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Returns a string representation of a vector + * + * @param vec vector to represent as a string + * @returns string representation of the vector + */ + export function str(a: GLM.IArray): string; +} + +// vec4 +declare namespace vec4 { + + /** + * Creates a new, empty vec4 + * + * @returns a new 4D vector + */ + export function create(): GLM.IArray; + + /** + * Creates a new vec4 initialized with values from an existing vector + * + * @param a vector to clone + * @returns a new 4D vector + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Creates a new vec4 initialized with the given values + * + * @param x X component + * @param y Y component + * @param z Z component + * @param w W component + * @returns a new 4D vector + */ + export function fromValues(x: number, y: number, z: number, w: number): GLM.IArray; + + /** + * Copy the values from one vec4 to another + * + * @param out the receiving vector + * @param a the source vector + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set the components of a vec4 to the given values + * + * @param out the receiving vector + * @param x X component + * @param y Y component + * @param z Z component + * @param w W component + * @returns out + */ + export function set(out: GLM.IArray, x: number, y: number, z: number, w: number): GLM.IArray; + + /** + * Adds two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Subtracts vector b from vector a + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function subtract(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Subtracts vector b from vector a + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function sub(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Divides two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function divide(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Divides two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function div(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns the minimum of two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function min(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns the maximum of two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function max(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Scales a vec4 by a scalar number + * + * @param out the receiving vector + * @param a the vector to scale + * @param b amount to scale the vector by + * @returns out + */ + export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + + /** + * Adds two vec4's after scaling the second operand by a scalar value + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @param scale the amount to scale b by before adding + * @returns out + */ + export function scaleAndAdd(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, scale: number): GLM.IArray; + + /** + * Calculates the euclidian distance between two vec4's + * + * @param a the first operand + * @param b the second operand + * @returns distance between a and b + */ + export function distance(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the euclidian distance between two vec4's + * + * @param a the first operand + * @param b the second operand + * @returns distance between a and b + */ + export function dist(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the squared euclidian distance between two vec4's + * + * @param a the first operand + * @param b the second operand + * @returns squared distance between a and b + */ + export function squaredDistance(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the squared euclidian distance between two vec4's + * + * @param a the first operand + * @param b the second operand + * @returns squared distance between a and b + */ + export function sqrDist(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Calculates the length of a vec4 + * + * @param a vector to calculate length of + * @returns length of a + */ + export function length(a: GLM.IArray): number; + + /** + * Calculates the length of a vec4 + * + * @param a vector to calculate length of + * @returns length of a + */ + export function len(a: GLM.IArray): number; + + /** + * Calculates the squared length of a vec4 + * + * @param a vector to calculate squared length of + * @returns squared length of a + */ + export function squaredLength(a: GLM.IArray): number; + + /** + * Calculates the squared length of a vec4 + * + * @param a vector to calculate squared length of + * @returns squared length of a + */ + export function sqrLen(a: GLM.IArray): number; + + /** + * Negates the components of a vec4 + * + * @param out the receiving vector + * @param a vector to negate + * @returns out + */ + export function negate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Returns the inverse of the components of a vec4 + * + * @param out the receiving vector + * @param a vector to invert + * @returns out + */ + export function inverse(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Normalize a vec4 + * + * @param out the receiving vector + * @param a vector to normalize + * @returns out + */ + export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the dot product of two vec4's + * + * @param a the first operand + * @param b the second operand + * @returns dot product of a and b + */ + export function dot(a: GLM.IArray, b: GLM.IArray): number; + + /** + * Performs a linear interpolation between two vec4's + * + * @param out the receiving vector + * @param a the first operand + * @param b the second operand + * @param t interpolation amount between the two inputs + * @returns out + */ + export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + + /** + * Generates a random unit vector + * + * @param out the receiving vector + * @returns out + */ + export function random(out: GLM.IArray): GLM.IArray; + + /** + * Generates a random vector with the given scale + * + * @param out the receiving vector + * @param Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns out + */ + export function random(out: GLM.IArray, scale: number): GLM.IArray; + + /** + * Transforms the vec4 with a mat4. + * + * @param out the receiving vector + * @param a the vector to transform + * @param m matrix to transform with + * @returns out + */ + export function transformMat4(out: GLM.IArray, a: GLM.IArray, mat: GLM.IArray): GLM.IArray; + + /** + * Transforms the vec4 with a quat + * + * @param out the receiving vector + * @param a the vector to transform + * @param q quaternion to transform with + * @returns out + */ + export function transformQuat(out: GLM.IArray, a: GLM.IArray, quat: GLM.IArray): GLM.IArray; + + /** + * Perform some operation over an array of vec4s. + * + * @param a the array of vectors to iterate over + * @param stride Number of elements between the start of each vec4. If 0 assumes tightly packed + * @param offset Number of elements to skip at the beginning of the array + * @param count Number of vec4s to iterate over. If 0 iterates over entire array + * @param fn Function to call for each vector in the array + * @param additional argument to pass to fn + * @returns a + * @function + */ + export function forEach(out: GLM.IArray, string: number, offset: number, count: number, + callback: (a: GLM.IArray, b: GLM.IArray, arg: any) => void, arg: any): GLM.IArray; + + /** + * Perform some operation over an array of vec4s. + * + * @param a the array of vectors to iterate over + * @param stride Number of elements between the start of each vec4. If 0 assumes tightly packed + * @param offset Number of elements to skip at the beginning of the array + * @param count Number of vec4s to iterate over. If 0 iterates over entire array + * @param fn Function to call for each vector in the array + * @returns a + * @function + */ + export function forEach(out: GLM.IArray, string: number, offset: number, count: number, + callback: (a: GLM.IArray, b: GLM.IArray) => void): GLM.IArray; + + /** + * Returns a string representation of a vector + * + * @param vec vector to represent as a string + * @returns string representation of the vector + */ + export function str(a: GLM.IArray): string; +} + +// mat2 +declare namespace mat2 { + + /** + * Creates a new identity mat2 + * + * @returns a new 2x2 matrix + */ + export function create(): GLM.IArray; + + /** + * Creates a new mat2 initialized with values from an existing matrix + * + * @param a matrix to clone + * @returns a new 2x2 matrix + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Copy the values from one mat2 to another + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set a mat2 to the identity matrix + * + * @param out the receiving matrix + * @returns out + */ + export function identity(out: GLM.IArray): GLM.IArray; + + /** + * Transpose the values of a mat2 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function transpose(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Inverts a mat2 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the adjugate of a mat2 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function adjoint(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the determinant of a mat2 + * + * @param a the source matrix + * @returns determinant of a + */ + export function determinant(a: GLM.IArray): number; + + /** + * Multiplies two mat2's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two mat2's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Rotates a mat2 by the given angle + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @returns out + */ + export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Scales the mat2 by the dimensions in the given vec2 + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param v the vec2 to scale the matrix by + * @returns out + **/ + export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Returns a string representation of a mat2 + * + * @param a matrix to represent as a string + * @returns string representation of the matrix + */ + export function str(a: GLM.IArray): string; + + /** + * Returns Frobenius norm of a mat2 + * + * @param a the matrix to calculate Frobenius norm of + * @returns Frobenius norm + */ + export function frob(a: GLM.IArray): number; + + /** + * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix + * @param L the lower triangular matrix + * @param D the diagonal matrix + * @param U the upper triangular matrix + * @param a the input matrix to factorize + */ + export function LDU(L: GLM.IArray, D: GLM.IArray, U: GLM.IArray, a: GLM.IArray): GLM.IArray; +} + +// mat2d +declare namespace mat2d { + + /** + * Creates a new identity mat2d + * + * @returns a new 2x3 matrix + */ + export function create(): GLM.IArray; + + /** + * Creates a new mat2d initialized with values from an existing matrix + * + * @param a matrix to clone + * @returns a new 2x3 matrix + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Copy the values from one mat2d to another + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set a mat2d to the identity matrix + * + * @param out the receiving matrix + * @returns out + */ + export function identity(out: GLM.IArray): GLM.IArray; + + /** + * Inverts a mat2d + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the determinant of a mat2d + * + * @param a the source matrix + * @returns determinant of a + */ + export function determinant(a: GLM.IArray): number; + + /** + * Multiplies two mat2d's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two mat2d's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Rotates a mat2d by the given angle + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @returns out + */ + export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Scales the mat2d by the dimensions in the given vec2 + * + * @param out the receiving matrix + * @param a the matrix to translate + * @param v the vec2 to scale the matrix by + * @returns out + **/ + export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Translates the mat2d by the dimensions in the given vec2 + * + * @param out the receiving matrix + * @param a the matrix to translate + * @param v the vec2 to translate the matrix by + * @returns out + **/ + export function translate(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Returns a string representation of a mat2d + * + * @param a matrix to represent as a string + * @returns string representation of the matrix + */ + export function str(a: GLM.IArray): string; + + /** + * Returns Frobenius norm of a mat2d + * + * @param a the matrix to calculate Frobenius norm of + * @returns Frobenius norm + */ + export function frob(a: GLM.IArray): number; +} + +// mat3 +declare namespace mat3 { + + /** + * Creates a new identity mat3 + * + * @returns a new 3x3 matrix + */ + export function create(): GLM.IArray; + + /** + * Creates a new mat3 initialized with values from an existing matrix + * + * @param a matrix to clone + * @returns a new 3x3 matrix + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Copy the values from one mat3 to another + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set a mat3 to the identity matrix + * + * @param out the receiving matrix + * @returns out + */ + export function identity(out: GLM.IArray): GLM.IArray; + + /** + * Transpose the values of a mat3 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function transpose(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Inverts a mat3 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the adjugate of a mat3 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function adjoint(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the determinant of a mat3 + * + * @param a the source matrix + * @returns determinant of a + */ + export function determinant(a: GLM.IArray): number; + + /** + * Multiplies two mat3's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two mat3's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Returns a string representation of a mat3 + * + * @param mat matrix to represent as a string + * @returns string representation of the matrix + */ + export function str(mat: GLM.IArray): string; + + /** + * Returns Frobenius norm of a mat3 + * + * @param a the matrix to calculate Frobenius norm of + * @returns Frobenius norm + */ + export function frob(a: GLM.IArray): number; + + /** + * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix + * + * @param out mat3 receiving operation result + * @param a Mat4 to derive the normal matrix from + * + * @returns out + */ + export function normalFromMat4(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates a 3x3 matrix from the given quaternion + * + * @param out mat3 receiving operation result + * @param q Quaternion to create matrix from + * + * @returns out + */ + export function fromQuat(out: GLM.IArray, q: GLM.IArray): GLM.IArray; + + /** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param out the receiving 3x3 matrix + * @param a the source 4x4 matrix + * @returns out + */ + export function fromMat4(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param v the vec2 to scale the matrix by + * @returns out + **/ + export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Copies the values from a mat2d into a mat3 + * + * @param out the receiving matrix + * @param {mat2d} a the matrix to copy + * @returns out + **/ + export function fromMat2d(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Translate a mat3 by the given vector + * + * @param out the receiving matrix + * @param a the matrix to translate + * @param v vector to translate by + * @returns out + */ + export function translate(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Rotates a mat3 by the given angle + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @returns out + */ + export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; +} + +// mat4 +declare namespace mat4 { + + /** + * Creates a new identity mat4 + * + * @returns a new 4x4 matrix + */ + export function create(): GLM.IArray; + + /** + * Creates a new mat4 initialized with values from an existing matrix + * + * @param a matrix to clone + * @returns a new 4x4 matrix + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Copy the values from one mat4 to another + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set a mat4 to the identity matrix + * + * @param out the receiving matrix + * @returns out + */ + export function identity(a: GLM.IArray): GLM.IArray; + + /** + * Transpose the values of a mat4 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function transpose(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Inverts a mat4 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the adjugate of a mat4 + * + * @param out the receiving matrix + * @param a the source matrix + * @returns out + */ + export function adjoint(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the determinant of a mat4 + * + * @param a the source matrix + * @returns determinant of a + */ + export function determinant(a: GLM.IArray): number; + + /** + * Multiplies two mat4's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two mat4's + * + * @param out the receiving matrix + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Translate a mat4 by the given vector + * + * @param out the receiving matrix + * @param a the matrix to translate + * @param v vector to translate by + * @returns out + */ + export function translate(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Scales the mat4 by the dimensions in the given vec3 + * + * @param out the receiving matrix + * @param a the matrix to scale + * @param v the vec3 to scale the matrix by + * @returns out + **/ + export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Rotates a mat4 by the given angle + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @param axis the axis to rotate around + * @returns out + */ + export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number, axis: GLM.IArray): GLM.IArray; + + /** + * Rotates a matrix by the given angle around the X axis + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @returns out + */ + export function rotateX(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Rotates a matrix by the given angle around the Y axis + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @returns out + */ + export function rotateY(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Rotates a matrix by the given angle around the Z axis + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param rad the angle to rotate the matrix by + * @returns out + */ + export function rotateZ(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Generates a frustum matrix with the given bounds + * + * @param out mat4 frustum matrix will be written into + * @param left Left bound of the frustum + * @param right Right bound of the frustum + * @param bottom Bottom bound of the frustum + * @param top Top bound of the frustum + * @param near Near bound of the frustum + * @param far Far bound of the frustum + * @returns out + */ + export function frustum(out: GLM.IArray, left: number, right: number, + bottom: number, top: number, near: number, far: number): GLM.IArray; + + /** + * Generates a perspective projection matrix with the given bounds + * + * @param out mat4 frustum matrix will be written into + * @param fovy Vertical field of view in radians + * @param aspect Aspect ratio. typically viewport width/height + * @param near Near bound of the frustum + * @param far Far bound of the frustum + * @returns out + */ + export function perspective(out: GLM.IArray, fovy: number, aspect: number, + near: number, far: number): GLM.IArray; + + /** + * Generates a orthogonal projection matrix with the given bounds + * + * @param out mat4 frustum matrix will be written into + * @param left Left bound of the frustum + * @param right Right bound of the frustum + * @param bottom Bottom bound of the frustum + * @param top Top bound of the frustum + * @param near Near bound of the frustum + * @param far Far bound of the frustum + * @returns out + */ + export function ortho(out: GLM.IArray, left: number, right: number, + bottom: number, top: number, near: number, far: number): GLM.IArray; + + /** + * Generates a look-at matrix with the given eye position, focal point, and up axis + * + * @param out mat4 frustum matrix will be written into + * @param eye Position of the viewer + * @param center Point the viewer is looking at + * @param up vec3 pointing up + * @returns out + */ + export function lookAt(out: GLM.IArray, eye: GLM.IArray, + center: GLM.IArray, up: GLM.IArray): GLM.IArray; + + /** + * Returns a string representation of a mat4 + * + * @param mat matrix to represent as a string + * @returns string representation of the matrix + */ + export function str(mat: GLM.IArray): string; + + /** + * Returns Frobenius norm of a mat4 + * + * @param a the matrix to calculate Frobenius norm of + * @returns Frobenius norm + */ + export function frob(a: GLM.IArray): number; + + /** + * Creates a matrix from a quaternion rotation and vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * var quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * + * @param out mat4 receiving operation result + * @param q Rotation quaternion + * @param v Translation vector + * @returns out + */ + export function fromRotationTranslation(out: GLM.IArray, q: GLM.IArray, v: GLM.IArray): GLM.IArray; + + /** + * Creates a matrix from a quaternion rotation, vector translation and vector scale. + * + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * var quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) + * + * @param out mat4 receiving operation result + * @param q Rotation quaternion + * @param v Translation vector + * @param s Scale vector + * @returns out + */ + export function fromRotationTranslationScale(out: GLM.IArray, q: GLM.IArray, v: GLM.IArray, s: GLM.IArray): GLM.IArray + + /** + * Creates a matrix from a quaternion + * + * @param out mat4 receiving operation result + * @param q Rotation quaternion + * @returns out + */ + export function fromQuat(out: GLM.IArray, q: GLM.IArray): GLM.IArray; +} + +// quat +declare namespace quat { + + /** + * Creates a new identity quat + * + * @returns a new quaternion + */ + export function create(): GLM.IArray; + + /** + * Creates a new quat initialized with values from an existing quaternion + * + * @param a quaternion to clone + * @returns a new quaternion + * @function + */ + export function clone(a: GLM.IArray): GLM.IArray; + + /** + * Creates a new quat initialized with the given values + * + * @param x X component + * @param y Y component + * @param z Z component + * @param w W component + * @returns a new quaternion + * @function + */ + export function fromValues(x: number, y: number, z: number, w: number): GLM.IArray; + + /** + * Copy the values from one quat to another + * + * @param out the receiving quaternion + * @param a the source quaternion + * @returns out + * @function + */ + export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Set the components of a quat to the given values + * + * @param out the receiving quaternion + * @param x X component + * @param y Y component + * @param z Z component + * @param w W component + * @returns out + * @function + */ + export function set(out: GLM.IArray, x: number, y: number, z: number, w: number): GLM.IArray; + + /** + * Set a quat to the identity quaternion + * + * @param out the receiving quaternion + * @returns out + */ + export function identity(out: GLM.IArray): GLM.IArray; + + /** + * Sets a quat from the given angle and rotation axis, + * then returns it. + * + * @param out the receiving quaternion + * @param axis the axis around which to rotate + * @param rad the angle in radians + * @returns out + **/ + export function setAxisAngle(out: GLM.IArray, axis: GLM.IArray, rad: number): GLM.IArray; + + /** + * Adds two quat's + * + * @param out the receiving quaternion + * @param a the first operand + * @param b the second operand + * @returns out + * @function + */ + export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two quat's + * + * @param out the receiving quaternion + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Multiplies two quat's + * + * @param out the receiving quaternion + * @param a the first operand + * @param b the second operand + * @returns out + */ + export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Scales a quat by a scalar number + * + * @param out the receiving vector + * @param a the vector to scale + * @param b amount to scale the vector by + * @returns out + * @function + */ + export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + + /** + * Calculates the length of a quat + * + * @param a vector to calculate length of + * @returns length of a + * @function + */ + export function length(a: GLM.IArray): number; + + /** + * Calculates the length of a quat + * + * @param a vector to calculate length of + * @returns length of a + * @function + */ + export function len(a: GLM.IArray): number; + + /** + * Calculates the squared length of a quat + * + * @param a vector to calculate squared length of + * @returns squared length of a + * @function + */ + export function squaredLength(a: GLM.IArray): number; + + /** + * Calculates the squared length of a quat + * + * @param a vector to calculate squared length of + * @returns squared length of a + * @function + */ + export function sqrLen(a: GLM.IArray): number; + + /** + * Normalize a quat + * + * @param out the receiving quaternion + * @param a quaternion to normalize + * @returns out + * @function + */ + export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the dot product of two quat's + * + * @param a the first operand + * @param b the second operand + * @returns dot product of a and b + * @function + */ + export function dot(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): number; + + /** + * Performs a linear interpolation between two quat's + * + * @param out the receiving quaternion + * @param a the first operand + * @param b the second operand + * @param t interpolation amount between the two inputs + * @returns out + * @function + */ + export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + + /** + * Performs a spherical linear interpolation between two quat + * + * @param out the receiving quaternion + * @param a the first operand + * @param b the second operand + * @param t interpolation amount between the two inputs + * @returns out + */ + export function slerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + + /** + * Calculates the inverse of a quat + * + * @param out the receiving quaternion + * @param a quat to calculate inverse of + * @returns out + */ + export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Calculates the conjugate of a quat + * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. + * + * @param out the receiving quaternion + * @param a quat to calculate conjugate of + * @returns out + */ + export function conjugate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + + /** + * Returns a string representation of a quatenion + * + * @param vec vector to represent as a string + * @returns string representation of the vector + */ + export function str(a: GLM.IArray): string; + + /** + * Rotates a quaternion by the given angle about the X axis + * + * @param out quat receiving operation result + * @param a quat to rotate + * @param rad angle (in radians) to rotate + * @returns out + */ + export function rotateX(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Rotates a quaternion by the given angle about the Y axis + * + * @param out quat receiving operation result + * @param a quat to rotate + * @param rad angle (in radians) to rotate + * @returns out + */ + export function rotateY(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Rotates a quaternion by the given angle about the Z axis + * + * @param out quat receiving operation result + * @param a quat to rotate + * @param rad angle (in radians) to rotate + * @returns out + */ + export function rotateZ(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + + /** + * Creates a quaternion from the given 3x3 rotation matrix. + * + * NOTE: The resultant quaternion is not normalized, so you should be sure + * to renormalize the quaternion yourself where necessary. + * + * @param out the receiving quaternion + * @param m rotation matrix + * @returns out + * @function + */ + export function fromMat3(out: GLM.IArray, m: GLM.IArray): GLM.IArray; + + /** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + * + * @param view the vector representing the viewing direction + * @param right the vector representing the local "right" direction + * @param up the vector representing the local "up" direction + * @returns out + */ + export function setAxes(out: GLM.IArray, view: GLM.IArray, right: GLM.IArray, + up: GLM.IArray): GLM.IArray; + + /** + * Sets a quaternion to represent the shortest rotation from one + * vector to another. + * + * Both vectors are assumed to be unit length. + * + * @param out the receiving quaternion. + * @param a the initial vector + * @param b the destination vector + * @returns out + */ + export function rotationTo(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + + /** + * Calculates the W component of a quat from the X, Y, and Z components. + * Assumes that quaternion is 1 unit in length. + * Any existing W component will be ignored. + * + * @param out the receiving quaternion + * @param a quat to calculate W component of + * @returns out + */ + export function calculateW(out: GLM.IArray, a: GLM.IArray): GLM.IArray; +} diff --git a/gl-matrix/gl-matrix-tests.ts b/gl-matrix/gl-matrix-tests.ts index 682bca7b8b..984ca3d1c3 100644 --- a/gl-matrix/gl-matrix-tests.ts +++ b/gl-matrix/gl-matrix-tests.ts @@ -1,362 +1,347 @@ /// // common -var result: number = glMatrix.toRadian(180); +import {vec2, mat2, mat3, mat4, vec3, vec4, mat2d, quat} from "./gl-matrix"; -var out: GLM.IArray; var outVal: number; +var outBool: boolean; var outStr: string; +let vecArray = new Float32Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); + +let vec2A = vec2.fromValues(1, 2); +let vec2B = vec2.fromValues(3, 4); +let vec3A = vec3.fromValues(1, 2, 3); +let vec3B = vec3.fromValues(3, 4, 5); +let vec4A = vec4.fromValues(1, 2, 3, 4); +let vec4B = vec4.fromValues(3, 4, 5, 6); +let mat2A = mat2.fromValues(1, 2, 3, 4); +let mat2B = mat2.fromValues(1, 2, 3, 4); +let mat2dA = mat2d.fromValues(1, 2, 3, 4, 5, 6); +let mat2dB = mat2d.fromValues(1, 2, 3, 4, 5, 6); +let mat3A = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); +let mat3B = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); +let mat4A = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); +let mat4B = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); +let quatA = quat.fromValues(1, 2, 3, 4); +let quatB = quat.fromValues(5, 6, 7, 8); + +let outVec2 = vec2.create(); +let outVec3 = vec3.create(); +let outVec4 = vec4.create(); +let outMat2 = mat2.create(); +let outMat2d = mat2d.create(); +let outMat3 = mat3.create(); +let outMat4 = mat4.create(); +let outQuat = quat.create(); + // vec2 -var vecA: GLM.IArray, vecB: GLM.IArray, matA: GLM.IArray; -var vecArray: GLM.IArray; - -vecA = [1, 2]; -vecB = new Float32Array([3, 4]); -out = [0, 0]; -matA = [1, 2, 3, 4, 5, 6]; -vecArray = [1, 2, 3, 4, 0, 0]; - -out = vec2.create(); -out = vec2.clone(vecA); -out = vec2.fromValues(1, 2); -out = vec2.copy(out, vecA); -out = vec2.set(out, 1, 2); -out = vec2.add(out, vecA, vecB); -out = vec2.subtract(out, vecA, vecB); -out = vec2.sub(out, vecA, vecB); -out = vec2.multiply(out, vecA, vecB); -out = vec2.mul(out, vecA, vecB); -out = vec2.divide(out, vecA, vecB); -out = vec2.div(out, vecA, vecB); -out = vec2.min(out, vecA, vecB); -out = vec2.max(out, vecA, vecB); -out = vec2.scale(out, vecA, 2); -out = vec2.scaleAndAdd(out, vecA, vecB, 0.5); -outVal = vec2.distance(vecA, vecB); -outVal = vec2.dist(vecA, vecB); -outVal = vec2.squaredDistance(vecA, vecB); -outVal = vec2.sqrDist(vecA, vecB); -outVal = vec2.length(vecA); -outVal = vec2.len(vecA); -outVal = vec2.squaredLength(vecA); -outVal = vec2.sqrLen(vecA); -out = vec2.negate(out, vecA); -out = vec2.inverse(out, vecA); -out = vec2.normalize(out, vecA); -outVal = vec2.dot(vecA, vecB); -out = vec2.cross(out, vecA, vecB); -out = vec2.lerp(out, vecA, vecB, 0.5); -out = vec2.random(out); -out = vec2.random(out, 5.0); -out = vec2.transformMat2(out, vecA, matA); -out = vec2.transformMat2d(out, vecA, matA); -out = vec2.transformMat3(out, vecA, matA); -out = vec2.transformMat4(out, vecA, matA); -out = vec2.forEach(vecArray, 0, 0, 0, vec2.normalize); -outStr = vec2.str(vecA); +outVec2 = vec2.create(); +outVec2 = vec2.clone(vec2A); +outVec2 = vec2.fromValues(1, 2); +outVec2 = vec2.copy(outVec2, vec2A); +outVec2 = vec2.set(outVec2, 1, 2); +outVec2 = vec2.add(outVec2, vec2A, vec2B); +outVec2 = vec2.subtract(outVec2, vec2A, vec2B); +outVec2 = vec2.sub(outVec2, vec2A, vec2B); +outVec2 = vec2.multiply(outVec2, vec2A, vec2B); +outVec2 = vec2.mul(outVec2, vec2A, vec2B); +outVec2 = vec2.divide(outVec2, vec2A, vec2B); +outVec2 = vec2.div(outVec2, vec2A, vec2B); +outVec2 = vec2.ceil(outVec2, vec2A); +outVec2 = vec2.floor(outVec2, vec2A); +outVec2 = vec2.min(outVec2, vec2A, vec2B); +outVec2 = vec2.max(outVec2, vec2A, vec2B); +outVec2 = vec2.round(outVec2, vec2A); +outVec2 = vec2.scale(outVec2, vec2A, 2); +outVec2 = vec2.scaleAndAdd(outVec2, vec2A, vec2B, 0.5); +outVal = vec2.distance(vec2A, vec2B); +outVal = vec2.dist(vec2A, vec2B); +outVal = vec2.squaredDistance(vec2A, vec2B); +outVal = vec2.sqrDist(vec2A, vec2B); +outVal = vec2.length(vec2A); +outVal = vec2.len(vec2A); +outVal = vec2.squaredLength(vec2A); +outVal = vec2.sqrLen(vec2A); +outVec2 = vec2.negate(outVec2, vec2A); +outVec2 = vec2.inverse(outVec2, vec2A); +outVec2 = vec2.normalize(outVec2, vec2A); +outVal = vec2.dot(vec2A, vec2B); +outVec2 = vec2.cross(outVec2, vec2A, vec2B); +outVec2 = vec2.lerp(outVec2, vec2A, vec2B, 0.5); +outVec2 = vec2.random(outVec2); +outVec2 = vec2.random(outVec2, 5.0); +outVec2 = vec2.transformMat2(outVec2, vec2A, mat2A); +outVec2 = vec2.transformMat2d(outVec2, vec2A, mat2dA); +outVec2 = vec2.transformMat3(outVec2, vec2A, mat3A); +outVec2 = vec2.transformMat4(outVec2, vec2A, mat4A); +vecArray = vec2.forEach(vecArray, 0, 0, 0, vec2.normalize); +outStr = vec2.str(vec2A); +outBool = vec2.exactEquals(vec2A, vec2B); +outBool = vec2.equals(vec2A, vec2B); +outVec2 = vec2.add(outVec2, [0, 1], [2, 3]); // test one method with number array input // vec3 -var matr: GLM.IArray; -var q: GLM.IArray; - -vecA = [1, 2, 3]; -vecB = new Float32Array([4, 5, 6]); -out = [0, 0, 0]; -vecArray = [1, 2, 3, 4, 5, 6, 0, 0, 0]; -matr = [1, 0, 0, 0, 1, 0, 0, 0, 1 ]; - -out = vec3.create(); -out = vec3.clone(vecA); -out = vec3.fromValues(1, 2, 3); -out = vec3.copy(out, vecA); -out = vec3.set(out, 1, 2, 3); -out = vec3.add(out, vecA, vecB); -out = vec3.subtract(out, vecA, vecB); -out = vec3.sub(out, vecA, vecB); -out = vec3.multiply(out, vecA, vecB); -out = vec3.mul(out, vecA, vecB); -out = vec3.divide(out, vecA, vecB); -out = vec3.div(out, vecA, vecB); -out = vec3.min(out, vecA, vecB); -out = vec3.max(out, vecA, vecB); -out = vec3.scale(out, vecA, 2); -out = vec3.scaleAndAdd(out, vecA, vecB, 0.5); -outVal = vec3.distance(vecA, vecB); -outVal = vec3.dist(vecA, vecB); -outVal = vec3.squaredDistance(vecA, vecB); -outVal = vec3.sqrDist(vecA, vecB); -outVal = vec3.length(vecA); -outVal = vec3.len(vecA); -outVal = vec3.squaredLength(vecA); -outVal = vec3.sqrLen(vecA); -out = vec3.negate(out, vecA); -out = vec3.inverse(out, vecA); -out = vec3.normalize(out, vecA); -outVal = vec3.dot(vecA, vecB); -out = vec3.cross(out, vecA, vecB); -out = vec3.lerp(out, vecA, vecB, 0.5); -out = vec3.random(out); -out = vec3.random(out, 5.0); -out = vec3.rotateX(out, vecA, vecB, Math.PI); -out = vec3.rotateY(out, vecA, vecB, Math.PI); -out = vec3.rotateZ(out, vecA, vecB, Math.PI); -out = vec3.transformMat3(out, vecA, matr); - -matr = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]; -out = vec3.transformMat4(out, vecA, matr); - -q = [1, 2, 3, 4]; -out = vec3.transformQuat(out, vecA, matr); - -out = vec3.forEach(vecArray, 0, 0, 0, vec3.normalize); -outVal = vec3.angle(vecA, vecB); -outStr = vec3.str(vecA); +outVec3 = vec3.create(); +outVec3 = vec3.clone(vec3A); +outVec3 = vec3.fromValues(1, 2, 3); +outVec3 = vec3.copy(outVec3, vec3A); +outVec3 = vec3.set(outVec3, 1, 2, 3); +outVec3 = vec3.add(outVec3, vec3A, vec3B); +outVec3 = vec3.subtract(outVec3, vec3A, vec3B); +outVec3 = vec3.sub(outVec3, vec3A, vec3B); +outVec3 = vec3.multiply(outVec3, vec3A, vec3B); +outVec3 = vec3.mul(outVec3, vec3A, vec3B); +outVec3 = vec3.divide(outVec3, vec3A, vec3B); +outVec3 = vec3.div(outVec3, vec3A, vec3B); +outVec3 = vec3.ceil(outVec3, vec3A); +outVec3 = vec3.floor(outVec3, vec3A); +outVec3 = vec3.min(outVec3, vec3A, vec3B); +outVec3 = vec3.max(outVec3, vec3A, vec3B); +outVec3 = vec3.round(outVec3, vec3A); +outVec3 = vec3.scale(outVec3, vec3A, 2); +outVec3 = vec3.scaleAndAdd(outVec3, vec3A, vec3B, 0.5); +outVal = vec3.distance(vec3A, vec3B); +outVal = vec3.dist(vec3A, vec3B); +outVal = vec3.squaredDistance(vec3A, vec3B); +outVal = vec3.sqrDist(vec3A, vec3B); +outVal = vec3.length(vec3A); +outVal = vec3.len(vec3A); +outVal = vec3.squaredLength(vec3A); +outVal = vec3.sqrLen(vec3A); +outVec3 = vec3.negate(outVec3, vec3A); +outVec3 = vec3.inverse(outVec3, vec3A); +outVec3 = vec3.normalize(outVec3, vec3A); +outVal = vec3.dot(vec3A, vec3B); +outVec3 = vec3.cross(outVec3, vec3A, vec3B); +outVec3 = vec3.lerp(outVec3, vec3A, vec3B, 0.5); +outVec3 = vec3.hermite(outVec3, vec3A, vec3B, vec3A, vec3B, 0.5); +outVec3 = vec3.bezier(outVec3, vec3A, vec3B, vec3A, vec3B, 0.5); +outVec3 = vec3.random(outVec3); +outVec3 = vec3.random(outVec3, 5.0); +outVec3 = vec3.transformMat3(outVec3, vec3A, mat3A); +outVec3 = vec3.transformMat4(outVec3, vec3A, mat4A); +outVec3 = vec3.transformQuat(outVec3, vec3A, quatA); +outVec3 = vec3.rotateX(outVec3, vec3A, vec3B, Math.PI); +outVec3 = vec3.rotateY(outVec3, vec3A, vec3B, Math.PI); +outVec3 = vec3.rotateZ(outVec3, vec3A, vec3B, Math.PI); +vecArray = vec3.forEach(vecArray, 0, 0, 0, vec3.normalize); +outVal = vec3.angle(vec3A, vec3B); +outStr = vec3.str(vec3A); +outBool = vec3.exactEquals(vec3A, vec3B); +outBool = vec3.equals(vec3A, vec3B); +outVec3 = vec3.add(outVec3, [0, 1, 2], [3, 4, 5]); // test one method with number array input // vec4 -var q: GLM.IArray; - -vecA = [1, 2, 3, 4]; -vecB = new Float32Array([5, 6, 7, 8]); -out = [0, 0, 0, 0]; -q = [1, 2, 3, 4]; - -out = vec4.create(); -out = vec4.clone(vecA); -out = vec4.fromValues(1, 2, 3, 4); -out = vec4.copy(out, vecA); -out = vec4.set(out, 1, 2, 3, 4); -out = vec4.add(out, vecA, vecB); -out = vec4.subtract(out, vecA, vecB); -out = vec4.sub(out, vecA, vecB); -out = vec4.multiply(out, vecA, vecB); -out = vec4.mul(out, vecA, vecB); -out = vec4.divide(out, vecA, vecB); -out = vec4.div(out, vecA, vecB); -out = vec4.min(out, vecA, vecB); -out = vec4.max(out, vecA, vecB); -out = vec4.scale(out, vecA, 2); -out = vec4.scaleAndAdd(out, vecA, vecB, 0.5); -outVal = vec4.distance(vecA, vecB); -outVal = vec4.dist(vecA, vecB); -outVal = vec4.squaredDistance(vecA, vecB); -outVal = vec4.sqrDist(vecA, vecB); -outVal = vec4.length(vecA); -outVal = vec4.len(vecA); -outVal = vec4.squaredLength(vecA); -outVal = vec4.sqrLen(vecA); -out = vec4.negate(out, vecA); -out = vec4.inverse(out, vecA); -out = vec4.normalize(out, vecA); -outVal = vec4.dot(vecA, vecB); -out = vec4.lerp(out, vecA, vecB, 0.5); -out = vec4.random(out); -out = vec4.random(out, 5.0); - -matr = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] -out = vec4.transformMat4(out, vecA, matr); -out = vec4.transformQuat(out, vecA, q); - -vecArray = [1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0]; -out = vec4.forEach(vecArray, 0, 0, 0, vec4.normalize); -outStr = vec4.str(vecA); +outVec4 = vec4.create(); +outVec4 = vec4.clone(vec4A); +outVec4 = vec4.fromValues(1, 2, 3, 4); +outVec4 = vec4.copy(outVec4, vec4A); +outVec4 = vec4.set(outVec4, 1, 2, 3, 4); +outVec4 = vec4.add(outVec4, vec4A, vec4B); +outVec4 = vec4.subtract(outVec4, vec4A, vec4B); +outVec4 = vec4.sub(outVec4, vec4A, vec4B); +outVec4 = vec4.multiply(outVec4, vec4A, vec4B); +outVec4 = vec4.mul(outVec4, vec4A, vec4B); +outVec4 = vec4.divide(outVec4, vec4A, vec4B); +outVec4 = vec4.div(outVec4, vec4A, vec4B); +outVec4 = vec4.ceil(outVec4, vec4A); +outVec4 = vec4.floor(outVec4, vec4A); +outVec4 = vec4.min(outVec4, vec4A, vec4B); +outVec4 = vec4.max(outVec4, vec4A, vec4B); +outVec4 = vec4.scale(outVec4, vec4A, 2); +outVec4 = vec4.scaleAndAdd(outVec4, vec4A, vec4B, 0.5); +outVal = vec4.distance(vec4A, vec4B); +outVal = vec4.dist(vec4A, vec4B); +outVal = vec4.squaredDistance(vec4A, vec4B); +outVal = vec4.sqrDist(vec4A, vec4B); +outVal = vec4.length(vec4A); +outVal = vec4.len(vec4A); +outVal = vec4.squaredLength(vec4A); +outVal = vec4.sqrLen(vec4A); +outVec4 = vec4.negate(outVec4, vec4A); +outVec4 = vec4.inverse(outVec4, vec4A); +outVec4 = vec4.normalize(outVec4, vec4A); +outVal = vec4.dot(vec4A, vec4B); +outVec4 = vec4.lerp(outVec4, vec4A, vec4B, 0.5); +outVec4 = vec4.random(outVec4); +outVec4 = vec4.random(outVec4, 5.0); +outVec4 = vec4.transformMat4(outVec4, vec4A, mat4A); +outVec4 = vec4.transformQuat(outVec4, vec4A, quatA); +vecArray = vec4.forEach(vecArray, 0, 0, 0, vec4.normalize); +outStr = vec4.str(vec4A); +outBool = vec4.exactEquals(vec4A, vec4B); +outBool = vec4.equals(vec4A, vec4B); +outVec4 = vec4.add(outVec4, [0, 1, 2, 3], [4, 5, 6, 7]); // test one method with number array input // mat2 -var matB: GLM.IArray, identity: GLM.IArray; - -matA = [1, 2, 3, 4]; -matB = new Float32Array([5, 6, 7, 8]); -out = [0, 0, 0, 0]; -identity = [1, 0, 0, 1]; - -out = mat2.create(); -out = mat2.clone(matA); -out = mat2.copy(out, matA); -out = mat2.identity(out); -out = mat2.transpose(out, matA); -out = mat2.invert(out, matA); -out = mat2.adjoint(out, matA); -outVal = mat2.determinant(matA); -out = mat2.multiply(out, matA, matB); -out = mat2.mul(out, matA, matB); -out = mat2.rotate(out, matA, Math.PI * 0.5); - -vecA = [2, 3]; -out = mat2.scale(out, matA, vecA); -outStr = mat2.str(matA); -outVal = mat2.frob(matA); - -var L = mat2.create(); -var D = mat2.create(); +outMat2 = mat2.create(); +outMat2 = mat2.clone(mat2A); +outMat2 = mat2.copy(outMat2, mat2A); +outMat2 = mat2.identity(outMat2); +outMat2 = mat2.fromValues(1, 2, 3, 4); +outMat2 = mat2.set(outMat2, 1, 2, 3, 4); +outMat2 = mat2.transpose(outMat2, mat2A); +outMat2 = mat2.invert(outMat2, mat2A); +outMat2 = mat2.adjoint(outMat2, mat2A); +outVal = mat2.determinant(mat2A); +outMat2 = mat2.multiply(outMat2, mat2A, mat2B); +outMat2 = mat2.mul(outMat2, mat2A, mat2B); +outMat2 = mat2.rotate(outMat2, mat2A, Math.PI * 0.5); +outMat2 = mat2.scale(outMat2, mat2A, vec2A); +outMat2 = mat2.fromRotation(outMat2, 0.5); +outMat2 = mat2.fromScaling(outMat2, vec2A); +outStr = mat2.str(mat2A); +outVal = mat2.frob(mat2A); +var L = mat2.create(); +var D = mat2.create(); var U = mat2.create(); -out = mat2.LDU(L, D, U, [4,3,6,3]); +outMat2 = mat2.LDU(L, D, U, mat2A); +outMat2 = mat2.add(outMat2, mat2A, mat2B); +outMat2 = mat2.subtract(outMat2, mat2A, mat2B); +outMat2 = mat2.sub(outMat2, mat2A, mat2B); +outBool = mat2.exactEquals(mat2A, mat2B); +outBool = mat2.equals(mat2A, mat2B); +outMat2 = mat2.multiplyScalar (outMat2, mat2A, 2); +outMat2 = mat2.multiplyScalarAndAdd (outMat2, mat2A, mat2B, 2); // mat2d -matA = [1, 2, 3, 4, 5, 6]; -matB = [7, 8, 9, 10, 11, 12]; -out = [0, 0, 0, 0, 0, 0]; -identity = [1, 0, 0, 1, 0, 0]; - -out = mat2d.create(); -out = mat2d.clone(matA); -out = mat2d.copy(out, matA); -out = mat2d.identity(out); -out = mat2d.invert(out, matA); -outVal = mat2d.determinant(matA); -out = mat2d.multiply(out, matA, matB); -out = mat2d.mul(out, matA, matB); -out = mat2d.rotate(out, matA, Math.PI * 0.5); - -vecA = [2, 3]; -out = mat2d.scale(out, matA, vecA); -out = mat2d.translate(out, matA, vecA); -outStr = mat2d.str(matA); -outVal = mat2d.frob(matA); +outMat2d = mat2d.create(); +outMat2d = mat2d.clone(mat2dA); +outMat2d = mat2d.copy(outMat2d, mat2dA); +outMat2d = mat2d.identity(outMat2d); +outMat2d = mat2d.fromValues(1, 2, 3, 4, 5, 6); +outMat2d = mat2d.set(outMat2d, 1, 2, 3, 4, 5, 6); +outMat2d = mat2d.invert(outMat2d, mat2dA); +outVal = mat2d.determinant(mat2dA); +outMat2d = mat2d.multiply(outMat2d, mat2dA, mat2dB); +outMat2d = mat2d.mul(outMat2d, mat2dA, mat2dB); +outMat2d = mat2d.rotate(outMat2d, mat2dA, Math.PI * 0.5); +outMat2d = mat2d.scale(outMat2d, mat2dA, vec2A); +outMat2d = mat2d.translate(outMat2d, mat2dA, vec2A); +outMat2d = mat2d.fromRotation(outMat2d, 0.5); +outMat2d = mat2d.fromScaling(outMat2d, vec2A); +outMat2d = mat2d.fromTranslation(outMat2d, vec2A); +outStr = mat2d.str(mat2dA); +outVal = mat2d.frob(mat2dA); +outMat2d = mat2d.add(outMat2d, mat2dA, mat2dB); +outMat2d = mat2d.subtract(outMat2d, mat2dA, mat2dB); +outMat2d = mat2d.sub(outMat2d, mat2dA, mat2dB); +outMat2d = mat2d.multiplyScalar (outMat2d, mat2dA, 2); +outMat2d = mat2d.multiplyScalarAndAdd (outMat2d, mat2dA, mat2dB, 2); +outBool = mat2d.exactEquals(mat2dA, mat2dB); +outBool = mat2d.equals(mat2dA, mat2dB); // mat3 -matA = [1, 0, 0, 0, 1, 0, 1, 2, 1]; -matB = [1, 0, 0, 0, 1, 0, 3, 4, 1]; -out = [0, 0, 0, 0, 0, 0, 0, 0, 0]; -identity = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - -out = mat3.create(); -out = mat3.clone(matA); -out = mat3.copy(out, matA); -out = mat3.identity(out); -out = mat3.transpose(out, matA); -out = mat3.invert(out, matA); -out = mat3.adjoint(out, matA); -outVal = mat3.determinant(matA); -out = mat3.multiply(out, matA, matB); -out = mat3.mul(out, matA, matB); -outStr = mat3.str(matA); -outVal = mat3.frob(matA); - -matA = [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; -out = mat3.normalFromMat4(out, matA); - -q = [ 0, -0.7071067811865475, 0, 0.7071067811865475 ]; -out = mat3.fromQuat(out, q); - -out = mat3.normalFromMat4(out, [ 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16]); -out = mat3.fromMat4(out, [ 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16]); -out = mat3.scale(out, matA, [2,2]); -out = mat3.fromMat2d(out, [1, 2, 3, 4, 5, 6]); - -out = mat3.translate(out, matA, [1, 2, 3]); -out = mat3.rotate(out, matA, Math.PI/2); - -// mat4 -matA = [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 1, 2, 3, 1]; - -matB = [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 4, 5, 6, 1]; - -out = [0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0]; - -identity = [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - -out = mat4.create(); -out = mat4.clone(matA); -out = mat4.copy(out, matA); -out = mat4.identity(out); -out = mat4.transpose(out, matA); -out = mat4.invert(out, matA); -out = mat4.adjoint(out, matA); -outVal = mat4.determinant(matA); -out = mat4.multiply(out, matA, matB); -out = mat4.mul(out, matA, matB); -out = mat4.translate(out, matA, [4, 5, 6]); -out = mat4.scale(out, matA, [4, 5, 6]); - -var rad = Math.PI * 0.5; -var axis = [1, 0, 0]; -out = mat4.rotate(out, matA, rad, axis); -out = mat4.rotateX(out, matA, rad); -out = mat4.rotateY(out, matA, rad); -out = mat4.rotateZ(out, matA, rad); - -out = mat4.frustum(out, -1, 1, -1, 1, -1, 1); - -var fovy = Math.PI * 0.5; -out = mat4.perspective(out, fovy, 1, 0, 1); -out = mat4.ortho(out, -1, 1, -1, 1, -1, 1); - -var eye = [0, 0, 1]; -var center = [0, 0, -1]; -var up = [0, 1, 0]; -out = mat4.lookAt(out, eye, center, up); - -outStr = mat4.str(matA); -outVal = mat4.frob(matA); - -q = [0, 0, 0, 1]; -out = mat4.fromRotationTranslation(out, q, [1, 2, 3]); -out = mat4.fromQuat(out, q); - -q = [0, 0, 0, 1]; -out = mat4.fromRotationTranslationScale(out, q, [1, 2, 3], [1, 2, 3]); -out = mat4.fromQuat(out, q); +outMat3 = mat3.create(); +outMat3 = mat3.fromMat4(outMat3, mat4A); +outMat3 = mat3.clone(mat3A); +outMat3 = mat3.copy(outMat3, mat3A); +outMat3 = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); +outMat3 = mat3.set(outMat3, 1, 2, 3, 4, 5, 6, 7, 8, 9); +outMat3 = mat3.identity(outMat3); +outMat3 = mat3.transpose(outMat3, mat3A); +outMat3 = mat3.invert(outMat3, mat3A); +outMat3 = mat3.adjoint(outMat3, mat3A); +outVal = mat3.determinant(mat3A); +outMat3 = mat3.multiply(outMat3, mat3A, mat3B); +outMat3 = mat3.mul(outMat3, mat3A, mat3B); +outMat3 = mat3.translate(outMat3, mat3A, vec3A); +outMat3 = mat3.rotate(outMat3, mat3A, Math.PI/2); +outMat3 = mat3.scale(outMat3, mat3A, vec2A); +outMat3 = mat3.fromTranslation(outMat3, vec2A); +outMat3 = mat3.fromRotation(outMat3, Math.PI); +outMat3 = mat3.fromScaling(outMat3, vec2A); +outMat3 = mat3.fromMat2d(outMat3, mat2dA); +outMat3 = mat3.fromQuat(outMat3, quatA); +outMat3 = mat3.normalFromMat4(outMat3, mat4A); +outStr = mat3.str(mat3A); +outVal = mat3.frob(mat3A); +outMat3 = mat3.add(outMat3, mat3A, mat3B); +outMat3 = mat3.subtract(outMat3, mat3A, mat3B); +outMat3 = mat3.sub(outMat3, mat3A, mat3B); +outMat3 = mat3.multiplyScalar (outMat3, mat3A, 2); +outMat3 = mat3.multiplyScalarAndAdd (outMat3, mat3A, mat3B, 2); +outBool = mat3.exactEquals(mat3A, mat3B); +outBool = mat3.equals(mat3A, mat3B); +//mat4 +outMat4 = mat4.create(); +outMat4 = mat4.clone(mat4A); +outMat4 = mat4.copy(outMat4, mat4A); +outMat4 = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); +outMat4 = mat4.set(outMat4, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); +outMat4 = mat4.identity(outMat4); +outMat4 = mat4.transpose(outMat4, mat4A); +outMat4 = mat4.invert(outMat4, mat4A); +outMat4 = mat4.adjoint(outMat4, mat4A); +outVal = mat4.determinant(mat4A); +outMat4 = mat4.multiply(outMat4, mat4A, mat4B); +outMat4 = mat4.mul(outMat4, mat4A, mat4B); +outMat4 = mat4.translate(outMat4, mat4A, vec3A); +outMat4 = mat4.scale(outMat4, mat4A, vec3A); +outMat4 = mat4.rotate(outMat4, mat4A, Math.PI, vec3A); +outMat4 = mat4.rotateX(outMat4, mat4A, Math.PI); +outMat4 = mat4.rotateY(outMat4, mat4A, Math.PI); +outMat4 = mat4.rotateZ(outMat4, mat4A, Math.PI); +outMat4 = mat4.fromTranslation(outMat4, vec3A); +outMat4 = mat4.fromRotation(outMat4, Math.PI, vec3A); +outMat4 = mat4.fromScaling(outMat4, vec3A); +outMat4 = mat4.fromXRotation(outMat4, Math.PI); +outMat4 = mat4.fromYRotation(outMat4, Math.PI); +outMat4 = mat4.fromZRotation(outMat4, Math.PI); +outMat4 = mat4.fromRotationTranslation(outMat4, quatA, vec3A); +outVec3 = mat4.getTranslation(outVec3, mat4A) +outQuat = mat4.getRotation(outQuat, mat4A) +outMat4 = mat4.fromRotationTranslationScale(outMat4, quatA, vec3A, vec3B); +outMat4 = mat4.fromRotationTranslationScaleOrigin(outMat4, quatA, vec3A, vec3B, vec3A); +outMat4 = mat4.fromQuat(outMat4, quatB); +outMat4 = mat4.frustum(outMat4, -1, 1, -1, 1, -1, 1); +outMat4 = mat4.perspective(outMat4, Math.PI, 1, 0, 1); +outMat4 = mat4.perspectiveFromFieldOfView(outMat4, {upDegrees:Math.PI, downDegrees:-Math.PI, leftDegrees:-Math.PI, rightDegrees:Math.PI}, 1, 0); +outMat4 = mat4.ortho(outMat4, -1, 1, -1, 1, -1, 1); +outMat4 = mat4.lookAt(outMat4, vec3A, vec3B, vec3A); +outStr = mat4.str(mat4A); +outVal = mat4.frob(mat4A); +outMat4 = mat4.add(outMat4, mat4A, mat4B); +outMat4 = mat4.subtract(outMat4, mat4A, mat4B); +outMat4 = mat4.sub(outMat4, mat4A, mat4B); +outMat4 = mat4.multiplyScalar (outMat4, mat4A, 2); +outMat4 = mat4.multiplyScalarAndAdd (outMat4, mat4A, mat4B, 2); +outBool = mat4.exactEquals(mat4A, mat4B); +outBool = mat4.equals(mat4A, mat4B); // quat -var quatA = [1, 2, 3, 4]; -var quatB = [5, 6, 7, 8]; -out = [0, 0, 0, 0]; -var vec = [1, 1, -1]; -var id = [0, 0, 0, 1]; var deg90 = Math.PI / 2; - -out = quat.create(); -out = quat.clone(quatA); -out = quat.fromValues(1, 2, 3, 4); -out = quat.copy(out, quatA); -out = quat.set(out, 1, 2, 3, 4); -out = quat.identity(out); -out = quat.setAxisAngle(out, [1, 0, 0], Math.PI * 0.5); -out = quat.add(out, quatA, quatB); -out = quat.multiply(out, quatA, quatB); -out = quat.mul(out, quatA, quatB); -out = quat.scale(out, quatA, 2); +outQuat = quat.create(); +outQuat = quat.clone(quatA); +outQuat = quat.fromValues(1, 2, 3, 4); +outQuat = quat.copy(outQuat, quatA); +outQuat = quat.set(outQuat, 1, 2, 3, 4); +outQuat = quat.identity(outQuat); +outQuat = quat.rotationTo(outQuat, vec3A, vec3B); +outQuat = quat.setAxes(outQuat, vec3A, vec3B, vec3A); +outQuat = quat.setAxisAngle(outQuat, vec3A, Math.PI * 0.5); +outVal = quat.getAxisAngle (outVec3, quatA); +outQuat = quat.add(outQuat, quatA, quatB); +outQuat = quat.multiply(outQuat, quatA, quatB); +outQuat = quat.mul(outQuat, quatA, quatB); +outQuat = quat.scale(outQuat, quatA, 2); outVal = quat.length(quatA); outVal = quat.len(quatA); outVal = quat.squaredLength(quatA); outVal = quat.sqrLen(quatA); -out = quat.normalize(out, quatA); -outVal = quat.dot(out, quatA, quatB); -out = quat.lerp(out, quatA, quatB, 0.5); -out = quat.slerp(out, quatA, quatB, 0.5); -out = quat.invert(out, quatA); -out = quat.conjugate(out, quatA); +outQuat = quat.normalize(outQuat, quatA); +outVal = quat.dot(quatA, quatB); +outQuat = quat.lerp(outQuat, quatA, quatB, 0.5); +outQuat = quat.slerp(outQuat, quatA, quatB, 0.5); +outQuat = quat.invert(outQuat, quatA); +outQuat = quat.conjugate(outQuat, quatA); outStr = quat.str(quatA); -out = quat.rotateX(out, id, deg90); -out = quat.rotateY(out, id, deg90); -out = quat.rotateZ(out, id, deg90); - -matr = [ 1, 0, 0, - 0, 0, -1, - 0, 1, 0 ]; -out = quat.fromMat3(out, matr); - -var view = [-1, 0, 0]; -up = [ 0, 1, 0]; -var right= [ 0, 0,-1]; -out = quat.setAxes([], view, right, up); - -out = quat.rotationTo(out, [0, 1, 0], [1, 0, 0]); -out = quat.calculateW(out, quatA); - +outQuat = quat.rotateX(outQuat, quatA, deg90); +outQuat = quat.rotateY(outQuat, quatA, deg90); +outQuat = quat.rotateZ(outQuat, quatA, deg90); +outQuat = quat.fromMat3(outQuat, mat3A); +outQuat = quat.calculateW(outQuat, quatA); +outBool = quat.exactEquals(quatA, quatB); +outBool = quat.equals(quatA, quatB); diff --git a/gl-matrix/gl-matrix-typed-tests.ts b/gl-matrix/gl-matrix-typed-tests.ts deleted file mode 100644 index 7364ec0a83..0000000000 --- a/gl-matrix/gl-matrix-typed-tests.ts +++ /dev/null @@ -1,346 +0,0 @@ -/// - -// common -import {vec2, mat2, mat3, mat4, vec3, vec4, glMatrix, mat2d, quat} from "./gl-matrix-typed"; -var result: number = glMatrix.toRadian(180); - -var outVal: number; -var outBool: boolean; -var outStr: string; - -let vecArray = new Float32Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); - -let vec2A = vec2.fromValues(1, 2); -let vec2B = vec2.fromValues(3, 4); -let vec3A = vec3.fromValues(1, 2, 3); -let vec3B = vec3.fromValues(3, 4, 5); -let vec4A = vec4.fromValues(1, 2, 3, 4); -let vec4B = vec4.fromValues(3, 4, 5, 6); -let mat2A = mat2.fromValues(1, 2, 3, 4); -let mat2B = mat2.fromValues(1, 2, 3, 4); -let mat2dA = mat2d.fromValues(1, 2, 3, 4, 5, 6); -let mat2dB = mat2d.fromValues(1, 2, 3, 4, 5, 6); -let mat3A = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); -let mat3B = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); -let mat4A = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); -let mat4B = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); -let quatA = quat.fromValues(1, 2, 3, 4); -let quatB = quat.fromValues(5, 6, 7, 8); - -let outVec2 = vec2.create(); -let outVec3 = vec3.create(); -let outVec4 = vec4.create(); -let outMat2 = mat2.create(); -let outMat2d = mat2d.create(); -let outMat3 = mat3.create(); -let outMat4 = mat4.create(); -let outQuat = quat.create(); - -// vec2 -outVec2 = vec2.create(); -outVec2 = vec2.clone(vec2A); -outVec2 = vec2.fromValues(1, 2); -outVec2 = vec2.copy(outVec2, vec2A); -outVec2 = vec2.set(outVec2, 1, 2); -outVec2 = vec2.add(outVec2, vec2A, vec2B); -outVec2 = vec2.subtract(outVec2, vec2A, vec2B); -outVec2 = vec2.sub(outVec2, vec2A, vec2B); -outVec2 = vec2.multiply(outVec2, vec2A, vec2B); -outVec2 = vec2.mul(outVec2, vec2A, vec2B); -outVec2 = vec2.divide(outVec2, vec2A, vec2B); -outVec2 = vec2.div(outVec2, vec2A, vec2B); -outVec2 = vec2.ceil(outVec2, vec2A); -outVec2 = vec2.floor(outVec2, vec2A); -outVec2 = vec2.min(outVec2, vec2A, vec2B); -outVec2 = vec2.max(outVec2, vec2A, vec2B); -outVec2 = vec2.round(outVec2, vec2A); -outVec2 = vec2.scale(outVec2, vec2A, 2); -outVec2 = vec2.scaleAndAdd(outVec2, vec2A, vec2B, 0.5); -outVal = vec2.distance(vec2A, vec2B); -outVal = vec2.dist(vec2A, vec2B); -outVal = vec2.squaredDistance(vec2A, vec2B); -outVal = vec2.sqrDist(vec2A, vec2B); -outVal = vec2.length(vec2A); -outVal = vec2.len(vec2A); -outVal = vec2.squaredLength(vec2A); -outVal = vec2.sqrLen(vec2A); -outVec2 = vec2.negate(outVec2, vec2A); -outVec2 = vec2.inverse(outVec2, vec2A); -outVec2 = vec2.normalize(outVec2, vec2A); -outVal = vec2.dot(vec2A, vec2B); -outVec2 = vec2.cross(outVec2, vec2A, vec2B); -outVec2 = vec2.lerp(outVec2, vec2A, vec2B, 0.5); -outVec2 = vec2.random(outVec2); -outVec2 = vec2.random(outVec2, 5.0); -outVec2 = vec2.transformMat2(outVec2, vec2A, mat2A); -outVec2 = vec2.transformMat2d(outVec2, vec2A, mat2dA); -outVec2 = vec2.transformMat3(outVec2, vec2A, mat3A); -outVec2 = vec2.transformMat4(outVec2, vec2A, mat4A); -vecArray = vec2.forEach(vecArray, 0, 0, 0, vec2.normalize); -outStr = vec2.str(vec2A); -outBool = vec2.exactEquals(vec2A, vec2B); -outBool = vec2.equals(vec2A, vec2B); - -// vec3 -outVec3 = vec3.create(); -outVec3 = vec3.clone(vec3A); -outVec3 = vec3.fromValues(1, 2, 3); -outVec3 = vec3.copy(outVec3, vec3A); -outVec3 = vec3.set(outVec3, 1, 2, 3); -outVec3 = vec3.add(outVec3, vec3A, vec3B); -outVec3 = vec3.subtract(outVec3, vec3A, vec3B); -outVec3 = vec3.sub(outVec3, vec3A, vec3B); -outVec3 = vec3.multiply(outVec3, vec3A, vec3B); -outVec3 = vec3.mul(outVec3, vec3A, vec3B); -outVec3 = vec3.divide(outVec3, vec3A, vec3B); -outVec3 = vec3.div(outVec3, vec3A, vec3B); -outVec3 = vec3.ceil(outVec3, vec3A); -outVec3 = vec3.floor(outVec3, vec3A); -outVec3 = vec3.min(outVec3, vec3A, vec3B); -outVec3 = vec3.max(outVec3, vec3A, vec3B); -outVec3 = vec3.round(outVec3, vec3A); -outVec3 = vec3.scale(outVec3, vec3A, 2); -outVec3 = vec3.scaleAndAdd(outVec3, vec3A, vec3B, 0.5); -outVal = vec3.distance(vec3A, vec3B); -outVal = vec3.dist(vec3A, vec3B); -outVal = vec3.squaredDistance(vec3A, vec3B); -outVal = vec3.sqrDist(vec3A, vec3B); -outVal = vec3.length(vec3A); -outVal = vec3.len(vec3A); -outVal = vec3.squaredLength(vec3A); -outVal = vec3.sqrLen(vec3A); -outVec3 = vec3.negate(outVec3, vec3A); -outVec3 = vec3.inverse(outVec3, vec3A); -outVec3 = vec3.normalize(outVec3, vec3A); -outVal = vec3.dot(vec3A, vec3B); -outVec3 = vec3.cross(outVec3, vec3A, vec3B); -outVec3 = vec3.lerp(outVec3, vec3A, vec3B, 0.5); -outVec3 = vec3.hermite(outVec3, vec3A, vec3B, vec3A, vec3B, 0.5); -outVec3 = vec3.bezier(outVec3, vec3A, vec3B, vec3A, vec3B, 0.5); -outVec3 = vec3.random(outVec3); -outVec3 = vec3.random(outVec3, 5.0); -outVec3 = vec3.transformMat3(outVec3, vec3A, mat3A); -outVec3 = vec3.transformMat4(outVec3, vec3A, mat4A); -outVec3 = vec3.transformQuat(outVec3, vec3A, quatA); -outVec3 = vec3.rotateX(outVec3, vec3A, vec3B, Math.PI); -outVec3 = vec3.rotateY(outVec3, vec3A, vec3B, Math.PI); -outVec3 = vec3.rotateZ(outVec3, vec3A, vec3B, Math.PI); -vecArray = vec3.forEach(vecArray, 0, 0, 0, vec3.normalize); -outVal = vec3.angle(vec3A, vec3B); -outStr = vec3.str(vec3A); -outBool = vec3.exactEquals(vec3A, vec3B); -outBool = vec3.equals(vec3A, vec3B); - -// vec4 -outVec4 = vec4.create(); -outVec4 = vec4.clone(vec4A); -outVec4 = vec4.fromValues(1, 2, 3, 4); -outVec4 = vec4.copy(outVec4, vec4A); -outVec4 = vec4.set(outVec4, 1, 2, 3, 4); -outVec4 = vec4.add(outVec4, vec4A, vec4B); -outVec4 = vec4.subtract(outVec4, vec4A, vec4B); -outVec4 = vec4.sub(outVec4, vec4A, vec4B); -outVec4 = vec4.multiply(outVec4, vec4A, vec4B); -outVec4 = vec4.mul(outVec4, vec4A, vec4B); -outVec4 = vec4.divide(outVec4, vec4A, vec4B); -outVec4 = vec4.div(outVec4, vec4A, vec4B); -outVec4 = vec4.ceil(outVec4, vec4A); -outVec4 = vec4.floor(outVec4, vec4A); -outVec4 = vec4.min(outVec4, vec4A, vec4B); -outVec4 = vec4.max(outVec4, vec4A, vec4B); -outVec4 = vec4.scale(outVec4, vec4A, 2); -outVec4 = vec4.scaleAndAdd(outVec4, vec4A, vec4B, 0.5); -outVal = vec4.distance(vec4A, vec4B); -outVal = vec4.dist(vec4A, vec4B); -outVal = vec4.squaredDistance(vec4A, vec4B); -outVal = vec4.sqrDist(vec4A, vec4B); -outVal = vec4.length(vec4A); -outVal = vec4.len(vec4A); -outVal = vec4.squaredLength(vec4A); -outVal = vec4.sqrLen(vec4A); -outVec4 = vec4.negate(outVec4, vec4A); -outVec4 = vec4.inverse(outVec4, vec4A); -outVec4 = vec4.normalize(outVec4, vec4A); -outVal = vec4.dot(vec4A, vec4B); -outVec4 = vec4.lerp(outVec4, vec4A, vec4B, 0.5); -outVec4 = vec4.random(outVec4); -outVec4 = vec4.random(outVec4, 5.0); -outVec4 = vec4.transformMat4(outVec4, vec4A, mat4A); -outVec4 = vec4.transformQuat(outVec4, vec4A, quatA); -vecArray = vec4.forEach(vecArray, 0, 0, 0, vec4.normalize); -outStr = vec4.str(vec4A); -outBool = vec4.exactEquals(vec4A, vec4B); -outBool = vec4.equals(vec4A, vec4B); - -// mat2 -outMat2 = mat2.create(); -outMat2 = mat2.clone(mat2A); -outMat2 = mat2.copy(outMat2, mat2A); -outMat2 = mat2.identity(outMat2); -outMat2 = mat2.fromValues(1, 2, 3, 4); -outMat2 = mat2.set(outMat2, 1, 2, 3, 4); -outMat2 = mat2.transpose(outMat2, mat2A); -outMat2 = mat2.invert(outMat2, mat2A); -outMat2 = mat2.adjoint(outMat2, mat2A); -outVal = mat2.determinant(mat2A); -outMat2 = mat2.multiply(outMat2, mat2A, mat2B); -outMat2 = mat2.mul(outMat2, mat2A, mat2B); -outMat2 = mat2.rotate(outMat2, mat2A, Math.PI * 0.5); -outMat2 = mat2.scale(outMat2, mat2A, vec2A); -outMat2 = mat2.fromRotation(outMat2, 0.5); -outMat2 = mat2.fromScaling(outMat2, vec2A); -outStr = mat2.str(mat2A); -outVal = mat2.frob(mat2A); -var L = mat2.create(); -var D = mat2.create(); -var U = mat2.create(); -outMat2 = mat2.LDU(L, D, U, mat2A); -outMat2 = mat2.add(outMat2, mat2A, mat2B); -outMat2 = mat2.subtract(outMat2, mat2A, mat2B); -outMat2 = mat2.sub(outMat2, mat2A, mat2B); -outBool = mat2.exactEquals(mat2A, mat2B); -outBool = mat2.equals(mat2A, mat2B); -outMat2 = mat2.multiplyScalar (outMat2, mat2A, 2); -outMat2 = mat2.multiplyScalarAndAdd (outMat2, mat2A, mat2B, 2); - -// mat2d -outMat2d = mat2d.create(); -outMat2d = mat2d.clone(mat2dA); -outMat2d = mat2d.copy(outMat2d, mat2dA); -outMat2d = mat2d.identity(outMat2d); -outMat2d = mat2d.fromValues(1, 2, 3, 4, 5, 6); -outMat2d = mat2d.set(outMat2d, 1, 2, 3, 4, 5, 6); -outMat2d = mat2d.invert(outMat2d, mat2dA); -outVal = mat2d.determinant(mat2dA); -outMat2d = mat2d.multiply(outMat2d, mat2dA, mat2dB); -outMat2d = mat2d.mul(outMat2d, mat2dA, mat2dB); -outMat2d = mat2d.rotate(outMat2d, mat2dA, Math.PI * 0.5); -outMat2d = mat2d.scale(outMat2d, mat2dA, vec2A); -outMat2d = mat2d.translate(outMat2d, mat2dA, vec2A); -outMat2d = mat2d.fromRotation(outMat2d, 0.5); -outMat2d = mat2d.fromScaling(outMat2d, vec2A); -outMat2d = mat2d.fromTranslation(outMat2d, vec2A); -outStr = mat2d.str(mat2dA); -outVal = mat2d.frob(mat2dA); -outMat2d = mat2d.add(outMat2d, mat2dA, mat2dB); -outMat2d = mat2d.subtract(outMat2d, mat2dA, mat2dB); -outMat2d = mat2d.sub(outMat2d, mat2dA, mat2dB); -outMat2d = mat2d.multiplyScalar (outMat2d, mat2dA, 2); -outMat2d = mat2d.multiplyScalarAndAdd (outMat2d, mat2dA, mat2dB, 2); -outBool = mat2d.exactEquals(mat2dA, mat2dB); -outBool = mat2d.equals(mat2dA, mat2dB); - - -// mat3 -outMat3 = mat3.create(); -outMat3 = mat3.fromMat4(outMat3, mat4A); -outMat3 = mat3.clone(mat3A); -outMat3 = mat3.copy(outMat3, mat3A); -outMat3 = mat3.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9); -outMat3 = mat3.set(outMat3, 1, 2, 3, 4, 5, 6, 7, 8, 9); -outMat3 = mat3.identity(outMat3); -outMat3 = mat3.transpose(outMat3, mat3A); -outMat3 = mat3.invert(outMat3, mat3A); -outMat3 = mat3.adjoint(outMat3, mat3A); -outVal = mat3.determinant(mat3A); -outMat3 = mat3.multiply(outMat3, mat3A, mat3B); -outMat3 = mat3.mul(outMat3, mat3A, mat3B); -outMat3 = mat3.translate(outMat3, mat3A, vec3A); -outMat3 = mat3.rotate(outMat3, mat3A, Math.PI/2); -outMat3 = mat3.scale(outMat3, mat3A, vec2A); -outMat3 = mat3.fromTranslation(outMat3, vec2A); -outMat3 = mat3.fromRotation(outMat3, Math.PI); -outMat3 = mat3.fromScaling(outMat3, vec2A); -outMat3 = mat3.fromMat2d(outMat3, mat2dA); -outMat3 = mat3.fromQuat(outMat3, quatA); -outMat3 = mat3.normalFromMat4(outMat3, mat4A); -outStr = mat3.str(mat3A); -outVal = mat3.frob(mat3A); -outMat3 = mat3.add(outMat3, mat3A, mat3B); -outMat3 = mat3.subtract(outMat3, mat3A, mat3B); -outMat3 = mat3.sub(outMat3, mat3A, mat3B); -outMat3 = mat3.multiplyScalar (outMat3, mat3A, 2); -outMat3 = mat3.multiplyScalarAndAdd (outMat3, mat3A, mat3B, 2); -outBool = mat3.exactEquals(mat3A, mat3B); -outBool = mat3.equals(mat3A, mat3B); - -//mat4 -outMat4 = mat4.create(); -outMat4 = mat4.clone(mat4A); -outMat4 = mat4.copy(outMat4, mat4A); -outMat4 = mat4.fromValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); -outMat4 = mat4.set(outMat4, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); -outMat4 = mat4.identity(outMat4); -outMat4 = mat4.transpose(outMat4, mat4A); -outMat4 = mat4.invert(outMat4, mat4A); -outMat4 = mat4.adjoint(outMat4, mat4A); -outVal = mat4.determinant(mat4A); -outMat4 = mat4.multiply(outMat4, mat4A, mat4B); -outMat4 = mat4.mul(outMat4, mat4A, mat4B); -outMat4 = mat4.translate(outMat4, mat4A, vec3A); -outMat4 = mat4.scale(outMat4, mat4A, vec3A); -outMat4 = mat4.rotate(outMat4, mat4A, Math.PI, vec3A); -outMat4 = mat4.rotateX(outMat4, mat4A, Math.PI); -outMat4 = mat4.rotateY(outMat4, mat4A, Math.PI); -outMat4 = mat4.rotateZ(outMat4, mat4A, Math.PI); -outMat4 = mat4.fromTranslation(outMat4, vec3A); -outMat4 = mat4.fromRotation(outMat4, Math.PI, vec3A); -outMat4 = mat4.fromScaling(outMat4, vec3A); -outMat4 = mat4.fromXRotation(outMat4, Math.PI); -outMat4 = mat4.fromYRotation(outMat4, Math.PI); -outMat4 = mat4.fromZRotation(outMat4, Math.PI); -outMat4 = mat4.fromRotationTranslation(outMat4, quatA, vec3A); -outVec3 = mat4.getTranslation(outVec3, mat4A) -outQuat = mat4.getRotation(outQuat, mat4A) -outMat4 = mat4.fromRotationTranslationScale(outMat4, quatA, vec3A, vec3B); -outMat4 = mat4.fromRotationTranslationScaleOrigin(outMat4, quatA, vec3A, vec3B, vec3A); -outMat4 = mat4.fromQuat(outMat4, quatB); -outMat4 = mat4.frustum(outMat4, -1, 1, -1, 1, -1, 1); -outMat4 = mat4.perspective(outMat4, Math.PI, 1, 0, 1); -outMat4 = mat4.perspectiveFromFieldOfView(outMat4, {upDegrees:Math.PI, downDegrees:-Math.PI, leftDegrees:-Math.PI, rightDegrees:Math.PI}, 1, 0); -outMat4 = mat4.ortho(outMat4, -1, 1, -1, 1, -1, 1); -outMat4 = mat4.lookAt(outMat4, vec3A, vec3B, vec3A); -outStr = mat4.str(mat4A); -outVal = mat4.frob(mat4A); -outMat4 = mat4.add(outMat4, mat4A, mat4B); -outMat4 = mat4.subtract(outMat4, mat4A, mat4B); -outMat4 = mat4.sub(outMat4, mat4A, mat4B); -outMat4 = mat4.multiplyScalar (outMat4, mat4A, 2); -outMat4 = mat4.multiplyScalarAndAdd (outMat4, mat4A, mat4B, 2); -outBool = mat4.exactEquals(mat4A, mat4B); -outBool = mat4.equals(mat4A, mat4B); - -// quat -var deg90 = Math.PI / 2; -outQuat = quat.create(); -outQuat = quat.clone(quatA); -outQuat = quat.fromValues(1, 2, 3, 4); -outQuat = quat.copy(outQuat, quatA); -outQuat = quat.set(outQuat, 1, 2, 3, 4); -outQuat = quat.identity(outQuat); -outQuat = quat.rotationTo(outQuat, vec3A, vec3B); -outQuat = quat.setAxes(outQuat, vec3A, vec3B, vec3A); -outQuat = quat.setAxisAngle(outQuat, vec3A, Math.PI * 0.5); -outVal = quat.getAxisAngle (outVec3, quatA); -outQuat = quat.add(outQuat, quatA, quatB); -outQuat = quat.multiply(outQuat, quatA, quatB); -outQuat = quat.mul(outQuat, quatA, quatB); -outQuat = quat.scale(outQuat, quatA, 2); -outVal = quat.length(quatA); -outVal = quat.len(quatA); -outVal = quat.squaredLength(quatA); -outVal = quat.sqrLen(quatA); -outQuat = quat.normalize(outQuat, quatA); -outVal = quat.dot(quatA, quatB); -outQuat = quat.lerp(outQuat, quatA, quatB, 0.5); -outQuat = quat.slerp(outQuat, quatA, quatB, 0.5); -outQuat = quat.invert(outQuat, quatA); -outQuat = quat.conjugate(outQuat, quatA); -outStr = quat.str(quatA); -outQuat = quat.rotateX(outQuat, quatA, deg90); -outQuat = quat.rotateY(outQuat, quatA, deg90); -outQuat = quat.rotateZ(outQuat, quatA, deg90); -outQuat = quat.fromMat3(outQuat, mat3A); -outQuat = quat.calculateW(outQuat, quatA); -outBool = quat.exactEquals(quatA, quatB); -outBool = quat.equals(quatA, quatB); \ No newline at end of file diff --git a/gl-matrix/gl-matrix-typed.d.ts b/gl-matrix/gl-matrix-typed.d.ts deleted file mode 100644 index e172074fec..0000000000 --- a/gl-matrix/gl-matrix-typed.d.ts +++ /dev/null @@ -1,3054 +0,0 @@ -// Type definitions for gl-matrix 2.2.2 -// Project: https://github.com/toji/gl-matrix -// Definitions by: Mattijs Kneppers , based on definitions by Tat -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Common -export class glMatrix { - /** - * Convert Degree To Radian - * - * @param a Angle in Degrees - */ - public static toRadian(a: number): number; -} - -// vec2 -export class vec2 extends Float32Array { - private typeVec2:number; - - /** - * Creates a new, empty vec2 - * - * @returns a new 2D vector - */ - public static create(): vec2; - - /** - * Creates a new vec2 initialized with values from an existing vector - * - * @param a a vector to clone - * @returns a new 2D vector - */ - public static clone(a: vec2): vec2; - - /** - * Creates a new vec2 initialized with the given values - * - * @param x X component - * @param y Y component - * @returns a new 2D vector - */ - public static fromValues(x: number, y: number): vec2; - - /** - * Copy the values from one vec2 to another - * - * @param out the receiving vector - * @param a the source vector - * @returns out - */ - public static copy(out: vec2, a: vec2): vec2; - - /** - * Set the components of a vec2 to the given values - * - * @param out the receiving vector - * @param x X component - * @param y Y component - * @returns out - */ - public static set(out: vec2, x: number, y: number): vec2; - - /** - * Adds two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static add(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Subtracts vector b from vector a - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static subtract(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Subtracts vector b from vector a - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static sub(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Multiplies two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Multiplies two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Divides two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static divide(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Divides two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static div(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Math.ceil the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to ceil - * @returns {vec2} out - */ - public static ceil(out:vec2, a:vec2):vec2; - - /** - * Math.floor the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to floor - * @returns {vec2} out - */ - public static floor (out:vec2, a:vec2):vec2; - - /** - * Returns the minimum of two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static min(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Returns the maximum of two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static max(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Math.round the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to round - * @returns {vec2} out - */ - public static round(out:vec2, a:vec2):vec2; - - - /** - * Scales a vec2 by a scalar number - * - * @param out the receiving vector - * @param a the vector to scale - * @param b amount to scale the vector by - * @returns out - */ - public static scale(out: vec2, a: vec2, b: number): vec2; - - /** - * Adds two vec2's after scaling the second operand by a scalar value - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @param scale the amount to scale b by before adding - * @returns out - */ - public static scaleAndAdd(out: vec2, a: vec2, b: vec2, scale: number): vec2; - - /** - * Calculates the euclidian distance between two vec2's - * - * @param a the first operand - * @param b the second operand - * @returns distance between a and b - */ - public static distance(a: vec2, b: vec2): number; - - /** - * Calculates the euclidian distance between two vec2's - * - * @param a the first operand - * @param b the second operand - * @returns distance between a and b - */ - public static dist(a: vec2, b: vec2): number; - - /** - * Calculates the squared euclidian distance between two vec2's - * - * @param a the first operand - * @param b the second operand - * @returns squared distance between a and b - */ - public static squaredDistance(a: vec2, b: vec2): number; - - /** - * Calculates the squared euclidian distance between two vec2's - * - * @param a the first operand - * @param b the second operand - * @returns squared distance between a and b - */ - public static sqrDist(a: vec2, b: vec2): number; - - /** - * Calculates the length of a vec2 - * - * @param a vector to calculate length of - * @returns length of a - */ - public static length(a: vec2): number; - - /** - * Calculates the length of a vec2 - * - * @param a vector to calculate length of - * @returns length of a - */ - public static len(a: vec2): number; - - /** - * Calculates the squared length of a vec2 - * - * @param a vector to calculate squared length of - * @returns squared length of a - */ - public static squaredLength(a: vec2): number; - - /** - * Calculates the squared length of a vec2 - * - * @param a vector to calculate squared length of - * @returns squared length of a - */ - public static sqrLen(a: vec2): number; - - /** - * Negates the components of a vec2 - * - * @param out the receiving vector - * @param a vector to negate - * @returns out - */ - public static negate(out: vec2, a: vec2): vec2; - - /** - * Returns the inverse of the components of a vec2 - * - * @param out the receiving vector - * @param a vector to invert - * @returns out - */ - public static inverse(out: vec2, a: vec2): vec2; - - /** - * Normalize a vec2 - * - * @param out the receiving vector - * @param a vector to normalize - * @returns out - */ - public static normalize(out: vec2, a: vec2): vec2; - - /** - * Calculates the dot product of two vec2's - * - * @param a the first operand - * @param b the second operand - * @returns dot product of a and b - */ - public static dot(a: vec2, b: vec2): number; - - /** - * Computes the cross product of two vec2's - * Note that the cross product must by definition produce a 3D vector - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static cross(out: vec2, a: vec2, b: vec2): vec2; - - /** - * Performs a linear interpolation between two vec2's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @param t interpolation amount between the two inputs - * @returns out - */ - public static lerp(out: vec2, a: vec2, b: vec2, t: number): vec2; - - /** - * Generates a random unit vector - * - * @param out the receiving vector - * @returns out - */ - public static random(out: vec2): vec2; - - /** - * Generates a random vector with the given scale - * - * @param out the receiving vector - * @param scale Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns out - */ - public static random(out: vec2, scale: number): vec2; - - /** - * Transforms the vec2 with a mat2 - * - * @param out the receiving vector - * @param a the vector to transform - * @param m matrix to transform with - * @returns out - */ - public static transformMat2(out: vec2, a: vec2, m: mat2): vec2; - - /** - * Transforms the vec2 with a mat2d - * - * @param out the receiving vector - * @param a the vector to transform - * @param m matrix to transform with - * @returns out - */ - public static transformMat2d(out: vec2, a: vec2, m: mat2d): vec2; - - /** - * Transforms the vec2 with a mat3 - * 3rd vector component is implicitly '1' - * - * @param out the receiving vector - * @param a the vector to transform - * @param m matrix to transform with - * @returns out - */ - public static transformMat3(out: vec2, a: vec2, m: mat3): vec2; - - /** - * Transforms the vec2 with a mat4 - * 3rd vector component is implicitly '0' - * 4th vector component is implicitly '1' - * - * @param out the receiving vector - * @param a the vector to transform - * @param m matrix to transform with - * @returns out - */ - public static transformMat4(out: vec2, a: vec2, m: mat4): vec2; - - /** - * Perform some operation over an array of vec2s. - * - * @param a the array of vectors to iterate over - * @param stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param offset Number of elements to skip at the beginning of the array - * @param count Number of vec2s to iterate over. If 0 iterates over entire array - * @param fn Function to call for each vector in the array - * @param arg additional argument to pass to fn - * @returns a - */ - public static forEach(a: Float32Array, stride: number, offset: number, count: number, - fn: (a: vec2, b: vec2, arg: any) => void, arg: any): Float32Array; - - /** - * Perform some operation over an array of vec2s. - * - * @param a the array of vectors to iterate over - * @param stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param offset Number of elements to skip at the beginning of the array - * @param count Number of vec2s to iterate over. If 0 iterates over entire array - * @param fn Function to call for each vector in the array - * @returns a - */ - public static forEach(a: Float32Array, stride: number, offset: number, count: number, - fn: (a: vec2, b: vec2) => void): Float32Array; - - /** - * Returns a string representation of a vector - * - * @param a vector to represent as a string - * @returns string representation of the vector - */ - public static str(a: vec2): string; - - /** - * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) - * - * @param {vec2} a The first vector. - * @param {vec2} b The second vector. - * @returns {boolean} True if the vectors are equal, false otherwise. - */ - public static exactEquals (a:vec2, b:vec2): boolean; - - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {vec2} a The first vector. - * @param {vec2} b The second vector. - * @returns {boolean} True if the vectors are equal, false otherwise. - */ - public static equals (a:vec2, b:vec2) : boolean; -} - -// vec3 -export class vec3 extends Float32Array { - private typeVec3:number; - - /** - * Creates a new, empty vec3 - * - * @returns a new 3D vector - */ - public static create(): vec3; - - /** - * Creates a new vec3 initialized with values from an existing vector - * - * @param a vector to clone - * @returns a new 3D vector - */ - public static clone(a: vec3): vec3; - - /** - * Creates a new vec3 initialized with the given values - * - * @param x X component - * @param y Y component - * @param z Z component - * @returns a new 3D vector - */ - public static fromValues(x: number, y: number, z: number): vec3; - - /** - * Copy the values from one vec3 to another - * - * @param out the receiving vector - * @param a the source vector - * @returns out - */ - public static copy(out: vec3, a: vec3): vec3; - - /** - * Set the components of a vec3 to the given values - * - * @param out the receiving vector - * @param x X component - * @param y Y component - * @param z Z component - * @returns out - */ - public static set(out: vec3, x: number, y: number, z: number): vec3; - - /** - * Adds two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static add(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Subtracts vector b from vector a - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static subtract(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Subtracts vector b from vector a - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static sub(out: vec3, a: vec3, b: vec3): vec3 - - /** - * Multiplies two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Multiplies two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Divides two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static divide(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Divides two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static div(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Math.ceil the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to ceil - * @returns {vec3} out - */ - public static ceil (out:vec3, a:vec3) : vec3; - - /** - * Math.floor the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to floor - * @returns {vec3} out - */ - public static floor (out:vec3, a:vec3) :vec3; - - /** - * Returns the minimum of two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static min(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Returns the maximum of two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static max(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Math.round the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to round - * @returns {vec3} out - */ - public static round (out:vec3, a:vec3) : vec3 - - /** - * Scales a vec3 by a scalar number - * - * @param out the receiving vector - * @param a the vector to scale - * @param b amount to scale the vector by - * @returns out - */ - public static scale(out: vec3, a: vec3, b: number): vec3; - - /** - * Adds two vec3's after scaling the second operand by a scalar value - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @param scale the amount to scale b by before adding - * @returns out - */ - public static scaleAndAdd(out: vec3, a: vec3, b: vec3, scale: number): vec3; - - /** - * Calculates the euclidian distance between two vec3's - * - * @param a the first operand - * @param b the second operand - * @returns distance between a and b - */ - public static distance(a: vec3, b: vec3): number; - - /** - * Calculates the euclidian distance between two vec3's - * - * @param a the first operand - * @param b the second operand - * @returns distance between a and b - */ - public static dist(a: vec3, b: vec3): number; - - /** - * Calculates the squared euclidian distance between two vec3's - * - * @param a the first operand - * @param b the second operand - * @returns squared distance between a and b - */ - public static squaredDistance(a: vec3, b: vec3): number; - - /** - * Calculates the squared euclidian distance between two vec3's - * - * @param a the first operand - * @param b the second operand - * @returns squared distance between a and b - */ - public static sqrDist(a: vec3, b: vec3): number; - - /** - * Calculates the length of a vec3 - * - * @param a vector to calculate length of - * @returns length of a - */ - public static length(a: vec3): number; - - /** - * Calculates the length of a vec3 - * - * @param a vector to calculate length of - * @returns length of a - */ - public static len(a: vec3): number; - - /** - * Calculates the squared length of a vec3 - * - * @param a vector to calculate squared length of - * @returns squared length of a - */ - public static squaredLength(a: vec3): number; - - /** - * Calculates the squared length of a vec3 - * - * @param a vector to calculate squared length of - * @returns squared length of a - */ - public static sqrLen(a: vec3): number; - - /** - * Negates the components of a vec3 - * - * @param out the receiving vector - * @param a vector to negate - * @returns out - */ - public static negate(out: vec3, a: vec3): vec3; - - /** - * Returns the inverse of the components of a vec3 - * - * @param out the receiving vector - * @param a vector to invert - * @returns out - */ - public static inverse(out: vec3, a: vec3): vec3; - - /** - * Normalize a vec3 - * - * @param out the receiving vector - * @param a vector to normalize - * @returns out - */ - public static normalize(out: vec3, a: vec3): vec3; - - /** - * Calculates the dot product of two vec3's - * - * @param a the first operand - * @param b the second operand - * @returns dot product of a and b - */ - public static dot(a: vec3, b: vec3): number; - - /** - * Computes the cross product of two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static cross(out: vec3, a: vec3, b: vec3): vec3; - - /** - * Performs a linear interpolation between two vec3's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @param t interpolation amount between the two inputs - * @returns out - */ - public static lerp(out: vec3, a: vec3, b: vec3, t: number): vec3; - - /** - * Performs a hermite interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {vec3} c the third operand - * @param {vec3} d the fourth operand - * @param {number} t interpolation amount between the two inputs - * @returns {vec3} out - */ - public static hermite (out:vec3, a:vec3, b:vec3, c:vec3, d:vec3, t:number) : vec3; - - /** - * Performs a bezier interpolation with two control points - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {vec3} c the third operand - * @param {vec3} d the fourth operand - * @param {number} t interpolation amount between the two inputs - * @returns {vec3} out - */ - public static bezier (out:vec3, a:vec3, b:vec3, c:vec3, d:vec3, t:number) :vec3; - - /** - * Generates a random unit vector - * - * @param out the receiving vector - * @returns out - */ - public static random(out: vec3): vec3; - - /** - * Generates a random vector with the given scale - * - * @param out the receiving vector - * @param [scale] Length of the resulting vector. If omitted, a unit vector will be returned - * @returns out - */ - public static random(out: vec3, scale: number): vec3; - - /** - * Transforms the vec3 with a mat3. - * - * @param out the receiving vector - * @param a the vector to transform - * @param m the 3x3 matrix to transform with - * @returns out - */ - public static transformMat3(out: vec3, a: vec3, m: mat3): vec3; - - /** - * Transforms the vec3 with a mat4. - * 4th vector component is implicitly '1' - * - * @param out the receiving vector - * @param a the vector to transform - * @param m matrix to transform with - * @returns out - */ - public static transformMat4(out: vec3, a: vec3, m: mat4): vec3; - - /** - * Transforms the vec3 with a quat - * - * @param out the receiving vector - * @param a the vector to transform - * @param q quaternion to transform with - * @returns out - */ - public static transformQuat(out: vec3, a: vec3, q: quat): vec3; - - - /** - * Rotate a 3D vector around the x-axis - * @param out The receiving vec3 - * @param a The vec3 point to rotate - * @param b The origin of the rotation - * @param c The angle of rotation - * @returns out - */ - public static rotateX(out: vec3, a: vec3, b: vec3, c: number): vec3; - - /** - * Rotate a 3D vector around the y-axis - * @param out The receiving vec3 - * @param a The vec3 point to rotate - * @param b The origin of the rotation - * @param c The angle of rotation - * @returns out - */ - public static rotateY(out: vec3, a: vec3, b: vec3, c: number): vec3; - - /** - * Rotate a 3D vector around the z-axis - * @param out The receiving vec3 - * @param a The vec3 point to rotate - * @param b The origin of the rotation - * @param c The angle of rotation - * @returns out - */ - public static rotateZ(out: vec3, a: vec3, b: vec3, c: number): vec3; - - /** - * Perform some operation over an array of vec3s. - * - * @param a the array of vectors to iterate over - * @param stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param offset Number of elements to skip at the beginning of the array - * @param count Number of vec3s to iterate over. If 0 iterates over entire array - * @param fn Function to call for each vector in the array - * @param arg additional argument to pass to fn - * @returns a - * @function - */ - public static forEach(a: Float32Array, stride: number, offset: number, count: number, - fn: (a: vec3, b: vec3, arg: any) => void, arg: any): Float32Array; - - /** - * Perform some operation over an array of vec3s. - * - * @param a the array of vectors to iterate over - * @param stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param offset Number of elements to skip at the beginning of the array - * @param count Number of vec3s to iterate over. If 0 iterates over entire array - * @param fn Function to call for each vector in the array - * @returns a - * @function - */ - public static forEach(a: Float32Array, stride: number, offset: number, count: number, - fn: (a: vec3, b: vec3) => void): Float32Array; - - /** - * Get the angle between two 3D vectors - * @param a The first operand - * @param b The second operand - * @returns The angle in radians - */ - public static angle(a: vec3, b: vec3): number; - - /** - * Returns a string representation of a vector - * - * @param a vector to represent as a string - * @returns string representation of the vector - */ - public static str(a: vec3): string; - - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {vec3} a The first vector. - * @param {vec3} b The second vector. - * @returns {boolean} True if the vectors are equal, false otherwise. - */ - public static exactEquals (a:vec3, b:vec3): boolean - - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {vec3} a The first vector. - * @param {vec3} b The second vector. - * @returns {boolean} True if the vectors are equal, false otherwise. - */ - public static equals (a:vec3, b:vec3) : boolean -} - -// vec4 -export class vec4 extends Float32Array { - private typeVec3:number; - - /** - * Creates a new, empty vec4 - * - * @returns a new 4D vector - */ - public static create(): vec4; - - /** - * Creates a new vec4 initialized with values from an existing vector - * - * @param a vector to clone - * @returns a new 4D vector - */ - public static clone(a: vec4): vec4; - - /** - * Creates a new vec4 initialized with the given values - * - * @param x X component - * @param y Y component - * @param z Z component - * @param w W component - * @returns a new 4D vector - */ - public static fromValues(x: number, y: number, z: number, w: number): vec4; - - /** - * Copy the values from one vec4 to another - * - * @param out the receiving vector - * @param a the source vector - * @returns out - */ - public static copy(out: vec4, a: vec4): vec4; - - /** - * Set the components of a vec4 to the given values - * - * @param out the receiving vector - * @param x X component - * @param y Y component - * @param z Z component - * @param w W component - * @returns out - */ - public static set(out: vec4, x: number, y: number, z: number, w: number): vec4; - - /** - * Adds two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static add(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Subtracts vector b from vector a - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static subtract(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Subtracts vector b from vector a - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static sub(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Multiplies two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Multiplies two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Divides two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static divide(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Divides two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static div(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Math.ceil the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to ceil - * @returns {vec4} out - */ - public static ceil (out:vec4, a:vec4) : vec4; - - /** - * Math.floor the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to floor - * @returns {vec4} out - */ - public static floor (out:vec4, a:vec4) : vec4; - - /** - * Returns the minimum of two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static min(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Returns the maximum of two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static max(out: vec4, a: vec4, b: vec4): vec4; - - /** - * Math.round the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to round - * @returns {vec4} out - */ - public static round (out:vec4, a:vec4): vec4; - - /** - * Scales a vec4 by a scalar number - * - * @param out the receiving vector - * @param a the vector to scale - * @param b amount to scale the vector by - * @returns out - */ - public static scale(out: vec4, a: vec4, b: number): vec4; - - /** - * Adds two vec4's after scaling the second operand by a scalar value - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @param scale the amount to scale b by before adding - * @returns out - */ - public static scaleAndAdd(out: vec4, a: vec4, b: vec4, scale: number): vec4; - - /** - * Calculates the euclidian distance between two vec4's - * - * @param a the first operand - * @param b the second operand - * @returns distance between a and b - */ - public static distance(a: vec4, b: vec4): number; - - /** - * Calculates the euclidian distance between two vec4's - * - * @param a the first operand - * @param b the second operand - * @returns distance between a and b - */ - public static dist(a: vec4, b: vec4): number; - - /** - * Calculates the squared euclidian distance between two vec4's - * - * @param a the first operand - * @param b the second operand - * @returns squared distance between a and b - */ - public static squaredDistance(a: vec4, b: vec4): number; - - /** - * Calculates the squared euclidian distance between two vec4's - * - * @param a the first operand - * @param b the second operand - * @returns squared distance between a and b - */ - public static sqrDist(a: vec4, b: vec4): number; - - /** - * Calculates the length of a vec4 - * - * @param a vector to calculate length of - * @returns length of a - */ - public static length(a: vec4): number; - - /** - * Calculates the length of a vec4 - * - * @param a vector to calculate length of - * @returns length of a - */ - public static len(a: vec4): number; - - /** - * Calculates the squared length of a vec4 - * - * @param a vector to calculate squared length of - * @returns squared length of a - */ - public static squaredLength(a: vec4): number; - - /** - * Calculates the squared length of a vec4 - * - * @param a vector to calculate squared length of - * @returns squared length of a - */ - public static sqrLen(a: vec4): number; - - /** - * Negates the components of a vec4 - * - * @param out the receiving vector - * @param a vector to negate - * @returns out - */ - public static negate(out: vec4, a: vec4): vec4; - - /** - * Returns the inverse of the components of a vec4 - * - * @param out the receiving vector - * @param a vector to invert - * @returns out - */ - public static inverse(out: vec4, a: vec4): vec4; - - /** - * Normalize a vec4 - * - * @param out the receiving vector - * @param a vector to normalize - * @returns out - */ - public static normalize(out: vec4, a: vec4): vec4; - - /** - * Calculates the dot product of two vec4's - * - * @param a the first operand - * @param b the second operand - * @returns dot product of a and b - */ - public static dot(a: vec4, b: vec4): number; - - /** - * Performs a linear interpolation between two vec4's - * - * @param out the receiving vector - * @param a the first operand - * @param b the second operand - * @param t interpolation amount between the two inputs - * @returns out - */ - public static lerp(out: vec4, a: vec4, b: vec4, t: number): vec4; - - /** - * Generates a random unit vector - * - * @param out the receiving vector - * @returns out - */ - public static random(out: vec4): vec4; - - /** - * Generates a random vector with the given scale - * - * @param out the receiving vector - * @param scale length of the resulting vector. If ommitted, a unit vector will be returned - * @returns out - */ - public static random(out: vec4, scale: number): vec4; - - /** - * Transforms the vec4 with a mat4. - * - * @param out the receiving vector - * @param a the vector to transform - * @param m matrix to transform with - * @returns out - */ - public static transformMat4(out: vec4, a: vec4, m: mat4): vec4; - - /** - * Transforms the vec4 with a quat - * - * @param out the receiving vector - * @param a the vector to transform - * @param q quaternion to transform with - * @returns out - */ - - public static transformQuat(out: vec4, a: vec4, q: quat): vec4; - - /** - * Perform some operation over an array of vec4s. - * - * @param a the array of vectors to iterate over - * @param stride Number of elements between the start of each vec4. If 0 assumes tightly packed - * @param offset Number of elements to skip at the beginning of the array - * @param count Number of vec4s to iterate over. If 0 iterates over entire array - * @param fn Function to call for each vector in the array - * @param arg additional argument to pass to fn - * @returns a - * @function - */ - public static forEach(a: Float32Array, stride: number, offset: number, count: number, - fn: (a: vec4, b: vec4, arg: any) => void, arg: any): Float32Array; - - /** - * Perform some operation over an array of vec4s. - * - * @param a the array of vectors to iterate over - * @param stride Number of elements between the start of each vec4. If 0 assumes tightly packed - * @param offset Number of elements to skip at the beginning of the array - * @param count Number of vec4s to iterate over. If 0 iterates over entire array - * @param fn Function to call for each vector in the array - * @returns a - * @function - */ - public static forEach(a: Float32Array, stride: number, offset: number, count: number, - fn: (a: vec4, b: vec4) => void): Float32Array; - - /** - * Returns a string representation of a vector - * - * @param a vector to represent as a string - * @returns string representation of the vector - */ - public static str(a: vec4): string; - - /** - * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) - * - * @param {vec4} a The first vector. - * @param {vec4} b The second vector. - * @returns {boolean} True if the vectors are equal, false otherwise. - */ - public static exactEquals (a:vec4, b:vec4) : boolean; - - /** - * Returns whether or not the vectors have approximately the same elements in the same position. - * - * @param {vec4} a The first vector. - * @param {vec4} b The second vector. - * @returns {boolean} True if the vectors are equal, false otherwise. - */ - public static equals (a:vec4, b:vec4) : boolean; -} - -// mat2 -export class mat2 extends Float32Array { - private typeMat2:number; - - /** - * Creates a new identity mat2 - * - * @returns a new 2x2 matrix - */ - public static create():mat2; - - /** - * Creates a new mat2 initialized with values from an existing matrix - * - * @param a matrix to clone - * @returns a new 2x2 matrix - */ - public static clone(a:mat2):mat2; - - /** - * Copy the values from one mat2 to another - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static copy(out:mat2, a:mat2):mat2; - - /** - * Set a mat2 to the identity matrix - * - * @param out the receiving matrix - * @returns out - */ - public static identity(out:mat2):mat2; - - /** - * Create a new mat2 with the given values - * - * @param {number} m00 Component in column 0, row 0 position (index 0) - * @param {number} m01 Component in column 0, row 1 position (index 1) - * @param {number} m10 Component in column 1, row 0 position (index 2) - * @param {number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out A new 2x2 matrix - */ - public static fromValues(m00:number, m01:number, m10:number, m11:number):mat2; - - /** - * Set the components of a mat2 to the given values - * - * @param {mat2} out the receiving matrix - * @param {number} m00 Component in column 0, row 0 position (index 0) - * @param {number} m01 Component in column 0, row 1 position (index 1) - * @param {number} m10 Component in column 1, row 0 position (index 2) - * @param {number} m11 Component in column 1, row 1 position (index 3) - * @returns {mat2} out - */ - public static set(out:mat2, m00:number, m01:number, m10:number, m11:number):mat2; - - /** - * Transpose the values of a mat2 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static transpose(out:mat2, a:mat2):mat2; - - /** - * Inverts a mat2 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static invert(out:mat2, a:mat2):mat2; - - /** - * Calculates the adjugate of a mat2 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static adjoint(out:mat2, a:mat2):mat2; - - /** - * Calculates the determinant of a mat2 - * - * @param a the source matrix - * @returns determinant of a - */ - public static determinant(a:mat2):number; - - /** - * Multiplies two mat2's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out:mat2, a:mat2, b:mat2):mat2; - - /** - * Multiplies two mat2's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out:mat2, a:mat2, b:mat2):mat2; - - /** - * Rotates a mat2 by the given angle - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @returns out - */ - public static rotate(out:mat2, a:mat2, rad:number):mat2; - - /** - * Scales the mat2 by the dimensions in the given vec2 - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param v the vec2 to scale the matrix by - * @returns out - **/ - public static scale(out:mat2, a:mat2, v:vec2):mat2; - - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.rotate(dest, dest, rad); - * - * @param {mat2} out mat2 receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ - public static fromRotation(out:mat2, rad:number):mat2; - - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2.identity(dest); - * mat2.scale(dest, dest, vec); - * - * @param {mat2} out mat2 receiving operation result - * @param {vec2} v Scaling vector - * @returns {mat2} out - */ - public static fromScaling(out:mat2, v:vec2):mat2; - - /** - * Returns a string representation of a mat2 - * - * @param a matrix to represent as a string - * @returns string representation of the matrix - */ - public static str(a:mat2):string; - - /** - * Returns Frobenius norm of a mat2 - * - * @param a the matrix to calculate Frobenius norm of - * @returns Frobenius norm - */ - public static frob(a:mat2):number; - - /** - * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix - * @param L the lower triangular matrix - * @param D the diagonal matrix - * @param U the upper triangular matrix - * @param a the input matrix to factorize - */ - public static LDU(L:mat2, D:mat2, U:mat2, a:mat2):mat2; - - /** - * Adds two mat2's - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the first operand - * @param {mat2} b the second operand - * @returns {mat2} out - */ - public static add(out:mat2, a:mat2, b:mat2):mat2; - - /** - * Subtracts matrix b from matrix a - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the first operand - * @param {mat2} b the second operand - * @returns {mat2} out - */ - public static subtract (out:mat2, a:mat2, b:mat2):mat2; - - /** - * Subtracts matrix b from matrix a - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the first operand - * @param {mat2} b the second operand - * @returns {mat2} out - */ - public static sub (out:mat2, a:mat2, b:mat2):mat2; - - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {mat2} a The first matrix. - * @param {mat2} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static exactEquals (a:mat2, b:mat2):boolean; - - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {mat2} a The first matrix. - * @param {mat2} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static equals (a:mat2, b:mat2) :boolean; - - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the matrix to scale - * @param {number} b amount to scale the matrix's elements by - * @returns {mat2} out - */ - public static multiplyScalar (out:mat2, a:mat2, b:number) :mat2 - - /** - * Adds two mat2's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2} out the receiving vector - * @param {mat2} a the first operand - * @param {mat2} b the second operand - * @param {number} scale the amount to scale b's elements by before adding - * @returns {mat2} out - */ - public static multiplyScalarAndAdd (out:mat2, a:mat2, b:mat2, scale:number): mat2 - - - -} - -// mat2d -export class mat2d extends Float32Array { - private typeMat2d:number; - - /** - * Creates a new identity mat2d - * - * @returns a new 2x3 matrix - */ - public static create(): mat2d; - - /** - * Creates a new mat2d initialized with values from an existing matrix - * - * @param a matrix to clone - * @returns a new 2x3 matrix - */ - public static clone(a: mat2d): mat2d; - - /** - * Copy the values from one mat2d to another - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static copy(out: mat2d, a: mat2d): mat2d; - - /** - * Set a mat2d to the identity matrix - * - * @param out the receiving matrix - * @returns out - */ - public static identity(out: mat2d): mat2d; - - /** - * Create a new mat2d with the given values - * - * @param {number} a Component A (index 0) - * @param {number} b Component B (index 1) - * @param {number} c Component C (index 2) - * @param {number} d Component D (index 3) - * @param {number} tx Component TX (index 4) - * @param {number} ty Component TY (index 5) - * @returns {mat2d} A new mat2d - */ - public static fromValues (a:number, b:number, c:number, d:number, tx:number, ty:number) : mat2d - - - /** - * Set the components of a mat2d to the given values - * - * @param {mat2d} out the receiving matrix - * @param {number} a Component A (index 0) - * @param {number} b Component B (index 1) - * @param {number} c Component C (index 2) - * @param {number} d Component D (index 3) - * @param {number} tx Component TX (index 4) - * @param {number} ty Component TY (index 5) - * @returns {mat2d} out - */ - public static set (out:mat2d, a:number, b:number, c:number, d:number, tx:number, ty:number) :mat2d - - /** - * Inverts a mat2d - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static invert(out: mat2d, a: mat2d): mat2d; - - /** - * Calculates the determinant of a mat2d - * - * @param a the source matrix - * @returns determinant of a - */ - public static determinant(a: mat2d): number; - - /** - * Multiplies two mat2d's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out: mat2d, a: mat2d, b: mat2d): mat2d; - - /** - * Multiplies two mat2d's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out: mat2d, a: mat2d, b: mat2d): mat2d; - - /** - * Rotates a mat2d by the given angle - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @returns out - */ - public static rotate(out: mat2d, a: mat2d, rad: number): mat2d; - - /** - * Scales the mat2d by the dimensions in the given vec2 - * - * @param out the receiving matrix - * @param a the matrix to translate - * @param v the vec2 to scale the matrix by - * @returns out - **/ - public static scale(out: mat2d, a: mat2d, v: vec2): mat2d; - - /** - * Translates the mat2d by the dimensions in the given vec2 - * - * @param out the receiving matrix - * @param a the matrix to translate - * @param v the vec2 to translate the matrix by - * @returns out - **/ - public static translate(out: mat2d, a: mat2d, v: vec2): mat2d; - - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.rotate(dest, dest, rad); - * - * @param {mat2d} out mat2d receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ - public static fromRotation (out:mat2d, rad:number): mat2d; - - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.scale(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {vec2} v Scaling vector - * @returns {mat2d} out - */ - public static fromScaling (out:mat2d, v:vec2):mat2d; - - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat2d.identity(dest); - * mat2d.translate(dest, dest, vec); - * - * @param {mat2d} out mat2d receiving operation result - * @param {vec2} v Translation vector - * @returns {mat2d} out - */ - public static fromTranslation (out:mat2d, v:vec2):mat2d - - /** - * Returns a string representation of a mat2d - * - * @param a matrix to represent as a string - * @returns string representation of the matrix - */ - public static str(a: mat2d): string; - - /** - * Returns Frobenius norm of a mat2d - * - * @param a the matrix to calculate Frobenius norm of - * @returns Frobenius norm - */ - public static frob(a: mat2d): number; - - /** - * Adds two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the first operand - * @param {mat2d} b the second operand - * @returns {mat2d} out - */ - public static add (out: mat2d, a: mat2d, b: mat2d): mat2d - - /** - * Subtracts matrix b from matrix a - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the first operand - * @param {mat2d} b the second operand - * @returns {mat2d} out - */ - public static subtract(out: mat2d, a: mat2d, b: mat2d): mat2d - - /** - * Subtracts matrix b from matrix a - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the first operand - * @param {mat2d} b the second operand - * @returns {mat2d} out - */ - public static sub(out: mat2d, a: mat2d, b: mat2d): mat2d - - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to scale - * @param {number} b amount to scale the matrix's elements by - * @returns {mat2d} out - */ - public static multiplyScalar (out: mat2d, a: mat2d, b: number): mat2d; - - /** - * Adds two mat2d's after multiplying each element of the second operand by a scalar value. - * - * @param {mat2d} out the receiving vector - * @param {mat2d} a the first operand - * @param {mat2d} b the second operand - * @param {number} scale the amount to scale b's elements by before adding - * @returns {mat2d} out - */ - public static multiplyScalarAndAdd (out: mat2d, a: mat2d, b: mat2d, scale:number) : mat2d - - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {mat2d} a The first matrix. - * @param {mat2d} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static exactEquals (a: mat2d, b: mat2d): boolean; - - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {mat2d} a The first matrix. - * @param {mat2d} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static equals (a: mat2d, b: mat2d): boolean -} - -// mat3 -export class mat3 extends Float32Array { - private typeMat3:number; - - /** - * Creates a new identity mat3 - * - * @returns a new 3x3 matrix - */ - public static create():mat3; - - /** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {mat4} a the source 4x4 matrix - * @returns {mat3} out - */ - public static fromMat4(out:mat3, a:mat4):mat3 - - /** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param a matrix to clone - * @returns a new 3x3 matrix - */ - public static clone(a:mat3):mat3; - - /** - * Copy the values from one mat3 to another - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static copy(out:mat3, a:mat3):mat3; - - /** - * Create a new mat3 with the given values - * - * @param {number} m00 Component in column 0, row 0 position (index 0) - * @param {number} m01 Component in column 0, row 1 position (index 1) - * @param {number} m02 Component in column 0, row 2 position (index 2) - * @param {number} m10 Component in column 1, row 0 position (index 3) - * @param {number} m11 Component in column 1, row 1 position (index 4) - * @param {number} m12 Component in column 1, row 2 position (index 5) - * @param {number} m20 Component in column 2, row 0 position (index 6) - * @param {number} m21 Component in column 2, row 1 position (index 7) - * @param {number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} A new mat3 - */ - public static fromValues(m00:number, m01:number, m02:number, m10:number, m11:number, m12:number, m20:number, m21:number, m22:number):mat3; - - - /** - * Set the components of a mat3 to the given values - * - * @param {mat3} out the receiving matrix - * @param {number} m00 Component in column 0, row 0 position (index 0) - * @param {number} m01 Component in column 0, row 1 position (index 1) - * @param {number} m02 Component in column 0, row 2 position (index 2) - * @param {number} m10 Component in column 1, row 0 position (index 3) - * @param {number} m11 Component in column 1, row 1 position (index 4) - * @param {number} m12 Component in column 1, row 2 position (index 5) - * @param {number} m20 Component in column 2, row 0 position (index 6) - * @param {number} m21 Component in column 2, row 1 position (index 7) - * @param {number} m22 Component in column 2, row 2 position (index 8) - * @returns {mat3} out - */ - public static set(out:mat3, m00:number, m01:number, m02:number, m10:number, m11:number, m12:number, m20:number, m21:number, m22:number):mat3 - - /** - * Set a mat3 to the identity matrix - * - * @param out the receiving matrix - * @returns out - */ - public static identity(out:mat3):mat3; - - /** - * Transpose the values of a mat3 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static transpose(out:mat3, a:mat3):mat3; - - /** - * Inverts a mat3 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static invert(out:mat3, a:mat3):mat3; - - /** - * Calculates the adjugate of a mat3 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static adjoint(out:mat3, a:mat3):mat3; - - /** - * Calculates the determinant of a mat3 - * - * @param a the source matrix - * @returns determinant of a - */ - public static determinant(a:mat3):number; - - /** - * Multiplies two mat3's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out:mat3, a:mat3, b:mat3):mat3; - - /** - * Multiplies two mat3's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out:mat3, a:mat3, b:mat3):mat3; - - - /** - * Translate a mat3 by the given vector - * - * @param out the receiving matrix - * @param a the matrix to translate - * @param v vector to translate by - * @returns out - */ - public static translate(out:mat3, a:mat3, v:vec3):mat3; - - /** - * Rotates a mat3 by the given angle - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @returns out - */ - public static rotate(out:mat3, a:mat3, rad:number):mat3; - - /** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param v the vec2 to scale the matrix by - * @returns out - **/ - public static scale(out:mat3, a:mat3, v:vec2):mat3; - - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.translate(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {vec2} v Translation vector - * @returns {mat3} out - */ - public static fromTranslation(out:mat3, v:vec2):mat3 - - /** - * Creates a matrix from a given angle - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.rotate(dest, dest, rad); - * - * @param {mat3} out mat3 receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ - public static fromRotation(out:mat3, rad:number):mat3 - - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat3.identity(dest); - * mat3.scale(dest, dest, vec); - * - * @param {mat3} out mat3 receiving operation result - * @param {vec2} v Scaling vector - * @returns {mat3} out - */ - public static fromScaling(out:mat3, v:vec2):mat3 - - /** - * Copies the values from a mat2d into a mat3 - * - * @param out the receiving matrix - * @param {mat2d} a the matrix to copy - * @returns out - **/ - public static fromMat2d(out:mat3, a:mat2d):mat3; - - /** - * Calculates a 3x3 matrix from the given quaternion - * - * @param out mat3 receiving operation result - * @param q Quaternion to create matrix from - * - * @returns out - */ - public static fromQuat(out:mat3, q:quat):mat3; - - /** - * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix - * - * @param out mat3 receiving operation result - * @param a Mat4 to derive the normal matrix from - * - * @returns out - */ - public static normalFromMat4(out:mat3, a:mat4):mat3; - - /** - * Returns a string representation of a mat3 - * - * @param mat matrix to represent as a string - * @returns string representation of the matrix - */ - public static str(mat:mat3):string; - - /** - * Returns Frobenius norm of a mat3 - * - * @param a the matrix to calculate Frobenius norm of - * @returns Frobenius norm - */ - public static frob(a:mat3):number; - - /** - * Adds two mat3's - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ - public static add(out:mat3, a:mat3, b:mat3):mat3 - - /** - * Subtracts matrix b from matrix a - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ - public static subtract(out:mat3, a:mat3, b:mat3):mat3 - - /** - * Subtracts matrix b from matrix a - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ - public static sub(out:mat3, a:mat3, b:mat3):mat3 - - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to scale - * @param {number} b amount to scale the matrix's elements by - * @returns {mat3} out - */ - public static multiplyScalar(out:mat3, a:mat3, b:number):mat3 - - /** - * Adds two mat3's after multiplying each element of the second operand by a scalar value. - * - * @param {mat3} out the receiving vector - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @param {number} scale the amount to scale b's elements by before adding - * @returns {mat3} out - */ - public static multiplyScalarAndAdd(out:mat3, a:mat3, b:mat3, scale:number):mat3 - - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {mat3} a The first matrix. - * @param {mat3} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static exactEquals(a:mat3, b:mat3):boolean; - - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {mat3} a The first matrix. - * @param {mat3} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static equals(a:mat3, b:mat3):boolean -} - -// mat4 -export class mat4 extends Float32Array { - private typeMat4:number; - - /** - * Creates a new identity mat4 - * - * @returns a new 4x4 matrix - */ - public static create():mat4; - - /** - * Creates a new mat4 initialized with values from an existing matrix - * - * @param a matrix to clone - * @returns a new 4x4 matrix - */ - public static clone(a:mat4):mat4; - - /** - * Copy the values from one mat4 to another - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static copy(out:mat4, a:mat4):mat4; - - - /** - * Create a new mat4 with the given values - * - * @param {number} m00 Component in column 0, row 0 position (index 0) - * @param {number} m01 Component in column 0, row 1 position (index 1) - * @param {number} m02 Component in column 0, row 2 position (index 2) - * @param {number} m03 Component in column 0, row 3 position (index 3) - * @param {number} m10 Component in column 1, row 0 position (index 4) - * @param {number} m11 Component in column 1, row 1 position (index 5) - * @param {number} m12 Component in column 1, row 2 position (index 6) - * @param {number} m13 Component in column 1, row 3 position (index 7) - * @param {number} m20 Component in column 2, row 0 position (index 8) - * @param {number} m21 Component in column 2, row 1 position (index 9) - * @param {number} m22 Component in column 2, row 2 position (index 10) - * @param {number} m23 Component in column 2, row 3 position (index 11) - * @param {number} m30 Component in column 3, row 0 position (index 12) - * @param {number} m31 Component in column 3, row 1 position (index 13) - * @param {number} m32 Component in column 3, row 2 position (index 14) - * @param {number} m33 Component in column 3, row 3 position (index 15) - * @returns {mat4} A new mat4 - */ - public static fromValues(m00:number, m01:number, m02:number, m03:number, m10:number, m11:number, m12:number, m13:number, m20:number, m21:number, m22:number, m23:number, m30:number, m31:number, m32:number, m33:number):mat4; - - /** - * Set the components of a mat4 to the given values - * - * @param {mat4} out the receiving matrix - * @param {number} m00 Component in column 0, row 0 position (index 0) - * @param {number} m01 Component in column 0, row 1 position (index 1) - * @param {number} m02 Component in column 0, row 2 position (index 2) - * @param {number} m03 Component in column 0, row 3 position (index 3) - * @param {number} m10 Component in column 1, row 0 position (index 4) - * @param {number} m11 Component in column 1, row 1 position (index 5) - * @param {number} m12 Component in column 1, row 2 position (index 6) - * @param {number} m13 Component in column 1, row 3 position (index 7) - * @param {number} m20 Component in column 2, row 0 position (index 8) - * @param {number} m21 Component in column 2, row 1 position (index 9) - * @param {number} m22 Component in column 2, row 2 position (index 10) - * @param {number} m23 Component in column 2, row 3 position (index 11) - * @param {number} m30 Component in column 3, row 0 position (index 12) - * @param {number} m31 Component in column 3, row 1 position (index 13) - * @param {number} m32 Component in column 3, row 2 position (index 14) - * @param {number} m33 Component in column 3, row 3 position (index 15) - * @returns {mat4} out - */ - public static set(out:mat4, m00:number, m01:number, m02:number, m03:number, m10:number, m11:number, m12:number, m13:number, m20:number, m21:number, m22:number, m23:number, m30:number, m31:number, m32:number, m33:number):mat4; - - /** - * Set a mat4 to the identity matrix - * - * @param out the receiving matrix - * @returns out - */ - public static identity(out:mat4):mat4; - - /** - * Transpose the values of a mat4 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static transpose(out:mat4, a:mat4):mat4; - - /** - * Inverts a mat4 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static invert(out:mat4, a:mat4):mat4; - - /** - * Calculates the adjugate of a mat4 - * - * @param out the receiving matrix - * @param a the source matrix - * @returns out - */ - public static adjoint(out:mat4, a:mat4):mat4; - - /** - * Calculates the determinant of a mat4 - * - * @param a the source matrix - * @returns determinant of a - */ - public static determinant(a:mat4):number; - - /** - * Multiplies two mat4's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out:mat4, a:mat4, b:mat4):mat4; - - /** - * Multiplies two mat4's - * - * @param out the receiving matrix - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out:mat4, a:mat4, b:mat4):mat4; - - /** - * Translate a mat4 by the given vector - * - * @param out the receiving matrix - * @param a the matrix to translate - * @param v vector to translate by - * @returns out - */ - public static translate(out:mat4, a:mat4, v:vec3):mat4; - - /** - * Scales the mat4 by the dimensions in the given vec3 - * - * @param out the receiving matrix - * @param a the matrix to scale - * @param v the vec3 to scale the matrix by - * @returns out - **/ - public static scale(out:mat4, a:mat4, v:vec3):mat4; - - /** - * Rotates a mat4 by the given angle - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @param axis the axis to rotate around - * @returns out - */ - public static rotate(out:mat4, a:mat4, rad:number, axis:vec3):mat4; - - /** - * Rotates a matrix by the given angle around the X axis - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @returns out - */ - public static rotateX(out:mat4, a:mat4, rad:number):mat4; - - /** - * Rotates a matrix by the given angle around the Y axis - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @returns out - */ - public static rotateY(out:mat4, a:mat4, rad:number):mat4; - - /** - * Rotates a matrix by the given angle around the Z axis - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param rad the angle to rotate the matrix by - * @returns out - */ - public static rotateZ(out:mat4, a:mat4, rad:number):mat4; - - /** - * Creates a matrix from a vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, dest, vec); - * - * @param {mat4} out mat4 receiving operation result - * @param {vec3} v Translation vector - * @returns {mat4} out - */ - public static fromTranslation(out:mat4, v:vec3):mat4 - - /** - * Creates a matrix from a vector scaling - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.scale(dest, dest, vec); - * - * @param {mat4} out mat4 receiving operation result - * @param {vec3} v Scaling vector - * @returns {mat4} out - */ - public static fromScaling(out:mat4, v:vec3):mat4 - - /** - * Creates a matrix from a given angle around a given axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotate(dest, dest, rad, axis); - * - * @param {mat4} out mat4 receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @param {vec3} axis the axis to rotate around - * @returns {mat4} out - */ - public static fromRotation(out:mat4, rad:number, axis:vec3):mat4 - - /** - * Creates a matrix from the given angle around the X axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateX(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - public static fromXRotation(out:mat4, rad:number):mat4 - - /** - * Creates a matrix from the given angle around the Y axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateY(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - public static fromYRotation(out:mat4, rad:number):mat4 - - - /** - * Creates a matrix from the given angle around the Z axis - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.rotateZ(dest, dest, rad); - * - * @param {mat4} out mat4 receiving operation result - * @param {number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ - public static fromZRotation(out:mat4, rad:number):mat4 - - /** - * Creates a matrix from a quaternion rotation and vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * var quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * - * @param out mat4 receiving operation result - * @param q Rotation quaternion - * @param v Translation vector - * @returns out - */ - public static fromRotationTranslation(out:mat4, q:quat, v:vec3):mat4; - - /** - * Returns the translation vector component of a transformation - * matrix. If a matrix is built with fromRotationTranslation, - * the returned vector will be the same as the translation vector - * originally supplied. - * @param {vec3} out Vector to receive translation component - * @param {mat4} mat Matrix to be decomposed (input) - * @return {vec3} out - */ - public static getTranslation(out:vec3, mat:mat4):vec3; - - /** - * Returns a quaternion representing the rotational component - * of a transformation matrix. If a matrix is built with - * fromRotationTranslation, the returned quaternion will be the - * same as the quaternion originally supplied. - * @param {quat} out Quaternion to receive the rotation component - * @param {mat4} mat Matrix to be decomposed (input) - * @return {quat} out - */ - public static getRotation(out:quat, mat:mat4):quat; - - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * var quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * - * @param out mat4 receiving operation result - * @param q Rotation quaternion - * @param v Translation vector - * @param s Scaling vector - * @returns out - */ - public static fromRotationTranslationScale(out:mat4, q:quat, v:vec3, s:vec3):mat4; - - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * mat4.translate(dest, origin); - * var quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * mat4.translate(dest, negativeOrigin); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat} q Rotation quaternion - * @param {vec3} v Translation vector - * @param {vec3} s Scaling vector - * @param {vec3} o The origin vector around which to scale and rotate - * @returns {mat4} out - */ - public static fromRotationTranslationScaleOrigin(out:mat4, q:quat, v:vec3, s:vec3, o:vec3):mat4 - - /** - * Calculates a 4x4 matrix from the given quaternion - * - * @param {mat4} out mat4 receiving operation result - * @param {quat} q Quaternion to create matrix from - * - * @returns {mat4} out - */ - public static fromQuat(out:mat4, q:quat):mat4 - - /** - * Generates a frustum matrix with the given bounds - * - * @param out mat4 frustum matrix will be written into - * @param left Left bound of the frustum - * @param right Right bound of the frustum - * @param bottom Bottom bound of the frustum - * @param top Top bound of the frustum - * @param near Near bound of the frustum - * @param far Far bound of the frustum - * @returns out - */ - public static frustum(out:mat4, left:number, right:number, - bottom:number, top:number, near:number, far:number):mat4; - - /** - * Generates a perspective projection matrix with the given bounds - * - * @param out mat4 frustum matrix will be written into - * @param fovy Vertical field of view in radians - * @param aspect Aspect ratio. typically viewport width/height - * @param near Near bound of the frustum - * @param far Far bound of the frustum - * @returns out - */ - public static perspective(out:mat4, fovy:number, aspect:number, - near:number, far:number):mat4; - - /** - * Generates a perspective projection matrix with the given field of view. - * This is primarily useful for generating projection matrices to be used - * with the still experimental WebVR API. - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ - public static perspectiveFromFieldOfView(out:mat4, - fov:{upDegrees:number, downDegrees:number, leftDegrees:number, rightDegrees:number}, - near:number, far:number):mat4 - - /** - * Generates a orthogonal projection matrix with the given bounds - * - * @param out mat4 frustum matrix will be written into - * @param left Left bound of the frustum - * @param right Right bound of the frustum - * @param bottom Bottom bound of the frustum - * @param top Top bound of the frustum - * @param near Near bound of the frustum - * @param far Far bound of the frustum - * @returns out - */ - public static ortho(out:mat4, left:number, right:number, - bottom:number, top:number, near:number, far:number):mat4; - - /** - * Generates a look-at matrix with the given eye position, focal point, and up axis - * - * @param out mat4 frustum matrix will be written into - * @param eye Position of the viewer - * @param center Point the viewer is looking at - * @param up vec3 pointing up - * @returns out - */ - public static lookAt(out:mat4, eye:vec3, center:vec3, up:vec3):mat4; - - /** - * Returns a string representation of a mat4 - * - * @param mat matrix to represent as a string - * @returns string representation of the matrix - */ - public static str(mat:mat4):string; - - /** - * Returns Frobenius norm of a mat4 - * - * @param a the matrix to calculate Frobenius norm of - * @returns Frobenius norm - */ - public static frob(a:mat4):number; - - /** - * Adds two mat4's - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the first operand - * @param {mat4} b the second operand - * @returns {mat4} out - */ - public static add(out:mat4, a:mat4, b:mat4):mat4 - - /** - * Subtracts matrix b from matrix a - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the first operand - * @param {mat4} b the second operand - * @returns {mat4} out - */ - public static subtract(out:mat4, a:mat4, b:mat4):mat4 - - /** - * Subtracts matrix b from matrix a - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the first operand - * @param {mat4} b the second operand - * @returns {mat4} out - */ - public static sub(out:mat4, a:mat4, b:mat4):mat4 - - /** - * Multiply each element of the matrix by a scalar. - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to scale - * @param {number} b amount to scale the matrix's elements by - * @returns {mat4} out - */ - public static multiplyScalar(out:mat4, a:mat4, b:number):mat4 - - /** - * Adds two mat4's after multiplying each element of the second operand by a scalar value. - * - * @param {mat4} out the receiving vector - * @param {mat4} a the first operand - * @param {mat4} b the second operand - * @param {number} scale the amount to scale b's elements by before adding - * @returns {mat4} out - */ - public static multiplyScalarAndAdd (out:mat4, a:mat4, b:mat4, scale:number):mat4 - - /** - * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) - * - * @param {mat4} a The first matrix. - * @param {mat4} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static exactEquals (a:mat4, b:mat4) :boolean - - /** - * Returns whether or not the matrices have approximately the same elements in the same position. - * - * @param {mat4} a The first matrix. - * @param {mat4} b The second matrix. - * @returns {boolean} True if the matrices are equal, false otherwise. - */ - public static equals (a:mat4, b:mat4): boolean - -} - -// quat -export class quat extends Float32Array { - private typeQuat:number; - - /** - * Creates a new identity quat - * - * @returns a new quaternion - */ - public static create(): quat; - - /** - * Creates a new quat initialized with values from an existing quaternion - * - * @param a quaternion to clone - * @returns a new quaternion - * @function - */ - public static clone(a: quat): quat; - - /** - * Creates a new quat initialized with the given values - * - * @param x X component - * @param y Y component - * @param z Z component - * @param w W component - * @returns a new quaternion - * @function - */ - public static fromValues(x: number, y: number, z: number, w: number): quat; - - /** - * Copy the values from one quat to another - * - * @param out the receiving quaternion - * @param a the source quaternion - * @returns out - * @function - */ - public static copy(out: quat, a: quat): quat; - - /** - * Set the components of a quat to the given values - * - * @param out the receiving quaternion - * @param x X component - * @param y Y component - * @param z Z component - * @param w W component - * @returns out - * @function - */ - public static set(out: quat, x: number, y: number, z: number, w: number): quat; - - /** - * Set a quat to the identity quaternion - * - * @param out the receiving quaternion - * @returns out - */ - public static identity(out: quat): quat; - - /** - * Sets a quaternion to represent the shortest rotation from one - * vector to another. - * - * Both vectors are assumed to be unit length. - * - * @param {quat} out the receiving quaternion. - * @param {vec3} a the initial vector - * @param {vec3} b the destination vector - * @returns {quat} out - */ - public static rotationTo (out:quat, a:vec3, b:vec3): quat; - - /** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - * - * @param {vec3} view the vector representing the viewing direction - * @param {vec3} right the vector representing the local "right" direction - * @param {vec3} up the vector representing the local "up" direction - * @returns {quat} out - */ - public static setAxes (out:quat, view:vec3, right:vec3, up:vec3):quat - - - - /** - * Sets a quat from the given angle and rotation axis, - * then returns it. - * - * @param out the receiving quaternion - * @param axis the axis around which to rotate - * @param rad the angle in radians - * @returns out - **/ - public static setAxisAngle(out: quat, axis: vec3, rad: number): quat; - - /** - * Gets the rotation axis and angle for a given - * quaternion. If a quaternion is created with - * setAxisAngle, this method will return the same - * values as providied in the original parameter list - * OR functionally equivalent values. - * Example: The quaternion formed by axis [0, 0, 1] and - * angle -90 is the same as the quaternion formed by - * [0, 0, 1] and 270. This method favors the latter. - * @param {vec3} out_axis Vector receiving the axis of rotation - * @param {quat} q Quaternion to be decomposed - * @return {number} Angle, in radians, of the rotation - */ - public static getAxisAngle (out_axis:vec3, q:quat) :number - - /** - * Adds two quat's - * - * @param out the receiving quaternion - * @param a the first operand - * @param b the second operand - * @returns out - * @function - */ - public static add(out: quat, a: quat, b: quat): quat; - - /** - * Multiplies two quat's - * - * @param out the receiving quaternion - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static multiply(out: quat, a: quat, b: quat): quat; - - /** - * Multiplies two quat's - * - * @param out the receiving quaternion - * @param a the first operand - * @param b the second operand - * @returns out - */ - public static mul(out: quat, a: quat, b: quat): quat; - - /** - * Scales a quat by a scalar number - * - * @param out the receiving vector - * @param a the vector to scale - * @param b amount to scale the vector by - * @returns out - * @function - */ - public static scale(out: quat, a: quat, b: number): quat; - - /** - * Calculates the length of a quat - * - * @param a vector to calculate length of - * @returns length of a - * @function - */ - public static length(a: quat): number; - - /** - * Calculates the length of a quat - * - * @param a vector to calculate length of - * @returns length of a - * @function - */ - public static len(a: quat): number; - - /** - * Calculates the squared length of a quat - * - * @param a vector to calculate squared length of - * @returns squared length of a - * @function - */ - public static squaredLength(a: quat): number; - - /** - * Calculates the squared length of a quat - * - * @param a vector to calculate squared length of - * @returns squared length of a - * @function - */ - public static sqrLen(a: quat): number; - - /** - * Normalize a quat - * - * @param out the receiving quaternion - * @param a quaternion to normalize - * @returns out - * @function - */ - public static normalize(out: quat, a: quat): quat; - - /** - * Calculates the dot product of two quat's - * - * @param a the first operand - * @param b the second operand - * @returns dot product of a and b - * @function - */ - public static dot(a: quat, b: quat): number; - - /** - * Performs a linear interpolation between two quat's - * - * @param out the receiving quaternion - * @param a the first operand - * @param b the second operand - * @param t interpolation amount between the two inputs - * @returns out - * @function - */ - public static lerp(out: quat, a: quat, b: quat, t: number): quat; - - /** - * Performs a spherical linear interpolation between two quat - * - * @param out the receiving quaternion - * @param a the first operand - * @param b the second operand - * @param t interpolation amount between the two inputs - * @returns out - */ - public static slerp(out:quat, a:quat, b:quat, t:number): quat; - - /** - * Performs a spherical linear interpolation with two control points - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @param {quat} c the third operand - * @param {quat} d the fourth operand - * @param {number} t interpolation amount - * @returns {quat} out - */ - public static sqlerp(out: quat, a: quat, b: quat, c: quat, d: quat, t: number): quat; - - /** - * Calculates the inverse of a quat - * - * @param out the receiving quaternion - * @param a quat to calculate inverse of - * @returns out - */ - public static invert(out: quat, a: quat): quat; - - /** - * Calculates the conjugate of a quat - * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. - * - * @param out the receiving quaternion - * @param a quat to calculate conjugate of - * @returns out - */ - public static conjugate(out: quat, a: quat): quat; - - /** - * Returns a string representation of a quaternion - * - * @param a quat to represent as a string - * @returns string representation of the quat - */ - public static str(a: quat): string; - - /** - * Rotates a quaternion by the given angle about the X axis - * - * @param out quat receiving operation result - * @param a quat to rotate - * @param rad angle (in radians) to rotate - * @returns out - */ - public static rotateX(out: quat, a: quat, rad: number): quat; - - /** - * Rotates a quaternion by the given angle about the Y axis - * - * @param out quat receiving operation result - * @param a quat to rotate - * @param rad angle (in radians) to rotate - * @returns out - */ - public static rotateY(out: quat, a: quat, rad: number): quat; - - /** - * Rotates a quaternion by the given angle about the Z axis - * - * @param out quat receiving operation result - * @param a quat to rotate - * @param rad angle (in radians) to rotate - * @returns out - */ - public static rotateZ(out: quat, a: quat, rad: number): quat; - - /** - * Creates a quaternion from the given 3x3 rotation matrix. - * - * NOTE: The resultant quaternion is not normalized, so you should be sure - * to renormalize the quaternion yourself where necessary. - * - * @param out the receiving quaternion - * @param m rotation matrix - * @returns out - * @function - */ - public static fromMat3(out: quat, m: mat3): quat; - - /** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - * - * @param out the receiving quat - * @param view the vector representing the viewing direction - * @param right the vector representing the local "right" direction - * @param up the vector representing the local "up" direction - * @returns out - */ - public static setAxes(out: quat, view: vec3, right: vec3, up: vec3): quat; - - /** - * Sets a quaternion to represent the shortest rotation from one - * vector to another. - * - * Both vectors are assumed to be unit length. - * - * @param out the receiving quaternion. - * @param a the initial vector - * @param b the destination vector - * @returns out - */ - public static rotationTo(out: quat, a: vec3, b: vec3): quat; - - /** - * Calculates the W component of a quat from the X, Y, and Z components. - * Assumes that quaternion is 1 unit in length. - * Any existing W component will be ignored. - * - * @param out the receiving quaternion - * @param a quat to calculate W component of - * @returns out - */ - public static calculateW(out: quat, a: quat): quat; - - /** - * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) - * - * @param {quat} a The first vector. - * @param {quat} b The second vector. - * @returns {boolean} True if the quaternions are equal, false otherwise. - */ - public static exactEquals (a:quat, b:quat) : boolean; - - /** - * Returns whether or not the quaternions have approximately the same elements in the same position. - * - * @param {quat} a The first vector. - * @param {quat} b The second vector. - * @returns {boolean} True if the quaternions are equal, false otherwise. - */ - public static equals (a:quat, b:quat) : boolean; -} diff --git a/gl-matrix/gl-matrix.d.ts b/gl-matrix/gl-matrix.d.ts index 16366f263a..2edbbd8bb5 100644 --- a/gl-matrix/gl-matrix.d.ts +++ b/gl-matrix/gl-matrix.d.ts @@ -1,36 +1,18 @@ // Type definitions for gl-matrix 2.2.2 // Project: https://github.com/toji/gl-matrix -// Definitions by: Tat +// Definitions by: Mattijs Kneppers , based on definitions by Tat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace GLM { - interface IArray - { - /** - * Must be indexable like an array - */ - [index: number]: number; - } -} - -// Common -declare namespace glMatrix { - /** - * Convert Degree To Radian - * - * @param a Angle in Degrees - */ - export function toRadian(a: number): number; -} - // vec2 -declare namespace vec2 { +export class vec2 extends Float32Array { + private typeVec2: number; + /** * Creates a new, empty vec2 * * @returns a new 2D vector */ - export function create(): GLM.IArray; + public static create(): vec2; /** * Creates a new vec2 initialized with values from an existing vector @@ -38,7 +20,7 @@ declare namespace vec2 { * @param a a vector to clone * @returns a new 2D vector */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: vec2 | number[]): vec2; /** * Creates a new vec2 initialized with the given values @@ -47,7 +29,7 @@ declare namespace vec2 { * @param y Y component * @returns a new 2D vector */ - export function fromValues(x: number, y: number): GLM.IArray; + public static fromValues(x: number, y: number): vec2; /** * Copy the values from one vec2 to another @@ -56,7 +38,7 @@ declare namespace vec2 { * @param a the source vector * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: vec2, a: vec2 | number[]): vec2; /** * Set the components of a vec2 to the given values @@ -66,7 +48,7 @@ declare namespace vec2 { * @param y Y component * @returns out */ - export function set(out: GLM.IArray, x: number, y: number): GLM.IArray; + public static set(out: vec2, x: number, y: number): vec2; /** * Adds two vec2's @@ -76,7 +58,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static add(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Subtracts vector b from vector a @@ -86,7 +68,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function subtract(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static subtract(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Subtracts vector b from vector a @@ -96,7 +78,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function sub(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static sub(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Multiplies two vec2's @@ -106,7 +88,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Multiplies two vec2's @@ -116,7 +98,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Divides two vec2's @@ -126,7 +108,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function divide(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static divide(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Divides two vec2's @@ -136,7 +118,25 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function div(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static div(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; + + /** + * Math.ceil the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to ceil + * @returns {vec2} out + */ + public static ceil(out: vec2, a: vec2 | number[]): vec2; + + /** + * Math.floor the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to floor + * @returns {vec2} out + */ + public static floor (out: vec2, a: vec2 | number[]): vec2; /** * Returns the minimum of two vec2's @@ -146,7 +146,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function min(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static min(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Returns the maximum of two vec2's @@ -156,7 +156,17 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function max(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static max(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; + + /** + * Math.round the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to round + * @returns {vec2} out + */ + public static round(out: vec2, a: vec2 | number[]): vec2; + /** * Scales a vec2 by a scalar number @@ -166,7 +176,7 @@ declare namespace vec2 { * @param b amount to scale the vector by * @returns out */ - export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + public static scale(out: vec2, a: vec2 | number[], b: number): vec2; /** * Adds two vec2's after scaling the second operand by a scalar value @@ -177,7 +187,7 @@ declare namespace vec2 { * @param scale the amount to scale b by before adding * @returns out */ - export function scaleAndAdd(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, scale: number): GLM.IArray; + public static scaleAndAdd(out: vec2, a: vec2 | number[], b: vec2 | number[], scale: number): vec2; /** * Calculates the euclidian distance between two vec2's @@ -186,7 +196,7 @@ declare namespace vec2 { * @param b the second operand * @returns distance between a and b */ - export function distance(a: GLM.IArray, b: GLM.IArray): number; + public static distance(a: vec2 | number[], b: vec2 | number[]): number; /** * Calculates the euclidian distance between two vec2's @@ -195,7 +205,7 @@ declare namespace vec2 { * @param b the second operand * @returns distance between a and b */ - export function dist(a: GLM.IArray, b: GLM.IArray): number; + public static dist(a: vec2 | number[], b: vec2 | number[]): number; /** * Calculates the squared euclidian distance between two vec2's @@ -204,7 +214,7 @@ declare namespace vec2 { * @param b the second operand * @returns squared distance between a and b */ - export function squaredDistance(a: GLM.IArray, b: GLM.IArray): number; + public static squaredDistance(a: vec2 | number[], b: vec2 | number[]): number; /** * Calculates the squared euclidian distance between two vec2's @@ -213,7 +223,7 @@ declare namespace vec2 { * @param b the second operand * @returns squared distance between a and b */ - export function sqrDist(a: GLM.IArray, b: GLM.IArray): number; + public static sqrDist(a: vec2 | number[], b: vec2 | number[]): number; /** * Calculates the length of a vec2 @@ -221,7 +231,7 @@ declare namespace vec2 { * @param a vector to calculate length of * @returns length of a */ - export function length(a: GLM.IArray): number; + public static length(a: vec2 | number[]): number; /** * Calculates the length of a vec2 @@ -229,7 +239,7 @@ declare namespace vec2 { * @param a vector to calculate length of * @returns length of a */ - export function len(a: GLM.IArray): number; + public static len(a: vec2 | number[]): number; /** * Calculates the squared length of a vec2 @@ -237,7 +247,7 @@ declare namespace vec2 { * @param a vector to calculate squared length of * @returns squared length of a */ - export function squaredLength(a: GLM.IArray): number; + public static squaredLength(a: vec2 | number[]): number; /** * Calculates the squared length of a vec2 @@ -245,7 +255,7 @@ declare namespace vec2 { * @param a vector to calculate squared length of * @returns squared length of a */ - export function sqrLen(a: GLM.IArray): number; + public static sqrLen(a: vec2 | number[]): number; /** * Negates the components of a vec2 @@ -254,7 +264,7 @@ declare namespace vec2 { * @param a vector to negate * @returns out */ - export function negate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static negate(out: vec2, a: vec2 | number[]): vec2; /** * Returns the inverse of the components of a vec2 @@ -263,7 +273,7 @@ declare namespace vec2 { * @param a vector to invert * @returns out */ - export function inverse(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static inverse(out: vec2, a: vec2 | number[]): vec2; /** * Normalize a vec2 @@ -272,7 +282,7 @@ declare namespace vec2 { * @param a vector to normalize * @returns out */ - export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static normalize(out: vec2, a: vec2 | number[]): vec2; /** * Calculates the dot product of two vec2's @@ -281,7 +291,7 @@ declare namespace vec2 { * @param b the second operand * @returns dot product of a and b */ - export function dot(a: GLM.IArray, b: GLM.IArray): number; + public static dot(a: vec2 | number[], b: vec2 | number[]): number; /** * Computes the cross product of two vec2's @@ -292,7 +302,7 @@ declare namespace vec2 { * @param b the second operand * @returns out */ - export function cross(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static cross(out: vec2, a: vec2 | number[], b: vec2 | number[]): vec2; /** * Performs a linear interpolation between two vec2's @@ -303,7 +313,7 @@ declare namespace vec2 { * @param t interpolation amount between the two inputs * @returns out */ - export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + public static lerp(out: vec2, a: vec2 | number[], b: vec2 | number[], t: number): vec2; /** * Generates a random unit vector @@ -311,7 +321,7 @@ declare namespace vec2 { * @param out the receiving vector * @returns out */ - export function random(out: GLM.IArray): GLM.IArray; + public static random(out: vec2): vec2; /** * Generates a random vector with the given scale @@ -320,7 +330,7 @@ declare namespace vec2 { * @param scale Length of the resulting vector. If ommitted, a unit vector will be returned * @returns out */ - export function random(out: GLM.IArray, scale: number): GLM.IArray; + public static random(out: vec2, scale: number): vec2; /** * Transforms the vec2 with a mat2 @@ -330,7 +340,7 @@ declare namespace vec2 { * @param m matrix to transform with * @returns out */ - export function transformMat2(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static transformMat2(out: vec2, a: vec2 | number[], m: mat2): vec2; /** * Transforms the vec2 with a mat2d @@ -340,7 +350,7 @@ declare namespace vec2 { * @param m matrix to transform with * @returns out */ - export function transformMat2d(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static transformMat2d(out: vec2, a: vec2 | number[], m: mat2d): vec2; /** * Transforms the vec2 with a mat3 @@ -351,7 +361,7 @@ declare namespace vec2 { * @param m matrix to transform with * @returns out */ - export function transformMat3(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static transformMat3(out: vec2, a: vec2 | number[], m: mat3): vec2; /** * Transforms the vec2 with a mat4 @@ -363,7 +373,7 @@ declare namespace vec2 { * @param m matrix to transform with * @returns out */ - export function transformMat4(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static transformMat4(out: vec2, a: vec2 | number[], m: mat4): vec2; /** * Perform some operation over an array of vec2s. @@ -376,8 +386,8 @@ declare namespace vec2 { * @param arg additional argument to pass to fn * @returns a */ - export function forEach(a: GLM.IArray, stride: number, offset: number, count: number, - fn: (a: GLM.IArray, b: GLM.IArray, arg: any) => void, arg: any): GLM.IArray; + public static forEach(a: Float32Array, stride: number, offset: number, count: number, + fn: (a: vec2 | number[], b: vec2 | number[], arg: any) => void, arg: any): Float32Array; /** * Perform some operation over an array of vec2s. @@ -389,27 +399,46 @@ declare namespace vec2 { * @param fn Function to call for each vector in the array * @returns a */ - export function forEach(a: GLM.IArray, stride: number, offset: number, count: number, - fn: (a: GLM.IArray, b: GLM.IArray) => void): GLM.IArray; + public static forEach(a: Float32Array, stride: number, offset: number, count: number, + fn: (a: vec2 | number[], b: vec2 | number[]) => void): Float32Array; /** * Returns a string representation of a vector * - * @param vec vector to represent as a string + * @param a vector to represent as a string * @returns string representation of the vector */ - export function str(a: GLM.IArray): string; + public static str(a: vec2 | number[]): string; + + /** + * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===) + * + * @param {vec2} a The first vector. + * @param {vec2} b The second vector. + * @returns {boolean} True if the vectors are equal, false otherwise. + */ + public static exactEquals (a: vec2 | number[], b: vec2 | number[]): boolean; + + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {vec2} a The first vector. + * @param {vec2} b The second vector. + * @returns {boolean} True if the vectors are equal, false otherwise. + */ + public static equals (a: vec2 | number[], b: vec2 | number[]): boolean; } // vec3 -declare namespace vec3 { +export class vec3 extends Float32Array { + private typeVec3: number; /** * Creates a new, empty vec3 * * @returns a new 3D vector */ - export function create(): GLM.IArray; + public static create(): vec3; /** * Creates a new vec3 initialized with values from an existing vector @@ -417,7 +446,7 @@ declare namespace vec3 { * @param a vector to clone * @returns a new 3D vector */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: vec3 | number[]): vec3; /** * Creates a new vec3 initialized with the given values @@ -427,7 +456,7 @@ declare namespace vec3 { * @param z Z component * @returns a new 3D vector */ - export function fromValues(x: number, y: number, z: number): GLM.IArray; + public static fromValues(x: number, y: number, z: number): vec3; /** * Copy the values from one vec3 to another @@ -436,7 +465,7 @@ declare namespace vec3 { * @param a the source vector * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: vec3, a: vec3 | number[]): vec3; /** * Set the components of a vec3 to the given values @@ -447,7 +476,7 @@ declare namespace vec3 { * @param z Z component * @returns out */ - export function set(out: GLM.IArray, x: number, y: number, z: number): GLM.IArray; + public static set(out: vec3, x: number, y: number, z: number): vec3; /** * Adds two vec3's @@ -457,7 +486,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static add(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Subtracts vector b from vector a @@ -467,7 +496,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function subtract(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static subtract(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Subtracts vector b from vector a @@ -477,7 +506,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function sub(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray + public static sub(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3 /** * Multiplies two vec3's @@ -487,7 +516,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Multiplies two vec3's @@ -497,7 +526,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Divides two vec3's @@ -507,7 +536,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function divide(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static divide(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Divides two vec3's @@ -517,7 +546,25 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function div(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static div(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; + + /** + * Math.ceil the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to ceil + * @returns {vec3} out + */ + public static ceil (out: vec3, a: vec3 | number[]): vec3; + + /** + * Math.floor the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to floor + * @returns {vec3} out + */ + public static floor (out: vec3, a: vec3 | number[]): vec3; /** * Returns the minimum of two vec3's @@ -527,7 +574,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function min(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static min(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Returns the maximum of two vec3's @@ -537,7 +584,16 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function max(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static max(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; + + /** + * Math.round the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to round + * @returns {vec3} out + */ + public static round (out: vec3, a: vec3 | number[]): vec3 /** * Scales a vec3 by a scalar number @@ -547,7 +603,7 @@ declare namespace vec3 { * @param b amount to scale the vector by * @returns out */ - export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + public static scale(out: vec3, a: vec3 | number[], b: number): vec3; /** * Adds two vec3's after scaling the second operand by a scalar value @@ -558,7 +614,7 @@ declare namespace vec3 { * @param scale the amount to scale b by before adding * @returns out */ - export function scaleAndAdd(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, scale: number): GLM.IArray; + public static scaleAndAdd(out: vec3, a: vec3 | number[], b: vec3 | number[], scale: number): vec3; /** * Calculates the euclidian distance between two vec3's @@ -567,7 +623,7 @@ declare namespace vec3 { * @param b the second operand * @returns distance between a and b */ - export function distance(a: GLM.IArray, b: GLM.IArray): number; + public static distance(a: vec3 | number[], b: vec3 | number[]): number; /** * Calculates the euclidian distance between two vec3's @@ -576,7 +632,7 @@ declare namespace vec3 { * @param b the second operand * @returns distance between a and b */ - export function dist(a: GLM.IArray, b: GLM.IArray): number; + public static dist(a: vec3 | number[], b: vec3 | number[]): number; /** * Calculates the squared euclidian distance between two vec3's @@ -585,7 +641,7 @@ declare namespace vec3 { * @param b the second operand * @returns squared distance between a and b */ - export function squaredDistance(a: GLM.IArray, b: GLM.IArray): number; + public static squaredDistance(a: vec3 | number[], b: vec3 | number[]): number; /** * Calculates the squared euclidian distance between two vec3's @@ -594,7 +650,7 @@ declare namespace vec3 { * @param b the second operand * @returns squared distance between a and b */ - export function sqrDist(a: GLM.IArray, b: GLM.IArray): number; + public static sqrDist(a: vec3 | number[], b: vec3 | number[]): number; /** * Calculates the length of a vec3 @@ -602,7 +658,7 @@ declare namespace vec3 { * @param a vector to calculate length of * @returns length of a */ - export function length(a: GLM.IArray): number; + public static length(a: vec3 | number[]): number; /** * Calculates the length of a vec3 @@ -610,7 +666,7 @@ declare namespace vec3 { * @param a vector to calculate length of * @returns length of a */ - export function len(a: GLM.IArray): number; + public static len(a: vec3 | number[]): number; /** * Calculates the squared length of a vec3 @@ -618,7 +674,7 @@ declare namespace vec3 { * @param a vector to calculate squared length of * @returns squared length of a */ - export function squaredLength(a: GLM.IArray): number; + public static squaredLength(a: vec3 | number[]): number; /** * Calculates the squared length of a vec3 @@ -626,7 +682,7 @@ declare namespace vec3 { * @param a vector to calculate squared length of * @returns squared length of a */ - export function sqrLen(a: GLM.IArray): number; + public static sqrLen(a: vec3 | number[]): number; /** * Negates the components of a vec3 @@ -635,7 +691,7 @@ declare namespace vec3 { * @param a vector to negate * @returns out */ - export function negate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static negate(out: vec3, a: vec3 | number[]): vec3; /** * Returns the inverse of the components of a vec3 @@ -644,7 +700,7 @@ declare namespace vec3 { * @param a vector to invert * @returns out */ - export function inverse(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static inverse(out: vec3, a: vec3 | number[]): vec3; /** * Normalize a vec3 @@ -653,7 +709,7 @@ declare namespace vec3 { * @param a vector to normalize * @returns out */ - export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static normalize(out: vec3, a: vec3 | number[]): vec3; /** * Calculates the dot product of two vec3's @@ -662,7 +718,7 @@ declare namespace vec3 { * @param b the second operand * @returns dot product of a and b */ - export function dot(a: GLM.IArray, b: GLM.IArray): number; + public static dot(a: vec3 | number[], b: vec3 | number[]): number; /** * Computes the cross product of two vec3's @@ -672,7 +728,7 @@ declare namespace vec3 { * @param b the second operand * @returns out */ - export function cross(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static cross(out: vec3, a: vec3 | number[], b: vec3 | number[]): vec3; /** * Performs a linear interpolation between two vec3's @@ -683,7 +739,33 @@ declare namespace vec3 { * @param t interpolation amount between the two inputs * @returns out */ - export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + public static lerp(out: vec3, a: vec3 | number[], b: vec3 | number[], t: number): vec3; + + /** + * Performs a hermite interpolation with two control points + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @param {vec3} c the third operand + * @param {vec3} d the fourth operand + * @param {number} t interpolation amount between the two inputs + * @returns {vec3} out + */ + public static hermite (out: vec3, a: vec3 | number[], b: vec3 | number[], c: vec3 | number[], d: vec3 | number[], t: number): vec3; + + /** + * Performs a bezier interpolation with two control points + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @param {vec3} c the third operand + * @param {vec3} d the fourth operand + * @param {number} t interpolation amount between the two inputs + * @returns {vec3} out + */ + public static bezier (out: vec3, a: vec3 | number[], b: vec3 | number[], c: vec3 | number[], d: vec3 | number[], t: number): vec3; /** * Generates a random unit vector @@ -691,46 +773,16 @@ declare namespace vec3 { * @param out the receiving vector * @returns out */ - export function random(out: GLM.IArray): GLM.IArray; + public static random(out: vec3): vec3; /** * Generates a random vector with the given scale * * @param out the receiving vector - * @param [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @param [scale] Length of the resulting vector. If omitted, a unit vector will be returned * @returns out */ - export function random(out: GLM.IArray, scale: number): GLM.IArray; - - /** - * Rotate a 3D vector around the x-axis - * @param out The receiving vec3 - * @param a The vec3 point to rotate - * @param b The origin of the rotation - * @param c The angle of rotation - * @returns out - */ - export function rotateX(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, c: number): GLM.IArray; - - /** - * Rotate a 3D vector around the y-axis - * @param out The receiving vec3 - * @param a The vec3 point to rotate - * @param b The origin of the rotation - * @param c The angle of rotation - * @returns out - */ - export function rotateY(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, c: number): GLM.IArray; - - /** - * Rotate a 3D vector around the z-axis - * @param out The receiving vec3 - * @param a The vec3 point to rotate - * @param b The origin of the rotation - * @param c The angle of rotation - * @returns out - */ - export function rotateZ(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, c: number): GLM.IArray; + public static random(out: vec3, scale: number): vec3; /** * Transforms the vec3 with a mat3. @@ -740,7 +792,7 @@ declare namespace vec3 { * @param m the 3x3 matrix to transform with * @returns out */ - export function transformMat3(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static transformMat3(out: vec3, a: vec3 | number[], m: mat3): vec3; /** * Transforms the vec3 with a mat4. @@ -751,9 +803,9 @@ declare namespace vec3 { * @param m matrix to transform with * @returns out */ - export function transformMat4(out: GLM.IArray, a: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static transformMat4(out: vec3, a: vec3 | number[], m: mat4): vec3; - /** + /** * Transforms the vec3 with a quat * * @param out the receiving vector @@ -761,9 +813,39 @@ declare namespace vec3 { * @param q quaternion to transform with * @returns out */ - export function transformQuat(out: GLM.IArray, a: GLM.IArray, q: GLM.IArray): GLM.IArray; + public static transformQuat(out: vec3, a: vec3 | number[], q: quat): vec3; + /** + * Rotate a 3D vector around the x-axis + * @param out The receiving vec3 + * @param a The vec3 point to rotate + * @param b The origin of the rotation + * @param c The angle of rotation + * @returns out + */ + public static rotateX(out: vec3, a: vec3 | number[], b: vec3 | number[], c: number): vec3; + + /** + * Rotate a 3D vector around the y-axis + * @param out The receiving vec3 + * @param a The vec3 point to rotate + * @param b The origin of the rotation + * @param c The angle of rotation + * @returns out + */ + public static rotateY(out: vec3, a: vec3 | number[], b: vec3 | number[], c: number): vec3; + + /** + * Rotate a 3D vector around the z-axis + * @param out The receiving vec3 + * @param a The vec3 point to rotate + * @param b The origin of the rotation + * @param c The angle of rotation + * @returns out + */ + public static rotateZ(out: vec3, a: vec3 | number[], b: vec3 | number[], c: number): vec3; + /** * Perform some operation over an array of vec3s. * @@ -776,8 +858,8 @@ declare namespace vec3 { * @returns a * @function */ - export function forEach(out: GLM.IArray, string: number, offset: number, count: number, - fn: (a: GLM.IArray, b: GLM.IArray, arg: any) => void, arg: any): GLM.IArray; + public static forEach(a: Float32Array, stride: number, offset: number, count: number, + fn: (a: vec3 | number[], b: vec3 | number[], arg: any) => void, arg: any): Float32Array; /** * Perform some operation over an array of vec3s. @@ -790,8 +872,8 @@ declare namespace vec3 { * @returns a * @function */ - export function forEach(out: GLM.IArray, string: number, offset: number, count: number, - fn: (a: GLM.IArray, b: GLM.IArray) => void): GLM.IArray; + public static forEach(a: Float32Array, stride: number, offset: number, count: number, + fn: (a: vec3 | number[], b: vec3 | number[]) => void): Float32Array; /** * Get the angle between two 3D vectors @@ -799,26 +881,45 @@ declare namespace vec3 { * @param b The second operand * @returns The angle in radians */ - export function angle(a: GLM.IArray, b: GLM.IArray): number; + public static angle(a: vec3 | number[], b: vec3 | number[]): number; /** * Returns a string representation of a vector * - * @param vec vector to represent as a string + * @param a vector to represent as a string * @returns string representation of the vector */ - export function str(a: GLM.IArray): string; + public static str(a: vec3 | number[]): string; + + /** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + * + * @param {vec3} a The first vector. + * @param {vec3} b The second vector. + * @returns {boolean} True if the vectors are equal, false otherwise. + */ + public static exactEquals (a: vec3 | number[], b: vec3 | number[]): boolean + + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {vec3} a The first vector. + * @param {vec3} b The second vector. + * @returns {boolean} True if the vectors are equal, false otherwise. + */ + public static equals (a: vec3 | number[], b: vec3 | number[]): boolean } // vec4 -declare namespace vec4 { +export class vec4 extends Float32Array { + private typeVec3: number; /** * Creates a new, empty vec4 * * @returns a new 4D vector */ - export function create(): GLM.IArray; + public static create(): vec4; /** * Creates a new vec4 initialized with values from an existing vector @@ -826,7 +927,7 @@ declare namespace vec4 { * @param a vector to clone * @returns a new 4D vector */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: vec4 | number[]): vec4; /** * Creates a new vec4 initialized with the given values @@ -837,7 +938,7 @@ declare namespace vec4 { * @param w W component * @returns a new 4D vector */ - export function fromValues(x: number, y: number, z: number, w: number): GLM.IArray; + public static fromValues(x: number, y: number, z: number, w: number): vec4; /** * Copy the values from one vec4 to another @@ -846,7 +947,7 @@ declare namespace vec4 { * @param a the source vector * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: vec4, a: vec4 | number[]): vec4; /** * Set the components of a vec4 to the given values @@ -858,7 +959,7 @@ declare namespace vec4 { * @param w W component * @returns out */ - export function set(out: GLM.IArray, x: number, y: number, z: number, w: number): GLM.IArray; + public static set(out: vec4, x: number, y: number, z: number, w: number): vec4; /** * Adds two vec4's @@ -868,7 +969,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static add(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Subtracts vector b from vector a @@ -878,7 +979,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function subtract(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static subtract(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Subtracts vector b from vector a @@ -888,7 +989,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function sub(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static sub(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Multiplies two vec4's @@ -898,7 +999,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Multiplies two vec4's @@ -908,7 +1009,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Divides two vec4's @@ -918,7 +1019,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function divide(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static divide(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Divides two vec4's @@ -928,7 +1029,25 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function div(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static div(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; + + /** + * Math.ceil the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to ceil + * @returns {vec4} out + */ + public static ceil (out: vec4, a: vec4 | number[]): vec4; + + /** + * Math.floor the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to floor + * @returns {vec4} out + */ + public static floor (out: vec4, a: vec4 | number[]): vec4; /** * Returns the minimum of two vec4's @@ -938,7 +1057,7 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function min(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static min(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; /** * Returns the maximum of two vec4's @@ -948,7 +1067,16 @@ declare namespace vec4 { * @param b the second operand * @returns out */ - export function max(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static max(out: vec4, a: vec4 | number[], b: vec4 | number[]): vec4; + + /** + * Math.round the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to round + * @returns {vec4} out + */ + public static round (out: vec4, a: vec4 | number[]): vec4; /** * Scales a vec4 by a scalar number @@ -958,7 +1086,7 @@ declare namespace vec4 { * @param b amount to scale the vector by * @returns out */ - export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + public static scale(out: vec4, a: vec4 | number[], b: number): vec4; /** * Adds two vec4's after scaling the second operand by a scalar value @@ -969,7 +1097,7 @@ declare namespace vec4 { * @param scale the amount to scale b by before adding * @returns out */ - export function scaleAndAdd(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, scale: number): GLM.IArray; + public static scaleAndAdd(out: vec4, a: vec4 | number[], b: vec4 | number[], scale: number): vec4; /** * Calculates the euclidian distance between two vec4's @@ -978,7 +1106,7 @@ declare namespace vec4 { * @param b the second operand * @returns distance between a and b */ - export function distance(a: GLM.IArray, b: GLM.IArray): number; + public static distance(a: vec4 | number[], b: vec4 | number[]): number; /** * Calculates the euclidian distance between two vec4's @@ -987,7 +1115,7 @@ declare namespace vec4 { * @param b the second operand * @returns distance between a and b */ - export function dist(a: GLM.IArray, b: GLM.IArray): number; + public static dist(a: vec4 | number[], b: vec4 | number[]): number; /** * Calculates the squared euclidian distance between two vec4's @@ -996,7 +1124,7 @@ declare namespace vec4 { * @param b the second operand * @returns squared distance between a and b */ - export function squaredDistance(a: GLM.IArray, b: GLM.IArray): number; + public static squaredDistance(a: vec4 | number[], b: vec4 | number[]): number; /** * Calculates the squared euclidian distance between two vec4's @@ -1005,7 +1133,7 @@ declare namespace vec4 { * @param b the second operand * @returns squared distance between a and b */ - export function sqrDist(a: GLM.IArray, b: GLM.IArray): number; + public static sqrDist(a: vec4 | number[], b: vec4 | number[]): number; /** * Calculates the length of a vec4 @@ -1013,7 +1141,7 @@ declare namespace vec4 { * @param a vector to calculate length of * @returns length of a */ - export function length(a: GLM.IArray): number; + public static length(a: vec4 | number[]): number; /** * Calculates the length of a vec4 @@ -1021,7 +1149,7 @@ declare namespace vec4 { * @param a vector to calculate length of * @returns length of a */ - export function len(a: GLM.IArray): number; + public static len(a: vec4 | number[]): number; /** * Calculates the squared length of a vec4 @@ -1029,7 +1157,7 @@ declare namespace vec4 { * @param a vector to calculate squared length of * @returns squared length of a */ - export function squaredLength(a: GLM.IArray): number; + public static squaredLength(a: vec4 | number[]): number; /** * Calculates the squared length of a vec4 @@ -1037,7 +1165,7 @@ declare namespace vec4 { * @param a vector to calculate squared length of * @returns squared length of a */ - export function sqrLen(a: GLM.IArray): number; + public static sqrLen(a: vec4 | number[]): number; /** * Negates the components of a vec4 @@ -1046,7 +1174,7 @@ declare namespace vec4 { * @param a vector to negate * @returns out */ - export function negate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static negate(out: vec4, a: vec4 | number[]): vec4; /** * Returns the inverse of the components of a vec4 @@ -1055,7 +1183,7 @@ declare namespace vec4 { * @param a vector to invert * @returns out */ - export function inverse(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static inverse(out: vec4, a: vec4 | number[]): vec4; /** * Normalize a vec4 @@ -1064,7 +1192,7 @@ declare namespace vec4 { * @param a vector to normalize * @returns out */ - export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static normalize(out: vec4, a: vec4 | number[]): vec4; /** * Calculates the dot product of two vec4's @@ -1073,7 +1201,7 @@ declare namespace vec4 { * @param b the second operand * @returns dot product of a and b */ - export function dot(a: GLM.IArray, b: GLM.IArray): number; + public static dot(a: vec4 | number[], b: vec4 | number[]): number; /** * Performs a linear interpolation between two vec4's @@ -1084,7 +1212,7 @@ declare namespace vec4 { * @param t interpolation amount between the two inputs * @returns out */ - export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + public static lerp(out: vec4, a: vec4 | number[], b: vec4 | number[], t: number): vec4; /** * Generates a random unit vector @@ -1092,16 +1220,16 @@ declare namespace vec4 { * @param out the receiving vector * @returns out */ - export function random(out: GLM.IArray): GLM.IArray; + public static random(out: vec4): vec4; /** * Generates a random vector with the given scale * * @param out the receiving vector - * @param Length of the resulting vector. If ommitted, a unit vector will be returned + * @param scale length of the resulting vector. If ommitted, a unit vector will be returned * @returns out */ - export function random(out: GLM.IArray, scale: number): GLM.IArray; + public static random(out: vec4, scale: number): vec4; /** * Transforms the vec4 with a mat4. @@ -1111,7 +1239,7 @@ declare namespace vec4 { * @param m matrix to transform with * @returns out */ - export function transformMat4(out: GLM.IArray, a: GLM.IArray, mat: GLM.IArray): GLM.IArray; + public static transformMat4(out: vec4, a: vec4 | number[], m: mat4): vec4; /** * Transforms the vec4 with a quat @@ -1121,7 +1249,8 @@ declare namespace vec4 { * @param q quaternion to transform with * @returns out */ - export function transformQuat(out: GLM.IArray, a: GLM.IArray, quat: GLM.IArray): GLM.IArray; + + public static transformQuat(out: vec4, a: vec4 | number[], q: quat): vec4; /** * Perform some operation over an array of vec4s. @@ -1131,12 +1260,12 @@ declare namespace vec4 { * @param offset Number of elements to skip at the beginning of the array * @param count Number of vec4s to iterate over. If 0 iterates over entire array * @param fn Function to call for each vector in the array - * @param additional argument to pass to fn + * @param arg additional argument to pass to fn * @returns a * @function */ - export function forEach(out: GLM.IArray, string: number, offset: number, count: number, - callback: (a: GLM.IArray, b: GLM.IArray, arg: any) => void, arg: any): GLM.IArray; + public static forEach(a: Float32Array, stride: number, offset: number, count: number, + fn: (a: vec4 | number[], b: vec4 | number[], arg: any) => void, arg: any): Float32Array; /** * Perform some operation over an array of vec4s. @@ -1149,27 +1278,46 @@ declare namespace vec4 { * @returns a * @function */ - export function forEach(out: GLM.IArray, string: number, offset: number, count: number, - callback: (a: GLM.IArray, b: GLM.IArray) => void): GLM.IArray; + public static forEach(a: Float32Array, stride: number, offset: number, count: number, + fn: (a: vec4 | number[], b: vec4 | number[]) => void): Float32Array; /** * Returns a string representation of a vector * - * @param vec vector to represent as a string + * @param a vector to represent as a string * @returns string representation of the vector */ - export function str(a: GLM.IArray): string; + public static str(a: vec4 | number[]): string; + + /** + * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===) + * + * @param {vec4} a The first vector. + * @param {vec4} b The second vector. + * @returns {boolean} True if the vectors are equal, false otherwise. + */ + public static exactEquals (a: vec4 | number[], b: vec4 | number[]): boolean; + + /** + * Returns whether or not the vectors have approximately the same elements in the same position. + * + * @param {vec4} a The first vector. + * @param {vec4} b The second vector. + * @returns {boolean} True if the vectors are equal, false otherwise. + */ + public static equals (a: vec4 | number[], b: vec4 | number[]): boolean; } // mat2 -declare namespace mat2 { +export class mat2 extends Float32Array { + private typeMat2: number; /** * Creates a new identity mat2 * * @returns a new 2x2 matrix */ - export function create(): GLM.IArray; + public static create(): mat2; /** * Creates a new mat2 initialized with values from an existing matrix @@ -1177,7 +1325,7 @@ declare namespace mat2 { * @param a matrix to clone * @returns a new 2x2 matrix */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: mat2): mat2; /** * Copy the values from one mat2 to another @@ -1186,7 +1334,7 @@ declare namespace mat2 { * @param a the source matrix * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: mat2, a: mat2): mat2; /** * Set a mat2 to the identity matrix @@ -1194,7 +1342,30 @@ declare namespace mat2 { * @param out the receiving matrix * @returns out */ - export function identity(out: GLM.IArray): GLM.IArray; + public static identity(out: mat2): mat2; + + /** + * Create a new mat2 with the given values + * + * @param {number} m00 Component in column 0, row 0 position (index 0) + * @param {number} m01 Component in column 0, row 1 position (index 1) + * @param {number} m10 Component in column 1, row 0 position (index 2) + * @param {number} m11 Component in column 1, row 1 position (index 3) + * @returns {mat2} out A new 2x2 matrix + */ + public static fromValues(m00: number, m01: number, m10: number, m11: number): mat2; + + /** + * Set the components of a mat2 to the given values + * + * @param {mat2} out the receiving matrix + * @param {number} m00 Component in column 0, row 0 position (index 0) + * @param {number} m01 Component in column 0, row 1 position (index 1) + * @param {number} m10 Component in column 1, row 0 position (index 2) + * @param {number} m11 Component in column 1, row 1 position (index 3) + * @returns {mat2} out + */ + public static set(out: mat2, m00: number, m01: number, m10: number, m11: number): mat2; /** * Transpose the values of a mat2 @@ -1203,7 +1374,7 @@ declare namespace mat2 { * @param a the source matrix * @returns out */ - export function transpose(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static transpose(out: mat2, a: mat2): mat2; /** * Inverts a mat2 @@ -1212,7 +1383,7 @@ declare namespace mat2 { * @param a the source matrix * @returns out */ - export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static invert(out: mat2, a: mat2): mat2; /** * Calculates the adjugate of a mat2 @@ -1221,7 +1392,7 @@ declare namespace mat2 { * @param a the source matrix * @returns out */ - export function adjoint(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static adjoint(out: mat2, a: mat2): mat2; /** * Calculates the determinant of a mat2 @@ -1229,7 +1400,7 @@ declare namespace mat2 { * @param a the source matrix * @returns determinant of a */ - export function determinant(a: GLM.IArray): number; + public static determinant(a: mat2): number; /** * Multiplies two mat2's @@ -1239,7 +1410,7 @@ declare namespace mat2 { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: mat2, a: mat2, b: mat2): mat2; /** * Multiplies two mat2's @@ -1249,7 +1420,7 @@ declare namespace mat2 { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: mat2, a: mat2, b: mat2): mat2; /** * Rotates a mat2 by the given angle @@ -1259,7 +1430,7 @@ declare namespace mat2 { * @param rad the angle to rotate the matrix by * @returns out */ - export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotate(out: mat2, a: mat2, rad: number): mat2; /** * Scales the mat2 by the dimensions in the given vec2 @@ -1269,7 +1440,33 @@ declare namespace mat2 { * @param v the vec2 to scale the matrix by * @returns out **/ - export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + public static scale(out: mat2, a: mat2, v: vec2 | number[]): mat2; + + /** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2.identity(dest); + * mat2.rotate(dest, dest, rad); + * + * @param {mat2} out mat2 receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ + public static fromRotation(out: mat2, rad: number): mat2; + + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2.identity(dest); + * mat2.scale(dest, dest, vec); + * + * @param {mat2} out mat2 receiving operation result + * @param {vec2} v Scaling vector + * @returns {mat2} out + */ + public static fromScaling(out: mat2, v: vec2 | number[]): mat2; /** * Returns a string representation of a mat2 @@ -1277,7 +1474,7 @@ declare namespace mat2 { * @param a matrix to represent as a string * @returns string representation of the matrix */ - export function str(a: GLM.IArray): string; + public static str(a: mat2): string; /** * Returns Frobenius norm of a mat2 @@ -1285,7 +1482,7 @@ declare namespace mat2 { * @param a the matrix to calculate Frobenius norm of * @returns Frobenius norm */ - export function frob(a: GLM.IArray): number; + public static frob(a: mat2): number; /** * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix @@ -1294,18 +1491,91 @@ declare namespace mat2 { * @param U the upper triangular matrix * @param a the input matrix to factorize */ - export function LDU(L: GLM.IArray, D: GLM.IArray, U: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static LDU(L: mat2, D: mat2, U: mat2, a: mat2): mat2; + + /** + * Adds two mat2's + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the first operand + * @param {mat2} b the second operand + * @returns {mat2} out + */ + public static add(out: mat2, a: mat2, b: mat2): mat2; + + /** + * Subtracts matrix b from matrix a + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the first operand + * @param {mat2} b the second operand + * @returns {mat2} out + */ + public static subtract (out: mat2, a: mat2, b: mat2): mat2; + + /** + * Subtracts matrix b from matrix a + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the first operand + * @param {mat2} b the second operand + * @returns {mat2} out + */ + public static sub (out: mat2, a: mat2, b: mat2): mat2; + + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {mat2} a The first matrix. + * @param {mat2} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static exactEquals (a: mat2, b: mat2): boolean; + + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {mat2} a The first matrix. + * @param {mat2} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static equals (a: mat2, b: mat2): boolean; + + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the matrix to scale + * @param {number} b amount to scale the matrix's elements by + * @returns {mat2} out + */ + public static multiplyScalar (out: mat2, a: mat2, b: number): mat2 + + /** + * Adds two mat2's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2} out the receiving vector + * @param {mat2} a the first operand + * @param {mat2} b the second operand + * @param {number} scale the amount to scale b's elements by before adding + * @returns {mat2} out + */ + public static multiplyScalarAndAdd (out: mat2, a: mat2, b: mat2, scale: number): mat2 + + + } // mat2d -declare namespace mat2d { +export class mat2d extends Float32Array { + private typeMat2d: number; /** * Creates a new identity mat2d * * @returns a new 2x3 matrix */ - export function create(): GLM.IArray; + public static create(): mat2d; /** * Creates a new mat2d initialized with values from an existing matrix @@ -1313,7 +1583,7 @@ declare namespace mat2d { * @param a matrix to clone * @returns a new 2x3 matrix */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: mat2d): mat2d; /** * Copy the values from one mat2d to another @@ -1322,7 +1592,7 @@ declare namespace mat2d { * @param a the source matrix * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: mat2d, a: mat2d): mat2d; /** * Set a mat2d to the identity matrix @@ -1330,7 +1600,35 @@ declare namespace mat2d { * @param out the receiving matrix * @returns out */ - export function identity(out: GLM.IArray): GLM.IArray; + public static identity(out: mat2d): mat2d; + + /** + * Create a new mat2d with the given values + * + * @param {number} a Component A (index 0) + * @param {number} b Component B (index 1) + * @param {number} c Component C (index 2) + * @param {number} d Component D (index 3) + * @param {number} tx Component TX (index 4) + * @param {number} ty Component TY (index 5) + * @returns {mat2d} A new mat2d + */ + public static fromValues (a: number, b: number, c: number, d: number, tx: number, ty: number): mat2d + + + /** + * Set the components of a mat2d to the given values + * + * @param {mat2d} out the receiving matrix + * @param {number} a Component A (index 0) + * @param {number} b Component B (index 1) + * @param {number} c Component C (index 2) + * @param {number} d Component D (index 3) + * @param {number} tx Component TX (index 4) + * @param {number} ty Component TY (index 5) + * @returns {mat2d} out + */ + public static set (out: mat2d, a: number, b: number, c: number, d: number, tx: number, ty: number): mat2d /** * Inverts a mat2d @@ -1339,7 +1637,7 @@ declare namespace mat2d { * @param a the source matrix * @returns out */ - export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static invert(out: mat2d, a: mat2d): mat2d; /** * Calculates the determinant of a mat2d @@ -1347,7 +1645,7 @@ declare namespace mat2d { * @param a the source matrix * @returns determinant of a */ - export function determinant(a: GLM.IArray): number; + public static determinant(a: mat2d): number; /** * Multiplies two mat2d's @@ -1357,7 +1655,7 @@ declare namespace mat2d { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: mat2d, a: mat2d, b: mat2d): mat2d; /** * Multiplies two mat2d's @@ -1367,7 +1665,7 @@ declare namespace mat2d { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: mat2d, a: mat2d, b: mat2d): mat2d; /** * Rotates a mat2d by the given angle @@ -1377,7 +1675,7 @@ declare namespace mat2d { * @param rad the angle to rotate the matrix by * @returns out */ - export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotate(out: mat2d, a: mat2d, rad: number): mat2d; /** * Scales the mat2d by the dimensions in the given vec2 @@ -1387,7 +1685,7 @@ declare namespace mat2d { * @param v the vec2 to scale the matrix by * @returns out **/ - export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + public static scale(out: mat2d, a: mat2d, v: vec2 | number[]): mat2d; /** * Translates the mat2d by the dimensions in the given vec2 @@ -1397,7 +1695,46 @@ declare namespace mat2d { * @param v the vec2 to translate the matrix by * @returns out **/ - export function translate(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + public static translate(out: mat2d, a: mat2d, v: vec2 | number[]): mat2d; + + /** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.rotate(dest, dest, rad); + * + * @param {mat2d} out mat2d receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ + public static fromRotation (out: mat2d, rad: number): mat2d; + + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.scale(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {vec2} v Scaling vector + * @returns {mat2d} out + */ + public static fromScaling (out: mat2d, v: vec2 | number[]): mat2d; + + /** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat2d.identity(dest); + * mat2d.translate(dest, dest, vec); + * + * @param {mat2d} out mat2d receiving operation result + * @param {vec2} v Translation vector + * @returns {mat2d} out + */ + public static fromTranslation (out: mat2d, v: vec2 | number[]): mat2d /** * Returns a string representation of a mat2d @@ -1405,7 +1742,7 @@ declare namespace mat2d { * @param a matrix to represent as a string * @returns string representation of the matrix */ - export function str(a: GLM.IArray): string; + public static str(a: mat2d): string; /** * Returns Frobenius norm of a mat2d @@ -1413,18 +1750,97 @@ declare namespace mat2d { * @param a the matrix to calculate Frobenius norm of * @returns Frobenius norm */ - export function frob(a: GLM.IArray): number; + public static frob(a: mat2d): number; + + /** + * Adds two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the first operand + * @param {mat2d} b the second operand + * @returns {mat2d} out + */ + public static add (out: mat2d, a: mat2d, b: mat2d): mat2d + + /** + * Subtracts matrix b from matrix a + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the first operand + * @param {mat2d} b the second operand + * @returns {mat2d} out + */ + public static subtract(out: mat2d, a: mat2d, b: mat2d): mat2d + + /** + * Subtracts matrix b from matrix a + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the first operand + * @param {mat2d} b the second operand + * @returns {mat2d} out + */ + public static sub(out: mat2d, a: mat2d, b: mat2d): mat2d + + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to scale + * @param {number} b amount to scale the matrix's elements by + * @returns {mat2d} out + */ + public static multiplyScalar (out: mat2d, a: mat2d, b: number): mat2d; + + /** + * Adds two mat2d's after multiplying each element of the second operand by a scalar value. + * + * @param {mat2d} out the receiving vector + * @param {mat2d} a the first operand + * @param {mat2d} b the second operand + * @param {number} scale the amount to scale b's elements by before adding + * @returns {mat2d} out + */ + public static multiplyScalarAndAdd (out: mat2d, a: mat2d, b: mat2d, scale: number): mat2d + + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {mat2d} a The first matrix. + * @param {mat2d} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static exactEquals (a: mat2d, b: mat2d): boolean; + + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {mat2d} a The first matrix. + * @param {mat2d} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static equals (a: mat2d, b: mat2d): boolean } // mat3 -declare namespace mat3 { +export class mat3 extends Float32Array { + private typeMat3: number; /** * Creates a new identity mat3 * * @returns a new 3x3 matrix */ - export function create(): GLM.IArray; + public static create(): mat3; + + /** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param {mat3} out the receiving 3x3 matrix + * @param {mat4} a the source 4x4 matrix + * @returns {mat3} out + */ + public static fromMat4(out: mat3, a: mat4): mat3 /** * Creates a new mat3 initialized with values from an existing matrix @@ -1432,7 +1848,7 @@ declare namespace mat3 { * @param a matrix to clone * @returns a new 3x3 matrix */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: mat3): mat3; /** * Copy the values from one mat3 to another @@ -1441,7 +1857,41 @@ declare namespace mat3 { * @param a the source matrix * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: mat3, a: mat3): mat3; + + /** + * Create a new mat3 with the given values + * + * @param {number} m00 Component in column 0, row 0 position (index 0) + * @param {number} m01 Component in column 0, row 1 position (index 1) + * @param {number} m02 Component in column 0, row 2 position (index 2) + * @param {number} m10 Component in column 1, row 0 position (index 3) + * @param {number} m11 Component in column 1, row 1 position (index 4) + * @param {number} m12 Component in column 1, row 2 position (index 5) + * @param {number} m20 Component in column 2, row 0 position (index 6) + * @param {number} m21 Component in column 2, row 1 position (index 7) + * @param {number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} A new mat3 + */ + public static fromValues(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): mat3; + + + /** + * Set the components of a mat3 to the given values + * + * @param {mat3} out the receiving matrix + * @param {number} m00 Component in column 0, row 0 position (index 0) + * @param {number} m01 Component in column 0, row 1 position (index 1) + * @param {number} m02 Component in column 0, row 2 position (index 2) + * @param {number} m10 Component in column 1, row 0 position (index 3) + * @param {number} m11 Component in column 1, row 1 position (index 4) + * @param {number} m12 Component in column 1, row 2 position (index 5) + * @param {number} m20 Component in column 2, row 0 position (index 6) + * @param {number} m21 Component in column 2, row 1 position (index 7) + * @param {number} m22 Component in column 2, row 2 position (index 8) + * @returns {mat3} out + */ + public static set(out: mat3, m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): mat3 /** * Set a mat3 to the identity matrix @@ -1449,7 +1899,7 @@ declare namespace mat3 { * @param out the receiving matrix * @returns out */ - export function identity(out: GLM.IArray): GLM.IArray; + public static identity(out: mat3): mat3; /** * Transpose the values of a mat3 @@ -1458,7 +1908,7 @@ declare namespace mat3 { * @param a the source matrix * @returns out */ - export function transpose(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static transpose(out: mat3, a: mat3): mat3; /** * Inverts a mat3 @@ -1467,7 +1917,7 @@ declare namespace mat3 { * @param a the source matrix * @returns out */ - export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static invert(out: mat3, a: mat3): mat3; /** * Calculates the adjugate of a mat3 @@ -1476,7 +1926,7 @@ declare namespace mat3 { * @param a the source matrix * @returns out */ - export function adjoint(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static adjoint(out: mat3, a: mat3): mat3; /** * Calculates the determinant of a mat3 @@ -1484,7 +1934,7 @@ declare namespace mat3 { * @param a the source matrix * @returns determinant of a */ - export function determinant(a: GLM.IArray): number; + public static determinant(a: mat3): number; /** * Multiplies two mat3's @@ -1494,7 +1944,7 @@ declare namespace mat3 { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: mat3, a: mat3, b: mat3): mat3; /** * Multiplies two mat3's @@ -1504,71 +1954,8 @@ declare namespace mat3 { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: mat3, a: mat3, b: mat3): mat3; - /** - * Returns a string representation of a mat3 - * - * @param mat matrix to represent as a string - * @returns string representation of the matrix - */ - export function str(mat: GLM.IArray): string; - - /** - * Returns Frobenius norm of a mat3 - * - * @param a the matrix to calculate Frobenius norm of - * @returns Frobenius norm - */ - export function frob(a: GLM.IArray): number; - - /** - * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix - * - * @param out mat3 receiving operation result - * @param a Mat4 to derive the normal matrix from - * - * @returns out - */ - export function normalFromMat4(out: GLM.IArray, a: GLM.IArray): GLM.IArray; - - /** - * Calculates a 3x3 matrix from the given quaternion - * - * @param out mat3 receiving operation result - * @param q Quaternion to create matrix from - * - * @returns out - */ - export function fromQuat(out: GLM.IArray, q: GLM.IArray): GLM.IArray; - - /** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param out the receiving 3x3 matrix - * @param a the source 4x4 matrix - * @returns out - */ - export function fromMat4(out: GLM.IArray, a: GLM.IArray): GLM.IArray; - - /** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param out the receiving matrix - * @param a the matrix to rotate - * @param v the vec2 to scale the matrix by - * @returns out - **/ - export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; - - /** - * Copies the values from a mat2d into a mat3 - * - * @param out the receiving matrix - * @param {mat2d} a the matrix to copy - * @returns out - **/ - export function fromMat2d(out: GLM.IArray, a: GLM.IArray): GLM.IArray; /** * Translate a mat3 by the given vector @@ -1578,7 +1965,7 @@ declare namespace mat3 { * @param v vector to translate by * @returns out */ - export function translate(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + public static translate(out: mat3, a: mat3, v: vec3 | number[]): mat3; /** * Rotates a mat3 by the given angle @@ -1588,18 +1975,182 @@ declare namespace mat3 { * @param rad the angle to rotate the matrix by * @returns out */ - export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotate(out: mat3, a: mat3, rad: number): mat3; + + /** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param out the receiving matrix + * @param a the matrix to rotate + * @param v the vec2 to scale the matrix by + * @returns out + **/ + public static scale(out: mat3, a: mat3, v: vec2 | number[]): mat3; + + /** + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.translate(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {vec2} v Translation vector + * @returns {mat3} out + */ + public static fromTranslation(out: mat3, v: vec2 | number[]): mat3 + + /** + * Creates a matrix from a given angle + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.rotate(dest, dest, rad); + * + * @param {mat3} out mat3 receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ + public static fromRotation(out: mat3, rad: number): mat3 + + /** + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): + * + * mat3.identity(dest); + * mat3.scale(dest, dest, vec); + * + * @param {mat3} out mat3 receiving operation result + * @param {vec2} v Scaling vector + * @returns {mat3} out + */ + public static fromScaling(out: mat3, v: vec2 | number[]): mat3 + + /** + * Copies the values from a mat2d into a mat3 + * + * @param out the receiving matrix + * @param {mat2d} a the matrix to copy + * @returns out + **/ + public static fromMat2d(out: mat3, a: mat2d): mat3; + + /** + * Calculates a 3x3 matrix from the given quaternion + * + * @param out mat3 receiving operation result + * @param q Quaternion to create matrix from + * + * @returns out + */ + public static fromQuat(out: mat3, q: quat): mat3; + + /** + * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix + * + * @param out mat3 receiving operation result + * @param a Mat4 to derive the normal matrix from + * + * @returns out + */ + public static normalFromMat4(out: mat3, a: mat4): mat3; + + /** + * Returns a string representation of a mat3 + * + * @param mat matrix to represent as a string + * @returns string representation of the matrix + */ + public static str(mat: mat3): string; + + /** + * Returns Frobenius norm of a mat3 + * + * @param a the matrix to calculate Frobenius norm of + * @returns Frobenius norm + */ + public static frob(a: mat3): number; + + /** + * Adds two mat3's + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the first operand + * @param {mat3} b the second operand + * @returns {mat3} out + */ + public static add(out: mat3, a: mat3, b: mat3): mat3 + + /** + * Subtracts matrix b from matrix a + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the first operand + * @param {mat3} b the second operand + * @returns {mat3} out + */ + public static subtract(out: mat3, a: mat3, b: mat3): mat3 + + /** + * Subtracts matrix b from matrix a + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the first operand + * @param {mat3} b the second operand + * @returns {mat3} out + */ + public static sub(out: mat3, a: mat3, b: mat3): mat3 + + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to scale + * @param {number} b amount to scale the matrix's elements by + * @returns {mat3} out + */ + public static multiplyScalar(out: mat3, a: mat3, b: number): mat3 + + /** + * Adds two mat3's after multiplying each element of the second operand by a scalar value. + * + * @param {mat3} out the receiving vector + * @param {mat3} a the first operand + * @param {mat3} b the second operand + * @param {number} scale the amount to scale b's elements by before adding + * @returns {mat3} out + */ + public static multiplyScalarAndAdd(out: mat3, a: mat3, b: mat3, scale: number): mat3 + + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {mat3} a The first matrix. + * @param {mat3} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static exactEquals(a: mat3, b: mat3): boolean; + + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {mat3} a The first matrix. + * @param {mat3} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static equals(a: mat3, b: mat3): boolean } // mat4 -declare namespace mat4 { +export class mat4 extends Float32Array { + private typeMat4: number; /** * Creates a new identity mat4 * * @returns a new 4x4 matrix */ - export function create(): GLM.IArray; + public static create(): mat4; /** * Creates a new mat4 initialized with values from an existing matrix @@ -1607,7 +2158,7 @@ declare namespace mat4 { * @param a matrix to clone * @returns a new 4x4 matrix */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: mat4): mat4; /** * Copy the values from one mat4 to another @@ -1616,7 +2167,55 @@ declare namespace mat4 { * @param a the source matrix * @returns out */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: mat4, a: mat4): mat4; + + + /** + * Create a new mat4 with the given values + * + * @param {number} m00 Component in column 0, row 0 position (index 0) + * @param {number} m01 Component in column 0, row 1 position (index 1) + * @param {number} m02 Component in column 0, row 2 position (index 2) + * @param {number} m03 Component in column 0, row 3 position (index 3) + * @param {number} m10 Component in column 1, row 0 position (index 4) + * @param {number} m11 Component in column 1, row 1 position (index 5) + * @param {number} m12 Component in column 1, row 2 position (index 6) + * @param {number} m13 Component in column 1, row 3 position (index 7) + * @param {number} m20 Component in column 2, row 0 position (index 8) + * @param {number} m21 Component in column 2, row 1 position (index 9) + * @param {number} m22 Component in column 2, row 2 position (index 10) + * @param {number} m23 Component in column 2, row 3 position (index 11) + * @param {number} m30 Component in column 3, row 0 position (index 12) + * @param {number} m31 Component in column 3, row 1 position (index 13) + * @param {number} m32 Component in column 3, row 2 position (index 14) + * @param {number} m33 Component in column 3, row 3 position (index 15) + * @returns {mat4} A new mat4 + */ + public static fromValues(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): mat4; + + /** + * Set the components of a mat4 to the given values + * + * @param {mat4} out the receiving matrix + * @param {number} m00 Component in column 0, row 0 position (index 0) + * @param {number} m01 Component in column 0, row 1 position (index 1) + * @param {number} m02 Component in column 0, row 2 position (index 2) + * @param {number} m03 Component in column 0, row 3 position (index 3) + * @param {number} m10 Component in column 1, row 0 position (index 4) + * @param {number} m11 Component in column 1, row 1 position (index 5) + * @param {number} m12 Component in column 1, row 2 position (index 6) + * @param {number} m13 Component in column 1, row 3 position (index 7) + * @param {number} m20 Component in column 2, row 0 position (index 8) + * @param {number} m21 Component in column 2, row 1 position (index 9) + * @param {number} m22 Component in column 2, row 2 position (index 10) + * @param {number} m23 Component in column 2, row 3 position (index 11) + * @param {number} m30 Component in column 3, row 0 position (index 12) + * @param {number} m31 Component in column 3, row 1 position (index 13) + * @param {number} m32 Component in column 3, row 2 position (index 14) + * @param {number} m33 Component in column 3, row 3 position (index 15) + * @returns {mat4} out + */ + public static set(out: mat4, m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): mat4; /** * Set a mat4 to the identity matrix @@ -1624,7 +2223,7 @@ declare namespace mat4 { * @param out the receiving matrix * @returns out */ - export function identity(a: GLM.IArray): GLM.IArray; + public static identity(out: mat4): mat4; /** * Transpose the values of a mat4 @@ -1633,7 +2232,7 @@ declare namespace mat4 { * @param a the source matrix * @returns out */ - export function transpose(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static transpose(out: mat4, a: mat4): mat4; /** * Inverts a mat4 @@ -1642,7 +2241,7 @@ declare namespace mat4 { * @param a the source matrix * @returns out */ - export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static invert(out: mat4, a: mat4): mat4; /** * Calculates the adjugate of a mat4 @@ -1651,7 +2250,7 @@ declare namespace mat4 { * @param a the source matrix * @returns out */ - export function adjoint(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static adjoint(out: mat4, a: mat4): mat4; /** * Calculates the determinant of a mat4 @@ -1659,7 +2258,7 @@ declare namespace mat4 { * @param a the source matrix * @returns determinant of a */ - export function determinant(a: GLM.IArray): number; + public static determinant(a: mat4): number; /** * Multiplies two mat4's @@ -1669,7 +2268,7 @@ declare namespace mat4 { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: mat4, a: mat4, b: mat4): mat4; /** * Multiplies two mat4's @@ -1679,7 +2278,7 @@ declare namespace mat4 { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: mat4, a: mat4, b: mat4): mat4; /** * Translate a mat4 by the given vector @@ -1689,7 +2288,7 @@ declare namespace mat4 { * @param v vector to translate by * @returns out */ - export function translate(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + public static translate(out: mat4, a: mat4, v: vec3 | number[]): mat4; /** * Scales the mat4 by the dimensions in the given vec3 @@ -1699,7 +2298,7 @@ declare namespace mat4 { * @param v the vec3 to scale the matrix by * @returns out **/ - export function scale(out: GLM.IArray, a: GLM.IArray, v: GLM.IArray): GLM.IArray; + public static scale(out: mat4, a: mat4, v: vec3 | number[]): mat4; /** * Rotates a mat4 by the given angle @@ -1710,7 +2309,7 @@ declare namespace mat4 { * @param axis the axis to rotate around * @returns out */ - export function rotate(out: GLM.IArray, a: GLM.IArray, rad: number, axis: GLM.IArray): GLM.IArray; + public static rotate(out: mat4, a: mat4, rad: number, axis: vec3 | number[]): mat4; /** * Rotates a matrix by the given angle around the X axis @@ -1720,7 +2319,7 @@ declare namespace mat4 { * @param rad the angle to rotate the matrix by * @returns out */ - export function rotateX(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotateX(out: mat4, a: mat4, rad: number): mat4; /** * Rotates a matrix by the given angle around the Y axis @@ -1730,7 +2329,7 @@ declare namespace mat4 { * @param rad the angle to rotate the matrix by * @returns out */ - export function rotateY(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotateY(out: mat4, a: mat4, rad: number): mat4; /** * Rotates a matrix by the given angle around the Z axis @@ -1740,78 +2339,87 @@ declare namespace mat4 { * @param rad the angle to rotate the matrix by * @returns out */ - export function rotateZ(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotateZ(out: mat4, a: mat4, rad: number): mat4; /** - * Generates a frustum matrix with the given bounds + * Creates a matrix from a vector translation + * This is equivalent to (but much faster than): * - * @param out mat4 frustum matrix will be written into - * @param left Left bound of the frustum - * @param right Right bound of the frustum - * @param bottom Bottom bound of the frustum - * @param top Top bound of the frustum - * @param near Near bound of the frustum - * @param far Far bound of the frustum - * @returns out + * mat4.identity(dest); + * mat4.translate(dest, dest, vec); + * + * @param {mat4} out mat4 receiving operation result + * @param {vec3} v Translation vector + * @returns {mat4} out */ - export function frustum(out: GLM.IArray, left: number, right: number, - bottom: number, top: number, near: number, far: number): GLM.IArray; + public static fromTranslation(out: mat4, v: vec3 | number[]): mat4 /** - * Generates a perspective projection matrix with the given bounds + * Creates a matrix from a vector scaling + * This is equivalent to (but much faster than): * - * @param out mat4 frustum matrix will be written into - * @param fovy Vertical field of view in radians - * @param aspect Aspect ratio. typically viewport width/height - * @param near Near bound of the frustum - * @param far Far bound of the frustum - * @returns out + * mat4.identity(dest); + * mat4.scale(dest, dest, vec); + * + * @param {mat4} out mat4 receiving operation result + * @param {vec3} v Scaling vector + * @returns {mat4} out */ - export function perspective(out: GLM.IArray, fovy: number, aspect: number, - near: number, far: number): GLM.IArray; + public static fromScaling(out: mat4, v: vec3 | number[]): mat4 /** - * Generates a orthogonal projection matrix with the given bounds + * Creates a matrix from a given angle around a given axis + * This is equivalent to (but much faster than): * - * @param out mat4 frustum matrix will be written into - * @param left Left bound of the frustum - * @param right Right bound of the frustum - * @param bottom Bottom bound of the frustum - * @param top Top bound of the frustum - * @param near Near bound of the frustum - * @param far Far bound of the frustum - * @returns out + * mat4.identity(dest); + * mat4.rotate(dest, dest, rad, axis); + * + * @param {mat4} out mat4 receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @param {vec3} axis the axis to rotate around + * @returns {mat4} out */ - export function ortho(out: GLM.IArray, left: number, right: number, - bottom: number, top: number, near: number, far: number): GLM.IArray; + public static fromRotation(out: mat4, rad: number, axis: vec3 | number[]): mat4 /** - * Generates a look-at matrix with the given eye position, focal point, and up axis + * Creates a matrix from the given angle around the X axis + * This is equivalent to (but much faster than): * - * @param out mat4 frustum matrix will be written into - * @param eye Position of the viewer - * @param center Point the viewer is looking at - * @param up vec3 pointing up - * @returns out + * mat4.identity(dest); + * mat4.rotateX(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @returns {mat4} out */ - export function lookAt(out: GLM.IArray, eye: GLM.IArray, - center: GLM.IArray, up: GLM.IArray): GLM.IArray; + public static fromXRotation(out: mat4, rad: number): mat4 /** - * Returns a string representation of a mat4 + * Creates a matrix from the given angle around the Y axis + * This is equivalent to (but much faster than): * - * @param mat matrix to represent as a string - * @returns string representation of the matrix + * mat4.identity(dest); + * mat4.rotateY(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @returns {mat4} out */ - export function str(mat: GLM.IArray): string; + public static fromYRotation(out: mat4, rad: number): mat4 + /** - * Returns Frobenius norm of a mat4 + * Creates a matrix from the given angle around the Z axis + * This is equivalent to (but much faster than): * - * @param a the matrix to calculate Frobenius norm of - * @returns Frobenius norm + * mat4.identity(dest); + * mat4.rotateZ(dest, dest, rad); + * + * @param {mat4} out mat4 receiving operation result + * @param {number} rad the angle to rotate the matrix by + * @returns {mat4} out */ - export function frob(a: GLM.IArray): number; + public static fromZRotation(out: mat4, rad: number): mat4 /** * Creates a matrix from a quaternion rotation and vector translation @@ -1828,47 +2436,247 @@ declare namespace mat4 { * @param v Translation vector * @returns out */ - export function fromRotationTranslation(out: GLM.IArray, q: GLM.IArray, v: GLM.IArray): GLM.IArray; - - /** - * Creates a matrix from a quaternion rotation, vector translation and vector scale. - * - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * var quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * mat4.scale(dest, scale) - * - * @param out mat4 receiving operation result - * @param q Rotation quaternion - * @param v Translation vector - * @param s Scale vector - * @returns out - */ - export function fromRotationTranslationScale(out: GLM.IArray, q: GLM.IArray, v: GLM.IArray, s: GLM.IArray): GLM.IArray + public static fromRotationTranslation(out: mat4, q: quat, v: vec3 | number[]): mat4; /** - * Creates a matrix from a quaternion + * Returns the translation vector component of a transformation + * matrix. If a matrix is built with fromRotationTranslation, + * the returned vector will be the same as the translation vector + * originally supplied. + * @param {vec3} out Vector to receive translation component + * @param {mat4} mat Matrix to be decomposed (input) + * @return {vec3} out + */ + public static getTranslation(out: vec3, mat: mat4): vec3; + + /** + * Returns a quaternion representing the rotational component + * of a transformation matrix. If a matrix is built with + * fromRotationTranslation, the returned quaternion will be the + * same as the quaternion originally supplied. + * @param {quat} out Quaternion to receive the rotation component + * @param {mat4} mat Matrix to be decomposed (input) + * @return {quat} out + */ + public static getRotation(out: quat, mat: mat4): quat; + + /** + * Creates a matrix from a quaternion rotation, vector translation and vector scale + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * var quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) * * @param out mat4 receiving operation result * @param q Rotation quaternion + * @param v Translation vector + * @param s Scaling vector * @returns out */ - export function fromQuat(out: GLM.IArray, q: GLM.IArray): GLM.IArray; + public static fromRotationTranslationScale(out: mat4, q: quat, v: vec3 | number[], s: vec3 | number[]): mat4; + + /** + * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * mat4.translate(dest, origin); + * var quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * mat4.scale(dest, scale) + * mat4.translate(dest, negativeOrigin); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat} q Rotation quaternion + * @param {vec3} v Translation vector + * @param {vec3} s Scaling vector + * @param {vec3} o The origin vector around which to scale and rotate + * @returns {mat4} out + */ + public static fromRotationTranslationScaleOrigin(out: mat4, q: quat, v: vec3 | number[], s: vec3 | number[], o: vec3 | number[]): mat4 + + /** + * Calculates a 4x4 matrix from the given quaternion + * + * @param {mat4} out mat4 receiving operation result + * @param {quat} q Quaternion to create matrix from + * + * @returns {mat4} out + */ + public static fromQuat(out: mat4, q: quat): mat4 + + /** + * Generates a frustum matrix with the given bounds + * + * @param out mat4 frustum matrix will be written into + * @param left Left bound of the frustum + * @param right Right bound of the frustum + * @param bottom Bottom bound of the frustum + * @param top Top bound of the frustum + * @param near Near bound of the frustum + * @param far Far bound of the frustum + * @returns out + */ + public static frustum(out: mat4, left: number, right: number, + bottom: number, top: number, near: number, far: number): mat4; + + /** + * Generates a perspective projection matrix with the given bounds + * + * @param out mat4 frustum matrix will be written into + * @param fovy Vertical field of view in radians + * @param aspect Aspect ratio. typically viewport width/height + * @param near Near bound of the frustum + * @param far Far bound of the frustum + * @returns out + */ + public static perspective(out: mat4, fovy: number, aspect: number, + near: number, far: number): mat4; + + /** + * Generates a perspective projection matrix with the given field of view. + * This is primarily useful for generating projection matrices to be used + * with the still experimental WebVR API. + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ + public static perspectiveFromFieldOfView(out: mat4, + fov:{upDegrees: number, downDegrees: number, leftDegrees: number, rightDegrees: number}, + near: number, far: number): mat4 + + /** + * Generates a orthogonal projection matrix with the given bounds + * + * @param out mat4 frustum matrix will be written into + * @param left Left bound of the frustum + * @param right Right bound of the frustum + * @param bottom Bottom bound of the frustum + * @param top Top bound of the frustum + * @param near Near bound of the frustum + * @param far Far bound of the frustum + * @returns out + */ + public static ortho(out: mat4, left: number, right: number, + bottom: number, top: number, near: number, far: number): mat4; + + /** + * Generates a look-at matrix with the given eye position, focal point, and up axis + * + * @param out mat4 frustum matrix will be written into + * @param eye Position of the viewer + * @param center Point the viewer is looking at + * @param up vec3 pointing up + * @returns out + */ + public static lookAt(out: mat4, eye: vec3 | number[], center: vec3 | number[], up: vec3 | number[]): mat4; + + /** + * Returns a string representation of a mat4 + * + * @param mat matrix to represent as a string + * @returns string representation of the matrix + */ + public static str(mat: mat4): string; + + /** + * Returns Frobenius norm of a mat4 + * + * @param a the matrix to calculate Frobenius norm of + * @returns Frobenius norm + */ + public static frob(a: mat4): number; + + /** + * Adds two mat4's + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the first operand + * @param {mat4} b the second operand + * @returns {mat4} out + */ + public static add(out: mat4, a: mat4, b: mat4): mat4 + + /** + * Subtracts matrix b from matrix a + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the first operand + * @param {mat4} b the second operand + * @returns {mat4} out + */ + public static subtract(out: mat4, a: mat4, b: mat4): mat4 + + /** + * Subtracts matrix b from matrix a + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the first operand + * @param {mat4} b the second operand + * @returns {mat4} out + */ + public static sub(out: mat4, a: mat4, b: mat4): mat4 + + /** + * Multiply each element of the matrix by a scalar. + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to scale + * @param {number} b amount to scale the matrix's elements by + * @returns {mat4} out + */ + public static multiplyScalar(out: mat4, a: mat4, b: number): mat4 + + /** + * Adds two mat4's after multiplying each element of the second operand by a scalar value. + * + * @param {mat4} out the receiving vector + * @param {mat4} a the first operand + * @param {mat4} b the second operand + * @param {number} scale the amount to scale b's elements by before adding + * @returns {mat4} out + */ + public static multiplyScalarAndAdd (out: mat4, a: mat4, b: mat4, scale: number): mat4 + + /** + * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===) + * + * @param {mat4} a The first matrix. + * @param {mat4} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static exactEquals (a: mat4, b: mat4): boolean + + /** + * Returns whether or not the matrices have approximately the same elements in the same position. + * + * @param {mat4} a The first matrix. + * @param {mat4} b The second matrix. + * @returns {boolean} True if the matrices are equal, false otherwise. + */ + public static equals (a: mat4, b: mat4): boolean + } // quat -declare namespace quat { +export class quat extends Float32Array { + private typeQuat: number; /** * Creates a new identity quat * * @returns a new quaternion */ - export function create(): GLM.IArray; + public static create(): quat; /** * Creates a new quat initialized with values from an existing quaternion @@ -1877,7 +2685,7 @@ declare namespace quat { * @returns a new quaternion * @function */ - export function clone(a: GLM.IArray): GLM.IArray; + public static clone(a: quat): quat; /** * Creates a new quat initialized with the given values @@ -1889,7 +2697,7 @@ declare namespace quat { * @returns a new quaternion * @function */ - export function fromValues(x: number, y: number, z: number, w: number): GLM.IArray; + public static fromValues(x: number, y: number, z: number, w: number): quat; /** * Copy the values from one quat to another @@ -1899,7 +2707,7 @@ declare namespace quat { * @returns out * @function */ - export function copy(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static copy(out: quat, a: quat): quat; /** * Set the components of a quat to the given values @@ -1912,7 +2720,7 @@ declare namespace quat { * @returns out * @function */ - export function set(out: GLM.IArray, x: number, y: number, z: number, w: number): GLM.IArray; + public static set(out: quat, x: number, y: number, z: number, w: number): quat; /** * Set a quat to the identity quaternion @@ -1920,7 +2728,34 @@ declare namespace quat { * @param out the receiving quaternion * @returns out */ - export function identity(out: GLM.IArray): GLM.IArray; + public static identity(out: quat): quat; + + /** + * Sets a quaternion to represent the shortest rotation from one + * vector to another. + * + * Both vectors are assumed to be unit length. + * + * @param {quat} out the receiving quaternion. + * @param {vec3} a the initial vector + * @param {vec3} b the destination vector + * @returns {quat} out + */ + public static rotationTo (out: quat, a: vec3 | number[], b: vec3 | number[]): quat; + + /** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + * + * @param {vec3} view the vector representing the viewing direction + * @param {vec3} right the vector representing the local "right" direction + * @param {vec3} up the vector representing the local "up" direction + * @returns {quat} out + */ + public static setAxes (out: quat, view: vec3 | number[], right: vec3 | number[], up: vec3 | number[]): quat + + /** * Sets a quat from the given angle and rotation axis, @@ -1931,7 +2766,22 @@ declare namespace quat { * @param rad the angle in radians * @returns out **/ - export function setAxisAngle(out: GLM.IArray, axis: GLM.IArray, rad: number): GLM.IArray; + public static setAxisAngle(out: quat, axis: vec3 | number[], rad: number): quat; + + /** + * Gets the rotation axis and angle for a given + * quaternion. If a quaternion is created with + * setAxisAngle, this method will return the same + * values as providied in the original parameter list + * OR functionally equivalent values. + * Example: The quaternion formed by axis [0, 0, 1] and + * angle -90 is the same as the quaternion formed by + * [0, 0, 1] and 270. This method favors the latter. + * @param {vec3} out_axis Vector receiving the axis of rotation + * @param {quat} q Quaternion to be decomposed + * @return {number} Angle, in radians, of the rotation + */ + public static getAxisAngle (out_axis: vec3 | number[], q: quat): number /** * Adds two quat's @@ -1942,7 +2792,7 @@ declare namespace quat { * @returns out * @function */ - export function add(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static add(out: quat, a: quat, b: quat): quat; /** * Multiplies two quat's @@ -1952,7 +2802,7 @@ declare namespace quat { * @param b the second operand * @returns out */ - export function multiply(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static multiply(out: quat, a: quat, b: quat): quat; /** * Multiplies two quat's @@ -1962,7 +2812,7 @@ declare namespace quat { * @param b the second operand * @returns out */ - export function mul(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static mul(out: quat, a: quat, b: quat): quat; /** * Scales a quat by a scalar number @@ -1973,7 +2823,7 @@ declare namespace quat { * @returns out * @function */ - export function scale(out: GLM.IArray, a: GLM.IArray, b: number): GLM.IArray; + public static scale(out: quat, a: quat, b: number): quat; /** * Calculates the length of a quat @@ -1982,7 +2832,7 @@ declare namespace quat { * @returns length of a * @function */ - export function length(a: GLM.IArray): number; + public static length(a: quat): number; /** * Calculates the length of a quat @@ -1991,7 +2841,7 @@ declare namespace quat { * @returns length of a * @function */ - export function len(a: GLM.IArray): number; + public static len(a: quat): number; /** * Calculates the squared length of a quat @@ -2000,7 +2850,7 @@ declare namespace quat { * @returns squared length of a * @function */ - export function squaredLength(a: GLM.IArray): number; + public static squaredLength(a: quat): number; /** * Calculates the squared length of a quat @@ -2009,7 +2859,7 @@ declare namespace quat { * @returns squared length of a * @function */ - export function sqrLen(a: GLM.IArray): number; + public static sqrLen(a: quat): number; /** * Normalize a quat @@ -2019,7 +2869,7 @@ declare namespace quat { * @returns out * @function */ - export function normalize(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static normalize(out: quat, a: quat): quat; /** * Calculates the dot product of two quat's @@ -2029,7 +2879,7 @@ declare namespace quat { * @returns dot product of a and b * @function */ - export function dot(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): number; + public static dot(a: quat, b: quat): number; /** * Performs a linear interpolation between two quat's @@ -2041,7 +2891,7 @@ declare namespace quat { * @returns out * @function */ - export function lerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + public static lerp(out: quat, a: quat, b: quat, t: number): quat; /** * Performs a spherical linear interpolation between two quat @@ -2052,7 +2902,20 @@ declare namespace quat { * @param t interpolation amount between the two inputs * @returns out */ - export function slerp(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray, t: number): GLM.IArray; + public static slerp(out: quat, a: quat, b: quat, t: number): quat; + + /** + * Performs a spherical linear interpolation with two control points + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @param {quat} c the third operand + * @param {quat} d the fourth operand + * @param {number} t interpolation amount + * @returns {quat} out + */ + public static sqlerp(out: quat, a: quat, b: quat, c: quat, d: quat, t: number): quat; /** * Calculates the inverse of a quat @@ -2061,7 +2924,7 @@ declare namespace quat { * @param a quat to calculate inverse of * @returns out */ - export function invert(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static invert(out: quat, a: quat): quat; /** * Calculates the conjugate of a quat @@ -2071,15 +2934,15 @@ declare namespace quat { * @param a quat to calculate conjugate of * @returns out */ - export function conjugate(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static conjugate(out: quat, a: quat): quat; /** - * Returns a string representation of a quatenion + * Returns a string representation of a quaternion * - * @param vec vector to represent as a string - * @returns string representation of the vector + * @param a quat to represent as a string + * @returns string representation of the quat */ - export function str(a: GLM.IArray): string; + public static str(a: quat): string; /** * Rotates a quaternion by the given angle about the X axis @@ -2089,7 +2952,7 @@ declare namespace quat { * @param rad angle (in radians) to rotate * @returns out */ - export function rotateX(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotateX(out: quat, a: quat, rad: number): quat; /** * Rotates a quaternion by the given angle about the Y axis @@ -2099,7 +2962,7 @@ declare namespace quat { * @param rad angle (in radians) to rotate * @returns out */ - export function rotateY(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotateY(out: quat, a: quat, rad: number): quat; /** * Rotates a quaternion by the given angle about the Z axis @@ -2109,7 +2972,7 @@ declare namespace quat { * @param rad angle (in radians) to rotate * @returns out */ - export function rotateZ(out: GLM.IArray, a: GLM.IArray, rad: number): GLM.IArray; + public static rotateZ(out: quat, a: quat, rad: number): quat; /** * Creates a quaternion from the given 3x3 rotation matrix. @@ -2122,20 +2985,20 @@ declare namespace quat { * @returns out * @function */ - export function fromMat3(out: GLM.IArray, m: GLM.IArray): GLM.IArray; + public static fromMat3(out: quat, m: mat3): quat; /** * Sets the specified quaternion with values corresponding to the given * axes. Each axis is a vec3 and is expected to be unit length and * perpendicular to all other specified axes. * + * @param out the receiving quat * @param view the vector representing the viewing direction * @param right the vector representing the local "right" direction * @param up the vector representing the local "up" direction * @returns out */ - export function setAxes(out: GLM.IArray, view: GLM.IArray, right: GLM.IArray, - up: GLM.IArray): GLM.IArray; + public static setAxes(out: quat, view: vec3 | number[], right: vec3 | number[], up: vec3 | number[]): quat; /** * Sets a quaternion to represent the shortest rotation from one @@ -2148,7 +3011,7 @@ declare namespace quat { * @param b the destination vector * @returns out */ - export function rotationTo(out: GLM.IArray, a: GLM.IArray, b: GLM.IArray): GLM.IArray; + public static rotationTo(out: quat, a: vec3 | number[], b: vec3 | number[]): quat; /** * Calculates the W component of a quat from the X, Y, and Z components. @@ -2159,5 +3022,23 @@ declare namespace quat { * @param a quat to calculate W component of * @returns out */ - export function calculateW(out: GLM.IArray, a: GLM.IArray): GLM.IArray; + public static calculateW(out: quat, a: quat): quat; + + /** + * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===) + * + * @param {quat} a The first vector. + * @param {quat} b The second vector. + * @returns {boolean} True if the quaternions are equal, false otherwise. + */ + public static exactEquals (a: quat, b: quat): boolean; + + /** + * Returns whether or not the quaternions have approximately the same elements in the same position. + * + * @param {quat} a The first vector. + * @param {quat} b The second vector. + * @returns {boolean} True if the quaternions are equal, false otherwise. + */ + public static equals (a: quat, b: quat): boolean; } diff --git a/google-earth/google-earth-tests.ts b/google-earth/google-earth-tests.ts new file mode 100644 index 0000000000..6c9d4df1bf --- /dev/null +++ b/google-earth/google-earth-tests.ts @@ -0,0 +1,131 @@ +/// + +google.load("earth", "1", {"other_params":"sensor=true_or_false"}); + +google.earth.createInstance("map3d", initCB, failureCB); + +function failureCB(error: any) {} + +function initCB(ge: google.earth.GEPlugin) { + + ge.getWindow().setVisibility(true); + + + // Create the placemark. + var placemark = ge.createPlacemark(''); + placemark.setName("placemark"); + + // Set the placemark's location. + var point = ge.createPoint(''); + point.setLatitude(12.345); + point.setLongitude(54.321); + placemark.setGeometry(point); + + // Create a style map. + var styleMap = ge.createStyleMap(''); + + // Create normal style for style map. + var normalStyle = ge.createStyle(''); + var normalIcon = ge.createIcon(''); + normalIcon.setHref('http://maps.google.com/mapfiles/kml/paddle/red-circle.png'); + normalStyle.getIconStyle().setIcon(normalIcon); + + // Create highlight style for style map. + var highlightStyle = ge.createStyle(''); + var highlightIcon = ge.createIcon(''); + highlightIcon.setHref('http://google-maps-icons.googlecode.com/files/girlfriend.png'); + highlightStyle.getIconStyle().setIcon(highlightIcon); + highlightStyle.getIconStyle().setScale(5.0); + + styleMap.setNormalStyle(normalStyle); + styleMap.setHighlightStyle(highlightStyle); + + // Apply stylemap to a placemark. + placemark.setStyleSelector(styleMap); + + //Add the placemark to Earth. + ge.getFeatures().appendChild(placemark); + + + // balloons + var balloon = ge.createHtmlDivBalloon(''); + balloon.setFeature(placemark); + var div = document.createElement('DIV'); + div.innerHTML = 'Any HTML, CSS, or JavaScript goes here.'; + balloon.setContentDiv(div); + ge.setBalloon(balloon); + + // Create the ScreenOverlay + var screenOverlay = ge.createScreenOverlay(''); + + // Specify a path to the image and set as the icon + var icon = ge.createIcon(''); + icon.setHref('http://www.google.com/intl/en_ALL/images/logo.gif'); + screenOverlay.setIcon(icon); + + // Set the ScreenOverlay's position in the window + screenOverlay.getOverlayXY().setXUnits(ge.UNITS_PIXELS); + screenOverlay.getOverlayXY().setYUnits(ge.UNITS_PIXELS); + screenOverlay.getOverlayXY().setX(200); + screenOverlay.getOverlayXY().setY(200); + + // Set the overlay's size in pixels + screenOverlay.getSize().setXUnits(ge.UNITS_PIXELS); + screenOverlay.getSize().setYUnits(ge.UNITS_PIXELS); + screenOverlay.getSize().setX(250); + screenOverlay.getSize().setY(75); + + // Specify the point in the image around which to rotate + screenOverlay.getRotationXY().setXUnits(ge.UNITS_FRACTION); + screenOverlay.getRotationXY().setYUnits(ge.UNITS_FRACTION); + screenOverlay.getRotationXY().setX(0.5); + screenOverlay.getRotationXY().setY(0.5); + + // Rotate the overlay + screenOverlay.setRotation(25); + + // Add the ScreenOverlay to Earth + ge.getFeatures().appendChild(screenOverlay); + + + // network link + var link = ge.createLink(''); + var href = 'http://code.google.com/' + + 'apis/earth/documentation/samples/kml_example.kml' + link.setHref(href); + + var networkLink = ge.createNetworkLink(''); + networkLink.set(link, true, true); // Sets the link, refreshVisibility, and flyToView + + ge.getFeatures().appendChild(networkLink); + + // Get the current view. + var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND); + + // Set new latitude and longitude values. + lookAt.setLatitude(36.584207); + lookAt.setLongitude(-121.754322); + + // Update the view in Google Earth. + ge.getView().setAbstractView(lookAt); + + // time + ge.getTime().getControl().setVisibility(ge.VISIBILITY_SHOW); + ge.getTime().setHistoricalImageryEnabled(true); + var extents = ge.getTime().getControl().getExtents(); + var begin = extents.getBegin().get(); + var end = extents.getEnd().get(); + + // tour + ge.getTourPlayer().play(); + + + // controls + ge.getNavigationControl().getScreenXY().setXUnits(ge.UNITS_INSET_PIXELS); + ge.getNavigationControl().getScreenXY().setYUnits(ge.UNITS_PIXELS); + + + // sky + ge.getOptions().setMapType(ge.MAP_TYPE_SKY); + ge.getOptions().setMapType(ge.MAP_TYPE_EARTH); +} diff --git a/google-earth/google-earth.d.ts b/google-earth/google-earth.d.ts new file mode 100644 index 0000000000..d0adc8c04e --- /dev/null +++ b/google-earth/google-earth.d.ts @@ -0,0 +1,3978 @@ +// Type definitions for Google Earth Plugin +// Project: https://developers.google.com/earth/ +// Definitions by: Ilia Choly +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace google { + + export function load( + moduleName: string, + moduleVersion: string, + optionalSettings?: any + ): void; +} + +declare namespace google.earth { + + /** + * Specifies the current stage of the flow of events. + */ + export type GEEventPhaseEnum = any; + + /** + * Specifies how a feature should be displayed in a list view. + */ + export type KmlListItemTypeEnum = any; + + /** + * Specifies which color mode effect to apply to the base color. + */ + export type KmlColorModeEnum = any; + + /* + * Specifies how the altitude property is interpreted. + */ + export type KmlAltitudeModeEnum = any; + + /** + * Specifies how the link is refreshed. + */ + export type KmlRefreshModeEnum = any; + + /** + * Specifies how the link is refreshed when the viewport changes. + */ + export type KmlViewRefreshModeEnum = any; + + /** + * Specifies which units a value is specified in. + */ + type KmlUnitsEnum = any; + + /** + * Specifies if the map type is Earth or sky mode. + */ + type GEMapTypeEnum = any; + + /** + * Specifies if a control is always visible, always hidden, + * or visible only when the user intends to use the control. + */ + type GEVisibilityEnum = any; + + /** + * Specifies what to sample when performing a hit test. + */ + type GEHitTestModeEnum = any; + + /** + * Specifies the size of the navigation control. + */ + type GENavigationControlEnum = any; + + /** + * Specifies the state of viewer options, including sunlight, + * Street View, and historical imagery. + */ + type GEViewerOptionsValueEnum = any; + + /* + * Specifies the viewer option types. + */ + type GEViewerOptionsTypeEnum = any; + + /** + * Whether or not the Google Earth Browser Plug-in and API are supported on the current browser and operating system. + */ + export function isSupported(): boolean; + + /** + * Whether or not the Google Earth Browser Plug-in is currently installed on the user's machine. + * + * Note: if the plug-in is not installed, the user will be presented with a 'download' link upon calls to google.earth.createInstance(). + */ + export function isInstalled(): boolean; + + /** + * Attempts to create an instance of the plugin under the given web browser HTML DOM node. + * Upon success, calls the function passed in as the initCallback argument. + * Upon failure, calls the function passed in as the failureCallback argument and displays an error message to the user in place of the plug-in object. + * + * Note: + * + * The HTML DOM must be loaded before this function can be called. + * Common usage is to call this function upon the 's load event, or to use google.setOnLoadCallback. + */ + export function createInstance( + domNode: string|Element, + initCallback: (plugin: GEPlugin) => void, + failureCallback: (error: any) => void, + options?: any + ): void; + + /** + * Attaches a listener to a given object for a specific event; when the event occurs on the object, the given callback is invoked. + */ + export function addEventListener( + targetObject: any, + eventID: string, + listenerCallback: (event: KmlEvent) => void, + useCapture?: boolean + ): void; + + /** + * Removes an event listener previously added using google.earth.addEventListener() from the event chain. + * + * Note: + * + * You must pass in the exact same function object as was passed to addEventListener. + * If you are using an anonymous function callback, it will need to be refactored into its own variable. + */ + export function removeEventListener( + targetObject: any, + eventID: string, + listenerCallback: (event: KmlEvent) => void, + useCapture?: boolean + ): void; + + /** + * Retrieves and parses a KML or KMZ file at the given URL and returns an instance of a KmlFeature-derived class representing the parsed KML object model. + * + * Note: This function does not display the feature on the Earth. See below for more information. + */ + export function fetchKml( + pluginInstance: GEPlugin, + url: string, + completionCallback: (feature: KmlFeature) => void + ): void; + + /** + * Efficiently executes an arbitrary, user-defined function (the batch function), minimizing the amount of overhead incurred during cross-process communication between the web browser and Google Earth Plugin. + * This method is useful for batching together a large set of calls to the Earth API, for example, a large number of consecutive calls to KmlCoordArray.pushLatLngAlt. + */ + export function executeBatch(pluginInstance: GEPlugin, batchFunction: Function): void; + + /** + * Sets the language to be used for new instances of the plugin. + * Needs to be called before google.earth.createInstance(). + * Affects road and border labels, the error message displayed when the plugin fails to load, as well as the language of the Terms of Use page linked from the plugin. + */ + export function setLanguage(languageCode: string): void; + + /** + * This interface enables programmatic and user-driven interaction with photo overlays in the Google Earth Plugin. + * + * Note: This interface is still under development. + */ + export class GEPhotoOverlayViewer { + + /** + * Enters the given photo overlay object, exiting any other currently active photo overlay. + * If the argument is null, then any currently active photo overlay is exited and normal global navigation is enabled. + */ + setPhotoOverlay(photoOverlay: KmlPhotoOverlay): void; + } + + /** + * Used to manipulate the navigation controls in Google Earth. + */ + export class GENavigationControl { + + /** + * Whether the control is always visible, always hidden, or visible only when the user intends to use the control. + * + * See also: + * + * * GEPlugin.VISIBILITY_SHOW + * * GEPlugin.VISIBILITY_HIDE + * * GEPlugin.VISIBILITY_AUTO + */ + getVisibility(): GEVisibilityEnum; + + /** + * Whether the control is always visible, always hidden, or visible only when the user intends to use the control. + * + * See also: + * + * * GEPlugin.VISIBILITY_SHOW + * * GEPlugin.VISIBILITY_HIDE + * * GEPlugin.VISIBILITY_AUTO + */ + setVisibility(visibility: GEVisibilityEnum): void; + + /** + * Specifies the size of the navigation control. + * + * See also: + * + * * GEPlugin.NAVIGATION_CONTROL_LARGE + * * GEPlugin.NAVIGATION_CONTROL_SMALL + */ + getControlType(): GENavigationControlEnum; + + /** + * Specifies the size of the navigation control. + * + * See also: + * + * * GEPlugin.NAVIGATION_CONTROL_LARGE + * * GEPlugin.NAVIGATION_CONTROL_SMALL + */ + setControlType(controlType: GENavigationControlEnum): void; + + /** + * The position of the navigation controls in Google Earth + */ + getScreenXY(): KmlVec2; + + /** + * Enables or disables user-initiated entry to Street View imagery. + * When true, the Pegman icon is present in the navigation controls, allowing a user to drag the Pegman onto a street to initiate Street View. + * Users can also zoom down to ground level to enter Street View when this is set to true. + */ + setStreetViewEnabled(streetViewEnabled: boolean): void; + + /** + * Whether Street View is enabled in the navigation controls. + */ + getStreetViewEnabled(): boolean; + } + + /** + * Defines a tour, which is a playlist of scripted camera and update events. + * + * Note: This interface is still under development. + */ + export class KmlTour extends KmlFeature {} + + /** + * This interface enables programmatic and user-driven interaction with KML tours in the Google Earth Plugin. + * + * Note: This interface is still under development. + */ + export class GETourPlayer { + + /** + * Enters the given tour object, exiting any other currently active tour. + * This method does not automatically begin playing the tour. + * If the argument is null, then any currently active tour is exited and normal globe navigation is enabled. + */ + setTour(tour: KmlTour): void; + + /** + * Plays the currently active tour. + */ + play(): void; + + /** + * Pauses the currently active tour. + */ + pause(): void; + + /** + * Resets the currently active tour, stopping playback and rewinding to the start of the tour. + */ + reset(): void; + + /** + * The current elapsed playing time of the active tour, in seconds. + */ + getCurrentTime(): number; + + /** + * The current elapsed playing time of the active tour, in seconds. + */ + setCurrentTime(currentTime: number): void; + + /** + * The total duration of the active tour, in seconds. If no tour is loaded, the behavior of this method is undefined. + */ + getDuration(): number; + } + + /** + * This interface contains result information obtained by calling GEView's hitTest method. + * + * See also: + * + * * GEView.hitTest + */ + export class GEHitTestResult { + + /** + * Latitude of sampled point. + */ + getLatitude(): number; + + /** + * Latitude of sampled point. + */ + setLatitude(latitude: number): void; + + /** + * Longitude of sampled point. + */ + getLongitude(): number; + + /** + * Longitude of sampled point. + */ + setLongitude(longitude: number): void; + + /** + * Altitude of sampled point. + */ + getAltitude(): number; + + /** + * Altitude of sampled point. + */ + setAltitude(altitude: number): void; + } + + /** + * Maps between two different icon styles. + * Typically this interface is used to provide separate normal and highlighted styles for a placemark, so that the highlighted version appears when the user mouses over the icon. + */ + export class KmlStyleMap extends KmlStyleSelector { + + /** + * Sets both URLs for the placemark style. + */ + setUrl(normalStyleUrl: string, highlightStyleUrl: string): void; + + /** + * Sets both placemark styles. + */ + setStyle(normalStyle: KmlStyle, highlightStyle: KmlStyle): void; + + /** + * Defines a normal style for a placemark. + */ + getNormalStyleUrl(): string; + + /** + * Defines a normal style for a placemark. + */ + setNormalStyleUrl(normalStyleUrl: string): void; + + /** + * Defines highlighted styles for a placemark, so that the highlighted version appears when the user mouses over the icon in Google Earth. + */ + getHighlightStyleUrl(): string; + + /** + * Defines highlighted styles for a placemark, so that the highlighted version appears when the user mouses over the icon in Google Earth. + */ + setHighlightStyleUrl(highlightStyleUrl: string): void; + + /** + * Defines a normal style for a placemark. + */ + getNormalStyle(): KmlStyle; + + /** + * Defines a normal style for a placemark. + */ + setNormalStyle(normalStyle: KmlStyle): void; + + /** + * Defines highlighted styles for a placemark, so that the highlighted version appears when the user mouses over the icon in Google Earth. + */ + getHighlightStyle(): KmlStyle; + + /** + * Defines highlighted styles for a placemark, so that the highlighted version appears when the user mouses over the icon in Google Earth. + */ + setHighlightStyle(highlightStyle: KmlStyle): void; + } + + /** + * References a KML file or KMZ archive on a remote network. + * Use the Link property to specify the location of the KML file. + * Within that property, you can define the refresh options for updating the file, based on time and camera change. + * NetworkLinks can be used in combination with Regions to handle very large datasets efficiently. + */ + export class KmlNetworkLink extends KmlFeature { + + /** + * Sets the link, refreshVisibility, and flyToView for the network link. + */ + set(link: KmlLink, refreshVisibility: boolean, flyToView: boolean): void; + + /** + * Specifies the location of any of the following: + * + * * KML files fetched by network links + * * Image files used by icons in icon styles, ground overlays, and screen overlays + * * Model files used in the Model object + */ + getLink(): KmlLink; + + /** + * Specifies the location of any of the following: + * + * * KML files fetched by network links + * * Image files used by icons in icon styles, ground overlays, and screen overlays + * * Model files used in the Model object + */ + setLink(link: KmlLink): void; + + /** + * A value of 0 leaves the visibility of features within the control of the Google Earth user. + * Set the value to 1 to reset the visibility of features each time the NetworkLink is refreshed. + * For example, suppose a Placemark within the linked KML file has visibility set to 1 and the NetworkLink has refreshVisibility set to 1. + * When the file is first loaded into Google Earth, the user can clear the check box next to the item to turn off display in the 3D viewer. + * However, when the NetworkLink is refreshed, the Placemark will be made visible again, since its original visibility state was TRUE. + */ + getRefreshVisibility(): boolean; + + /** + * A value of 0 leaves the visibility of features within the control of the Google Earth user. + * Set the value to 1 to reset the visibility of features each time the NetworkLink is refreshed. + * For example, suppose a Placemark within the linked KML file has visibility set to 1 and the NetworkLink has refreshVisibility set to 1. + * When the file is first loaded into Google Earth, the user can clear the check box next to the item to turn off display in the 3D viewer. + * However, when the NetworkLink is refreshed, the Placemark will be made visible again, since its original visibility state was TRUE. + */ + setRefreshVisibility(refreshVisibility: boolean): void; + + /** + * A value of 1 causes Google Earth to fly to the view of the LookAt or Camera in the NetworkLinkControl (if it exists). + */ + getFlyToView(): boolean; + + /** + * A value of 1 causes Google Earth to fly to the view of the LookAt or Camera in the NetworkLinkControl (if it exists). + */ + setFlyToView(flyToView: boolean): void; + } + + /** + * Draws an image overlay fixed to the screen. + * Sample uses for ScreenOverlays are compasses, logos, and heads-up displays. + * ScreenOverlay sizing is determined by the size element. + * Positioning of the overlay is handled by mapping a point in the image specified by screenXY to a point on the screen specified by overlayXY. + * Then the image is rotated by rotation degrees about a point relative to the screen specified by rotationXY. + * + * Note: + * + * screenXY and overlayXY behave opposite to their corresponding behaviors in KML. + * This is due to a bug in the Earth API that will intentionally remain unfixed until a major version change. + */ + export class KmlScreenOverlay extends KmlOverlay { + + /** + * Specifies a point on (or outside of) the overlay image that is mapped to the screen coordinate. + * It requires x and y values, and the units for those values. + * + * Note: + * + * screenXY and overlayXY behave opposite to their corresponding behaviors in KML. + * This is due to a bug in the Earth API that will intentionally remain unfixed until a major version change. + */ + getScreenXY(): KmlVec2; + + /** + * Specifies a point relative to the screen origin that the overlay image is mapped to. + * The x and y values can be specified in three different ways: as pixels ("pixels"), as fractions of the screen ("fraction"), or as inset pixels ("insetPixels"), which is an offset in pixels from the upper right corner of the screen. + * The x and y positions can be specified in different ways - for example, x can be in pixels and y can be a fraction. + * The origin of the coordinate system is in the lower left corner of the screen. + * + * Note: + * + * screenXY and overlayXY behave opposite to their corresponding behaviors in KML. + * This is due to a bug in the Earth API that will intentionally remain unfixed until a major version change. + */ + getOverlayXY(): KmlVec2; + + /** + * Point relative to the screen about which the screen overlay is rotated. + */ + getRotationXY(): KmlVec2; + + /** + * Specifies the size of the image for the screen overlay, as follows: + * + * * A value of -1 indicates to use the native dimension + * * A value of 0 indicates to maintain the aspect ratio + * * A value of n sets the value of the dimension + */ + getSize(): KmlVec2; + + /** + * Adjusts how the image is placed inside the field of view. + * This element is useful if your image has been rotated and deviates slightly from a desired horizontal view. + */ + getRotation(): number; + + /** + * Adjusts how the image is placed inside the field of view. + * This element is useful if your image has been rotated and deviates slightly from a desired horizontal view. + */ + setRotation(rotation: number): void; + } + + /** + * Defines a photo overlay, which is a geographically located photograph of the Earth. + * Photo overlays can be drawn onto 2D rectangles in three dimensional space, or in the case of panoramic photos, onto partial or full cylinders, or even spheres. + * + * Note: This interface is still under development. + */ + export class KmlPhotoOverlay extends KmlOverlay {} + + /** + * Draws an image overlay draped onto the terrain. + * The href child of Icon specifies the image to be used as the overlay. + * If this object is omitted or contains no href, a rectangle is drawn using the color defined by the overlay. + */ + export class KmlGroundOverlay extends KmlOverlay { + + /** + * Specifies the distance above the earth's surface. + */ + getAltitude(): number; + + /** + * Specifies the distance above the earth's surface. + */ + setAltitude(altitude: number): void; + + /** + * Specifies how the altitude property is interpreted. + * + * See also: + * + * * GEPlugin.ALTITUDE_CLAMP_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_CLAMP_TO_SEA_FLOOR + */ + getAltitudeMode(): KmlAltitudeModeEnum; + + /** + * Specifies how the altitude property is interpreted. + * + * See also: + * + * * GEPlugin.ALTITUDE_CLAMP_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_CLAMP_TO_SEA_FLOOR + */ + setAltitudeMode(altitudeMode: KmlAltitudeModeEnum): void; + + /** + * The bounding box of the ground overlay. + */ + getLatLonBox(): KmlLatLonBox; + + /** + * The bounding box of the ground overlay. + */ + setLatLonBox(latLonBox: KmlLatLonBox): void; + } + + /** + * The KmlOverlay object is an abstract object and cannot be used directly in a KML file. + * Overlay is the base type for image overlays drawn on the planet surface or on the screen. + * Icon specifies the image to use and can be configured to reload images based on a timer or by camera changes. + * This object also includes specifications for stacking order of multiple overlays and for adding color and transparency values to the base image. + */ + export class KmlOverlay extends KmlFeature { + + /** + * Specifies the color values. + */ + getColor(): KmlColor; + + /** + * Defines the stacking order for the images in overlapping overlays. + * Overlays with higher drawOrder values are drawn on top of overlays with lower drawOrder values. + */ + getDrawOrder(): number; + + /** + * Defines the stacking order for the images in overlapping overlays. + * Overlays with higher drawOrder values are drawn on top of overlays with lower drawOrder values. + */ + setDrawOrder(drawOrder: number): void; + + /** + * Defines the image associated with the Overlay. + */ + getIcon(): KmlIcon; + + /** + * Defines the image associated with the Overlay. + */ + setIcon(icon: KmlIcon): void; + } + + /** + * This class controls the display of sunlight, historical imagery, and Street View panoramas in the plugin. + * The KmlViewerOptions object is passed to KmlAbstractView.setViewerOptions() + */ + export class KmlViewerOptions extends KmlObject { + + /** + * Returns the current state of the specified viewer option type. + * + * See also: + * + * * GEPlugin.OPTION_STREET_VIEW + * * GEPlugin.OPTION_SUNLIGHT + * * GEPlugin.OPTION_HISTORICAL_IMAGERY + * * GEPlugin.OPTION_STATE_DEFAULT + * * GEPlugin.OPTION_STATE_ENABLED + * * GEPlugin.OPTION_STATE_DISABLED + */ + setOption(type: GEViewerOptionsTypeEnum, state: GEViewerOptionsValueEnum): void; + + /** + * Set the state of viewer options, including sunlight, Street View, and historical imagery. + * + * See also: + * + * * GEPlugin.OPTION_STREET_VIEW + * * GEPlugin.OPTION_SUNLIGHT + * * GEPlugin.OPTION_HISTORICAL_IMAGERY + * * GEPlugin.OPTION_STATE_DEFAULT + * * GEPlugin.OPTION_STATE_ENABLED + * * GEPlugin.OPTION_STATE_DISABLED + */ + getOption(type: GEViewerOptionsValueEnum): GEViewerOptionsValueEnum; + } + + /** + * Describes rotation of a 3D model's coordinate system to position the object in Google Earth. + */ + export class KmlOrientation extends KmlObject { + + /** + * Sets the heading, tilt, and roll of a model. + */ + set(heading: number, tilt: number, roll: number): void; + + /** + * Rotation about the z axis (normal to the Earth's surface). + * A value of 0 (the default) equals North. + * A positive rotation is clockwise around the z axis and specified in degrees from 0 to 360. + */ + getHeading(): number; + + /** + * Rotation about the z axis (normal to the Earth's surface). + * A value of 0 (the default) equals North. + * A positive rotation is clockwise around the z axis and specified in degrees from 0 to 360. + */ + setHeading(heading: number): void; + + /** + * Rotation about the x axis. + * A positive rotation is clockwise around the x axis and specified in degrees from 0 to 360. + */ + getTilt(): number; + + /** + * Rotation about the x axis. + * A positive rotation is clockwise around the x axis and specified in degrees from 0 to 360. + */ + setTilt(tilt: number): void; + + /** + * Rotation about the y axis. + * A positive rotation is clockwise around the y axis and specified in degrees from 0 to 360. + */ + getRoll(): number; + + /** + * Rotation about the y axis. + * A positive rotation is clockwise around the y axis and specified in degrees from 0 to 360. + */ + setRoll(roll: number): void; + } + + /** + * Specifies the exact coordinates of the Model's origin in latitude, longitude, and altitude. + * Latitude and longitude measurements are standard lat-lon projection with WGS84 datum. + * Altitude is distance above the earth's surface, in meters, and is interpreted according to altitudeMode. + */ + export class KmlLocation extends KmlObject { + + /** + * Sets the latitude, longitude, and altitude of the Model. + */ + setLatLngAlt(lat: number, lng: number, alt: number): void; + + /** + * Longitude of the Model's location. + * Angular distance in degrees, relative to the Prime Meridian. + * Values west of the Meridian range from -180 to 0 degrees. + * Values east of the Meridian range from 0 to 180 degrees. + */ + getLongitude(): number; + + /** + * Longitude of the Model's location. + * Angular distance in degrees, relative to the Prime Meridian. + * Values west of the Meridian range from -180 to 0 degrees. + * Values east of the Meridian range from 0 to 180 degrees. + */ + setLongitude(longitude: number): void; + + /** + * Latitude of the camera location. + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + getLatitude(): number; + + /** + * Latitude of the camera location. + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + setLatitude(latitude: number): void; + + /** + * Specifies the distance above the earth's surface. + */ + getAltitude(): number; + + /** + * Specifies the distance above the earth's surface. + */ + setAltitude(altitude: number): void; + } + + /** + * Scales a model along the x, y, and z axes in the model's coordinate space. + */ + export class KmlScale extends KmlObject { + + /** + * Sets the x, y, and z coordinates for a model. + */ + set(x: number, y: number, z: number): void; + + /** + * Indicates the x coordinate. + */ + getX(): number; + + /** + * Indicates the x coordinate. + */ + setX(x: number): void; + + /** + * Indicates the y coordinate. + */ + getY(): number; + + /** + * Indicates the y coordinate. + */ + setY(y: number): void; + + /** + * Indicates the z coordinate. + */ + getZ(): number; + + /** + * Indicates the z coordinate. + */ + setZ(z: number): void; + } + + /** + * A single tuple consisting of floating point values for longitude, latitude, and altitude (in that order). + * Longitude and latitude values are in degrees. + * + * * longitude = -180 and <= 180 + * * latitude = -90 and = 90 + * * altitude values (optional) are in meters above sea level + */ + export class KmlCoord { + + /** + * Sets the latitude, longitude, altitude. + */ + setLatLngAlt(latitude: number, longitude: number, altitude: number): void; + + /** + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + getLatitude(): number; + + /** + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + setLatitude(latitude: number): void; + + /** + * Angular distance in degrees, relative to the Prime Meridian. Values west of the Meridian range from -180 to 0 degrees. + * Values east of the Meridian range from 0 to 180 degrees. + */ + getLongitude(): number; + + /** + * Angular distance in degrees, relative to the Prime Meridian. Values west of the Meridian range from -180 to 0 degrees. + * Values east of the Meridian range from 0 to 180 degrees. + */ + setLongitude(longitude: number): void; + + /** + * Distance from the earth's surface. + */ + getAltitude(): number; + + /** + * Distance from the earth's surface. + */ + setAltitude(altitude: number): void; + } + + /** + * The KmlCoordArray object defines an array of coordinates. + */ + export class KmlCoordArray { + + /** + * Returns the coordinates at the given index. + */ + get(index: number): KmlCoord; + + /** + * Sets the coordinates at the given index.. + */ + set(index: number, coord: KmlCoord): void; + + /** + * Sets the latitude, longitude, and altitude. + */ + setLatLngAlt( + index: number, + latitude: number, + longitude: number, + altitude: number + ): void; + + /** + * Appends one or more new elements to the end of an array and returns the new length of the array. + */ + pushLatLngAlt( + latitude: number, + longitude: number, + altitude: number + ): void; + + /** + * Appends one or more new elements to the end of an array and returns the new length of the array. + */ + push(coordOrList: KmlCoord): void; + + /** + * Deletes the last element of an array, decrements the array length, and returns the value that is removed. + */ + pop(): KmlCoord; + + /** + * Adds an element or elements to the beginning of an array. + */ + unshift(coordOrList: KmlCoord): number; + + /** + * Adds an element or elements to the beginning of an array. + */ + unshiftLatLngAlt( + latitude: number, + longitude: number, + altitude: number + ): void; + + /** + * Removes and returns the first element of the array. + */ + shift(): KmlCoord; + + /** + * Reverses the order of the elements in the array. + */ + reverse(): void; + + /** + * Clears all of the elements in the array + */ + clear(): void; + + /** + * Specifies the length of the index array. + */ + getLength(): number; + } + + /** + * The object corresponding to the retangular region in which Google Earth is displayed. + */ + export class GEWindow extends GEEventEmitter { + + /** + * Gives the Google Earth object focus. + */ + focus(): void; + + /** + * Removes focus from the Google Earth object. + */ + blur(): void; + + /** + * Toggles the overall visibility of Google Earth inside the browser. + */ + getVisibility(): boolean; + + /** + * Toggles the overall visibility of Google Earth inside the browser. + */ + setVisibility(visibility: boolean): void; + } + + /** + * The GEGlobe class encapsulates the Google Earth globe to determine access and event behavior. + */ + export class GEGlobe extends KmlObject { + + /** + * Returns the altitude for a given location on the globe. + * If the altitude data for the location has not yet been loaded, the return value is 0. + */ + getGroundAltitude(lat: number, lon: number): number; + + /** + * The top-level features currently in the Earth instance. + */ + getFeatures(): GEFeatureContainer; + } + + /** + * Controls the behavior of the camera that views the scene in Google Earth. + */ + export class GEView { + + /** + * Returns the screen x,y coordinates of a given point on the globe. + * + * Tip: project() is the inverse of hitTest(). + * + * See also: + * + * * GEPlugin.ALTITUDE_RELATIVE_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR + */ + project( + lat: number, + lng: number, + alt: number, + altitudeMode: KmlAltitudeModeEnum + ): KmlVec2; + + /** + * Sets the camera that views the scene in Google Earth. + */ + setAbstractView(view: KmlAbstractView): void; + + /** + * Creates and returns a new KmlLookAt object, initialized to the current camera position and orientation. + * Use 'altitudeMode' to specify the altitude mode of the looked-at point. + * + * See also: + * + * * GEPlugin.ALTITUDE_RELATIVE_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR + */ + copyAsLookAt(altitudeMode: KmlAltitudeModeEnum): KmlLookAt; + + /** + * Creates and returns a new KmlCamera object, initialized to the current camera position and orientation. + * Use 'altitudeMode' to specify the altitude mode of the new camera. + * + * See also: + * + * * GEPlugin.ALTITUDE_RELATIVE_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR + */ + copyAsCamera(altitudeMode: KmlAltitudeModeEnum): KmlCamera; + + /** + * Returns a bounding box that completely contains the region of the globe that is currently visible. + * The returned box will be larger than what is strictly visible, if that is necessary to include everything that is visible. + */ + getViewportGlobeBounds(): KmlLatLonBox; + + /** + * Given a point on the screen in pixel coordinates, returns a GEHitTestResult with information about the geographic location corresponding to the point on the screen. + * Tip: hitTest() is the inverse of project(). + * + * See also: + * + * * GEPlugin.UNITS_PIXELS + * * GEPlugin.UNITS_INSET_PIXELS + * * GEPlugin.UNITS_FRACTION + * * GEPlugin.HIT_TEST_GLOBE + * * GEPlugin.HIT_TEST_TERRAIN + * * GEPlugin.HIT_TEST_BUILDINGS + */ + hitTest( + x: number, + xUnits: KmlUnitsEnum, + y: number, + yUnits: KmlUnitsEnum, + mode: GEHitTestModeEnum + ): GEHitTestResult; + } + + /** + * Defines an image associated with an Icon style or overlay. + */ + export class KmlIcon extends KmlLink { + + /** + * Gets the offset from the left (), in pixels, of the icon. + */ + getX(): number; + + /** + * Specifies the icon's offset (), in pixels from the left side of its icon palette, if a palette has been specified in the element. + */ + setX(x: number): number; + + /** + * Gets the offset from the bottom (), in pixels, of the icon. + */ + getY(): number; + + /** + * Specifies the offset (), in pixels from the bottom of its icon palette, if a palette has been specified in the element. + */ + setY(y: number): void; + + /** + * Gets the width (), in pixels, of the icon. + */ + getW(): number; + + /** + * Specifies the width (), in pixels, of the icon to use. + */ + setW(w: number): void; + + /** + * Gets the height (), in pixels, of the icon. + */ + getH(): number; + + /** + * Specifies the height (), in pixels, of the icon to use. + */ + setH(h: number): void; + } + + /** + * Specifies the location of any KML files fetched by network links, image files used by icons in icon styles, ground overlays, and screen overlays, or model files used in the Model object. + */ + export class KmlLink extends KmlObject { + + /** + * A URL (either an HTTP address or a local file specification). + * When the parent of Link is a NetworkLink, href is a KML file. + * When the parent of Link is a Model, href is a COLLADA file. + * When the parent of Link is an Overlay, href is an image. + */ + getHref(): string; + + /** + * A URL (either an HTTP address or a local file specification). + * When the parent of Link is a NetworkLink, href is a KML file. + * When the parent of Link is a Model, href is a COLLADA file. + * When the parent of Link is an Overlay, href is an image. + */ + setHref(href: string): void; + + /** + * Specifies to use a time-based refresh mode. + * + * See also: + * + * * GEPlugin.REFRESH_ON_CHANGE + * * GEPlugin.REFRESH_ON_INTERVAL + * * GEPlugin.REFRESH_ON_EXPIRE + */ + getRefreshMode(): KmlRefreshModeEnum; + + /** + * Specifies to use a time-based refresh mode. + * + * See also: + * + * * GEPlugin.REFRESH_ON_CHANGE + * * GEPlugin.REFRESH_ON_INTERVAL + * * GEPlugin.REFRESH_ON_EXPIRE + */ + setRefreshMode(refreshMode: KmlRefreshModeEnum): void; + + /** + * Indicates to refresh the file every n seconds. + */ + getRefreshInterval(): number; + + /** + * Indicates to refresh the file every n seconds. + */ + setRefreshInterval(refreshInterval: number): void; + + /** + * Specifies how the link is refreshed when the viewport changes. + * + * See also: + * + * * GEPlugin.VIEW_REFRESH_NEVER + * * GEPlugin.VIEW_REFRESH_ON_STOP + * * GEPlugin.VIEW_REFRESH_ON_REGION + */ + getViewRefreshMode(): KmlViewRefreshModeEnum; + + /** + * Specifies how the link is refreshed when the viewport changes. + * + * See also: + * + * * GEPlugin.VIEW_REFRESH_NEVER + * * GEPlugin.VIEW_REFRESH_ON_STOP + * * GEPlugin.VIEW_REFRESH_ON_REGION + */ + setViewRefreshMode(viewRefreshMode: KmlViewRefreshModeEnum): void; + + /** + * Specifies how the link is refreshed when the camera changes. + */ + getViewRefreshTime(): number; + + /** + * Specifies how the link is refreshed when the camera changes. + */ + setViewRefreshTime(viewRefreshTime: number): void; + + /** + * Scales the BBOX parameters before sending them to the server. + * A value less than 1 specifies to use less than the full view (screen). + * A value greater than 1 specifies to fetch an area that extends beyond the edges of the current view. + */ + getViewBoundScale(): number; + + /** + * Scales the BBOX parameters before sending them to the server. + * A value less than 1 specifies to use less than the full view (screen). + * A value greater than 1 specifies to fetch an area that extends beyond the edges of the current view. + */ + setViewBoundScale(viewBoundScale: number): void; + + /** + * Specifies the format of the query string that is appended to the Link's href before the file is fetched. + * (If the href specifies a local file, this element is ignored.) + */ + getViewFormat(): string; + + /** + * Specifies the format of the query string that is appended to the Link's href before the file is fetched. + * (If the href specifies a local file, this element is ignored.) + */ + setViewFormat(viewFormat: string): void; + } + + /** + * Controls time in the plugin. + */ + export class GETime { + + /** + * Set the plugin's clock rate. + * A value of 1 corresponds with real time; to pass one year in the plugin for every real second, set the rate to 31536000 (60 times 60 times 24 times 365). + */ + setRate(rate: number): void; + + /** + * Get the current plugin clock rate. + */ + getRate(): number; + + /** + * Returns the current computer clock time as a KmlTimeStamp object. + */ + getSystemTime(): KmlTimeStamp; + + /** + * Returns the GETimeControl object; this is the time slider. + */ + getControl(): GETimeControl; + + /** + * Whether or not historical imagery is enabled. + */ + getHistoricalImageryEnabled(): boolean; + + /** + * Turn historical imagery on or off. + * For more information, read the Time chapter of the Developer's Guide. + */ + setHistoricalImageryEnabled(historicalImageryEnabled: boolean): void; + + /** + * Get the current plugin time as a KmlTimeStamp or KmlTimeSpan. + */ + getTimePrimitive(): KmlTimePrimitive; + + /** + * Sets the current plugin time. + */ + setTimePrimitive(timePrimitive: KmlTimePrimitive): void; + } + + /** + * Used to manipulate the behavior of the Google Earth options such as, navigation, flyToSpeed, scroll wheel speed and so on. + */ + export class GEOptions { + + /** + * Sets the map type to Earth or sky mode. + */ + setMapType(type: GEMapTypeEnum): void; + + /** + * Speed of zoom when user rolls the mouse wheel. Default is 1. + * Set to a negative number to reverse the zoom direction. + */ + getScrollWheelZoomSpeed(): number; + + /** + * Speed of zoom when user rolls the mouse wheel. Default is 1. + * Set to a negative number to reverse the zoom direction. + */ + setScrollWheelZoomSpeed(scrollWheelZoomSpeed: number): void; + + /** + * Specifies the speed at which the camera moves (0 to 5.0). + * Set to SPEED_TELEPORT to immediately appear at selected destination. + * + * See also: + * + * * GEPlugin.SPEED_TELEPORT + */ + getFlyToSpeed(): number; + + /** + * Specifies the speed at which the camera moves (0 to 5.0). + * Set to SPEED_TELEPORT to immediately appear at selected destination. + * + * See also: + * + * * GEPlugin.SPEED_TELEPORT + */ + setFlyToSpeed(flyToSpeed: number): void; + + /** + * Show or hide the status bar. Disabled by default. + */ + getStatusBarVisibility(): boolean; + + /** + * Show or hide the status bar. Disabled by default. + */ + setStatusBarVisibility(statusBarVisibility: boolean): void; + + /** + * Show or hide the grid. Disabled by default. + */ + getGridVisibility(): boolean; + + /** + * Show or hide the grid. Disabled by default. + */ + setGridVisibility(gridVisibility: boolean): void; + + /** + * Show or hide the overview map. Disabled by default. + */ + getOverviewMapVisibility(): boolean; + + /** + * Show or hide the overview map. Disabled by default. + */ + setOverviewMapVisibility(overviewMapVisibility: boolean): void; + + /** + * Show or hide the scale legend. Disabled by default. + */ + getScaleLegendVisibility(): boolean; + + /** + * Show or hide the scale legend. Disabled by default. + */ + setScaleLegendVisibility(scaleLegendVisibility: boolean): void; + + /** + * Show or hide the blue atmosphere that appears around the perimeter of the Earth. + * On by default. + */ + getAtmosphereVisibility(): boolean; + + /** + * Show or hide the blue atmosphere that appears around the perimeter of the Earth. + * On by default. + */ + setAtmosphereVisibility(atmosphereVisibility: boolean): void; + + /** + * Enable or disable user panning and zooming of the map. Enabled by default. + * + * Note: This also enables and disables keyboard navigation (arrow keys, page-up/page-down, etc). + */ + getMouseNavigationEnabled(): boolean; + + /** + * Enable or disable user panning and zooming of the map. Enabled by default. + * + * Note: This also enables and disables keyboard navigation (arrow keys, page-up/page-down, etc). + */ + setMouseNavigationEnabled(mouseNavigationEnabled: boolean): void; + + /** + * Returns true if the animation of features as they are added or removed from the globe has been enabled. + */ + getFadeInOutEnabled(): boolean; + + /** + * Enable or disable the animation of a feature when it is added or removed from the Google Earth plugin. + * The animation consists of a slight change of scale. Default is true. + */ + setFadeInOutEnabled(fadeInOutEnabled: boolean): void; + + /** + * Returns true if display units are set to imperial units (feet and miles). + * False denotes metric units (meters and kilometers). + */ + getUnitsFeetMiles(): boolean; + + /** + * Set display units to imperial (feet and miles) or metric (meters and kilometers). + * This setting affects only the values displayed in the status bar and the scale bar. + * The values passed and returned with an object's getters and setters are always metric. + */ + setUnitsFeetMiles(unitsFeetMiles: boolean): void; + + /** + * Enables or disables building selection. + * If enabled, clicking a building will pop a feature balloon containing information from the Google 3D Warehouse database. + */ + setBuildingSelectionEnabled(buildingSelectionEnabled: boolean): void; + + /** + * Whether or not building selection is enabled. + */ + getBuildingSelectionEnabled(): boolean; + + /** + * Returns true if building highlighting is enabled. + */ + getBuildingHighlightingEnabled(): boolean; + + /** + * Enables or disables building highlighting. + * When enabled, buildings will be highlighted when they are moused over. + */ + setBuildingHighlightingEnabled(buildingHighlightingEnabled: boolean): void; + + /** + * Returns the terrain exaggeration value. Valid values are in the range of 1.0 through 3.0. + */ + getTerrainExaggeration(): number; + + /** + * Set the terrain exaggeration value. Valid values are in the range of 1.0 through 3.0. + * Attempting to set outside of this range will result in the value being clamped. + */ + setTerrainExaggeration(terrainExaggeration: number): void; + + /** + * When enabled, the view will change to 'ground level view' when the camera reaches ground level. + * This view provides pan and lookAt controls, but no zoom slider. + * The tilt will be set to 90, or parallel with level ground. + */ + setAutoGroundLevelViewEnabled(autoGroundLevelViewEnabled: boolean): void; + + /** + * Whether automatic ground level view is enabled. + */ + getAutoGroundLevelViewEnabled(): boolean; + } + + /** + * Adds a node to the end of the list of children of a specified feature. + * Returns the appended object. + */ + export class GESchemaObjectContainer { + + /** + * Adds a node to the end of the list of children of a specified feature. + * Returns the appended object. + */ + appendChild(object: T): void; + + /** + * Removes a node from the list of children of a specified object. + */ + removeChild(oldChild: T): void; + + /** + * Inserts a child before the referenced child in the list of objects. + */ + insertBefore(newChild: T, refChild: T): void; + + /** + * Replaces existing child in the list of features. + * Returns the old child. + */ + replaceChild(newChild: T, oldChild: T): void; + + /** + * Returns true if the container is not empty. + */ + hasChildNodes(): boolean; + + /** + * First child in the list of objects. + */ + getFirstChild(): T; + + /** + * Last child in the list of objects. + */ + getLastChild(): T; + + /** + * List of features (for KmlContainer), or list of features, styles, and schemas (for KmlDocument). + * Returns true if there are any child nodes. + */ + getChildNodes(): KmlObjectList; + } + + /** + * A container class that holds one or more features and allows the creation of nested hierarchies. + */ + export class GEFeatureContainer extends GESchemaObjectContainer {} + + /** + * A container object that contains an array of geometries, typically the children of a multi-geometry. + */ + export class GEGeometryContainer extends GESchemaObjectContainer {} + + /** + * A container object that contains an array of closed line strings, typically the outer boundary of a Polygon. + * Optionally, a LinearRing can also be used as the inner boundary of a Polygon to create holes in the Polygon. + * A Polygon can contain multiple LinearRing objects used as inner boundaries. + */ + export class GELinearRingContainer extends GESchemaObjectContainer {} + + /** + * A container that holds a collection of KmlStyle and KmlStyleMap objects. + * The KmlStyleMap object selects a style based on the current mode of the Placemark. + * An object derived from KmlStyleSelector is uniquely identified by its ID and its URL. + */ + export class GEStyleSelectorContainer extends GESchemaObjectContainer {} + + /** + * Defines the x and y coordinates of a 2D vector. + */ + export class KmlVec2 { + + /** + * Sets the coordinates of the vector. + */ + set( + x: number, + xUnits: KmlUnitsEnum, + y: number, + yUnits: KmlUnitsEnum + ): void; + + /** + * Indicates the x coordinate. + */ + getX(): number; + + /** + * Indicates the x coordinate. + */ + setX(x: number): void; + + /** + * Indicates the y coordinate. + */ + getY(): number; + + /** + * Indicates the y coordinate. + */ + setY(y: number): void; + + /** + * Units in which the x value is specified. + * + * See also: + * + * * GEPlugin.UNITS_FRACTION + * * GEPlugin.UNITS_PIXELS + * * GEPlugin.UNITS_INSET_PIXELS + */ + getXUnits(): KmlUnitsEnum; + + /** + * Units in which the x value is specified. + * + * See also: + * + * * GEPlugin.UNITS_FRACTION + * * GEPlugin.UNITS_PIXELS + * * GEPlugin.UNITS_INSET_PIXELS + */ + setXUnits(xUnits: KmlUnitsEnum): void; + + /** + * Units in which the y value is specified. + * + * See also: + * + * * GEPlugin.UNITS_FRACTION + * * GEPlugin.UNITS_PIyELS + * * GEPlugin.UNITS_INSET_PIyELS + */ + getYUnits(): KmlUnitsEnum; + + /** + * Units in which the y value is specified. + * + * See also: + * + * * GEPlugin.UNITS_FRACTION + * * GEPlugin.UNITS_PIyELS + * * GEPlugin.UNITS_INSET_PIyELS + */ + setYUnits(xUnits: KmlUnitsEnum): void; + } + + /** + * The GESun class controls the dawn to dusk views. + */ + export class GESun { + + /** + * Specifies whether the feature is drawn in the 3D viewer when it is initially loaded. + * In order for a feature to be visible, the visibility property and all of its ancestors must also be set to 1. + */ + getVisibility(): boolean; + + /** + * Specifies whether the feature is drawn in the 3D viewer when it is initially loaded. + * In order for a feature to be visible, the visibility property and all of its ancestors must also be set to 1. + */ + setVisibility(visibility: boolean): void; + } + + /** + * The KmlColor object values are expressed in hexadecimal notation. + * The range of values for any one color component is 0 to 255 (00 to ff). + * For alpha, 00 is fully transparent and ff is fully opaque. + * The order of expression is aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). + * For example, if you want to apply a blue color with 50 percent opacity to an overlay, + * you would specify the following when setting color value: 7fff0000, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00. + */ + export class KmlColor { + + /** + * Set the color of an object. + */ + set(color: string): void; + + /** + * Returns the color of an object. + */ + get(): string; + + /** + * red numerical value + */ + getR(): number; + + /** + * red numerical value + */ + setR(r: number): void; + + /** + * green numerical value + */ + getG(): number; + + /** + * green numerical value + */ + setG(g: number): void; + + /** + * blue numerical value + */ + getB(): number; + + /** + * blue numerical value + */ + setB(b: number): void; + + /** + * opacity value + */ + getA(): number; + + /** + * opacity value + */ + setA(a: number): void; + } + + /** + * The event object used with all KMLObjects. + * For more information about events, see the Document Object Model Events specification at http: + */ + export class KmlEvent { + + /** + * Cancels the default action of the event. + * For example, calling this method in a placemark click handler prevents the placemark's default balloon from popping up. + */ + preventDefault(): void; + + /** + * Prevents event propagation. + * For example, if click event handlers are set up on both the GEGlobe and GEWindow objects, + * and stopPropagation is called in the GEGlobe click event handler, the GEWindow event handler will not be triggered when the globe is clicked. + */ + stopPropagation(): void; + + /** + * The object to which the KMLEvent was originally dispatched. + */ + getTarget(): GEEventEmitter; + + /** + * The target whose event listeners are currently being processed. + */ + getCurrentTarget: GEEventEmitter; + + /** + * The current stage of the flow of events. + */ + getEventPhase(): GEEventPhaseEnum; + + /** + * Indicates whether or not an event is a bubbling event. + */ + getBubbles(): boolean; + + /** + * Indicates whether the event can be cancelled. + * + * Note: Currently, cancelable has no effect. + */ + getCancelable(): boolean; + } + + /** + * Represents a mouse input event. + */ + export class KmlMouseEvent extends KmlEvent { + + /** + * The button on the mouse was pressed. + * Possible values include 0, 1, 2, where 0 is left, 1 is middle, and 2 is right mouse key. + */ + getButton(): number; + + /** + * The x coordinate at which the event occurred, measured in pixels from the left edge of the plug-in window. + */ + getClientX(): number; + + /** + * The y coordinate at which the event occurred, measured in pixels from the top edge of the plug-in window. + */ + getClientY(): number; + + /** + * The x coordinate at which the event occurred, measured in pixels from the left edge of the computer screen. + */ + getScreenX(): number; + + /** + * The y coordinate at which the event occurred, measured in pixels from the top edge of the computer screen. + */ + getScreenY(): number; + + /** + * The latitude at which the event occurred, in decimal degrees. + */ + getLatitude(): number; + + /** + * The longitude at which the event occurred, in decimal degrees. + */ + getLongitude(): number; + + /** + * The altitude at which the event occurred, in meters. + */ + getAltitude(): number; + + /** + * Indicates whether a mouse action occurred while on the Google Earth globe. + */ + getDidHitGlobe(): boolean; + + /** + * Indicates whether the ALT key was held down when an event occurred. + */ + getAltKey(): boolean; + + /** + * Indicates whether the CTRL key was held down when an event occurred. + */ + getCtrlKey(): boolean; + + /** + * Indicates whether the SHIFT key was held down when an event occurred. + */ + getShiftKey(): boolean; + + /** + * Used with the mouseover and mouseout events to specify a secondary target. + * For mouseover, it specifies the object that the mouse was over. + * For mouseout, it specifies the new object that the mouse is over. + */ + getRelatedTarget(): GEEventEmitter; + + /** + * Returns the timestamp of the event, in Unix time. + */ + getTimeStamp(): number; + } + + /** + * Defines when and how an event gets passed in and triggered from the Google Earth Plug-in. + */ + export class GEEventEmitter { + + /** + * Triggers an event when the user clicks a location in Google Earth with the mouse. + */ + click(event: KmlMouseEvent): void; + + /** + * Triggers an event when the user double clicks a location in Google Earth with the mouse. + */ + dblclick(event: KmlMouseEvent): void; + + /** + * Triggers an event when the user moves the mouse pointer over a location in Google Earth. + */ + mouseover(event: KmlMouseEvent): void; + + /** + * Triggers an event when the user presses the mouse button over a location in Google Earth. + */ + mousedown(event: KmlMouseEvent): void; + + /** + * Triggers an event when the user releases the mouse button over a location in Google Earth. + */ + mouseup(event: KmlMouseEvent): void; + + /** + * Triggers an event when the user moves the mouse off of the object in Google Earth. + */ + mouseout(event: KmlMouseEvent): void; + + /** + * Triggers an event when the user moves the mouse inside Google Earth. + */ + mousemove(event: KmlMouseEvent): void; + } + + /** + * The base class for all the other objects in the Google Earth Plug-in. + * The methods and behavior of KMLObject are inherited by all other objects. + * This is an abstract base class and cannot be used directly. + * It provides the id attribute, which allows unique identification of an object. + */ + export class KmlObject extends GEEventEmitter { + + /** + * The interface name (i.e. 'KmlPlacemark') of the object. + */ + getType(): string; + + /** + * Test whether this object is the same as another object. + * Useful for Chrome and Safari, where the comparison a==b sometimes fails for plugin objects. + */ + equals(compareTo: KmlObject): boolean; + + /** + * The unique ID of the KML object. + */ + getId(): string; + + /** + * The unique URL of the KML object. + * This is the base address joined with the ID using the # character. + * + * For example: http://www.google.com/bar.kml#atlantis + */ + getUrl(): string; + + /** + * The parent node of the KML object. + */ + getParentNode(): KmlObject; + + /** + * The document that owns the KML object. + */ + getOwnerDocument(): KmlDocument; + + /** + * Permanently deletes an object, allowing its ID to be reused. + * Attempting to access the object once it is released will result in an error. + */ + release(): void; + } + + /** + * A collection of KmlObjects. + */ + export class KmlObjectList { + + /** + * Gets an item from the object list. For example, list.item(0) returns the first object in the list. + */ + item(index: number): T; + + /** + * Number of objects in collection. + */ + getLength(): number; + } + + /** + * The base class for KmlStyle and KmlStyleMap. + */ + export class KmlStyleSelector extends KmlObject {} + + /** + * Defines the icon, label, line, list, polygon, and balloon styles. + */ + export class KmlStyle extends KmlStyleSelector { + + /** + * Specifies how icons for point placemarks are drawn in Google Earth. + */ + getIconStyle(): KmlIconStyle; + + /** + * Specifies how the name of a feature is drawn in the 3D viewer. + * A custom color, color mode, and scale for the label (name) can be specified. + */ + getLabelStyle(): KmlLabelStyle; + + /** + * Specifies the drawing style (color, color mode, and line width) for line geometry. + * Line geometry includes the outlines of outlined polygons and the extruded tether of Placemark icons (if extrusion is enabled). + */ + getLineStyle(): KmlLineStyle; + + /** + * Specifies the style for list geometry. + */ + getListStyle(): KmlListStyle; + + /** + * Specifies the drawing style for polygons, including polygon extrusions (which look like the walls of buildings) and line extrusions (which look like solid fences). + */ + getPolyStyle(): KmlPolyStyle; + + /** + * Specifies the drawing style for balloons. + */ + getBalloonStyle(): KmlBalloonStyle; + } + + /** + * The KmlColorStyle object is an abstract object. + * It specifies the color and color mode of extended style types. + */ + export class KmlColorStyle extends KmlObject { + + /** + * Color and opacity (alpha) values. + */ + getColor(): KmlColor; + + /** + * Specifies which color mode effect to apply to the base color. + * + * See also: + * + * * GEPlugin.COLOR_NORMAL + * * GEPlugin.COLOR_INHERIT + * * GEPlugin.COLOR_RANDOM + */ + getColorMode(): KmlColorModeEnum; + + /** + * Specifies which color mode effect to apply to the base color. + * + * See also: + * + * * GEPlugin.COLOR_NORMAL + * * GEPlugin.COLOR_INHERIT + * * GEPlugin.COLOR_RANDOM + */ + setColorMode(colorMode: KmlColorModeEnum): void; + } + + /** + * Specifies how icons for point placemarks are drawn in Google Earth. + * The icon property specifies the icon image. + * The scale property specifies the x, y scaling of the icon. + * The color specified in the color property of KmlIconStyle is blended with the color of the Icon. + */ + export class KmlIconStyle extends KmlColorStyle { + + /** + * Resizes the icon. + */ + getScale(): number; + + /** + * Resizes the icon. + */ + setScale(scale: number): void; + + /** + * The direction that icons are set to point, clockwise, and in degrees. + */ + getHeading(): number; + + /** + * The direction that icons are set to point, clockwise, and in degrees. + */ + setHeading(heading: number): void; + + /** + * A custom Icon. In KmlIconStyle, the only child element of KmlIcon is href and href is an HTTP address or a local file specification used to load an icon. + */ + getIcon(): KmlIcon; + + /** + * A custom Icon. In KmlIconStyle, the only child element of KmlIcon is href and href is an HTTP address or a local file specification used to load an icon. + */ + setIcon(icon: KmlIcon): void; + + /** + * Specifies the position within the Icon that is anchored to the point specified in the placemark. + * The x and y values can be specified in three different ways: as pixels, as fractions of the icon, or as inset pixels, which is an offset in pixels from the upper right corner of the icon. + * The x and y positions can be specified in different ways. + * For example, x can be in pixels and y can be a fraction. + * The origin of the coordinate system is in the lower left corner of the icon. + */ + getHotSpot(): KmlVec2; + } + + /** + * Specifies how the name of a feature is drawn in the 3D viewer. + * A custom color, color mode, and scale for the label (name) can be specified. + */ + export class KmlLabelStyle extends KmlColorStyle { + + /** + * Resizes the label. + */ + getScale(): number; + + /** + * Resizes the label. + */ + setScale(scale: number): void; + } + + /** + * The KmlLineStyle object specifies the drawing style (color, color mode, and line width) for all line geometry. + * Line geometry includes the outlines of outlined polygons and the extruded "tether" of Placemark icons (if extrusion is enabled). + */ + export class KmlLineStyle extends KmlColorStyle { + + /** + * Width of the line, in pixels. + */ + getWidth(): number; + + /** + * Width of the line, in pixels. + */ + setWidth(width: number): void; + } + + /** + * Specifies the drawing style for all polygons, including polygon extrusions (which look like the walls of buildings) and line extrusions (which look like solid fences). + */ + export class KmlPolyStyle extends KmlColorStyle { + + /** + * Specifies whether or not to fill the polygon. Possible values 1 (fill) and 0 (no fill). + */ + getFill(): boolean; + + /** + * Specifies whether or not to fill the polygon. Possible values 1 (fill) and 0 (no fill). + */ + setFill(fill: boolean): void; + + /** + * Specifies whether to outline the polygon. Polygon outlines use the current KmlLineStyle. + */ + getOutline(): boolean; + + /** + * Specifies whether to outline the polygon. Polygon outlines use the current KmlLineStyle. + */ + setOutline(outline: boolean): void; + } + + /** + * Specifies how a feature is displayed in the list view. + */ + export class KmlListStyle extends KmlObject { + + /** + * Background color for the Snippet. + */ + getBgColor(): KmlColor; + + /** + * Maximum number of lines of text for the Snippet. + */ + getMaxSnippetLines(): number; + + /** + * Maximum number of lines of text for the Snippet. + */ + setMaxSnippetLines(maxSnippetLines: number): void; + + /** + * Specifies how a feature should be displayed in a list view. + */ + getListItemType(): KmlListItemTypeEnum; + } + + /** + * Specifies how the description balloon for placemarks is drawn. + */ + export class KmlBalloonStyle extends KmlObject { + + /** + * Background color of the balloon (optional). + */ + getBgColor(): KmlColor; + + /** + * Foreground color for text. The default is black (ff000000). + */ + getTextColor(): KmlColor; + + /** + * The text contained in the balloon. + */ + getText(): string; + + /** + * The text contained in the balloon. + */ + setText(text: string): void; + } + + /** + * Specifies the top, bottom, right, and left sides of a bounding box on the Earth's surface. + */ + export class KmlLatLonBox extends KmlObject { + + /** + * Sets the north, south, east, and west edges of the bounding box, as well as the rotation of the overlay. + */ + setBox( + north: number, + south: number, + east: number, + west: number, + rotation: number + ): void; + + /** + * Specifies the latitude of the north edge of the bounding box, in decimal degrees from -90 to 90. + */ + getNorth(): number; + + /** + * Specifies the latitude of the north edge of the bounding box, in decimal degrees from -90 to 90. + */ + setNorth(north: number): void; + + /** + * Specifies the latitude of the south edge of the bounding box, in decimal degrees from -90 to 90. + */ + getSouth(): number; + + /** + * Specifies the latitude of the south edge of the bounding box, in decimal degrees from -90 to 90. + */ + setSouth(south: number): void; + + /** + * Specifies the longitude of the east edge of the bounding box, in decimal degrees from -180 to 180. + * (For overlays that overlap the meridian of 180 degrees longitude, values can extend beyond that range.) + */ + getEast(): number; + + /** + * Specifies the longitude of the east edge of the bounding box, in decimal degrees from -180 to 180. + * (For overlays that overlap the meridian of 180 degrees longitude, values can extend beyond that range.) + */ + setEast(east: number): void; + + /** + * Specifies the longitude of the west edge of the bounding box, in decimal degrees from -180 to 180. + * (For overlays that overlap the meridian of 180 degrees longitude, values can extend beyond that range.) + */ + getWest(): number; + + /** + * Specifies the longitude of the west edge of the bounding box, in decimal degrees from -180 to 180. + * (For overlays that overlap the meridian of 180 degrees longitude, values can extend beyond that range.) + */ + setWest(west: number): void; + + /** + * Specifies a rotation of the overlay about its center, in degrees. + * Values can be +/-180. The default is 0 (north). + * Rotations are specified in a counterclockwise direction. + */ + getRotation(): number; + + /** + * Specifies a rotation of the overlay about its center, in degrees. + * Values can be +/-180. The default is 0 (north). + * Rotations are specified in a counterclockwise direction. + */ + setRotation(rotation: number): void; + } + + /** + * Specifies a bounding box that describes an area of interest defined by geographic coordinates and altitudes. + */ + export class KmlLatLonAltBox extends KmlLatLonBox { + + /** + * Sets the north, south, east, west, rotation, minAltitude, maxAltitude, and altitudeMode of bounding box. + */ + setAltBox( + north: number, + south: number, + east: number, + west: number, + rotation: number, + minAltitude: number, + maxAltitude: number, + altitudeMode: KmlAltitudeModeEnum + ): void; + + /** + * Minimum altitude, specified in meters above sea level. + */ + getMinAltitude(): number; + + /** + * Minimum altitude, specified in meters above sea level. + */ + setMinAltitude(minAltitude: number): void; + + /** + * Maximim altitude, specified in meters above sea level. + */ + getMaxAltitude(): number; + + /** + * Maximim altitude, specified in meters above sea level. + */ + setMaxAltitude(maxAltitude: number): void; + + /** + * Specifies how the altitude property is interpreted. + * + * See also: + * + * * GEPlugin.ALTITUDE_CLAMP_TO_GROUND + * * GEPlugin.ALTITUDE_RELATIVE_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_CLAMP_TO_SEA_FLOOR + * * GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR + */ + getAltitudeMode(): KmlAltitudeModeEnum; + + /** + * Specifies how the altitude property is interpreted. + * + * See also: + * + * * GEPlugin.ALTITUDE_CLAMP_TO_GROUND + * * GEPlugin.ALTITUDE_RELATIVE_TO_GROUND + * * GEPlugin.ALTITUDE_ABSOLUTE + * * GEPlugin.ALTITUDE_CLAMP_TO_SEA_FLOOR + * * GEPlugin.ALTITUDE_RELATIVE_TO_SEA_FLOOR + */ + setAltitudeMode(altitudeMode: KmlAltitudeModeEnum): number; + } + + /** + * The KmlLod or level of detail, describes the size of the projected region on the screen that is required in order for the region to be considered active. + * Also specifies the size of the pixel ramp used for fading in (from transparent to opaque) and fading out (from opaque to transparent). + */ + export class KmlLod extends KmlObject { + + /** + * Sets the minLodPixels, maxLodPixels, minFadeExtent, and maxFadeExtent for the projected region on the screen. + */ + set( + minLodPixels: number, + maxLodPixels: number, + minFadeExtent: number, + maxFadeExtent: number + ): void; + + /** + * Specifies measurement in screen pixels that represents the minimum limit of the visibility range for a given Region. + * Google Earth calculates the size of the region when projected onto screen space. + * Then it computes the square root of the region's area (if, for example, the Region is square and the viewpoint is directly above the Region, and the Region is not tilted, this measurement is equal to the width of the projected Region). + * If this measurement falls within the limits defined by minLodPixels and maxLodPixels (and if the LatLonAltBox is in view), the region is active. + * If this limit is not reached, the associated geometry is considered to be too far from the user's viewpoint to be drawn. + */ + getMinLodPixels(): number; + + /** + * Specifies measurement in screen pixels that represents the minimum limit of the visibility range for a given Region. + * Google Earth calculates the size of the region when projected onto screen space. + * Then it computes the square root of the region's area (if, for example, the Region is square and the viewpoint is directly above the Region, and the Region is not tilted, this measurement is equal to the width of the projected Region). + * If this measurement falls within the limits defined by minLodPixels and maxLodPixels (and if the LatLonAltBox is in view), the region is active. + * If this limit is not reached, the associated geometry is considered to be too far from the user's viewpoint to be drawn. + */ + setMinLodPixels(minLodPixels: number): void; + + /** + * Measurement in screen pixels that represents the maximum limit of the visibility range for a given Region. + * A value of -1, the default, indicates "active to infinite size." + */ + getMaxLodPixels(): number; + + /** + * Measurement in screen pixels that represents the maximum limit of the visibility range for a given Region. + * A value of -1, the default, indicates "active to infinite size." + */ + setMaxLodPixels(maxLogPixels: number): void; + + /** + * Distance over which the geometry fades, from fully opaque to fully transparent. + * This ramp value, expressed in screen pixels, is applied at the minimum end of the LOD (visibility) limits. + */ + getMinFadeExtent(): number; + + /** + * Distance over which the geometry fades, from fully opaque to fully transparent. + * This ramp value, expressed in screen pixels, is applied at the minimum end of the LOD (visibility) limits. + */ + setMinFadeExtent(minFadeExtent: number): void; + + /** + * Distance over which the geometry fades, from fully transparent to fully opaque. + * This ramp value, expressed in screen pixels, is applied at the maximum end of the LOD (visibility) limits. + */ + getMaxFadeExtent(): number; + + /** + * Distance over which the geometry fades, from fully transparent to fully opaque. + * This ramp value, expressed in screen pixels, is applied at the maximum end of the LOD (visibility) limits. + */ + setMaxFadeExtent(maxFadeExtent: number): void; + } + + /** + * The KmlRegion object is used to set region objects and their properties. + * A region contains a bounding box (LatLonAltBox) that describes an area of interest defined by geographic coordinates and altitudes. + * In addition, a Region contains an LOD (level of detail) extent that defines a validity range of the associated Region in terms of projected screen size. + * A Region is said to be "active" when the bounding box is within the user's view and the LOD requirements are met. + * Objects associated with a Region are drawn only when the Region is active. + * When the viewRefreshMode is onRegion, the Link or Icon is loaded only when the Region is active. + */ + export class KmlRegion extends KmlObject { + + /** + * Sets the latLonAltBox and lod for the region. + */ + set(latLonAltBox: KmlLatLonAltBox, lod: KmlLod): void; + + /** + * A bounding box that describes an area of interest defined by geographic coordinates and altitudes. + */ + getLatLonAltBox(): KmlLatLonAltBox; + + /** + * A bounding box that describes an area of interest defined by geographic coordinates and altitudes. + */ + setLatLonAltBox(latLonAltBox: KmlLatLonAltBox): void; + + /** + * LOD is an abbreviation for Level of Detail. + * Lod describes the size of the projected region on the screen that is required in order for the region to be considered "active. + * " Also specifies the size of the pixel ramp used for fading in (from transparent to opaque) and fading out (from opaque to transparent). + */ + getLod(): KmlLod; + + /** + * LOD is an abbreviation for Level of Detail. + * Lod describes the size of the projected region on the screen that is required in order for the region to be considered "active. + * " Also specifies the size of the pixel ramp used for fading in (from transparent to opaque) and fading out (from opaque to transparent). + */ + setLod(lod: KmlLod): void; + } + + /** + * Represents a specific point in time. + * The plugin accepts time in this format only; it does not accept JavaScript date or time objects. + */ + export class KmlDateTime { + + /** + * Set the date. Accepts only XML Schema time (see XML Schema Part 2: Datatypes Second Edition). + * The value can be expressed as yyyy-mm-ddThh:mm:sszzzzzz, where T is the separator between the date and the time, + * and the time zone is either Z(for UTC) or zzzzzz, which represents +/-hh:mm in relation to UTC. + * Additionally, the value can be expressed as a date only. + */ + set(date: string): void; + + /** + * Returns the date and time in XML Schema time format. + */ + get(): string; + } + + /** + * An abstract object and cannot be used directly in a JavaScript file. + * This element is extended by the TimeSpan and TimeStamp objects. + */ + export class KmlTimePrimitive extends KmlObject {} + + /** + * Represents a single moment in time. + * This is a simple element and contains no children. + * Its value is a dateTime, specified in XML time. + * The precision of the TimeStamp is dictated by the dateTime value in the when property. + */ + export class KmlTimeStamp extends KmlTimePrimitive { + + /** + * Represents a single moment in time. + * This is a simple element and contains no children. + * Its value is a dateTime, specified in XML time. + * The precision of the TimeStamp is dictated by the dateTime value in the when property. + * + * * dateTime gives second resolution + * * date gives day resolution + * * gYearMonth gives month resolution + * * gYear gives year resolution + */ + getWhen(): KmlDateTime; + } + + /** + * Represents an extent in time bounded by begin and end dateTimes. + */ + export class KmlTimeSpan extends KmlTimePrimitive { + + /** + * Describes the beginning instant of a time period. + * If absent, the beginning of the period is unbounded. + */ + getBegin(): KmlDateTime; + + /** + * Describes the ending instant of a time period. + * If absent, the end of the period is unbounded. + */ + getEnd(): KmlDateTime; + } + + /** + * This is an abstract class and cannot be created directly. + * This class is extended by KmlCamera and KmlLookAt. + */ + export class KmlAbstractView extends KmlObject { + + /** + * Creates a new KmlLookAt object that matches as closely as possible this KmlAbstractView. + * KmlLookAt is unable to represent roll, so roll values in the current view will not be passed to the new KmlLookAt object. + * + * If this view is already a KmlLookAt, this function returns a new KmlLookAt representing the same view. + */ + copyAsLookAt(): KmlLookAt; + + /** + * Creates a new KmlCamera object that matches this KmlAbstractView. + * + * If this view is already a KmlCamera, this function returns a new KmlCamera representing the same view. + */ + copyAsCamera(): KmlCamera; + + /** + * Returns the KmlTimeStamp or KmlTimeSpan object associated with this view. + */ + getTimePrimitive(): KmlTimePrimitive; + + /** + * Associate a KmlTimeStamp or KmlTimeSpan object with this view. + */ + setTimePrimitive(timePrimitive: KmlTimePrimitive): void; + + /** + * Returns the viewer options on the current view. + * + * See also: + * + * * GEPlugin.OPTION_STREET_VIEW + * * GEPlugin.OPTION_SUNLIGHT + * * GEPlugin.OPTION_HISTORICAL_IMAGERY + */ + getViewerOptions(): KmlViewerOptions; + + /** + * Sets the viewer options on the current view. + * + * See also: + * + * * GEPlugin.OPTION_STREET_VIEW + * * GEPlugin.OPTION_SUNLIGHT + * * GEPlugin.OPTION_HISTORICAL_IMAGERY + */ + setViewerOptions(viewerOptions: KmlViewerOptions): void; + } + + /** + * Defines a camera that is associated with anything derived from feature. + * The LookAt element positions the "camera" in relation to the object that is being viewed. + * This class either positions the relative to a feature, or you can manually change the view, using ge.getView().setAbstractView(). + */ + export class KmlLookAt extends KmlAbstractView { + + /** + * Sets the latitude, longitude, altitude, altitudeMode, heading, tilt, and range for the camera. + */ + set ( + latitude: number, + longitude: number, + altitude: number, + altitudeMode: KmlAltitudeModeEnum, + heading: number, + tilt: number, + range: number + ): void; + + /** + * Latitude of the point the camera is looking at. + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + getLatitude(): number; + + /** + * Latitude of the point the camera is looking at. + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + setLatitude(latitude: number): void; + + /** + * Latitude of the point the camera is looking at. + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + getLongitude(): number; + + /** + * Latitude of the point the camera is looking at. + * Degrees north or south of the Equator (0 degrees). + * Values range from -90 degrees (South Pole) to 90 degrees (North Pole). + */ + setLongitude(longitude: number): void; + + /** + * The distance in meters from the point specified by longitude, latitude, and altitude for the LookAt position. + */ + getRange(): number; + + /** + * The distance in meters from the point specified by longitude, latitude, and altitude for the LookAt position. + */ + setRange(range: number): void; + + /** + * Angle between the direction of the LookAt position and the normal to the surface of the earth. + * Values range from 0 to 90 degrees. Values for tilt cannot be negative. + * A tilt value of 0 degrees indicates viewing from directly above. + * A tilt value of 90 degrees indicates viewing along the horizon. + */ + getTilt(): number; + + /** + * Angle between the direction of the LookAt position and the normal to the surface of the earth. + * Values range from 0 to 90 degrees. Values for tilt cannot be negative. + * A tilt value of 0 degrees indicates viewing from directly above. + * A tilt value of 90 degrees indicates viewing along the horizon. + */ + setTilt(tilt: number): void; + + /** + * Direction (that is, North, South, East, West), in degrees. Default=0 (North). Values range from 0 to 360 degrees. + */ + getHeading(): number; + + /** + * Direction (that is, North, South, East, West), in degrees. Default=0 (North). Values range from 0 to 360 degrees. + */ + setHeading(heading: number): void; + + /** + * Distance from the earth's surface, in meters. + */ + getAltitude(): number; + + /** + * Distance from the earth's surface, in meters. + */ + setAltitude(altitude: number): void; + + /** + * Specifies how altitude components in the coordinates element are interpreted. + */ + getAltitudeMode(): KmlAltitudeModeEnum; + + /** + * Specifies how altitude components in the coordinates element are interpreted. + */ + setAltitudeMode(altitudeMode: KmlAltitudeModeEnum): void; + } + + /** + * Defines the camera that views the scene. + * This element defines the position of the camera relative to the Earth's surface as well as the viewing direction of the camera. + * The camera position is defined by longitude, latitude, altitude, and altitudeMode. + * The viewing direction of the camera is defined by heading, tilt, and roll. + * Camera can be a child element of any feature. + */ + export class KmlCamera extends KmlAbstractView { + + /** + * Sets the latitude, longitude, altitude, alitudeMode, heading, tilt, and roll values. + */ + set( + latitude: number, + longitude: number, + altitude: number, + altitudeMode: KmlAltitudeModeEnum, + heading: number, + tilt: number, + roll: number + ): void; + + /** + * Latitude of the camera location. Degrees north or south of the Equator (0 degrees). Values range from -90 degrees to 90 degrees. + */ + getLatitude(): number; + + /** + * Latitude of the camera location. Degrees north or south of the Equator (0 degrees). Values range from -90 degrees to 90 degrees. + */ + setLatitude(latitude: number): void; + + /** + * Longitude of the camera location. Angular distance in degrees, relative to the Prime Meridian. Values west of the Meridian range from -180 to 0 degrees. + * Values east of the Meridian range from 0 to 180 degrees. + */ + getLongitude(): number; + + /** + * Longitude of the camera location. Angular distance in degrees, relative to the Prime Meridian. Values west of the Meridian range from -180 to 0 degrees. + * Values east of the Meridian range from 0 to 180 degrees. + */ + setLongitude(longitude: number): void; + + /** + * Distance from the earth's surface. + */ + getAltitude(): number; + + /** + * Distance from the earth's surface. + */ + setAltitude(altitude: number): void; + + /** + * Direction (that is, North, South, East, West), in degrees. Default=0 (North). Values range from 0 to 360 degrees. + */ + getHeading(): number; + + /** + * Direction (that is, North, South, East, West), in degrees. Default=0 (North). Values range from 0 to 360 degrees. + */ + setHeading(heading: number): void; + + /** + * Angle between the direction of the camera position and the normal to the surface of the earth. Values range from 0 to 360 degrees. + * A tilt value of 0 degrees indicates viewing from directly above, 90 degrees indicates viewing along the horizon, and 180 degrees indicates viewing straight up at the sky. + */ + getTilt(): number; + + /** + * Angle between the direction of the camera position and the normal to the surface of the earth. Values range from 0 to 360 degrees. + * A tilt value of 0 degrees indicates viewing from directly above, 90 degrees indicates viewing along the horizon, and 180 degrees indicates viewing straight up at the sky. + */ + setTilt(tilt: number): void; + + /** + * Rotation, in degrees, of the camera around the Z axis. Values range from -180 to +180 degrees. + */ + getRoll(): number; + + /** + * Rotation, in degrees, of the camera around the Z axis. Values range from -180 to +180 degrees. + */ + setRoll(roll: number): void; + + /** + * Specifies how altitude components in the coordinates are interpreted. + */ + getAltitudeMode(): KmlAltitudeModeEnum; + + /** + * Specifies how altitude components in the coordinates are interpreted. + */ + setAltitudeMode(altitudeMode: KmlAltitudeModeEnum): void; + } + + /** + * The KmlGeometry object is an abstract object and cannot be used directly. + * It provides a placeholder object for all derived Geometry objects. + */ + export class KmlGeometry extends KmlObject {} + + /** + * Specifies an AltitudeMode for derived classes. + */ + export class KmlAltitudeGeometry extends KmlGeometry { + + /** + * Specifies how altitude components in the geometry coordinates are interpreted. + */ + getAltitudeMode(): KmlAltitudeModeEnum; + + /** + * Specifies how altitude components in the geometry coordinates are interpreted. + */ + setAltitudeMode(altitudeMode: KmlAltitudeModeEnum): void; + } + + /** + * A 3D object described in a referenced COLLADA file. + * COLLADA files have a .dae file extension. + * Models are created in their own coordinate space and then located, positioned, and scaled in Google Earth. + * Google Earth supports the COLLADA common profile, with the following exceptions: + * + * * Google Earth supports only triangles and lines as primitive types. The maximum number of triangles allowed is 21845. + * * Google Earth does not support animation or skinning. + * * Google Earth does not support external geometry references. + */ + export class KmlModel extends KmlAltitudeGeometry { + + /** + * Specifies the exact coordinates of the Model's origin in latitude, longitude, and altitude. + * Latitude and longitude measurements are standard lat-lon projection with WGS84 datum. + * Altitude is distance above the earth's surface, in meters, and is interpreted according to altitudeMode. + */ + getLocation(): KmlLocation; + + /** + * Specifies the exact coordinates of the Model's origin in latitude, longitude, and altitude. + * Latitude and longitude measurements are standard lat-lon projection with WGS84 datum. + * Altitude is distance above the earth's surface, in meters, and is interpreted according to altitudeMode. + */ + setLocation(location: KmlLocation): void; + + /** + * Describes rotation of a 3D model's coordinate system to position the object in Google Earth. + */ + getOrientation(): KmlOrientation; + + /** + * Describes rotation of a 3D model's coordinate system to position the object in Google Earth. + */ + setOrientation(orientation: KmlOrientation): void; + + /** + * Scales a model along the x, y, and z axes in the model's coordinate space + */ + getScale(): KmlScale; + + /** + * Scales a model along the x, y, and z axes in the model's coordinate space + */ + setScale(scale: KmlScale): void; + + /** + * Returns the link of the collada model. + */ + getLink(): KmlLink; + + /** + * Sets the link of the collada model. + */ + setLink(link: KmlLink): void; + } + + /** + * A container for zero or more geometry primitives associated with the same feature. + */ + export class KmlMultiGeometry extends KmlGeometry { + + /** + * The collection of geometries that are children of this multi-geometry. + */ + getGeometries(): GEGeometryContainer; + } + + /** + * Specifies the behavior of the object's geometry. + */ + export class KmlExtrudableGeometry extends KmlAltitudeGeometry { + + /** + * Specifies whether to connect the geometry to the ground. + */ + getExtrude(): boolean; + + /** + * Specifies whether to connect the geometry to the ground. + */ + setExtrude(extrude: boolean): void; + + /** + * Specifies whether to allow the geometry to follow the terrain elevation. + */ + getTessellate(): boolean; + + /** + * Specifies whether to allow the geometry to follow the terrain elevation. + */ + setTessellate(tessellate: boolean): void; + } + + /** + * A Polygon is defined by an outer boundary and 0 or more inner boundaries. + * The boundaries, in turn, are defined by LinearRings. + * When a Polygon is extruded, its boundaries are connected to the ground to form additional polygons, which gives the appearance of a building or a box. + * Extruded Polygons use PolyStyle for their color, color mode, and fill. + */ + export class KmlPolygon extends KmlExtrudableGeometry { + + /** + * Contains a LinearRing element. + */ + getOuterBoundary(): KmlLinearRing; + + /** + * Contains a LinearRing element. + */ + setOuterBoundary(outerBoundary: KmlLinearRing): void; + + /** + * Contains a LinearRing element. + * You can specify multiple innerBoundary properties, which create multiple cut-outs inside the Polygon. + */ + getInnerBoundaries(): GELinearRingContainer; + } + + /** + * A geographic location defined by longitude, latitude, and (optional) altitude. + * When a Point is contained by a Placemark, the point itself determines the position of the Placemark's name and icon. + * When a Point is extruded, it is connected to the ground with a line. This tether uses the current LineStyle. + */ + export class KmlPoint extends KmlExtrudableGeometry { + + /** + * Sets altitudeMode, extrude, tessellate, latitude, longitude, and altitude values. + */ + set( + latitude: number, + longitude: number, + altitude: number, + altitudeMode: KmlAltitudeModeEnum, + extrude: boolean, + tessellate: boolean + ): void; + + /** + * Sets the latitude and longitude. + */ + setLatLng(latitude: number, longitude: number): void; + + /** + * Sets the latitude, longitude, and altitide. + */ + setLatLngAlt(latitude: number, longitude: number, altitude: number): void; + + /** + * The point's latitude, in degrees. + */ + getLatitude(): number; + + /** + * The point's latitude, in degrees. + */ + setLatitude(latitude: number): void; + + /** + * The point's longitude, in degrees. + */ + getLongitude(): number; + + /** + * The point's longitude, in degrees. + */ + setLongitude(longitude: number): void; + + /** + * The point's altitude, in meters. + */ + getAltitude(): number; + + /** + * The point's altitude, in meters. + */ + setAltitude(altitude: number): void; + } + + /** + * Defines a connected set of line segments. + * Use KmlLineStyle to specify the color, color mode, and width of the line. + * When a LineString is extruded, the line is extended to the ground, forming a polygon that looks somewhat like a wall or fence. + * For extruded LineStrings, the line itself uses the current LineStyle, and the extrusion uses the current PolyStyle. + */ + export class KmlLineString extends KmlExtrudableGeometry { + + /** + * Two or more coordinate tuples, each consisting of floating point values for longitude, latitude, and altitude. + * The altitude component is optional. + */ + getCoordinates(): KmlCoordArray; + + /** + * Added to the altitude values for all points on the line string. + * Adjusts the altitude of the feature as a whole, without the need to update each coordinate set. + */ + setAltitudeOffset(altitudeOffset: number): void; + + /** + * Returns the altitudeOffset, or 0 if not set. + */ + getAltitudeOffset(): number; + } + + /** + * Defines a closed line string, typically the outer boundary of a Polygon. + * Optionally, a LinearRing can also be used as the inner boundary of a Polygon to create holes in the Polygon. + * A Polygon can contain multiple LinearRing elements used as inner boundaries. + * You do not need to connect the first and last points. + */ + export class KmlLinearRing extends KmlLineString {} + + + /** + * The KmlFeature object is an abstract object and is the base for all feature types (for example Placemarks, Overlays, and NetworkLinks). + */ + export class KmlFeature extends KmlObject { + + /** + * Retrieves the contents of the feature's element. + * The retrieved contents are scrubbed to remove JavaScript; CSS; and iframe, embed, and object tags. + * + * It should be safe to insert the resulting HTML into your page without concern for malicious content embedded in the feature data; + * however any feature depending on CSS or Javascript will not work. + */ + getBalloonHtml(): string; + + /** + * Retrieves the contents of the feature's element. The contents are not scrubbed. + * Use this method only if you trust the source of the feature data. + */ + getBalloonHtmlUnsafe(): string; + + /** + * User-defined text displayed in the plugin as the label for the object (for example, for a Placemark). + */ + getName(): string; + + /** + * User-defined text displayed in the plugin as the label for the object (for example, for a Placemark). + */ + setName(name: string): void; + + /** + * Specifies whether the feature is drawn in the plugin. + * In order for a feature to be visible, the visibility of all its ancestors must also be set to true. + * In the Google Earth List View, each feature has a checkbox that allows the user to control visibility of the feature. + */ + getVisibility(): boolean; + + /** + * Specifies whether the feature is drawn in the plugin. + * In order for a feature to be visible, the visibility of all its ancestors must also be set to true. + * In the Google Earth List View, each feature has a checkbox that allows the user to control visibility of the feature. + */ + setVisibility(visibility: boolean): void; + + /** + * Default state of left panel. + */ + getOpen(): boolean; + + /** + * Default state of left panel. + */ + setOpen(open: boolean): void; + + /** + * Specifies a value representing an unstructured address written as a standard street, city, state address, and/or as a postal code. + */ + getAddress(): string; + + /** + * Specifies a value representing an unstructured address written as a standard street, city, state address, and/or as a postal code. + */ + setAddress(address: string): void; + + /** + * Specifies a short description of the feature. + */ + getSnippet(): string; + + /** + * Specifies a short description of the feature. + */ + setSnippet(snippet: string): void; + + /** + * User-supplied text that appears in the description balloon. + */ + getDescription(): string; + + /** + * User-supplied text that appears in the description balloon. + */ + setDescription(description: string): void; + + /** + * Stores either the lookAt or camera view. + */ + getAbstractView(): KmlAbstractView; + + /** + * Stores either the lookAt or camera view. + */ + setAbstractView(abstractView: KmlAbstractView): void; + + /** + * URI of a Style or StyleMap defined in a Document. + * It refers to a Plug-in intitiated object. + */ + getStyleUrl(): string; + + /** + * URI of a Style or StyleMap defined in a Document. + * It refers to a Plug-in intitiated object. + */ + setStyleUrl(styleUrl: string): void; + + /** + * The style based on the current mode of the Placemark. + */ + getStyleSelector(): KmlStyleSelector; + + /** + * The style based on the current mode of the Placemark. + */ + setStyleSelector(styleSelector: KmlStyleSelector): void; + + /** + * Specifies region objects and their properties. + * A region contains a bounding box (LatLonAltBox) that describes an area of interest defined by geographic coordinates and altitudes. + */ + getRegion(): KmlRegion; + + /** + * Specifies region objects and their properties. + * A region contains a bounding box (LatLonAltBox) that describes an area of interest defined by geographic coordinates and altitudes. + */ + setRegion(region: KmlRegion): void; + + /** + * Returns the KML for a feature. + */ + getKml(): string; + + /** + * Returns previous sibling node within the container. + */ + getPreviousSibling(): KmlFeature; + + /** + * Returns the next sibling node within the container. + */ + getNextSibling(): KmlFeature; + + /** + * Returns the KmlTimeStamp or KmlTimeSpan object associated with this feature. + */ + getTimePrimitive(): KmlTimePrimitive; + + /** + * Attach a KmlTimeStamp or KmlTimeSpan object to this feature. + */ + setTimePrimitive(timePrimitive: KmlTimePrimitive): void; + + /** + * Returns the computed style of a feature, merging any inline styles with styles imported from setHref() or a StyleUrl. + * + * Note: Modifying the returned KmlStyle object is undefined and not recommended. + */ + getComputedStyle(): KmlStyle; + + /** + * Experimental Feature — this is an experimental feature and can change (or even be removed) at any time. + * The opacity of a feature, ranging from 0 (completely transparent) to 1 (complete opaque). + * The opacity of a folder or document will influence the opacity of child features. + * Thus, if a folder has an opacity of 0.5 and a child ground overlay in the folder also has an opacity of 0.5, the overlay will be drawn with an opacity of 0.25. + */ + getOpacity(): number; + + /** + * Experimental Feature — this is an experimental feature and can change (or even be removed) at any time. + * The opacity of a feature, ranging from 0 (completely transparent) to 1 (complete opaque). + * The opacity of a folder or document will influence the opacity of child features. + * Thus, if a folder has an opacity of 0.5 and a child ground overlay in the folder also has an opacity of 0.5, the overlay will be drawn with an opacity of 0.25. + */ + setOpacity(opacity: number): void; + } + + /** + * An abstract object and cannot be used directly. + * A KmlContainer object holds one or more features and allows the creation of nested hierarchies. + */ + export class KmlContainer extends KmlFeature { + + /** + * Get an element by ID. + * This is functionally equivalent to getElementByUrl with an unspecified base URL. + * + * For example: getElementByUrl('#foo'). + * + * Usage is when finding objects created with JavaScript, which have unspecified base URLs. + * The object must be a descendant of the container before it can be found. + */ + getElementById(id: string): KmlObject; + + /** + * Get an element by URL. A URL consists of the base address and ID, joined with the # character. + * + * For example: http://www.google.com/bar.kml#here_be_monsters + * + * This applies to objects that are fetched. + * In the case of plugin created objects, the URL is simply #foo. + * The object must be a descendant of the container before it can be found. + */ + getElementByUrl(url: string): KmlObject; + + /** + * Get an element by type. + */ + getElementsByType(type: string): KmlObjectList; + + /** + * A collection of features, such as name, description, and so on. + */ + getFeatures(): GEFeatureContainer; + } + + /** + * A Folder is used to arrange other features hierarchically (Folders, Placemarks, NetworkLinks, or Overlays). + * A feature is visible only if it and all of its ancestors are visible. + */ + export class KmlFolder extends KmlContainer {} + + /** + * A layer displayed in Google Earth. + */ + export class KmlLayer extends KmlFolder {} + + /** + * A container for the various layers displayed with the Google Earth Plug-in. + * It contains the same layers as Google Earth. + */ + export class KmlLayerRoot extends KmlFolder { + + /** + * Returns the layer based on the layer's ID. + */ + getLayerById(id: string): KmlLayer; + + /** + * Enables a layer based on its ID. + */ + enableLayerById(id: string, visibility: boolean): void; + + /** + * Returns the drawing order for this database. + */ + getDrawOrder(): number; + + /** + * Defines the drawing order for databases. + * Drawing order is lowest to highest. + * Google Earth Enterprise customers can add a side database and set the drawOrder to be either before or after that of the main database. + * Side databases default to a drawing order of 0. + */ + setDrawOrder(drawOrder: number): void; + } + + /** + * A KmlDocument has containers that holds features and styles. + * This container is required if you use shared styles. + * It is recommended that you use shared styles, which require the following. + * + * 1. Define all Styles in a Document. Assign a unique ID to each Style. + * 2. Within a given feature or StyleMap, reference the Style's ID using a styleUrl element. + * + * Note: Shared styles are not inherited by the features in the Document. + */ + export class KmlDocument extends KmlContainer { + + /** + * Returns a list of elements using a particular style URL. + */ + getElementsByStyleUrl(styleUrl: string): KmlObjectList; + + /** + * Returns an array containing the style selectors present in the KML document. + */ + getStyleSelectors(): GEStyleSelectorContainer; + } + + /** + * The KmlPlacemark is a feature with associated Geometry. + */ + export class KmlPlacemark extends KmlFeature { + + /** + * The geometry associated with the placemark. + */ + getGeometry(): KmlGeometry; + + /** + * The geometry associated with the placemark. + */ + setGeometry(geometry: KmlGeometry): void; + } + + /** + * The base class for the three types of balloon windows that can overlay the 3D window. + */ + export class GEAbstractBalloon { + + /** + * The ID of the balloon. + */ + getId(): string; + + /** + * The ID of the balloon. + */ + setId(id: string): void; + + /** + * Determines what the balloon is attached to. + */ + getFeature(): KmlFeature; + + /** + * Determines what the balloon is attached to. + */ + setFeature(feature: KmlFeature): void; + + /** + * Minimum width of the balloon. + */ + getMinWidth(): number; + + /** + * Minimum width of the balloon. + */ + setMinWidth(minWidth: number): void; + + /** + * Minimum height of the balloon. + */ + getMinHeight(): number; + + /** + * Minimum height of the balloon. + */ + setMinHeight(minHeight: number): void; + + /** + * Maximum width of the balloon. + */ + getMaxWidth(): number; + + /** + * Maximum width of the balloon. + */ + setMaxWidth(maxWidth: number): void; + + /** + * Maximum height of the balloon. + */ + getMaxHeight(): number; + + /** + * Maximum height of the balloon. + */ + setMaxHeight(maxHeight: number): void; + + /** + * When true, the balloon frame is displayed with a button that the user + * can click to close the balloon. When false, the balloon frame is just + * a plain frame. + * + * Default is true. + */ + getCloseButtonEnabled(): boolean; + + /** + * When true, the balloon frame is displayed with a button that the user + * can click to close the balloon. When false, the balloon frame is just + * a plain frame. + * + * Default is true. + */ + setCloseButtonEnabled(closeButtonEnabled: boolean): void; + } + + /** + * Base class for GEHtmlStringBalloon and GEHtmlDivBalloon. + */ + export class GEFeatureBalloon extends GEAbstractBalloon {} + + /** + * Creates a balloon that contains HTML. + */ + export class GEHtmlBalloon extends GEAbstractBalloon { + + /** + * The color of the text in the balloon. + * This must be set using the HTML hex format #RRGGBB. + * If not set, it is interpreted as #000000. + */ + getForegroundColor(): string; + + /** + * The color of the text in the balloon. + * This must be set using the HTML hex format #RRGGBB. + * If not set, it is interpreted as #000000. + */ + setForegroundColor(foregroundColor: string): void; + + /** + * The background color of the balloon. + * This must be set using the HTML hex format #RRGGBB. + * If not set, the default is interpreted as #FFFFFF. + */ + getBackgroundColor(): string; + + /** + * The background color of the balloon. + * This must be set using the HTML hex format #RRGGBB. + * If not set, the default is interpreted as #FFFFFF. + */ + setBackgroundColor(backgroundColor: string): void; + } + + /** + * The GEHtmlDivBalloon object creates a balloon based on the contentDiv property. + */ + export class GEHtmlDivBalloon extends GEHtmlBalloon { + + /** + * An HTMLDivElement to be used as the contents of the balloon. + * When the balloon is shown, the HTMLDivElement is attached to the balloon element in the web page. + * You can manipulate this balloon using ordinary HTML DOM techniques. + */ + getContentDiv(): HTMLDivElement; + + /** + * An HTMLDivElement to be used as the contents of the balloon. + * When the balloon is shown, the HTMLDivElement is attached to the balloon element in the web page. + * You can manipulate this balloon using ordinary HTML DOM techniques. + */ + setContentDiv(contentDiv: HTMLElement): void; + } + + /** + * The GEHtmlStringBalloon class represents a balloon based on the contentString. + */ + export class GEHtmlStringBalloon extends GEHtmlBalloon { + + /** + * You can include any HTML using the contentString property. + * When the balloon is visible, the content specified in contentString property, + * is inserted directly into the balloon element in the web page. + */ + getContentString(): string; + + /** + * You can include any HTML using the contentString property. + * When the balloon is visible, the content specified in contentString property, + * is inserted directly into the balloon element in the web page. + */ + setContentString(contentString: string): void; + } + + /** + * The base class for GETimeControl. + */ + export class GEControl {} + + /** + * Represents the time slider object. + */ + export class GETimeControl extends GEControl { + + /** + * Whether the time slider is visible or not. + */ + getVisibility(): GEVisibilityEnum; + + /** + * Specifies whether the control is visible or hidden. + */ + setVisibility(visibility: GEVisibilityEnum): void; + + /** + * Returns the clock rate that the plugin would use, if the play button on the time slider UI was pressed. + * This rate is calculated by the plugin based on the time range currently present in the slider. + */ + getCalculatedRate(): number; + + /** + * Returns a KmlTimeSpan object encompassing the earliest and latest times present in the time slider. + * For more information, refer to the Time chapter of the Developer's Guide. + */ + getExtents(): KmlTimeSpan; + + /** + * Returns an array containing the KmlTimeStamp objects associated with the historical imagery available in this view. + */ + getAvailableImageDates(): KmlObjectList; + + } + + /** + * The GEPlugin is the Google Earth Plugin's main object, and this is the object that is returned to the JavaScript application when you first create a plug-in instance. + * GEPlugin provides factory methods for ructing other objects (placemarks, and so on), and is also used to retrieve the root document objects. + */ + export class GEPlugin { + + /** + * A Specifies that altitudes are at ground level. For Ground overlays, this means that the image will be draped over the terrain. + */ + ALTITUDE_CLAMP_TO_GROUND: KmlAltitudeModeEnum; + + /** + * Specifies that altitudes are to be interpreted as meters above or below ground level (i.e. the elevation of the terrain at the location). + */ + ALTITUDE_RELATIVE_TO_GROUND: KmlAltitudeModeEnum; + + /** + * Specifies that altitudes are to be interpreted as meters above or below sea level, regardless of the actual elevation of the terrain beneath the object. + * For example, if you set the altitude of an object to 10 meters with an absolute altitude mode, the object will appear to be at ground level if the terrain beneath is also 10 meters above sea level. + * If the terrain is 3 meters above sea level, the object will appear elevated above the terrain by 7 meters. + * If, on the other hand, the terrain is 15 meters above sea level, the object may be completely invisible. + */ + ALTITUDE_ABSOLUTE: KmlAltitudeModeEnum; + + /** + * Specifies that altitudes are at sea floor level. + */ + ALTITUDE_CLAMP_TO_SEA_FLOOR: KmlAltitudeModeEnum; + + /** + * Specifies that altitudes are to be interpreted as meters above sea floor (i.e. the elevation of the sea floor at the location). + */ + ALTITUDE_RELATIVE_TO_SEA_FLOOR: KmlAltitudeModeEnum; + + /** + * Refresh when the file is loaded and whenever the Link parameters change. This refresh mode is the default. + */ + REFRESH_ON_CHANGE: KmlRefreshModeEnum; + + /** + * Refresh every n seconds (specified in refreshInterval). + */ + REFRESH_ON_INTERVAL: KmlRefreshModeEnum; + + /** + * Refresh when the expiration time is reached. + * If a fetched file has a NetworkLinkControl, the expires time takes precedence over expiration times specified in HTTP headers. + * If no expires time is specified, the HTTP max-age header is used (if present). + * If max-age is not present, the Expires HTTP header is used (if present). + */ + REFRESH_ON_EXPIRE: KmlRefreshModeEnum; + + /** + * Ignore changes in the view. Also ignore viewFormat parameters, if any. + * This view refresh mode is the default. + */ + VIEW_REFRESH_NEVER: KmlViewRefreshModeEnum; + + /** + * Refresh the file only when the user explicitly requests it. + */ + VIEW_REFRESH_ON_REQUEST: KmlViewRefreshModeEnum; + + /** + * Refresh n seconds after movement stops, where n is specified in viewRefreshTime. + */ + VIEW_REFRESH_ON_STOP: KmlViewRefreshModeEnum; + + /** + * Refresh only when the feature's Region becomes active. + */ + VIEW_REFRESH_ON_REGION: KmlViewRefreshModeEnum; + + /** + * Screen coordinates are to be interpreted as a fraction of an item, like an image or Google Earth window. + */ + UNITS_FRACTION: KmlUnitsEnum; + + /** + * Screen coordinates are to be interpreted as pixels from the left or bottom edge. + */ + UNITS_PIXELS: KmlUnitsEnum; + + /** + * Screen coordinates are to be interpreted as pixels from the top or right edge. + */ + UNITS_INSET_PIXELS: KmlUnitsEnum; + + /** + * Apply no color mode effect, i.e. use the base color as is. + */ + COLOR_NORMAL: KmlColorModeEnum; + + /** + * Apply a random linear scale to the base color. See the KML documentation for more details. + */ + COLOR_RANDOM: KmlColorModeEnum; + + /** + * Inherit the color mode from ancestor styles. + */ + COLOR_INHERIT: KmlColorModeEnum; + + /** + * The Earth map type, used with GEOptions' setMapType. + */ + MAP_TYPE_EARTH: GEMapTypeEnum; + + /** + * The Sky map type, used with GEOptions' setMapType. + */ + MAP_TYPE_SKY: GEMapTypeEnum; + + /** + * Hide the UI element. + */ + VISIBILITY_HIDE: GEVisibilityEnum; + + /** + * Show the UI element always. + */ + VISIBILITY_SHOW: GEVisibilityEnum; + + /** + * Automatically show or hide the UI element depending on user interaction. + */ + VISIBILITY_AUTO: GEVisibilityEnum; + + /** + * Specifies that fly-to should happen immediately, without a smooth transition. + */ + SPEED_TELEPORT: number; + + /** + * The Layer ID of the terrain layer. Use as an argument to getLayerById() or enableLayerById(). + */ + LAYER_TERRAIN: string; + + /** + * The Layer ID of the roads layer. Use as an argument to getLayerById() or enableLayerById(). + */ + LAYER_ROADS: string; + + /** + * The Layer ID of the photorealistic buildings layer. Use as an argument to getLayerById() or enableLayerById(). + */ + LAYER_BUILDINGS: string; + + /** + * The Layer ID of the low resolution (gray) buildings layer. + * Use as an argument to getLayerById() or enableLayerById(). + * Note that as photorealistic buildings continue to be created and added to the LAYER_BUILDINGS layer, the low-resolution version of those buildings will be removed from this layer. + * This layer will therefore change over time. + */ + LAYER_BUILDINGS_LOW_RESOLUTION: string; + + /** + * The Layer ID of the borders layer. Use as an argument to getLayerById() or enableLayerById(). + */ + LAYER_BORDERS: string; + + /** + * The Layer ID of the trees layer. Use as an argument to getLayerById() or enableLayerById(). + */ + LAYER_TREES: string; + + /** + * When using the GEView.hitTest method, this mode samples the globe (the earth's sphere at altitude 0, without terrain or buildings). + */ + HIT_TEST_GLOBE: GEHitTestModeEnum; + + /** + * When using the GEView.hitTest method, this mode samples the earth's terrain (the ground surface, including variations in altitude). + */ + HIT_TEST_TERRAIN: GEHitTestModeEnum; + + /** + * When using the GEView.hitTest method, this mode samples 3D buildings. + */ + HIT_TEST_BUILDINGS: GEHitTestModeEnum; + + /** + * Sets the render state to its default value. Currently, sunlight, Street View, and historical imagery all default to a disabled state. + */ + OPTION_STATE_DEFAULT: GEViewerOptionsValueEnum; + + /** + * Set the render state to on. Passed to the KmlViewerOptions.setOption method. + */ + OPTION_STATE_ENABLED: GEViewerOptionsValueEnum; + + /** + * Set the render state to off. Passed to the KmlViewerOptions.setOption method. + */ + OPTION_STATE_DISABLED: GEViewerOptionsValueEnum; + + /** + * Passed to the KmlViewerOptions.setOption method, along with a GEViewerOptionsValueEnum, to specify whether the Sun option should be visible. + * Sun can also be enabled/disabled with GEPlugin.getSun. + */ + OPTION_SUNLIGHT: GEViewerOptionsTypeEnum; + + /** + * Passed to the KmlViewerOptions.setOption method, along with a GEViewerOptionsValueEnum, to specify whether historical imagery should be enabled. + */ + OPTION_HISTORICAL_IMAGERY: GEViewerOptionsTypeEnum; + + /** + * Passed to the KmlViewerOptions.setOption method, along with a GEViewerOptionsValueEnum, to specify whether Street View should be enabled when the view reaches ground level. + * Note that this applies only to programmatic movement, such as fly-tos; to control whether the user can enter Street View using manual navigation controls, call ge.getPlugin().streetViewEnabled(true). + */ + OPTION_STREET_VIEW: GEViewerOptionsTypeEnum; + + /** + * The feature's visibility is tied to its list item's checkbox state. + */ + LIST_ITEM_CHECK: KmlListItemTypeEnum; + + /** + * When specified for a folder, document or network link, prevents all items from being made visible at once—that is, the user can turn all children off but cannot turn them all on at the same time. + * This setting is useful for containers or network links containing large amounts of data. + */ + LIST_ITEM_CHECK_OFF_ONLY: KmlListItemTypeEnum; + + /** + * Use a normal checkbox for visibility but do not display children in a list view. + * The item's checkbox should allows the user to toggle visibility of the child objects in the viewport. + */ + LIST_ITEM_CHECK_HIDE_CHILDREN: KmlListItemTypeEnum; + + /** + * When specified for a container (a folder or a document), only one of the container's items should be visible at a time. + */ + LIST_ITEM_RADIO_FOLDER: KmlListItemTypeEnum; + + /** + * The large navigation control type, used with GENavigationControl.setControlType(). + */ + NAVIGATION_CONTROL_LARGE: GENavigationControlEnum; + + /** + * The small navigation control type, used with GENavigationControl.setControlType(). + */ + NAVIGATION_CONTROL_SMALL: GENavigationControlEnum; + + /** + * Parse a string of KML and return a handle to the root of the KML object structure that was created. + */ + parseKml(kml: string): KmlObject; + + /** + * Get an element by ID. This is functionally equivalent to getElementByUrl with an unspecified base URL. + * + * For example: getElementByUrl('#foo'). + * + * Usage is when finding objects created with JavaScript, which have unspecified base URLs. + * The object must be a descendant of the DOM before it can be found. + */ + getElementById(id: string): KmlObject; + + /** + * Get an element by URL. A URL consists of the base address and the ID, joined with the # character. + * + * For example: http://www.google.com/bar.kml#here_be_monsters + * + * This applies to objects that are fetched. + * In the case of plugin created objects, the URL is simply #foo. + * The object must be a descendant of the DOM before it can be found. + */ + getElementByUrl(url: string): KmlObject; + + /** + * Get a list of elements by type. + */ + getElementsByType(): KmlObjectList; + + /** + * Creates a placemark on the globe. + * A Placemark is a feature with associated Geometry. + * A Placemark with a Point has an icon associated with it that marks a point on the Earth in the 3D viewer. + * (In the Google Earth 3D viewer, a Point Placemark is the only object you can click or roll over. + * Other Geometry objects do not have an icon in the 3D viewer. + * To allow the user to click in the 3D viewer, you would need to create a MultiGeometry object that contains both a Point and the other Geometry object.) + */ + createPlacemark(id: string): KmlPlacemark; + + /** + * Creates a point on the globe. Specifies the geographic location defined by longitude, latitude, and (optional) altitude. + */ + createPoint(id: string): KmlPoint; + + /** + * Creates a line string on Google Earth. + */ + createLineString(id: string): KmlLineString; + + /** + * Creates a folder. + * A KMLFolder is used to arrange other features hierarchically (Folders, Placemarks, NetworkLinks, or Overlays). + * A feature is visible only if it and all its ancestors are visible. + */ + createFolder(id: string): KmlFolder; + + /** + * Creates level of detail (LOD). + * LOD describes the size of the projected region on the screen that is required in order for the region to be considered active. + * Also specifies the size of the pixel ramp used for fading in (from transparent to opaque) and fading out (from opaque to transparent). + */ + createLod(id: string): KmlLod; + + /** + * Creates a LatLonBox, a bounding box that describes an area of interest defined by geographic coordinates and altitudes. + */ + createLatLonBox(id: string): KmlLatLonBox; + + /** + * Creates a LatLonAltBox, a bounding box that describes an area of interest defined by geographic coordinates and altitudes. + */ + createLatLonAltBox(id: string): KmlLatLonAltBox; + + /** + * Creates a Document. A Document is a container for features and styles. + */ + createDocument(id: string): KmlDocument; + + /** + * Creates a Region in Google Earth. + * A Region contains a bounding box that describes an area of interest defined by geographic coordinates and altitudes. + */ + createRegion(id: string): KmlRegion; + + /** + * Specifies the exact coordinates of the Model's origin in latitude, longitude, and altitude. + * Latitude and longitude measurements are standard lat-lon projection with WGS84 datum. + * Altitude is distance above the earth's surface, in meters, and is interpreted according to altitudeMode. + */ + createLocation(id: string): KmlLocation; + + /** + * Sets the rotation of a 3D model's coordinate system to position the object in Google Earth. + */ + createOrientation(id: string): KmlOrientation; + + /** + * Sets the scale of a model along the x, y, and z axes in the model's coordinate space. + */ + createScale(id: string): KmlScale; + + /** + * Creates a model. + * A model is a 3D object described in a COLLADA file. + * COLLADA files have a .dae file extension. + * Models are created in their own coordinate space and then located, positioned, and scaled in Google Earth. + */ + createModel(id: string): KmlModel; + + /** + * A Style defines an addressable style group that can be referenced by StyleMaps and features. + */ + createStyle(id: string): KmlStyle; + + /** + * Creates a LinearRing. + * A LinearRing defines a closed line string, typically the outer boundary of a Polygon. + * Optionally, a LinearRing can also be used as the inner boundary of a Polygon to create holes in the Polygon. + */ + createLinearRing(id: string): KmlLinearRing; + + /** + * Creates a Polygon. A Polygon is defined by an outer boundary and 0 or more inner boundaries. + */ + createPolygon(id: string): KmlPolygon; + + /** + * Creates an Icon. An icon defines an image associated with an Icon style or overlay. + */ + createIcon(id: string): KmlIcon; + + /** + * Creates a Link. + * A Link specifies the location of KML files fetched by network links, image files used in any overlay, or model files used with the Model object. + */ + createLink(id: string): KmlLink; + + /** + * Creates a GroundOverlay. + * A GroundOverlay draws an image overlay draped onto the terrain. + */ + createGroundOverlay(id: string): KmlGroundOverlay; + + /** + * Creates a NetworkLink. + * A NetworkLink references a KML file or KMZ archive on a local or remote network. + */ + createNetworkLink(id: string): KmlNetworkLink; + + /** + * Creates a ScreenOverlay. + * A ScreenOverlay draws an image overlay fixed to the screen. + */ + createScreenOverlay(id: string): KmlScreenOverlay; + + /** + * Creates a container for one or more geometry primitives associated with the same feature. + */ + createMultiGeometry(id: string): KmlMultiGeometry; + + /** + * Creates a StyleMap. + * A StyleMap maps between two different icon styles. + * Typically, a StyleMap is used to provide separate normal and highlighted styles for a Placemark, so that the highlighted version appears when the user mouses over the icon in Google Earth. + */ + createStyleMap(id: string): KmlStyleMap; + + /** + * Creates a new LookAt. + * A LookAt element positions the camera view in relation to an object that is being viewed. + */ + createLookAt(id: string): KmlLookAt; + + /** + * Creates a new Camera. + * This element positions the camera relative to the Earth's surface and defines the view direction. + */ + createCamera(id: string): KmlCamera; + + /** + * Creates a new viewer options object. + */ + createViewerOptions(id: string): KmlViewerOptions; + + /** + * Create a KmlTimeStamp object. + * For more information, refer to the Time chapter of the Google Earth API developer's guide. + */ + createTimeStamp(id: string): KmlTimeStamp; + + /** + * Create a KmlTimeSpan object. + * For more information, refer to the Time chapter of the Google Earth API developer's guide. + */ + createTimeSpan(id: string): KmlTimeSpan; + + /** + * Creates a Feature balloon. + */ + createFeatureBalloon(id: string): GEFeatureBalloon; + + /** + * Creates an HTML string balloon. + */ + createHtmlStringBalloon(id: string): GEHtmlStringBalloon; + + /** + * Creates an Html Div Balloon. + */ + createHtmlDivBalloon(id: string): GEHtmlDivBalloon; + + /** + * Returns the currently active balloon, or null. + */ + getBalloon(): GEAbstractBalloon; + + /** + * Sets the given balloon as the active balloon, replacing any existing active balloon. + * If the given feature is visible, then the balloon is displayed. Otherwise, the balloon is hidden. + * + * If the argument is null, then any existing active balloon will be hidden. + */ + setBalloon(newActiveBalloon: GEAbstractBalloon): void; + + /** + * Used for debugging purposes; if this value is not equal to the value returned by getPluginVersion then there is a misconfiguration on the end user's system. + * This check is automatically done during plugin instantiation. + */ + getEarthVersion(): string; + + /** + * The version of the Google Earth Plug-in installed on the end user's machine. + */ + getPluginVersion(): string; + + /** + * The options used to manipulate the behavior of the Google Earth plugin. + */ + getOptions(): GEOptions; + + /** + * The time class used to manipulate the behavior of the Google Earth plugin time. + */ + getTime(): GETime; + + /** + * Controls the window options. + */ + getWindow(): GEWindow; + + /** + * Controls the globe behavior. + */ + getGlobe(): GEGlobe; + + /** + * Displays the dawn to dusk views. + */ + getSun(): GESun; + + /** + * Controls built-in layer behavior. + */ + getLayerRoot(): KmlLayerRoot; + + /** + * Controls the plugin viewport. + */ + getView(): GEView; + + /** + * Controls the navigation controls on the globe. + */ + getNavigationControl(): GENavigationControl; + + /** + * The top-level features currently in the Earth object. + */ + getFeatures(): GEFeatureContainer; + + /** + * Exposes functionality for interacting with KML tours. + */ + getTourPlayer(): GETourPlayer; + + /** + * Exposes functionality for interacting with photo overlays. + */ + getPhotoOverlayViewer(): GEPhotoOverlayViewer; + + /** + * Returns a number between 0 and 100 (inclusive) that indicates the progress of the streaming of imagery for the current view. + * + * A value of 100 means that the imagery is completely streamed in. + */ + getStreamingPercent(): number; + } + +} diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 0c551fd712..0aef3b74a6 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -61,6 +61,7 @@ declare namespace google.maps { backgroundColor?: string; center?: LatLng|LatLngLiteral; disableDefaultUI?: boolean; + clickableIcons?: boolean; disableDoubleClickZoom?: boolean; draggable?: boolean; draggableCursor?: string; @@ -427,7 +428,7 @@ declare namespace google.maps { /** * Marker position. Required. */ - position: LatLng; + position: LatLng|LatLngLiteral; /** Image map region definition used for drag/click. */ shape?: MarkerShape; /** Rollover text. */ @@ -755,7 +756,7 @@ declare namespace google.maps { zIndex?: number; } - export interface PolyMouseEvent { + export interface PolyMouseEvent extends MouseEvent { edge?: number; path?: number; vertex?: number; diff --git a/graphene-pk11/graphene-pk11.d.ts b/graphene-pk11/graphene-pk11.d.ts index b7d26bf94a..15d4d632a6 100644 --- a/graphene-pk11/graphene-pk11.d.ts +++ b/graphene-pk11/graphene-pk11.d.ts @@ -2131,6 +2131,7 @@ declare module "graphene-pk11" { SO_PIN_FINAL_TRY, SO_PIN_LOCKED, SO_PIN_TO_BE_CHANGED, + ERROR_STATE, } class Token extends HandleObject { diff --git a/graphlib/graphlib-tests.ts b/graphlib/graphlib-tests.ts new file mode 100644 index 0000000000..ff9268ab0f --- /dev/null +++ b/graphlib/graphlib-tests.ts @@ -0,0 +1,24 @@ +/// + +import * as graphlib from 'graphlib'; + +function test_graph() { + var g = new graphlib.Graph(); + g.setEdge('a', 'b'); + g.setEdge('a', 'b', 1.023); + + g.edge('a', 'b'); + g.edge({v: 'a', w: 'b'}); + + graphlib.json.read(graphlib.json.write(g)); + + graphlib.alg.dijkstra(g, 'a', e => g.edge(e)); + graphlib.alg.dijkstraAll(g, e => g.edge(e)); + graphlib.alg.dijkstraAll(g); + + graphlib.alg.findCycles(g); + graphlib.alg.isAcyclic(g); + graphlib.alg.prim(g, e => g.edge(e)); + graphlib.alg.tarjan(g); + graphlib.alg.topsort(g); +} diff --git a/graphlib/graphlib.d.ts b/graphlib/graphlib.d.ts new file mode 100644 index 0000000000..1f017d5383 --- /dev/null +++ b/graphlib/graphlib.d.ts @@ -0,0 +1,291 @@ +// Type definitions for graphlib 2.1.1 +// Project: https://github.com/cpettitt/graphlib +// Definitions by: Dan Vanderkam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +declare module "graphlib" { + export interface GraphOptions { + directed?: boolean; // default: true. + multigraph?: boolean; // default: false. + compound?: boolean; // default: false. + } + + export interface Edge { + v: string; + w: string; + /** The name that uniquely identifies a multi-edge. */ + name?: string; + } + + // TODO: add template parameters for edge and vertex labels? + export class Graph { + constructor(options?: GraphOptions); + + /** + * Creates or updates the value for the node v in the graph. If label is supplied + * it is set as the value for the node. If label is not supplied and the node was + * created by this call then the default node label will be assigned. Returns the + * graph, allowing this to be chained with other functions. Takes O(1) time. + */ + setNode(name: string, label?: any): Graph; + + hasNode(name: string): boolean; + + /** + * Remove the node with the id v in the graph or do nothing if the node is not in + * the graph. If the node was removed this function also removes any incident + * edges. Returns the graph, allowing this to be chained with other functions. + * Takes O(|E|) time. */ + removeNode(name: string): Graph; + + nodes(): string[]; + + /** Returns the label for this node. */ + node(name: string): any; + + /** + * Creates or updates the label for the edge (v, w) with the optionally supplied + * name. If label is supplied it is set as the value for the edge. If label is not + * supplied and the edge was created by this call then the default edge label will + * be assigned. The name parameter is only useful with multigraphs. Returns the + * graph, allowing this to be chained with other functions. Takes O(1) time. + */ + setEdge(v: string, w: string, label?: any): Graph; + + edges(): Edge[]; + + /** Returns the label for this edge. */ + edge(v: string, w: string): any; + edge(e: Edge): any; + + /** + * Return all edges that point to the node v. Optionally filters those edges down to just those + * coming from node u. Behavior is undefined for undirected graphs - use nodeEdges instead. + * Returns undefined if node v is not in the graph. Takes O(|E|) time. + */ + inEdges(v: string, u?: string): Edge[]; + + /** + * Return all edges that are pointed at by node v. Optionally filters those edges down to just + * those point to w. Behavior is undefined for undirected graphs - use nodeEdges instead. + * Returns undefined if node v is not in the graph. Takes O(|E|) time. + */ + outEdges(v: string, w?: string): Edge[]; + + /** + * Returns all edges to or from node v regardless of direction. Optionally filters those edges + * down to just those between nodes v and w regardless of direction. Returns undefined if node v + * is not in the graph. Takes O(|E|) time. + */ + nodeEdges(v: string, w?: string): Edge[]; + + /** + * Return all nodes that are predecessors of the specified node or undefined if node v is not in + * the graph. Behavior is undefined for undirected graphs - use neighbors instead. Takes O(|V|) + * time. + */ + predecessors(node: string): string[]; + + /** + * Return all nodes that are successors of the specified node or undefined if node v is not in + * the graph. Behavior is undefined for undirected graphs - use neighbors instead. Takes O(|V|) + * time. + */ + successors(node: string): string[]; + + /** + * Return all nodes that are predecessors or successors of the specified node or undefined if + * node v is not in the graph. Takes O(|V|) time. + */ + neighbors(node: string): string[]; + + isDirected(): boolean; + isMultigraph(): boolean; + isCompound(): boolean; + + /** Sets the label for the graph to label. */ + setGraph(label: string): void; + + /** + * Returns the currently assigned label for the graph. If no label has been assigned, + * returns undefined. + */ + graph(): string; + + /** + * Returns the number of nodes in the graph. + */ + nodeCount(): number; + + /** + * Returns the number of edges in the graph. + */ + edgeCount(): number; + + /** Returns those nodes in the graph that have no in-edges. Takes O(|V|) time. */ + sources(): string[]; + + /** Returns those nodes in the graph that have no out-edges. Takes O(|V|) time. */ + sinks(): string[]; + } + + export namespace json { + /** + * Creates a JSONrepresentation of the graph that can be serialized to a string with + * JSON.stringify. The graph can later be restored using json.read. + */ + function write(g: Graph): Object; + + /** + * Takes JSON as input and returns the graph representation. For example, if we have + * serialized the graph in json-write to a string named str, we can restore it to a + * graph as follows: + * + * var g2 = graphlib.json.read(JSON.parse(str)); + * g2.nodes(); + * // ['a', 'b'] + * g2.edges() + * // [ { v: 'a', w: 'b' } ] + */ + function read(json: Object): Graph; + } + + export interface Path { + distance: number; + predecessor: string; + } + + export namespace alg { + /** + * Finds all connected components in a graph and returns an array of these components. + * Each component is itself an array that contains the ids of nodes in the component. + * This function takes O(|V|) time. + */ + function components(g: Graph): string[][]; + + /** + * This function is an implementation of Dijkstra's algorithm which finds the shortest + * path from source to all other nodes in g. This function returns a map of + * v -> { distance, predecessor }. The distance property holds the sum of the weights + * from source to v along the shortest path or Number.POSITIVE_INFINITY if there is no path + * from source. The predecessor property can be used to walk the individual elements of the + * path from source to v in reverse order. + * + * It takes an optional weightFn(e) which returns the weight of the edge e. If no weightFn + * is supplied then each edge is assumed to have a weight of 1. This function throws an + * Error if any of the traversed edges have a negative edge weight. + * + * It takes an optional edgeFn(v) which returns the ids of all edges incident to the node v + * for the purposes of shortest path traversal. By default this function uses the g.outEdges. + * + * It takes O((|E| + |V|) * log |V|) time. + */ + function dijkstra( + graph: Graph, + source: string, + weightFn?: (e: Edge) => number, + edgeFn?: (v: string) => Edge[] + ): {[node: string]: Path}; + + /** + * This function finds the shortest path from each node to every other reachable node in + * the graph. It is similar to alg.dijkstra, but instead of returning a single-source + * array, it returns a mapping of of source -> alg.dijksta(g, source, weightFn, edgeFn). + * + * This function takes an optional weightFn(e) which returns the weight of the edge e. + * If no weightFn is supplied then each edge is assumed to have a weight of 1. This + * function throws an Error if any of the traversed edges have a negative edge weight. + * + * This function takes an optional edgeFn(u) which returns the ids of all edges incident + * to the node u for the purposes of shortest path traversal. By default this function + * uses g.outEdges. + * + * This function takes O(|V| * (|E| + |V|) * log |V|) time. + */ + function dijkstraAll( + graph: Graph, + weightFn?: (e: Edge) => number, + edgeFn?: (v: string) => Edge[] + ): {[source: string]: {[node: string]: Path}}; + + /** + * Given a Graph, g, this function returns all nodes that are part of a cycle. As there + * may be more than one cycle in a graph this function return an array of these cycles, + * where each cycle is itself represented by an array of ids for each node involved in + * that cycle. + * + * alg.isAcyclic is more efficient if you only need to determine whether a graph has a + * cycle or not. + */ + function findCycles(graph: Graph): string[][]; + + /** + * This function is an implementation of the Floyd-Warshall algorithm, which finds the + * shortest path from each node to every other reachable node in the graph. It is similar + * to alg.dijkstraAll, but it handles negative edge weights and is more efficient for some types + * of graphs. This function returns a map of source -> { target -> { distance, predecessor }. + * The distance property holds the sum of the weights from source to target along the shortest + * path of Number.POSITIVE_INFINITY if there is no path from source. The predecessor property + * can be used to walk the individual elements of the path from source to target in reverse + * order. + * + * This function takes an optional weightFn(e) which returns the weight of the edge e. If no + * weightFunc is supplied then each edge is assumed to have a weight of 1. + * + * This function takes an optional edgeFn(v) which returns the ids of all edges incident to the + * node v for the purposes of shortest path traversal. By default this function uses the + * outEdges function on the supplied graph. + * + * This algorithm takes O(|V|^3) time. + */ + function floydWarshall( + graph: Graph, + weightFn?: (e: Edge) => number, + edgeFn?: (v: string) => Edge[] + ): {[source: string]: {[node: string]: Path}}; + + /** + * Given a Graph, g, this function returns true if the graph has no cycles and returns false if it + * does. This algorithm returns as soon as it detects the first cycle. You can use alg.findCycles + * to get the actual list of cycles in the graph. + */ + function isAcyclic(graph: Graph): boolean; + + /** + * Prim's algorithm takes a connected undirected graph and generates a minimum spanning tree. This + * function returns the minimum spanning tree as an undirected graph. This algorithm is derived + * from the description in "Introduction to Algorithms", Third Edition, Cormen, et al., Pg 634. + * + * This function takes a weightFn(e) which returns the weight of the edge e. It throws an Error if + * the graph is not connected. + * + * This function takes O(|E| log |V|) time. + */ + function prim(graph: Graph, weightFn: (e: Edge) => number): Graph; + + /** + * This function is an implementation of Tarjan's algorithm which finds all strongly connected + * components in the directed graph g. Each strongly connected component is composed of nodes that + * can reach all other nodes in the component via directed edges. A strongly connected component + * can consist of a single node if that node cannot both reach and be reached by any other + * specific node in the graph. Components of more than one node are guaranteed to have at least + * one cycle. + * + * This function returns an array of components. Each component is itself an array that contains + * the ids of all nodes in the component. + */ + function tarjan(graph: Graph): string[][]; + + /** + * An implementation of topological sorting. + * + * Given a Graph g this function returns an array of nodes such that for each edge u -> v, u + * appears before v in the array. If the graph has a cycle it is impossible to generate such a + * list and CycleException is thrown. + * + * Takes O(|V| + |E|) time. + */ + function topsort(graph: Graph): string[]; + } +} diff --git a/graphql/graphql-tests.ts b/graphql/graphql-tests.ts new file mode 100644 index 0000000000..c6ee4aa0c2 --- /dev/null +++ b/graphql/graphql-tests.ts @@ -0,0 +1,184 @@ +/// + +import * as graphql from 'graphql'; + +/////////////////////////// +// graphql // +/////////////////////////// +namespace graphql_tests { + // TODO +} + +/////////////////////////// +// graphql/language // +/////////////////////////// +namespace language_ast_tests { + // TODOS +} + +namespace language_index_tests { + // TODOS +} + +namespace language_kinds_tests { + // TODOS +} + +namespace language_lexer_tests { + // TODOS +} + +namespace language_location_tests { + // TODOS +} + +namespace language_parser_tests { + // TODOS +} + +namespace language_printer_tests { + // TODOS +} + +namespace language_source_tests { + // TODOS +} + +namespace language_visitor_tests { + // TODOS +} + +/////////////////////////// +// graphql/type // +/////////////////////////// +namespace type_definition_tests { + // TODO +} + +namespace type_directives_tests { + // TODO +} + +namespace type_introspection_tests { + // TODO +} + +namespace type_scalars_tests { + // TODO +} + +namespace type_schema_tests { + // TODO +} + +/////////////////////////// +// graphql/validation // +/////////////////////////// +namespace validation_specifiedRules_tests { + +} + +namespace validation_validate_tests { + +} + +/////////////////////////// +// graphql/execution // +/////////////////////////// +namespace execution_execute_tests { + // TODOS +} + +namespace execution_values_tests { + // TODOS +} + +/////////////////////////// +// graphql/error // +/////////////////////////// +namespace error_GraphQLError { + +} + +namespace error_formatError { + +} + +namespace error_locatedError { + +} + +namespace error_syntaxError { + +} + +/////////////////////////// +// graphql/utilities // +/////////////////////////// +namespace utilities_TypeInfo_tests { + //TODOS +} + +namespace utilities_assertValidName_tests { + //TODOS +} + +namespace utilities_astFromValue_tests { + //TODOS +} + +namespace utilities_buildASTSchema_tests { + //TODOS +} + +namespace utilities_buildClientSchema_tests { + //TODOS +} + +namespace utilities_concatAST_tests { + //TODOS +} + +namespace utilities_extendSchema_tests { + //TODOS +} + +namespace utilities_getOperationAST_tests { + //TODOS +} + +namespace utilities_index_tests { + //TODOS +} + +namespace utilities_introspectionQuery_tests { + //TODOS +} + +namespace utilities_isValidJSValue_tests { + //TODOS +} + +namespace utilities_isValidLiteralValue_tests { + //TODOS +} + +namespace utilities_schemaPrinter_tests { + //TODOS +} + +namespace utilities_separateOperations_tests { + //TODOS +} + +namespace utilities_typeComparators_tests { + //TODOS +} + +namespace utilities_typeFromAST_tests { + //TODOS +} + +namespace utilities_valueFromAST_tests { + //TODOS +} diff --git a/graphql/graphql.d.ts b/graphql/graphql.d.ts new file mode 100644 index 0000000000..b441fbc204 --- /dev/null +++ b/graphql/graphql.d.ts @@ -0,0 +1,2390 @@ +// Type definitions for graphql v0.7.0 +// Project: https://www.npmjs.com/package/graphql +// Definitions by: TonyYang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/************************************* + * * + * MODULES * + * * + *************************************/ +/////////////////////////// +// graphql // +/////////////////////////// +declare module "graphql" { + // The primary entry point into fulfilling a GraphQL request. + export { + graphql + } from 'graphql/graphql'; + + + // Create and operate on GraphQL type definitions and schema. + export { + GraphQLSchema, + + // Definitions + GraphQLScalarType, + GraphQLObjectType, + GraphQLInterfaceType, + GraphQLUnionType, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLList, + GraphQLNonNull, + GraphQLDirective, + + // "Enum" of Type Kinds + TypeKind, + + // "Enum" of Directive Locations + DirectiveLocation, + + // Scalars + GraphQLInt, + GraphQLFloat, + GraphQLString, + GraphQLBoolean, + GraphQLID, + + // Built-in Directives defined by the Spec + specifiedDirectives, + GraphQLIncludeDirective, + GraphQLSkipDirective, + GraphQLDeprecatedDirective, + + // Constant Deprecation Reason + DEFAULT_DEPRECATION_REASON, + + // Meta-field definitions. + SchemaMetaFieldDef, + TypeMetaFieldDef, + TypeNameMetaFieldDef, + + // GraphQL Types for introspection. + __Schema, + __Directive, + __DirectiveLocation, + __Type, + __Field, + __InputValue, + __EnumValue, + __TypeKind, + + // Predicates + isType, + isInputType, + isOutputType, + isLeafType, + isCompositeType, + isAbstractType, + + // Un-modifiers + getNullableType, + getNamedType, + } from 'graphql/type'; + + + // Parse and operate on GraphQL language source files. + export { + Source, + getLocation, + + // Parse + parse, + parseValue, + parseType, + + // Print + print, + + // Visit + visit, + visitInParallel, + visitWithTypeInfo, + Kind, + TokenKind, + BREAK, + } from 'graphql/language'; + + + // Execute GraphQL queries. + export { + execute, + } from 'graphql/execution'; + + + // Validate GraphQL queries. + export { + validate, + specifiedRules, + } from 'graphql/validation'; + + + // Create and format GraphQL errors. + export { + GraphQLError, + formatError, + } from 'graphql/error'; + + + // Utilities for operating on GraphQL type schema and parsed sources. + /* + export { + // The GraphQL query recommended for a full schema introspection. + introspectionQuery, + + // Gets the target Operation from a Document + getOperationAST, + + // Build a GraphQLSchema from an introspection result. + buildClientSchema, + + // Build a GraphQLSchema from a parsed GraphQL Schema language AST. + buildASTSchema, + + // Build a GraphQLSchema from a GraphQL schema language document. + buildSchema, + + // Extends an existing GraphQLSchema from a parsed GraphQL Schema + // language AST. + extendSchema, + + // Print a GraphQLSchema to GraphQL Schema language. + printSchema, + + // Create a GraphQLType from a GraphQL language AST. + typeFromAST, + + // Create a JavaScript value from a GraphQL language AST. + valueFromAST, + + // Create a GraphQL language AST from a JavaScript value. + astFromValue, + + // A helper to use within recursive-descent visitors which need to be aware of + // the GraphQL type system. + TypeInfo, + + // Determine if JavaScript values adhere to a GraphQL type. + isValidJSValue, + + // Determine if AST values adhere to a GraphQL type. + isValidLiteralValue, + + // Concatenates multiple AST together. + concatAST, + + // Separates an AST into an AST per Operation. + separateOperations, + + // Comparators for types + isEqualType, + isTypeSubTypeOf, + doTypesOverlap, + + // Asserts a string is a valid GraphQL name. + assertValidName, + } from 'graphql/utilities'; + */ +} + +declare module "graphql/graphql" { + import { GraphQLError } from 'graphql/error/GraphQLError'; + import { GraphQLSchema } from 'graphql/type/schema'; + + /** + * This is the primary entry point function for fulfilling GraphQL operations + * by parsing, validating, and executing a GraphQL document along side a + * GraphQL schema. + * + * More sophisticated GraphQL servers, such as those which persist queries, + * may wish to separate the validation and execution phases to a static time + * tooling step, and a server runtime step. + * + * schema: + * The GraphQL type system to use when validating and executing a query. + * requestString: + * A GraphQL language formatted string representing the requested operation. + * rootValue: + * The value provided as the first argument to resolver functions on the top + * level type (e.g. the query object type). + * variableValues: + * A mapping of variable name to runtime value to use for all variables + * defined in the requestString. + * operationName: + * The name of the operation to use if requestString contains multiple + * possible operations. Can be omitted if requestString contains only + * one operation. + */ + function graphql( + schema: GraphQLSchema, + requestString: string, + rootValue?: any, + contextValue?: any, + variableValues?: { + [key: string]: any + }, + operationName?: string + ): Promise; + + /** + * The result of a GraphQL parse, validation and execution. + * + * `data` is the result of a successful execution of the query. + * `errors` is included when any errors occurred as a non-empty array. + */ + type GraphQLResult = { + data?: Object; + errors?: Array; + } +} + +/////////////////////////// +// graphql/type // +// - ast // +// - kinds // +// - lexer // +// - location // +// - parser // +// - printer // +// - source // +// - visitor // +/////////////////////////// + +declare module "graphql/language" { + export * from "graphql/language/index"; +} + +declare module "graphql/language/index" { + export { getLocation } from 'graphql/language/location'; + import * as Kind from 'graphql/language/kinds'; + export { Kind }; + export { createLexer, TokenKind } from 'graphql/language/lexer'; + export { parse, parseValue, parseType } from 'graphql/language/parser'; + export { print } from 'graphql/language/printer'; + export { Source } from 'graphql/language/source'; + export { visit, visitInParallel, visitWithTypeInfo, BREAK } from 'graphql/language/visitor'; +} + +declare module "graphql/language/ast" { + import { Source } from 'graphql/language/source'; + + /** + * Contains a range of UTF-8 character offsets and token references that + * identify the region of the source from which the AST derived. + */ + type Location = { + + /** + * The character offset at which this Node begins. + */ + start: number; + + /** + * The character offset at which this Node ends. + */ + end: number; + + /** + * The Token at which this Node begins. + */ + startToken: Token; + + /** + * The Token at which this Node ends. + */ + endToken: Token; + + /** + * The Source document the AST represents. + */ + source: Source; + }; + + /** + * Represents a range of characters represented by a lexical token + * within a Source. + */ + type Token = { + + /** + * The kind of Token. + */ + kind: '' + | '' + | '!' + | '$' + | '(' + | ')' + | '...' + | ':' + | '=' + | '@' + | '[' + | ']' + | '{' + | '|' + | '}' + | 'Name' + | 'Int' + | 'Float' + | 'String' + | 'Comment'; + + /** + * The character offset at which this Node begins. + */ + start: number; + + /** + * The character offset at which this Node ends. + */ + end: number; + + /** + * The 1-indexed line number on which this Token appears. + */ + line: number; + + /** + * The 1-indexed column number at which this Token begins. + */ + column: number; + + /** + * For non-punctuation tokens, represents the interpreted value of the token. + */ + value: string | void; + + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + prev?: Token; + next?: Token; + }; + + /** + * The list of all possible AST node types. + */ + type Node = Name + | Document + | OperationDefinition + | VariableDefinition + | Variable + | SelectionSet + | Field + | Argument + | FragmentSpread + | InlineFragment + | FragmentDefinition + | IntValue + | FloatValue + | StringValue + | BooleanValue + | EnumValue + | ListValue + | ObjectValue + | ObjectField + | Directive + | NamedType + | ListType + | NonNullType + | SchemaDefinition + | OperationTypeDefinition + | ScalarTypeDefinition + | ObjectTypeDefinition + | FieldDefinition + | InputValueDefinition + | InterfaceTypeDefinition + | UnionTypeDefinition + | EnumTypeDefinition + | EnumValueDefinition + | InputObjectTypeDefinition + | TypeExtensionDefinition + | DirectiveDefinition + + // Name + + type Name = { + kind: 'Name'; + loc?: Location; + value: string; + } + + // Document + + type Document = { + kind: 'Document'; + loc?: Location; + definitions: Array; + } + + type Definition = OperationDefinition + | FragmentDefinition + | TypeSystemDefinition // experimental non-spec addition. + + type OperationDefinition = { + kind: 'OperationDefinition'; + loc?: Location; + operation: OperationType; + name?: Name; + variableDefinitions?: Array; + directives?: Array; + selectionSet: SelectionSet; + } + + // Note: subscription is an experimental non-spec addition. + type OperationType = 'query' | 'mutation' | 'subscription'; + + type VariableDefinition = { + kind: 'VariableDefinition'; + loc?: Location; + variable: Variable; + type: Type; + defaultValue?: Value; + } + + type Variable = { + kind: 'Variable'; + loc?: Location; + name: Name; + } + + type SelectionSet = { + kind: 'SelectionSet'; + loc?: Location; + selections: Array; + } + + type Selection = Field + | FragmentSpread + | InlineFragment + + type Field = { + kind: 'Field'; + loc?: Location; + alias?: Name; + name: Name; + arguments?: Array; + directives?: Array; + selectionSet?: SelectionSet; + } + + type Argument = { + kind: 'Argument'; + loc?: Location; + name: Name; + value: Value; + } + + + // Fragments + + type FragmentSpread = { + kind: 'FragmentSpread'; + loc?: Location; + name: Name; + directives?: Array; + } + + type InlineFragment = { + kind: 'InlineFragment'; + loc?: Location; + typeCondition?: NamedType; + directives?: Array; + selectionSet: SelectionSet; + } + + type FragmentDefinition = { + kind: 'FragmentDefinition'; + loc?: Location; + name: Name; + typeCondition: NamedType; + directives?: Array; + selectionSet: SelectionSet; + } + + + // Values + + type Value = Variable + | IntValue + | FloatValue + | StringValue + | BooleanValue + | EnumValue + | ListValue + | ObjectValue + + type IntValue = { + kind: 'IntValue'; + loc?: Location; + value: string; + } + + type FloatValue = { + kind: 'FloatValue'; + loc?: Location; + value: string; + } + + type StringValue = { + kind: 'StringValue'; + loc?: Location; + value: string; + } + + type BooleanValue = { + kind: 'BooleanValue'; + loc?: Location; + value: boolean; + } + + type EnumValue = { + kind: 'EnumValue'; + loc?: Location; + value: string; + } + + type ListValue = { + kind: 'ListValue'; + loc?: Location; + values: Array; + } + + type ObjectValue = { + kind: 'ObjectValue'; + loc?: Location; + fields: Array; + } + + type ObjectField = { + kind: 'ObjectField'; + loc?: Location; + name: Name; + value: Value; + } + + + // Directives + + type Directive = { + kind: 'Directive'; + loc?: Location; + name: Name; + arguments?: Array; + } + + + // Type Reference + + type Type = NamedType + | ListType + | NonNullType + + type NamedType = { + kind: 'NamedType'; + loc?: Location; + name: Name; + }; + + type ListType = { + kind: 'ListType'; + loc?: Location; + type: Type; + } + + type NonNullType = { + kind: 'NonNullType'; + loc?: Location; + type: NamedType | ListType; + } + + // Type System Definition + + type TypeSystemDefinition = SchemaDefinition + | TypeDefinition + | TypeExtensionDefinition + | DirectiveDefinition + + type SchemaDefinition = { + kind: 'SchemaDefinition'; + loc?: Location; + directives: Array; + operationTypes: Array; + } + + type OperationTypeDefinition = { + kind: 'OperationTypeDefinition'; + loc?: Location; + operation: OperationType; + type: NamedType; + } + + type TypeDefinition = ScalarTypeDefinition + | ObjectTypeDefinition + | InterfaceTypeDefinition + | UnionTypeDefinition + | EnumTypeDefinition + | InputObjectTypeDefinition + + type ScalarTypeDefinition = { + kind: 'ScalarTypeDefinition'; + loc?: Location; + name: Name; + directives?: Array; + } + + type ObjectTypeDefinition = { + kind: 'ObjectTypeDefinition'; + loc?: Location; + name: Name; + interfaces?: Array; + directives?: Array; + fields: Array; + } + + type FieldDefinition = { + kind: 'FieldDefinition'; + loc?: Location; + name: Name; + arguments: Array; + type: Type; + directives?: Array; + } + + type InputValueDefinition = { + kind: 'InputValueDefinition'; + loc?: Location; + name: Name; + type: Type; + defaultValue?: Value; + directives?: Array; + } + + type InterfaceTypeDefinition = { + kind: 'InterfaceTypeDefinition'; + loc?: Location; + name: Name; + directives?: Array; + fields: Array; + } + + type UnionTypeDefinition = { + kind: 'UnionTypeDefinition'; + loc?: Location; + name: Name; + directives?: Array; + types: Array; + } + + type EnumTypeDefinition = { + kind: 'EnumTypeDefinition'; + loc?: Location; + name: Name; + directives?: Array; + values: Array; + } + + type EnumValueDefinition = { + kind: 'EnumValueDefinition'; + loc?: Location; + name: Name; + directives?: Array; + } + + type InputObjectTypeDefinition = { + kind: 'InputObjectTypeDefinition'; + loc?: Location; + name: Name; + directives?: Array; + fields: Array; + } + + type TypeExtensionDefinition = { + kind: 'TypeExtensionDefinition'; + loc?: Location; + definition: ObjectTypeDefinition; + } + + type DirectiveDefinition = { + kind: 'DirectiveDefinition'; + loc?: Location; + name: Name; + arguments?: Array; + locations: Array; + } + +} + +declare module "graphql/language/kinds" { + // Name + + const NAME: 'Name'; + + // Document + + const DOCUMENT: 'Document'; + const OPERATION_DEFINITION: 'OperationDefinition'; + const VARIABLE_DEFINITION: 'VariableDefinition'; + const VARIABLE: 'Variable'; + const SELECTION_SET: 'SelectionSet'; + const FIELD: 'Field'; + const ARGUMENT: 'Argument'; + + // Fragments + + const FRAGMENT_SPREAD: 'FragmentSpread'; + const INLINE_FRAGMENT: 'InlineFragment'; + const FRAGMENT_DEFINITION: 'FragmentDefinition'; + + // Values + + const INT: 'IntValue'; + const FLOAT: 'FloatValue'; + const STRING: 'StringValue'; + const BOOLEAN: 'BooleanValue'; + const ENUM: 'EnumValue'; + const LIST: 'ListValue'; + const OBJECT: 'ObjectValue'; + const OBJECT_FIELD: 'ObjectField'; + + // Directives + + const DIRECTIVE: 'Directive'; + + // Types + + const NAMED_TYPE: 'NamedType'; + const LIST_TYPE: 'ListType'; + const NON_NULL_TYPE: 'NonNullType'; + + // Type System Definitions + + const SCHEMA_DEFINITION: 'SchemaDefinition'; + const OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition'; + + // Type Definitions + + const SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition'; + const OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition'; + const FIELD_DEFINITION: 'FieldDefinition'; + const INPUT_VALUE_DEFINITION: 'InputValueDefinition'; + const INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition'; + const UNION_TYPE_DEFINITION: 'UnionTypeDefinition'; + const ENUM_TYPE_DEFINITION: 'EnumTypeDefinition'; + const ENUM_VALUE_DEFINITION: 'EnumValueDefinition'; + const INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition'; + + // Type Extensions + + const TYPE_EXTENSION_DEFINITION: 'TypeExtensionDefinition'; + + // Directive Definitions + + const DIRECTIVE_DEFINITION: 'DirectiveDefinition'; +} + +declare module "graphql/language/lexer" { + import { Token } from 'graphql/language/ast'; + import { Source } from 'graphql/language/source'; + import { syntaxError } from 'graphql/error'; + + /** + * Given a Source object, this returns a Lexer for that source. + * A Lexer is a stateful stream generator in that every time + * it is advanced, it returns the next token in the Source. Assuming the + * source lexes, the final Token emitted by the lexer will be of kind + * EOF, after which the lexer will repeatedly return the same EOF token + * whenever called. + */ + function createLexer( + source: Source, + options: TOptions + ): Lexer; + + /** + * The return type of createLexer. + */ + type Lexer = { + source: Source; + options: TOptions; + + /** + * The previously focused non-ignored token. + */ + lastToken: Token; + + /** + * The currently focused non-ignored token. + */ + token: Token; + + /** + * The (1-indexed) line containing the current token. + */ + line: number; + + /** + * The character offset at which the current line begins. + */ + lineStart: number; + + /** + * Advances the token stream to the next non-ignored token. + */ + advance(): Token; + }; + + /** + * An exported enum describing the different kinds of tokens that the + * lexer emits. + */ + const TokenKind: { + SOF: '' + EOF: '' + BANG: '!' + DOLLAR: '$' + PAREN_L: '(' + PAREN_R: ')' + SPREAD: '...' + COLON: ':' + EQUALS: '=' + AT: '@' + BRACKET_L: '[' + BRACKET_R: ']' + BRACE_L: '{' + PIPE: '|' + BRACE_R: '}' + NAME: 'Name' + INT: 'Int' + FLOAT: 'Float' + STRING: 'String' + COMMENT: 'Comment' + }; + + /** + * A helper function to describe a token as a string for debugging + */ + function getTokenDesc(token: Token): string; +} + +declare module "graphql/language/location" { + import { Source } from "graphql/language/source"; + + interface SourceLocation { + line: number; + column: number; + } + + function getLocation(source: Source, position: number): SourceLocation; +} + +declare module "graphql/language/parser" { + import { NamedType, Type, Value, Document } from "graphql/language/ast"; + import { Source } from "graphql/language/source"; + import { Lexer } from "graphql/language/lexer"; + + /** + * Configuration options to control parser behavior + */ + type ParseOptions = { + /** + * By default, the parser creates AST nodes that know the location + * in the source that they correspond to. This configuration flag + * disables that behavior for performance or testing. + */ + noLocation?: boolean + }; + + /** + * Given a GraphQL source, parses it into a Document. + * Throws GraphQLError if a syntax error is encountered. + */ + function parse( + source: string | Source, + options?: ParseOptions + ): Document; + + /** + * Given a string containing a GraphQL value, parse the AST for that value. + * Throws GraphQLError if a syntax error is encountered. + * + * This is useful within tools that operate upon GraphQL Values directly and + * in isolation of complete GraphQL documents. + */ + function parseValue( + source: Source | string, + options?: ParseOptions + ): Value; + + function parseConstValue(lexer: Lexer): Value; + + /** + * Type : + * - NamedType + * - ListType + * - NonNullType + */ + function parseType(lexer: Lexer): Type; + + /** + * NamedType : Name + */ + function parseNamedType(lexer: Lexer): NamedType; +} + +declare module "graphql/language/printer" { + /** + * Converts an AST into a string, using one set of reasonable + * formatting rules. + */ + function print(ast: any): string; +} + +declare module "graphql/language/source" { + class Source { + body: string; + name: string; + constructor(body: string, name?: string); + } +} + +declare module "graphql/language/visitor" { + const QueryDocumentKeys: { + Name: any[]; + Document: string[]; + OperationDefinition: string[]; + VariableDefinition: string[]; + Variable: string[]; + SelectionSet: string[]; + Field: string[]; + Argument: string[]; + + FragmentSpread: string[]; + InlineFragment: string[]; + FragmentDefinition: string[]; + + IntValue: number[]; + FloatValue: number[]; + StringValue: string[]; + BooleanValue: boolean[]; + EnumValue: any[]; + ListValue: string[]; + ObjectValue: string[]; + ObjectField: string[]; + + Directive: string[]; + + NamedType: string[]; + ListType: string[]; + NonNullType: string[]; + + ObjectTypeDefinition: string[]; + FieldDefinition: string[]; + InputValueDefinition: string[]; + InterfaceTypeDefinition: string[]; + UnionTypeDefinition: string[]; + ScalarTypeDefinition: string[]; + EnumTypeDefinition: string[]; + EnumValueDefinition: string[]; + InputObjectTypeDefinition: string[]; + TypeExtensionDefinition: string[]; + } + + const BREAK: any; + + function visit(root: any, visitor: any, keyMap: any): any; + + function visitInParallel(visitors: any): any; + + function visitWithTypeInfo(typeInfo: any, visitor: any): any; +} + +/////////////////////////// +// graphql/type // +/////////////////////////// +declare module "graphql/type" { + export * from "graphql/type/index"; +} + +declare module "graphql/type/index" { + // GraphQL Schema definition + export { GraphQLSchema } from 'graphql/type/schema'; + + export { + // Predicates + isType, + isInputType, + isOutputType, + isLeafType, + isCompositeType, + isAbstractType, + + // Un-modifiers + getNullableType, + getNamedType, + + // Definitions + GraphQLScalarType, + GraphQLObjectType, + GraphQLInterfaceType, + GraphQLUnionType, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLList, + GraphQLNonNull, + } from 'graphql/type/definition'; + + export { + // "Enum" of Directive Locations + DirectiveLocation, + + // Directives Definition + GraphQLDirective, + + // Built-in Directives defined by the Spec + specifiedDirectives, + GraphQLIncludeDirective, + GraphQLSkipDirective, + GraphQLDeprecatedDirective, + + // Constant Deprecation Reason + DEFAULT_DEPRECATION_REASON, + } from 'graphql/type/directives'; + + // Common built-in scalar instances. + export { + GraphQLInt, + GraphQLFloat, + GraphQLString, + GraphQLBoolean, + GraphQLID, + } from 'graphql/type/scalars'; + + export { + // "Enum" of Type Kinds + TypeKind, + + // GraphQL Types for introspection. + __Schema, + __Directive, + __DirectiveLocation, + __Type, + __Field, + __InputValue, + __EnumValue, + __TypeKind, + + // Meta-field definitions. + SchemaMetaFieldDef, + TypeMetaFieldDef, + TypeNameMetaFieldDef, + } from 'graphql/type/introspection'; + +} + +declare module "graphql/type/definition" { + import { + OperationDefinition, + Field, + FragmentDefinition, + Value, + } from 'graphql/language/ast'; + import { GraphQLSchema } from 'graphql/type/schema'; + + /** + * These are all of the possible kinds of types. + */ + type GraphQLType = + GraphQLScalarType | + GraphQLObjectType | + GraphQLInterfaceType | + GraphQLUnionType | + GraphQLEnumType | + GraphQLInputObjectType | + GraphQLList | + GraphQLNonNull; + + function isType(type: any): boolean; + + /** + * These types may be used as input types for arguments and directives. + */ + type GraphQLInputType = + GraphQLScalarType | + GraphQLEnumType | + GraphQLInputObjectType | + GraphQLList | + GraphQLNonNull< + GraphQLScalarType | + GraphQLEnumType | + GraphQLInputObjectType | + GraphQLList + >; + + function isInputType(type: GraphQLType): boolean; + + /** + * These types may be used as output types as the result of fields. + */ + type GraphQLOutputType = + GraphQLScalarType | + GraphQLObjectType | + GraphQLInterfaceType | + GraphQLUnionType | + GraphQLEnumType | + GraphQLList | + GraphQLNonNull< + GraphQLScalarType | + GraphQLObjectType | + GraphQLInterfaceType | + GraphQLUnionType | + GraphQLEnumType | + GraphQLList + >; + + function isOutputType(type: GraphQLType): boolean; + + /** + * These types may describe types which may be leaf values. + */ + type GraphQLLeafType = + GraphQLScalarType | + GraphQLEnumType; + + function isLeafType(type: GraphQLType): boolean; + + /** + * These types may describe the parent context of a selection set. + */ + type GraphQLCompositeType = + GraphQLObjectType | + GraphQLInterfaceType | + GraphQLUnionType; + + function isCompositeType(type: GraphQLType): boolean; + + /** + * These types may describe the parent context of a selection set. + */ + type GraphQLAbstractType = + GraphQLInterfaceType | + GraphQLUnionType; + + function isAbstractType(type: GraphQLType): boolean; + + /** + * These types can all accept null as a value. + */ + type GraphQLNullableType = + GraphQLScalarType | + GraphQLObjectType | + GraphQLInterfaceType | + GraphQLUnionType | + GraphQLEnumType | + GraphQLInputObjectType | + GraphQLList; + + function getNullableType( + type: T + ): (T & GraphQLNullableType); + + /** + * These named types do not include modifiers like List or NonNull. + */ + type GraphQLNamedType = + GraphQLScalarType | + GraphQLObjectType | + GraphQLInterfaceType | + GraphQLUnionType | + GraphQLEnumType | + GraphQLInputObjectType; + + function getNamedType(type: GraphQLType): GraphQLNamedType + + /** + * Used while defining GraphQL types to allow for circular references in + * otherwise immutable type definitions. + */ + type Thunk = (() => T) | T; + + /** + * Scalar Type Definition + * + * The leaf values of any request and input values to arguments are + * Scalars (or Enums) and are defined with a name and a series of functions + * used to parse input from ast or variables and to ensure validity. + * + * Example: + * + * const OddType = new GraphQLScalarType({ + * name: 'Odd', + * serialize(value) { + * return value % 2 === 1 ? value : null; + * } + * }); + * + */ + class GraphQLScalarType { + name: string; + description: string; + constructor(config: GraphQLScalarTypeConfig); + + // Serializes an internal value to include in a response. + serialize(value: any): any; + + // Parses an externally provided value to use as an input. + parseValue(value: any): any; + + // Parses an externally provided literal value to use as an input. + parseLiteral(valueAST: Value): any; + + toString(): string; + } + + interface GraphQLScalarTypeConfig { + name: string; + description?: string; + serialize: (value: any) => TInternal; + parseValue?: (value: any) => TExternal; + parseLiteral?: (valueAST: Value) => TInternal; + } + + /** + * Object Type Definition + * + * Almost all of the GraphQL types you define will be object types. Object types + * have a name, but most importantly describe their fields. + * + * Example: + * + * const AddressType = new GraphQLObjectType({ + * name: 'Address', + * fields: { + * street: { type: GraphQLString }, + * number: { type: GraphQLInt }, + * formatted: { + * type: GraphQLString, + * resolve(obj) { + * return obj.number + ' ' + obj.street + * } + * } + * } + * }); + * + * When two types need to refer to each other, or a type needs to refer to + * itself in a field, you can use a function expression (aka a closure or a + * thunk) to supply the fields lazily. + * + * Example: + * + * const PersonType = new GraphQLObjectType({ + * name: 'Person', + * fields: () => ({ + * name: { type: GraphQLString }, + * bestFriend: { type: PersonType }, + * }) + * }); + * + */ + class GraphQLObjectType { + name: string; + description: string; + isTypeOf: GraphQLIsTypeOfFn; + + constructor(config: GraphQLObjectTypeConfig); + getFields(): GraphQLFieldDefinitionMap; + getInterfaces(): Array; + toString(): string; + } + + // + + interface GraphQLObjectTypeConfig { + name: string; + interfaces?: Thunk>; + fields: Thunk>; + isTypeOf?: GraphQLIsTypeOfFn; + description?: string + } + + type GraphQLTypeResolveFn = ( + value: any, + context: any, + info: GraphQLResolveInfo + ) => GraphQLObjectType; + + type GraphQLIsTypeOfFn = ( + source: any, + context: any, + info: GraphQLResolveInfo + ) => boolean; + + type GraphQLFieldResolveFn = ( + source: TSource, + args: { [argName: string]: any }, + context: any, + info: GraphQLResolveInfo + ) => any; + + interface GraphQLResolveInfo { + fieldName: string; + fieldASTs: Array; + returnType: GraphQLOutputType; + parentType: GraphQLCompositeType; + path: Array; + schema: GraphQLSchema; + fragments: { [fragmentName: string]: FragmentDefinition }; + rootValue: any; + operation: OperationDefinition; + variableValues: { [variableName: string]: any }; + } + + interface GraphQLFieldConfig { + type: GraphQLOutputType; + args?: GraphQLFieldConfigArgumentMap; + resolve?: GraphQLFieldResolveFn; + deprecationReason?: string; + description?: string; + } + + interface GraphQLFieldConfigArgumentMap { + [argName: string]: GraphQLArgumentConfig; + } + + interface GraphQLArgumentConfig { + type: GraphQLInputType; + defaultValue?: any; + description?: string; + } + + interface GraphQLFieldConfigMap { + [fieldName: string]: GraphQLFieldConfig; + } + + interface GraphQLFieldDefinition { + name: string; + description: string; + type: GraphQLOutputType; + args: Array; + resolve: GraphQLFieldResolveFn; + isDeprecated: boolean; + deprecationReason: string; + } + + interface GraphQLArgument { + name: string; + type: GraphQLInputType; + defaultValue?: any; + description?: string; + } + + interface GraphQLFieldDefinitionMap { + [fieldName: string]: GraphQLFieldDefinition; + } + + /** + * Interface Type Definition + * + * When a field can return one of a heterogeneous set of types, a Interface type + * is used to describe what types are possible, what fields are in common across + * all types, as well as a function to determine which type is actually used + * when the field is resolved. + * + * Example: + * + * const EntityType = new GraphQLInterfaceType({ + * name: 'Entity', + * fields: { + * name: { type: GraphQLString } + * } + * }); + * + */ + class GraphQLInterfaceType { + name: string; + description: string; + resolveType: GraphQLTypeResolveFn; + + constructor(config: GraphQLInterfaceTypeConfig); + + getFields(): GraphQLFieldDefinitionMap; + + toString(): string; + } + + interface GraphQLInterfaceTypeConfig { + name: string, + fields: Thunk>, + /** + * Optionally provide a custom type resolver function. If one is not provided, + * the default implementation will call `isTypeOf` on each implementing + * Object type. + */ + resolveType?: GraphQLTypeResolveFn, + description?: string + } + + /** + * Union Type Definition + * + * When a field can return one of a heterogeneous set of types, a Union type + * is used to describe what types are possible as well as providing a function + * to determine which type is actually used when the field is resolved. + * + * Example: + * + * const PetType = new GraphQLUnionType({ + * name: 'Pet', + * types: [ DogType, CatType ], + * resolveType(value) { + * if (value instanceof Dog) { + * return DogType; + * } + * if (value instanceof Cat) { + * return CatType; + * } + * } + * }); + * + */ + class GraphQLUnionType { + name: string; + description: string; + resolveType: GraphQLTypeResolveFn; + + constructor(config: GraphQLUnionTypeConfig); + + getTypes(): Array; + + toString(): string; + } + + interface GraphQLUnionTypeConfig { + name: string, + types: Thunk>, + /** + * Optionally provide a custom type resolver function. If one is not provided, + * the default implementation will call `isTypeOf` on each implementing + * Object type. + */ + resolveType?: GraphQLTypeResolveFn; + description?: string; + } + + /** + * Enum Type Definition + * + * Some leaf values of requests and input values are Enums. GraphQL serializes + * Enum values as strings, however internally Enums can be represented by any + * kind of type, often integers. + * + * Example: + * + * const RGBType = new GraphQLEnumType({ + * name: 'RGB', + * values: { + * RED: { value: 0 }, + * GREEN: { value: 1 }, + * BLUE: { value: 2 } + * } + * }); + * + * Note: If a value is not provided in a definition, the name of the enum value + * will be used as its internal value. + */ + class GraphQLEnumType { + name: string; + description: string; + + constructor(config: GraphQLEnumTypeConfig); + getValues(): Array; + serialize(value: any): string; + parseValue(value: any): any; + parseLiteral(valueAST: Value): any; + toString(): string; + } + + interface GraphQLEnumTypeConfig { + name: string; + values: GraphQLEnumValueConfigMap; + description?: string; + } + + interface GraphQLEnumValueConfigMap { + [valueName: string]: GraphQLEnumValueConfig; + } + + interface GraphQLEnumValueConfig { + value?: any; + deprecationReason?: string; + description?: string; + } + + interface GraphQLEnumValueDefinition { + name: string; + description: string; + deprecationReason: string; + value: any; + } + + /** + * Input Object Type Definition + * + * An input object defines a structured collection of fields which may be + * supplied to a field argument. + * + * Using `NonNull` will ensure that a value must be provided by the query + * + * Example: + * + * const GeoPoint = new GraphQLInputObjectType({ + * name: 'GeoPoint', + * fields: { + * lat: { type: new GraphQLNonNull(GraphQLFloat) }, + * lon: { type: new GraphQLNonNull(GraphQLFloat) }, + * alt: { type: GraphQLFloat, defaultValue: 0 }, + * } + * }); + * + */ + class GraphQLInputObjectType { + name: string; + description: string; + constructor(config: InputObjectConfig); + getFields(): InputObjectFieldMap; + toString(): string; + } + + interface InputObjectConfig { + name: string; + fields: Thunk; + description?: string; + } + + interface InputObjectFieldConfig { + type: GraphQLInputType; + defaultValue?: any; + description?: string; + } + + interface InputObjectConfigFieldMap { + [fieldName: string]: InputObjectFieldConfig; + } + + interface InputObjectField { + name: string; + type: GraphQLInputType; + defaultValue?: any; + description?: string; + } + + interface InputObjectFieldMap { + [fieldName: string]: InputObjectField; + } + + /** + * List Modifier + * + * A list is a kind of type marker, a wrapping type which points to another + * type. Lists are often created within the context of defining the fields of + * an object type. + * + * Example: + * + * const PersonType = new GraphQLObjectType({ + * name: 'Person', + * fields: () => ({ + * parents: { type: new GraphQLList(Person) }, + * children: { type: new GraphQLList(Person) }, + * }) + * }) + * + */ + class GraphQLList { + ofType: T; + constructor(type: T); + toString(): string; + } + + /** + * Non-Null Modifier + * + * A non-null is a kind of type marker, a wrapping type which points to another + * type. Non-null types enforce that their values are never null and can ensure + * an error is raised if this ever occurs during a request. It is useful for + * fields which you can make a strong guarantee on non-nullability, for example + * usually the id field of a database row will never be null. + * + * Example: + * + * const RowType = new GraphQLObjectType({ + * name: 'Row', + * fields: () => ({ + * id: { type: new GraphQLNonNull(GraphQLString) }, + * }) + * }) + * + * Note: the enforcement of non-nullability occurs within the executor. + */ + class GraphQLNonNull { + ofType: T; + + constructor(type: T); + + toString(): string; + } +} + +declare module "graphql/type/directives" { + import { + GraphQLFieldConfigArgumentMap, + GraphQLArgument + } from 'graphql/type/definition'; + + const DirectiveLocation: { + // Operations + QUERY: 'QUERY', + MUTATION: 'MUTATION', + SUBSCRIPTION: 'SUBSCRIPTION', + FIELD: 'FIELD', + FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION', + FRAGMENT_SPREAD: 'FRAGMENT_SPREAD', + INLINE_FRAGMENT: 'INLINE_FRAGMENT', + // Schema Definitions + SCHEMA: 'SCHEMA', + SCALAR: 'SCALAR', + OBJECT: 'OBJECT', + FIELD_DEFINITION: 'FIELD_DEFINITION', + ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION', + INTERFACE: 'INTERFACE', + UNION: 'UNION', + ENUM: 'ENUM', + ENUM_VALUE: 'ENUM_VALUE', + INPUT_OBJECT: 'INPUT_OBJECT', + INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION', + }; + + type DirectiveLocationEnum = any //$Keys + + /** + * Directives are used by the GraphQL runtime as a way of modifying execution + * behavior. Type system creators will usually not create these directly. + */ + class GraphQLDirective { + name: string; + description: string; + locations: Array; + args: Array; + + constructor(config: GraphQLDirectiveConfig); + } + + interface GraphQLDirectiveConfig { + name: string; + description?: string; + locations: Array; + args?: GraphQLFieldConfigArgumentMap; + } + + /** + * Used to conditionally include fields or fragments. + */ + const GraphQLIncludeDirective: GraphQLDirective; + + /** + * Used to conditionally skip (exclude) fields or fragments. + */ + const GraphQLSkipDirective: GraphQLDirective; + + /** + * Constant string used for default reason for a deprecation. + */ + const DEFAULT_DEPRECATION_REASON: 'No longer supported'; + + /** + * Used to declare element of a GraphQL schema as deprecated. + */ + const GraphQLDeprecatedDirective: GraphQLDirective; + + /** + * The full list of specified directives. + */ + export const specifiedDirectives: Array; +} + +declare module "graphql/type/introspection" { + import { + GraphQLScalarType, + GraphQLObjectType, + GraphQLInterfaceType, + GraphQLUnionType, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLList, + GraphQLNonNull, + } from 'graphql/type/definition'; + import { GraphQLFieldDefinition } from 'graphql/type/definition'; + + const __Schema: GraphQLObjectType; + const __Directive: GraphQLObjectType; + const __DirectiveLocation: GraphQLEnumType; + const __Type: GraphQLObjectType; + const __Field: GraphQLObjectType; + const __InputValue: GraphQLObjectType; + const __EnumValue: GraphQLObjectType; + + const TypeKind: { + SCALAR: 'SCALAR', + OBJECT: 'OBJECT', + INTERFACE: 'INTERFACE', + UNION: 'UNION', + ENUM: 'ENUM', + INPUT_OBJECT: 'INPUT_OBJECT', + LIST: 'LIST', + NON_NULL: 'NON_NULL', + } + + const __TypeKind: GraphQLEnumType; + + /** + * Note that these are GraphQLFieldDefinition and not GraphQLFieldConfig, + * so the format for args is different. + */ + const SchemaMetaFieldDef: GraphQLFieldDefinition; + const TypeMetaFieldDef: GraphQLFieldDefinition; + const TypeNameMetaFieldDef: GraphQLFieldDefinition; +} + +declare module "graphql/type/scalars" { + import { GraphQLScalarType } from 'graphql/type/definition'; + + const GraphQLInt: GraphQLScalarType; + const GraphQLFloat: GraphQLScalarType; + const GraphQLString: GraphQLScalarType; + const GraphQLBoolean: GraphQLScalarType; + const GraphQLID: GraphQLScalarType; +} + +declare module "graphql/type/schema" { + import { + GraphQLObjectType, + } from 'graphql/type/definition'; + import { + GraphQLType, + GraphQLNamedType, + GraphQLAbstractType + } from 'graphql/type/definition'; + import { + GraphQLDirective, + } from 'graphql/type/directives'; + + /** + * Schema Definition + * + * A Schema is created by supplying the root types of each type of operation, + * query and mutation (optional). A schema definition is then supplied to the + * validator and executor. + * + * Example: + * + * const MyAppSchema = new GraphQLSchema({ + * query: MyAppQueryRootType, + * mutation: MyAppMutationRootType, + * }) + * + * Note: If an array of `directives` are provided to GraphQLSchema, that will be + * the exact list of directives represented and allowed. If `directives` is not + * provided then a default set of the specified directives (e.g. @include and + * @skip) will be used. If you wish to provide *additional* directives to these + * specified directives, you must explicitly declare them. Example: + * + * const MyAppSchema = new GraphQLSchema({ + * ... + * directives: specifiedDirectives.concat([ myCustomDirective ]), + * }) + * + */ + class GraphQLSchema { + // private _queryType: GraphQLObjectType; + // private _mutationType: GraphQLObjectType; + // private _subscriptionType: GraphQLObjectType; + // private _directives: Array; + // private _typeMap: TypeMap; + // private _implementations: { [interfaceName: string]: Array }; + // private _possibleTypeMap: { [abstractName: string]: { [possibleName: string]: boolean } }; + + constructor(config: GraphQLSchemaConfig) + + getQueryType(): GraphQLObjectType; + getMutationType(): GraphQLObjectType; + getSubscriptionType(): GraphQLObjectType; + getTypeMap(): GraphQLNamedType; + getType(name: string): GraphQLType; + getPossibleTypes(abstractType: GraphQLAbstractType): Array; + + isPossibleType( + abstractType: GraphQLAbstractType, + possibleType: GraphQLObjectType + ): boolean; + + getDirectives(): Array; + getDirective(name: string): GraphQLDirective; + } + + interface GraphQLSchemaConfig { + query: GraphQLObjectType; + mutation?: GraphQLObjectType; + subscription?: GraphQLObjectType; + types?: Array; + directives?: Array; + } +} + +/////////////////////////// +// graphql/validation // +/////////////////////////// +declare module "graphql/validation" { + export * from "graphql/validation/index"; +} + +declare module "graphql/validation/index" { + export { validate } from 'graphql/validation/validate'; + export { specifiedRules } from 'graphql/validation/specifiedRules'; +} + +declare module "graphql/validation/specifiedRules" { + import { ValidationContext } from 'graphql/validation/validate'; // It needs to check. + + /** + * This set includes all validation rules defined by the GraphQL spec. + */ + const specifiedRules: Array<(context: ValidationContext) => any>; + +} + +declare module "graphql/validation/validate" { + import { GraphQLError } from 'graphql/error'; + import { + Document, + OperationDefinition, + Variable, + SelectionSet, + FragmentSpread, + FragmentDefinition, + } from 'graphql/language/ast'; + import { GraphQLSchema } from 'graphql/type/schema'; + import { + GraphQLInputType, + GraphQLOutputType, + GraphQLCompositeType, + GraphQLFieldDefinition, + GraphQLArgument + } from 'graphql/type/definition'; + import { GraphQLDirective } from 'graphql/type/directives'; + import { TypeInfo } from 'graphql/utilities/TypeInfo'; + import { specifiedRules } from 'graphql/validation/specifiedRules'; + + //type ValidationRule = (context: ValidationContext) => any; + + /** + * Implements the "Validation" section of the spec. + * + * Validation runs synchronously, returning an array of encountered errors, or + * an empty array if no errors were encountered and the document is valid. + * + * A list of specific validation rules may be provided. If not provided, the + * default list of rules defined by the GraphQL specification will be used. + * + * Each validation rules is a function which returns a visitor + * (see the language/visitor API). Visitor methods are expected to return + * GraphQLErrors, or Arrays of GraphQLErrors when invalid. + */ + function validate( + schema: GraphQLSchema, + ast: Document, + rules?: Array + ): Array; + + /** + * This uses a specialized visitor which runs multiple visitors in parallel, + * while maintaining the visitor skip and break API. + * + * @internal + */ + function visitUsingRules( + schema: GraphQLSchema, + typeInfo: TypeInfo, + documentAST: Document, + rules: Array + ): Array; + + type HasSelectionSet = OperationDefinition | FragmentDefinition; + interface VariableUsage { + node: Variable, + type: GraphQLInputType + } + + /** + * An instance of this class is passed as the "this" context to all validators, + * allowing access to commonly useful contextual information from within a + * validation rule. + */ + export class ValidationContext { + constructor(schema: GraphQLSchema, ast: Document, typeInfo: TypeInfo); + reportError(error: GraphQLError): void; + + getErrors(): Array; + + getSchema(): GraphQLSchema; + + getDocument(): Document; + + getFragment(name: string): FragmentDefinition; + + getFragmentSpreads(node: SelectionSet): Array; + + getRecursivelyReferencedFragments( + operation: OperationDefinition + ): Array; + + getVariableUsages(node: HasSelectionSet): Array; + + getRecursiveVariableUsages( + operation: OperationDefinition + ): Array; + + getType(): GraphQLOutputType; + + getParentType(): GraphQLCompositeType; + + getInputType(): GraphQLInputType; + + getFieldDef(): GraphQLFieldDefinition; + + getDirective(): GraphQLDirective; + + getArgument(): GraphQLArgument; + } + +} + + +/////////////////////////// +// graphql/execution // +/////////////////////////// +declare module "graphql/execution" { + export * from "graphql/execution/index"; +} + +declare module "graphql/execution/index" { + export { execute } from 'graphql/execution/execute'; +} + +declare module "graphql/execution/execute" { + import { GraphQLError, locatedError } from 'graphql/error'; + import { GraphQLSchema } from 'graphql/type/schema'; + import { + Directive, + Document, + OperationDefinition, + SelectionSet, + Field, + InlineFragment, + FragmentDefinition + } from 'graphql/language/ast'; + /** + * Data that must be available at all points during query execution. + * + * Namely, schema of the type system that is currently executing, + * and the fragments defined in the query document + */ + interface ExecutionContext { + schema: GraphQLSchema; + fragments: { [key: string]: FragmentDefinition }; + rootValue: any; + operation: OperationDefinition; + variableValues: { [key: string]: any }; + errors: Array; + } + + /** + * The result of execution. `data` is the result of executing the + * query, `errors` is null if no errors occurred, and is a + * non-empty array if an error occurred. + */ + interface ExecutionResult { + data: Object; + errors?: Array; + } + + /** + * Implements the "Evaluating requests" section of the GraphQL specification. + * + * Returns a Promise that will eventually be resolved and never rejected. + * + * If the arguments to this function do not result in a legal execution context, + * a GraphQLError will be thrown immediately explaining the invalid input. + */ + function execute( + schema: GraphQLSchema, + documentAST: Document, + rootValue?: any, + contextValue?: any, + variableValues?: { + [key: string]: any + }, + operationName?: string + ): Promise +} + +declare module "graphql/execution/values" { + import { GraphQLInputType, GraphQLArgument } from 'graphql/type/definition'; + import { GraphQLSchema } from 'graphql/type/schema'; + import { Argument, VariableDefinition } from 'graphql/language/ast'; + /** + * Prepares an object map of variableValues of the correct type based on the + * provided variable definitions and arbitrary input. If the input cannot be + * parsed to match the variable definitions, a GraphQLError will be thrown. + */ + function getVariableValues( + schema: GraphQLSchema, + definitionASTs: Array, + inputs: { [key: string]: any } + ): { [key: string]: any } + + /** + * Prepares an object map of argument values given a list of argument + * definitions and list of argument AST nodes. + */ + function getArgumentValues( + argDefs: Array, + argASTs: Array, + variableValues?: { [key: string]: any } + ): { [key: string]: any }; +} + +/////////////////////////// +// graphql/error // +/////////////////////////// +declare module "graphql/error" { + export * from 'graphql/error/index'; +} + +declare module "graphql/error/index" { + export { GraphQLError } from 'graphql/error/GraphQLError'; + export { syntaxError } from 'graphql/error/syntaxError'; + export { locatedError } from 'graphql/error/locatedError'; + export { formatError } from 'graphql/error/formatError'; +} + +declare module "graphql/error/formatError" { + import { GraphQLError } from 'graphql/error/GraphQLError'; + + /** + * Given a GraphQLError, format it according to the rules described by the + * Response Format, Errors section of the GraphQL Specification. + */ + function formatError(error: GraphQLError): GraphQLFormattedError; + + type GraphQLFormattedError = { + message: string, + locations: Array + }; + + type GraphQLErrorLocation = { + line: number, + column: number + }; +} + +declare module "graphql/error/GraphQLError" { + import { getLocation } from 'graphql/language'; + import { Node } from 'graphql/language/ast'; + import { Source } from 'graphql/language/source'; + + /** + * A GraphQLError describes an Error found during the parse, validate, or + * execute phases of performing a GraphQL operation. In addition to a message + * and stack trace, it also includes information about the locations in a + * GraphQL document and/or execution result that correspond to the Error. + */ + class GraphQLError extends Error { + + /** + * A message describing the Error for debugging purposes. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + message: string; + + /** + * An array of { line, column } locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + locations: Array<{ line: number, column: number }> | void; + + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + path: Array | void; + + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + nodes: Array | void; + + /** + * The source GraphQL document corresponding to this error. + */ + source: Source | void; + + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + positions: Array | void; + + /** + * The original error thrown from a field resolver during execution. + */ + originalError: Error; + } +} + +declare module "graphql/error/locatedError" { + import { GraphQLError } from 'graphql/error/GraphQLError'; + + /** + * Given an arbitrary Error, presumably thrown while attempting to execute a + * GraphQL operation, produce a new GraphQLError aware of the location in the + * document responsible for the original Error. + */ + function locatedError( + originalError: Error, + nodes: Array, + path: Array + ): GraphQLError; +} + +declare module "graphql/error/syntaxError" { + import { Source } from 'graphql/language/source'; + import { GraphQLError } from 'graphql/error/GraphQLError'; + + /** + * Produces a GraphQLError representing a syntax error, containing useful + * descriptive information about the syntax error's position in the source. + */ + function syntaxError( + source: Source, + position: number, + description: string + ): GraphQLError; +} + +/////////////////////////// +// graphql/utilities // +/////////////////////////// +// declare module "graphql/utilities/index" { +// // The GraphQL query recommended for a full schema introspection. +// export { introspectionQuery } from 'graphql/utilities/introspectionQuery'; + +// // Gets the target Operation from a Document +// export { getOperationAST } from 'graphql/utilities/getOperationAST'; + +// // Build a GraphQLSchema from an introspection result. +// export { buildClientSchema } from 'graphql/utilities/buildClientSchema'; + +// // Build a GraphQLSchema from GraphQL Schema language. +// export { buildASTSchema, buildSchema } from 'graphql/utilities/buildASTSchema'; + +// // Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST. +// export { extendSchema } from 'graphql/utilities/extendSchema'; + +// // Print a GraphQLSchema to GraphQL Schema language. +// export { printSchema, printIntrospectionSchema } from 'graphql/utilities/schemaPrinter'; + +// // Create a GraphQLType from a GraphQL language AST. +// export { typeFromAST } from 'graphql/utilities/typeFromAST'; + +// // Create a JavaScript value from a GraphQL language AST. +// export { valueFromAST } from 'graphql/utilities/valueFromAST'; + +// // Create a GraphQL language AST from a JavaScript value. +// export { astFromValue } from 'graphql/utilities/astFromValue'; + +// // A helper to use within recursive-descent visitors which need to be aware of +// // the GraphQL type system. +// export { TypeInfo } from 'graphql/utilities/TypeInfo'; + +// // Determine if JavaScript values adhere to a GraphQL type. +// export { isValidJSValue } from 'graphql/utilities/isValidJSValue'; + +// // Determine if AST values adhere to a GraphQL type. +// export { isValidLiteralValue } from 'graphql/utilities/isValidLiteralValue'; + +// // Concatenates multiple AST together. +// export { concatAST } from 'graphql/utilities/concatAST'; + +// // Separates an AST into an AST per Operation. +// export { separateOperations } from 'graphql/utilities/separateOperations'; + +// // Comparators for types +// export { +// isEqualType, +// isTypeSubTypeOf, +// doTypesOverlap +// } from 'graphql/utilities/typeComparators'; + +// // Asserts that a string is a valid GraphQL name +// export { assertValidName } from 'graphql/utilities/assertValidName'; +// } + +// declare module "graphql/utilities/assertValidName" { +// // Helper to assert that provided names are valid. +// function assertValidName(name: string): void; +// } + +// declare module "graphql/utilities/astFromValue" { +// import { +// Value, +// //IntValue, +// //FloatValue, +// //StringValue, +// //BooleanValue, +// //EnumValue, +// //ListValue, +// //ObjectValue, +// } from 'graphql/language/ast'; +// import { GraphQLInputType } from 'graphql/type/definition'; + +// /** +// * Produces a GraphQL Value AST given a JavaScript value. +// * +// * A GraphQL type must be provided, which will be used to interpret different +// * JavaScript values. +// * +// * | JSON Value | GraphQL Value | +// * | ------------- | -------------------- | +// * | Object | Input Object | +// * | Array | List | +// * | Boolean | Boolean | +// * | String | String / Enum Value | +// * | Number | Int / Float | +// * | Mixed | Enum Value | +// * +// */ +// // TODO: this should set overloads according to above the table +// export function astFromValue( +// value: any, +// type: GraphQLInputType +// ): Value // Warning: there is a code in bottom: throw new TypeError + +// } + +// declare module "graphql/utilities/buildASTSchema" { +// import { Document } from 'graphql/language/ast'; +// import { Source } from 'graphql/language/source'; +// import { GraphQLSchema } from 'graphql/type/schema'; + +// /** +// * This takes the ast of a schema document produced by the parse function in +// * src/language/parser.js. +// * +// * If no schema definition is provided, then it will look for types named Query +// * and Mutation. +// * +// * Given that AST it constructs a GraphQLSchema. The resulting schema +// * has no resolve methods, so execution will use default resolvers. +// */ +// function buildASTSchema(ast: Document): GraphQLSchema; + +// /** +// * Given an ast node, returns its string description based on a contiguous +// * block full-line of comments preceding it. +// */ +// function getDescription(node: { loc?: Location }): string; + +// /** +// * A helper function to build a GraphQLSchema directly from a source +// * document. +// */ +// function buildSchema(source: string | Source): GraphQLSchema; +// } + +// declare module "graphql/utilities/buildClientSchema" { +// import { IntrospectionQuery } from 'graphql/utilities/introspectionQuery'; +// import { GraphQLSchema } from 'graphql/type/schema'; +// /** +// * Build a GraphQLSchema for use by client tools. +// * +// * Given the result of a client running the introspection query, creates and +// * returns a GraphQLSchema instance which can be then used with all graphql-js +// * tools, but cannot be used to execute a query, as introspection does not +// * represent the "resolver", "parse" or "serialize" functions or any other +// * server-internal mechanisms. +// */ +// export function buildClientSchema( +// introspection: IntrospectionQuery +// ): GraphQLSchema; +// } + +// declare module "graphql/utilities/concatAST" { + +// } + +// declare module "graphql/utilities/extendSchema" { + +// } + +// declare module "graphql/utilities/getOperationAST" { + +// } + +// declare module "graphql/utilities/introspectionQuery" { + +// } + +// declare module "graphql/utilities/isValidJSValue" { + +// } + +// declare module "graphql/utilities/isValidLiteralValue" { + +// } + +// declare module "graphql/utilities/schemaPrinter" { + +// } + +// declare module "graphql/utilities/separateOperations" { + +// } + +// declare module "graphql/utilities/typeComparators" { + +// } + +// declare module "graphql/utilities/typeFromAST" { + +// } + +declare module "graphql/utilities/TypeInfo" { + class TypeInfo { } +} + +// declare module "graphql/utilities/valueFromAST" { + +// } diff --git a/greensock/greensock.d.ts b/greensock/greensock.d.ts index a3b3801775..004ec79dab 100644 --- a/greensock/greensock.d.ts +++ b/greensock/greensock.d.ts @@ -13,7 +13,38 @@ interface IDispatcher { declare type Tween = TweenLite | TweenMax; declare type Timeline = SimpleTimeline | TimelineLite | TimelineMax; - +declare type TweenConfig = { + [tweenProp: string]: any; + delay?: number; + ease?: Ease; + repeat?: number; + repeatDelay?: number; + yoyo?: boolean; + paused?: boolean; + overwrite?: string|number; + onComplete?: Function; + immediateRender?: boolean; + onCompleteParams?: any[]; + onCompleteScope?: Object; + onRepeat?: Function; + onRepeatScope?: Object; + onReverseComplete?: Function; + onReverseCompleteParams?: any[]; + onReverseCompleteScope?: Object; + onStart?: Function; + onStartParams?: any[]; + onStartScope?: Object; + onUpdate?: Function; + onUpdateParams?: any[]; + onUpdateScope?: Object; + startAt?: Object; + useFrames?: boolean; + lazy?: boolean; + onOverwrite?: Function; + autoCSS?: boolean; + callbackScope?: Object; +} + //com.greensock.core declare class Animation { static ticker: IDispatcher; @@ -86,7 +117,7 @@ declare class TweenLite extends Animation { static killTweensOf(target: Object, onlyActive?: boolean, vars?: Object): void; static lagSmoothing(threshold: number, adjustedLag: number): void; static set(target: Object, vars: Object): TweenLite; - static to(target: Object, duration: number, vars: Object): TweenLite; + static to(target: Object, duration: number, vars: TweenConfig): TweenLite; } declare class TweenMax extends TweenLite { @@ -112,7 +143,7 @@ declare class TweenMax extends TweenLite { static staggerFrom(targets: any, duration: number, vars: Object, stagger: number, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; static staggerFromTo(targets: any, duration: number, fromVars: Object, toVars: Object, stagger: number, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; static staggerTo(targets: any, duration: number, vars: Object, stagger: number, onCompleteAll?: Function, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; - static to(target:Object, duration:number, vars:Object):TweenMax; + static to(target:Object, duration:number, vars:TweenConfig):TweenMax; updateTo(vars: Object, resetDuration?: boolean): TweenMax; yoyo(): boolean; yoyo(value?: boolean): TweenMax; diff --git a/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts b/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts new file mode 100644 index 0000000000..fd7a053ce6 --- /dev/null +++ b/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts @@ -0,0 +1,36 @@ +/// +/// + +import * as gulp from 'gulp'; +import * as templateCache from 'gulp-angular-templatecache'; + +gulp.task('templatecache:no-arguments', function () { + return gulp.src('templates/**/*.html') + .pipe(templateCache()) + .pipe(gulp.dest('public')); +}); + +gulp.task('templatecache:with-filename', function () { + return gulp.src('templates/**/*.html') + .pipe(templateCache('templates.js')) + .pipe(gulp.dest('public')); +}); + +gulp.task('templatecache:with-options', function () { + return gulp.src('templates/**/*.html') + .pipe(templateCache({ + filename: 'templates.js', + standalone: true, + module: 'app.templates' + })) + .pipe(gulp.dest('public')); +}); + +gulp.task('templatecache:with-filename-and-options', function () { + return gulp.src('templates/**/*.html') + .pipe(templateCache('templates.js', { + standalone: true, + module: 'app.templates' + })) + .pipe(gulp.dest('public')); +}); \ No newline at end of file diff --git a/gulp-angular-templatecache/gulp-angular-templatecache.d.ts b/gulp-angular-templatecache/gulp-angular-templatecache.d.ts new file mode 100644 index 0000000000..34e52acc36 --- /dev/null +++ b/gulp-angular-templatecache/gulp-angular-templatecache.d.ts @@ -0,0 +1,69 @@ +// Type definitions for gulp-angular-templatecache v2.0.0 +// Project: https://github.com/miickel/gulp-angular-templatecache +// Definitions by: Aman Mahajan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "gulp-angular-templatecache" { + function templatecache(): NodeJS.ReadWriteStream; + function templatecache(filename: string): NodeJS.ReadWriteStream; + function templatecache(options: templatecache.Options): NodeJS.ReadWriteStream; + function templatecache(filename: string, options: templatecache.Options): NodeJS.ReadWriteStream; + + namespace templatecache { + interface Options { + /** + * Name to use when concatenating. + */ + filename?: string; + + /** + * Prefix for template URLs. + */ + root?: string; + + /** + * Name of AngularJS module. + */ + module?: string; + + /** + * Create a new AngularJS module, instead of using an existing. + */ + standalone?: boolean; + + /** + * Override file base path. + */ + base?: string | Function; + + /** + * Wrap the templateCache in a module system. Currently supported systems: RequireJS, Browserify, ES6 and IIFE (Immediately-Invoked Function Expression). + */ + moduleSystem?: string; + + /** + * Transform the generated URL before it's put into $templateCache. + */ + transformUrl?: Function; + + /** + * Override template header. + */ + templateHeader?: string; + + /** + * Override template body. + */ + templateBody?: string; + + /** + * Override template footer. + */ + templateFooter?: string; + } + } + + export = templatecache; +} \ No newline at end of file diff --git a/gulp-uglify/gulp-uglify-tests.ts b/gulp-uglify/gulp-uglify-tests.ts index 01cfb06f9e..6a1cf1281d 100644 --- a/gulp-uglify/gulp-uglify-tests.ts +++ b/gulp-uglify/gulp-uglify-tests.ts @@ -14,7 +14,7 @@ gulp.task('compress2', function() { var tsResult = gulp.src('lib/*.ts') .pipe(uglify({ mangle: false, - preserverComments: "some", + preserveComments: "some", compress: false, output: { max_line_len: 300 diff --git a/gulp-uglify/gulp-uglify.d.ts b/gulp-uglify/gulp-uglify.d.ts index 13eda63706..60cd8f11ea 100644 --- a/gulp-uglify/gulp-uglify.d.ts +++ b/gulp-uglify/gulp-uglify.d.ts @@ -32,7 +32,7 @@ declare module "gulp-uglify" { * some - Preserve comments that start with a bang (!) or include a Closure Compiler directive (@preserve, @license, @cc_on) * function - Specify your own comment preservation function. You will be passed the current node and the current comment and are expected to return either true or false. */ - preserverComments?: string|((node: any, comment: UglifyJS.Tokenizer) => boolean); + preserveComments?: string|((node: any, comment: UglifyJS.Tokenizer) => boolean); } } diff --git a/gulp/gulp.d.ts b/gulp/gulp.d.ts index 74968ddcc5..f4314bd2f2 100644 --- a/gulp/gulp.d.ts +++ b/gulp/gulp.d.ts @@ -5,9 +5,11 @@ /// /// +/// declare module "gulp" { import Orchestrator = require("orchestrator"); + import VinylFile = require("vinyl"); namespace gulp { interface Gulp extends Orchestrator { @@ -92,7 +94,7 @@ declare module "gulp" { * @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance. * @param opt */ - (outFolder: string|((file: string) => string), opt?: DestOptions): NodeJS.ReadWriteStream; + (outFolder: string|((file: VinylFile) => string), opt?: DestOptions): NodeJS.ReadWriteStream; } interface SrcMethod { @@ -149,7 +151,7 @@ declare module "gulp" { * Note that an explicit dot in a portion of the pattern will always match dot files. */ dot?: boolean; - + /** * Set to match only fles, not directories. Set this flag to prevent copying empty directories */ diff --git a/halfred/halfred-tests.ts b/halfred/halfred-tests.ts new file mode 100644 index 0000000000..3aecf39962 --- /dev/null +++ b/halfred/halfred-tests.ts @@ -0,0 +1,13 @@ +/// + +// run test with: $ tsc --noImplicitAny --target es6 --module commonjs halfred-tests.ts +import { parse } from 'halfred'; // require('halfred'); +let resource = parse({foo: "bar", "_links": { "self": { href: "fooo" }}}); +console.log(resource); + +let allLinks = resource.allLinks(); +for (let key in allLinks) { + let link = allLinks[key]; + + console.log(link[0].href); +} diff --git a/halfred/halfred.d.ts b/halfred/halfred.d.ts new file mode 100644 index 0000000000..9c1d571a9d --- /dev/null +++ b/halfred/halfred.d.ts @@ -0,0 +1,247 @@ +// Type definitions for Halfred v1.0.0 +// Project: https://github.com/basti1302/halfred +// Definitions by: David Herges +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +declare module "halfred" { + + /** + * halfred.parse(object) returns a Resource object. + * + * @see https://github.com/basti1302/halfred#usage + */ + export function parse(object: any): Resource; + + /** @see https://github.com/basti1302/halfred#enabledisable-validation */ + export function enableValidation(flag: boolean): void; + + /** @see https://github.com/basti1302/halfred#enabledisable-validation */ + export function disableValidation(): void; + + /** @see https://github.com/basti1302/halfred#resource-api */ + export interface Resource { + + /** + * Returns an object which has an array for each link that was present in the source object. + * See below why each link is represented as an array. + */ + allLinkArrays(): LinkCollection; + + /** Alias for allLinkArrays() */ + allLinks(): LinkCollection; + + /** + * Returns the array of links for the given key, or null if there are no links for this key. + */ + linkArray(key: string): Link[]; + + /** + * Returns the first element of the array of links for the given key or null if there are no + * links for this key. + */ + link(key: string): Link; + + /** + * Returns an object which has an array for each embedded resource that was present in the + * source object. + * See below why each embedded resource is represented as an array. Each element of any of + * this arrays is in turn a Resource object. + */ + allEmbeddedResourceArrays(): ResourceCollection; + + /** Alias for allEmbeddedResourceArrays() */ + allEmbeddedArrays(): ResourceCollection; + + /** Alias for allEmbeddedResourceArrays() */ + allEmbeddedResources(): ResourceCollection; + + /** + * Returns the array of embedded resources for the given key, or null if there are no embedded + * resources for this key. Each element of this arrays is in turn a Resource object. + */ + embeddedResourceArray(key: string): Resource[]; + + /** Alias for embeddedResourceArray() */ + embeddedArray(key: string): Resource[]; + + /** + * Returns the first element of the array of embedded resources for the given key or null if + * there are no embedded resources for this key. The returend object is a Resource object. + */ + embeddedResource(key: string): Resource; + + /** Alias for embeddedResource(key) */ + embedded(key: string): Resource; + + /** + * Returns the unmodified, original object that was parsed to this resource. This is rather + * uninteresting for the source object you give to the parse method (because you probably + * still have a reference to the source object) but it is a convenient way to get the part of + * the source object that corresponds to an embedded resource. + */ + original(): any; + + /** + * Returns true if the resource has any CURIEs (Compact URIs). + * + * @see http://www.w3.org/TR/2010/NOTE-curie-20101216/ + */ + hasCuries(): boolean; + + /** + * Returns the array of CURIEs. Each object in the array is a link object, which means it + * can be templated etc. See below for the link object API. + */ + curieArray(): Link[]; + + /** + * Returns the curie with the given name, if any. The returned object is a link object, which + * means it can be templated etc. See below for link object API. + */ + curie(name: string): Link; + + /** + * Returns the compact URI for the given full URL, if any + */ + reverseResolveCurie(fullUrl: string): string; + + /** + * Returns all validation issues. Validation issues are only gathered if validation has been + * turned on by calling ``halfred.enableValidation()`` before calling ``halfred.parse``. + */ + validationIssues(): any; + + /** + * Alias for validationIssues() + */ + validation(): any; + + /* + XX ... think we should NOT try to represent these things in TypeScript. + + In addition to the methods mentioned here, resource has all properties of the source object. + This is also true for embedded Resource objects. The non-HAL properties (that is, any + property except _links and _embedded) are copied over to the Resource object. This is always + a shallow copy, so modifying the a non-HAL property in the Resource object might also alter + the source object and vice versa. + + The Resource object also has the properties _links and _embedded but they might differ from + the _links/_embedded properties in the source object (Halfred applies some normalization to + them). These are not intended to be accessed by clients directly, instead, use the provided + methods to work with links and embedded resources. + */ + } + + /** @see https://github.com/basti1302/halfred#links-and-embedded-resources */ + interface ResourceCollection { + [key: string]: Resource[]; + } + + /** @see https://github.com/basti1302/halfred#links-and-embedded-resources */ + interface LinkCollection { + [rel: string]: Link[] + } + + /** + * A Link Object represents a hyperlink from the containing resource to a URI. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5 + */ + interface Link { + + /** + * The "href" property is REQUIRED. + * + * Its value is either a URI [RFC3986] or a URI Template [RFC6570]. + * + * If the value is a URI Template then the Link Object SHOULD have a + * "templated" attribute whose value is true. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.1 + */ + href: string; + + /** + * The "templated" property is OPTIONAL. + * + * Its value is boolean and SHOULD be true when the Link Object's "href" + * property is a URI Template. + * + * Its value SHOULD be considered false if it is undefined or any other + * value than true. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.2 + */ + templated?: boolean; + + /** + * The "type" property is OPTIONAL. + * + * Its value is a string used as a hint to indicate the media type + * expected when dereferencing the target resource. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.3 + */ + type?: string; + + /** + * The "deprecation" property is OPTIONAL. + * + * Its presence indicates that the link is to be deprecated (i.e. + * removed) at a future date. Its value is a URL that SHOULD provide + * further information about the deprecation. + * + * A client SHOULD provide some notification (for example, by logging a + * warning message) whenever it traverses over a link that has this + * property. The notification SHOULD include the deprecation property's + * value so that a client manitainer can easily find information about + * the deprecation. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.4 + */ + deprecation?: string; + + /** + * The "name" property is OPTIONAL. + * + * Its value MAY be used as a secondary key for selecting Link Objects + * which share the same relation type. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.5 + */ + name?: string; + + /** + * The "profile" property is OPTIONAL. + * + * Its value is a string which is a URI that hints about the profile (as + * defined by [I-D.wilde-profile-link]) of the target resource. + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.6 + */ + profile?: string; + + /** + * The "title" property is OPTIONAL. + * + * Its value is a string and is intended for labelling the link with a + * human-readable identifier (as defined by [RFC5988]). + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.7 + */ + title?: string; + + /** + * The "hreflang" property is OPTIONAL. + * + * Its value is a string and is intended for indicating the language of + * the target resource (as defined by [RFC5988]). + * + * @see https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.8 + */ + hreflang?: string; + + } + +} diff --git a/hapi-decorators/hapi-decorators-tests.ts b/hapi-decorators/hapi-decorators-tests.ts new file mode 100644 index 0000000000..c4c8dcf5bb --- /dev/null +++ b/hapi-decorators/hapi-decorators-tests.ts @@ -0,0 +1,44 @@ +/// +/// + +import * as hapi from 'hapi'; +import { controller, get, post, put, cache, config, route, validate, Controller } from 'hapi-decorators'; + +@controller('/test') +class TestController implements Controller { + baseUrl: string; + routes: () => hapi.IRouteConfiguration[]; + + @get('/') + @config({ + auth: false + }) + @cache({ + expiresIn: 42000 + }) + @validate({ + payload: false + }) + getHandler(request: hapi.Request, reply: hapi.IReply) { + reply({ success: true }); + } + + @post('/') + postHandler(request: hapi.Request, reply: hapi.IReply) { + reply({ success: true }); + } + + @put('/{id}') + putHandler(request: hapi.Request, reply: hapi.IReply) { + reply({ success: true }); + } + + @route('delete', '/{id}') + deleteHandler(request: hapi.Request, reply: hapi.IReply) { + reply({ success: true }); + } +} + +const server = new hapi.Server(); + +server.route(new TestController().routes()); diff --git a/hapi-decorators/hapi-decorators.d.ts b/hapi-decorators/hapi-decorators.d.ts new file mode 100644 index 0000000000..7659eaa1a8 --- /dev/null +++ b/hapi-decorators/hapi-decorators.d.ts @@ -0,0 +1,98 @@ +// Type definitions for hapi-decorators v0.4.3 +// Project: https://github.com/knownasilya/hapi-decorators +// Definitions by: Ken Howard +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module 'hapi-decorators' { + import * as hapi from 'hapi'; + interface ControllerStatic { + new (): Controller; + } + export interface Controller { + baseUrl: string; + routes: () => hapi.IRouteConfiguration[]; + } + export function controller(baseUrl: string): (target: ControllerStatic) => void; + interface IRouteSetup { + (target: any, key: any, descriptor: any): any; + } + interface IRouteDecorator { + (method: string, path: string): IRouteSetup; + } + interface IRouteConfig { + (path: string): IRouteSetup; + } + export const route: IRouteDecorator; + export const get: IRouteConfig; + export const post: IRouteConfig; + export const put: IRouteConfig; + // export const delete: IRouteConfig; + export const patch: IRouteConfig; + export const all: IRouteConfig; + export function config(config: hapi.IRouteAdditionalConfigurationOptions): (target: any, key: any, descriptor: any) => any; + interface IValidateConfig { + /** validation rules for incoming request headers.Values allowed: + * trueany headers allowed (no validation performed).This is the default. + falseno headers allowed (this will cause all valid HTTP requests to fail). + a Joi validation object. + a validation function using the signature function(value, options, next) where: + valuethe object containing the request headers. + optionsthe server validation options. + next(err, value)the callback function called when validation is completed. + */ + headers?: boolean | hapi.IJoi | hapi.IValidationFunction; + /** validation rules for incoming request path parameters, after matching the path against the route and extracting any parameters then stored in request.params.Values allowed: + trueany path parameters allowed (no validation performed).This is the default. + falseno path variables allowed. + a Joi validation object. + a validation function using the signature function(value, options, next) where: + valuethe object containing the path parameters. + optionsthe server validation options. + next(err, value)the callback function called when validation is completed. */ + params?: boolean | hapi.IJoi | hapi.IValidationFunction; + /** validation rules for an incoming request URI query component (the key- value part of the URI between '?' and '#').The query is parsed into its individual key- value pairs (using the qs module) and stored in request.query prior to validation.Values allowed: + trueany query parameters allowed (no validation performed).This is the default. + falseno query parameters allowed. + a Joi validation object. + a validation function using the signature function(value, options, next) where: + valuethe object containing the query parameters. + optionsthe server validation options. + next(err, value)the callback function called when validation is completed. */ + query?: boolean | hapi.IJoi | hapi.IValidationFunction; + /** validation rules for an incoming request payload (request body).Values allowed: + trueany payload allowed (no validation performed).This is the default. + falseno payload allowed. + a Joi validation object. + a validation function using the signature function(value, options, next) where: + valuethe object containing the payload object. + optionsthe server validation options. + next(err, value)the callback function called when validation is completed. */ + payload?: boolean | hapi.IJoi | hapi.IValidationFunction; + /** an optional object with error fields copied into every validation error response. */ + errorFields?: any; + /** determines how to handle invalid requests.Allowed values are: + 'error'return a Bad Request (400) error response.This is the default value. + 'log'log the error but continue processing the request. + 'ignore'take no action. + OR a custom error handler function with the signature 'function(request, reply, source, error)` where: + requestthe request object. + replythe continuation reply interface. + sourcethe source of the invalid field (e.g. 'path', 'query', 'payload'). + errorthe error object prepared for the client response (including the validation function error under error.data). */ + failAction?: string | hapi.IRouteFailFunction; + /** options to pass to Joi.Useful to set global options such as stripUnknown or abortEarly (the complete list is available here: https://github.com/hapijs/joi#validatevalue-schema-options-callback ).Defaults to no options. */ + options?: any; + } + export function validate(config: IValidateConfig): (target: any, key: any, descriptor: any) => any; + interface ICacheConfig { + privacy?: string; + expiresIn?: number; + expiresAt?: number; + } + export function cache(cacheConfig: ICacheConfig): (target: any, key: any, descriptor: any) => any; + export function pre(pre: { + [key: string]: any; + }): (target: any, key: any, descriptor: any) => any; +} diff --git a/hapi-decorators/tsconfig.json b/hapi-decorators/tsconfig.json new file mode 100644 index 0000000000..06670f1da9 --- /dev/null +++ b/hapi-decorators/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "target": "es2015", + "experimentalDecorators": true + } +} diff --git a/hapi/hapi-8.2.0.d.ts b/hapi/hapi-8.2.0.d.ts index ef81b4fba3..a789915965 100644 --- a/hapi/hapi-8.2.0.d.ts +++ b/hapi/hapi-8.2.0.d.ts @@ -300,8 +300,12 @@ declare module "hapi" { } export interface ISessionHandler { (request: Request, reply: IReply): void; + } + + export interface IStrictSessionHandler{ (request: Request, reply: IStrictReply): void; } + export interface IRequestHandler { (request: Request): T; } @@ -464,7 +468,7 @@ declare module "hapi" { }; /** an alternative location for the route handler option. */ - handler?: ISessionHandler | string | IRouteHandlerConfig; + handler?: ISessionHandler | IStrictSessionHandler | string | IRouteHandlerConfig; /** an optional unique identifier used to look up the route using server.lookup(). */ id?: number; /** optional arguments passed to JSON.stringify() when converting an object or error response to a string payload.Supports the following: */ @@ -834,7 +838,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 | IStrictSessionHandler | string | IRouteHandlerConfig; /** - additional route options.*/ config?: IRouteAdditionalConfigurationOptions; } diff --git a/hapi/hapi-tests-8.2.0.ts b/hapi/hapi-tests-8.2.0.ts index e26ce193bc..012e913432 100644 --- a/hapi/hapi-tests-8.2.0.ts +++ b/hapi/hapi-tests-8.2.0.ts @@ -124,5 +124,15 @@ server.route([{ } }]); +// Implict handler +server.route({ + method: 'GET', + path: '/hello6', + handler: function (request, reply) { + request.log('info', { route: '/hello' }, Date.now()); + reply('hello world'); + } +}); + // Start the server server.start(); diff --git a/hapi/hapi-tests.ts b/hapi/hapi-tests.ts index 3288618816..c33e934611 100644 --- a/hapi/hapi-tests.ts +++ b/hapi/hapi-tests.ts @@ -112,6 +112,16 @@ server.route([{ } }]); +// Implict handler +server.route({ + method: 'GET', + path: '/hello6', + handler: function (request, reply) { + request.log('info', { route: '/hello' }, Date.now()); + reply('hello world'); + } +}); + // config.validate parameters should be optional server.route([{ method: 'GET', diff --git a/hapi/hapi.d.ts b/hapi/hapi.d.ts index ff5e1d9fe8..a25ecff38d 100644 --- a/hapi/hapi.d.ts +++ b/hapi/hapi.d.ts @@ -330,8 +330,12 @@ declare module "hapi" { export interface ISessionHandler { (request: Request, reply: IReply): void; + } + + export interface IStrictSessionHandler { (request: Request, reply: IStrictReply): void; } + export interface IRequestHandler { (request: Request): T; } @@ -495,7 +499,7 @@ declare module "hapi" { }; /** an alternative location for the route handler option. */ - handler?: ISessionHandler | string | IRouteHandlerConfig; + handler?: ISessionHandler | IStrictSessionHandler | string | IRouteHandlerConfig; /** an optional unique identifier used to look up the route using server.lookup(). */ id?: number; /** optional arguments passed to JSON.stringify() when converting an object or error response to a string payload.Supports the following: */ @@ -894,7 +898,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 | IStrictSessionHandler | string | IRouteHandlerConfig; /** - additional route options.*/ config?: IRouteAdditionalConfigurationOptions; } @@ -1872,7 +1876,9 @@ declare module "hapi" { } } });*/ - strategy(name: string, scheme: any, mode?: boolean | string, options?: any): void; + strategy(name: string, scheme: string, mode?: boolean | string, options?: any): void; + strategy(name: string, scheme: string, mode?: boolean | string): void; + strategy(name: string, scheme: string, options?:any): void; /** server.auth.test(strategy, request, next) Tests a request against an authentication strategy where: diff --git a/heatmap.js/heatmap.d.ts b/heatmap.js/heatmap.d.ts index 7cd14fc214..fb2b4eea3d 100644 --- a/heatmap.js/heatmap.d.ts +++ b/heatmap.js/heatmap.d.ts @@ -3,7 +3,7 @@ // Definitions by: Yang Guan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /* * Configuration object of a heatmap diff --git a/helmet/helmet.d.ts b/helmet/helmet.d.ts index 6feef0bad8..1997b1c5e9 100644 --- a/helmet/helmet.d.ts +++ b/helmet/helmet.d.ts @@ -4,172 +4,175 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +declare module "helmet" { -declare module 'helmet' { - import express = require('express'); + 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 - } + namespace helmet { - interface IHelmetContentSecurityPolicyDirectiveFunction { - (req: express.Request, res: express.Response): string; - } - type HelmetCspDirectiveValue = string | IHelmetContentSecurityPolicyDirectiveFunction; + export 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 IHelmetContentSecurityPolicyDirectives { - baseUri? : HelmetCspDirectiveValue[], - childSrc? : HelmetCspDirectiveValue[], - connectSrc? : HelmetCspDirectiveValue[], - defaultSrc? : HelmetCspDirectiveValue[], - fontSrc? : HelmetCspDirectiveValue[], - formAction? : HelmetCspDirectiveValue[], - frameAncestors? : HelmetCspDirectiveValue[], - frameSrc? : HelmetCspDirectiveValue[], - imgSrc? : HelmetCspDirectiveValue[], - mediaSrc? : HelmetCspDirectiveValue[], - objectSrc? : HelmetCspDirectiveValue[], - pluginTypes? : HelmetCspDirectiveValue[], - reportUri?: string, - sandbox? : HelmetCspDirectiveValue[], - scriptSrc? : HelmetCspDirectiveValue[], - styleSrc? : HelmetCspDirectiveValue[] - } + export interface IHelmetContentSecurityPolicyDirectiveFunction { + (req: express.Request, res: express.Response): string; + } + export type HelmetCspDirectiveValue = string | IHelmetContentSecurityPolicyDirectiveFunction; - interface IHelmetContentSecurityPolicyConfiguration { - reportOnly? : boolean; - setAllHeaders? : boolean; - disableAndroid? : boolean; - browserSniff?: boolean; - directives? : IHelmetContentSecurityPolicyDirectives - } + export interface IHelmetContentSecurityPolicyDirectives { + baseUri? : HelmetCspDirectiveValue[], + childSrc? : HelmetCspDirectiveValue[], + connectSrc? : HelmetCspDirectiveValue[], + defaultSrc? : HelmetCspDirectiveValue[], + fontSrc? : HelmetCspDirectiveValue[], + formAction? : HelmetCspDirectiveValue[], + frameAncestors? : HelmetCspDirectiveValue[], + frameSrc? : HelmetCspDirectiveValue[], + imgSrc? : HelmetCspDirectiveValue[], + mediaSrc? : HelmetCspDirectiveValue[], + objectSrc? : HelmetCspDirectiveValue[], + pluginTypes? : HelmetCspDirectiveValue[], + reportUri?: string, + sandbox? : HelmetCspDirectiveValue[], + scriptSrc? : HelmetCspDirectiveValue[], + styleSrc? : HelmetCspDirectiveValue[] + } - interface IHelmetDnsPrefetchControlConfiguration { - allow? : boolean; - } + export interface IHelmetContentSecurityPolicyConfiguration { + reportOnly? : boolean; + setAllHeaders? : boolean; + disableAndroid? : boolean; + browserSniff?: boolean; + directives? : IHelmetContentSecurityPolicyDirectives + } - interface IHelmetFrameguardConfiguration { - action? : string, - domain? : string - } + export interface IHelmetDnsPrefetchControlConfiguration { + allow? : boolean; + } - interface IHelmetHidePoweredByConfiguration { - setTo? : string - } + export interface IHelmetFrameguardConfiguration { + action? : string, + domain? : string + } - interface IHelmetSetIfFunction { - (req: express.Request, res: express.Response): boolean; - } + export interface IHelmetHidePoweredByConfiguration { + setTo? : string + } - interface IHelmetHpkpConfiguration { - maxAge : number; - sha256s : string[]; - includeSubdomains? : boolean; - reportUri? : string; - reportOnly? : boolean; - setIf?: IHelmetSetIfFunction - } + export interface IHelmetSetIfFunction { + (req: express.Request, res: express.Response): boolean; + } - interface IHelmetHstsConfiguration { - maxAge: number; - includeSubdomains? : boolean; - preload? : boolean; - setIf? : IHelmetSetIfFunction, - force? : boolean; - } + export interface IHelmetHpkpConfiguration { + maxAge : number; + sha256s : string[]; + includeSubdomains? : boolean; + reportUri? : string; + reportOnly? : boolean; + setIf?: IHelmetSetIfFunction + } - interface IHelmetXssFilterConfiguration { - setOnOldIE? : boolean; - } + export interface IHelmetHstsConfiguration { + maxAge: number; + includeSubdomains? : boolean; + preload? : boolean; + setIf? : IHelmetSetIfFunction, + force? : boolean; + } - /** - * @summary Interface for helmet class. - * @interface - */ - interface Helmet { - /** - * @summary Constructor. - * @return {RequestHandler} The Request handler. - */ - (options ?: IHelmetConfiguration): express.RequestHandler; + export interface IHelmetXssFilterConfiguration { + setOnOldIE? : boolean; + } - /** - * @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 Interface for helmet class. + * @interface + */ + export interface Helmet { + /** + * @summary Constructor. + * @return {RequestHandler} The Request handler. + */ + (options ?: IHelmetConfiguration): express.RequestHandler; - /** - * @summary Stop browsers from doing DNS prefetching. - * @param {IHelmetDnsPrefetchControlConfiguration} options The options - * @return {RequestHandler} The Request handler - */ - dnsPrefetchControl(options ?: IHelmetDnsPrefetchControlConfiguration): 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 Prevent clickjacking. - * @param {IHelmetFrameguardConfiguration} options The options - * @return {RequestHandler} The Request handler - */ - frameguard(options ?: IHelmetFrameguardConfiguration): express.RequestHandler; + /** + * @summary Stop browsers from doing DNS prefetching. + * @param {IHelmetDnsPrefetchControlConfiguration} options The options + * @return {RequestHandler} The Request handler + */ + dnsPrefetchControl(options ?: IHelmetDnsPrefetchControlConfiguration): express.RequestHandler; - /** - * @summary Hide "X-Powered-By" header. - * @param {IHelmetHidePoweredByConfiguration} options The options - * @return {RequestHandler} The Request handler. - */ - hidePoweredBy(options ?: IHelmetHidePoweredByConfiguration): express.RequestHandler; + /** + * @summary Prevent clickjacking. + * @param {IHelmetFrameguardConfiguration} options The options + * @return {RequestHandler} The Request handler + */ + frameguard(options ?: IHelmetFrameguardConfiguration): 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 Hide "X-Powered-By" header. + * @param {IHelmetHidePoweredByConfiguration} options The options + * @return {RequestHandler} The Request handler. + */ + hidePoweredBy(options ?: IHelmetHidePoweredByConfiguration): express.RequestHandler; - /** - * @summary Adds the "Strict-Transport-Security" header. - * @param {IHelmetHstsConfiguration} options The options - * @return {RequestHandler} The Request handler. - */ - hsts(options ?: IHelmetHstsConfiguration): 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 Add the "X-Download-Options" header. - * @return {RequestHandler} The Request handler. - */ - ieNoOpen(): express.RequestHandler; + /** + * @summary Adds the "Strict-Transport-Security" header. + * @param {IHelmetHstsConfiguration} options The options + * @return {RequestHandler} The Request handler. + */ + hsts(options ?: IHelmetHstsConfiguration): express.RequestHandler; - /** - * @summary Add the "Cache-Control" and "Pragma" headers to stop caching. - * @return {RequestHandler} The Request handler. - */ - noCache(options ?: Object): express.RequestHandler; + /** + * @summary Add the "X-Download-Options" header. + * @return {RequestHandler} The Request handler. + */ + ieNoOpen(): express.RequestHandler; - /** - * @summary Adds the "X-Content-Type-Options" header. - * @return {RequestHandler} The Request handler. - */ - noSniff(): express.RequestHandler; + /** + * @summary Add the "Cache-Control" and "Pragma" headers to stop caching. + * @return {RequestHandler} The Request handler. + */ + noCache(options ?: Object): express.RequestHandler; - /** - * @summary Mitigate cross-site scripting attacks with the "X-XSS-Protection" header. - * @param {IHelmetXssFilterConfiguration} options The options - * @return {RequestHandler} The Request handler. - */ - xssFilter(options ?: IHelmetXssFilterConfiguration): express.RequestHandler; - } + /** + * @summary Adds the "X-Content-Type-Options" header. + * @return {RequestHandler} The Request handler. + */ + noSniff(): express.RequestHandler; - var helmet: Helmet; - export = helmet; + /** + * @summary Mitigate cross-site scripting attacks with the "X-XSS-Protection" header. + * @param {IHelmetXssFilterConfiguration} options The options + * @return {RequestHandler} The Request handler. + */ + xssFilter(options ?: IHelmetXssFilterConfiguration): express.RequestHandler; + } + } + + var helmet: helmet.Helmet; + export = helmet; } diff --git a/heremaps/heremaps-tests.ts b/heremaps/heremaps-tests.ts new file mode 100644 index 0000000000..3b2e1b5c30 --- /dev/null +++ b/heremaps/heremaps-tests.ts @@ -0,0 +1,82 @@ +// Test file for HERE Maps API for JavaScript Definition file +/// + +/** + * EXAMPLE from the HERE Maps API + * Takes a snapshot of the map. + * + * @param {Element} resultContainer Reference to DOM Element to show the captured map area + * @param {H.Map} map Reference to initialized map object + * @param {H.ui.UI} ui Reference to UI component + */ +function capture(resultContainer: HTMLElement, map: H.Map, ui: H.ui.UI) { + // Capturing area of the map is asynchronous, callback function receives HTML5 canvas + // element with desired map area rendered on it. + // We also pass an H.ui.UI reference in order to see the ScaleBar in the output. + // If dimensions are omitted, whole veiw port will be captured + map.capture((canvas: HTMLCanvasElement) => { + if (canvas) { + resultContainer.innerHTML = ''; + resultContainer.appendChild(canvas); + } else { + // For example when map is in Panorama mode + resultContainer.innerHTML = 'Capturing is not supported'; + } + }, [ui], 50, 50, 500, 200); +} + +/** + * Boilerplate map initialization code starts below: + */ +// Step 1: initialize communication with the platform +var platform = new H.service.Platform({ + app_id: 'DemoAppId01082013GAL', + app_code: 'AJKnXv84fjrb0KIHawS0Tg', + useHTTPS: true, + useCIT: true +}); + +var defaultLayers = platform.createDefaultLayers(); + +var mapContainer = document.getElementById('map'); + +// Step 2: initialize a map +var map = new H.Map(mapContainer, defaultLayers.normal.map, { + // initial center and zoom level of the map + zoom: 16, + // Champs-Elysees + center: {lat: 48.869145, lng: 2.314298} +}); + +// Step 3: make the map interactive +// MapEvents enables the event system +// Behavior implements default interactions for pan/zoom (also on mobile touch environments) +var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map)); + +// Step 4: Create the default UI +var ui = H.ui.UI.createDefault(map, defaultLayers, 'en-US'); + + +// Step 6: Create "Capture" button and place for showing the captured area +var resultContainer = document.getElementById('panel'); + +// Create container for the "Capture" button +var containerNode = document.createElement('div'); +containerNode.setAttribute('style', + 'position:absolute;top:0;left:0;background-color:#fff; padding:10px;'); +containerNode.className = 'btn-group'; + +// Create the "Capture" button +var captureBtn = document.createElement('input'); +captureBtn.value = 'Capture'; +captureBtn.type = 'button'; +captureBtn.className = 'btn btn-sm btn-default'; + +// Add both button and container to the DOM +containerNode.appendChild(captureBtn); +mapContainer.appendChild(containerNode); + +// Step 7: Handle capture button click event +captureBtn.onclick = function() { + capture(resultContainer, map, ui); +}; \ No newline at end of file diff --git a/heremaps/heremaps.d.ts b/heremaps/heremaps.d.ts new file mode 100644 index 0000000000..8d730f3ae5 --- /dev/null +++ b/heremaps/heremaps.d.ts @@ -0,0 +1,6354 @@ +// Type definitions for HERE Maps API for JavaScript v3.0.12.4 +// Project: https://developer.here.com/ +// Definitions by: Joshua Efiong +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace H { + /***** Map *****/ + /** + * Map class defines map instance in the application. By creating this object you will initialize a visible map object which is attached to the provided dom element. Map class is an entry point to all operations related to layers, map objects and geo-screen transformations. By specifying options you can initialize map with predefined view. + */ + export class Map extends H.util.EventTarget { + /** + * Constructor + * @param element {Element} - html element into which the map will be rendered + * @param baseLayer {H.map.layer.Layer} - The layer to be used as the base (bottom most) layer. + * @param opt_options {H.Map.Options=} - additional map options + */ + constructor(element: Element, baseLayer: H.map.layer.Layer, opt_options?: H.Map.Options); + + /** + * This method returns the map root html element + * @returns {Element} + */ + getElement(): Element; + + /** + * This method sets the new center on a map. + * @param center {H.geo.IPoint} - requested center to be set + * @param opt_animate {boolean=} - parameter indicates if animated transition should be applied, default is false + * @returns {H.Map} - the instance itself + */ + setCenter(center: H.geo.IPoint, opt_animate?: boolean): H.Map; + + /** + * This method returns currently rendered center of the map. + * @returns {H.geo.Point} + */ + getCenter(): H.geo.Point; + + /** + * This method sets the zoom level on the map. Every zoom level represents different scale i.e map at zoom level 2 is twice as large as the map at zoom level 1. + * @param zoom {number} - requested zoom level + * @param opt_animate {boolean=} - parameter indicates if animated transition should be applied, default is false + * @returns {H.Map} - the instance itself + */ + setZoom(zoom: number, opt_animate?: boolean): H.Map; + + /** + * This method returns currently rendered zoom level. + * @returns {number} + */ + getZoom(): number; + + /** + * This method changes the map zoom while keeping target screen coordinates specified as x,y at the same place where they were before. + * @param zoom {number} - new zoom level + * @param x {number} - map viewport x-axis pixel coordinate + * @param y {number} - map viewport y-axis pixel coordinate + */ + zoomAt(zoom: number, x: number, y: number): void; + + /** + * This method sets the bounding rect to be displayed by the map. Maps display the bounding rect in a way that it fits entirely in the current viewport. + * @param boundingRect {H.geo.Rect} - view bound which should be shown on map + * @param opt_animate {boolean=} - parameter indicates if animated transition should be applied, default is false + * @returns {H.Map} - the instance itself + */ + setViewBounds(boundingRect: H.geo.Rect, opt_animate?: boolean): H.Map; + + /** + * This method returns bounding rect for the current map view. Returned bounding rect defines entire currently viewable area on the screen. + * @returns {H.geo.Rect} + */ + getViewBounds(): H.geo.Rect; + + /** + * Calculates the best CameraModel to show the provided bounding rectangle + * @param rect {H.geo.Rect} - The geographical bounding rectangle to use + * @returns {H.map.ViewModel.CameraData} - The result, represented by the properties zoom (number) and position (geo.Point) + */ + getCameraDataForBounds(rect: H.geo.Rect): H.map.ViewModel.CameraData; + + /** + * This method returns current map viewport. Viewport can be used to modify padding and margin which will reflect the position of the viewport center and the amount of extra data loaded (for margin) + * @returns {H.map.ViewPort} + */ + getViewPort(): H.map.ViewPort; + + /** + * This method returns current view model. View model can be used to modify the current view or camera. H.map.ViewModel + * @returns {H.map.ViewModel} + */ + getViewModel(): H.map.ViewModel; + + /** + * This method returns the map's current layer collection. + * @returns {H.map.DataModel} + */ + getLayers(): H.map.DataModel; + + /** + * This method returns the imprint object for this map. + * @returns {H.map.Imprint} + */ + getImprint(): H.map.Imprint; + + /** + * This method captures desired region of the map and objects on it. Result is returned as an HTML5 Canvas element. Origin of coordinate system for capturing is in the top left corner of the viewport. + * @param callback {function(HTMLCanvasElement=)} - Callback function to call once result of the capturing is ready + * @param opt_capturables {Array=} - Collection of "capturable" element(s) to draw into the resulting canvas + * @param opt_x1 {number=} - The X coordinate of the left edge of the capturing rectangle defaults to 0 + * @param opt_y1 {number=} - The Y coordinate of the top edge of the capturing rectangle defaults to 0 + * @param opt_x2 {number=} - The X coordinate of the right edge of the capturing rectangle defaults to viewport width + * @param opt_y2 {number=} - The Y coordinate of the bottom edge of the capturing rectangle defaults to viewport height + */ + capture(callback?: (canvas: HTMLCanvasElement) => void, opt_capturables?: Array, opt_x1?: number, opt_y1?: number, opt_x2?: number, opt_y2?: number): void; + + /** + * This method sets the rendering engine type for the map. Rendering engine is responsible for displaying i.e tiles and data on the map. + * @param type {H.Map.EngineType} + * @returns {H.Map} - the map itself + */ + setEngineType(type: H.Map.EngineType): H.Map; + + /** + * To persistently store the content of a map layer for a given area and range of zoom levels. It can be used to enable map rendering when no internet connection is established and also to reduce the download traffic for frequently visited map areas. + * @param opt_onprogress {function(H.util.Request)=} - A callback which is invoked every time when the progress state of the returned store request changes. + * @param opt_bounds {H.geo.Rect=} - The area to store, default is the current view bounds + * @param opt_min {number=} - The minimum zoom level to store, default is the current zoom level + * @param opt_max {number=} - The maximum zoom level to store, default is the current zoom level + * @param opt_layer {H.map.layer.BaseTileLayer=} - The layer to store, default is the current base layer + * @returns {H.util.Request} - A handle to the created storage request + */ + storeContent(opt_onprogress?: (req: H.util.Request) => void, opt_bounds?: H.geo.Rect, opt_min?: number, opt_max?: number, opt_layer?: H.map.layer.BaseTileLayer): H.util.Request; + + /** + * To clear the entire stored content + * @param opt_onprogress {function(H.util.Request)=} - A callback which is invoked every time when the progress state of the returned clear request changes + * @returns {H.util.Request} - A handle to the created flush request + */ + clearContent(opt_onprogress?: (req: H.util.Request) => void): H.util.Request; + + /** + * This method adds a layer to the map. + * @param layer {H.map.layer.Layer} - The map layer to be added + * @param opt_idx {number=} - index at which the new layer should be inserted + * @returns {H.Map} - current map instance + */ + addLayer(layer: H.map.layer.Layer, opt_idx?: number): H.Map; + + /** + * This method removes layer from the map. + * @param layer {H.map.layer.Layer} - The map layer to be removed + * @returns {H.Map} - current map instance + */ + removeLayer(layer: H.map.layer.Layer): H.Map; + + /** + * This method will set provided layer as base map. The layer will be inserted as the bottom most layer in the map. + * @param layer {H.map.layer.Layer} - The layer to use as base map + * @returns {H.Map} - the instance itself + */ + setBaseLayer(layer: H.map.layer.Layer): H.Map; + + /** + * To get the current base map layer. + * @returns {?H.map.layer.Layer} + */ + getBaseLayer(): H.map.layer.Layer; + + /** + * Returns the screen coordinates according to the given geographical coordinates. This method returns a screen pixel coordinates for the provided geo point. + * @param geoPoint {H.geo.IPoint} - point on the map + * @returns {?H.math.Point} + */ + geoToScreen(geoPoint: H.geo.IPoint): H.math.Point; + + /** + * Returns the geographical coordinates according to the given screen coordinates. + * @param x {number} - map viewport x-axis pixel coordinate + * @param y {number} - map viewport y-axis pixel coordinate + * @returns {?H.geo.Point} + */ + screenToGeo(x: number, y: number): H.geo.Point; + + /** + * Returns the camera data according to the given screen coordinates. Method converts screen pixel coordinates to correct camera data object + * @param x {number} - map viewport x-axis pixel coordinate + * @param y {number} - map viewport y-axis pixel coordinate + * @returns {H.map.ViewModel.CameraData} + */ + screenToCameraData(x: number, y: number): H.map.ViewModel.CameraData; + + /** + * This method adds an map object to the map. Map object can be a marker or a spatial object like polygon or polyline. + * @param mapObject {!H.map.Object} - The map object to add + * @returns {!H.map.Object} - the added map object + */ + addObject(mapObject: H.map.Object): H.map.Object; + + /** + * This method removes previously added map object from the map. + * @param mapObject {!H.map.Object} - The map object to remove + * @returns {!H.map.Object} - the removed map object + */ + removeObject(mapObject: H.map.Object): H.map.Object; + + /** + * This method retrieves the list of all objects which have been added to the map. + * @returns {Array} - the list of all use objects which are currently on the map. + */ + getObjects(): Array; + + /** + * This method adds an array of objects or an object group to the map. + * @param mapObjects {Array} + * @returns {H.Map} - the map instance + */ + addObjects(mapObjects: Array): H.Map; + + /** + * This method removes an array of object or an object group from the map. + * @param mapObjects {(Array | H.map.Group)} + * @returns {H.Map} - the map instance + */ + removeObjects(mapObjects: (Array | H.map.Group)): H.Map; + + /** + * Returns the top most z-ordered map object found under the specific screen coordinates. Coordinates are viewport pixel coordinates starting from top left corner as (0, 0) point. + * @param x {number} - map viewport x-axis pixel coordinate + * @param y {number} - map viewport y-axis pixel coordinate + * @returns {?H.map.Object} - the encountered top most map object or null if no object found + */ + getObjectAt(x: number, y: number): H.map.Object; + + /** + * Returns a list of map objects in descending z-order found under the specific screen coordinates. Coordinates are viewport pixel coordinates starting from top left corner as (0, 0) point. + * @param x {number} - map viewport x-axis pixel coordinate + * @param y {number} - map viewport y-axis pixel coordinate + * @returns {Array} + */ + getObjectsAt(x: number, y: number): Array; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + export module Map { + /** + * It defines the number of lower and higher zoom levels, where cached content of the base map is rendered while content of the current zoom level is still loading. Example: if range was set to {lower: 3, higher: 2} and current level is 10 then rendering engine will try to display cached tiles from lower zoom levels 7, 8, 9 and higher levels 11 and 12. + * @property lower {number} - The number of lower zoom levels to take into account, default is 0 + * @property higher {number} - The number of higher zoom levels to take into account, default is 0 + */ + export interface BackgroundRange { + lower: number; + higher: number; + } + + /** + * Types of engines + */ + export enum EngineType { + P2D, + PANORAMA, + } + + /** + * This type defines options which can be used to initialize the map. + * @property center {H.geo.IPoint=} - The initial center of the map, default is {lat:0, lng: 0} + * @property zoom {number=} - The initial zoom level of the map, default is 0 respectively the minimal zoom level of the base map + * @property bounds {H.geo.Rect=} - The view bounds to be displayed on the map. If provided, it takes precedence over center and zoom. and zoom if provided) + * @property layers {Array=} - A list of layers to render on top of the base map + * @property engineType: {H.Map.EngineType=} - The initial engine type to use, default is P2D + * @property pixelRatio {number} - The pixelRatio to use for over-sampling in cases of high-resolution displays, default is 1 + * @property imprint {H.map.Imprint.Options=} - The imprint options or null to suppress the imprint + * @property renderBaseBackground {H.Map.BackgroundRange=} - Object describes how many cached zoom levels should be used as a base map background while base map tiles are loading. Example: {lower: 3, higher: 2} + * @property autoColor {boolean=} - Indicates whether the UI's colors should automatically adjusted to the base layer, default is true. Up to now only the copyright style will be adjusted. See H.map.layer.Layer.Options#dark + * @property margin {number=} - The size in pixel of the supplemental area to render for each side of the map + * @property padding {H.map.ViewPort.Padding=} - The padding in pixels for each side of the map + * @property fixedCenter {boolean=} - Indicates whether the center of the map should remain unchanged if the viewport's size or padding has been changed, default is true + */ + export interface Options { + center?: H.geo.IPoint; + zoom?: number; + bounds?: H.geo.Rect; + layers?: Array; + engineType?: EngineType; + pixelRatio?: number; + imprint?: H.map.Imprint.Options; + renderBaseBackground?: BackgroundRange; + autoColor?: boolean; + margin?: number; + padding?: H.map.ViewPort.Padding; + fixedCenter?: boolean; + } + } + + /***** clustering *****/ + export module clustering { + /** + * This class represents the input data structure for data points to be clustered. + * @property lat {H.geo.Latitude} - The latitude coordinate of the data point's position + * @property lng {H.geo.Longitude} - The longitude coordinate of the data point's position + * @property wt {number} - The weight of the data point + * @property data {*} - Data associated with this data point + */ + export class DataPoint implements H.geo.IPoint { + /** + * Constructor + * @param lat {H.geo.Latitude} - The latitude coordinate of the data point's position + * @param lng {H.geo.Longitude} - The longitude coordinate of the data point's position + * @param opt_weight {number=} - The weight of the data point as a positive number > 0. If not specified it , default is 1. + * @param opt_data {*=} - Optional data, which will be associated with this DataPoint + */ + constructor(lat: H.geo.Latitude, lng: H.geo.Longitude, opt_weight?: number, opt_data?: any); + + lat: H.geo.Latitude; + lng: H.geo.Longitude; + alt: H.geo.Altitude; + ctx: H.geo.AltitudeContext; + wt: number; + data: any; + } + + /** + * This interface describes a cluster of data points, which fulfill the clustering specification (i.e. data points are within the epsilon and there are enough points to form a cluster). + */ + export interface ICluster { + /** + * Returns the maximum zoom level where this cluster doesn't fall apart into sub clusters and/or noise poinst + * @returns {number} + */ + getMaxZoom(): number; + + /** + * Returns the bounding rectangle of this cluster. + * @returns {H.geo.Rect} + */ + getBounds(): H.geo.Rect; + + /** + * Invokes the specified callback for each "entry" of the cluster. That "entry" can be either a cluster which implements H.clustering.ICluster interface or a noise point which implements H.clustering.INoisePoint interface. + * @param callback {function(H.clustering.IResult)} - The callback gets the currently traversed entry as an argument, which is cluster or noise point. + */ + forEachEntry(callback: (result: H.clustering.IResult) => void): void; + + /** + * Invokes the specified callback for each data point which is part of this cluster, even indirectly. + * @param callback {function(H.clustering.INoisePoint)} - The callback gets the currently traversed noise point as argument. + */ + forEachDataPoint(callback: (noise: H.clustering.INoisePoint) => void): void; + + /** + * Returns the geographical position of this cluster result. + * @returns {H.geo.Point} + */ + getPosition(): H.geo.Point; + + /** + * Returns the weight of this cluster result. + * @returns {number} + */ + getWeight(): number; + + /** + * To indicate whether this cluster result is a cluster or noise point + * @returns {boolean} + */ + isCluster(): boolean; + + /** + * Returns the minimum zoom level where this item is not part of another cluster + * @returns {number} + */ + getMinZoom(): number; + } + + /** + * This interface represents a data point which does not belong to a cluster. + */ + export interface INoisePoint { + /** + * This method returns data which coresponds to this noise point. + * @returns {*} + */ + getData(): any; + + /** + * Returns the geographical position of this cluster result. + * @returns {H.geo.Point} + */ + getPosition(): H.geo.Point; + + /** + * Returns the weight of this cluster result. + * @returns {number} + */ + getWeight(): number; + + /** + * To indicate whether this cluster result is a cluster or noise point + * @returns {boolean} + */ + isCluster(): boolean; + + /** + * Returns the minimum zoom level where this item is not part of another cluster + * @returns {number} + */ + getMinZoom(): number; + } + + /** + * This interface represents the result item of a clustering operation. + */ + export interface IResult { + + /** + * Returns the geographical position of this cluster result. + * @returns {H.geo.Point} + */ + getPosition(): H.geo.Point; + + /** + * Returns the weight of this cluster result. + * @returns {number} + */ + getWeight(): number; + + /** + * To indicate whether this cluster result is a cluster or noise point + * @returns {boolean} + */ + isCluster(): boolean; + + /** + * Returns the minimum zoom level where this item is not part of another cluster + * @returns {number} + */ + getMinZoom(): number; + } + + /** + * Interface which specifies the methods a theme must implement. + */ + export interface ITheme { + + /** + * Function returns a cluster presentation as a map object. + * @param cluster {H.clustering.ICluster} + * @returns {H.map.Object} + */ + getClusterPresentation(cluster: H.clustering.ICluster): H.map.Object; + + /** + * Function returns noise point presentation as a map object + * @param noisePoint {H.clustering.INoisePoint} + * @returns {H.map.Object} + */ + getNoisePresentation(noisePoint: H.clustering.INoisePoint): H.map.Object; + } + + /** + * The clustering provider serves clusters and noise point representation for the map depending on the provided data set. Levels for clustering as well as custom cluster representation can be set via Options. + * @property min {number} - Minimum zoom level at which provider can cluster data + * @property max {number} - Maximum zoom level at which provider can cluster data + */ + export class Provider extends H.util.EventTarget { + /** + * Constructor + * @param dataPoints {Array} + * @param opt_options {H.clustering.Provider.Options=} + */ + constructor(dataPoints: Array, opt_options?: H.clustering.Provider.Options); + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} + * @param opt_scope {Object=} + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + + /** + * This method sets new data to the provider + * @param dataPoints {Array} + */ + setDataPoints(dataPoints: Array): void; + + /** + * This method adds a data point to the provider. Beware that this method provokes reclustering of the whole data set. + * @param dataPoint {H.clustering.DataPoint} + */ + addDataPoint(dataPoint: H.clustering.DataPoint): void; + + /** + * This method adds a list of data points to the provider. Beware that this method provokes reclustering of the whole data set. + * @param dataPoints {Array} + */ + addDataPoints(dataPoints: Array): void; + + /** + * This method removes a data point from the provider. Beware that this method provokes reclustering of the whole data set. + * @param dataPoint {H.clustering.DataPoint} + */ + removeDataPoint(dataPoint: H.clustering.DataPoint): void; + + /** + * This method returns current theme used for creating cluster visualization + * @returns {H.clustering.ITheme} + */ + getTheme(): H.clustering.ITheme; + + /** + * This method sets new theme on the provider. Calling this method will change visuals for displayed clusters and noise points. + * @param theme {H.clustering.ITheme} + */ + setTheme(theme: H.clustering.ITheme): void; + + /** + * This method always returns true as we don't have information about visual representation until we have the clustering result and apply the theme. + * @returns {boolean} + */ + providesDomMarkers(): boolean; + + /** + * Returns all DomMarker cluster and noise point representations which intersect with the provided rectangular area. + * @param bounds {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestDomMarkers(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * This method always returns true as we don't have information about visual representation until we have the clustering result and apply the theme. + * @returns {boolean} + */ + providesMarkers(): boolean; + + /** + * Returns all cluster and noise point markers which intersect with the provided rectangular area. + * @param bounds {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestMarkers(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * This method always returns true as we don't have information about visual representation until we have the clustering result and apply the theme. + * @returns {boolean} + */ + providesSpatials(): boolean; + + /** + * Returns all polyline, polygon, circle and rect objects which represent cluster and noise points and intersect with the provided area. + * @param bounds {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestSpatials(bounds: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * Returns the spatial objects which intersect the given tile + * @param tile {H.map.provider.SpatialTile} - The tile for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestSpatialsByTile(tile: H.map.provider.Tile, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * Returns the accumulate invalidations of this provider's objects that have occurred. + * @returns {H.map.provider.Invalidations} - an invalidations object + */ + getInvalidations(): H.map.provider.Invalidations; + + /** + * To signal to this provider that a map object has been changed. The method updates the Invalidations of this provider and the given map object and triggers dispatchUpdate() + * @param mapObject {!H.map.Object} - The map object to be invalidated + * @param changes {H.math.BitMask} - The flags indicating the types of occurred changes + */ + invalidateObject(mapObject: H.map.Object, changes: H.math.BitMask): void; + + min: number; + max: number; + } + + export module Provider { + /** + * Options which are used within cluster calculations. + * @property eps {number=} - epsilon parameter for cluster calculation. For the FASTGRID strategy it must not exceed 256 and must take values that are power of 2. For the GRID and DYNAMICGRID strategies it can take values from 10 to 127. Default is 32. + * @property minWeight {number=} - the minimum points weight sum to form a cluster, default is 2 + * @property projection {H.geo.IProjection=} - projection to use for clustering, default is H.geo.mercator + * @property strategy {H.clustering.Provider.Strategy=} - clustering stretegy, defaults to H.clustering.Provider.Strategy.FASTGRID + */ + export interface ClusteringOptions { + eps?: number; + minWeight?: number; + projection?: H.geo.IProjection; + strategy?: H.clustering.Provider.Strategy; + } + + /** + * Options which are used to initialize the clustering Provider + * @property min {number=} - The minimal supported zoom level, default is 0 + * @property max {number=} - The maximal supported zoom level, default is 22 + * @property clusteringOptions {H.clustering.Provider.ClusteringOptions=} - options for clustering algorithm + * @property theme {H.clustering.ITheme=} - cluster and noise point graphical representation + */ + export interface Options { + min?: number; + max?: number; + clusteringOptions?: H.clustering.Provider.ClusteringOptions; + theme?: H.clustering.ITheme; + } + + /** + * Enumeration represents possible clustering strategies. FASTGRID clustering is the efficient way to cluster large sets of data points. GRID clustering is slower but has greater precision due to the bigger range of epsilon values, this strategy suitable for clustering smaller data sets (up to 1000 data points) on desktop devices. DYNAMICGRID clustering uses the same algorithm of clustering as the GRID, but clusters on the viewport basis is meant to be used with data sets that are subject to the frequent update operations. + */ + export enum Strategy { + FASTGRID, + GRID, + DYNAMICGRID, + } + } + } + + /***** data *****/ + export module data { + /** + * An abstract reader class defines interface for data readers and has general functionality related to fetching data and reader events. + */ + export class AbstractReader extends H.util.EventTarget { + /** + * Constructor + * @param opt_url {string=} + */ + constructor(opt_url?: string); + + /** + * Method returns H.map.layer.ObjectLayer that contains parsed data, and can be added directly to the map. It returns new instance of the class with every invocation. If data hasn't been parsed it will return H.map.layer.ObjectLayer that contains partial information, and reader will add new parsed objects to the layer's provider later on. + * @returns {H.map.layer.ObjectLayer} + */ + getLayer(): H.map.layer.ObjectLayer; + + /** + * Method returns collection of currently parsed, and converted to H.map.Object data objects. Method returns only currently parsed objects if parsing is ongoing. + * @returns {Array} + */ + getParsedObjects(): Array; + + /** + * Returns URL of the current file, which is either in process of fetching/parsing or file that has been already parsed. + * @returns {(string | undefined)} - url + */ + getUrl(): string | void; + + /** + * Method sets reader's URL. Method resets current Reader's state to its initial values (clears data about last parsed objects, etc.), and throws InvalidState exception if Reader's state is not READY or ERROR. + * @param url {string} - The new URL + * @returns {H.data.AbstractReader} + */ + setUrl(url: string): H.data.AbstractReader; + + /** + * Returns the reader's processing state for possible states see H.data.AbstractReader.State + * @returns {H.data.AbstractReader.State} + */ + getState(): H.data.AbstractReader.State; + + /** + * Method launches parsing of the data file at the current url (see H.data.AbstractReader#setUrl or H.data.AbstractReader). Method uses XHR as a transport therefore same origin policy applies, or server should respond with proper CORS headers. + */ + parse(): void; + } + + export module AbstractReader { + /** + * The event class for state events that are dispatched by AbstractReader + */ + export class Event extends H.util.Event { + /** + * Constructor + * @param target {(H.data.AbstractReader | H.map.Object)} - The target that's passed to event listeners + * @param type {string} - The type of the event + * @param state {H.data.AbstractReader.State} - The state of the target firing an event + * @param message {string} - The message associated with an event + */ + constructor(target: (H.data.AbstractReader | H.map.Object), type: string, state: H.data.AbstractReader.State, message: string); + } + + /** + * The state types of an Reader. Possible states are: + */ + export enum State { + ERROR, + LOADING, + VISIT, + READY, + } + } + } + + /***** geo *****/ + export module geo { + /** + * A Geographic coordinate that specifies the height of a point in meters. A value of undefined is treated as 0. + */ + export type Altitude = number; + + /** + * Contexts for altitudes to specify the contextual origin of an altitude's value + */ + export enum AltitudeContext { + /** Ground level */ + undefined, + /** Ground level */ + GL, + /** Obstruction level */ + OL, + /** Mean sea level */ + SL, + /** Sea bed level */ + SB, + /** WGS84 ellipsoid */ + WE, + /** WGS84 geoid */ + WG, + } + + /** + * An interface to represent a geographic point. Every point in geo space is represented by three coordinates latitude, longitude and optional altitude. + * @property lat {H.geo.Latitude} - The latitude coordinate. + * @property lng {H.geo.Longitude} - The longitude coordinate. + * @property alt {H.geo.Altitude=} - The altitude coordinate. + * @property ctx {H.geo.AltitudeContext=} - The altitude context. + */ + export interface IPoint { + lat: H.geo.Latitude; + lng: Longitude; + alt?: H.geo.Altitude; + ctx?: H.geo.AltitudeContext; + } + + export interface IProjection { + latLngToPoint(lat: number, lng: number, opt_out?: H.math.Point): H.math.Point; + xyToGeo(x: number, y: number, opt_out?: H.geo.Point): H.geo.Point; + pointToGeo(point: H.math.IPoint, opt_out?: H.geo.Point): H.geo.Point; + geoToPoint(geoPoint: H.geo.IPoint, opt_out?: H.math.Point): H.math.Point; + } + + /** + * A geographic coordinate that specifies the north-south position of a point on the Earth's surface in the range from -90 to + 90 degrees, inclusive. + */ + export type Latitude = number; + + /** + * A Geographic coordinate that specifies the east-west position of a point on the Earth's surface in the range from -180 to 180 degrees, inclusive. + */ + export type Longitude = number; + + /** + * Class represents a geographical point, which is defined by the latitude, longitude and optional altitude. + * @property lat {H.geo.Latitude} - The latitude coordinate. + * @property lng {H.geo.Longitude} - The longitude coordinate. + * @property alt {H.geo.Altitude} - The altitude coordinate. + * @property ctx {H.geo.AltitudeContext} - The altitude context. + */ + export class Point implements IPoint { + /** + * Constructor + * @property lat {H.geo.Latitude} - The latitude coordinate. + * @property lng {H.geo.Longitude} - The longitude coordinate. + * @property opt_alt {H.geo.Altitude=} - The altitude coordinate. + * @property opt_ctx {H.geo.AltitudeContext=} - The altitude context. + */ + constructor(lat: H.geo.Latitude, lng: Longitude, opt_alt?: H.geo.Altitude, opt_ctx?: H.geo.AltitudeContext); + + /** + * To compare this point with a supplied other point for equality. Two points are considered equal if they have the same lat and lng as well as equivalent values for alt and ctx. + * @param other {H.geo.IPoint} + * @returns {boolean} - Whether the two points are equal. + */ + equals(other: IPoint): boolean; + + /** + * To calculate the distance between this point and the supplied other point. The method uses the Haversine formula. The altitude is not considered. + * @param other {H.geo.IPoint} + * @returns {number} - The distance between the given location and the location supplied by the caller in meters. + */ + distance(other: IPoint): number; + + /** + * This method calculates the geographic point of a destination point using the distance and bearing specified by the caller. The altitude is ignored, instead the WGS84 Mean Radius is taken. + * @param bearing {number} - The bearing to use in the calculation in degrees. + * @param distance {number} - The distance to the destination in meters. + * @param opt_overGreatCircle {boolean=} - If true the computation uses the 'Great Circle' otherwise 'Rhumb Line'. + * @returns {H.geo.Point} - The calculated point + */ + walk(bearing: number, distance: number, opt_overGreatCircle?: boolean): Point; + + /** + * This method validates the given IPoint. It checks, if lat, lng, alt and ctx have valid types. Additionally the value of the lat property is clamped into a range of -90 ... +90 and the value of the lng property is modulo into a range of -180 ... +180 plus validates the values of the alt and ctx properties + * @param point {H.geo.IPoint} - The point to validate + * @param opt_caller {Function=} - The caller to use for InvalidArgumentError. If omitted no error is thrown + * @param opt_argNr {number=} - The argument number to use for InvalidArgumentError. + * @returns {boolean} - if the given point could validate + */ + static validate(point: IPoint, opt_caller?: Function, opt_argNr?: number): boolean; + + /** + * This method creates a Point instance from a given IPoint object. + * @param iPoint {H.geo.IPoint} - The IPoint object to use + * @returns {H.geo.Point} - the created Point instance + */ + static fromIPoint(iPoint: IPoint): Point; + + lat: H.geo.Latitude; + lng: H.geo.Longitude; + alt: H.geo.Altitude; + ctx: H.geo.AltitudeContext; + } + + /** + * This class represents a rectangular geographic area. The area is defined by four geographical coordinates two (left, right) longitudes and two (top, bottom) latitudes. + */ + export class Rect { + /** + * Constructor + * @param top {H.geo.Latitude} - the northern-most latitude + * @param left {H.geo.Longitude} - the left-most longitude + * @param bottom {H.geo.Latitude} - the southern-most latitude + * @param right {H.geo.Longitude} - the right-most latitude + */ + constructor(top: H.geo.Latitude, left: H.geo.Longitude, bottom: H.geo.Latitude, right: H.geo.Longitude); + + /** + * To compare this rectangle with a supplied other rectangle for equality. + * @param other {H.geo.Rect} + * @returns {boolean} - Whether the two rectangles are equal. + */ + equals(other: H.geo.Rect): boolean; + + /** + * Toclone this rectangle. + * @returns {H.geo.Rect} + */ + clone(): H.geo.Rect; + + /** + * This method returns the top-left corner of the rectangular area. + * @returns {H.geo.Point} - the top-left corner of the area + */ + getTopLeft(): H.geo.Point; + + /** + * This method returns the bottom-right corner of the rectangular area. + * @returns {H.geo.Point} - the bottom-right corner of the area + */ + getBottomRight(): H.geo.Point; + + /** + * This method returns the north-most latitude of this rectangular area + * @returns {H.geo.Latitude} - the north-most latitude of the area + */ + getTop(): H.geo.Latitude; + + /** + * This method returns the south-most latitude of this rectangular area + * @returns {H.geo.Latitude} - the south-most latitude of the area + */ + getBottom(): H.geo.Latitude; + + /** + * This method returns the left-most longitude of this rectangular area + * @returns {H.geo.Longitude} - the left-most longitude of the area + */ + getLeft(): H.geo.Longitude; + + /** + * This method returns the right-most longitude of this rectangular area + * @returns {H.geo.Longitude} - the right-most longitude of the area + */ + getRight(): H.geo.Longitude; + + /** + * This method returns the center point of this rectangular area + * @returns {H.geo.Point} - the center point of the area + */ + getCenter(): H.geo.Point; + + /** + * Returns this width of this rectangular area in decimal degrees. + * @returns {number} - the width of this area + */ + getWidth(): number; + + /** + * Returns this height of this rectangular area in decimal degrees. + * @returns {number} - the height of this area + */ + getHeight(): number; + + /** + * Returns a boolean value indicating whether this rectangular area spans across the date border. + * @returns {boolean} - true if the area spans across the date border, otherwise false + */ + isCDB(): boolean; + + /** + * The method checks if the area enclosed by the given bounding box is 0. + * @returns {boolean} - true if the dimensions of the area a 0, otherwise false + */ + isEmpty(): boolean; + + /** + * This method checks if the latitude and longitude supplied by the caller lie within the area of this rectangular area. + * @param lat {H.geo.Latitude} - the latitude + * @param lng {H.geo.Longitude} - the longitude + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {boolean} - true if the latitude and longitude are contained in this area, otherwise false + */ + containsLatLng(lat: H.geo.Latitude, lng: H.geo.Longitude, opt_skipValidation?: boolean): boolean; + + /** + * This method checks if the point supplied by the caller lies within the area of this rectangular area. + * @param geoPoint {H.geo.IPoint} - the point + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {boolean} - true if the point is contained in this area, otherwise false + */ + containsPoint(geoPoint: H.geo.IPoint, opt_skipValidation?: boolean): boolean; + + /** + * This method checks if the rectangular area supplied by the caller is completely contained within the area of this rectangular area. + * @param geoRect {H.geo.Rect} - the rectangular area + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {boolean} - true if the rectangular area is contained in this area, otherwise false + */ + containsRect(geoRect: H.geo.Rect, opt_skipValidation?: boolean): boolean; + + /** + * This method returns the smallest bounding box that covers this rectangular area and the latitude and longitude supplied by the caller. + * @param lat {H.geo.Latitude} - the latitude + * @param lng {H.geo.Longitude} - the longitude + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @param opt_out {H.geo.Rect=} - an optional rectangular area to store the result + * @returns {H.geo.Rect} - either the rectangular area passed as out parameter or a new rectangular area + */ + mergeLatLng(lat: H.geo.Latitude, lng: H.geo.Longitude, opt_skipValidation?: boolean, opt_out?: H.geo.Rect): H.geo.Rect; + + /** + * This method returns the smallest bounding box that covers this rectangular area and the point supplied by the caller. + * @param geoPoint {H.geo.IPoint} - the point to merge + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @param opt_out {H.geo.Rect=} - an optional rectangular area to store the result + * @returns {H.geo.Rect} - either the rectangular area passed as out parameter or a new rectangular area + */ + mergePoint(geoPoint: H.geo.IPoint, opt_skipValidation?: boolean, opt_out?: H.geo.Rect): H.geo.Rect; + + /** + * This method returns the smallest bounding box that covers this rectangular area and the rectangular area supplied by the caller. + * @param geoRect {H.geo.Rect} - the point to merge + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @param opt_out {H.geo.Rect=} - an optional rectangular area to store the result + * @returns {H.geo.Rect} - either the rectangular area passed as out parameter or a new rectangular area + */ + mergeRect(geoRect: H.geo.Rect, opt_skipValidation?: boolean, opt_out?: H.geo.Rect): H.geo.Rect; + + /** + * This method returns the smallest bounding box that covers this rectangular area and the rectangular area supplied by the caller. + * @param top {H.geo.Latitude} - The top latitude of the rectangle to merge + * @param left {H.geo.Longitude} - The left longitude of the rectangle to merge + * @param bottom {H.geo.Latitude} - The bottom latitude of the rectangle to merge + * @param right {H.geo.Longitude} - The right longitude of the rectangle to merge + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @param opt_out {H.geo.Rect=} - an optional rectangular area to store the result + * @returns {H.geo.Rect} - either the rectangular area passed as out parameter or a new rectangular area + */ + mergeTopLeftBottomRight(top: H.geo.Latitude, left: H.geo.Longitude, bottom: H.geo.Latitude, right: H.geo.Longitude, opt_skipValidation?: boolean, opt_out?: H.geo.Rect): H.geo.Rect; + + /** + * This method checks if the intersection of two bounding boxes is non-empty. + * @param geoRect {H.geo.Rect} - a rectangular area to be tested for intersection with this rectangular area + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {boolean} - a boolean value indicating whether the two areas intersect + */ + intersects(geoRect: H.geo.Rect, opt_skipValidation?: boolean): boolean; + + /** + * This method merges two rects by their values. The result of the merge is a bounding rect which covers all provided rect bounds. + * @param topA {H.geo.Latitude} - the northern-most latitude + * @param leftA {H.geo.Longitude} - the left-most longitude of operand A + * @param bottomA {H.geo.Latitude} - the southern-most latitude of operand A + * @param rightA {H.geo.Longitude} - the right-most latitude of operand A + * @param topB {H.geo.Latitude} - the northern-most latitude of operand B + * @param leftB {H.geo.Longitude} - the left-most longitude of operand B + * @param bottomB {H.geo.Latitude} - the southern-most latitude of operand B + * @param rightB {H.geo.Longitude} - the right-most latitude of operand B + * @param opt_out {H.geo.Rect=} - an optional rect to store the results + * @returns {H.geo.Rect} - either the opt_out rect or a new rect + */ + static merge(topA: H.geo.Latitude, leftA: H.geo.Longitude, bottomA: H.geo.Latitude, rightA: H.geo.Longitude, topB: H.geo.Latitude, leftB: H.geo.Longitude, bottomB: H.geo.Latitude, rightB: H.geo.Longitude, opt_out?: H.geo.Rect): H.geo.Rect; + + /** + * This method creates a rectangular area from a top-left and bottom-right point pair. + * @param topLeft {H.geo.IPoint} - the top-left corner of the area + * @param bottomRight {H.geo.IPoint} - the bottom-right corner of the area + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {H.geo.Rect} - returns the rectangular area defined by the top-left and bottom-right corners + */ + static fromPoints(topLeft: H.geo.IPoint, bottomRight: H.geo.IPoint, opt_skipValidation?: boolean): H.geo.Rect; + + /** + * This method creates the minimum rectangular area covering all of the points in the argument array. + * @param pointArray {Array} - the array of points to cover + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {H.geo.Rect} - returns the minimum rectangular area covering the points or null if no point is covered + */ + static coverPoints(pointArray: Array, opt_skipValidation?: boolean): H.geo.Rect; + + /** + * This method creates the minimum rectangular area covering all of the coordinates in the argument array. + * @param latLngAltArray {Array} - the array of coordinates to cover + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {(H.geo.Rect | undefined)} - returns the minimum rectangular area covering the coordinates + */ + static coverLatLngAlts(latLngAltArray: Array, opt_skipValidation?: boolean): H.geo.Rect | void; + + /** + * This method creates the minimum rectangular area covering all of the rectangular areas in the argument array. + * @param rectArray {Array} - the array of points to cover + * @param opt_skipValidation {boolean=} - a boolean flag indicating whether to check validity of the arguments + * @returns {(H.geo.Rect | undefined)} - returns the minimum rectangular area covering the rectangular areas + */ + static coverRects(rectArray: Array, opt_skipValidation?: boolean): H.geo.Rect | void; + + /** + * This method clones the given bounding rect and resizes the clone if necessary until the location supplied by the caller is at its center. + * @param center {H.geo.IPoint} - a point which is to be the center of the resized rectangular area + * @param opt_out {H.geo.Rect=} - an optional rectangular area to store the result + * @returns {H.geo.Rect} - the resized rectangular area + */ + resizeToCenter(center: H.geo.IPoint, opt_out?: H.geo.Rect): H.geo.Rect; + } + + /** + * A strip is a flat list of latitude, longitude, altitude tuples in a fixed order. + */ + export class Strip { + /** + * Constructor + * @param opt_latLngAlts {Array=} - An optional array of latitude, longitude and altitude triples to initialize the strip with. + * @param opt_ctx {H.geo.AltitudeContext=} - An optional altitude context for all altitudes contained in this strip. + */ + constructor(opt_latLngAlts?: Array, opt_ctx?: H.geo.AltitudeContext); + + /** + * This method pushes a lat, lng, alt to the end of this strip. + * @param lat {H.geo.Latitude} + * @param lng {H.geo.Longitude} + * @param alt {H.geo.Altitude} + */ + pushLatLngAlt(lat: H.geo.Latitude, lng: H.geo.Longitude, alt: H.geo.Altitude): void; + + /** + * This method splices the strip at the provided index, removing the specified number of items at that index and inserting the lat, lng, alt array. + * @param index {number} - The index at which to splice + * @param opt_nRemove {number=} - The number of lat, lng, alt values to remove + * @param opt_latLngAlts {Array=} - The lat, lng, alt values to add + * @returns {Array} - an array of removed elements + */ + spliceLatLngAlts(index: number, opt_nRemove?: number, opt_latLngAlts?: Array): Array; + + /** + * This method inserts one set of lat, lng, alt values into the strip at the specified index. + * @param index {number} - the index at which to add the element + * @param lat {H.geo.Latitude} - the latitude to insert + * @param lng {H.geo.Longitude} - the longitude to insert + * @param alt {H.geo.Altitude} - the altitude to insert + */ + insertLatLngAlt(index: number, lat: H.geo.Latitude, lng: H.geo.Longitude, alt: H.geo.Altitude): void; + + /** + * This method removes one set of lat, lng, alt values from the strip at the specified index. + * @param index {number} + */ + removeLatLngAlt(index: number): void; + + /** + * This method pushes the lat, lng, alt values of a H.geo.Point to the end of this strip. + * @param geoPoint {H.geo.IPoint} + */ + pushPoint(geoPoint: H.geo.IPoint): void; + + /** + * This method inserts the lat, lng, alt values of a H.geo.Point into the list at the specified index. + * @param pointIndex {number} + * @param geoPoint {H.geo.IPoint} + */ + insertPoint(pointIndex: number, geoPoint: H.geo.IPoint): void; + + /** + * This method removes one set of lat, lng, alt values from this strip at the virtual point index specified. + * @param pointIndex {number} - the virtual point index + */ + removePoint(pointIndex: number): void; + + /** + * This method extracts a H.geo.Point from this strip at the virtual point index. If the extracted point has an alt value, the strip's altitude context will be supplied to the point. + * @param pointIndex {number} - the virtual point index in the strip + * @param opt_out {H.geo.Point=} - an optional point object to store the lat, lng, alt values + * @returns {H.geo.Point} - returns either the 'opt_out' point object or a new point object. + */ + extractPoint(pointIndex: number, opt_out?: H.geo.Point): H.geo.Point; + + /** + * This method is a utility method that iterates over the lat, lng, alt array and calls the provided function for each 3 elements passing lat, lng and alt and the virtual point index as arguments. + * @param eachFn {function(H.geo.Latitude, H.geo.Longitude, H.geo.Altitude, number)} - the function to be called for each 3 elements + * @param opt_start {number=} - an optional start index to iterate from + * @param opt_end {number=} - an optional end index to iterate to + */ + eachLatLngAlt(eachFn: (lat: H.geo.Latitude, lng: H.geo.Longitude, alt: H.geo.Altitude, n: number) => void, opt_start?: number, opt_end?: number): void; + + /** + * This method returns the number of times that legs in this strip cross the date border. + * @param opt_closed {boolean=} - indicates whether the strip is closed (i.e. whether the strip's last and first coordinates form the closing leg of a polygon) + * @returns {number} - the amount of times this strip crosses the date border. + */ + getDBCs(opt_closed?: boolean): number; + + /** + * This method return the number of points stored in this strip. + * @returns {number} - the number of points in this strip + */ + getPointCount(): number; + + /** + * This method returns the internal array keeping the lat, lng, alt values. Modifying this array directly can destroy the integrity of this strip. Use it only for read access. + * @returns {Array} - returns the raw lat, lng, alt values of this strip + */ + getLatLngAltArray(): Array; + + /** + * This method returns the bounding box of this strip. + * @returns {?H.geo.Rect} - this strip's bounding rectangle + */ + getBounds(): H.geo.Rect; + + /** + * This method checks whether two longitudes form a leg which crosses the date border. + * @param lng1 {H.geo.Longitude} - the start longitude of the leg + * @param lng2 {H.geo.Longitude} - the end longitude of the leg + * @returns {boolean} - true if the leg crosses the date border, otherwise false + */ + static isDBC(lng1: H.geo.Longitude, lng2: H.geo.Longitude): boolean; + + /** + * This method initializes a new strip with an array of lat, lng values. Arrays are expected to have an even length with the format [lat, lng, lat, lng, ...]. + * @param latLngs {Array} - the array of lat, lng value. + * @returns {H.geo.Strip} - the strip containing the lat, lng values + */ + static fromLatLngArray(latLngs: Array): H.geo.Strip; + } + } + + /***** lang *****/ + + /***** map *****/ + export module map { + /** + * This class represents marker, which offers a means of identifying a location on the map with an icon. + */ + export class AbstractMarker extends H.map.Object { + /** + * Constructor + * @param position {H.geo.IPoint} - The location of this marker + * @param opt_options {H.map.AbstractMarker.Options=} - The values to initialize this marker + */ + constructor(position: H.geo.IPoint, opt_options?: H.map.AbstractMarker.Options); + + /** + * This method returns this marker's current position. + * @returns {H.geo.Point} - current marker geo position + */ + getPosition(): H.geo.Point; + + /** + * This method sets the marker's current position. + * @param position {H.geo.IPoint} + * @returns {H.map.AbstractMarker} - the marker itself + */ + setPosition(position: H.geo.IPoint): H.map.AbstractMarker; + + /** + * Returns this marker's current icon. + * @returns {!(H.map.Icon | H.map.DomIcon)} + */ + getIcon(): (H.map.Icon | H.map.DomIcon); + + /** + * Sets the marker's current icon. + * @param icon {!(H.map.Icon | H.map.DomIcon)} - The new marker icon + * @returns {H.map.AbstractMarker} - the marker itself + */ + setIcon(icon: (H.map.Icon | H.map.DomIcon)): H.map.AbstractMarker; + } + + export module AbstractMarker { + /** + * Options used to initialize a AbstractMarker + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property icon {(H.map.Icon | H.map.DomIcon)=} - The icon to use for the visual representation, if omitted a default icon is used. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. + */ + export interface Options { + min?: number; + max?: number; + visibility?: boolean; + zIndex?: number; + provider?: H.map.provider.Provider; + icon?: H.map.Icon | H.map.DomIcon; + data?: any; + } + } + + /** + * This class represents style attributes for arrows to be rendered along a polyline. A ArrowStyle instance is always treated as immutable to avoid inconstiencies and must not modified. + */ + export class ArrowStyle { + /** + * Constructor + * @param opt_options {(H.map.ArrowStyle | H.map.ArrowStyle.Options)=} + */ + constructor(opt_options?: (H.map.ArrowStyle | H.map.ArrowStyle.Options)); + + /** + * This method checks value-equality with another arrow style. + * @param other {(H.map.ArrowStyle | H.map.ArrowStyle.Options)} - the arrow style to compare with + * @returns {boolean} - true if the arrow styles are value-equal, otherwise false + */ + equals(other: (H.map.ArrowStyle | H.map.ArrowStyle.Options)): boolean; + } + + export module ArrowStyle { + /** + * An object type to specify the style of arrows to render along a polyline + * @property fillColor {string=} - The CSS color value used to fill the arrow shapes. If omitted or the value evaluates to false it defaults to "rgba(255, 255, 255, 0.75)" + * @property width {number=} - The width of the arrow shape. The value is taken as a factor of the width of the line, where the arrow description is applied. If omitted or the value is <= 0 it defaults to 1.2 + * @property length {number=} - The length of the arrow shapes. The value is taken as a factor of the width of the line at the end of which the arrow is drawn. If omitted or the value is <= 0 it defaults to 1.6 + * @property frequency {number=} - The frequency of arrow shapes. The value is taken as factor of the length of the arrow. A value of 1 results in gapless arrows. If omitted or the value is false it defaults to 5 + */ + export interface Options { + fillColor?: string; + width?: number; + length?: number; + frequency?: number; + } + } + + /** + * A Polygon with a circular shape. + */ + export class Circle extends H.map.Polygon { + /** + * Constructor + * @param center {H.geo.IPoint} - The geographical coordinates of the circle's center + * @param radius {number} - The radius of the circle in meters + * @param opt_options {H.map.Circle.Options=} - An object that specifies circle options and their initial values (among these, precision has a significant impact on the shape of the circle - please see + */ + constructor(center: H.geo.IPoint, radius: number, opt_options?: H.map.Circle.Options); + + /** + * To set the geographical center point of this circle. If the specified center is an instance of H.geo.Point you must not modify this Point instance without calling setCenter immediately afterwards. + * @param center {H.geo.IPoint} + */ + setCenter(center: H.geo.IPoint): void; + + /** + * To get the center point of this circle You must not modify the returned Point instance without calling setCenter immediately afterwards. + * @returns {H.geo.Point} + */ + getCenter(): H.geo.Point; + + /** + * To set the length of the radius of the circle in meters. The value is clamped to the of {@code[0 ... 20015089.27787877]} (half WGS84 mean circumference) + * @param radius {number} + */ + setRadius(radius: number): void; + + /** + * To get the length of the radius of the circle in meters. + * @returns {number} + */ + getRadius(): number; + + /** + * To set the precision of this circle {@see H.map.Circle.Options#precision} + * @param precision {number} + */ + setPrecision(precision: number): void; + + /** + * To get the precision value of this circle + * @returns {number} + */ + getPrecision(): number; + } + + export module Circle { + /** + * @property style {H.map.SpatialStyle=} - the style to be used when tracing the polyline + * @property visibility {boolean=} - An optional boolean value indicating whether this map object is visible, default is true + * @property precision {number=} - The precision of a circle as a number of segments to be used when rendering the circle. The value is clamped to the range between [4 ... 360], where 60 is the default. Note that the lower the value the more angular and the less circle-like the shape appears and, conversely, the higher the value the smoother and more rounded the result. Thus, starting at the extreme low end of the possible values, 4 produces a square, 6 a hexagon, while 30 results in a circle-like shape, although it appears increasingly angular as the zoom level increases (as you zoom in), and finally 360 produces a smooth circle. + * @property zIndex {number=} - The z-index value of the circle, default is 0 + * @property min {number=} - The minimum zoom level for which the circle is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the circle is visible, default is Infinity + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData + */ + export interface Options { + style?: H.map.SpatialStyle | H.map.SpatialStyle.Options; + visibility?: boolean; + precision?: number; + zIndex?: number; + min?: number; + max?: number; + provider?: H.map.provider.Provider; + data?: any; + } + } + + /** + * The class represents data model of the map. It holds list of layers that are rendered by map's RenderEngine. The class listens to 'update' events from layers and dispatches them to the RenderEngine. + */ + export class DataModel extends H.util.OList { + /** + * Constructor + * @param opt_layers {Array=} - array of layers to be added to the data model + */ + constructor(opt_layers?: Array); + } + + /** + * A visual representation of the H.map.DomMarker. + */ + export class DomIcon { + /** + * Constructor + * @param element {!(Element | string)} - The element or markup to use for this icon + * @param opt_options {H.map.DomIcon.Options=} + */ + constructor(element: (Element | string), opt_options?: H.map.DomIcon.Options); + } + + export module DomIcon { + /** + * Options used to initialize a DomIcon + * @property onAttach {function(Element, H.map.DomIcon, H.map.DomMarker)=} - A callback which is invoked before a clone of the icon's element is appended and displayed on the map. This callback can be used to setup the clone. + * @property onDetach {function(Element, H.map.DomIcon, H.map.DomMarker)=} - A callback which is invoked after a clone of the icon's element is removed from the map. This callback can be used to clean up the clone. + */ + export interface Options { + onAttach?: (el: Element, icon: H.map.DomIcon, marker: H.map.DomMarker) => void; + onDetach?: (el: Element, icon: H.map.DomIcon, marker: H.map.DomMarker) => void; + } + } + + /** + * A marker with a visual representation in the form of a full styleable and scripteable DOM element. DomMarker are predestinated if small amounts of markers with dynamic styled and/or scripted icons should be displayed om the map (e.g. animated interactive SVG). + */ + export class DomMarker extends H.map.AbstractMarker { + /** + * Constructor + * @param position {H.geo.IPoint} + * @param opt_options {H.map.DomMarker.Options=} + */ + constructor(position: H.geo.IPoint, opt_options?: H.map.DomMarker.Options); + } + + export module DomMarker { + /** + * Options used to initialize a DomMarker + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property icon {H.map.DomIcon=} - The icon to use for the visual representation, if omitted a default icon is used. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData + */ + export interface Options { + min?: number; + max?: number; + visibility?: boolean; + zIndex?: number; + provider?: H.map.provider.Provider; + icon?: H.map.DomIcon; + data?: any; + } + } + + /** + * This class represents a spatial shape in geographic space. It is defined by a path containing the vertices of the shape (lat, lng, alt values). + */ + export class GeoShape extends H.map.Spatial { + /** + * Constructor + * @param isClosed {boolean} - Indicates whether this geographical shape is closed (a polygon) + * @param strip {H.geo.Strip} - The strip describing the shape of the spatial object + * @param options {H.map.Spatial.Options} - The options to apply + */ + constructor(isClosed: boolean, strip: H.geo.Strip, options: H.map.Spatial.Options); + + /** + * This method returns the strip which represents the shape of the spatial object. + * @returns {H.geo.Strip} - the strip + */ + getStrip(): H.geo.Strip; + + /** + * This method sets the geo-information for the spatial object + * @param strip {?H.geo.Strip} - The strip which represents the shape of the spatial object. + * @returns {H.map.GeoShape} - the Spatial instance itself + */ + setStrip(strip: H.geo.Strip): H.map.GeoShape; + + /** + * This method returns the bounding rectangle for this object. The rectangle is the smallest rectangle which encloses all points of the spatial object. + * @returns {H.geo.Rect} + */ + getBounds(): H.geo.Rect; + } + + /** + * This class represents a map object which can contain other map objects. It's visibility, zIndex and object-order influences the contained map objects + */ + export class Group extends H.map.Object { + /** + * Constructor + * @param opt_options {H.map.Group.Options=} - an optional object containing initialization values + */ + constructor(opt_options?: H.map.Group.Options); + + /** + * + * @param callback {function(!H.map.Object, number, !H.map.Group)} + * @param opt_recursive {boolean=} - Indicates whether sub groups should be traversed recursively + * @param opt_context {*=} - The context to use as "this" within the callback + */ + forEach(callback: (object: H.map.Object, n: number, group: H.map.Group) => void, opt_recursive?: boolean, opt_context?: any): void; + + /** + * To get a list of all objects of this group. On groups with many chilren this method can cause a higher memory and CPU consumption. Alternatively you case use H.map.Group#forEach + * @param opt_recursive {boolean=} - Indicates whether objects in sub-groups are also collected . + * @returns {!Array} + */ + getObjects(opt_recursive?: boolean): Array; + + /** + * Method returns the bounding rectangle for the group. The rectangle is the smallest rectangle that covers all objects. If group doesn't contains objects method returns null. + * @returns {H.geo.Rect} - geo ractangle that covers all objects in the group + */ + getBounds(): H.geo.Rect; + + /** + * To add an object to this group. + * @param object {!H.map.Object} + * @returns {!H.map.Object} - a reference to the appended object + */ + addObject(object: H.map.Object): H.map.Object; + + /** + * Appends a list of objects to this group + * @param objects {Array} + */ + addObjects(objects: Array): void; + + /** + * Removes an object from this group. + * @param object {!H.map.Object} - The object to remove + * @returns {!H.map.Object} - a reference to the removed object + */ + removeObject(object: H.map.Object): H.map.Object; + + /** + * Removes objects from this group. + * @param objects {!Array} - The list of objects to remove + */ + removeObjects(objects: Array): void; + + /** + * Method removes all objects from the group. + */ + removeAll(): void; + } + + export module Group { + /** + * Options used to initialize a group + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property visibility {boolean=} - Indicates whether the map object is visible, default is true + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. + * @property objects {Array=} - A list of map objects to add initially to this group. + */ + export interface Options { + min?: number; + max?: number; + visibility?: boolean; + zIndex?: number; + provider?: H.map.provider.Provider; + data?: any; + objects?: Array; + } + } + + /** + * This class represents an area that objects, like a marker, occupies in the screen space, meaning that object can be probed and returned by H.Map@getObjectsAt method. + */ + export class HitArea { + /** + * Constructor + * @param shapeType {H.map.HitArea.ShapeType} - The shape type of the HitArea + * @param opt_values {Array=} - The type-dependent values to define the shape of the hit area. The format for the different types are: + */ + constructor(shapeType: H.map.HitArea.ShapeType, opt_values?: Array); + } + + export module HitArea { + /** + * Enumeration represents possible shape types that HitArea can have. + */ + export enum ShapeType { + NONE, + RECT, + CIRCLE, + POLYGON, + } + } + + /** + * Control interface defines method which are used for direct view or camera manipulation + */ + export interface IControl { + + /** + * This method starts control action for camera. This action allows to control camera animation and movement according to provided values in the H.map.IControl#control function + * @param opt_kinetics {H.util.kinetics.IKinetics=} - kinetics settings + * @param opt_atX {number=} - control starts at x screen coordinate + * @param opt_atY {number=} - control starts at y screen coordinate + */ + startControl(opt_kinetics?: H.util.kinetics.IKinetics, opt_atX?: number, opt_atY?: number): void; + + /** + * This method triggers single control action on engine. This will trigger an animation which will start modification of the view's or camera's properties according to values begin set. Modification will occur at every frame. The speed values are measure by 'levels per frame' were 1 level cooresponds to a distance to next zoom level. + * @param moveX {number} - moves the view/cam in right/left direction + * @param moveY {number} - moves the view/cam in bottom/top direction + * @param moveZ {number} - moves the view/cam in depth direction (changes zoom level) + * @param angleX {number} - rotates cam over x-axis + * @param angleY {number} - rotates cam over y-axis + * @param angleZ {number} - rotates cam over z-axis + * @param zoom {number} - changes current zoom level (for view works as moveZ) + * @param opt_timestamp {number=} + */ + control(moveX: number, moveY: number, moveZ: number, angleX: number, angleY: number, angleZ: number, zoom: number, opt_timestamp?: number): void; + + /** + * This method ends current control, which will stop ongoing animation triggered by the startControl method. This method can prevent kinetics as well as it can adjust the final view if the adjust function is being passed. + * @param opt_preventKinetics {boolean=} - if set to true will prevent kinetics animation + * @param opt_adjustView {function(H.map.ViewModel.CameraData)=} - user defined function which can adjust the final view this function takes last requestedData from the view model and should return a modified H.map.ViewModel.CameraData which will be set as the final view + */ + endControl(opt_preventKinetics?: boolean, opt_adjustView?: (data: H.map.ViewModel.CameraData) => void): void; + } + + /** + * An interface to specify a copyright note + * @property label {string} - A short textual representation of the copyright note, e.g. "DigitalGlobe 2009" + * @property alt {string} - A detailed textual representation of the copyright note, e.g. "copyright 2009 DigitalGlobe, Inc." + */ + export interface ICopyright { + label: string; + alt: string; + } + + /** + * Interface describes interaction with the view port. Interaction will reflect view change depending on the interaction coordinates passed and the modifiers which specify the type of interaction. + */ + export interface IInteraction { + /** + * This method starts the interaction with the view port. Should be called every time when new interaction is started i.e mouse grab, or touch start. + * @param modifiers {number} - a bitmask which specifies what operations should performed during every interaction + * @param opt_kinetics {H.util.kinetics.IKinetics=} - specifies kinetic move at the end of interaction + */ + startInteraction(modifiers: H.math.BitMask, opt_kinetics?: H.util.kinetics.IKinetics): void; + + /** + * This method resolves direct screen (view port) interaction. This function will modify the current view according to values passed in. + * @param x {number} - viewport x coordinate + * @param y {number} - viewport y coordinate + * @param opt_bx {number=} - x coordinate for second pointer/touch if present + * @param opt_by {number=} - y coordinate for secong pointer/touch if present + * @param opt_timestamp {number=} - known timestamp which should be passed + */ + interaction(x: number, y: number, opt_bx?: number, opt_by?: number, opt_timestamp?: number): void; + + /** + * This method ends interaction and applies kinetic movement if defined by using startInteraction method + * @param opt_preventKinetics {boolean=} - if set to true will prevent kinetics behaviour at the end of interaction + */ + endInteraction(opt_preventKinetics?: boolean): void; + } + + /** + * A visual representation of the H.map.Marker. + */ + export class Icon { + /** + * Constructor + * @param bitmap {!(string | HTMLImageElement | HTMLCanvasElement)} - Either an image URL, a SVG markup, an image or a canvas. + * @param opt_options {H.map.Icon.Options=} + */ + constructor(bitmap: (string | HTMLImageElement | HTMLCanvasElement), opt_options?: H.map.Icon.Options); + + /** + * Returns the icon's bitmap loading state + * @returns {H.map.Icon.prototype.State} + */ + getState(): H.map.Icon.State; + + /** + * Returns the bitmap of this icon or null if the bitmap is not ready yet (see H.map.Icon#getState) + * @returns {?(HTMLImageElement | HTMLCanvasElement)} + */ + getBitmap(): (HTMLImageElement | HTMLCanvasElement); + + /** + * Returns the size of this icon or null if a size wasn't specified in the constructor's options and the state of this icon is not H.map.Icon.prototype.State.READY + * @returns {?H.math.Size} + */ + getSize(): H.math.Size; + + /** + * Returns the anchor point of this icon or null if an anchor wasn't specified in the constructor's options and the state of this icon is not H.map.Icon.prototype.State.READY. + * @returns {?H.math.Point} + */ + getAnchor(): H.math.Point; + + /** + * Returns the hit area of the icon. + * @returns {?H.map.HitArea} - icon's anchor point + */ + getHitArea(): H.map.HitArea; + + /** + * This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible. + * @param type {string} - name of event + * @param handler {Function} - event handler function + * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) + * @param opt_scope {Object=} - scope for the handler function + */ + addEventListener(type: string, handler: Function, opt_capture?: boolean, opt_scope?: Object): void; + + /** + * This method will removed previously added listener from the event target + * @param type {string} - name of event + * @param handler {Function} - previously added event handler + * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) + * @param opt_scope {Object=} - scope for the handler function + */ + removeEventListener(type: string, handler: Function, opt_capture?: boolean, opt_scope?: Object): void; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + export module Icon { + /** + * The state types of an Icon + */ + export enum State { + ERROR, + LOADING, + READY, + } + + /** + * Options used to initialize a Icon + * @property size {H.math.ISize=} - The icon's size in pixel, default is the bitmap's natural size + * @property anchor {H.math.IPoint=} - The anchorage point in pixel, default is bottom-center + * @property hitArea {H.map.HitArea=} - The area to use for hit detection, default is the whole rectangular area + * @property asCanvas {H.map.HitArea=} - Indicates whether a non canvas bitmap is converted into a canvas, default is true. The conversion improves the rendering performance but it could also cause a higher memory consumption. + * @property crossOrigin {boolean} - Specifies whether to use anonynous Cross-Origin Resource Sharing (CORS) when fetching an image to prevent resulting canvas from tainting, default is false. The option is ignored by IE9-10. + */ + export interface Options { + size?: H.math.ISize; + anchor?: H.math.IPoint; + hitArea?: H.map.HitArea; + asCanvas?: H.map.HitArea; + crossOrigin: boolean; + } + } + + /** + * This class encapsulates the brand, copyright and terms of use elements on the map. + */ + export class Imprint { + /** + * Constructor + * @param map {H.Map} - The map where the imprint is attached to + * @param opt_options {H.map.Imprint.Options=} - The options to style the imprint + */ + constructor(map: H.Map, opt_options?: H.map.Imprint.Options); + + /** + * To set the imprint options. If no opt_options argument is defined then all values are reset to their defaults. + * @param opt_options {H.map.Imprint.Options=} - The options to style the imprint + */ + setOptions(opt_options?: H.map.Imprint.Options): void; + + /** + * This method retrieves the copyright string for the current view of the map. + * @returns {string} - The copyright string for the current map view + */ + getCopyrights(): string; + + /** + * To get the CSS style declaration of the imprint DOM element + * @returns {CSSStyleDeclaration} + */ + getStyle(): CSSStyleDeclaration; + + /** + * Method adds a callback which will be triggered when the object is disposed + * @param callback {Function} + * @param opt_scope {Object=} + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + + /** + * This method is used to capture the element view + * @param canvas {HTMLCanvasElement} - HTML Canvas element to draw the view of the capturable element + * @param pixelRatio {number} - The pixelRatio to use for over-sampling in cases of high-resolution displays, default is 1 + * @param callback {function(HTMLCanvasElement=)} - Callback function to call once result of the capturing is ready + * @param opt_errback {function(string)=} - Callback function to call if error occurred during capturing + */ + capture(canvas: HTMLCanvasElement, pixelRatio: number, callback?: (canvas: HTMLCanvasElement) => void, opt_errback?: (s: string) => void): void; + } + + export module Imprint { + /** + * Options to style an imprint + * @property invert {boolean=} - Indicates whether the logo is inverted. If omitted the current value remains, default is false. + * @property font {string=} - The font of the text. If omitted the current value remains, default is "11px Arial,sans-serif". + * @property href {string=} - The URL of the "Terms of use" link. If omitted the current value remains, default is "http://here.com/terms". + */ + export interface Options { + invert?: boolean; + font?: string; + href?: string; + } + } + + /** + * A marker with a visual representation in the form of a bitmap icon. Marker are predestinated if large amounts of markers with static icons should be displayed om the map. + */ + export class Marker extends H.map.AbstractMarker { + /** + * Constructor + * @param position {H.geo.IPoint} - The location of this marker + * @param opt_options {H.map.Marker.Options=} - The values to initialize this marker + */ + constructor(position: H.geo.IPoint, opt_options?: H.map.Marker.Options); + } + + export module Marker { + /** + * Options used to initialize a Marker + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property icon {H.map.Icon=} - The icon to use for the visual representation, if omitted a default icon is used. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. + */ + export interface Options { + min?: number; + max?: number; + visibility?: boolean; + zIndex?: number; + provider?: H.map.provider.Provider; + icon?: H.map.Icon; + data?: any; + } + } + + /** + * This class represents the abstract base class for map objects such as polylines, polygons, markers, groups etc. + */ + export class Object extends H.util.EventTarget { + /** + * Constructor + * @param opt_options {H.map.Object.Options=} - The values to initialize this object + */ + constructor(opt_options?: H.map.Object.Options); + + /** + * Returns the ID of this object. + * @returns {*} + */ + getId(): any; + + /** + * Sets the visibility of this object. + * @param opt_visibility {boolean=} - Indicates whether this map object should be visible. + * @returns {H.map.Object} - returns this object + */ + setVisibility(opt_visibility?: boolean): H.map.Object; + + /** + * Returns the visibility of this object. + * @param opt_effective {boolean=} - Indicates that the effective visibility is requested. In this case the visibility of all possible ancestor groups is also taken into account + * @returns {boolean} + */ + getVisibility(opt_effective?: boolean): boolean; + + /** + * Returns the z-index of this object. + * @returns {(number | undefined)} + */ + getZIndex(): number | void; + + /** + * To set the-index of this object. + * @param zIndex {(number | undefined)} + * @returns {H.map.Object} - returns this object + */ + setZIndex(zIndex?: number): H.map.Object; + + /** + * Compares two objects regarding their z-order, useful to sort a list of objects via Array's sort() method + * @param first {H.map.Object} - The first object to compare + * @param second {H.map.Object} - The second object to compare + * @returns {number} - If less then 0 the first object has a lower z-order. If equal 0 booth objects have the same z-order. If greater then 0 the first object has a higher z-order. + */ + static compareZOrder(first: H.map.Object, second: H.map.Object): number; + + /** + * Returns the parent group which contains this object or null if the object is not contained by any group. + * @returns {?H.map.Group} + */ + getParentGroup(): H.map.Group; + + /** + * The root object in which this object is attached or the object itself. + * @returns {!H.map.Object} + */ + getRootGroup(): H.map.Object; + + /** + * Checks whether the given object is an inclusive descendant of this object + * @param object {*} - The object that's being compared against. + * @returns {boolean} + */ + contains(object: any): boolean; + + /** + * The current provider of this object + * @returns {?H.map.provider.ObjectProvider} - the current provider + */ + getProvider(): H.map.provider.ObjectProvider; + + /** + * Returns the invalidations of this object + * @returns {H.map.provider.Invalidations} - an invalidation object + */ + getInvalidations(): H.map.provider.Invalidations; + + /** + * This method invalidates this map object. + * @param flags {H.math.BitMask} - The flags indicating the types of occurred changes + * @returns {boolean} - indicates whether a validtion was executed (only if the object has a provider) + */ + invalidate(flags: H.math.BitMask): boolean; + + /** + * This method returns previously stored arbitrary data from this object. + * @returns {*} - the previously stored data or undefined if not data was stored. + */ + getData(): any; + + /** + * This method stores arbitrary data with this map object + * @param data {*} - the data to be stored + * @returns {H.map.Object} - returns this map object instance + */ + setData(data: any): H.map.Object; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + export module Object { + /** + * Options used to initialize a map object + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. + */ + export interface Options { + min?: number; + max?: number; + visibility?: boolean; + zIndex?: number; + provider?: H.map.provider.Provider; + data?: any; + } + + /** + * The major types of map objects + */ + export enum Type { + /** spatial object */ + ANY, + /** spatial object */ + OVERLAY, + /** spatial object */ + SPATIAL, + /** Marker object */ + MARKER, + /** DomMarker object */ + DOM_MARKER, + /** DomMarker object */ + GROUP, + } + } + + /** + * This class represents an overlay, which offers a bitmap that covers a geographical reactangular area on the map. + */ + export class Overlay extends H.map.Object { + /** + * Constructor + * @param bounds {H.geo.Rect} - The geographical reactangular area of this overlay + * @param bitmap {!(string | HTMLImageElement | HTMLCanvasElement)} - Either an image URL, a SVG markup, an image or a canvas. + * @param opt_options {H.map.Overlay.Options=} - Optional values values to initialize this overlay + */ + constructor(bounds: H.geo.Rect, bitmap: (string | HTMLImageElement | HTMLCanvasElement), opt_options?: H.map.Overlay.Options); + + /** + * This method returns this overlay's current bounds. + * @returns {H.geo.Rect} + */ + getBounds(): H.geo.Rect; + + /** + * This method sets the overlay's current bounds. + * @param bounds {H.geo.Rect} + * @returns {H.map.Overlay} - the overlay itself + */ + setBounds(bounds: H.geo.Rect): H.map.Overlay; + + /** + * Returns this overlay's current bitmap. + * @returns {?(HTMLImageElement | HTMLCanvasElement)} - the bitmap of this Overlay or null if it isn't ready yet + */ + getBitmap(): (HTMLImageElement | HTMLCanvasElement); + + /** + * Sets the overlay's current bitmap. + * @param bitmap {!(string | HTMLImageElement | HTMLCanvasElement)} - Either an image URL, a SVG markup, an image or a canvas. + * @returns {H.map.Overlay} - the overlay itself + */ + setBitmap(bitmap: (string | HTMLImageElement | HTMLCanvasElement)): H.map.Overlay; + + /** + * Returns this overlay's current opacity. + * @returns {number} + */ + getOpacity(): number; + + /** + * Sets the overlay's current opacity. + * @param opacity {number} - The opacity in range from 0 (transparent) to 1 (opaque). + * @returns {H.map.Overlay} - the overlay itself + */ + setOpacity(opacity: number): H.map.Overlay; + } + + export module Overlay { + /** + * Options used to initialize an Overlay + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property opacity {number=} - The opacity of the object in range from 0 (transparent) to 1 (opaque), default is 1. + * @property visibility {boolean=} - Indicates whether the map object is visible at all, default is true. + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. + */ + export interface Options { + min?: number; + max?: number; + opacity?: number; + visibility?: boolean; + zIndex?: number; + provider?: H.map.provider.Provider; + data?: any; + } + } + + /** + * This class represents a polygon in geo-space. It is defined by a strip containing the vertices of a geo shape object (lat, lng, alt values) and a pen to use when rendering the polyline. Polygon represents a closed plane defined by the list of verticies, projected on the map display. List of vericies which define the polygon are is a list of geo coordinates encapsulated by the strip object H.geo.Strip + */ + export class Polygon extends H.map.GeoShape { + /** + * Constructor + * @param strip {H.geo.Strip} - the strip describing this polygon's vertices + * @param opt_options {H.map.Spatial.Options=} - optional initialization parameters + */ + constructor(strip: H.geo.Strip, opt_options?: H.map.Spatial.Options); + + /** + * To set the indicator whether this polygon covers the north pole. It's needed for Polygons whose strip is defined as lines arround the world on longitude axis (for example a circle whose center is one of the poles). In this case a additional information is needed to know if the southern or northern part of the world should be covered by the poygon. + * @param flag {boolean} - A value of true means it covers the north pole, false means south pole + * @returns {H.map.Polygon} - the Polygon instance itself + */ + setNorthPoleCovering(flag: boolean): H.map.Polygon; + + /** + * See H.map.Polygon#setNorthPoleCovering + * @returns {boolean} + */ + getNorthPoleCovering(): boolean; + } + + /** + * This class represents a polyline in geo-space. It is defined by a path containing the vertices of a polyline (lat, lng, alt values) and a pen to use when tracing the path on the map. + */ + export class Polyline extends H.map.GeoShape { + /** + * Constructor + * @param strip {H.geo.Strip} - the strip describing this polygon's vertices + * @param opt_options {H.map.Polyline.Options=} - optional initialization parameters + */ + constructor(strip: H.geo.Strip, opt_options?: H.map.Polyline.Options); + + /** + * This method clips this polyline against a rectangular area and returns the intersecting sub-lines. + * @param geoRect {H.geo.Rect} + * @returns {Array>} + */ + clip(geoRect: H.geo.Rect): Array>; + } + + export module Polyline { + /** + * Options which are used to initialize a polyline + * @property style {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - the style to be used when tracing the polyline + * @property arrows {(H.map.ArrowStyle | H.map.ArrowStyle.Options)=} - The arrows style to be used when rendering the polyline. + * @property visibility {boolean=} - An optional boolean value indicating whether this map object is visible, default is true + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData + */ + export interface Options { + style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options); + arrows?: (H.map.ArrowStyle | H.map.ArrowStyle.Options); + visibility?: boolean; + zIndex?: number; + min?: number; + max?: number; + provider?: H.map.provider.Provider; + data?: any; + } + } + + /** + * A Polygon with a rectangular shape. + */ + export class Rect extends H.map.Polygon { + /** + * Constructor + * @param bounds {H.geo.Rect} - The geographical bounding box for this rectangle + * @param opt_options {H.map.Spatial.Options=} + */ + constructor(bounds: H.geo.Rect, opt_options?: H.map.Spatial.Options); + + /** + * To set the bounds of this rectangle. + * @param bounds {H.geo.Rect} + */ + setBounds(bounds: H.geo.Rect): void; + } + + /** + * This class represents a spatial map object which provides its projected geometry. + */ + export class Spatial extends H.map.Object { + /** + * Constructor + * @param isClosed {boolean} - Indicates whether this spatial object represents a closed shape + * @param opt_options {H.map.Spatial.Options=} - The options to apply + */ + constructor(isClosed: boolean, opt_options?: H.map.Spatial.Options); + + /** + * To get the drawing style of this object. The returned style is treated as immutable and must not be modified afterwards to prevent inconsistancies! + * @returns {H.map.SpatialStyle} + */ + getStyle(): H.map.SpatialStyle; + + /** + * To set the drawing style of this object. If the passed opt_style argument is an instance of H.map.SpatialStyle it is treated as immutable and must not be modified afterwards to prevent inconsistancies! . + * @param opt_style {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - The style to set. If it evaluates to a falsy the H.map.SpatialStyle.DEFAULT_STYLE is used. + * @returns {H.map.Spatial} - the Spatial instance itself + */ + setStyle(opt_style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options)): H.map.Spatial; + + /** + * To get the arrow style of this spatial object or undefined if no style is defined. A returned arrow style is treated as immutable and must not be modified afterwards to prevent inconsistancies! + * @returns {(H.map.ArrowStyle | undefined)} + */ + getArrows(): H.map.ArrowStyle | void; + + /** + * To set the arrow style of this object. + * @param opt_arrows {(H.map.ArrowStyle | H.map.ArrowStyle.Options)=} - the arrow style to be applied + * @returns {H.map.Spatial} - the Spatial instance itself + */ + setArrows(opt_arrows?: (H.map.ArrowStyle | H.map.ArrowStyle.Options)): H.map.Spatial; + + /** + * Indicates whether this spatial object represents a closed shape + * @returns {boolean} + */ + isClosed(): boolean; + } + + export module Spatial { + /** + * Data to used as rendering hint for a label + * @property x {number} - The X coordinate of the first line's starting point + * @property y {number} - The Y coordinate of the first line's base line + * @property angle {number} - The clockwise rotation angle in radians + * @property font {string} - The CSS font-family + * @property size {number} - The CSS font-size + * @property color {string} - The CSS color + * @property text {string} - The text content, new line characters (\u000A) are interpreted as line breaks + */ + export interface Label { + x: number; + y: number; + angle: number; + font: string; + size: number; + color: string; + text: string; + } + + /** + * Options which are used to initialize spatial object object + * @property style {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - the style to be used when tracing the spatial object + * @property arrows {(H.map.ArrowStyle | H.map.ArrowStyle.Options)=} - The arrows style to be used when rendering the spatial. + * @property visibility {boolean=} - An optional boolean value indicating whether this map object is visible, default is true + * @property zIndex {number=} - The z-index value of the map object, default is 0 + * @property min {number=} - The minimum zoom level for which the object is visible, default is -Infinity + * @property max {number=} - The maximum zoom level for which the object is visible, default is Infinity + * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. + * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. + */ + export interface Options { + style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options); + arrows?: (H.map.ArrowStyle | H.map.ArrowStyle.Options); + visibility?: boolean; + zIndex?: number; + min?: number; + max?: number; + provider?: H.map.provider.Provider; + data?: any; + } + } + + /** + * The SpatialStyle class represents a style with which spatial objects like polylines and polygons are drawn. A SpatialStyle instance is always treated as immutable to avoid inconstiencies and must not modified. + * @property strokeColor {string} - The color of the stroke in CSS syntax, default is 'rgba(0, 85, 170, 0.6)'. + * @property fillColor {string} - The filling color in CSS syntax, default is 'rgba(0, 85, 170, 0.4)'. + * @property lineWidth {number} - The width of the line in pixels, default is 2. + * @property lineCap {H.map.SpatialStyle.LineCap} - The style of the end caps for a line, default is 'round'. + * @property lineJoin {H.map.SpatialStyle.LineJoin} - The type of corner created, when two lines meet, default is 'miter'. + * @property miterLimit {number} - The miter length is the distance between the inner corner and the outer corner where two lines meet. The default is 10. + * @property lineDash {Array} - The line dash pattern as an even numbered list of distances to alternately produce a line and a space. The default is [ ]. + * @property lineDashOffset {number} - The phase offset of the line dash pattern The default is 0. + * @property MAX_LINE_WIDTH {number} - This constant represents the maximum line width which can be used for rendering. + * @property DEFAULT_STYLE {H.map.SpatialStyle} - This static member defines the default style for spatial objects on the map. It's value is { strokeColor: '#05A', fillColor: 'rgba(0, 85, 170, 0.4)' lineWidth: 1, lineCap: 'round', lineJoin: 'miter', miterLimit: 10, lineDash: [ ], lineDashOffset: 0 } + */ + export class SpatialStyle { + /** + * Constructor + * @param opt_options {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - The optional style attributes + */ + constructor(opt_options?: (H.map.SpatialStyle | H.map.SpatialStyle.Options)); + + /** + * This method checks value-equality with another style. + * @param other {(H.map.SpatialStyle | H.map.SpatialStyle.Options)} - the style to compare with + * @returns {boolean} - true if the styles are value-equal, otherwise false + */ + equals(other: (H.map.SpatialStyle | H.map.SpatialStyle.Options)): boolean; + + /** + * Returns a copy of spatial style object and replaces the passed style attributes into it. + * @param opt_attributes {H.map.SpatialStyle.Options=} - The style attributes to set on the copied style instance + * @returns {H.map.SpatialStyle} + */ + getCopy(opt_attributes?: H.map.SpatialStyle.Options): H.map.SpatialStyle; + + strokeColor: string; + fillColor: string; + lineWidth: number; + lineCap: H.map.SpatialStyle.LineCap; + lineJoin: H.map.SpatialStyle.LineJoin; + miterLimit: number; + lineDash: Array; + lineDashOffset: number; + static MAX_LINE_WIDTH: number; + static DEFAULT_STYLE: H.map.SpatialStyle; + } + + export module SpatialStyle { + /** + * The style of the end caps for a line, one of 'butt', 'round' or 'square'. + */ + export type LineCap = 'butt' | 'round' | 'square'; + + /** + * The type of corner created, when two lines meet, one of 'round', 'bevel' or 'miter'. + */ + export type LineJoin = 'round' | 'bevel' | 'miter'; + + /** + * Options used to initialize a style. If a property is not set, the default value from H.map.SpatialStyle is taken. + * @property strokeColor {string=} - The color of the stroke in CSS syntax. + * @property fillColor {string=} - The color of the stroke in CSS syntax. + * @property lineWidth {number=} - The width of the line in pixels, default is 2. The maximum supported line width is 100. + * @property lineCap {H.map.SpatialStyle.LineCap=} - The style of the end caps for a line. + * @property lineJoin {H.map.SpatialStyle.LineJoin=} - The type of corner created, when two lines meet. + * @property miterLimit {number=} - The miter limit in pixel, default is 10. The maximum supported miter limit is 100 + * @property lineDash {Array} - The line dash pattern as an even numbered list of distances to alternately produce a line and a space. If the browser doesn't support this feature this style property is ignored. + * @property lineDashOffset {number=} - The phase offset of the line dash pattern + */ + export interface Options { + strokeColor?: string; + fillColor?: string; + lineWidth?: number; + lineCap?: H.map.SpatialStyle.LineCap; + lineJoin?: H.map.SpatialStyle.LineJoin; + miterLimit?: number; + lineDash?: Array; + lineDashOffset?: number; + } + } + + /** + * This class represents a view of the map. It consists of a virtual camera and a look-at point both of which have a position in geo-space and orientation angles. The view model allows to change the values of these objects in order to move or rotate the map or zoom in and out. + */ + export class ViewModel extends H.util.EventTarget implements H.map.IControl { + /** + * This method returns the camera data, which is currently rendered. + * @returns {H.map.ViewModel.CameraData} - the current rendered camera data + */ + getCameraData(): H.map.ViewModel.CameraData; + + /** + * This method sets new camera data to be processed by the renderer. + * @param data {H.map.ViewModel.CameraData} - the values to be modified + * @returns {H.map.ViewModel} - this view model object + */ + setCameraData(data: H.map.ViewModel.CameraData): H.map.ViewModel; + + /** + * This method sets a new zoom level to be processed by the renderer + * @param zoom {number} - the new zoom level + * @param animate {boolean} + */ + setZoom(zoom: number, animate: boolean): void; + + /** + * This method returns the zoom level that is currently rendered. + * @returns {number} - current zoom level (scale) + */ + getZoom(): number; + + /** + * This method returns the currently requested data. + * @returns {H.map.ViewModel.CameraData} - last requested cam/view data + */ + getRequestedCameraData(): H.map.ViewModel.CameraData; + + /** + * A method to signal the begin of a control operation. + * @param opt_kinetics {H.util.kinetics.IKinetics=} - kinetics settings + * @param opt_atX {number=} - x screen coordinate at which control has started + * @param opt_atY {number=} - y screen coordinate at which control has started + */ + startControl(opt_kinetics?: H.util.kinetics.IKinetics, opt_atX?: number, opt_atY?: number): void; + + /** + * A method to set the values for a continuously modification of the ViewModel on different axes. If the current render engine doesn't support certain modifications then they are ignored. + * @param moveX {number} - The movement on x-axis as levels per millisecond where a level correlates to the distance between camera and look-at point. + * @param moveY {number} - The movement on y-axis as levels per millisecond where a level correlates to the distance between camera and look-at point + * @param moveZ {number} - The movement on z-axis as levels per millisecond. + * @param angleX {number} - The rotation of on screen's x axis as degrees per millisecond. + * @param angleY {number} - The rotation of on screen's y axis as degrees per millisecond. + * @param angleZ {number} - The rotation of on screen's z axis as degrees per millisecond. + * @param opt_zoom {number=} - The modification of the zoom level as levels per millisecond + */ + control(moveX: number, moveY: number, moveZ: number, angleX: number, angleY: number, angleZ: number, opt_zoom?: number): void; + + /** + * A method to signal the end of a control operation. + * @param opt_preventKinetics {boolean=} - A flag to indicate whether a kinetic effect is performed + * @param opt_adjustView {function(H.map.ViewModel.CameraData)=} - An callback to adjust the final ViewModel by modifying the passed camera data. + */ + endControl(opt_preventKinetics?: boolean, opt_adjustView?: (data: H.map.ViewModel.CameraData) => void): void; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + export module ViewModel { + /** + * Defines camera's properties. + * @property zoom {number=} - zoom level to be used by rendering engine + * @property position {H.geo.IPoint} - the position of the virtual camera in geo-space + * @property pitch {number=} - the rotation of the virtual camera along its local x-axis + * @property yaw {number=} - the rotation of the virtual camera along its local y-axis + * @property roll {number=} - the rotation of the virtual camera along its local z-axis + * @property fov {number=} - + */ + export interface CameraData { + zoom?: number; + position: H.geo.IPoint; + pitch?: number; + yaw?: number; + roll?: number; + fov?: number; + } + + /** + * Defines currently requested view data, which will be rendered by the map. + * @property camera {H.map.ViewModel.CameraData=} - The requested camera properties + * @property zoom {number=} - The requested zoom level + * @property animate {boolean=} - indicates if the requested transition should be animated + */ + export interface RequestedData { + camera?: H.map.ViewModel.CameraData; + zoom?: number; + animate?: boolean; + } + + /** + * Update event is fired whenever view model data is changed. It contains property which hold currently requested data + * @property target {*} - Object which triggered the event + * @property currentTarget {*} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class UpdateEvent extends H.util.Event { + /** + * Constructor + * @param requested {H.map.ViewModel.RequestedData} + */ + constructor(requested: H.map.ViewModel.RequestedData); + + /** + * Sets defaultPrevented to true. Which can be used to prevent some default behavior. + */ + preventDefault(): void; + + /** + * Stops propagation for current event. + */ + stopPropagation(): void; + + target: any; + currentTarget: any; + type: string; + defaultPrevented: boolean; + } + } + + /** + * ViewPort object holds information about the HTML element where the map is rendered. It contains information regarding the element (view port) size and triggers events when the element size is changed. + * @property element {Element} - This property holds the HTML element, which defines the viewport. + * @property width {number} - This property holds this viewport's current width + * @property height {number} - This property holds this viewport's current height + * @property margin {number} - This property holds this viewport's current margin value + * @property padding {H.map.ViewPort.Padding} - This property holds this viewport's current padding + * @property center {H.math.Point} - This property holds this viewport's current center point + */ + export class ViewPort extends H.util.EventTarget implements H.map.IInteraction { + /** + * Constructor + * @param element {Element} - html element were map will be rendered + * @param opt_options {H.map.ViewPort.Options=} - optional configuration parameters + */ + constructor(element: Element, opt_options?: H.map.ViewPort.Options); + + /** + * This method sets the margin on the viewPort + * @param margin {number} - margin which is used to fetch map data + */ + setMargin(margin: number): void; + + /** + * This method sets the padding on the viewport. Padding will result in shifted map center which will be the visual center of the padded area. + * @param top {number} - padding from the top + * @param right {number} - padding from the right + * @param bottom {number} - padding from the bottom + * @param left {number} - padding from the left + */ + setPadding(top: number, right: number, bottom: number, left: number): void; + + /** + * This method updates size of the viewport according to container size. It must be called whenever the HTML element changed size in order to update the map's viewport values. + */ + resize(): void; + + /** + * This method starts the interaction with the view port. Should be called every time when new interaction is started i.e mouse grab, or touch start. + * @param modifiers {number} - a bitmask which specifies what operations should performed during every interaction + * @param opt_kinetics {H.util.kinetics.IKinetics=} - specifies kinetic move at the end of interaction + */ + startInteraction(modifiers: H.math.BitMask, opt_kinetics?: H.util.kinetics.IKinetics): void; + + /** + * This method resolves direct screen (view port) interaction. This function will modify the current view according to values passed in. + * @param x {number} - viewport x coordinate + * @param y {number} - viewport y coordinate + * @param opt_bx {number=} - x coordinate for second pointer/touch if present + * @param opt_by {number=} - y coordinate for secong pointer/touch if present + * @param opt_timestamp {number=} - known timestamp which should be passed + */ + interaction(x: number, y: number, opt_bx?: number, opt_by?: number, opt_timestamp?: number): void; + + /** + * This method ends interaction and applies kinetic movement if defined by using startInteraction method + * @param opt_preventKinetics {boolean=} - if set to true will prevent kinetics behaviour at the end of interaction + */ + endInteraction(opt_preventKinetics?: boolean): void; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + + element: Element; + width: number; + height: number; + margin: number; + padding: H.map.ViewPort.Padding; + center: H.math.Point; + } + + export module ViewPort { + /** + * Options which may be used to initialize new ViewPort instance + * @property margin {number=} - The size in pixel of the supplemental area to render for each side of the map + * @property padding {H.map.ViewPort.Padding=} - The padding in pixels for each side of the map + * @property fixedCenter {boolean=} - Indicates whether the center of the map should remain unchanged if the viewport's size or or padding has been changed, default is true + */ + export interface Options { + margin?: number; + padding?: H.map.ViewPort.Padding; + fixedCenter?: boolean; + } + + /** + * Represents viewport padding definition. + * @property top {number} - the padding on the top edge (in pixels) + * @property right {number} - the padding on the right edge (in pixels) + * @property bottom {number} - the padding on the bottom edge (in pixels) + * @property left {number} - the padding on the left edge (in pixels) + */ + export interface Padding { + top: number; + right: number; + bottom: number; + left: number; + } + } + + export module layer { + /** + * BaseTileLayer encapsulates funcitonailty that is common to all layers that deliver tiles, such as H.map.layer.TileLayer. The functionality includes geo bounding box to grid calculation, tile request management. + */ + export class BaseTileLayer extends H.map.layer.Layer { + /** + * Constructor + * @param provider {H.map.provider.TileProvider} - data source for the TileLayer + * @param opt_options {H.map.layer.ITileLayer.Options=} - additional options + */ + constructor(provider: H.map.provider.TileProvider, opt_options?: H.map.layer.ITileLayer.Options); + + /** + * This method returns the provider which feeds this layer with data. + * @returns {H.map.provider.TileProvider} - this layer's provider + */ + getProvider(): H.map.provider.TileProvider; + + /** + * This method transforms a geo-rectangle to geometrical projected rectangle at the current projection zoom level or at provided zoom level + * @param geoRect {H.geo.Rect} - geo bounds to be projected + * @param opt_zoom {number=} - overrides current projection zoom level + * @returns {H.math.Rect} - projected 2d space rect cooresponding to provided geo bounds + */ + geoRectToRect(geoRect: H.geo.Rect, opt_zoom?: number): H.math.Rect; + + /** + * This method returns tile grid for a bounding rectangle + * @param rectBounds {H.math.Rect} - projected rect bounds which coorespond to geo bounding box + * @param zoom {number} - current zoom level + * @returns {H.math.Rect} - rectangle which represents the tile grid bounds + */ + getTileBounds(rectBounds: H.math.Rect, zoom: number): H.math.Rect; + + /** + * This method requests a single tile according to tile coordinates. It returns either a Tile object if it is already loaded or undefined and starts loading the tile + * @param x {number} - tile row position + * @param y {number} - tile column position + * @param z {number} - The zoom level for which the tile is requested + * @param cacheOnly {boolean} - indicates whether only cached tiles are to be considered + * @returns {(H.map.provider.Tile | undefined)} - tile object corresponding to requested coordinates + */ + requestTile(x: number, y: number, z: number, cacheOnly: boolean): H.map.provider.Tile | void; + + /** + * This method cancels a previously requested tile. + * @param x {number} - tile row position + * @param y {number} - tile column position + * @param z {number} - zoom level + */ + cancelTile(x: number, y: number, z: number): void; + + /** + * This method requests tiles from the data source (provider). It can return a set of tiles which are currently loaded. All tiles which are not yet loaded will be included in response as soon as they will be available during subsequent calls. + * @param tileBounds {H.math.Rect} - bounds in tile grid + * @param isCDB {boolean} + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {H.map.layer.ITileLayer.Response} - returns an array if tile which are already loaded + */ + getProviderTiles(tileBounds: H.math.Rect, isCDB: boolean, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): H.map.layer.ITileLayer.Response; + } + + /** + * This interface describes a layer which provides marker objects to the renderer. + */ + export interface IMarkerLayer { + + /** + * This method requests marker objects for provided bounding rectangle. + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves + */ + requestMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + + /** + * This method requests dom marker objects for provided bounding rectangle. + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves + */ + requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + } + + export module IMarkerLayer { + /** + * This type represents a response object returned by the H.map.layer.IMarkerLayer#requestMarkers function. + * @property total {number} - The total number of markers, inclusive markers with not ready icons + * @property markers {Array} - The marker objects for the bounding rectangle (only ready) + */ + export interface Response { + total: number; + markers: Array; + } + + /** + * This type represents a response object returned by the H.map.layer.IMarkerLayer#requestMarkers function. + * @property number {number} - of returned tiles + * @property requested {number} - number of requested tiles + * @property objects {Array} - the marker objects within requested tiled area + */ + export interface TiledResponse { + number: number; + requested: number; + objects: Array; + } + } + + /** + * This interface describes a layer which provides data partitioned in quad-tree tiles in an x, y, z fashion (where z describes the level within the tree and x and y describe the absolute column and row indeces whithin the level). + */ + export interface ITileLayer { + /** + * This method requests tiles for the current bounding rectangle at the given zoom level (z-value). + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which tiles are to be returned + * @param zoomLevel {number} - The zoom level for which the tiles are requested + * @param cacheOnly {boolean} - Indicates whether only cached tiles are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {H.map.layer.ITileLayer.Response} - a response object containing the total number of tiles requested and the tile objects that could be immediately returned + */ + requestTiles(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): H.map.layer.ITileLayer.Response; + + /** + * This method requests a single tile according to tile coordinates. It returns either a Tile object if it is already loaded or undefined and starts loading the tile + * @param x {number} - tile row position + * @param y {number} - tile column position + * @param z {number} - The zoom level for which the tile is requested + * @param cacheOnly {boolean} - indicates whether only cached tiles are to be considered + * @returns {(H.map.provider.Tile | undefined)} - tile object corresponding to requested coordinates + */ + requestTile(x: number, y: number, z: number, cacheOnly: boolean): H.map.provider.Tile | void; + + /** + * This method cancels a previously requested tile. + * @param x {number} - tile row position + * @param y {number} - tile column position + * @param z {number} - zoom level + */ + cancelTile(x: number, y: number, z: number): void; + } + + export module ITileLayer { + /** + * Options which are used to initialize a TileLayer object. + * @property projection {H.geo.IProjection=} - an optional projection to be used for this layer, default is H.geo.mercator + * @property opacity {number=} - tile layer opacity, default is 1 + */ + export interface Options { + projection?: H.geo.IProjection; + opacity?: number; + } + + /** + * A response object for a tile request. Contains total number of elements requested and an array of currently available Tiles + * @property total {number} - the total number of requested tiles + * @property tiles {Array} - the tiles which this provider can currently return synchronously + */ + export interface Response { + total: number; + tiles: Array; + } + } + + /** + * The Layer class represents an object that is evaluated by the renderer in the order in which it is added to the layers collection. It provides the basic infrastructure for dispatching update events to the renderer in case new data is available. + */ + export class Layer extends H.util.EventTarget { + /** + * Constructor + * @param opt_options {H.map.layer.Layer.Options=} - optional configuration object + */ + constructor(opt_options?: H.map.layer.Layer.Options); + + /** + * This method checks if a zoom level can be served by this layer. + * @param zoomLevel {number} - the zoom level to check + * @returns {boolean} - true if this layer can provide data for the zoom level, otherwise false + */ + isValid(zoomLevel: number): boolean; + + /** + * This method sets the minimum zoom level for which this layer will provide tiles. + * @param min {number} - The new minimum zoom level of this layer + * @returns {H.map.layer.Layer} - Returns this instance of the layer + */ + setMin(min: number): H.map.layer.Layer; + + /** + * This method sets the maximum zoom level for which this layer will provide tiles. + * @param max {number} - The new maximum zoom level of this layer + * @returns {H.map.layer.Layer} - Returns this instance of the layer + */ + setMax(max: number): H.map.layer.Layer; + + /** + * This method returns the copyright of the current data provider. + * @param bounds {H.geo.Rect} - the bounding area for which to retrieve the copyright information + * @param level {number} - the zoom level for which to retrieve the copyright information + * @returns {Array} - a list of copyright information objects for the provided area and zoom level + */ + getCopyrights(bounds: H.geo.Rect, level: number): Array; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + export module Layer { + /** + * Options which can be used when creating new layer object. + * @property min {number=} - The minimum zoom level for which the layer can provide data, default is 0 + * @property max {number=} - The maximum zoom level for which the layer can provide data, default is 22 + * @property dark {boolean=} - Indicates whether the content of this layer is mainly dark, default is false See also H.Map.Options#autoColor + * @property projection {H.geo.IProjection=} - The projection to be used for this layer, default is H.geo.mercator + * @property minWorldSize {number=} - The minimal world size at zoom level 0, default is 256 + */ + export interface Options { + min?: number; + max?: number; + dark?: boolean; + projection?: H.geo.IProjection; + minWorldSize?: number; + } + } + + /** + * ObjectTileLayer represents map objects which are requested on a tile basis + */ + export class MarkerTileLayer extends H.map.layer.BaseTileLayer implements H.map.layer.IMarkerLayer { + /** + * Constructor + * @param provider {H.map.provider.MarkerTileProvider} + * @param opt_options {H.map.layer.ITileLayer.Options=} + */ + constructor(provider: H.map.provider.MarkerTileProvider, opt_options?: H.map.layer.ITileLayer.Options); + + /** + * This method requests marker objects for provided bounding rectangle. + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves + */ + requestMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + + /** + * This method requests dom marker objects for provided bounding rectangle. + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves + */ + requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + } + + /** + * This class represents a layer which renders map objects. Spatial objects like polygons and polylines a rendered to tiles before being passed to the enigne. Point objects like markers are provided as objects given an rectangular area. + */ + export class ObjectLayer extends H.map.layer.Layer implements H.map.layer.ITileLayer { + /** + * Constructor + * @param provider {H.map.provider.ObjectProvider} - the ObjectProvider which provides the map objects to this object layer. + * @param opt_options {H.map.layer.ObjectLayer.Options=} - The options for this layer + */ + constructor(provider: H.map.provider.ObjectProvider, opt_options?: H.map.layer.ObjectLayer.Options); + + /** + * This method returns current ObjectLayer's data provider + * @returns {H.map.provider.ObjectProvider} + */ + getProvider(): H.map.provider.ObjectProvider; + + /** + * To request overlay objects for the passsed bounding rectangle. It returns all overlay objects which are contained within this bounding rectangle. + * @param bounds {H.geo.Rect} - The bounding rectangle for which overlays are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {H.map.layer.ObjectLayer.OverlaysResponse} + */ + requestOverlays(bounds: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): H.map.layer.ObjectLayer.OverlaysResponse; + + /** + * This method requests tiles for the current bounding rectangle at the given zoom level (z-value). + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which tiles are to be returned + * @param zoomLevel {number} - The zoom level for which the tiles are requested + * @param cacheOnly {boolean} - Indicates whether only cached tiles are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {H.map.layer.ITileLayer.Response} - a response object containing the total number of tiles requested and the tile objects that could be immediately returned + */ + requestTiles(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): H.map.layer.ITileLayer.Response; + + /** + * This method requests a single tile according to tile coordinates. It returns either a Tile object if it is already loaded or undefined and starts loading the tile + * @param x {number} - tile row position + * @param y {number} - tile column position + * @param z {number} - The zoom level for which the tile is requested + * @param cacheOnly {boolean} - indicates whether only cached tiles are to be considered + * @returns {(H.map.provider.Tile | undefined)} - tile object corresponding to requested coordinates + */ + requestTile(x: number, y: number, z: number, cacheOnly: boolean): H.map.provider.Tile | void; + + /** + * This method cancels a previously requested tile. + * @param x {number} - tile row position + * @param y {number} - tile column position + * @param z {number} - zoom level + */ + cancelTile(x: number, y: number, z: number): void; + + /** + * This method requests marker objects for provided bounding rectangle. + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves + */ + requestMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + + /** + * This method requests dom marker objects for provided bounding rectangle. + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which marker are to be returned + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {(H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse)} - a response object containing the number of markers and the markers themselves + */ + requestDomMarkers(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): (H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse); + } + + export module ObjectLayer { + /** + * Configuration object which can be use to initialize the ObjectLayer. + * @property tileSize {number=} - the size of the tiles rendered by this layer for polylines and polygons (must be power of 2, default is 256) + * @property tileCacheSize {number=} - the number of fully rendered spatial tiles that are cached for immediate reuse, default is 32 + * @property dataCacheSize {number=} - the number of tiles to cache which have render data only, default is 512 + * @property pixelRatio {number=} - The pixelRatio to use for over-sampling in cases of high-resolution displays + */ + export interface Options { + tileSize?: number; + tileCacheSize?: number; + dataCacheSize?: number; + pixelRatio?: number; + } + + /** + * A response object returned by the H.map.layer.ObjectLayer#requestOverlays function. + * @property total {number} - The total number of overlays within the requested bounds, inclusive overlays which are not ready loaded yet + * @property overlays {Array} - A list all overlays which are ready to render + */ + export interface OverlaysResponse { + total: number; + overlays: Array; + } + } + + /** + * Tile Layer, represents data shown on map on a tile basis. Can be used to show map tile images or other type of data which is partitioned into tiles. + * @event update {H.util.Event} + */ + export class TileLayer extends H.map.layer.BaseTileLayer implements H.map.layer.ITileLayer { + /** + * Constructor + * @param provider {H.map.provider.TileProvider} - data source for the TileLayer + * @param opt_options {H.map.layer.ITileLayer.Options=} - additional options + */ + constructor(provider: H.map.provider.TileProvider, opt_options?: H.map.layer.ITileLayer.Options); + + /** + * This method requests tiles for the current bounding rectangle at the given zoom level (z-value). + * @param boundingRect {H.geo.Rect} - the bounding rectangle for which tiles are to be returned + * @param zoomLevel {number} - The zoom level for which the tiles are requested + * @param cacheOnly {boolean} - Indicates whether only cached tiles are to be considered + * @param prioCenter {H.math.Point} - The priority center as an offset in screen pixel relative to the center + * @returns {H.map.layer.ITileLayer.Response} - a response object containing the total number of tiles requested and the tile objects that could be immediately returned + */ + requestTiles(boundingRect: H.geo.Rect, zoomLevel: number, cacheOnly: boolean, prioCenter: H.math.Point): H.map.layer.ITileLayer.Response; + + update: H.util.Event; + } + } + + export module provider { + /** + * An ImageTileProvider uses network service to provide bitmap images as tiles. + * @property tileSize {number} - Size of a tile image supported by the provider + */ + export class ImageTileProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param options {H.map.provider.ImageTileProvider.Options} - configuration for tile provider + */ + constructor(options: H.map.provider.ImageTileProvider.Options); + + tileSize: number; + } + + export module ImageTileProvider { + /** + * Options to initialize an ImageTileProvider instance + * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. + * @property min {number=} - The minimal supported zoom level, default is 0 + * @property max {number=} - The maximal supported zoom level, default is 22 + * @property getCopyrights {(function(H.geo.Rect, number) : ?Array)=} - A function to replace the default implementation of H.map.provider.Provider#getCopyrights + * @property tileSize {number=} - The size of a tile as edge length in pixels. It must be 2^n where n is in range [0 ... 30], default is 256 + * @property getURL {function(number, number, number)} - The function to create an URL for the specified tile. If it returns a falsy the tile is not requested. + * @property crossOrigin {(string | boolean=)} - The CORS settings to use for the crossOrigin attribute for the image, if omitted or if the value evaluates to false no CORS settings are used. + */ + export interface Options { + uri?: string; + min?: number; + max?: number; + getCopyrights?: ((rect: H.geo.Rect, n: number) => Array); + tileSize?: number; + getURL: (n1: number, n2: number, n3: number) => string; + crossOrigin?: (string | boolean); + } + } + + /** + * This class represents invalidation states of a renderable object. A renderer can optimize its rendering strategies based on the information in this object. + * @property MARK_INITIAL {H.map.provider.Invalidations.Mark} - This constant represents the initial invalidation mark an invalidations object has. + */ + export class Invalidations { + + /** + * To update invalidation marks accordingly to the given the invalidation types. + * @param mark {H.map.provider.Invalidations.Mark} - The invalidation mark to set + * @param types {H.math.BitMask} - The descrete invalidation types to update + */ + update(mark: H.map.provider.Invalidations.Mark, types: H.math.BitMask): void; + + /** + * This method returns the current invalidation mark of this invalidations object. + * @returns {H.map.provider.Invalidations.Mark} - the current invalidation mark + */ + getMark(): H.map.provider.Invalidations.Mark; + + /** + * Checks whether any change occurred after the specified since mark + * @param since {H.map.provider.Invalidations.Mark} - The invalidation mark to check against + * @returns {boolean} + */ + isAny(since: H.map.provider.Invalidations.Mark): boolean; + + /** + * Checks whether a visual change occurred after the specified since mark + * @param since {H.map.provider.Invalidations.Mark} - The invalidation mark to check against + * @returns {boolean} + */ + isVisual(since: H.map.provider.Invalidations.Mark): boolean; + + /** + * Checks whether a spatial change occurred after the specified since mark + * @param since {H.map.provider.Invalidations.Mark} - The invalidation mark to check against + * @returns {boolean} + */ + isSpatial(since: H.map.provider.Invalidations.Mark): boolean; + + /** + * Checks whether an add-operation occurred after the specified since mark + * @param since {H.map.provider.Invalidations.Mark} - The invalidation mark to check against + * @returns {boolean} + */ + isAdd(since: H.map.provider.Invalidations.Mark): boolean; + + /** + * Checks whether a remove operation occurred after the specified since mark + * @param since {H.map.provider.Invalidations.Mark} - The invalidation mark to check against + * @returns {boolean} + */ + isRemove(since: H.map.provider.Invalidations.Mark): boolean; + + /** + * Checks whether a z-order change occurred after the specified since mark + * @param since {H.map.provider.Invalidations.Mark} - The invalidation mark to check against + * @returns {boolean} + */ + isZOrder(since: H.map.provider.Invalidations.Mark): boolean; + + static MARK_INITIAL: H.map.provider.Invalidations.Mark; + } + + export module Invalidations { + /** + * This enumeration encapsulates bit flags for different invalidations of map objects. + */ + export enum Flag { + NONE, + VISUAL, + SPATIAL, + ADD, + REMOVE, + Z_ORDER, + } + + /** + * The invalidation mark represents a counter which is increased whenever an invalidation takes place. + */ + export interface Mark { } + } + + /** + * A MarkerTileProvider uses network service to provide markers on tile basis. + * @property requestTile {} - Request data on a tile basis + * @property cancelTile {} - Cancels tile from being requested using x, y, z coordinates (column, row, zoom) + * @property cancelTileByKey {} - Cancels tile from being requested using a tile-key + * @property uri {string} - This provider's unique resource identifier, if not provided at construction time it defaults to provider's uid + * @property min {number} - Minimum zoom level at which provider can serve data, set at construction time + * @property max {number} - Maximum zoom level at which provider can server data, set at construction time + * @property uid {string} - Provider instance unique identifier, generated at construction time + */ + export class MarkerTileProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param options {H.map.provider.MarkerTileProvider.Options} - configuration for tile provider + */ + constructor(options: H.map.provider.MarkerTileProvider.Options); + + /** + * To signal to this provider that a map object has been changed. The method marks tile, that contains that object as invalid and triggers dispatchUpdate() + * @param marker {!H.map.AbstractMarker} - The map object to be invalidated + * @param flags {H.math.BitMask} - The flags indicating the types of occurred changes + */ + invalidateObject(marker: H.map.AbstractMarker, flags: H.math.BitMask): void; + + /** + * Checks whether this provider is currently providing H.map.DomMarker map objects. + * @returns {boolean} + */ + providesDomMarkers(): boolean; + } + + export module MarkerTileProvider { + /** + * Options which are used to initialize the MarkerTileProvider object. + * @property min {number=} - The minimal supported zoom level, default is 0 + * @property max {number=} - The maximal supported zoom level, default is 22 + * @property requestData {function(number, number, number, function(Array), Function) : H.util.ICancelable} - function that fetches marker data and creates array of H.map.AbstractMarker that is passed success callback, if function fails to fetch data onError callback must be called + * @property providesDomMarkers {boolean=} - indicates if markers provided are of type H.map.DomMarker or H.map.Marker, default is H.map.Marker + */ + export interface Options { + min?: number; + max?: number; + requestData: (n1: number, n2: number, n3: number, markerCallback: (markers: Array) => void, f: Function) => H.util.ICancelable; + providesDomMarkers?: boolean; + } + } + + /** + * An abstract class to manage and provide map objects (Marker, Polyline, Polygon) + */ + export class ObjectProvider extends H.map.provider.Provider { + /** + * Constructor + * @param opt_options {H.map.provider.Provider.Options=} + */ + constructor(opt_options?: H.map.provider.Provider.Options); + + /** + * Returns the accumulate invalidations of this provider's objects that have occurred. + * @param opt_type {H.map.Object.Type=} - The type of objects to consider for the invalidations. If undefined, all types are taken into account. + * @returns {H.map.provider.Invalidations} + */ + getInvalidations(opt_type?: H.map.Object.Type): H.map.provider.Invalidations; + + /** + * To signal to this provider that a map object has been changed. The method updates the Invalidations of this provider and the given map object and triggers dispatchUpdate() + * @param mapObject {!H.map.Object} - The map object to be invalidated + * @param changes {H.math.BitMask} - The flags indicating the types of occurred changes + */ + invalidateObject(mapObject: H.map.Object, changes: H.math.BitMask): void; + + /** + * Checks whether this provider is currently providing overlay map objects. A concrete implementation of ObjectProvider must override it if it currently provides overlays. + * @returns {boolean} + */ + providesOverlays(): boolean; + + /** + * Returns all Overlay objects which intersect with the provided area. + * @param geoRect {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestOverlays(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * Checks whether this provider is currently providing spatial map objects. A concrete implementation of ObjectProvider must override it if it currently provides Spatials. + * @returns {boolean} + */ + providesSpatials(): boolean; + + /** + * Returns all polyline, polygon, circle and rect objects which intersect with the provided area. + * @param geoRect {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestSpatials(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * Returns the spatial objects which intersect the given tile + * @param tile {H.map.provider.SpatialTile} - The tile for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestSpatialsByTile(tile: H.map.provider.Tile, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * Checks whether this provider is currently providing Marker map objects. A concrete implementation of ObjectProvider must override it if it currently provides Markers. + * @returns {boolean} + */ + providesMarkers(): boolean; + + /** + * Returns all Marker map objects which intersect with the provided rectangular area. + * @param geoRect {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestMarkers(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + + /** + * Checks whether this provider is currently providing DomMarker map objects. A concrete implementation of ObjectProvider must override it if it currently provides Markers. + * @returns {boolean} + */ + providesDomMarkers(): boolean; + + /** + * Returns all DomMarker map objects which intersect with the provided rectangular area. + * @param geoRect {H.geo.Rect} - A rectangular area in geo space to intersect with + * @param zoomLevel {number} - The zoom level for which the objects are requested + * @param visiblesOnly {boolean} - Indicates whether only invisible objects are to be considered + * @param cacheOnly {boolean} - Indicates whether only cached objects are to be considered + * @returns {Array} - a list of intersecting objects + */ + requestDomMarkers(geoRect: H.geo.Rect, zoomLevel: number, visiblesOnly: boolean, cacheOnly: boolean): Array; + } + + /** + * A Provider defines an object which works as a database for the map. Providers can exists in different forms they can implement client side object storage or they can request data from the remote service. + * @property uri {string} - This provider's unique resource identifier, if not provided at construction time it defaults to provider's uid + * @property min {number} - Minimum zoom level at which provider can serve data, set at construction time + * @property max {number} - Maximum zoom level at which provider can server data, set at construction time + * @property uid {string} - Provider instance unique identifier, generated at construction time + */ + export class Provider extends H.util.EventTarget { + /** + * Constructor + * @param opt_options {H.map.provider.Provider.Options=} + */ + constructor(opt_options?: H.map.provider.Provider.Options); + + /** + * This method returns the copyrights of the provided content for a certain geographical area at a specified zoom level. + * @param bounds {H.geo.Rect} - The bounding area for which to retrieve the copyright information + * @param level {number} - The zoom level for which to retrieve the copyright information + * @returns {?Array} - a list of copyright information objects for the provided area and zoom level + */ + getCopyrights(bounds: H.geo.Rect, level: number): Array; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + + uri: string; + min: number; + max: number; + uid: string; + } + + export module Provider { + /** + * Options to initialize a Provider instance + * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. + * @property min {number=} - The minimal supported zoom level, default is 0 + * @property max {number=} - The maximal supported zoom level, default is 22 + * @property getCopyrights {(function(H.geo.Rect, number) : ?Array)=} - A function to replace the default implementation of H.map.provider.Provider#getCopyrights + */ + export interface Options { + uri?: string; + min?: number; + max?: number; + getCopyrights?: (rect: H.geo.Rect, n: number) => Array; + } + } + + /** + * RemoteTileProvider is an abstract class which should be used by classes implementing data provision on a tile basis. Every child class needs to implement 'requestInternal' (to request remote tile) and 'getCache' (to provide configured cache object were tiled data is being cached) + */ + export class RemoteTileProvider extends H.map.provider.TileProvider { + /** + * Constructor + * @param options {H.map.provider.TileProvider.Options} - The options to instantiate this TileProvider + */ + constructor(options: H.map.provider.TileProvider.Options); + + /** + * This method returns cache which should be used to store tiles + * @returns {H.util.ICache} - cache + */ + getCache(): H.util.ICache; + + /** + * This method request tile from remote service + * @param x {number} - The row number of the tile + * @param y {number} - The column number of the tile + * @param z {number} - The zoom level for which the tile is requested + * @param onResponse {function((Array | HTMLImageElement | HTMLCanvasElement | ArrayBuffer | null), *=)} - function which is called after response arrives + * @param onError {function(string=)} - function which is called in case of communication error + * @param opt_priority {H.net.Request.Priority=} - optional request priority level + * @returns {H.util.ICancelable} + */ + requestInternal( + x: number, + y: number, + z: number, + + onResponse?: ( + object: Array | HTMLImageElement | HTMLCanvasElement | ArrayBuffer, + response: any + ) => void, + + onError?: (s: string) => void, + opt_priority?: H.net.Request.Priority + ): H.util.ICancelable; + + /** + * This method instructs the provider to reload data from it's source. + * @param hard {boolean} - a boolean flag indicating whether to invalidate in hard mode (true) or in soft mode (false); + */ + reload(hard: boolean): void; + } + + /** + * Generic Tile object which represents a part of the world fiting into the Tile area represented by the Tiel coordinates (x - row, y - column) and the zoom level (z). Number of tiles at particular zoom level (which means number of areas into world is being splitted) is defined as following: numberOfRows = numberOfColumns = 2^zoomlevel + * @property key {string} - Unique tile key generated by provider + * @property data {*} - Tile data (an image for example) + * @property valid {boolean} - This property holds a boolean flag indicating whether this tile is still valid (true) or whether it should be re-fetched (false) + * @property x {number} - Tile column + * @property y {number} - Tile row + * @property z {number} - Tile zoom level + */ + export class Tile { + /** + * Constructor + * @param x {number} - x tile coordinate (row) + * @param y {number} - y tile coordinate (column) + * @param z {number} - tile zoom level + * @param data {*} - generic data object which cooresponds to the given coordinates + */ + constructor(x: number, y: number, z: number, data?: any); key: string; + + data: any; + valid: boolean; + x: number; + y: number; + z: number; + } + + /** + * TileProvider is an abstract class to provide data on a tile basis + * @property requestTile {} - Request data on a tile basis + * @property cancelTile {} - Cancels tile from being requested using x, y, z coordinates (column, row, zoom) + * @property cancelTileByKey {} - Cancels tile from being requested using a tile-key + * @property uri {string} - This provider's unique resource identifier, if not provided at construction time it defaults to provider's uid + * @property min {number} - Minimum zoom level at which provider can serve data, set at construction time + * @property max {number} - Maximum zoom level at which provider can server data, set at construction time + * @property uid {string} - Provider instance unique identifier, generated at construction time + */ + export class TileProvider extends H.map.provider.Provider { + /** + * Constructor + * @param options {H.map.provider.TileProvider.Options} - The options to instantiate this TileProvider + */ + constructor(options: H.map.provider.TileProvider.Options); + + /** + * This method creates a tile object with given parameters + * @param x {number} - x tile coordinate (row) + * @param y {number} - y tile coordinate (column) + * @param z {number} - tile coordinate (zoom) + * @param data {(HTMLImageElement | HTMLCanvasElement)} - data for the tile + * @param opt_options {Object=} - free form options object. These options are meant to be used in tile specific rendering cases + * @returns {H.map.provider.Tile} + */ + createTileInternal(x: number, y: number, z: number, data: (HTMLImageElement | HTMLCanvasElement), opt_options?: { [key: string]: any }): H.map.provider.Tile; + + /** + * This method creates a tile key consisting of the provider's uri, and the tile's x, y and z coordinates, seperated by underscores e.g.: "4711_7_42_23" + * @param x {number} - The x tile coordinate (row) + * @param y {number} - The y tile coordinate (column) + * @param z {number} - The z tile coordinate (zoom level) + * @returns {string} - string + */ + getTileKey(x: number, y: number, z: number): string; + + requestTile: any; + cancelTile: any; + cancelTileByKey: any; + uri: string; + min: number; + max: number; + uid: string; + } + + export module TileProvider { + /** + * @property uri {string=} - The provider's unique resource identifier which must not contain an underscore "_". If omitted an auto-generated unique Session ID is used. If a cross sessions consistent IDs is needed (e.g. for storing provider data) this property must be specified. + * @property min {number=} - The minimal supported zoom level, default is 0 + * @property max {number=} - The maximal supported zoom level, default is 22 + * @property getCopyrights {(function(H.geo.Rect, number): Array)=} - A function to replace the default implememtation of H.map.provider.Provider#getCopyrights + * @property tileSize {number=} - The size of a tile as edge length in pixels. It must be 2^n where n is in range [0 ... 30], default is 256 + */ + export interface Options { + uri?: string; + min?: number; + max?: number; + getCopyrights?(rect: H.geo.Rect, number: number): Array; + tileSize?: number; + } + } + } + } + + /***** mapevents *****/ + export module mapevents { + /** + * Behavior class uses map events and adds behavior functionality to the map. This allows map panning and zooming via using mouse wheel + * @property DRAGGING {number} - Map responds to user dragging via mouse or touch + * @property WHEELZOOM {number} - Map zooms in or out in respond to mouse wheel events + * @property DBLTAPZOOM {number} - Map zooms in or out in response to double click or double tap. For double tap if more that one touches are on the screen map will zoom out. + */ + export class Behavior extends H.util.Disposable { + /** + * Constructor + * @param mapEvents {H.mapevents.MapEvents} - previously initialized map events instance + * @param options {H.mapevents.Behavior.Options} - additional options (i.e kinetics) + */ + constructor(mapEvents: H.mapevents.MapEvents, options?: H.mapevents.Behavior.Options); + + /** + * This method destroys all map interaction handling. Should be used when the behavior functionality is disposed. Behavior object will also be disposed (this function will be called) when attached H.mapevents.MapEvents object is dispose. + */ + dispose(): void; + + /** + * This method disables the behavior functionality for the map + * @param opt_behavior {number=} - The bitmask of behaviors to disable. If no arguments are passed, all behaviors will be disabled. + */ + disable(opt_behavior?: H.math.BitMask): void; + + /** + * This method re-enables the behavior functionality for the map. + * @param opt_behavior {number=} - The bitmask of behaviors to enable. If no arguments are passed, all behaviors will be enabled. + */ + enable(opt_behavior?: H.math.BitMask): void; + + /** + * This method checks if certain functionality is enabled + * @param behavior {number} - value like H.mapevents.Behavior.DRAGGING which the check is being performed + * @returns {boolean} + */ + isEnabled(behavior: number): boolean; + + static DRAGGING: number; + static WHEELZOOM: number; + static DBLTAPZOOM: number; + } + + export module Behavior { + /** + * Options which are used to initialize the Behavior class. + * @property kinetics {H.util.kinetics.IKinetics=} - The parameters for the kinetic movement. + * @property enable {number=} - The bitmask of behaviors to enable like H.mapevents.Behavior.DRAGGING. All are enabled by default. + */ + export interface Options { + kinetics?: H.util.kinetics.IKinetics; + enable?: H.math.BitMask; + } + } + + /** + * ContextMenuEvent should be fired, when a user right-clicks or longpresses on a map object. + * @property viewportX {Array} - Contains ContextItems, that will be used to create context menu entries. Should be filled by listeners of the "contextmenu" event + * @property viewportY {number} - Map viewport y position + * @property target {(H.map.Object | H.Map)} - Target for the event + * @property originalEvent {Event} - Original event + * @property currentTarget {(H.map.Object | H.Map)} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class ContextMenuEvent extends H.util.Event { + /** + * Constructor + * @param viewportX {number} - The x coordinate on the viewport + * @param viewportY {number} - The y coordinate on the viewport + * @param target {(H.Map | H.map.Object)} - The event's target element + * @param originalEvent {Event} - target of the event + */ + constructor(viewportX: number, viewportY: number, target: (H.Map | H.map.Object), originalEvent: Event); + + viewportX: Array; + viewportY: number; + originalEvent: Event; + } + + /** + * Custom map event. Contains list of pointers on the map, list of changed pointers and original event. Inherits from H.util.Event. + * @property pointers {Array} - Pointers which are currently on the screen + * @property changedPointers {Array} - Pointers which has changed in course of event + * @property targetPointers {Array} - Pointers which are on same target as the current pointer + * @property currentPointer {H.mapevents.Pointer} - Current pointer + * @property originalEvent {Event} - Original event fired by the browser + * @property target {(H.map.Object | H.Map)} - Object which triggered event. Can be the map object (i.e marker or polyline) or the map itself + * @property currentTarget {(H.map.Object | H.Map)} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class Event extends H.util.Event { + /** + * Constructor + * @param type {string} - type of event + * @param pointers {Array} - pointers which are currently on the screen + * @param changedPointers {Array} - pointers which changed during event + * @param targetPointers {Array} - pointers on the event target + * @param currentPointer {H.mapevents.Pointer} - pointer which triggered the event + * @param target {(H.Map | H.map.Object)} - target map object which triggered event + * @param originalEvent {Event} - original dom event + */ + constructor(type: string, pointers: Array, changedPointers: Array, targetPointers: Array, currentPointer: H.mapevents.Pointer, target: (H.Map | H.map.Object), originalEvent: Event); + + /** + * Sets defaultPrevented to true. Which can be used to prevent some default behavior. + */ + preventDefault(): void; + + /** + * Stops propagation for current event. + */ + stopPropagation(): void; + + pointers: Array; + changedPointers: Array; + targetPointers: Array; + currentPointer: H.mapevents.Pointer; + originalEvent: Event; + target: (H.map.Object | H.Map); + currentTarget: (H.map.Object | H.Map); + type: string; + defaultPrevented: boolean; + } + + /** + * MapEvents enable the events functionality on the map and on the map objects. By using this extension it is possible to listen to events on map objects like markers, polylines, polygons, circles and on the map object itself. Events are triggered depending on user interaction. Please check the Events Summary section for the list of events fired by this class and by the map objects. + */ + export class MapEvents extends H.util.Disposable { + /** + * Constructor + * @param map {H.Map} - map instance which is used for firing events + */ + constructor(map: H.Map); + + /** + * This method destroys the MapEvents by removing all handlers from the map object. After calling this function mapEvents and map objects will not trigger any events. This object will be disposed automatically if the corresponding map object is disposed. + */ + dispose(): void; + + /** + * This method returns map into which events are attached + * @returns {H.Map} + */ + getAttachedMap(): H.Map; + } + + /** + * Class representing pointer on the map surface. A pointer in platform specific definition would mean either mouse, touch, pen or any pointing device which can trigger browser events. + * @property viewportX {number} - X coordinate on the map's viewport + * @property viewportY {number} - Y coordinate on the map's viewport + * @property target {(H.map.Object | H.Map)} - Map object directly under the pointer. Can be null if if pointer is out of the map viewport + * @property id {number} - Pointer unique identifier. + * @property type {string} - Pointer type can be: 'mouse', 'touch' or 'pen' + * @property dragTarget {(H.map.Object | H.Map)} - Object which is currently dragged by the pointer + * @property button {H.mapevents.Pointer.Button} - Indicates which pointer device button has changed. + */ + export class Pointer { + /** + * Constructor + * @param viewportX {number} - pointer position on x-axis + * @param viewportY {number} - pointer position on y-axis + * @param id {number} - unique pointer identifier among currently available pointers + * @param type {string} - type of pointer can be i.e 'mouse', 'touch'. 'pen' + * @param opt_button {H.mapevents.Pointer.Button=} - Indicates which pointer device button has changed. + * @param opt_buttons {number=} - Indicates which pointer device buttons are being pressed, expressed as a bitmask. Uses the same values, as "buttons" in Pointer Events spec. + */ + constructor(viewportX: number, viewportY: number, id: number, type: string, opt_button?: H.mapevents.Pointer.Button, opt_buttons?: H.math.BitMask); + static viewportX: number; + static viewportY: number; + static target: (H.map.Object | H.Map); + static id: number; + static type: string; + static dragTarget: (H.map.Object | H.Map); + static button: H.mapevents.Pointer.Button; + } + + export module Pointer { + /** + * Types of a button + */ + export enum Button { + /** No button */ + NONE, + /** Left mouse button or touch contact or pen contact */ + LEFT, + /** Middle mouse button */ + MIDDLE, + /** Right mouse button or Pen barrel button */ + RIGHT, + } + + /** + * Indicates which pointer device buttons are being pressed, expressed as a bitmask. Bit values are: + * + * - 0: No button pressed + * - 1: Left mouse button pressed, or Touch contact or Pen contact + * - 2: Right mouse button pressed, or Pen contact with barrel button pressed + * - 4: Middle mouse button pressed + */ + // TODO not sure this is the right interpretation of the docs + export type Buttons = H.math.BitMask; + } + + /** + * WheelEvent is fired when the mouse wheel is used over the map. It contains information about cursor position and the map object which resides directly under the cursor. + * @property delta {number} - Wheel move delta + * @property viewportX {number} - Map viewport x position + * @property viewportY {number} - Map viewport y position + * @property target {(H.map.Object | H.Map)} - Target for the event + * @property originalEvent {Event} - Original mouse wheel event + * @property currentTarget {(H.map.Object | H.Map)} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class WheelEvent extends H.util.Event { + /** + * Constructor + * @param deltaY {number} - The wheel move delta on y-axis + * @param viewportX {number} - The x coordinate on the viewport + * @param viewportY {number} - The y coordinate on the viewport + * @param target {(H.Map | H.map.Object)} - The event's target element + * @param originalEvent {Event} - target of the event + */ + constructor(deltaY: number, viewportX: number, viewportY: number, target: (H.Map | H.map.Object), originalEvent: Event); + + delta: number; + viewportX: number; + viewportY: number; + originalEvent: Event; + } + } + + /***** math *****/ + export module math { + /** + * A signed 32 bit integer (JS restriction) where bit operator can be applied to. The range is [-2,147,483,648 ... 2,147,483,647] or [-2^31 ... 2^31 − 1] + */ + export type BitMask = number; + + /** + * An interface for a 2-dimensional point consisting a x and y coordinate. + * @property x {number} - The point's coordinate on X-axis. + * @property y {number} - The point's coordinate on Y-axis. + */ + export interface IPoint { + x: number; + y: number; + } + + /** + * An interface for a 2-dimensional size consisting a with and a height. + * @property w {number} - The size's width. + * @property h {number} - The size's height. + */ + export interface ISize { + w: number; + h: number; + } + + /** + * Class represents a 2-dimensional point, defined by x and y coordinates. + * @property x {number} - The point's coordinate on X-axis. + * @property y {number} - The point's coordinate on Y-axis. + */ + export class Point implements IPoint { + /** + * Constructor + * @param x {number} - The point's coordinate on X-axis. + * @param y {number} - The point's coordinate on Y-axis. + */ + constructor(x: number, y: number); + + /** + * Sets the x and y coordinate of this point + * @param x {number} - The point's coordinate on X-axis. + * @param y {number} - The point's coordinate on Y-axis. + */ + set(x: number, y: number): void; + + /** + * This method creates a copy of the current point. + * @param opt_out {H.math.Point=} - An optional point to store the copied values + * @returns {H.math.Point} - The clone of the point + */ + clone(opt_out?: Point): Point; + + /** + * This method adds given point coordinates to the current one. + * @param other {H.math.IPoint} - The point to add + * @returns {H.math.Point} - the point itself after adding + */ + add(other: IPoint): Point; + + /** + * This method subtracts given point coordinates from the current point. + * @param other {H.math.IPoint} - The point to subtract + * @returns {H.math.Point} - the point itself after subtracting + */ + sub(other: IPoint): Point; + + /** + * This method scales the current point coordinates by the given factor(s). + * @param factor {number} - multiplication factor + * @param opt_factorY {number=} - If omitted, the factor argument is used + * @returns {H.math.Point} - the point itself after scaling + */ + scale(factor: number, opt_factorY?: number): Point; + + /** + * This method rounds the x and y coordinates of the point. + * @returns {H.math.Point} - the point itself after rounding + */ + round(): Point; + + /** + * Rounds the x and y coordinates to the next smaller integer values. + * @returns {H.math.Point} - the point itself after flooring + */ + floor(): Point; + + /** + * Rounds the x and y coordinates to the next greater integer values. + * @returns {H.math.Point} - the point itself after ceiling + */ + ceil(): Point; + + /** + * This method compares current point coordinates with the supplied point coordinates. + * @param other {H.math.IPoint} - The point to compare to. + * @returns {boolean} - True if the points are equal + */ + equals(other: IPoint): boolean; + + /** + * Calculates the closest point on a given line + * @param start {H.math.IPoint} - The start point of the line + * @param end {H.math.IPoint} - The end point of the line + * @returns {H.math.IPoint} - the closest point + */ + getNearest(start: IPoint, end: IPoint): IPoint; + + /** + * This method calculates the distance to a point supplied by the caller. + * @param other {H.math.IPoint} + * @returns {number} + */ + distance(other: IPoint): number; + + /** + * This method creates a Point instance from a given IPoint object. + * @param iPoint {H.math.IPoint} - The IPoint object to use + * @returns {H.math.Point} - the created Point instance + */ + static fromIPoint(iPoint: IPoint): Point; + + x: number; + y: number; + } + + /** + * Class defines a rectangle in 2-dimensional geometric space. It is used to represent the area in projected space. + */ + export class Rect { + /** + * Constructor + * @param left {number} - The rectangle's left edge x value + * @param top {number} - The rectangle's top edge y value + * @param right {number} - The rectangle's right edge x value + * @param bottom {number} - The rectangle's bottom edge y value + */ + constructor(left: number, top: number, right: number, bottom: number); + + /** + * To set all values of the rectangle's edges + * @param left {number} - The rectangle's left edge x value + * @param top {number} - The rectangle's top edge y value + * @param right {number} - The rectangle's right edge x value + * @param bottom {number} - The rectangle's bottom edge y value + */ + set(left: number, top: number, right: number, bottom: number): void; + + /** + * To get the rectangle's top-left vertex + * @returns {H.math.Point} + */ + getTopLeft(): H.math.Point; + + /** + * To get the rectangle's bottom-right vertex + * @returns {H.math.Point} + */ + getBottomRight(): H.math.Point; + + /** + * Method checks if provided coordinates lie within rectangle. + * @param x {number} - x-coordinate to check + * @param y {number} - y-coordinate to check + * @returns {boolean} - returns true if coordinates lie within rectangle, if parameters are isNaN returns false + */ + containsXY(x: number, y: number): boolean; + + /** + * To create a rectangle from a top-left and bottom-right point pair. + * @param topLeft {H.math.IPoint} - the top-left vertex of the rectanle + * @param bottomRight {H.math.IPoint} - the bottom-right vertex of the rectanle + * @returns {H.math.Rect} - returns the rectangular area defined by the top-left and bottom-right vertices + */ + static fromPoints(topLeft: H.math.IPoint, bottomRight: H.math.IPoint): H.math.Rect; + + /** + * To clone a rectangle + * @returns {H.math.Rect} + */ + clone(): H.math.Rect; + } + + /** + * Class for representing sizes consisting of a width and height. + * @property w {number} - The size's width value + * @property h {number} - The size's height value + */ + export class Size { + /** + * Constructor + * @param width {number} - Width. + * @param height {number} - Height. + */ + constructor(width: number, height: number); + w: number; + h: number; + } + } + + /***** net *****/ + export module net { + export module Request { + export enum State { + DONE = 2, + OPENED = 1, + UNSENT = 0, + } + + // TODO no idea how this interface is set up, investigate + export interface Priority { } + } + } + + /***** places *****/ + + /***** service *****/ + export module service { + /** + * Abstract rest service class + */ + export class AbstractRestService implements H.service.IConfigurable { + /** + * Constructor + * @param opt_options {H.service.AbstractRestService.Options=} + */ + constructor(opt_options?: H.service.AbstractRestService.Options); + + /** + * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. + * @param appId {string} - The application ID to identify the client against the platform (mandatory to provide) + * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) + * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false + * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @returns {H.service.IConfigurable} + */ + configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; + } + + export module AbstractRestService { + export interface Options { + + } + } + + /** + * This class encapsulates Enterprise Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. H.service.Platform#getEnterpriseRoutingService. + */ + export class EnterpriseRoutingService extends H.service.AbstractRestService { + /** + * Constructor + * @param opt_options {H.service.EnterpriseRoutingService.Options=} + */ + constructor(opt_options?: H.service.EnterpriseRoutingService.Options); + + /** + * This method sends a "calculateroute" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occurred. + * @param calculateRouteParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + */ + calculateRoute(calculateRouteParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; + + /** + * This method sends a "getroute" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occurred. + * @param getRouteParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + */ + getRoute(getRouteParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; + + /** + * This method sends a "getlinkinfo" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * @param getLinkInfoParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + */ + getLinkInfo(getLinkInfoParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; + + /** + * This method sends a "calculateisoline" request to Enterprise Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occurred. + * @param calculateIsolineParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Enterprise Routing REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + */ + calculateIsoline(calculateIsolineParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; + } + + export module EnterpriseRoutingService { + /** + * @property subDomain {string=} - The sub-domain of the routing service relative to the platform's base URL (default is 'route') + * @property path {string=} - The path of the map tile service, default is "routing/7.2" + * @property baseUrl {H.service.Url=} - The base URL of the service, defaults to the the platform's base URL if instance was created using H.service.Platform#getEnterpriseRoutingService method. + */ + export interface Options { + subDomain?: string; + path?: string; + baseUrl?: H.service.Url; + } + } + + /** + * This class encapsulates the Geocoding REST API in a service stub with calls to its various resources implemented. + */ + export class GeocodingService extends H.service.AbstractRestService { + /** + * Constructor + * @param opt_options {H.service.GeocodingService.Options=} + */ + constructor(opt_options?: H.service.GeocodingService.Options); + + /** + * This method sends a reverse geocoding request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * @param geoodingParams {H.service.ServiceParameters} - the service parameters to be sent with the geocoding request. + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Geocoder REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + * @returns {H.service.JsonpRequestHandle} + */ + geocode(geoodingParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; + + /** + * This method sends a reverse geocoding request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * @param reverseGeocodingParams {H.service.ServiceParameters} - the service parameters to be sent with the reverse geocoding request + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Geocoder REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + * @returns {H.service.JsonpRequestHandle} + */ + reverseGeocode(reverseGeocodingParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; + + /** + * This method sends a landmark search request to Geocoder REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * @param searchParams {H.service.ServiceParameters} - the service parameters to be sent with the reverse geocoding request + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Geocoder REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + * @returns {H.service.JsonpRequestHandle} + */ + search(searchParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): H.service.JsonpRequestHandle; + } + + export module GeocodingService { + /** + * @property subDomain {string=} - the sub-domain of the geo-coding service relative to the platform's base URL, default is 'geocoder' + * @property path {string=} - the path of the Geocoding service, default is '6.2' + */ + export interface Options { + subDomain?: string; + path?: string; + } + } + + /** + * An interface represents an object, that can be configured credentials, settings etc. by H.service.Platform + */ + export interface IConfigurable { + /** + * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. + * @param appId {string} - The application ID to identify the client against the platform (mandatory to provide) + * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) + * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false + * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @returns {H.service.IConfigurable} + */ + configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; + } + + /** + * @property id {number} - the ID associated internally with this request + * @property cancel {function()} - this function cancels the request and invokes the errback function + */ + export interface JsonpRequestHandle { + id: number; + cancel: () => void; + } + + /** + * This class encapsulates a map tile end point of the HERE Map Tile API. + */ + export class MapTileService extends H.util.EventTarget implements H.service.IConfigurable { + /** + * Constructor + * @param opt_options {H.service.MapTileService.Options=} + */ + constructor(opt_options?: H.service.MapTileService.Options); + + /** + * This method returns the map tile type provided by this service. + * @returns {string} - the map tile type + */ + getType(): string; + + /** + * This method returns the map tile service's newest version hash. + * @returns {string} - meta information for this map tile service + */ + getVersion(): string; + + /** + * This method returns the map tile service's meta information. The method will return an object once the map tile service's data has been fetched. + * @returns {(H.service.MapTileService.Info | undefined)} - meta information for this map tile service + */ + getInfo(): H.service.MapTileService.Info | void; + + /** + * This method creates a tile provider which uses the specified map tiles. This provider can be used as a data source for an ImageTileLayer. + * @param tileType {string} - the tile type + * @param scheme {string} - the tile scheme + * @param tileSize {number} - the tile size + * @param format {string} - the tile image format + * @param opt_additionalParameters {H.service.ServiceParameters=} - a hash of additional parameters to be + * @param opt_options {H.service.TileProviderOptions=} - additional set of options for the provider + * @returns {H.map.provider.ImageTileProvider} - the image tile provider + */ + createTileProvider(tileType: string, scheme: string, tileSize: number, format: string, opt_additionalParameters?: H.service.ServiceParameters, opt_options?: H.service.TileProviderOptions): H.map.provider.ImageTileProvider; + + /** + * This method creates a tile layer. This layer can be used as a layer on a map's data model. + * @param tileType {string} - the tile type + * @param scheme {string} - the tile scheme + * @param tileSize {number} - the tile size + * @param format {string} - the tile image format + * @param opt_additionalParameters {H.service.ServiceParameters=} - Additional parameters for the map tile service + * @param opt_opacity {number=} - The opacity of this layer + * @param opt_dark {boolean=} - Indicates whether the content of this layer is mainly dark, default is false See also H.Map.Options#autoColor + * @param opt_options {H.service.TileProviderOptions=} - additional set of options for the provider + * @returns {H.map.layer.TileLayer} - the tile layer + */ + createTileLayer(tileType: string, scheme: string, tileSize: number, format: string, opt_additionalParameters?: H.service.ServiceParameters, opt_opacity?: number, opt_dark?: boolean, opt_options?: H.service.TileProviderOptions): H.map.layer.TileLayer; + + /** + * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. + * @param appId {string} - The application ID to identify the client against the platform (mandatory to provide) + * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) + * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false + * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @returns {H.service.IConfigurable} + */ + configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; + } + + export module MapTileService { + /** + * @property maps {Object} - + * @property schemes {Object} - + * @property tiletypes {Object} - + * @property formats {Object} - + * @property resolutions {Object} - + * @property languages {Object} - + */ + export interface Info { + maps: { [key: string]: any }; + schemes: { [key: string]: any }; + tiletypes: { [key: string]: any }; + formats: { [key: string]: any }; + resolutions: { [key: string]: any }; + languages: { [key: string]: any }; + } + + /** + * @property type {string=} - the type of the map tile service to communicate with, e.g. 'base' (default), 'aerial', etc. (refer to the Map Tile REST API documentation for available types) + * @property version {string=} - the map version hash to use for retrieving tiles, default is newest and will be automatically updated + * @property subDomain {string=} - the sub-domain of the map tile service relative to the platform's base URL, default is 'maps' + * @property path {string=} - the path of the map tile service, default is 'maptile/2.1' + */ + export interface Options { + type?: string; + version?: string; + subDomain?: string; + path?: string; + } + } + + /** + * A map type is an object holding tile layers corresponding to a map type (e.g. 'normal', 'satellite' or 'terrain'). A map type contains at least a map property which defines the basic map layer for a given map type. In addition it can hold other map layers with the given style, e.g. base, xbase, traffic etc. + * @property map {H.map.layer.TileLayer} - the basic map tiles with all features and labels + * @property mapnight {H.map.layer.TileLayer} - the basic map tiles with all features and labels (night mode) + * @property xbase {H.map.layer.TileLayer=} - map tiles without features and labels + * @property xbasenight {H.map.layer.TileLayer=} - map tiles without features and labels (night mode) + * @property base {H.map.layer.TileLayer=} - map tiles without labels + * @property basenight {H.map.layer.TileLayer=} - map tiles without labels (night mode) + * @property traffic {H.map.layer.TileLayer=} - map tiles with traffic flow highlighting + * @property trafficnight {H.map.layer.TileLayer=} - map tiles with traffic flow highlighting (night mode) + * @property transit {H.map.layer.TileLayer=} - map tiles with public transit lines highlighted + * @property panorama {H.map.layer.TileLayer=} - map tiles highlighting areas with HERE StreetLevel coverage + * @property panoramanight {H.map.layer.TileLayer=} - map tiles highlighting areas with HERE StreetLevel coverage (night mode) + * @property labels {H.map.layer.TileLayer=} - transparent map tiles with labels only + */ + export interface MapType { + map: H.map.layer.TileLayer; + mapnight: H.map.layer.TileLayer; + xbase?: H.map.layer.TileLayer; + xbasenight?: H.map.layer.TileLayer; + base?: H.map.layer.TileLayer; + basenight?: H.map.layer.TileLayer; + traffic?: H.map.layer.TileLayer; + trafficnight?: H.map.layer.TileLayer; + transit?: H.map.layer.TileLayer; + panorama?: H.map.layer.TileLayer; + panoramanight?: H.map.layer.TileLayer; + labels?: H.map.layer.TileLayer; + } + + /** + * Places service implements a low level places RestApi access. Please refer to Restful API documentation for providing parameters and handling response objects. + */ + export class PlacesService extends H.service.AbstractRestService { + /** + * Constructor + * @param opt_options {H.service.PlacesService.Options=} + */ + constructor(opt_options?: H.service.PlacesService.Options); + + /** + * This is generic method to query places RestAPI. + * @param entryPoint {string} - can be one of available entry points H.service.PlacesService.EntryPoint i.e value of H.service.PlacesService.EntryPoint.SEARCH + * @param entryPointParams {Object} - parameter map key value pairs will be transformed into the url key=value parametes. For entry point parameters description please refer to places restful api documentation documentation for available parameters for chose entry point + * @param onResult {Function} - callback which is called when result is returned + * @param onError {Function} - callback which is called when error occured (i.e request timeout) + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + request(entryPoint: string, entryPointParams: Object, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * Function triggers places api 'search' entry point. Please refer to documentation for parameter specification and response handling. + * @param searchParams {H.service.ServiceParameters} - places api search entry point parameters please refer to places api documentation + * @param onResult {Function} + * @param onError {Function} + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + search(searchParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * Function triggers places api 'suggestions' entry point. Please refer to documentation for parameter specification and response handling. + * @param suggestParams {H.service.ServiceParameters} - places api suggest entry point parameters please refer to places api documentation + * @param onResult {Function} + * @param onError {Function} + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + suggest(suggestParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * Function triggers places api 'explore' entry point. Please refer to documentation for parameter specification and response handling. + * @param exploreParams {H.service.ServiceParameters} - places api explore entry point parameters please refer to places api documentation + * @param onResult {Function} + * @param onError {Function} + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + explore(exploreParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * Function triggers places api 'around' entry point. Please refer to documentation for parameter specification and response handling. + * @param aroundParams {H.service.ServiceParameters} - places api around entry point parameters please refer to places api documentation + * @param onResult {Function} + * @param onError {Function} + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + around(aroundParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * Function triggers places api 'here' entry point. Please refer to documentation for parameter specification and response handling. + * @param hereParams {H.service.ServiceParameters} - places api here entry point parameters please refer to places api documentation + * @param onResult {Function} + * @param onError {Function} + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + here(hereParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * Function triggers places api 'categories' entry point. Please refer to documentation for parameter specification and response handling. + * @param categoriesParams {H.service.ServiceParameters} - places api here entry point parameters please refer to places api documentation + * @param onResult {Function} + * @param onError {Function} + * @returns {H.service.JsonpRequestHandle} - jsonp request handle + */ + categories(categoriesParams: H.service.ServiceParameters, onResult: Function, onError: Function): H.service.JsonpRequestHandle; + + /** + * This method should be used to follow hyperlinks available in results returned by dicovery queries. + * @param hyperlink {string} + * @param onResult {Function} + * @param onError {Function} + * @param opt_additionalParameters {Object=} - additional parameters to send with request + * @returns {H.service.JsonpRequestHandle} - jsonp resquest handle + */ + follow(hyperlink: string, onResult: Function, onError: Function, opt_additionalParameters?: Object): H.service.JsonpRequestHandle; + } + + export module PlacesService { + /** + * List of available entry points + */ + export enum EntryPoint { + SEARCH, + SUGGEST, + EXPLORE, + AROUND, + HERE, + CATEGORIES, + } + + /** + * @property subDomain {string=} - the sub-domain of the places service relative to the platform's base URL, default is 'places' + * @property path {string=} - the path of the places service, default is 'places/v1' + * @property baseUrl {H.service.Url=} - an optional base URL if it differs from the platform's default base URL + */ + export interface Options { + subDomain?: string; + path?: string; + baseUrl?: H.service.Url; + } + } + + /** + * The Platform class represents central class from which all other service stubs are created. It also contains the shared settings to be passed to the individual service stubs, for example the root URL of the platform, application credentials, etc. + */ + export class Platform { + /** + * Constructor + * @param options {H.service.Platform.Options} + */ + constructor(options: H.service.Platform.Options); + + /** + * Method attempts to configure object that implements H.service.IConfigurable + * @param configurable {H.service.IConfigurable} + * @returns {H.service.IConfigurable} + */ + configure(configurable: H.service.IConfigurable): H.service.IConfigurable; + + /** + * This method enables or disables HTTPS communication with the platform + * @param useHTTPS {boolean} - a boolean value indicating whether to communicate with the platform via HTTPS + */ + setUseHTTPS(useHTTPS: boolean): void; + + /** + * This method configures whether to use the "customer integration testing" instance of the platform. + * @param useCIT {boolean} - a boolean value indicating whether the CIT platform instance is to be used + */ + setUseCIT(useCIT: boolean): void; + + /** + * This method modifies the base URL to be used when creating service stubs. + * @param baseUrl {H.service.Url} - the new base URL to use + */ + setBaseUrl(baseUrl: H.service.Url): void; + + /** + * This method returns the currently used base URL. + * @returns {H.service.Url} + */ + getBaseUrl(): H.service.Url; + + /** + * This method returns an instance of H.service.TrafficIncidentsService to query the Traffic API Traffic Incident Data + * @returns {H.service.TrafficIncidentsService} - a new places service instance + */ + getTrafficIncidentsService(): H.service.TrafficIncidentsService; + + /** + * This method returns an instance of H.service.MapTileService to query the Map Tile API. + * @param opt_options {H.service.MapTileService.Options=} + * @returns {H.service.MapTileService} + */ + getMapTileService(opt_options?: H.service.MapTileService.Options): H.service.MapTileService; + + /** + * This method returns an instance of H.service.venues.Service to query the Venue Maps API + * @param opt_params {H.service.venues.Service.Options=} - additional service parameters + * @returns {H.service.venues.Service} + */ + getVenueService(opt_params?: H.service.venues.Service.Options): H.service.venues.Service; + + /** + * This method returns an instance of H.service.metaInfo.Service to query the Map Tile API Metainfo Tiles + * @param opt_params {H.service.metaInfo.Service.Options=} - additional service parameters + * @returns {H.service.metaInfo.Service} + */ + getMetaInfoService(opt_params?: H.service.metaInfo.Service.Options): H.service.metaInfo.Service; + + /** + * This method creates a pre-configured set of HERE tile layers for convenient use with the map. + * @param opt_tileSize {(H.service.Platform.DefaultLayersOptions | number)=} - When a number – optional tile size to be queried from the HERE Map Tile API, default is 256. If the parameter is an object, then it represents options and all remaining below parameters should be omitted. + * @param opt_ppi {number=} - optional 'ppi' parameter to use when querying tiles, default is not specified + * @param opt_lang {string=} - optional primary language parameter, default is not specified + * @param opt_secondaryLang {string=} - optional secondary language parameter, default is not specified + * @param opt_style {string=} - optional 'style' parameter to use when querying map tiles, default is not specified + * @param opt_pois {(string | boolean)=} - indicates if pois are displayed on the map. Pass true to indicate that all pois should be visible. Alternatively you can specify mask for the POI Categories as described at the Map Tile API documentation POI Categories chapter. + * @returns {Object} - a set of tile layers ready to use + */ + createDefaultLayers(opt_tileSize?: (H.service.Platform.DefaultLayersOptions | number), opt_ppi?: number, opt_lang?: string, opt_secondaryLang?: string, opt_style?: string, opt_pois?: (string | boolean)): H.service.Platform.MapTypes; + + /** + * This method returns an instance of H.service.RoutingService to query the Routing API. + * @param opt_options {H.service.RoutingService.Options=} + * @returns {H.service.RoutingService} + */ + getRoutingService(opt_options?: H.service.RoutingService.Options): H.service.RoutingService; + + /** + * This method returns an instance of H.service.GeocodingService to query the Geocoder API + * @param opt_options {H.service.GeocodingService.Options=} - an optional set of options for the new geocoding service to connect to + * @returns {H.service.GeocodingService} - a new geocoding service instance + */ + getGeocodingService(opt_options?: H.service.GeocodingService.Options): H.service.GeocodingService; + + /** + * This method returns an instance of H.service.PlacesService to query the Places API. + * @returns {H.service.PlacesService} - a new places service instance + */ + getPlacesService(): H.service.PlacesService; + + /** + * This method returns an instance of H.service.EnterpriseRoutingService to query the Enterprise Routing API. + * @param opt_options {H.service.EnterpriseRoutingService.Options=} + * @returns {H.service.EnterpriseRoutingService} + */ + getEnterpriseRoutingService(opt_options?: H.service.EnterpriseRoutingService.Options): H.service.EnterpriseRoutingService; + } + + export module Platform { + /** + * Options used to create default layers + * @property tileSize {number=} - tile size to be queried from the HERE Map Tile API, default is 256 + * @property ppi {number=} - 'ppi' parameter to use when querying tiles, default is not specified + * @property lg {string=} - optional primary language parameter, default is not specified + * @property lg2 {string=} - optional secondary language parameter, default is not specified + * @property style {string=} - optional 'style' parameter to use when querying map tiles, default is not specified + * @property pois {boolean=} - indicates if pois are displayed on the map + * @property crossOrigin {(string | boolean=)} - indicates if CORS headers should be used for default layers, if false is specified, CORS headers are not set, defaults to 'anonymous'. Be aware that storing of content is not possible if crossOrigin is not set to true (see H.Map#storeContent). + */ + export interface DefaultLayersOptions { + tileSize?: number; + ppi?: number; + lg?: string; + lg2?: string; + style?: string; + pois?: boolean; + crossOrigin?: (string | boolean); + } + + /** + * @property app_id {string} - The application ID to identify the client against the platform (mandatory to provide) + * @property app_code {string} - The application code to identify the client against the platform (mandatory to provide) + * @property baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com + * @property useCIT {boolean=} - Indicates whether the Customer Integration Testing should be used, default is false + * @property useHTTPS {boolean=} - Indicates whether secure communication should be used, default is false + */ + export interface Options { + app_id: string; + app_code: string; + baseUrl?: H.service.Url; + useCIT?: boolean; + useHTTPS?: boolean; + } + + /** + * pre-configured set of HERE tile layers for convenient use with the map. + */ + export interface MapTypes { + normal?: H.service.MapType; + satellite?: H.service.MapType; + terrain?: H.service.MapType; + [key: string]: H.service.MapType; + } + } + + /** + * This class encapsulates the Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. H.service.Platform#getRoutingService. + */ + export class RoutingService extends H.service.AbstractRestService { + /** + * Constructor + * @param opt_options {H.service.RoutingService.Options=} + */ + constructor(opt_options?: H.service.RoutingService.Options); + + /** + * This method sends a "calculateroute" request to Routing REST API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object - or the onError callback if a communication error occured. + * @param calculateRouteParams {H.service.ServiceParameters} - the service parameters to be sent with the routing request. + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Routing REST API provides a response to the request. + * @param onError {function(Error)} - this function will be called if a communication error occurs during the JSON-P request + */ + calculateRoute(calculateRouteParams: H.service.ServiceParameters, onResult: (result: H.service.ServiceResult) => void, onError: (error: Error) => void): void; + } + + export module RoutingService { + /** + * @property subDomain {string=} - the sub-domain of the routing service relative to the platform's base URL, default is 'route' + * @property path {string=} - the path of the map tile service, default is 'routing/7.2' + * @property baseUrl {H.service.Url=} - an optional base URL if it differs from the platform's default base URL + */ + export interface Options { + subDomain?: string; + path?: string; + baseUrl?: H.service.Url; + } + } + + /** + * This type encapsulates URL parameters to be sent to a HERE platform service. + */ + export interface ServiceParameters { + [key: string]: string; + } + + /** + * This type encapsulates a response object provider by a HERE platform service. + */ + export interface ServiceResult { + [key: string]: string; + } + + /** + * Options which are used to initialize the tile provider. + * @property crossOrigin {boolean=} - The string to be set for the crossOrigin attribute for loaded images + */ + export interface TileProviderOptions { + crossOrigin?: boolean; + } + + /** + * TrafficIncindentsService provides functionality to the low level traffic incidents api Traffic API documentation where it is possible to retrieve traffic incident information on a tile basis + */ + export class TrafficIncidentsService extends H.service.AbstractRestService { + /** + * Constructor + * @param opt_options {H.service.TrafficIncidentsService.Options=} + */ + constructor(opt_options?: H.service.TrafficIncidentsService.Options); + + /** + * This method requests traffic incidents based on the service parameters provided. + * @param serviceParams {H.service.ServiceParameters} + * @param onResponse {function(H.service.ServiceResult)} + * @param onError {function()} + * @returns {H.service.JsonpRequestHandle} + */ + requestIncidents(serviceParams: H.service.ServiceParameters, onResponse: (result: H.service.ServiceResult) => void, onError: () => void): H.service.JsonpRequestHandle; + + /** + * This method requests traffic incident information by tile coordinates + * @param x {number} - tile column number + * @param y {number} - tile row number + * @param z {number} - zoom level + * @param onResponse {function(H.service.ServiceResult)} - callback to handle service resposne + * @param onError {function()} - callback to habdle communication error + * @param opt_serviceParams {H.service.ServiceParameters=} - optional service parameters to be added to the request + * @returns {H.service.JsonpRequestHandle} + */ + requestIncidentsByTile(x: number, y: number, z: number, onResponse: (result: H.service.ServiceResult) => void, onError: () => void, opt_serviceParams?: H.service.ServiceParameters): H.service.JsonpRequestHandle; + } + + export module TrafficIncidentsService { + /** + * @property subDomain {string=} - the sub-domain of the traffic incidents service relative to the platform's base URL, default is 'traffic' + * @property path {string=} - the path of the traffic incidents service, default is 'traffic/6.1' + * @property baseUrl {H.service.Url=} - an optional base URL if it differs from the platform's default base URL + */ + export interface Options { + subDomain?: string; + path?: string; + baseUrl?: H.service.Url; + } + } + + /** + * This class represents a URL giving access to the individual parts that make up a URL,such as the scheme, host/domain, path, etc. Use the static parse method to populate a new URL object from a URL string. Be aware that URLs with user and password like "ftp://user:password@foo.bar/" are not supported! + */ + export class Url { + /** + * Constructor + * @param scheme {string} - the URL scheme (e.g. "http" or "https" or "mailto") + * @param host {string} - the host (or domain) part of the URL + * @param opt_path {string=} - the path following the host pointing to a resource + * @param opt_params {Object=} - the query string parameters of this URL + * @param opt_port {number=} - The port of the host on which the host listens. If a string is passed it must be convertible to an integer. + * @param opt_anchor {string=} - an optional anchor part of the URL (usually preceded by '#'); + */ + constructor(scheme: string, host: string, opt_path?: string, opt_params?: Object, opt_port?: number, opt_anchor?: string); + + /** + * This function parses a URL string and returns a H.service.Url object. The URL string must contain at least a scheme and a host. + * @param url {string} - The URL string to parse. + * @param opt_baseURL {string=} - The base URL to use to resolve relative URLs. If ommited the base URL of the document which loaded the API is taken. + * @returns {H.service.Url} - the parsed URL object + */ + static parse(url: string, opt_baseURL?: string): H.service.Url; + + /** + * Clones this URL object. Optionally, mutations can be passed to this function to modify properties of the cloned object. Note that URL parameters are not replaced but merged with the parameters of this instance. + * @returns {H.service.Url} - the clone of the URL object + */ + clone(): H.service.Url; + + /** + * This function sets the scheme of this URL object. + * @param scheme {string} - the new scheme + * @returns {H.service.Url} - this URL object + */ + setScheme(scheme: string): H.service.Url; + + /** + * This function returns the scheme of this Url object. + * @returns {string} - the scheme (for example 'http') + */ + getScheme(): string; + + /** + * This function sets the host of this URL object. + * @param host {string} - the new host + * @returns {H.service.Url} - this URL object + */ + setHost(host: string): H.service.Url; + + /** + * This function returns the host name of this Url object. + * @returns {string} - the host (for example 'api.here.com') + */ + getHost(): string; + + /** + * This function sets the path of this URL object. + * @param path {(string | undefined)} - the new path or a boolean to clear the path + * @returns {H.service.Url} - this URL object + */ + setPath(path: string | boolean): H.service.Url; + + /** + * This function returns the path part of this Url object. + * @returns {(string | undefined)} - the path (for example 'myresources/resource.html') + */ + getPath(): string | void; + + /** + * This function sets the specified parameters for this URL object. Keys in this object, which are associated with undefined values will be treated as query string parameters with no value. + * @param params {(Object | undefined)} - a hash of query string parameters specifying the parameters to be set.or a boolean to clear the parameters. + * @returns {H.service.Url} - this URL object + */ + setQuery(params?: Object | boolean): H.service.Url; + + /** + * This function returns a boolean value indicating whether there are any query string parameter associated with this URL. + * @returns {boolean} - true if there are parameters, false if none are present + */ + hasQuery(): boolean; + + /** + * This function returns the query object of this Url object. + * @returns {Object} - the query object + */ + getQuery(): Object; + + /** + * This function sets the anchor of this URL object. + * @param anchor {(string | boolean | undefined)} - the new anchor or undefined to clear the anchor + * @returns {H.service.Url} - this URL object + */ + setAnchor(anchor?: string | boolean): H.service.Url; + + /** + * This function returns the anchor of this Url object. + * @returns {(string | undefined)} - the anchor + */ + getAnchor(): string | void; + + /** + * This function merges the provided parameters into this URL's existing parameters. Key-value pairs which are defined in the argument and this URL's parameters will be overwritten. Key-value pairs which are defined in the argument and are not defined in this URL's parameters will be added. Prototype properties and function properties will not be merged. + * @param other {Object} - the parmeters to be merged into this URL's query string parameters + * @returns {H.service.Url} - this URL object + */ + mergeQuery(other: Object): H.service.Url; + + /** + * This function adds a sub-domain to the host of this URL object. + * @param subDomain {string} - the sub domain (non-empty string) to be added + * @returns {H.service.Url} - this URL object + */ + addSubDomain(subDomain: string): H.service.Url; + + /** + * This function adds a sub-path to this URL's path + * @param subPath {string} - the path to be added + * @returns {H.service.Url} - this URL object + */ + addSubPath(subPath: string): H.service.Url; + + /** + * This function formats this URL object to a full URL string. + * @returns {string} - the URL's string representation + */ + toString(): string; + } + + export module metaInfo { + /** + * This class encapsulates a Metainfo Tile end point of the HERE Map Tile API. + */ + export class Service extends H.util.EventTarget implements H.service.IConfigurable { + /** + * Constructor + * @param opt_options {H.service.metaInfo.Service.Options=} - additional service parameters + */ + constructor(opt_options?: H.service.metaInfo.Service.Options); + + /** + * This method returns the meta info tile service's newest version hash. + * @returns {string} - meta information for this map tile service + */ + getVersion(): string; + + /** + * This method returns the meta info tile service's meta information. The method will return an object once the map tile service's data has been fetched. + * @returns {(H.service.metaInfo.Service.Info | undefined)} - meta information for this meta info tile service + */ + getInfo(): H.service.metaInfo.Service.Info | void; + + /** + * This method creates a tile provider which uses the meta info tile backend. This provider can be used as a data source for an TileLayer. + * @param tileSize {number} - The tile size + * @param pixelRatio {number} - The tile's pixel ratio, should be aligned with base map tile + * @param opt_categoryFilter {Array=} - A list of meta-info category names which should be suppressed. See Metainfo Tile for valid category names. + * @param opt_additionalParameters {H.service.ServiceParameters=} - Additional parameters for the meta info service + * @param opt_tileType {string=} - the tile type (default is 'maptile') + * @param opt_scheme {string=} - the scheme for which the meta info tiles a requested (default is 'normal.day') + * @returns {H.map.provider.TileProvider} - the tile provider + */ + createTileProvider(tileSize: number, pixelRatio: number, opt_categoryFilter?: Array, opt_additionalParameters?: H.service.ServiceParameters, opt_tileType?: string, opt_scheme?: string): H.map.provider.TileProvider; + + /** + * This method creates a tile layer. This layer can be used as a layer on a map's data model. + * @param tileSize {number} - The tile size + * @param pixelRatio {number} - The tile's pixel ratio, should be aligned with base map tile + * @param opt_categoryFilter {Array=} - A list of meta-info category names which should be suppressed. See Metainfo Tile for valid category names. + * @param opt_additionalParameters {H.service.ServiceParameters=} - Additional parameters for the meta info service + * @param opt_tileType {string=} - the tile type (default is 'maptile') + * @param opt_scheme {string=} - the scheme for which the meta info tiles a requested (default is 'normal.day') + * @returns {H.map.layer.TileLayer} - the tile layer + */ + createTileLayer(tileSize: number, pixelRatio: number, opt_categoryFilter?: Array, opt_additionalParameters?: H.service.ServiceParameters, opt_tileType?: string, opt_scheme?: string): H.map.layer.TileLayer; + + /** + * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. + * @param appId {string} - The application ID to identify the client against the platform (mandatory to provide) + * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) + * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false + * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @returns {H.service.IConfigurable} + */ + configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; + } + + export module Service { + /** + * @property maps {Object} - + * @property schemes {Object} - + * @property tiletypes {Object} - + * @property formats {Object} - + * @property resolutions {Object} - + * @property languages {Object} - + */ + export interface Info { + maps: { [key: string]: any }; + schemes: { [key: string]: any }; + tiletypes: { [key: string]: any }; + formats: { [key: string]: any }; + resolutions: { [key: string]: any }; + languages: { [key: string]: any }; + } + + /** + * @property type {string=} - the type of the map tile service to communicate with, e.g. 'base' (default), 'aerial', etc. (refer to the Map Tile REST API documentation for available types) + * @property version {string=} - the map version hash to use for retrieving tiles, default is newest and will be automatically updated + * @property subDomain {string=} - the sub-domain of the map tile service relative to the platform's base URL, default is 'maps' + */ + export interface Options { + type?: string; + version?: string; + subDomain?: string; + } + } + + /** + * This class utilizes Metainfo Tiles functionality provided by the Map Tile API to load meta information about map objects (buildings, labels, public transport etc.). + */ + export class TileProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param service {(H.service.metaInfo.Service | H.service.MapTileService)} - the tile service which holds information from about the source of the tiles + * @param opt_params {H.service.ServiceParameters=} - an additional set of URL parameters + * @param opt_options {H.service.metaInfo.TileProvider.Options=} - additional parameters + */ + constructor(service: (H.service.metaInfo.Service | H.service.MapTileService), opt_params?: H.service.ServiceParameters, opt_options?: H.service.metaInfo.TileProvider.Options); + } + + export module TileProvider { + /** + * Configuration object which can be used to initialize the TileProvider. + * @property tileType {string=} - The tile type for which to request meta info + * @property scheme {string=} - The map scheme for which to request meta info + * @property tileCacheSize {number=} - The number of fully rendered spatial tiles that are cached for immediate reuse, default is 32 + * @property tileSize {number=} - The size of the tiles rendered by this provider (must be power of 2, default is 256) + * @property pixelRatio {number=} - The pixel ratio to use for over-sampling in cases of high-resolution displays + * @property categoryFilter {Array=} - A list of meta-info category names which should be suppressed. See Metainfo Tile for valid category names. + */ + export interface Options { + tileType?: string; + scheme?: string; + tileCacheSize?: number; + tileSize?: number; + pixelRatio?: number; + categoryFilter?: Array; + } + } + } + + export module venues { + /** + * The class represents the building in the venue hiearachy (see H.service.venues.Venue) and holds floors that belong to the building. + */ + export class Building extends H.map.Group { + /** + * Constructor + * @param provider {H.map.provider.ObjectProvider} - The object provider of this venue building + * @param uid {string} - The unique identifier of this building + * @param minLevel {number} - The minimum floor level of this building + * @param maxLevel {number} - The maximum floor level of this building + */ + constructor(provider: H.map.provider.ObjectProvider, uid: string, minLevel: number, maxLevel: number); + + /** + * Method returns the parent object - venue (see H.service.venues.Venue) to which the building belongs to. + * @returns {H.service.venues.Venue} + */ + getVenue(): H.service.venues.Venue; + + /** + * Method returns the minimum floor level of this building. + * @returns {number} + */ + getMinLevel(): number; + + /** + * Method returns the maximum floor level of this building + * @returns {number} + */ + getMaxLevel(): number; + + /** + * Method returns the floor (see H.service.venues.Floor) if one was already loaded. This method doesn't make attempt to fetch the floor data. + * @param level {number} - floor level within minimum and maximum level boundaries for the building + * @returns {(H.service.venues.Floor | undefined)} - The floor object or undefined if floor was not loaded + */ + getFloor(level: number): H.service.venues.Floor | void; + } + + /** + * The class represents the floor object in the venue hierarchy (see H.service.venues.Venue). The class holds information about floor geometry and spaces (see H.service.venues.Space) that belong to this floor. + */ + export class Floor extends H.map.Group { + /** + * Constructor + * @param provider {H.map.provider.ObjectProvider} - The object provider of this venue floor + * @param data {*} - The meta data of this floor + * @param level {number} - The level of this floor + */ + constructor(provider: H.map.provider.ObjectProvider, data: any, level: number); + + /** + * Method returns the level of the floor in the building. + * @returns {number} + */ + getLevel(): number; + + /** + * Method returns map geometry that represents floor boundaries. + * @returns {(H.service.venues.Space | undefined)} + */ + getFloorSpace(): H.service.venues.Space | void; + + /** + * Method returns the H.map.Group of all spaces that belong to the floor. + * @returns {H.map.Group} + */ + getSpaces(): H.map.Group; + + /** + * Method returns parent object - building (see H.service.venues.Building) of the floor. + * @returns {H.service.venues.Building} + */ + getBuilding(): H.service.venues.Building; + + /** + * Method returns raw data associated with the floor. For more details on data format see http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-floor.html + * @returns {*} - the raw floor data object + */ + getData(): any; + + /** + * Method returns the space object with the given ID, that belongs to the floor. + * @param id {string} - The ID of the space. + * @returns {(H.service.venues.Space | undefined)} - The requested space or undefined if space not found. + */ + getSpace(id: string): H.service.venues.Space | void; + } + + /** + * This class encapsulates methods to call Venue Maps API endpoints. + */ + export class Service extends H.util.EventTarget implements H.service.IConfigurable { + /** + * Constructor + * @param opt_options {H.service.venues.Service.Options=} - additional service parameters + */ + constructor(opt_options?: H.service.venues.Service.Options); + + /** + * This method sends a discovery request to the Venue Maps API and calls the onResult callback function once the service response was received - providing a H.service.ServiceResult object, or the onError callback if a communication error occured. + * @param serviceParams {H.service.ServiceParameters} - the service parameters to be sent with the discovery request + * @param onResult {function(H.service.ServiceResult)} - this function will be called once the Venue Maps API provides a response to the request + * @param onError {function(string)} - this function will be called if a communication error occurs during request and error type is passed as an argument + */ + discover(serviceParams: H.service.ServiceParameters, onResult: (res: H.service.ServiceResult) => void, onError: (s: string) => void): void; + + /** + * This method creates a tile layer which can be added to the map in order to see the venues. It uses Interaction Tile endpoint of the Venue Maps API, more at http://developer.here.com/rest-apis/documentation/venue-maps/topics/quick-start-get-interaction-tile.html. + * @param opt_options {H.service.venues.TileProvider.Options=} - Tile provider options + * @returns {H.map.layer.TileLayer} - the tile layer + */ + createTileLayer(opt_options?: H.service.venues.TileProvider.Options): H.map.layer.TileLayer; + + /** + * Method returns current state of the service. + * @returns {H.service.venues.Service.State} - State of the service + */ + getState(): H.service.venues.Service.State; + + /** + * This methods receive configuration parameters from the platform, that can be used by the object implementing the interface. + * @param appId {string} - The application ID to identify the client against the platform (mandatory to provide) + * @param appCode {string} - The application code to identify the client against the platform (mandatory to provide) + * @param useHTTPS {boolean} - Indicates whether secure communication should be used, default is false + * @param useCIT {boolean} - Indicates whether the Customer Integration Testing should be used, default is false + * @param opt_baseUrl {H.service.Url=} - The base URL of the platform, default is http://api.here.com. Note that if useHTTPS flag is passed it will override the URL scheme specified in the opt_baseUrl to use HTTPS. + * @returns {H.service.IConfigurable} + */ + configure(appId: string, appCode: string, useHTTPS: boolean, useCIT: boolean, opt_baseUrl?: H.service.Url): H.service.IConfigurable; + } + + export module Service { + /** + * @property subDomain {string=} - the sub-domain of the Venue Maps service relative to the platform's base URL, default is 'venue.maps' + * @property path {string=} - the path to append after host name when making requests to the Venue Maps API, default is empty + */ + export interface Options { + subDomain?: string; + path?: string; + } + + /** + * The state types of the H.service.venues.Service. Possible states are: + */ + export enum State { + ERROR, + INIT, + READY, + } + } + + /** + * Represents a spatial object for this space. Each space object contains data associated with that space and can be retrieved by using H.service.venues.Space#getData method. + */ + export class Space { + /** + * Constructor + * @param provider {H.map.provider.ObjectProvider} - The provider of this object. + * @param uid {string} - The unique identifier of this space + * @param data {*} - The meta data of this space + * @param opt_isFloorSpace {boolean=} - Indicates whether this space represents a floor itself, defaults to false + */ + constructor(provider: H.map.provider.ObjectProvider, uid: string, data?: any, opt_isFloorSpace?: boolean); + + /** + * The method indicates whether the spatial object represents the whole floor space or a space within a floor boundaries, that belongs to the floor. + * @returns {boolean} - True if this spatial object represents the floor space. + */ + isFloorSpace(): boolean; + + /** + * This method sets custom style to use for rendering the labels. Should be called before the first render of the space, otherwise has no any effect. Note that due to the design consistency currently it is not allowed to change the font family and the size of the labels. + * @param labelStyle {(H.map.SpatialStyle | H.map.SpatialStyle.Options)} - Custom label style + */ + initLabelStyle(labelStyle: (H.map.SpatialStyle | H.map.SpatialStyle.Options)): void; + + /** + * Method returns parent object - floor (see H.service.venues.Floor) of the space. + * @returns {H.service.venues.Floor} + */ + getFloor(): H.service.venues.Floor; + + /** + * Method returns raw data associated with the space. For more details on data format see http://developer.here.com/rest-apis/documentation/venue-maps/topics/resource-type-venue-interaction-tile-space.html + * @returns {Object} - raw space data object + */ + getData(): Object; + } + + /** + * This class represents a Venue Maps tile provider which requests venues tiles from a platform venue tile service. + */ + export class TileProvider extends H.map.provider.RemoteTileProvider { + /** + * Constructor + * @param service {H.service.venues.Service} + * @param opt_options {H.service.venues.TileProvider.Options=} + */ + constructor(service: H.service.venues.Service, opt_options?: H.service.venues.TileProvider.Options); + + /** + * Method specifies which floor level of the venues must be fetched by provider. Floor level is global to all venues and defaults to 0. + * @param level {number} + */ + setCurrentLevel(level: number): void; + + /** + * Method returns the floor level that provider uses for tile fetching. + * @returns {number} - current provider's floor level + */ + getCurrentLevel(): number; + } + + export module TileProvider { + /** + * Configuration object which can be used to initialize the TileProvider. + * @property tileCacheSize {number=} - The number of fully rendered spatial tiles that are cached for immediate reuse, default is 32 + * @property pixelRatio {number=} - The pixel ratio to use for over-sampling in cases of high-resolution displays + * @property onSpaceCreated {function(H.service.venues.Space)=} - A callback function that is called on every created space (see H.service.venues.Space) object. The function can be used for space object styling. + */ + export interface Options { + tileCacheSize?: number; + pixelRatio?: number; + onSpaceCreated?: (space: H.service.venues.Space) => void; + } + } + + /** + * The class represents the venue, it is a root for the venue object heirarchy. The venue inherits from H.map.Group and holds building objects (see H.service.venues.Building). Building objects hold floor objects (see H.service.venues.Floor) and inherit from H.map.Group as well. Leaf objects are spaces (see H.service.venues.Space) that are spatial map objects and reside inside floor containers. + */ + export class Venue extends H.map.Group { + /** + * Constructor + * @param provider {H.map.provider.ObjectProvider} - The object provider of this venue + * @param uid {string} - The unique identifier of this venue + */ + constructor(provider: H.map.provider.ObjectProvider, uid: string); + + /** + * Method returns the building object, that belongs to the venue, with the given ID . The method doesn't attempt to fetch building data. + * @param id {string} - the ID of the building + * @returns {(H.service.venues.Building | undefined)} - The requested building or undefined if building wasn't loaded + */ + getBuilding(id: string): H.service.venues.Building | void; + + /** + * Method returns map of all loaded buildings associated with the venue. + * @returns {Object<*, H.service.venues.Building>} + */ + getBuildings(): any; + } + } + } + + /***** ui *****/ + export module ui { + /** + * This class represents the base class for UI controls on the map. + */ + export class Control extends H.ui.base.Container { + /** + * This abstract method can be overridden by deriving classes to be invoked when the UI object's unit system changes. + * @param unitSystem {H.ui.UnitSystem} - the unit system the UI currently uses + */ + onUnitSystemChange(unitSystem: H.ui.UnitSystem): void; + + /** + * This abstract method can be overridden by deriving classes to be invoked when the underlying map engine changes. + * @param engineType {H.Map.EngineType} - the engine type the map currently uses + */ + onMapEngineTypeChange(engineType: H.Map.EngineType): void; + + /** + * This method returns the map to which this control is attached. + * @returns {?H.Map} - return the map + */ + getMap(): H.Map; + + /** + * This method returns the localization object which corresponds to the UI's current locale. + * @returns {H.ui.i18n.Localization} + */ + getLocalization(): H.ui.i18n.Localization; + + /** + * This method returns this control's layout alignment. + * @returns {H.ui.LayoutAlignment} - the control's current layout alignment + */ + getAlignment(): H.ui.LayoutAlignment; + + /** + * This method sets the control's layout alignments. + * @param alignment {H.ui.LayoutAlignment} - The new alignment of the control + * @returns {H.ui.Control} - returns this control instance + */ + setAlignment(alignment: H.ui.LayoutAlignment): H.ui.Control; + } + + /** + * This class represents a distance measurement control which helps calculating distances between geographical locations indicated by the user clicks. + */ + export class DistanceMeasurement extends H.ui.Control { + /** + * Constructor + * @param opt_options {H.ui.DistanceMeasurement.Options=} - optional parameters to be passed to this control + */ + constructor(opt_options?: H.ui.DistanceMeasurement.Options); + } + + export module DistanceMeasurement { + /** + * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.RIGHT_BOTTOM + * @property startIcon {H.map.Icon=} - the icon to use for the first measurement point + * @property stopoverIcon {H.map.Icon=} - the icon to use for the intermediate measurement points + * @property endIcon {H.map.Icon=} - the icon to use for the last measurement point + * @property splitIcon {H.map.Icon=} - the icon to use for indicating position under pointer over the line where new point will be created once user clicks + * @property lineStyle {(H.map.SpatialStyle | H.map.SpatialStyle.Options)} - the style to use for connecting lines of the measurement points + * @property distanceFormatter {function(number)=} - Optional function used for formatting a distance. By default distance measurement tool will do the formatting according to the specified measurement unit (see H.ui.UI.Options#unitSystem) + */ + export interface Options { + alignment?: H.ui.LayoutAlignment; + startIcon?: H.map.Icon; + stopoverIcon?: H.map.Icon; + endIcon?: H.map.Icon; + splitIcon?: H.map.Icon; + lineStyle: H.map.SpatialStyle | H.map.SpatialStyle.Options; + distanceFormatter?(n: number): void; + } + } + + /** + * This class represents an information bubble bound to a geo-position on the map. + */ + export class InfoBubble extends base.Element { + /** + * Constructor + * @param position {H.geo.IPoint} - the geo-position to which this info bubble corresponds + * @param opt_options {H.ui.InfoBubble.Options=} - optional parameters to be passed to the info bubble + */ + constructor(position: H.geo.IPoint, opt_options?: InfoBubble.Options); + + /** + * This method sets the geo-position of this info bubble + * @param position {(H.geo.IPoint | H.geo.Point)} - the new geo-position of this bubble + */ + setPosition(position: H.geo.IPoint | H.geo.Point): void; + + /** + * This method returns this info bubble's current state. + * @returns {H.ui.InfoBubble.State} - this bubble's current state + */ + getState(): InfoBubble.State; + + /** + * This method sets the info bubble's state. + * @param state {H.ui.InfoBubble.State} - the new state + */ + setState(state: InfoBubble.State): void; + + /** + * This method closes the info bubble (setting its state to CLOSED) + */ + close(): void; + + /** + * This method opens the info bubble (setting its state to OPEN) + */ + open(): void; + + /** + * This method returns the bubble's content element. + * + * Note: Before adding an info bubble to a UI object the content element is null. + * @returns {?HTMLElement} - the content element of this info bubble + */ + getContentElement(): HTMLElement; + + /** + * This methods sets the content of the info bubble. This can either be a string (applied as innerHTML) to the content element of this info bubble or a HTML node which is appended to the content element. + * @param content {(string | Node)} - the content for this bubble + */ + setContent(content: string | Node): void; + } + + export module InfoBubble { + /** + * This enumeration holds the state an info bubble can have. + */ + export enum State { + /** This value represents the state where an info bubble is open and visible (value: 'open'). */ + OPEN, + /** This value represents the state where an info bubble is closed and invisible (value: 'closed') */ + CLOSED, + } + + export interface Options { + /** + * a callback to be invoked when the info bubble's state changes + * @param event {H.util.Event} + */ + onStateChange?(event: H.util.Event): void; + + /** + * content to be added to the info bubble + */ + content: string | Node; + } + } + + /** + * This enumeration holds the possible layout alignments for the UI elements. + */ + export enum LayoutAlignment { + TOP_LEFT, + TOP_CENTER, + TOP_RIGHT, + LEFT_TOP, + LEFT_MIDDLE, + LEFT_BOTTOM, + RIGHT_TOP, + RIGHT_MIDDLE, + RIGHT_BOTTOM, + BOTTOM_LEFT, + BOTTOM_CENTER, + BOTTOM_RIGHT, + } + + /** + * This class represents a menu control allowing to control which map type the map shows, etc. + */ + export class MapSettingsControl extends H.ui.Control { + /** + * Constructor + * @param opt_options {H.ui.MapSettingsControl.Options=} - optional parameters to be passed to this control + */ + constructor(opt_options?: H.ui.MapSettingsControl.Options); + + /** + * Sets the traffic incidents layer to be shown when activating the respective button on the map settings control. + * @param incidentsLayer {H.map.layer.Layer} - the incidents layer + */ + setIncidentsLayer(incidentsLayer: H.map.layer.Layer): void; + } + + export module MapSettingsControl { + /** + * The map type entry is an object containing a display name and a map type object to which it refers. + * @property name {string} - label which describes the map type + * @property mapType {H.service.MapType} - reference to map type + */ + export interface MapTypeEntry { + name: string; + mapType: H.service.MapType; + } + + /** + * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.BOTTOM_RIGHT + * @property entries {Array=} - the map type entries to be shown in this map settings control + * @property incidents {H.map.layer.Layer} - the traffic incidents layer to be activated by the map settings control + */ + export interface Options { + alignment?: H.ui.LayoutAlignment; + entries?: Array; + incidents: H.map.layer.Layer; + } + } + + /** + * This class represents the UI controls for panorama + */ + export class Pano extends H.ui.Control { + /** + * Constructor + * @param opt_options {H.ui.Pano.Options=} - optional parameters to be passed to the map. + */ + constructor(opt_options?: H.ui.Pano.Options); + } + + export module Pano { + /** + * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.RIGHT_BOTTOM + * @property mapTypes {H.service.MapTypes} - The map types to use + */ + export interface Options { + alignment?: H.ui.LayoutAlignment; + mapTypes: H.service.MapType; + } + } + + /** + * This class represents a UI element showing the current zoom scale. + */ + export class ScaleBar { + /** + * Constructor + * @param opt_options {H.ui.ScaleBar.Options=} - optional parameters to be passed to this scale bar. + */ + constructor(opt_options?: H.ui.ScaleBar.Options); + } + + export module ScaleBar { + /** + * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.BOTTOM_RIGHT + */ + export interface Options { + alignment?: H.ui.LayoutAlignment; + } + } + + /** + * This class encapsulates map UI functionality. + */ + export class UI implements H.util.ICapturable { + /** + * Constructor + * @param map {H.Map} + * @param opt_options {H.ui.UI.Options=} + */ + constructor(map: H.Map, opt_options?: UI.Options); + + /** + * This method returns this ui's root element. + * @returns {ELement} - the root element + */ + getElement(): Element; + + /** + * Returns the map instance to which this UI was added. + * @returns {H.Map} + */ + getMap(): H.Map; + + /** + * This method returns this UI object's current unit system. + * @returns {H.ui.UnitSystem} - the current unit system + */ + getUnitSystem(): UnitSystem; + + /** + * This method sets this UI object's unit system for displaying distances. + * @param unitSystem {H.ui.UnitSystem} - the unit system to use + */ + setUnitSystem(unitSystem: UnitSystem): void; + + /** + * Toggles this UI's unit system between {@link H.ui.UnitSystem.METRIC} and {@link H.ui.UnitSystem.IMPERIAL}. + */ + toggleUnitSystem(): void; + + /** + * This method adds an info bubble to the UI. + * @param bubble {H.ui.InfoBubble} - the info bubble to be added + */ + addBubble(bubble: InfoBubble): void; + + /** + * This method removes a previously added info bubble from the UI. + * @param bubble {H.ui.InfoBubble} - the info bubble to be removed + */ + removeBubble(bubble: InfoBubble): void; + + /** + * This method returns a list of info bubble objects which are currently attached to this UI. + * @returns {Array} - the list of info bubbles + */ + getBubbles(): Array; + + /** + * This method appends a control to the UI. + * @param name {string} - the name under which to register this control + * @param control {H.ui.Control} - the control to add to this UI + */ + addControl(name: string, control: Control): void; + + /** + * Removes a previously registered control from the UI object. + * @param name {string} - the name under which this control was previously registered + * @returns {H.ui.Control} - the removed control + */ + removeControl(name: string): Control; + + /** + * This method returns a UI control which was previously registered with the provided name. + * @param name {string} - the name under which the control was registered. + * @returns {H.ui.Control} - the control or undefined if the control does not exist. + */ + getControl(name: string): Control; + + /** + * This function creates the default UI including the zoom control, + * map settings control and scalebar and panorama discovery control. + * The default controls will be assigned the following values: + * + * Zoom control: + * id: 'zoom' + * alignment: 'right-middle' + * Map settings control: + * id: 'mapsettings' + * alignment: 'bottom-right' + * Scalebar: + * id: 'scalebar' + * alignment: 'bottom-right' + * Pano: + * id: 'panorama' + * alignment: 'top-right' + * + * @param map {H.Map} - The map instance to which to append the UI + * @param mapTypes {Object} - The map types to use + * @param opt_locale {(H.ui.i18n.Localization | string)=} - the language to use (or a full localization object). + * @returns {H.ui.UI} - the UI instance configured with the default controls + */ + static createDefault(map: H.Map, mapTypes: H.service.Platform.MapTypes, opt_locale?: H.ui.i18n.Localization | string): UI; + + /** + * This method is used to capture the element view + * @param canvas {HTMLCanvasElement} - HTML Canvas element to draw the view of the capturable element + * @param pixelRation {number} - The pixelRatio to use for over-sampling in cases of high-resolution displays, default is 1 + * @param callback {ICapturable~captureCallback} - Callback function to call once result of the capturing is ready + * @param opt_errback {ICapturable~errorCallback} - Callback function to call if error occurred during capturing + */ + capture(canvas: HTMLCanvasElement, pixelRation: number, callback: (canvas?: HTMLCanvasElement) => void, opt_errback?: (error: string) => void): void; + + /** + * @callback ICapturable~captureCallback + * @param canvas {HTMLCanvasElement=} + */ + + /** + * @callback ICapturable~errorCallback + * @param error {string} + */ + } + + export module UI { + /** + * Optional parameters to be passed to the UI constructor. + * @property unitSystem {H.ui.UnitSystem=} - An optional unit system to be used by the UI, default is H.ui.UnitSystem.METRIC + * @property zoom {(H.ui.ZoomControl.Options | boolean)=} - + * @property zoomrectangle {(H.ui.ZoomRectangle.Options | boolean)=} - + * @property mapsettings {(H.ui.MapSettingsControl.Options | boolean)=} - + * @property scalebar {(H.ui.ScaleBar.Options | boolean)=} - + * @property panorama {(H.ui.Pano.Options | boolean)=} - + * @property distancemeasurement {(H.ui.DistanceMeasurement.Options | boolean)=} - + * @property locale {(H.ui.i18n.Localization | string)=} - defines language in which UI can be rendered. It can be predefined H.ui.i18n.Localization object with custom translation map, or a string one of following 'en-US', 'de-DE', 'es-ES', 'fi-FI', 'fr-FR', 'it-IT', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'tr-TR', 'zh-CN'. If not defined ui will use 'en-US' by default + */ + export interface Options { + unitSystem?: H.ui.UnitSystem; + zoom?: (H.ui.ZoomControl.Options | boolean); + zoomrectangle?: (H.ui.ZoomRectangle.Options | boolean); + mapsettings?: (H.ui.MapSettingsControl.Options | boolean); + scalebar?: (H.ui.ScaleBar.Options | boolean); + panorama?: (H.ui.Pano.Options | boolean); + distancemeasurement?: (H.ui.DistanceMeasurement.Options | boolean); + locale?: (H.ui.i18n.Localization | string); + } + } + + /** + * This enumeration holds the possible unit systems for the UI to display distances. + */ + export enum UnitSystem { + /** This value represents the imperial unit system using miles and feet (value: 'imperial'). */ + IMPERIAL, + /** This value represents the metric unit system using meters and kilometers, etc (value: 'metric'). */ + METRIC, + } + + /** + * This class represents the UI controls for zooming in an out of the map. + */ + export class ZoomControl extends H.ui.Control { + /** + * Constructor + * @param opt_options {H.ui.ZoomControl.Options=} - optional parameters to be passed to the map. + */ + constructor(opt_options?: H.ui.ZoomControl.Options); + + /** + * This method returns the zoom speed (in levels per millisecond) which is applied when the button is pressed constantly. + * @returns {number} - the current zoom speed + */ + getZoomSpeed(): number; + } + + export module ZoomControl { + /** + * @property zoomSpeed {number=} - the speed if zooming in and out in levels per millisecond, defaults to 0.05 + * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, defaults to H.ui.LayoutAlignment.RIGHT_MIDDLE + * @property slider {boolean=} - flag whether to show the slider (true) or not, defaults to false + * @property sliderSnaps {boolean=} - flag whether slider should snap to the integer values or not, defaults to false. This option has effect only if slider is enabled. + */ + export interface Options { + zoomSpeed?: number; + alignment?: H.ui.LayoutAlignment; + slider?: boolean; + sliderSnaps?: boolean; + } + } + + /** + * This class represents a zoom rectangle control element that allows zooming to the selected area on the screen. + */ + export class ZoomRectangle extends H.ui.Control { + /** + * Constructor + * @param opt_options {H.ui.ZoomRectangle.Options=} - optional parameters to be passed to this control + */ + constructor(opt_options?: H.ui.ZoomRectangle.Options); + } + + export module ZoomRectangle { + /** + * @property alignment {H.ui.LayoutAlignment=} - the layout alignment which should be applied to this control, default is H.ui.LayoutAlignment.BOTTOM_RIGHT + * @property adjustZoom {function(number, H.Map) : number=} - optional function that defines how zoom level should be changed, by default zoom level is picked to fit the bounding rectangle into the view port. + */ + export interface Options { + alignment?: H.ui.LayoutAlignment; + adjustZoom?(n: number, m: H.Map): number; + } + } + + type ES6Element = Element; + + /** + * This namespace contains basic UI elements from which the UI controls are built. + */ + export module base { + export class Container extends H.util.EventTarget { + /** + * Constructor + * @param opt_elementType {string=} - the type of HTML element this UI element renders as, default is 'div' + * @param opt_className {string=} - an optional class name to be used on this element + * @param opt_children {Array=} - optional child elements to be added to this container + */ + constructor(opt_elementType?: string, opt_className?: string, opt_children?: Array); + + /** + * Adds a child element to be rendered within the container element. + * @param child {H.ui.base.Element} - the child element to be added + * @returns {H.ui.base.Container} - this container instance + */ + addChild(child: Element): Container; + + /** + * Returns the child collection of this container. + * @returns {Array} - Returns the child collection of this container. + */ + getChildren(): Array; + + /** + * Removes a child element from this container's child collection. + * @param child {H.ui.base.Element} - the child element to be removed + */ + removeChild(child: Element): void; + + /** + * This method is the concrete implementation of the UI element. This method receives the pre-rendered HTML element which may be modified by deriving classes. + * @param element {Element} - this UI element's HTML representation + * @param doc {Document} - the HTML document into which the element is currently being rendered + */ + renderInternal(element: ES6Element, doc: Document): void; + + /** + * This method returns this UI element's disabled state as a boolean value. + * @returns {boolean} - true if the element is disabled, false otherwise + */ + isDisabled(): boolean; + + /** + * This method set's the disabled state of this UI element. + * @param disabled {boolean} - true to disable the element, false to enable it + * @param opt_force {boolean=} - an optional boolean flag indicating that the value should be set and propagated even if it is the same as the current state + * @returns {H.ui.base.Element} - this element instance + */ + setDisabled(disabled: boolean, opt_force?: boolean): ES6Element; + + /** + * This method returns a previously stored arbitrary data from this element. + * @returns {*} - the previously stored data object or null if not data was stored. + */ + getData(): any; + + /** + * This method stores arbitrary data with this UI element. + * @param data {*} - the data to be stored + */ + setData(data: any): void; + + /** + * This method returns the HTML element this UI element renders. + * + * Note: Before the UI element was rendered the method returns null. + * @returns {?HTMLElement} - the element + */ + getElement(): HTMLElement; + + /** + * Sets the visibility of this element. + * @param visibility {boolean} - visibility + */ + setVisibility(visibility: boolean): void; + + /** + * Returns the visibility of this element. + * @returns {boolean} - visibility + */ + getVisibility(): boolean; + + /** + * This method adds a CSS class to this UI element (if it is not already present). + * @param className {string} - the CSS class name to add + * @returns {H.ui.base.Element} - this UI element instance + */ + addClass(className: string): Element; + + /** + * This method removes a CSS class from this UI element (if it is present). + * @param className {string} - the CSS class name to remove + * @returns {H.ui.base.Element} - this UI element instance + */ + removeClass(className: string): Element; + } + + export class Element extends H.util.EventTarget { + /** + * Constructor + * @param opt_elementType {string=} - the type of HTML element this UI element renders as, default is 'div' + * @param opt_className {string=} - an optional class name to be used on this element + */ + constructor(opt_elementType?: string, opt_className?: string); + + /** + * This method is the concrete implementation of the UI element. This method receives the pre-rendered HTML element which may be modified by deriving classes. + * @param element {Element} - this UI element's HTML representation + * @param doc {Document} - the HTML document into which the element is currently being rendered + */ + renderInternal(element: ES6Element, doc: Document): void; + + /** + * This method returns this UI element's disabled state as a boolean value. + * @returns {boolean} - true if the element is disabled, false otherwise + */ + isDisabled(): boolean; + + /** + * This method set's the disabled state of this UI element. + * @param disabled {boolean} - true to disable the element, false to enable it + * @param opt_force {boolean=} - an optional boolean flag indicating that the value should be set and propagated even if it is the same as the current state + * @returns {H.ui.base.Element} - this element instance + */ + setDisabled(disabled: boolean, opt_force?: boolean): ES6Element; + + /** + * This method returns a previously stored arbitrary data from this element. + * @returns {*} - the previously stored data object or null if not data was stored. + */ + getData(): any; + + /** + * This method stores arbitrary data with this UI element. + * @param data {*} - the data to be stored + */ + setData(data: any): void; + + /** + * This method returns the HTML element this UI element renders. + * + * Note: Before the UI element was rendered the method returns null. + * @returns {?HTMLElement} - the element + */ + getElement(): HTMLElement; + + /** + * Sets the visibility of this element. + * @param visibility {boolean} - visibility + */ + setVisibility(visibility: boolean): void; + + /** + * Returns the visibility of this element. + * @returns {boolean} - visibility + */ + getVisibility(): boolean; + + /** + * This method adds a CSS class to this UI element (if it is not already present). + * @param className {string} - the CSS class name to add + * @returns {H.ui.base.Element} - this UI element instance + */ + addClass(className: string): Element; + + /** + * This method removes a CSS class from this UI element (if it is present). + * @param className {string} - the CSS class name to remove + * @returns {H.ui.base.Element} - this UI element instance + */ + removeClass(className: string): Element; + } + } + + /** + * Namespace contains functionality related to internationalization. + */ + export module i18n { + /** + * Default available locales. UI provides default translations for this set of locale codes. + */ + export const defaultLocales: Array; + + /** + * This class is used for internationalization of UI components. + */ + export class Localization { + constructor(locale: string, opt_translationMap?: any); + + /** + * This method returns current locale code i.e 'en-US' + * @returns {string} - locale code + */ + getLocale(): string; + + /** + * This method returns translation keys for current locale. Keys from this set can be used to get translations via translate method. + * @returns {Array} + */ + getKeys(): Array; + + /** + * This method returns a boolean value indicating whether this localization object has a translation for the specified translation key. + * @param key {string} - a translation key + * @returns {boolean} - true if the key exists, otherwise false + */ + hasKey(key: string): boolean; + + /** + * This method returns translation for provided key. It throws exception if translation is not available + * @param key {string} - a translation key + * @returns {string} - a localized string corresponding to provided key + */ + translate(key: string): string; + } + } + } + + /***** util *****/ + export module util { + /** + * The cache represents a in-memory LRU-cache with a fixed size. It stores any data that is added until the cache's content exceeds a maximum size. Once the size of all content elements exceeds the maximum size the cache will drop the least recently retrieved elements until the size of the cache is within the bounds of its maximum size. Data elements are always associated with an identifier that allow to retrieve them at a later stage and their content size. + */ + export class Cache implements H.util.ICache { + /** + * Constructor + * @param maxSize {number} - the maximum size of the cache + * @param opt_onDrop {function(string, ?, number)=} - A callback to be invoked when a data element is dropped from the cache + * @param opt_filter {(function(string, ?, number) : boolean)=} - A function to filter data elements that are not to be cached + */ + constructor(maxSize: number, opt_onDrop?: (s: string, i: any, n: number) => void, opt_filter?: (s: string, i: any, n: number) => boolean); + + /** + * This method sets this cache's maximum size to a new size. If the cache's contents exceed the new size, least recently used data elements will be dropped. + * @param maxSize {number} - the new maximum size of this cache. + * @returns {H.util.Cache} - this cache + */ + setMaxSize(maxSize: number): H.util.Cache; + + /** + * This method returns the maximum size of this cache. + * @returns {number} - the maximum size of the cache + */ + getMaxSize(): number; + + /** + * This method returns the current size of this cache. + * @returns {number} - the current size of the cache + */ + getCurrentSize(): number; + + /** + * This method adds an element to the cache. + * @param id {*} - The identifier of this data element, the value is converted to a string. + * @param data {*} - the actual data to be stored + * @param size {number} - the size of the data element + * @returns {boolean} - a boolean value indicating whether the data was added + */ + add(id: any, data: any, size: number): boolean; + + /** + * This method retrieves an element from the cache. + * @param id {string} - the ID of the data element to be retrieved. + * @param opt_noUpdate {boolean=} - and optional flag to indicate that the retrieved object should not be marked as 'most recently used'. + * @returns {*} - returns the data associated with the ID or undefined if the data element is not currently in the cache. + */ + get(id: string, opt_noUpdate?: boolean): any; + + /** + * This method explicitly drops an element from the cache. + * @param id {*} - the id of the item to drop + */ + drop(id: any): void; + + /** + * This method will execute the provided callback function on each of the cache's entries. If the optional match predicate is passed to this method the callback will only be executed on those entries for which the predicated returns true. + * @param callback {function(string, ?, number)} - the callback to be invoked for each entry + * @param opt_ctx {Object=} - an optional context object to be used as this within the callback + * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional match predicate to customize on which entries the callback will be called + */ + forEach(callback: (s: string, i: any, n: number) => void, opt_ctx?: any, opt_matcher?: (s: string, i: any, n: number) => boolean): void; + + /** + * This method removes all data elements from the cache. If the optional match predicate is passed to this method only those data elements will be removed for which the predicate return true. + * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional function that receives an entries id, data and size and may return true or false to either remove it or leave the entry in the cache respectively + */ + removeAll(opt_matcher?: (s: string, i: any, n: number) => boolean): void; + + /** + * This method registers a callback that should be called each time an entry is dropped from the cache. + * @param callback {(function(string, ?, number))} - the callback to be invoked for each entry + */ + registerOnDrop(callback: (s: string, i: any, n: number) => void): void; + } + + /** + * This event indicates a change. It contains the old and the new value. + * @property target {*} - Object which triggered the event + * @property currentTarget {*} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class ChangeEvent extends H.util.Event { + /** + * Constructor + * @param type {string} - The type of the event + * @param newValue {*} - The new value of the property + * @param oldValue {*} - The previous value of the property + */ + constructor(type: string, newValue: any, oldValue: any); + + /** + * Sets defaultPrevented to true. Which can be used to prevent some default behavior. + */ + preventDefault(): void; + + /** + * Stops propagation for current event. + */ + stopPropagation(): void; + + target: any; + currentTarget: any; + type: string; + defaultPrevented: boolean; + } + + /** + * This class represents a contextual information/action. + * @property SEPARATOR {H.util.ContextItem} - Separator for the context items + */ + export class ContextItem extends H.util.EventTarget { + /** + * Constructor + * @param opt_options {H.util.ContextItem.Options=} - The values to initialize this context item + */ + constructor(opt_options?: H.util.ContextItem.Options); + + /** + * This method returns label of the context item + * @returns {string} - the label of the context item + */ + getLabel(): string; + + /** + * This method changes context item label to the specified one + * @param label {string} - New label for the context item + * @returns {H.util.ContextItem} - this context item instance + */ + setLabel(label: string): H.util.ContextItem; + + /** + * This method returns disabled state of the context item. + * @returns {boolean} - true if the item is disabled, false otherwise + */ + isDisabled(): boolean; + + /** + * This method enables/disables the context item + * @param disabled {boolean} - true to disable and false to enabled it + * @returns {H.util.ContextItem} - this context item instance + */ + setDisabled(disabled: boolean): H.util.ContextItem; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + + static SEPARATOR: H.util.ContextItem; + } + + export module ContextItem { + /** + * This type defines options which can be used to initialize the context item. + * @property label {string=} - the label of the context item + * @property disabled {boolean=} - flag indicatting whether context item is disabled or no, by default false + * @property callback {function(H.util.Event)=} - Optional callback function to call once context item is selected + */ + export interface Options { + label?: string; + disabled?: boolean; + callback?: (event: H.util.Event) => void; + } + } + + /** + * Object which can be safely disposed. + */ + export class Disposable { + /** + * Constructor + */ + constructor(); + + /** + * Method adds a callback which will be triggered when the object is disposed + * @param callback {Function} + * @param opt_scope {Object=} + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + /** + * Base Event class which is used for all events dispatched by any EventTarget within the api. + * @property target {*} - Object which triggered the event + * @property currentTarget {*} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class Event { + /** + * Constructor + * @param type {string} - Event Type. + * @param opt_target {Object=} - Reference to the object that is the target of this event. It has to implement the {@link EventTargetInstance} interface. + */ + constructor(type: string, opt_target?: any); + + /** + * Sets defaultPrevented to true. Which can be used to prevent some default behavior. + */ + preventDefault(): void; + + /** + * Stops propagation for current event. + */ + stopPropagation(): void; + + target: any; + currentTarget: any; + type: string; + defaultPrevented: boolean; + } + + /** + * EventTarget enabled listening and dispatching events on all instances and derived classes. + */ + export class EventTarget { + /** + * Constructor + */ + constructor(); + + /** + * This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible. + * @param type {string} - name of event + * @param handler {Function} - event handler function + * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) + * @param opt_scope {Object=} - scope for the handler function + */ + addEventListener(type: string, handler: EventListenerOrEventListenerObject, opt_capture?: boolean, opt_scope?: any): void; + + /** + * This method will removed previously added listener from the event target + * @param type {string} - name of event + * @param handler {Function} - event handler function + * @param opt_capture {boolean=} - if set to true will listen in the capture phase (bubble otherwise) + * @param opt_scope {Object=} - scope for the handler function + */ + removeEventListener(type: string, handler: EventListenerOrEventListenerObject, opt_capture?: boolean, opt_scope?: any): void; + + /** + * This method will dispatch event on the event target object + * @param evt {H.util.Event | string} - event object or event name + */ + dispatchEvent(evt: H.util.Event | string): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: () => void, opt_scope?: any): void; + } + + /** + * An interface definition for the generic cache. Any data elements can be stored in the cache. They are always associated with an identifier to retrieve them at a later stage and their content size. + */ + export interface ICache { + /** + * This method adds an element to the cache. + * @param id {*} - The identifier of this data element, the value is converted to a string. + * @param data {*} - the actual data to be stored + * @param size {number} - the size of the data element + * @returns {boolean} - a boolean value indicating whether the data was added + */ + add(id: any, data: any, size: number): boolean; + + /** + * This method retrieves an element from the cache. + * @param id {string} - the ID of the data element to be retrieved. + * @param opt_noUpdate {boolean=} - and optional flag to indicate that the retrieved object should not be marked as 'most recently used'. + * @returns {*} - returns the data associated with the ID or undefined if the data element is not currently in the cache. + */ + get(id: string, opt_noUpdate?: boolean): any; + + /** + * This method explicitly drops an element from the cache. + * @param id {*} - the id of the item to drop + */ + drop(id: any): void; + + /** + * This method will execute the provided callback function on each of the cache's entries. If the optional match predicate is passed to this method the callback will only be executed on those entries for which the predicated returns true. + * @param callback {function(string, ?, number)} - the callback to be invoked for each entry + * @param opt_ctx {Object=} - an optional context object to be used as this within the callback + * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional match predicate to customize on which entries the callback will be called + */ + forEach(callback: (s: string, t: any, n: number) => void, opt_ctx?: Object, opt_matcher?: ((s: string, t: any, n: number) => boolean)): void; + + /** + * This method removes all data elements from the cache. If the optional match predicate is passed to this method only those data elements will be removed for which the predicate return true. + * @param opt_matcher {(function(string, ?, number) : boolean)=} - an optional function that receives an entries id, data and size and may return true or false to either remove it or leave the entry in the cache respectively + */ + removeAll(opt_matcher?: ((s: string, t: any, n: number) => boolean)): void; + + /** + * This method registers a callback that should be called each time an entry is dropped from the cache. + * @param callback {(function(string, ?, number))} - the callback to be invoked for each entry + */ + registerOnDrop(callback: ((s: string, t: any, n: number) => void)): void; + } + + /** + * An interface to cancelable requests and actions. + */ + export interface ICancelable { + /** + * This method is used to cancel current action + */ + cancel(): void; + } + + export interface ICapturable { + /** + * This method is used to capture the element view + * @param canvas {HTMLCanvasElement} - HTML Canvas element to draw the view of the capturable element + * @param pixelRation {number} - The pixelRatio to use for over-sampling in cases of high-resolution displays, default is 1 + * @param callback {ICapturable~captureCallback} - Callback function to call once result of the capturing is ready + * @param opt_errback {ICapturable~errorCallback} - Callback function to call if error occurred during capturing + */ + capture(canvas: HTMLCanvasElement, pixelRation: number, callback: (canvas?: HTMLCanvasElement) => void, opt_errback?: (error: string) => void): void; + + /** + * @callback ICapturable~captureCallback + * @param canvas {HTMLCanvasElement=} + */ + + /** + * @callback ICapturable~errorCallback + * @param error {string} + */ + } + + /** + * This class represents an list of ordered entries which dispatches events when the list is modified. + * @event add {H.util.OList.Event} - Fired when an entry was added to the list. + * @event remove {H.util.OList.Event} - Fired when an entry was removed from the list. + * @event set {H.util.OList.Event} - Fired when an entry was set in the list. + * @event move {H.util.OList.Event} - Fired when an entry was moved within the list. + */ + export class OList extends H.util.EventTarget { + + /** + * This method inserts an entry to the list. Optionally it can place new entry at provided index. + * @param entry {?} - The entry to insert + * @param opt_idx {number=} - The index where the new entry should be inserted; if omitted or greater then the current size of the list, the entry is added at the end of the list; a negative index is treated as being relative from the end of the list + */ + add(entry: any, opt_idx?: number): void; + + /** + * This method removes an entry by a given index from the list. + * @param idx {number} - The index of the entry which should be removed; a negative index is treated as being relative from the end of the list + * @returns {?} - The removed entry + */ + removeAt(idx: number): any; + + /** + * This method removes the the first entry which is identical with the given entry. + * @param entry {?} - The entry to remove + * @returns {boolean} - signals if the entry could be found in the list and is removed + */ + remove(entry: any): boolean; + + /** + * This method replaces an entry at the given index with the given entry. + * @param idx {number} - The index of the entry which should be replaced; a negative index is treated as being relative from the end of the list + * @param entry {?} - The entry which replaces the existing one + * @returns {?} - The replaced entry + */ + set(idx: number, entry: any): any; + + /** + * This method retrieves the index of the first object in this list that is identical with the object supplied by the caller. + * @param entry {?} - The entry for which to return the index. + * @returns {number} - The index of the first matching entry in this list or -1 if the entry provided by the caller is not found in the list + */ + indexOf(entry: any): number; + + /** + * To get the entry at the specified index. + * @param idx {number} - The index of the entry to get a negative index is treated as being relative from the end of the list + * @returns {?} - The element at the given index + */ + get(idx: number): any; + + /** + * This method returns the length of the list. + * @returns {number} + */ + getLength(): number; + + /** + * This method returns all list's entries as an array. + * @returns {Array<*>} - The list as an array + */ + asArray(): Array; + + /** + * This method removes all entries from the list. + */ + flush(): void; + + /** + * This method will dispatch event on the event target object + * @param evt {(H.util.Event | string)} - event object or event name + */ + dispatchEvent(evt: (H.util.Event | string)): void; + + /** + * Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners. + */ + dispose(): void; + + /** + * This method adds callback which is triggered when the object is being disposed + * @param callback {Function} - The callback function. + * @param opt_scope {Object=} - An optional scope to call the callback in. + */ + addOnDisposeCallback(callback: Function, opt_scope?: Object): void; + } + + export module OList { + /** + * The event class for events that are dispatched by OList + * @property target {*} - Object which triggered the event + * @property currentTarget {*} - Object which has listener attached + * @property type {string} - Name of the dispatched event + * @property defaultPrevented {boolean} - Indicates if preventDefault was called on the current event + */ + export class Event extends H.util.Event { + /** + * Constructor + * @param list {H.util.OList} - The OList instance which is emitting the event + * @param type {H.util.OList.prototype.EventType} - The type of the event + * @param idx {number} - The affected index within this list + * @param added {?*} - The value of the entry which was added or set + * @param removed {?*} - The value of the entry which was removed or replaced + * @param moved {?*} - The value of the entry which was moved + */ + constructor(list: H.util.OList, type: string, idx: number, added: any, removed: any, moved: any); + + /** + * Sets defaultPrevented to true. Which can be used to prevent some default behavior. + */ + preventDefault(): void; + + /** + * Stops propagation for current event. + */ + stopPropagation(): void; + + target: any; + currentTarget: any; + type: string; + defaultPrevented: boolean; + } + } + + /** + * A generic class to represent a handle for any kind of asynchronous processed requests + */ + export class Request { + /** + * Constructor + * @param opt_onprogress {function(H.util.Request)=} - A callback to invoke every time when the request's progress state changes + * @param opt_total {number=} - The total number of processing steps to complete this request, default is 1 + */ + constructor(opt_onprogress?: (req: H.util.Request) => void, opt_total?: number); + + /** + * Returns the state of this request + * @returns {H.util.Request.State} + */ + getState(): H.util.Request.State; + + /** + * Returns the number of processing steps to complete this request + * @returns {number} + */ + getTotal(): number; + + /** + * Returns the number of steps which are already processed by this request + * @returns {number} + */ + getProcessed(): number; + + /** + * Returns the number of processingsteps which have been failed + * @returns {number} + */ + getFailed(): number; + } + + export module Request { + /** + * The supported states of an request + */ + export enum State { + PENDING, + PROCESSING, + COMPLETE, + CANCELLED, + ERROR, + } + } + + export module animation { + /** + * This mamespace contains easing functions used for Animation class. + */ + export class ease { + /** + * This function defines linear ease. + * @param val {number} - A value in range [0..1] to translate + * @returns {number} - the translated value + */ + static LINEAR(val: number): number; + + /** + * This function defines quadratic ease in. + * @param val {number} - A value in range [0..1] to translate + * @returns {number} - the translated value + */ + static EASE_IN_QUAD(val: number): number; + + /** + * This function defines quadratic ease out. + * @param val {number} - A value in range [0..1] to translate + * @returns {number} - the translated value + */ + static EASE_OUT_QUAD(val: number): number; + + /** + * This function defines ease in and out with slope. + * @param val {number} - A value in range [0..1] to translate + * @returns {number} - the translated value + */ + static EASE_IN_OUT_QUINT(val: number): number; + + /** + * This function defines ease out with circ function. + * @param val {number} - A value in range [0..1] to translate + * @returns {number} - the translated value + */ + static EASE_OUT_CIRC(val: number): number; + } + } + + export module kinetics { + /** + * This interface defines kinetic move parameters used by map for kinetic drag. + * @property power {number} - Power multiplier. Multiplier is used to increase the speed of the kinetic move. By default map uses 1. + * @property duration {number} - Defines duration of the kinetic move. + */ + export interface IKinetics { + /** + * Easing function modifies animation progress. In example it can modify the animation in a way it starts rapidly and then slows down at the end. + * @param p {number} - current progress + * @returns {number} - modified progress + */ + ease(p: number): number; + + power: number; + duration: number; + } + } + } +} diff --git a/highcharts/highcharts-modules-boost.d.ts b/highcharts/highcharts-modules-boost.d.ts new file mode 100644 index 0000000000..3f85bb887a --- /dev/null +++ b/highcharts/highcharts-modules-boost.d.ts @@ -0,0 +1,12 @@ +// Type definitions for Highcharts 4.2.6 (boost module) +// Project: http://www.highcharts.com/ +// Definitions by: Daniel Martin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare var HighchartsBoost: (H: HighchartsStatic) => HighchartsStatic; + +declare module "highcharts/modules/boost" { + export = HighchartsBoost; +} diff --git a/highcharts/highcharts-modules-offline-exporting.d.ts b/highcharts/highcharts-modules-offline-exporting.d.ts new file mode 100644 index 0000000000..61c7c76eeb --- /dev/null +++ b/highcharts/highcharts-modules-offline-exporting.d.ts @@ -0,0 +1,12 @@ +// Type definitions for Highcharts 4.2.6 (offline exporting module) +// Project: http://www.highcharts.com/ +// Definitions by: Daniel Martin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare var HighchartsOfflineExporting: (H: HighchartsStatic) => HighchartsStatic; + +declare module "highcharts/modules/offline-exporting" { + export = HighchartsOfflineExporting; +} diff --git a/highcharts/highcharts.d.ts b/highcharts/highcharts.d.ts index de1e5343ca..2274e221d0 100644 --- a/highcharts/highcharts.d.ts +++ b/highcharts/highcharts.d.ts @@ -240,7 +240,7 @@ interface HighchartsPlotBands { * Border color for the plot band. Also requires borderWidth to be set. * @default null */ - borderColor?: string; + borderColor?: Color; /** * Border width for the plot band. Also requires borderColor to be set. * @default 0 @@ -249,7 +249,7 @@ interface HighchartsPlotBands { /** * The color of the plot band. */ - color?: string | HighchartsGradient; + color?: Color; /** * An object defining mouse events for the plot band. Supported properties are click, mouseover, mouseout, * mousemove. @@ -471,7 +471,7 @@ interface HighchartsAxisOptions { /** * Configure a crosshair that follows either the mouse pointer or the hovered point. */ - crosshair?: HighchartsCrosshairObject; + crosshair?: HighchartsCrosshairObject | boolean; /** * For a datetime axis, the scale will automatically adjust to the appropriate unit. This member gives the default * string representations used for each unit. For an overview of the replacement codes, see dateFormat. @@ -556,7 +556,7 @@ interface HighchartsAxisOptions { * The color of the line marking the axis itself. * @default '#C0D0E0'. */ - lineColor?: string; + lineColor?: string | HighchartsGradient; /** * The width of the line marking the axis itself. * @default 1 @@ -820,7 +820,7 @@ interface HighchartsAxisOptions { interface HighchartsColorAxisDataClass { from?: number; to?: number; - color?: string; + color?: string | HighchartsGradient; name?: string; } @@ -906,7 +906,7 @@ interface HighchartsColorAxisOptions { * The color of the line marking the axis itself. * @default '#C0D0E0' */ - lineColor?: string; + lineColor?: string | HighchartsGradient; /** * The width of the line marking the axis itself. * @default 0 @@ -926,7 +926,7 @@ interface HighchartsColorAxisOptions { * The color of the marker. * @default 'gray' */ - color?: string; + color?: string | HighchartsGradient; }; /** * The maximum value of the axis in terms of map point values. If null, the max value is automatically calculated. @@ -1309,6 +1309,11 @@ interface HighchartsGradient { setOpacity?(alpha: number): HighchartsGradient; } +/** + * Type equivalent to the 'Color' type mentioned throughout the documentation. + */ +type Color = string | HighchartsGradient; + interface HighchartsChartOptions3dFrame { /** * The color of the panel. @@ -1382,7 +1387,7 @@ interface HighchartsShadow { /** * @default 'black' */ - color?: string; + color?: string | HighchartsGradient; /** * @default 1 */ @@ -1491,7 +1496,7 @@ interface HighchartsChartOptions { * The color of the outer chart border. * @default '#4572A7' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The corner radius of the outer chart border. * @default 0 @@ -1721,7 +1726,7 @@ interface HighchartsChartOptions { interface HighchartsCSSObject { background?: string; border?: string; - color?: string; + color?: string | HighchartsGradient; cursor?: string; font?: string; fontFamily?: string; @@ -2429,7 +2434,7 @@ interface HighchartsLegendOptions { * The color of the drawn border around the legend. * @default '#909090' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The border corner radius of the legend. * @default 0 @@ -2724,7 +2729,7 @@ interface HighchartsPaneBackground { /** * @default 'silver' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * @default 1 */ @@ -2803,7 +2808,7 @@ interface HighchartsDataLabels { * The border color for the data label. * @since 2.2.1 */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The border radius in pixels for the data label. * @default 0 @@ -2820,7 +2825,7 @@ interface HighchartsDataLabels { * The text color for the data labels. * @default null */ - color?: string; + color?: string | HighchartsGradient; /** * Whether to hide data labels that are outside the plot area. By default, the data label is moved inside the plot * area according to the overflow option. @@ -3066,7 +3071,7 @@ interface HighchartsMarkerState { * The color of the point marker's outline. When null, the series' or point's color is used. * @default '#FFFFFF', '#000000' for select state */ - lineColor?: string; + lineColor?: string | HighchartsGradient; /** * The width of the point marker's outline. * @default 0 @@ -3248,11 +3253,19 @@ interface HighchartsLineStates { } interface HighchartsBarStates { + /** + * A specific border color for the hovered point. Defaults to inherit the normal state border color. + */ + borderColor?: string | HighchartsGradient; /** * How much to brighten the point on interaction. Requires the main color to be defined in hex or rgb(a) format. * @default 0.1 */ brightness?: number; + /** + * + */ + color?: string | HighchartsGradient; /** * Enable separate styles for the hovered series to visualize that the user hovers either the series itself or the * legend. @@ -3276,7 +3289,7 @@ interface HighchartsAreaZone { * Defines the color of the series. * @since 4.1.0 */ - color?: string; + color?: string | HighchartsGradient; /** * A name for the dash style to use for the graph. * @since 4.1.0 @@ -3321,7 +3334,7 @@ interface HighchartsRangeDataLabels { * @default undefined * @since 2.2.1 */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The border radius in pixels for the data label. * @default 0 @@ -3338,7 +3351,7 @@ interface HighchartsRangeDataLabels { * The text color for the data labels. * @default null */ - color?: string; + color?: string | HighchartsGradient; /** * Whether to hide data labels that are outside the plot area. By default, the data label is moved inside the plot * area according to the overflow option. @@ -3471,7 +3484,7 @@ interface HighchartsDial { * @default 'black' * @since 2.3.0 */ - backgroundColor?: string; + backgroundColor?: string | HighchartsGradient; /** * The length of the dial's base part, relative to the total radius or length of the dial. * @default '70%'. @@ -3490,7 +3503,7 @@ interface HighchartsDial { * @default 'silver' * @since 2.3.0 */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The width of the gauge dial border in pixels. * @default 0 @@ -3524,14 +3537,14 @@ interface HighchartsPivot { * @default 'black' * @since 2.3.0 */ - backgroundColor?: string; + backgroundColor?: string | HighchartsGradient; /** * The border or stroke color of the pivot. In able to change this, the borderWidth must also be set to something * other than the default 0. * @default 'silver' * @since 2.3.0 */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The border or stroke width of the pivot. * @default 0 @@ -3554,7 +3567,7 @@ interface HighchartsTreeMapLevel { * Can set borderColor on all points which lies on the same level. * @since 4.1.0 */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * et the dash style of the border of all the point which lies on the level. * @since 4.1.0 @@ -3569,7 +3582,7 @@ interface HighchartsTreeMapLevel { * Can set a color on all points which lies on the same level. * @since 4.1.0 */ - color?: string; + color?: string | HighchartsGradient; /** * Can set the options of dataLabels on each point which lies on the level. * @default undefined @@ -3594,7 +3607,7 @@ interface HighchartsTreeMapLevel { } /** - * General options for all series types + * General options for all series types. */ interface HighchartsSeriesChart { /** @@ -3615,7 +3628,7 @@ interface HighchartsSeriesChart { * specified. In bar type series it applies to the bars unless a color is specified per point. The default value is * pulled from the options.colors array. */ - color?: string; + color?: string | HighchartsGradient; /** * Polar charts only. Whether to connect the ends of a line series plot across the extremes. * @default true @@ -3860,7 +3873,7 @@ interface HighchartsAreaChart extends HighchartsSeriesChart { * A separate color for the graph line. By default the line takes the color of the series, but the lineColor setting * allows setting a separate color for the line without altering the fillColor. */ - lineColor?: string; + lineColor?: string | HighchartsGradient; /** * A separate color for the negative part of the area. * @since 3.0 @@ -3902,7 +3915,7 @@ interface HighchartsBarChart extends HighchartsSeriesChart { * The color of the border surrounding each column or bar. * @default '#FFFFFF' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The corner radius of the border surrounding each column or bar. * @default 0 @@ -4263,7 +4276,7 @@ interface HighchartsFunnelChart extends HighchartsSeriesChart { * The color of the border surrounding each column or bar. * @default '#FFFFFF' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The width of the border surrounding each column or bar. * @default 1 @@ -4385,7 +4398,7 @@ interface HighchartsHeatMapChart extends HighchartsSeriesChart { * The color of the border surrounding each column or bar. * @default '#FFFFFF' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The corner radius of the border surrounding each column or bar. * @default 0 @@ -4468,7 +4481,7 @@ interface HighchartsPieChart extends HighchartsSeriesChart { * borderless pies. * @default '#FFFFFF' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The width of the border surrounding each column or bar. * @default 1 @@ -4573,7 +4586,7 @@ interface HighchartsPyramidChart extends HighchartsSeriesChart { * The color of the border surrounding each slice * @default '#FFFFFF' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The width of the border surrounding each slice * @default 1 @@ -4688,7 +4701,7 @@ interface HighchartsTreeMapChart extends HighchartsSeriesChart { * The color of the border surrounding each tree map item. * @default '#E0E0E0' */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The width of the border surrounding each column or bar. * @default 1 @@ -4783,7 +4796,7 @@ interface HighchartsWaterFallChart extends HighchartsBarChart { * @default '#333333' * @since 3.0 */ - lineColor?: string; + lineColor?: string | HighchartsGradient; /** * The color used specifically for positive point columns. When not specified, the general series color is used. */ @@ -4834,7 +4847,7 @@ interface HighchartsIndividualSeriesOptions { * specified. In bar type series it applies to the bars unless a color is specified per point. The default * value is pulled from the options.colors array. */ - color?: string; + color?: string | HighchartsGradient; /** * You can set the cursor to "pointer" if you have click events attached to the series, to signal to the user * that the points and lines can be clicked. @@ -4949,7 +4962,7 @@ interface HighchartsDataPoint { * Individual color for the point. By default the color is pulled from the global colors array. * @default undefined */ - color?: string; + color?: string | HighchartsGradient; /** * Serves a purpose only if a colorAxis object is defined in the chart options. This value will decide which color * the point gets from the scale of the colorAxis. @@ -5173,7 +5186,7 @@ interface HighchartsTitleOptions { } interface HighchartsCrosshairObject { - color?: string; + color?: string | HighchartsGradient; width?: number; dashStyle?: string; //Solid ShortDash ShortDot ShortDashDot ShortDashDotDot Dot Dash LongDash DashDot LongDashDot LongDashDotDot zIndex?: number; @@ -5200,7 +5213,7 @@ interface HighchartsTooltipOptions extends HighchartsSeriesTooltipOptions { * The color of the tooltip border. When null, the border takes the color of the corresponding series or point. * @default null */ - borderColor?: string; + borderColor?: string | HighchartsGradient; /** * The radius of the rounded border corners. * @default 3 @@ -5602,7 +5615,7 @@ interface HighchartsAxisObject { * @param {boolean | HighchartsAnimation} animation When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | HighchartsAnimation): void; + setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | HighchartsAnimation, eventArguments?: any): void; /** * Update the title of the axis after render time. * @param {HighchartsAxisTitle} title The new title options on the same format as given in xAxis.title. diff --git a/html-pdf/html-pdf-tests.ts b/html-pdf/html-pdf-tests.ts new file mode 100644 index 0000000000..6a214ef231 --- /dev/null +++ b/html-pdf/html-pdf-tests.ts @@ -0,0 +1,13 @@ +/// +/// + +import * as fs from 'fs'; +import * as pdf from 'html-pdf'; + +var html = fs.readFileSync('./test/businesscard.html', 'utf8'); +var options: pdf.CreateOptions = { format: 'Letter' }; + +pdf.create(html, options).toFile('./businesscard.pdf', (err: Error, res: pdf.FileInfo) => { + if (err) return console.log(err); + console.log(res); // { filename: '/app/businesscard.pdf' } +}); diff --git a/html-pdf/html-pdf.d.ts b/html-pdf/html-pdf.d.ts new file mode 100644 index 0000000000..07c4be9f71 --- /dev/null +++ b/html-pdf/html-pdf.d.ts @@ -0,0 +1,80 @@ +// Type definitions for html-pdf v2.1.0 +// Project: https://github.com/marcbachmann/node-html-pdf +// Definitions by: Seth Westphal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module 'html-pdf' { + + import * as fs from 'fs'; + + export interface CreateOptions { + + // Export options + directory?: string; + + // Papersize Options: http://phantomjs.org/api/webpage/property/paper-size.html + height?: string; + width?: string; + format?: 'A3' | 'A4' | 'A5' | 'Legal' | 'Letter' | 'Tabloid'; + orientation?: 'portrait' | 'landscape'; + + // Page options + border?: string | { + top?: string; + right?: string; + bottom?: string; + left?: string; + }; + + header?: { + height?: string; + contents?: string; + }; + footer?: { + height?: string; + contents?: { + first?: string; + [page: number]: string; + default?: string; + last?: string; + }; + }; + + // Rendering options + base?: string; + + // Zooming option, can be used to scale images if `options.type` is not pdf + zoomFactor?: string; + + // File options + type?: 'png' | 'jpeg' | 'pdf'; + quality?: string; + + // Script options + phantomPath?: string; + phantomArgs?: string[]; + script?: string; + timeout?: number; + + // HTTP Headers that are used for requests + httpHeaders?: { + [header: string]: string; + }; + + } + + export interface FileInfo { + filename: string; + } + + export interface CreateResult { + toBuffer(callback: (err: Error, buffer: Buffer) => void): void; + toFile(callback: (err: Error, res: FileInfo) => void): void; + toFile(filename?: string, callback?: (err: Error, res: FileInfo) => void): void; + toStream(callback: (err: Error, stream: fs.ReadStream) => void): void; + } + + export function create(html: string, options?: CreateOptions): CreateResult; +} diff --git a/humps/humps-tests.ts b/humps/humps-tests.ts new file mode 100644 index 0000000000..66017b065c --- /dev/null +++ b/humps/humps-tests.ts @@ -0,0 +1,71 @@ +/// + +// Tests evaluated from: +// https://github.com/domchristie/humps/blob/master/README.md + +import * as humps from "humps"; + +let someObject = { attr_one: 'foo', attr_two: 'bar' }; +let someArray = [{ attr_one: 'foo' }, { attr_one: 'bar' }] + +let someOptions: humps.HumpsOptions = { + separator: '-' +}; +let someOptions2: humps.HumpsOptions = { + split: /^[A-Z0-9_]+$/ +}; +let someOptions3: humps.HumpsOptions = { + separator: '-', + process: function (key: string, convert: humps.HumpsProcessorParameter, options: humps.HumpsOptions) { + return /^[A-Z0-9_]+$/.test(key) ? key : convert(key, options); + } +}; + + +humps.camelize('hello_world') + +humps.decamelize('fooBar') +humps.decamelize('fooBarBaz', someOptions) + +humps.camelizeKeys(someObject); + +humps.camelizeKeys(someArray); + +humps.camelizeKeys(someObject, function (key, convert) { + return /^[A-Z0-9_]+$/.test(key) ? key : convert(key); +}); + +humps.decamelizeKeys(someObject, function (key, convert, options) { + return /^[A-Z0-9_]+$/.test(key) ? key : convert(key, options); +}); + + +humps.camelize('hello_world-foo bar'); + +humps.pascalize('hello_world-foo bar'); + +humps.decamelize('helloWorldFooBar'); +humps.decamelize('helloWorldFooBar', someOptions); +humps.decamelize('helloWorld1', { split: /(?=[A-Z0-9])/ }) + +humps.depascalize('helloWorldFooBar'); + +humps.camelizeKeys(someObject); +humps.pascalizeKeys(someObject); +humps.decamelizeKeys(someObject); +humps.depascalizeKeys(someObject); + +humps.camelizeKeys(someObject, someOptions); +humps.pascalizeKeys(someObject, someOptions); +humps.decamelizeKeys(someObject, someOptions); +humps.depascalizeKeys(someObject, someOptions); + +humps.camelizeKeys(someObject, someOptions2); +humps.pascalizeKeys(someObject, someOptions2); +humps.decamelizeKeys(someObject, someOptions2); +humps.depascalizeKeys(someObject, someOptions2); + +humps.camelizeKeys(someObject, someOptions3); +humps.pascalizeKeys(someObject, someOptions3); +humps.decamelizeKeys(someObject, someOptions3); +humps.depascalizeKeys(someObject, someOptions3); diff --git a/humps/humps.d.ts b/humps/humps.d.ts new file mode 100644 index 0000000000..87f3bbd991 --- /dev/null +++ b/humps/humps.d.ts @@ -0,0 +1,39 @@ +// Type definitions for humps v1.1.0 +// Project: https://github.com/domchristie/humps +// Definitions by: Niklas Mollenhauer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace humps { + + function camelize(value: string): string; + function pascalize(value: string): string; + function decamelize(value: string, optionsOrProcessor?: OptionOrProcessor): string; + function depascalize(value: string, optionsOrProcessor?: OptionOrProcessor): string; + + function camelizeKeys(str: Object, optionsOrProcessor?: OptionOrProcessor): Object; + function pascalizeKeys(str: Object, optionsOrProcessor?: OptionOrProcessor): Object; + function decamelizeKeys(str: Object, optionsOrProcessor?: OptionOrProcessor): Object; + function depascalizeKeys(str: Object, optionsOrProcessor?: OptionOrProcessor): Object; + + function camelizeKeys(str: Object[], optionsOrProcessor?: OptionOrProcessor): Object[]; + function pascalizeKeys(str: Object[], optionsOrProcessor?: OptionOrProcessor): Object[]; + function decamelizeKeys(str: Object[], optionsOrProcessor?: OptionOrProcessor): Object[]; + function depascalizeKeys(str: Object[], optionsOrProcessor?: OptionOrProcessor): Object[]; + + interface HumpsOptions { + separator?: string; + split?: RegExp; + process?: HumpsProcessor; + } + interface HumpsProcessor { + (key: string, convert: HumpsProcessorParameter, options?: HumpsOptions): string; + } + interface HumpsProcessorParameter { + (key: string, options?: HumpsOptions): string; + } + type OptionOrProcessor = HumpsOptions | HumpsProcessor; +} + +declare module "humps" { + export = humps; +} diff --git a/hyperscript/hyperscript-tests.ts b/hyperscript/hyperscript-tests.ts new file mode 100644 index 0000000000..b850bbf4cb --- /dev/null +++ b/hyperscript/hyperscript-tests.ts @@ -0,0 +1,58 @@ +/// +import * as h from 'hyperscript' + +// Test/example code adapted from https://github.com/dominictarr/hyperscript/blob/master/README.md + +// example +h('div#page', + h('div#header', + h('h1.classy', 'h', { style: {'background-color': '#22f'} })), + h('div#menu', { style: {'background-color': '#2f2'} }, + h('ul', + h('li', 'one'), + h('li', 'two'), + h('li', 'three'))), + h('h2', 'content title', { style: {'background-color': '#f22'} }), + h('p', + "so it's just like a templating engine,\n", + "but easy to use inline with javascript\n"), + h('p', + "the intension is for this to be used to create\n", + "reusable, interactive html widgets. ")) + +// event +h('a', {href: '#', + onclick: function (e: Event) { + alert('you are 1,000,000th visitor!') + e.preventDefault() + } +}, 'click here to win a prize') + +// array of children +const obj: {[id: string]: string} = { + a: 'Apple', + b: 'Banana', + c: 'Cherry', + d: 'Durian', + e: 'Elder Berry' +} +h('table', + h('tr', h('th', 'letter'), h('th', 'fruit')), + Object.keys(obj).map(function (k) { + return h('tr', + h('th', k), + h('td', obj[k]) + ) + }) +) + +// new context +const h2 = h.context() +h2('a', {href: '#', + onclick: function (e: Event) { + alert('you are 1,000,000th visitor!') + e.preventDefault() + } +}, "Click this") + +h2.cleanup() diff --git a/hyperscript/hyperscript.d.ts b/hyperscript/hyperscript.d.ts new file mode 100644 index 0000000000..4274365404 --- /dev/null +++ b/hyperscript/hyperscript.d.ts @@ -0,0 +1,19 @@ +// Type definitions for hyperscript +// Project: https://github.com/dominictarr/hyperscript +// Definitions by: Mike Linkovich +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'hyperscript' { + + interface HyperScript { + /** Creates an HTML element */ + (tagName: string, ...args: any[]): HTMLElement; + /** Cleans up any event handlers created by this hyperscript context */ + cleanup(): void; + /** Creates a new hyperscript context */ + context(): HyperScript; + } + + const h: HyperScript; + export = h; +} diff --git a/i18next-xhr-backend/i18next-xhr-backend-tests.ts b/i18next-xhr-backend/i18next-xhr-backend-tests.ts new file mode 100644 index 0000000000..404eb30297 --- /dev/null +++ b/i18next-xhr-backend/i18next-xhr-backend-tests.ts @@ -0,0 +1,21 @@ +/// +/// + +import * as i18next from 'i18next'; +import XHR from 'i18next-xhr-backend'; + +let options = { + loadPath: '', + addPath: '', + allowMultiLoading: false, + parse: function(data:string) { return data.replace(/a/g, ''); }, + crossDomain: false, + withCredentials: false, + ajax: function (url:string, options:Object, callback: Function, data: Object) {} +}; + +i18next.use(XHR).init({ + backend: options +}); + +let xhr = new XHR(null, options); \ No newline at end of file diff --git a/i18next-xhr-backend/i18next-xhr-backend.d.ts b/i18next-xhr-backend/i18next-xhr-backend.d.ts new file mode 100644 index 0000000000..d1c95a0bd3 --- /dev/null +++ b/i18next-xhr-backend/i18next-xhr-backend.d.ts @@ -0,0 +1,36 @@ +// Type definitions for i18next-xhr-backend 1.2.0 +// Project: https://github.com/i18next/i18next-xhr-backend +// Definitions by: Jan Mühlemann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'i18next-xhr-backend' { + + interface Interpolator { + interpolate: () => string + } + interface Services { + interpolator: Interpolator + } + + interface BackendOptions { + loadPath?: string | Function, + addPath?: string, + allowMultiLoading?: boolean, + parse?: Function, + crossDomain?: boolean, + withCredentials?: boolean, + ajax?: Function + } + + export default class Backend { + type: 'backend'; + services: Services; + options: BackendOptions; + constructor(services?: Services, options?: BackendOptions); + init(services?: Services, options?: BackendOptions): void; + readMulti(languages: any[], namespaces: any[], callback: Function): void; + read(language: {}, namespace: {}, callback: Function): void; + loadUrl(url: string, callback: Function): void; + create(languages: any[], namespace: string, key: string, fallbackValue: string): void; + } +} \ No newline at end of file diff --git a/imap-simple/imap-simple-tests.ts b/imap-simple/imap-simple-tests.ts new file mode 100644 index 0000000000..c4d0dee1d3 --- /dev/null +++ b/imap-simple/imap-simple-tests.ts @@ -0,0 +1,85 @@ +/// + +import * as imaps from "imap-simple"; + +let config = { + imap: { + user: "your@email.address", + password: "yourpassword", + host: "imap.gmail.com", + port: 993, + tls: true, + authTimeout: 3000 + } +}; + +imaps.connect(config).then(function (connection) { + + return connection.openBox("INBOX").then(function () { + let searchCriteria = [ + "UNSEEN" + ]; + + let fetchOptions = { + bodies: ["HEADER", "TEXT"], + markSeen: false + }; + + return connection.search(searchCriteria, fetchOptions).then(function (results) { + let subjects = results.map(function (res) { + return res.parts.filter(function (part) { + return part.which === "HEADER"; + })[0].body.subject[0]; + }); + + console.log(subjects); + // => + // [ "Hey Chad, long time no see!", + // "Your amazon.com monthly statement", + // "Hacker Newsletter Issue #445" ] + }); + }); +}); + +imaps.connect(config).then(function (connection) { + + connection.openBox("INBOX").then(function () { + + // Fetch emails from the last 24h + let delay = 24 * 3600 * 1000; + let yesterday = new Date(); + yesterday.setTime(Date.now() - delay); + let yesterdayString = yesterday.toISOString(); + let searchCriteria = ["UNSEEN", ["SINCE", yesterdayString]]; + let fetchOptions = { bodies: ["HEADER.FIELDS (FROM TO SUBJECT DATE)"], struct: true }; + + // retrieve only the headers of the messages + return connection.search(searchCriteria, fetchOptions); + }).then(function (messages) { + + let attachments: Promise<{filename: string, data: any}>[] = []; + + messages.forEach(function (message) { + let parts = imaps.getParts(message.attributes.struct); + attachments = attachments.concat(parts.filter(function (part) { + return part.disposition && part.disposition.type === "ATTACHMENT"; + }).map(function (part) { + // retrieve the attachments only of the messages with attachments + return connection.getPartData(message, part) + .then(function (partData) { + return { + filename: part.disposition.params.filename, + data: partData + }; + }); + })); + }); + + return Promise.all<{filename: string, data: any}>(attachments); + }).then(function (attachments: {filename: string, data: any}[]) { + console.log(attachments); + // => + // [ { filename: "cats.jpg", data: Buffer() }, + // { filename: "pay-stub.pdf", data: Buffer() } ] + }); +}); diff --git a/imap-simple/imap-simple.d.ts b/imap-simple/imap-simple.d.ts new file mode 100644 index 0000000000..c7e66c4997 --- /dev/null +++ b/imap-simple/imap-simple.d.ts @@ -0,0 +1,75 @@ +// Type definitions for imap-simple v1.6.3 +// Project: https://github.com/chadxz/imap-simple +// Definitions by: Jeffery Grajkowski +// Definitions: https://github.com/psnider/DefinitelyTyped/imap-simple + +/// + +declare namespace IMAPS { + + export interface ImapSimpleOptions { + /** Options to pass to node-imap constructor. */ + imap: IMAP.Config; + + /** Time in milliseconds to wait before giving up on a connection attempt. (Deprecated: please use options.imap.authTimeout instead) */ + connectTimeout?: number; + } + + export interface MessageBodyPart extends IMAP.ImapMessageBodyInfo { + /** string type where which=='TEXT', complex Object where which=='HEADER' */ + body: any; + } + + export interface Message { + attributes: IMAP.ImapMessageAttributes; + parts: MessageBodyPart[]; + } + + export class ImapSimple { + constructor(imap: IMAP.Connection); + + /** Open a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */ + openBox(boxName: string, callback: (err: Error, boxName: string) => void): void; + openBox(boxName: string): Promise; + + /** Search for and retrieve mail in the previously opened mailbox. */ + search(searchCriteria: any[], fetchOptions: IMAP.FetchOptions, callback: (err: Error, messages: Message[]) => void): void; + search(searchCriteria: any[], fetchOptions: IMAP.FetchOptions): Promise; + + /** Close the connection to the imap server. */ + end(): void; + + /** Downloads part data (which is either part of the message body, or an attachment). Upon success, either the provided callback will be called with signature (err, data), or the returned promise will be resolved with data. The data will be automatically decoded based on its encoding. If the encoding of the part is not supported, an error will occur. */ + getPartData(message: Message, part: any, callback: (err: Error, data: any) => void): void; + getPartData(message: Message, part: any): Promise; + + /** Adds the provided label(s) to the specified message(s). source corresponds to a node-imap MessageSource which specifies the messages to be moved. label is either a string or array of strings indicating the labels to add. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ + addMessageLabel(source: string | string[], label: string | string[], callback: (err: Error) => void): void; + addMessageLabel(source: string | string[], label: string | string[]): Promise; + + /** Moves the specified message(s) in the currently open mailbox to another mailbox. source corresponds to a node-imap MessageSource which specifies the messages to be moved. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ + moveMessage(source: string | string[], boxName: string, callback: (err: Error) => void): void; + moveMessage(source: string | string[], boxName: string): Promise; + } + + /** Error thrown when a connection attempt has timed out. */ + export class ConnectionTimeoutError extends Error { + timeout: number; + constructor(timeout: number); + } +} + +declare module "imap-simple" { + /** Main entry point. Connect to an Imap server. */ + export function connect(options: IMAPS.ImapSimpleOptions, callback: (err: Error, connection: IMAPS.ImapSimple) => void): void; + export function connect(options: IMAPS.ImapSimpleOptions): Promise; + + export namespace errors { + export import ConnectionTimeoutError = IMAPS.ConnectionTimeoutError; + } + + export import ImapSimple = IMAPS.ImapSimple; + + /** Given the message.attributes.struct, retrieve a flattened array of parts objects that describe the structure of the different parts of the message's body. Useful for getting a simple list to iterate for the purposes of, for example, finding all attachments. */ + export function getParts(struct: any[]): any[]; +} diff --git a/imap/imap.d.ts b/imap/imap.d.ts index 1531035152..07a7c8fe9a 100644 --- a/imap/imap.d.ts +++ b/imap/imap.d.ts @@ -236,7 +236,7 @@ declare namespace IMAP { serverSupports(capability: string): boolean; } - export class Connection implements NodeJS.EventEmitter, MessageFunctions { + export class Connection extends NodeJS.EventEmitter implements MessageFunctions { /** @constructor */ constructor(config: Config); diff --git a/incremental-dom/incremental-dom.d.ts b/incremental-dom/incremental-dom.d.ts index 56fd84542f..5a80e82d70 100644 --- a/incremental-dom/incremental-dom.d.ts +++ b/incremental-dom/incremental-dom.d.ts @@ -27,7 +27,7 @@ declare module "incremental-dom" { * @param {...*} var_args Attribute name/value pairs of the dynamic attributes * for the Element. */ - export var elementOpen: (tag: string, key?: string, statics?: any[], ...var_args: any[]) => void; + export var elementOpen: (tag: string, key?: string, statics?: any[], ...var_args: any[]) => HTMLElement; /** * Declares a virtual Element at the current location in the document. This * corresponds to an opening tag and a elementClose tag is required. This is @@ -54,11 +54,11 @@ declare module "incremental-dom" { /** * Closes an open tag started with elementOpenStart. */ - export var elementOpenEnd: () => void; + export var elementOpenEnd: () => HTMLElement; /** * Closes an open virtual Element. */ - export var elementClose: (tag: string) => void; + export var elementClose: (tag: string) => HTMLElement; /** * Declares a virtual Element at the current location in the document that has * no children. @@ -72,11 +72,11 @@ declare module "incremental-dom" { * @param {...*} var_args Attribute name/value pairs of the dynamic attributes * for the Element. */ - export var elementVoid: (tag: string, key?: string, statics?: any, ...var_args: any[]) => void; + export var elementVoid: (tag: string, key?: string, statics?: any, ...var_args: any[]) => HTMLElement; /** * Declares a virtual Text at this point in the document. * * @param {string} value The text of the Text. */ - export var text: (value: string) => void; + export var text: (value: string) => Text; } diff --git a/inversify-binding-decorators/inversify-binding-decorators-tests.ts b/inversify-binding-decorators/inversify-binding-decorators-tests.ts index 9b0dff520e..8ca0acc551 100644 --- a/inversify-binding-decorators/inversify-binding-decorators-tests.ts +++ b/inversify-binding-decorators/inversify-binding-decorators-tests.ts @@ -4,51 +4,52 @@ import { inject, Kernel } from "inversify"; import { autoProvide, makeProvideDecorator, makeFluentProvideDecorator } from "inversify-binding-decorators"; module decorator { + let kernel = new Kernel(); let provide = makeProvideDecorator(kernel); - interface INinja { + interface Warrior { fight(): string; sneak(): string; } - interface IKatana { + interface Weapon { hit(): string; } - interface IShuriken { + interface ThrowableWeapon { throw(): string; } let TYPE = { - IKatana: "IKatana", - INinja: "INinja", - IShuriken: "IShuriken" + ThrowableWeapon: "ThrowableWeapon", + Warrior: "Warrior", + Weapon: "Weapon" }; - @provide(TYPE.IKatana) - class Katana implements IKatana { + @provide(TYPE.Weapon) + class Katana implements Weapon { public hit() { return "cut!"; } } - @provide(TYPE.IShuriken) - class Shuriken implements IShuriken { + @provide(TYPE.ThrowableWeapon) + class Shuriken implements ThrowableWeapon { public throw() { return "hit!"; } } - @provide(TYPE.INinja) - class Ninja implements INinja { + @provide(TYPE.Warrior) + class Ninja implements Warrior { - private _katana: IKatana; - private _shuriken: IShuriken; + private _katana: Weapon; + private _shuriken: ThrowableWeapon; public constructor( - @inject("IKatana") katana: IKatana, - @inject("IShuriken") shuriken: IShuriken + @inject(TYPE.Weapon) katana: Weapon, + @inject(TYPE.ThrowableWeapon) shuriken: ThrowableWeapon ) { this._katana = katana; this._shuriken = shuriken; @@ -59,12 +60,13 @@ module decorator { } - let ninja = kernel.get(TYPE.INinja); + let ninja = kernel.get(TYPE.Warrior); console.log(ninja); } module fluent_decorator { + let kernel = new Kernel(); let provide = makeFluentProvideDecorator(kernel); @@ -76,27 +78,27 @@ module fluent_decorator { return provide(identifier).done(); }; - interface INinja { + interface Warrior { fight(): string; sneak(): string; } - interface IKatana { + interface Weapon { hit(): string; } - interface IShuriken { + interface ThrowableWeapon { throw(): string; } let TYPE = { - IKatana: "IKatana", - INinja: "INinja", - IShuriken: "IShuriken" + ThrowableWeapon: "ThrowableWeapon", + Warrior: "Warrior", + Weapon: "Weapon" }; - @provideSingleton(TYPE.IKatana) - class Katana implements IKatana { + @provideSingleton(TYPE.Weapon) + class Katana implements Weapon { private _mark: any; public constructor() { this._mark = Math.random(); @@ -106,8 +108,8 @@ module fluent_decorator { } } - @provideTransient(TYPE.IShuriken) - class Shuriken implements IShuriken { + @provideTransient(TYPE.ThrowableWeapon) + class Shuriken implements ThrowableWeapon { private _mark: any; public constructor() { this._mark = Math.random(); @@ -117,15 +119,15 @@ module fluent_decorator { } } - @provideTransient(TYPE.INinja) - class Ninja implements INinja { + @provideTransient(TYPE.Warrior) + class Ninja implements Warrior { - private _katana: IKatana; - private _shuriken: IShuriken; + private _katana: Weapon; + private _shuriken: ThrowableWeapon; public constructor( - @inject("IKatana") katana: IKatana, - @inject("IShuriken") shuriken: IShuriken + @inject(TYPE.Weapon) katana: Weapon, + @inject(TYPE.ThrowableWeapon) shuriken: ThrowableWeapon ) { this._katana = katana; this._shuriken = shuriken; @@ -136,7 +138,7 @@ module fluent_decorator { } - let ninja = kernel.get(TYPE.INinja); + let ninja = kernel.get(TYPE.Warrior); console.log(ninja); } diff --git a/inversify-binding-decorators/inversify-binding-decorators.d.ts b/inversify-binding-decorators/inversify-binding-decorators.d.ts index 623b6c32c7..d5f92132a3 100644 --- a/inversify-binding-decorators/inversify-binding-decorators.d.ts +++ b/inversify-binding-decorators/inversify-binding-decorators.d.ts @@ -1,4 +1,4 @@ -// Type definitions for inversify 1.0.0-beta.5 +// Type definitions for inversify-binding-decorators 1.0.0 // Project: https://github.com/inversify/inversify-binding-decorators // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -7,46 +7,50 @@ declare namespace inversifyBindingDecorators { - interface IProvideInSyntax extends IProvideDoneSyntax { - inSingletonScope(): IProvideWhenOnSyntax; - } + namespace interfaces { - interface IProvideDoneSyntax { - done(): (target: any) => any; - } + export interface ProvideInSyntax extends ProvideDoneSyntax { + inSingletonScope(): ProvideWhenOnSyntax; + } - interface IProvideOnSyntax extends IProvideDoneSyntax { - onActivation(fn: (context: inversify.interfaces.Context, injectable: T) => T): IProvideWhenSyntax; - } + export interface ProvideDoneSyntax { + done(): (target: any) => any; + } - interface IProvideInWhenOnSyntax extends IProvideInSyntax, IProvideWhenSyntax, IProvideOnSyntax {} + export interface ProvideOnSyntax extends ProvideDoneSyntax { + onActivation(fn: (context: inversify.interfaces.Context, injectable: T) => T): ProvideWhenSyntax; + } - interface IProvideWhenOnSyntax extends IProvideWhenSyntax, IProvideOnSyntax {} + export interface ProvideInWhenOnSyntax extends ProvideInSyntax, ProvideWhenSyntax, ProvideOnSyntax {} + + export interface ProvideWhenOnSyntax extends ProvideWhenSyntax, ProvideOnSyntax {} + + export interface ProvideWhenSyntax extends ProvideDoneSyntax { + when(constraint: (request: inversify.interfaces.Request) => boolean): ProvideOnSyntax; + whenTargetNamed(name: string): ProvideOnSyntax; + whenTargetTagged(tag: string, value: any): ProvideOnSyntax; + whenInjectedInto(parent: (Function|string)): ProvideOnSyntax; + whenParentNamed(name: string): ProvideOnSyntax; + whenParentTagged(tag: string, value: any): ProvideOnSyntax; + whenAnyAncestorIs(ancestor: (Function|string)): ProvideOnSyntax; + whenNoAncestorIs(ancestor: (Function|string)): ProvideOnSyntax; + whenAnyAncestorNamed(name: string): ProvideOnSyntax; + whenAnyAncestorTagged(tag: string, value: any): ProvideOnSyntax; + whenNoAncestorNamed(name: string): ProvideOnSyntax; + whenNoAncestorTagged(tag: string, value: any): ProvideOnSyntax; + whenAnyAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): ProvideOnSyntax; + whenNoAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): ProvideOnSyntax; + } - interface IProvideWhenSyntax extends IProvideDoneSyntax { - when(constraint: (request: inversify.interfaces.Request) => boolean): IProvideOnSyntax; - whenTargetNamed(name: string): IProvideOnSyntax; - whenTargetTagged(tag: string, value: any): IProvideOnSyntax; - whenInjectedInto(parent: (Function|string)): IProvideOnSyntax; - whenParentNamed(name: string): IProvideOnSyntax; - whenParentTagged(tag: string, value: any): IProvideOnSyntax; - whenAnyAncestorIs(ancestor: (Function|string)): IProvideOnSyntax; - whenNoAncestorIs(ancestor: (Function|string)): IProvideOnSyntax; - whenAnyAncestorNamed(name: string): IProvideOnSyntax; - whenAnyAncestorTagged(tag: string, value: any): IProvideOnSyntax; - whenNoAncestorNamed(name: string): IProvideOnSyntax; - whenNoAncestorTagged(tag: string, value: any): IProvideOnSyntax; - whenAnyAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): IProvideOnSyntax; - whenNoAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): IProvideOnSyntax; } export function autoProvide(kernel: inversify.interfaces.Kernel, ...modules: any[]): void; export function makeProvideDecorator(kernel: inversify.interfaces.Kernel): - (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => (target: any) => any; + (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => (target: any) => any; export function makeFluentProvideDecorator(kernel: inversify.interfaces.Kernel): - (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => IProvideInWhenOnSyntax; + (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => interfaces.ProvideInWhenOnSyntax; } diff --git a/inversify-devtools/inversify-devtools-test.ts b/inversify-devtools/inversify-devtools-test.ts new file mode 100644 index 0000000000..3b99d7df93 --- /dev/null +++ b/inversify-devtools/inversify-devtools-test.ts @@ -0,0 +1,8 @@ +/// + +import render from "inversify-devtools"; +import { Kernel } from "inversify"; + +let connectKernel = render("root"); +let kernel = new Kernel(); +connectKernel(kernel); diff --git a/inversify-devtools/inversify-devtools.d.ts b/inversify-devtools/inversify-devtools.d.ts new file mode 100644 index 0000000000..841ae228c5 --- /dev/null +++ b/inversify-devtools/inversify-devtools.d.ts @@ -0,0 +1,15 @@ +// Type definitions for inversify-devtools 1.0.0 +// Project: https://github.com/inversify/inversify-devtools +// Definitions by: inversify +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface ConnectKernel extends Function { + (kernel: inversify.interfaces.Kernel): void; +} + +declare module "inversify-devtools" { + let render: (container: string) => ConnectKernel; + export default render; +} diff --git a/inversify-express-utils/inversify-express-utils-tests.ts b/inversify-express-utils/inversify-express-utils-tests.ts index 1d421e397a..b082546448 100644 --- a/inversify-express-utils/inversify-express-utils-tests.ts +++ b/inversify-express-utils/inversify-express-utils-tests.ts @@ -1,21 +1,23 @@ /// -import { InversifyExpressServer, Controller, Get, All, Delete, Head, Put, Patch, Post, Method } from "inversify-express-utils"; +import { InversifyExpressServer, Controller, Get, All, Delete, Head, Put, Patch, Post, Method, TYPE } from "inversify-express-utils"; import * as express from "express"; import { Kernel } from "inversify"; +let kernel = new Kernel(); + module server { - let kernel = new Kernel(); + let server = new InversifyExpressServer(kernel); server - .setConfig((app) => { + .setConfig((app: express.Application) => { app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { console.log("hello world"); next(); }); }) - .setErrorConfig((app) => { + .setErrorConfig((app: express.Application) => { app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => { console.error(err.stack); res.status(500).send("Something broke!"); @@ -55,6 +57,8 @@ module decorators { public testMethod() { return "METHOD:FOO"; } } + kernel.bind(TYPE.Controller).to(TestController); + function m1(req: express.Request, res: express.Response, next: express.NextFunction) { next(); } function m2(req: express.Request, res: express.Response, next: express.NextFunction) { next(); } function m3(req: express.Request, res: express.Response, next: express.NextFunction) { next(); } diff --git a/inversify-express-utils/inversify-express-utils.d.ts b/inversify-express-utils/inversify-express-utils.d.ts index aa9a20d23c..f90b0cac88 100644 --- a/inversify-express-utils/inversify-express-utils.d.ts +++ b/inversify-express-utils/inversify-express-utils.d.ts @@ -1,4 +1,4 @@ -// Type definitions for inversify 1.0.0-alpha.4 +// Type definitions for inversify-express-utils 1.0.0 // Project: https://github.com/inversify/inversify-express-utils // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -11,40 +11,50 @@ declare module "inversify-express-utils" { import * as express from "express"; import * as inversify from "inversify"; - interface IInversifyExpressServerConstructor { - new(kernel: inversify.interfaces.Kernel): IInversifyExpressServer; + export namespace interfaces { + + export interface InversifyExpressServerConstructor { + new(kernel: inversify.interfaces.Kernel): InversifyExpressServer; + } + + export interface InversifyExpressServer { + setConfig(fn: ConfigFunction): InversifyExpressServer; + setErrorConfig(fn: ConfigFunction): InversifyExpressServer; + build(): express.Application; + } + + export interface ConfigFunction { + (app: express.Application): void; + } + + export interface HandlerDecoratorFactory { + (path: string, ...middleware: express.RequestHandler[]): HandlerDecorator; + } + + export interface HandlerDecorator { + (target: any, key: string, value: any): void; + } + } - interface IInversifyExpressServer { - setConfig(fn: IConfigFunction): IInversifyExpressServer; - setErrorConfig(fn: IConfigFunction): IInversifyExpressServer; - build(): express.Application; + export interface Controller {} + + interface ServiceIdentifiers { + Controller: Symbol; } - interface IConfigFunction { - (app: express.Application): void; - } - - interface IHandlerDecoratorFactory { - (path: string, ...middleware: express.RequestHandler[]): IHandlerDecorator; - } - - interface IHandlerDecorator { - (target: any, key: string, value: any): void; - } - - export interface IController {} - - export var InversifyExpressServer: IInversifyExpressServerConstructor; + export var InversifyExpressServer: interfaces.InversifyExpressServerConstructor; export var Controller: (path: string, ...middleware: express.RequestHandler[]) => (target: any) => void; - export var All: IHandlerDecoratorFactory; - export var Get: IHandlerDecoratorFactory; - export var Post: IHandlerDecoratorFactory; - export var Put: IHandlerDecoratorFactory; - export var Patch: IHandlerDecoratorFactory; - export var Head: IHandlerDecoratorFactory; - export var Delete: IHandlerDecoratorFactory; - export var Method: (method: string, path: string, ...middleware: express.RequestHandler[]) => IHandlerDecorator; + export var All: interfaces.HandlerDecoratorFactory; + export var Get: interfaces.HandlerDecoratorFactory; + export var Post: interfaces.HandlerDecoratorFactory; + export var Put: interfaces.HandlerDecoratorFactory; + export var Patch: interfaces.HandlerDecoratorFactory; + export var Head: interfaces.HandlerDecoratorFactory; + export var Delete: interfaces.HandlerDecoratorFactory; + export var Method: (method: string, path: string, ...middleware: express.RequestHandler[]) => interfaces.HandlerDecorator; + export var TYPE: ServiceIdentifiers; + } diff --git a/inversify-inject-decorators/inversify-inject-decorators.d.ts b/inversify-inject-decorators/inversify-inject-decorators.d.ts index 032ed40cdd..34244c6d5e 100644 --- a/inversify-inject-decorators/inversify-inject-decorators.d.ts +++ b/inversify-inject-decorators/inversify-inject-decorators.d.ts @@ -1,4 +1,4 @@ -// Type definitions for inversify-inject-decorators 1.0.0-beta.1 +// Type definitions for inversify-inject-decorators 1.0.0 // Project: https://github.com/inversify/inversify-inject-decorators // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -7,26 +7,25 @@ declare namespace inversifyInjectDecorators { - interface InjectDecorators { + export interface InjectDecorators { - lazyInject: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => + lazyInject: (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => (proto: any, key: string) => void; - lazyInjectNamed: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable), named: string) => + lazyInjectNamed: (serviceIdentifier: inversify.interfaces.ServiceIdentifier, named: string) => (proto: any, key: string) => void; - lazyInjectTagged: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable), key: string, value: any) => + lazyInjectTagged: (serviceIdentifier: inversify.interfaces.ServiceIdentifier, key: string, value: any) => (proto: any, propertyName: string) => void; - lazyMultiInject: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => + lazyMultiInject: (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => (proto: any, key: string) => void; } - export function getDecorators(kernel: inversify.interfaces.Kernel): InjectDecorators; - } declare module "inversify-inject-decorators" { - export default inversifyInjectDecorators.getDecorators; + let getDecorators: (kernel: inversify.interfaces.Kernel) => inversifyInjectDecorators.InjectDecorators; + export default getDecorators; } diff --git a/inversify-logger-middleware/inversify-logger-middleware-tests.ts b/inversify-logger-middleware/inversify-logger-middleware-tests.ts index c9c7d5c8a8..3b2119911a 100644 --- a/inversify-logger-middleware/inversify-logger-middleware-tests.ts +++ b/inversify-logger-middleware/inversify-logger-middleware-tests.ts @@ -4,23 +4,23 @@ declare var kernel: inversify.interfaces.Kernel; import { makeLoggerMiddleware, textSerializer } from "inversify-logger-middleware"; -interface ILoggerOutput { +interface LoggerOutput { entry: T; } -let makeStringRenderer = function (loggerOutput: ILoggerOutput) { - return function (entry: inversifyLoggerMiddleware.ILogEntry) { +let makeStringRenderer = function (loggerOutput: LoggerOutput) { + return function (entry: inversifyLoggerMiddleware.interfaces.LogEntry) { loggerOutput.entry = textSerializer(entry); }; }; -let makeObjRenderer = function (loggerOutput: ILoggerOutput) { - return function (entry: inversifyLoggerMiddleware.ILogEntry) { +let makeObjRenderer = function (loggerOutput: LoggerOutput) { + return function (entry: inversifyLoggerMiddleware.interfaces.LogEntry) { loggerOutput.entry = entry; }; }; -let options: inversifyLoggerMiddleware.ILoggerSettings = { +let options: inversifyLoggerMiddleware.interfaces.LoggerSettings = { request: { bindings: { activated: true, @@ -48,12 +48,12 @@ let options: inversifyLoggerMiddleware.ILoggerSettings = { let logger = makeLoggerMiddleware(); kernel.applyMiddleware(logger); -let loggerOutput1: ILoggerOutput = { entry: null }; +let loggerOutput1: LoggerOutput = { entry: null }; let stringRenderer1 = makeStringRenderer(loggerOutput1); let logger1 = makeLoggerMiddleware(options, stringRenderer1); kernel.applyMiddleware(logger1); -let loggerOutput2: ILoggerOutput = { entry: null }; +let loggerOutput2: LoggerOutput = { entry: null }; let objRenderer2 = makeObjRenderer(loggerOutput2); let logger2 = makeLoggerMiddleware(options, objRenderer2); kernel.applyMiddleware(logger2); diff --git a/inversify-logger-middleware/inversify-logger-middleware.d.ts b/inversify-logger-middleware/inversify-logger-middleware.d.ts index 3aa4ccca18..cd0037f432 100644 --- a/inversify-logger-middleware/inversify-logger-middleware.d.ts +++ b/inversify-logger-middleware/inversify-logger-middleware.d.ts @@ -1,4 +1,4 @@ -// Type definitions for inversify 1.0.0-beta.6 +// Type definitions for inversify-logger-middleware 1.0.0 // Project: https://github.com/inversify/inversify-logger-middleware // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -7,50 +7,61 @@ declare namespace inversifyLoggerMiddleware { - export interface ILoggerSettings { - request?: IRequestLoggerSettings; - time?: boolean; + export namespace interfaces { + + export interface LoggerSettings { + request?: RequestLoggerSettings; + time?: boolean; + } + + export interface RequestLoggerSettings { + serviceIdentifier?: boolean; + bindings?: BindingLoggerSettings; + target?: TargetLoggerSettings; + } + + export interface BindingLoggerSettings { + activated?: boolean; + serviceIdentifier?: boolean; + implementationType?: boolean; + factory?: boolean; + provider?: boolean; + constraint?: boolean; + onActivation?: boolean; + cache?: boolean; + dynamicValue?: boolean; + scope?: boolean; + type?: boolean; + } + + export interface TargetLoggerSettings { + serviceIdentifier?: boolean; + name?: boolean; + metadata?: boolean; + } + + export interface LogEntry { + error: boolean; + exception: any; + guid: string; + multiInject: boolean; + results: any[]; + rootRequest: inversify.interfaces.Request; + serviceIdentifier: any; + target: any; + time: string; + } + } - export interface IRequestLoggerSettings { - serviceIdentifier?: boolean; - bindings?: IBindingLoggerSettings; - target?: ITargetLoggerSettings; - } + export function makeLoggerMiddleware( + settings?: interfaces.LoggerSettings, + renderer?: (out: interfaces.LogEntry) => void + ): inversify.interfaces.Middleware; - export interface IBindingLoggerSettings { - activated?: boolean; - serviceIdentifier?: boolean; - implementationType?: boolean; - factory?: boolean; - provider?: boolean; - constraint?: boolean; - onActivation?: boolean; - cache?: boolean; - dynamicValue?: boolean; - scope?: boolean; - type?: boolean; - } - - export interface ITargetLoggerSettings { - serviceIdentifier?: boolean; - name?: boolean; - metadata?: boolean; - } - - export interface ILogEntry { - error: boolean; - exception: any; - multiInject: boolean; - results: any[]; - rootRequest: inversify.interfaces.Request; - serviceIdentifier: any; - target: any; - time: string; - } - - export function makeLoggerMiddleware(settings?: ILoggerSettings, renderer?: (out: ILogEntry) => void): inversify.interfaces.Middleware; - export function textSerializer(entry: ILogEntry): string; + export function textSerializer(entry: interfaces.LogEntry): string; + export function bindingTypeFormatter(type: number): string; + export function scopeFormatter(scope: number): string; } diff --git a/inversify-restify-utils/inversify-restify-utils-tests.ts b/inversify-restify-utils/inversify-restify-utils-tests.ts new file mode 100644 index 0000000000..5ff3ddc633 --- /dev/null +++ b/inversify-restify-utils/inversify-restify-utils-tests.ts @@ -0,0 +1,91 @@ +/// + +import { + InversifyRestifyServer, Controller, Get, Options, + Delete, Head, Put, Patch, Post, Method, TYPE +} from "inversify-restify-utils"; + +import * as restify from "restify"; +import { Kernel } from "inversify"; + +let kernel = new Kernel(); + +module server { + + let server = new InversifyRestifyServer(kernel); + + server + .setConfig((app: restify.Server) => { + app.use((req: restify.Request, res: restify.Response, next: restify.Next) => { + console.log("hello world"); + next(); + }); + }) + .build() + .listen(3000, "localhost"); +} + +module decorators { + + @Controller("/") + class TestController { + + @Get("/") + public testGet() { return "GET"; } + + @Options("/") + public testAll() { return "OPTIONS"; } + + @Delete("/") + public testDelete() { return "DELETE"; } + + @Head("/") + public testHead() { return "HEAD"; } + + @Put("/") + public testPut() { return "PUT"; } + + @Patch("/") + public testPatch() { return "PATCH"; } + + @Post("/") + public testPost() { return "POST"; } + + @Method("opts", "/") + public testMethod() { return "METHOD:OPTS"; } + } + + kernel.bind(TYPE.Controller).to(TestController); + + function m1(req: restify.Request, res: restify.Response, next: restify.Next) { next(); } + function m2(req: restify.Request, res: restify.Response, next: restify.Next) { next(); } + function m3(req: restify.Request, res: restify.Response, next: restify.Next) { next(); } + + @Controller("/", m1, m2, m3) + class TestMiddlewareController { + + @Get("/", m1, m2, m3) + public testGet() { return "GET"; } + + @Options("/", m1, m2, m3) + public testAll() { return "OPTIONS"; } + + @Delete("/", m1, m2, m3) + public testDelete() { return "DELETE"; } + + @Head("/", m1, m2, m3) + public testHead() { return "HEAD"; } + + @Put("/", m1, m2, m3) + public testPut() { return "PUT"; } + + @Patch("/", m1, m2, m3) + public testPatch() { return "PATCH"; } + + @Post("/", m1, m2, m3) + public testPost() { return "POST"; } + + @Method("opts", "/", m1, m2, m3) + public testMethod() { return "METHOD:OPTS"; } + } +} diff --git a/inversify-restify-utils/inversify-restify-utils.d.ts b/inversify-restify-utils/inversify-restify-utils.d.ts new file mode 100644 index 0000000000..4f2aab5510 --- /dev/null +++ b/inversify-restify-utils/inversify-restify-utils.d.ts @@ -0,0 +1,59 @@ +// Type definitions for inversify-restify-utils 1.0.0 +// Project: https://github.com/inversify/inversify-restify-utils +// Definitions by: inversify +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "inversify-restify-utils" { + + import * as restify from "restify"; + import * as inversify from "inversify"; + + export namespace interfaces { + + export interface InversifyRestifyServerConstructor { + new(kernel: inversify.interfaces.Kernel): InversifyRestifyServer; + } + + export interface InversifyRestifyServer { + setConfig(fn: ConfigFunction): InversifyRestifyServer; + build(): restify.Server; + } + + export interface ConfigFunction { + (app: restify.Server): void; + } + + export interface HandlerDecoratorFactory { + (path: string, ...middleware: restify.RequestHandler[]): HandlerDecorator; + } + + export interface HandlerDecorator { + (target: any, key: string, value: any): void; + } + + } + + export interface Controller {} + + interface ServiceIdentifiers { + Controller: Symbol; + } + + export var InversifyRestifyServer: interfaces.InversifyRestifyServerConstructor; + + export var Controller: (path: string, ...middleware: restify.RequestHandler[]) => (target: any) => void; + + export var Options: interfaces.HandlerDecoratorFactory; + export var Get: interfaces.HandlerDecoratorFactory; + export var Post: interfaces.HandlerDecoratorFactory; + export var Put: interfaces.HandlerDecoratorFactory; + export var Patch: interfaces.HandlerDecoratorFactory; + export var Head: interfaces.HandlerDecoratorFactory; + export var Delete: interfaces.HandlerDecoratorFactory; + export var Method: (method: string, path: string, ...middleware: restify.RequestHandler[]) => interfaces.HandlerDecorator; + export var TYPE: ServiceIdentifiers; + +} diff --git a/inversify/inversify-global-tests.ts b/inversify/inversify-global-tests.ts index e2ead555d4..53b1a522bf 100644 --- a/inversify/inversify-global-tests.ts +++ b/inversify/inversify-global-tests.ts @@ -1,6 +1,8 @@ /// /// +import * as Proxy from "harmony-proxy"; + let injectable = inversify.injectable; let inject = inversify.inject; let tagged = inversify.tagged; @@ -13,10 +15,7 @@ let traverseAncerstors = inversify.traverseAncerstors; let taggedConstraint = inversify.taggedConstraint; let namedConstraint = inversify.namedConstraint; let typeConstraint = inversify.typeConstraint; -let makePropertyMultiInjectDecorator = inversify.makePropertyMultiInjectDecorator; -let makePropertyInjectTaggedDecorator = inversify.makePropertyInjectTaggedDecorator; -let makePropertyInjectNamedDecorator = inversify.makePropertyInjectNamedDecorator; -let makePropertyInjectDecorator = inversify.makePropertyInjectDecorator; +let unmanaged = inversify.unmanaged; module external_module_test { @@ -112,7 +111,7 @@ module external_module_test { // binding types kernel.bind("Weapon").to(Katana); kernel.bind("Weapon").toConstantValue(new Katana()); - kernel.bind("Weapon").toDynamicValue(() => { return new Katana(); }); + kernel.bind("Weapon").toDynamicValue((context: inversify.interfaces.Context) => { return new Katana(); }); kernel.bind>("Weapon").toConstructor(Katana); @@ -145,6 +144,7 @@ module external_module_test { return new Proxy(katanaToBeInjected, handler); }); + @injectable() class Samurai implements Warrior { public katana: Weapon; @@ -161,8 +161,9 @@ module external_module_test { } kernel.bind("Samurai").to(Samurai); - kernel.bind("IWeapon").to(Katana).whenTargetTagged("canThrow", false); + kernel.bind("Weapon").to(Katana).whenTargetTagged("canThrow", false); kernel.bind("ThrowableWeapon").to(Shuriken).whenTargetTagged("canThrow", true); + kernel.getAllTagged("Weapon", "canThrow", false); let throwable = tagged("canThrow", true); let notThrowable = tagged("canThrow", false); @@ -200,6 +201,7 @@ module external_module_test { kernel.bind("Warrior").to(Samurai3); kernel.bind("Weapon").to(Katana).whenTargetNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenTargetNamed("weak"); + kernel.getAllNamed("Weapon", "weak"); @injectable() class Samurai4 implements Samurai { @@ -245,18 +247,18 @@ module external_module_test { // Constraint helpers kernel.bind("Weapon").to(Shuriken).whenInjectedInto(Ninja); - kernel.bind("Weapon").to(Shuriken).whenInjectedInto("INinja"); + kernel.bind("Weapon").to(Shuriken).whenInjectedInto("Ninja"); kernel.bind("Weapon").to(Shuriken).whenParentNamed("chinese"); kernel.bind("Weapon").to(Shuriken).whenParentTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenTargetNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenTargetTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorIs(Ninja); - kernel.bind("Weapon").to(Shuriken).whenAnyAncestorIs("INinja"); + kernel.bind("Weapon").to(Shuriken).whenAnyAncestorIs("Ninja"); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorMatches(whenParentNamedCanThrowConstraint); kernel.bind("Weapon").to(Shuriken).whenNoAncestorIs(Ninja); - kernel.bind("Weapon").to(Shuriken).whenNoAncestorIs("INinja"); + kernel.bind("Weapon").to(Shuriken).whenNoAncestorIs("Ninja"); kernel.bind("Weapon").to(Shuriken).whenNoAncestorNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenNoAncestorTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenNoAncestorMatches(whenParentNamedCanThrowConstraint); @@ -341,103 +343,42 @@ module external_module_test { } -module property_injection { +module snapshot { let kernel = new Kernel(); - let TYPES = { Weapon: "Weapon" }; - - interface Weapon { - durability: number; - use(): void; - } - - @injectable() - class Sword implements Weapon { - public durability: number; - public constructor() { - this.durability = 100; - } - public use() { - this.durability = this.durability - 10; - } - } - - @injectable() - class WarHammer implements Weapon { - public durability: number; - public constructor() { - this.durability = 100; - } - public use() { - this.durability = this.durability - 10; - } - } - - let propertyMultiInject = makePropertyMultiInjectDecorator(kernel); - - class Warrior1 { - @propertyMultiInject(TYPES.Weapon) - public weapons: Weapon[]; - } - - let propertyInject = makePropertyInjectDecorator(kernel); - - interface Service { - count: number; - increment(): void; - } - - @injectable() - class SomeService implements Service { - public count: number; - public constructor() { - this.count = 0; - } - public increment() { - this.count = this.count + 1; - } - } - - class SomeWebComponent { - @propertyInject("Service") - private _service: Service; - public doSomething() { - let count = this._service.count; - this._service.increment(); - return count; - } - } - - let propertyInjectNammed = makePropertyInjectNamedDecorator(kernel); - - class Warrior2 { - - @propertyInjectNammed(TYPES.Weapon, "not-throwwable") - @named("not-throwwable") - public primaryWeapon: Weapon; - - @propertyInjectNammed(TYPES.Weapon, "throwwable") - @named("throwwable") - public secondaryWeapon: Weapon; - - } - - let propertyInjectTagged = makePropertyInjectTaggedDecorator(kernel); - - class Warrior3 { - - @propertyInjectTagged(TYPES.Weapon, "throwwable", false) - @tagged("throwwable", false) - public primaryWeapon: Weapon; - - @propertyInjectTagged(TYPES.Weapon, "throwwable", true) - @tagged("throwwable", true) - public secondaryWeapon: Weapon; - - } - kernel.snapshot(); kernel.restore(); + @injectable() + class Test { } + + kernel.bind(Test).toSelf(); + kernel.bind(Test).toSelf().inSingletonScope(); +} + +module unmanaged_injection { + + let kernel = new Kernel(); + + const BaseId = "Base"; + + @injectable() + class Base { + public prop: string; + public constructor(@unmanaged() arg: string) { // injected by user + this.prop = arg; + } + } + + @injectable() + class Derived extends Base { + public constructor() { + super("unmanaged-injected-value"); // user injection + } + } + + kernel.bind(BaseId).to(Derived); + console.log(kernel.get(BaseId) instanceof Base); // true + } diff --git a/inversify/inversify-tests.ts b/inversify/inversify-tests.ts index 9b5de8fa0e..6b0d4a5f12 100644 --- a/inversify/inversify-tests.ts +++ b/inversify/inversify-tests.ts @@ -6,11 +6,7 @@ import { injectable, tagged, named, targetName, inject, multiInject, traverseAncerstors, taggedConstraint, namedConstraint, typeConstraint, - makePropertyMultiInjectDecorator, - makePropertyInjectTaggedDecorator, - makePropertyInjectNamedDecorator, - makePropertyInjectDecorator, - KernelModule, interfaces + KernelModule, interfaces, unmanaged } from "inversify"; import * as Proxy from "harmony-proxy"; @@ -109,7 +105,7 @@ module external_module_test { // binding types kernel.bind("Weapon").to(Katana); kernel.bind("Weapon").toConstantValue(new Katana()); - kernel.bind("Weapon").toDynamicValue(() => { return new Katana(); }); + kernel.bind("Weapon").toDynamicValue((context: interfaces.Context) => { return new Katana(); }); kernel.bind>("Weapon").toConstructor(Katana); @@ -159,8 +155,9 @@ module external_module_test { } kernel.bind("Samurai").to(Samurai); - kernel.bind("IWeapon").to(Katana).whenTargetTagged("canThrow", false); + kernel.bind("Weapon").to(Katana).whenTargetTagged("canThrow", false); kernel.bind("ThrowableWeapon").to(Shuriken).whenTargetTagged("canThrow", true); + kernel.getAllTagged("Weapon", "canThrow", false); let throwable = tagged("canThrow", true); let notThrowable = tagged("canThrow", false); @@ -198,6 +195,7 @@ module external_module_test { kernel.bind("Warrior").to(Samurai3); kernel.bind("Weapon").to(Katana).whenTargetNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenTargetNamed("weak"); + kernel.getAllNamed("Weapon", "weak"); @injectable() class Samurai4 implements Samurai { @@ -243,18 +241,18 @@ module external_module_test { // Constraint helpers kernel.bind("Weapon").to(Shuriken).whenInjectedInto(Ninja); - kernel.bind("Weapon").to(Shuriken).whenInjectedInto("INinja"); + kernel.bind("Weapon").to(Shuriken).whenInjectedInto("Ninja"); kernel.bind("Weapon").to(Shuriken).whenParentNamed("chinese"); kernel.bind("Weapon").to(Shuriken).whenParentTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenTargetNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenTargetTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorIs(Ninja); - kernel.bind("Weapon").to(Shuriken).whenAnyAncestorIs("INinja"); + kernel.bind("Weapon").to(Shuriken).whenAnyAncestorIs("Ninja"); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenAnyAncestorMatches(whenParentNamedCanThrowConstraint); kernel.bind("Weapon").to(Shuriken).whenNoAncestorIs(Ninja); - kernel.bind("Weapon").to(Shuriken).whenNoAncestorIs("INinja"); + kernel.bind("Weapon").to(Shuriken).whenNoAncestorIs("Ninja"); kernel.bind("Weapon").to(Shuriken).whenNoAncestorNamed("strong"); kernel.bind("Weapon").to(Shuriken).whenNoAncestorTagged("canThrow", true); kernel.bind("Weapon").to(Shuriken).whenNoAncestorMatches(whenParentNamedCanThrowConstraint); @@ -339,103 +337,42 @@ module external_module_test { } -module property_injection { +module snapshot { let kernel = new Kernel(); - let TYPES = { Weapon: "Weapon" }; - - interface Weapon { - durability: number; - use(): void; - } - - @injectable() - class Sword implements Weapon { - public durability: number; - public constructor() { - this.durability = 100; - } - public use() { - this.durability = this.durability - 10; - } - } - - @injectable() - class WarHammer implements Weapon { - public durability: number; - public constructor() { - this.durability = 100; - } - public use() { - this.durability = this.durability - 10; - } - } - - let propertyMultiInject = makePropertyMultiInjectDecorator(kernel); - - class Warrior1 { - @propertyMultiInject(TYPES.Weapon) - public weapons: Weapon[]; - } - - let propertyInject = makePropertyInjectDecorator(kernel); - - interface Service { - count: number; - increment(): void; - } - - @injectable() - class SomeService implements Service { - public count: number; - public constructor() { - this.count = 0; - } - public increment() { - this.count = this.count + 1; - } - } - - class SomeWebComponent { - @propertyInject("Service") - private _service: Service; - public doSomething() { - let count = this._service.count; - this._service.increment(); - return count; - } - } - - let propertyInjectNammed = makePropertyInjectNamedDecorator(kernel); - - class Warrior2 { - - @propertyInjectNammed(TYPES.Weapon, "not-throwwable") - @named("not-throwwable") - public primaryWeapon: Weapon; - - @propertyInjectNammed(TYPES.Weapon, "throwwable") - @named("throwwable") - public secondaryWeapon: Weapon; - - } - - let propertyInjectTagged = makePropertyInjectTaggedDecorator(kernel); - - class Warrior3 { - - @propertyInjectTagged(TYPES.Weapon, "throwwable", false) - @tagged("throwwable", false) - public primaryWeapon: Weapon; - - @propertyInjectTagged(TYPES.Weapon, "throwwable", true) - @tagged("throwwable", true) - public secondaryWeapon: Weapon; - - } - kernel.snapshot(); kernel.restore(); + @injectable() + class Test { } + + kernel.bind(Test).toSelf(); + kernel.bind(Test).toSelf().inSingletonScope(); +} + +module unmanaged_injection { + + let kernel = new Kernel(); + + const BaseId = "Base"; + + @injectable() + class Base { + public prop: string; + public constructor(@unmanaged() arg: string) { // injected by user + this.prop = arg; + } + } + + @injectable() + class Derived extends Base { + public constructor() { + super("unmanaged-injected-value"); // user injection + } + } + + kernel.bind(BaseId).to(Derived); + console.log(kernel.get(BaseId) instanceof Base); // true + } diff --git a/inversify/inversify.d.ts b/inversify/inversify.d.ts index 0c77d9d82f..2f07d203e1 100644 --- a/inversify/inversify.d.ts +++ b/inversify/inversify.d.ts @@ -1,4 +1,4 @@ -// Type definitions for inversify 2.0.0-beta.9 +// Type definitions for inversify 2.0.0-rc.12 // Project: https://github.com/inversify/InversifyJS // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -45,7 +45,7 @@ declare namespace inversify { constraint: (request: Request) => boolean; onActivation: (context: Context, injectable: T) => T; cache: T; - dynamicValue: () => T; + dynamicValue: (context: Context) => T; scope: number; // BindingScope type: number; // BindingType } @@ -135,6 +135,7 @@ declare namespace inversify { export interface Target { guid: string; serviceIdentifier: ServiceIdentifier; + type: number; // TargetType name: QueryableString; metadata: Array; hasTag(key: string): boolean; @@ -152,6 +153,7 @@ declare namespace inversify { export interface Kernel { guid: string; + parent: Kernel; bind(serviceIdentifier: ServiceIdentifier): BindingToSyntax; unbind(serviceIdentifier: ServiceIdentifier): void; unbindAll(): void; @@ -160,6 +162,8 @@ declare namespace inversify { getNamed(serviceIdentifier: ServiceIdentifier, named: string): T; getTagged(serviceIdentifier: ServiceIdentifier, key: string, value: any): T; getAll(serviceIdentifier: ServiceIdentifier): T[]; + getAllNamed(serviceIdentifier: ServiceIdentifier, named: string): T[]; + getAllTagged(serviceIdentifier: ServiceIdentifier, key: string, value: any): T[]; load(...modules: KernelModule[]): void; unload(...modules: KernelModule[]): void; applyMiddleware(...middleware: Middleware[]): void; @@ -197,10 +201,12 @@ declare namespace inversify { export interface KeyValuePair { serviceIdentifier: ServiceIdentifier; value: Array; + guid: string; } export interface BindingInSyntax { inSingletonScope(): BindingWhenOnSyntax; + inTransientScope(): BindingWhenOnSyntax; } export interface BindingInWhenOnSyntax extends BindingInSyntax, BindingWhenOnSyntax {} @@ -211,8 +217,9 @@ declare namespace inversify { export interface BindingToSyntax { to(constructor: { new(...args: any[]): T; }): BindingInWhenOnSyntax; + toSelf(): BindingInWhenOnSyntax; toConstantValue(value: T): BindingWhenOnSyntax; - toDynamicValue(func: () => T): BindingWhenOnSyntax; + toDynamicValue(func: (context: Context) => T): BindingWhenOnSyntax; toConstructor(constructor: Newable): BindingWhenOnSyntax; toFactory(factory: FactoryCreator): BindingWhenOnSyntax; toFunction(func: T): BindingWhenOnSyntax; @@ -248,30 +255,19 @@ declare namespace inversify { export function tagged(metadataKey: string, metadataValue: any): (target: any, targetKey: string, index?: number) => any; export function named(name: string): (target: any, targetKey: string, index?: number) => any; export function targetName(name: string): (target: any, targetKey: string, index: number) => any; + export function unmanaged(): (target: any, targetKey: string, index: number) => any; export function inject(serviceIdentifier: interfaces.ServiceIdentifier): (target: any, targetKey: string, index?: number) => any; + export function guid(): string; export function multiInject( serviceIdentifier: interfaces.ServiceIdentifier ): (target: any, targetKey: string, index?: number) => any; - export function makePropertyInjectDecorator(kernel: interfaces.Kernel): - (serviceIdentifier: (string|Symbol|interfaces.Newable)) => (proto: any, key: string) => void; - - export function makePropertyInjectNamedDecorator(kernel: interfaces.Kernel): - (serviceIdentifier: (string|Symbol|interfaces.Newable), named: string) => (proto: any, key: string) => void; - - export function makePropertyInjectTaggedDecorator(kernel: interfaces.Kernel): - (serviceIdentifier: (string|Symbol|interfaces.Newable), key: string, value: any) => (proto: any, propertyName: string) => void; - - export function makePropertyMultiInjectDecorator(kernel: interfaces.Kernel): - (serviceIdentifier: (string|Symbol|interfaces.Newable)) => (proto: any, key: string) => void; - // constraint helpers export var traverseAncerstors: (request: interfaces.Request, constraint: (request: interfaces.Request) => boolean) => boolean; export var taggedConstraint: (tag: string) => (value: any) => (request: interfaces.Request) => boolean; export var namedConstraint: (value: any) => (request: interfaces.Request) => boolean; export var typeConstraint: (type: (Function|string)) => (request: interfaces.Request) => boolean; - } declare module "inversify" { diff --git a/ionic/ionic-tests.ts b/ionic/ionic-tests.ts index d8c98ae25f..140d102a8c 100644 --- a/ionic/ionic-tests.ts +++ b/ionic/ionic-tests.ts @@ -176,6 +176,7 @@ class IonicTestController { var currentStateName: string = this.$ionicHistory.currentStateName(); this.$ionicHistory.goBack(5); + this.$ionicHistory.removeBackView(); this.$ionicHistory.clearHistory(); this.$ionicHistory.clearCache().then(() => console.log("done clearing cache!")); this.$ionicHistory.nextViewOptions({ diff --git a/ionic/ionic.d.ts b/ionic/ionic.d.ts index fae9cdbf63..1df593037b 100644 --- a/ionic/ionic.d.ts +++ b/ionic/ionic.d.ts @@ -213,6 +213,7 @@ declare namespace ionic { currentStateName(): string; goBack(backCount?: number): void; + removeBackView(): void; clearHistory(): void; clearCache(): angular.IPromise; nextViewOptions(options: IonicHistoryNextViewOptions): void; diff --git a/ioredis/ioredis.d.ts b/ioredis/ioredis.d.ts index 983ed39f10..60eccd0272 100644 --- a/ioredis/ioredis.d.ts +++ b/ioredis/ioredis.d.ts @@ -197,6 +197,8 @@ declare module IORedis { hmget(...args: any[]): any; hincrby(args: any[], callback?: ResCallbackT): any; hincrby(...args: any[]): any; + hincrbyfloat(args: any[], callback?: ResCallbackT): any; + hincrbyfloat(...args: any[]): any; hdel(args: any[], callback?: ResCallbackT): any; hdel(...args: any[]): any; hlen(args: any[], callback?: ResCallbackT): any; @@ -478,6 +480,8 @@ declare module IORedis { hmget(...args: any[]): Pipeline; hincrby(args: any[], callback?: ResCallbackT): Pipeline; hincrby(...args: any[]): Pipeline; + hincrbyfloat(args: any[], callback?: ResCallbackT): Pipeline; + hincrbyfloat(...args: any[]): Pipeline; hdel(args: any[], callback?: ResCallbackT): Pipeline; hdel(...args: any[]): Pipeline; hlen(args: any[], callback?: ResCallbackT): Pipeline; diff --git a/ip/ip-tests.ts b/ip/ip-tests.ts index 338c2bc040..3210871ee0 100644 --- a/ip/ip-tests.ts +++ b/ip/ip-tests.ts @@ -19,3 +19,4 @@ var buff:any = ip.toBuffer(myIP); ip.toString(buff); ip.subnet('192.168.1.134', '255.255.255.192'); ip.cidrSubnet('192.168.1.134/26'); +ip.cidrSubnet('192.168.1.134/26').contains('192.168.1.134'); diff --git a/ip/ip.d.ts b/ip/ip.d.ts index 0542ae0785..1c00f1320e 100644 --- a/ip/ip.d.ts +++ b/ip/ip.d.ts @@ -14,6 +14,7 @@ interface SubnetInfo { subnetMaskLength: number; numHosts: number; length: number; + contains(ip: string): boolean; } declare module "ip" { @@ -112,4 +113,4 @@ declare module "ip" { * @param cidr CIDR address. */ export function cidrSubnet(cidr: string): SubnetInfo; -} \ No newline at end of file +} diff --git a/is-plain-object/is-plain-object-tests.ts b/is-plain-object/is-plain-object-tests.ts new file mode 100644 index 0000000000..eb57b12434 --- /dev/null +++ b/is-plain-object/is-plain-object-tests.ts @@ -0,0 +1,25 @@ +/// + +import * as isPlainObject from 'is-plain-object'; + +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); + +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +class Foo {} +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false \ No newline at end of file diff --git a/is-plain-object/is-plain-object.d.ts b/is-plain-object/is-plain-object.d.ts new file mode 100644 index 0000000000..47d277f186 --- /dev/null +++ b/is-plain-object/is-plain-object.d.ts @@ -0,0 +1,10 @@ +// Type definitions for is-plain-object +// Project: https://github.com/jonschlinkert/is-plain-object +// Definitions by: Kevin Zeng +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "is-plain-object" { + namespace isPlainObject {} + function isPlainObject(obj: any): boolean; + export = isPlainObject; +} \ No newline at end of file diff --git a/isomorphic-fetch/isomorphic-fetch-tests.ts b/isomorphic-fetch/isomorphic-fetch-tests.ts index ddf11f84fe..fefabf2080 100644 --- a/isomorphic-fetch/isomorphic-fetch-tests.ts +++ b/isomorphic-fetch/isomorphic-fetch-tests.ts @@ -1,4 +1,5 @@ /// +/// import fetchImportedViaCommonJS = require('isomorphic-fetch'); import * as fetchImportedViaES6Module from 'isomorphic-fetch'; diff --git a/isomorphic-fetch/isomorphic-fetch.d.ts b/isomorphic-fetch/isomorphic-fetch.d.ts index 19754db0f1..41b63970b3 100644 --- a/isomorphic-fetch/isomorphic-fetch.d.ts +++ b/isomorphic-fetch/isomorphic-fetch.d.ts @@ -3,48 +3,53 @@ // Definitions by: Todd Lucas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare enum RequestContext { - "audio", "beacon", "cspreport", "download", "embed", "eventsource", - "favicon", "fetch", "font", "form", "frame", "hyperlink", "iframe", - "image", "imageset", "import", "internal", "location", "manifest", - "object", "ping", "plugin", "prefetch", "script", "serviceworker", - "sharedworker", "subresource", "style", "track", "video", "worker", - "xmlhttprequest", "xslt" -} -declare enum RequestMode { "same-origin", "no-cors", "cors" } -declare enum RequestCredentials { "omit", "same-origin", "include" } -declare enum RequestCache { - "default", "no-store", "reload", "no-cache", "force-cache", - "only-if-cached" -} -declare enum ResponseType { "basic", "cors", "default", "error", "opaque" } +type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | + "track" | "video"; +type RequestDestination = "" | "document" | "embed" | "font" | "image" | + "manifest" | "media" | "object" | "report" | "script" | "serviceworker" | + "sharedworker" | "style" | "worker" | "xslt"; +type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors"; +type RequestCredentials = "omit" | "same-origin" | "include"; +type RequestCache = + "default" | "no-store" | "reload" | "no-cache" | "force-cache" | + "only-if-cached"; +type RequestRedirect = "follow" | "error" | "manual"; -declare type HeaderInit = Headers | Array; -declare type BodyInit = ArrayBuffer | ArrayBufferView | Blob | FormData | string; -declare type RequestInfo = Request | string; +type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | + "opaqueredirect"; -interface RequestInit { - method?: string; - headers?: HeaderInit | { [index: string]: string }; - body?: BodyInit; - mode?: string | RequestMode; - credentials?: string | RequestCredentials; - cache?: string | RequestCache; -} +type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | + "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | + "strict-origin-when-cross-origin" | "unsafe-url"; interface IHeaders { - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; -} - -declare class Headers implements IHeaders { append(name: string, value: string): void; - delete(name: string):void; + delete(name: string): void; get(name: string): string; getAll(name: string): Array; has(name: string): boolean; set(name: string, value: string): void; + + // TODO: iterable; + forEach(callback: (value: string, index: number, headers: IHeaders) => void, thisArg?: any): void; + // NOTE: The following are supported by whatwg-fetch but not node-fetch. + // entries(): IterableIterator<[string, string]>; + // keys(): IterableIterator; + // values(): IterableIterator; +} + +type HeadersInit = Headers | Array | { [index: string]: string }; + +declare class Headers implements IHeaders { + constructor(init?: HeadersInit); + append(name: string, value: string): void; + delete(name: string): void; + get(name: string): string; + getAll(name: string): Array; + has(name: string): boolean; + set(name: string, value: string): void; + + forEach(callback: (value: string, index: number, headers: IHeaders) => void, thisArg?: any): void; } interface IBody { @@ -70,49 +75,109 @@ declare class Body implements IBody { interface IRequest extends IBody { method: string; url: string; - headers: Headers; - context: string | RequestContext; - referrer: string; - mode: string | RequestMode; - credentials: string | RequestCredentials; - cache: string | RequestCache; + headers: IHeaders; + + type: RequestType; + destination: RequestDestination; + referrer?: string; + referrerPolicy?: ReferrerPolicy; + mode: RequestMode; + credentials: RequestCredentials; + cache: RequestCache; + redirect?: RequestRedirect; + integrity?: string; + + clone(): IRequest; } +type BodyInit = Blob | ArrayBufferView | ArrayBuffer | FormData /* | URLSearchParams */ | string; + +interface RequestInit { + method?: string; + headers?: HeadersInit; + body?: BodyInit; + referrer?: string; + referrerPolicy?: ReferrerPolicy; + mode?: RequestMode; + credentials?: RequestCredentials; + cache?: RequestCache; + redirect?: RequestRedirect; + integrity?: string; + window?: any; // can only be set to null +} + +type RequestInfo = IRequest | string; + declare class Request extends Body implements IRequest { - constructor(input: string | Request, init?: RequestInit); + constructor(input: RequestInfo, init?: RequestInit); + method: string; url: string; - headers: Headers; - context: string | RequestContext; + headers: IHeaders; + + type: RequestType + destination: RequestDestination; referrer: string; - mode: string | RequestMode; - credentials: string | RequestCredentials; - cache: string | RequestCache; + referrerPolicy: ReferrerPolicy; + mode: RequestMode; + credentials: RequestCredentials; + cache: RequestCache; + redirect: RequestRedirect; + integrity: string; + + clone(): IRequest; } interface IResponse extends IBody { + type: ResponseType; + url: string; + redirected: boolean; status: number; statusText: string; ok: boolean; headers: IHeaders; - type: string | ResponseType; - size: number; - timeout: number; - redirect(url: string, status: number): IResponse; - error(): IResponse; + // size: number; + // timeout: number; + body: any; + trailer: Promise; + clone(): IResponse; } -interface IFetchStatic { - Promise: any; - Headers: IHeaders - Request: IRequest; - Response: IResponse; - (url: string | IRequest, init?: RequestInit): Promise; +type ResponseBodyInit = BodyInit; + +interface ResponseInit { + status?: number; + statusText?: string; + headers?: HeadersInit; } -declare var fetch: IFetchStatic; +declare class Response extends Body implements IResponse { + constructor(body?: ResponseBodyInit, init?: ResponseInit); + + static redirect(url: string, status?: number): IResponse; + static error(): IResponse; + + type: ResponseType + + url: string; + redirected: boolean; + status: number; + statusText: string; + ok: boolean; + headers: IHeaders; + body: any; + trailer: Promise; + + clone(): IResponse; +} + +interface Window { + fetch(url: RequestInfo, init?: RequestInit): Promise; +} + +declare var fetch: typeof window.fetch; declare module "isomorphic-fetch" { export = fetch; diff --git a/jake/jake.d.ts b/jake/jake.d.ts index 3174a7b94c..5766b64093 100644 --- a/jake/jake.d.ts +++ b/jake/jake.d.ts @@ -207,7 +207,7 @@ declare namespace jake{ * * @event complete */ - export class Task implements NodeJS.EventEmitter { + export class Task extends NodeJS.EventEmitter { /** * @name name The name of the Task * @param prereqs Prerequisites to be run before this task diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts index d873d2716b..96ac307ca0 100644 --- a/jasmine/jasmine-tests.ts +++ b/jasmine/jasmine-tests.ts @@ -904,6 +904,23 @@ describe("Custom matcher: 'toBeGoofy'", function () { }); }); +describe("Randomize Tests", function() { + it("should allow randomization of the order of tests", function() { + expect(function() { + var env = jasmine.getEnv(); + return env.randomizeTests(true); + }).not.toThrow(); + }); + + it("should allow a seed to be passed in for randomization", function() { + expect(function() { + var env = jasmine.getEnv(); + env.randomizeTests(true); + return env.seed(1234); + }).not.toThrow(); + }); +}); + (() => { // from boot.js var env = jasmine.getEnv(); diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 538aca3fb6..c4151995a7 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Jasmine 2.2 +// Type definitions for Jasmine 2.5 // Project: http://jasmine.github.io/ // Definitions by: Boris Yankov , Theodore Brown , David Pärsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -65,6 +65,7 @@ declare namespace jasmine { function addMatchers(matchers: CustomMatcherFactories): void; function stringMatching(str: string): Any; function stringMatching(str: RegExp): Any; + function formatErrorMsg(domain: string, usage: string) : (msg: string) => string interface Any { @@ -115,6 +116,7 @@ declare namespace jasmine { /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */ tick(ms: number): void; mockDate(date?: Date): void; + withMock(func: () => void): void; } interface CustomEqualityTester { @@ -180,6 +182,12 @@ declare namespace jasmine { addMatchers(matchers: CustomMatcherFactories): void; specFilter(spec: Spec): boolean; throwOnExpectationFailure(value: boolean): void; + seed(seed: string | number): string | number; + provideFallbackReporter(reporter: Reporter): void; + throwingExpectationFailures(): boolean; + allowRespy(allow: boolean): void; + randomTests(): boolean; + randomizeTests(b: boolean): void; } interface FakeTimer { @@ -234,6 +242,26 @@ declare namespace jasmine { trace: Trace; } + interface Order { + new (options: {random: boolean, seed: string}): any; + random: boolean; + seed: string; + sort(items: T[]) : T[]; + } + + namespace errors { + class ExpectationFailed extends Error { + constructor(); + stack: any; + } + } + + interface TreeProcessor { + new (attrs: any): any; + execute: (done: Function) => void; + processTree() : any; + } + interface Trace { name: string; message: string; @@ -301,7 +329,9 @@ declare namespace jasmine { toHaveBeenCalledTimes(expected: number): boolean; toContain(expected: any, expectationFailOutput?: any): boolean; toBeLessThan(expected: number, expectationFailOutput?: any): boolean; + toBeLessThanOrEqual(expected: number, expectationFailOutput?: any): boolean; toBeGreaterThan(expected: number, expectationFailOutput?: any): boolean; + toBeGreaterThanOrEqual(expected: number, expectationFailOutput?: any): boolean; toBeCloseTo(expected: number, precision?: any, expectationFailOutput?: any): boolean; toThrow(expected?: any): boolean; toThrowError(message?: string | RegExp): boolean; @@ -371,6 +401,7 @@ declare namespace jasmine { runs(func: SpecFunction): Spec; addToQueue(block: Block): void; addMatcherResult(result: Result): void; + getResult(): any; expect(actual: any): any; waits(timeout: number): Spec; waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec; @@ -380,11 +411,12 @@ declare namespace jasmine { finishCallback(): void; finish(onComplete?: () => void): void; after(doAfter: SpecFunction): void; - execute(onComplete?: () => void): any; + execute(onComplete?: () => void, enabled?: boolean): any; addBeforesAndAftersToQueue(): void; explodes(): void; spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy; removeAllSpies(): void; + throwOnExpectationFailure: boolean; } interface XSpec { @@ -484,6 +516,10 @@ declare namespace jasmine { finished: boolean; result: any; messages: any; + runDetails: { + failedExpectations: ExpectationResult[]; + order: jasmine.Order + } new (): any; diff --git a/jest/jest-tests.ts b/jest/jest-tests.ts index f3e33c4061..b547bd40ad 100644 --- a/jest/jest-tests.ts +++ b/jest/jest-tests.ts @@ -1,4 +1,5 @@ /// +/// // Tests based on the Jest website jest.unmock('../sum'); @@ -37,8 +38,6 @@ describe('fetchCurrentUser', function() { // unmock is the recommended approach for unmocking... jest.unmock('../displayUser.js') -// ...but dontMock also still works. -jest.dontMock('jquery'); describe('displayUser', function() { it('displays a user after a click', function() { @@ -100,6 +99,157 @@ describe('CheckboxWithLabel', function() { }); }); +jest.runAllTicks(); +xdescribe('Hooks and Suits', function () { + let tested: boolean; + + beforeEach(function () { + tested = false; + }); + + afterEach(function () { + tested = true; + }); + + test('tested', function () { + expect(tested).toBeTruthy(); + expect(tested).not.toBeFalsy(); + }); + + fit('tested', function () { + expect(tested).toBeDefined(); + expect(tested).not.toBeUndefined(); + }); + + xit('expect null to be null', function () { + expect(null).toBeNull(); + }); +}); + +describe('compartion', function () { + var sum: (a: number, b: number) => number = require.requireMock('../sum'); + + it('compares is 7 + 2 greater than 3', function () { + expect(sum(7, 2)).toBeGreaterThan(3); + }); + + it('compares is 2 + 7 greater than or equal to 3', function () { + expect(sum(2, 7)).toBeGreaterThanOrEqual(3); + }); + + it('compares is 3 less than 3 + 4', function () { + expect(3).toBeLessThan(sum(3, 4)); + }); + + it('compares is 3 less than or equal to 4 + 3', function () { + expect(3).toBeLessThanOrEqual(sum(4, 3)); + }); + + it('works sanely with simple decimals', function () { + expect(0.2 + 0.1).toBeCloseTo(0.3, 5); + }); +}); + +describe('toThrow API', function () { + function throwTypeError(): void { + throw new TypeError('toThrow Definition was out of date'); + } + + it('throws', function () { + expect(throwTypeError()).toThrow(); + }); + + it('throws TypeError', function () { + expect(throwTypeError()).toThrowError(TypeError); + }); + + it('throws \'Definition was out of date\'', function () { + expect(throwTypeError()).toThrowError(/Definition was out of date/); + }); + + it('throws \'toThorow Definition was out of date\'', function () { + expect(throwTypeError()).toThrowError('toThrow Definition was out of date'); + }); +}); + +describe('missing tests', function () { + it('creates closures', function () { + class Closure { + private arg: T; + + public constructor(private fn: (arg: T) => void) { + this.fn = fn; + } + + public bind(arg: T): void { + this.arg = arg; + } + + public call(): void { + this.fn(this.arg); + } + } + + type StringClosure = (arg: string) => void; + let spy: jest.Mock = jest.fn(); + let closure: Closure = new Closure(spy); + closure.bind('jest'); + closure.call(); + expect(spy).lastCalledWith('jest'); + expect(spy).toBeCalledWith('jest'); + expect(jest.isMockFunction(spy)).toBeTruthy(); + }); + + it('tests all mising Mocks functionality', function () { + type FruitsGetter = () => Array; + let mock: jest.Mock = jest.fn(); + mock.mockImplementationOnce(() => ['Orange', 'Apple', 'Plum']) + jest.setMock('./../tesks/getFruits', mock); + const getFruits: FruitsGetter = require('./../tesks/getFruits'); + expect(getFruits()).toContain('Orange'); + mock.mockReturnValueOnce(['Apple', 'Plum']); + expect(mock()).not.toContain('Orange'); + mock.mockReturnValue([]); //Deprecated: Use jest.fn(() => value) instead. + mock.mockClear(); + let thisMock: jest.Mock = jest.fn().mockReturnThis(); + expect(thisMock()).toBe(this); + }); + + it('creates snapshoter', function () { + jest.disableAutomock(); + jest.mock('./render', () => jest.fn((): string => "{Link to: \"facebook\"}"), { virtual: true }); + const render: () => string = require('./render'); + expect(render()).toMatch(/Link/); + jest.enableAutomock(); + }); + + it('runs only pending timers', function () { + jest.useRealTimers(); + setTimeout(() => expect(1).not.toEqual(0), 3000); + jest.runOnlyPendingTimers(); + }); + + it('runs all timers', function () { + jest.clearAllTimers(); + jest.useFakeTimers(); + setTimeout(() => expect(0).not.toEqual(1), 3000); + jest.runAllTimers(); + }); + + it('cleares cache', function () { + const sum1 = require('../sum'); + jest.resetModules(); + const sum2 = require('../sum'); + expect(sum1).not.toBe(sum2); + }) +}); + +describe('toMatchSnapshot', function () { + it('compares snapshots', function () { + expect({ type: 'a', props: { href: 'https://www.facebook.com/' }, children: [ 'Facebook' ] }).toMatchSnapshot(); + }); +}); + function testInstances() { var mockFn = jest.fn(); var a = new mockFn(); @@ -123,3 +273,82 @@ function testMockImplementation() { mockFn.mock.calls[0][0] === 0; // true mockFn.mock.calls[1][0] === 1; // true } + +// Test from jest Docs: +describe('genMockFromModule', function () { + // Interfaces: + interface MockFiles { + [index: string]: string; + } + + interface MockedFS { + readdirSync: (dir: string) => string[]; + __setMockFiles: (newMockFiles: MockFiles) => void ; + } + + // ------------------------------------------------------------------------------------ + // FileSummarizer.ts + + const fs = require('fs'); + + function summarizeFilesInDirectorySync(directory: string): string[] { + return fs.readdirSync(directory).map((fileName: string) => ({ + fileName, + directory, + })); + } + + //export default summarizeFilesInDirectorySync; // For sake of compilation + + // ------------------------------------------------------------------------------------ + // __mocks__/fs.js + + const path = require('path'); + + const mockedFS: MockedFS = jest.genMockFromModule('fs'); + + let mockFiles: any = Object.create(null); + function __setMockFiles(newMockFiles: MockFiles): void { + mockFiles = Object.create(null); + for(const file in newMockFiles) { + const dir: string = path.dirname(file); + + if (!mockFiles[dir]) { + mockFiles[dir] = []; + } + mockFiles[dir].push(path.basename(file)); + } + } + + function readdirSync(directoryPath: string): string[] { + return mockFiles[directoryPath] || []; + } + + mockedFS.readdirSync = readdirSync; + mockedFS.__setMockFiles = __setMockFiles; + + //export = mockedFS; // For sake of compilation + // ------------------------------------------------------------------------------------ + // __tests__/FileSummarizer-test.js + + jest.mock('fs'); + + describe('listFilesInDirectorySync', () => { + const MOCK_FILE_INFO: MockFiles = { + '/path/to/file1.js': 'console.log("file1 contents");', + '/path/to/file2.txt': 'file2 contents', + }; + + beforeEach(() => { + // Set up some mocked out file info before each test + (require('fs') as MockedFS).__setMockFiles(MOCK_FILE_INFO); + }); + + it('includes all files in the directory in the summary', () => { + const FileSummarizer: (dir: string) => string[] = require('../FileSummarizer'); + const fileSummary = FileSummarizer('/path/to'); + + expect(fileSummary.length).toBe(2); + }); + }); +}); diff --git a/jest/jest.d.ts b/jest/jest.d.ts index 10949a6691..d0660193f6 100644 --- a/jest/jest.d.ts +++ b/jest/jest.d.ts @@ -1,78 +1,150 @@ -// Type definitions for Jest 0.9.0 +// Type definitions for Jest 15.1.1 // Project: http://facebook.github.io/jest/ -// Definitions by: Asana +// Definitions by: Asana , Ivo Stratev , jwbay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -declare function afterEach(fn: jest.EmptyFunction): void; -declare function beforeEach(fn: jest.EmptyFunction): void; -declare function describe(name: string, fn: jest.EmptyFunction): void; +declare var beforeAll: jest.Lifecycle; +declare var beforeEach: jest.Lifecycle; +declare var afterAll: jest.Lifecycle; +declare var afterEach: jest.Lifecycle; +declare var describe: jest.Describe; +declare var fdescribe: jest.Describe; +declare var xdescribe: jest.Describe; declare var it: jest.It; -declare function pit(name: string, fn: jest.EmptyFunction): void; - -declare function xdescribe(name: string, fn: jest.EmptyFunction): void; -declare function xit(name: string, fn: jest.EmptyFunction): void; +declare var fit: jest.It; +declare var xit: jest.It; +declare var test: jest.It; +declare var xtest: jest.It; declare function expect(actual: any): jest.Matchers; interface NodeRequire { + /** Returns the actual module instead of a mock, bypassing all checks on whether the module should receive a mock implementation or not. */ requireActual(moduleName: string): any; + /** Returns a mock module instead of the actual module, bypassing all checks on whether the module should be required normally or not. */ + requireMock(moduleName: string): any; } declare namespace jest { - function addMatchers(matchers: CustomMatcherFactories): void; + function addMatchers(matchers: jasmine.CustomMatcherFactories): void; + /** Disables automatic mocking in the module loader. */ function autoMockOff(): void; + /** Enables automatic mocking in the module loader. */ function autoMockOn(): void; + /** Removes any pending timers from the timer system. If any timers have been scheduled, they will be cleared and will never have the opportunity to execute in the future. */ function clearAllTimers(): void; - function currentTestPath(): string; + /** Indicates that the module system should never return a mocked version of the specified module, including all of the specificied module's dependencies. */ + function deepUnmock(moduleName: string): void; + /** Disables automatic mocking in the module loader. */ function disableAutomock(): void; - function fn(implementation?: Function): Mock; + /** Mocks a module with an auto-mocked version when it is being required. */ + function doMock(moduleName: string): void; + /** Indicates that the module system should never return a mocked version of the specified module from require() (e.g. that it should always return the real module). */ function dontMock(moduleName: string): void; - function genMockFromModule(moduleName: string): Mock; - function mock(moduleName: string, factory?: Function): void; + /** Enables automatic mocking in the module loader. */ + function enableAutomock(): void; + /** Creates a mock function. Optionally takes a mock implementation. */ + function fn(implementation?: Function): Mock; + /** Use the automatic mocking system to generate a mocked version of the given module. */ + function genMockFromModule(moduleName: string): T; + /** Returns whether the given function is a mock function. */ + function isMockFunction(fn: any): fn is Mock; + /** Mocks a module with an auto-mocked version when it is being required. */ + function mock(moduleName: string, factory?: any, options?: MockOptions): void; + /** Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. */ + function resetModuleRegistry(): void; + /** Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. */ + function resetModules(): void; + /** Exhausts tasks queued by setImmediate(). */ + function runAllImmediates(): void; + /** Exhausts the micro-task queue (usually interfaced in node via process.nextTick). */ function runAllTicks(): void; + /** Exhausts the macro-task queue (i.e., all tasks queued by setTimeout() and setInterval()). */ function runAllTimers(): void; + /** Executes only the macro-tasks that are currently pending (i.e., only the tasks that have been queued by setTimeout() or setInterval() up to this point). + * If any of the currently pending macro-tasks schedule new macro-tasks, those new tasks will not be executed by this call. */ function runOnlyPendingTimers(): void; + /** Explicitly supplies the mock object that the module system should return for the specified module. */ function setMock(moduleName: string, moduleExports: T): void; + /** Indicates that the module system should never return a mocked version of the specified module from require() (e.g. that it should always return the real module). */ function unmock(moduleName: string): void; + /** Instructs Jest to use fake versions of the standard timer functions. */ + function useFakeTimers(): void; + /** Instructs Jest to use the real versions of the standard timer functions. */ + function useRealTimers(): void; + + interface MockOptions { + virtual?: boolean; + } interface EmptyFunction { (): void; } - interface Matchers { - not: Matchers; - toThrow(expected?: any): boolean; - toBe(expected: any): boolean; - toEqual(expected: any): boolean; - toBeFalsy(): boolean; - toBeTruthy(): boolean; - toBeNull(): boolean; - toBeDefined(): boolean; - toBeUndefined(): boolean; - toMatch(expected: RegExp): boolean; - toContain(expected: string): boolean; - toBeCloseTo(expected: number, delta: number): boolean; - toBeGreaterThan(expected: number): boolean; - toBeLessThan(expected: number): boolean; - toBeCalled(): boolean; - toBeCalledWith(...args: any[]): boolean; - lastCalledWith(...args: any[]): boolean; + interface DoneCallback { + (...args: any[]): any + fail(error?: string | { message: string }): any; + } + + interface ProvidesCallback { + (cb?: DoneCallback): any; + } + + interface Lifecycle { + (fn: ProvidesCallback): any; } interface It { - (name: string, fn: EmptyFunction): void; - only(name: string, fn: EmptyFunction): void; + (name: string, fn: ProvidesCallback): void; + only: It; + skip: It; } - interface Mock { + interface Describe { + (name: string, fn: EmptyFunction): void + only: Describe; + skip: Describe; + } + + interface Matchers { + not: Matchers; + lastCalledWith(...args: any[]): void; + toBe(expected: any): void; + toBeCalled(): void; + toBeCalledWith(...args: any[]): void; + toBeCloseTo(expected: number, delta: number): void; + toBeDefined(): void; + toBeFalsy(): void; + toBeGreaterThan(expected: number): void; + toBeGreaterThanOrEqual(expected: number): void; + toBeInstanceOf(expected: any): void + toBeLessThan(expected: number): void; + toBeLessThanOrEqual(expected: number): void; + toBeNull(): void; + toBeTruthy(): void; + toBeUndefined(): void; + toContain(expected: any): void; + toEqual(expected: any): void; + toHaveBeenCalled(): boolean; + toHaveBeenCalledTimes(expected: number): boolean; + toHaveBeenCalledWith(...params: any[]): boolean; + toMatch(expected: string | RegExp): void; + toMatchSnapshot(): void; + toThrow(): void; + toThrowError(error?: string | Constructable | RegExp): void; + } + + interface Constructable { + new (...args: any[]): any + } + + interface Mock extends Function { new (): T; - (...args: any[]): any; // TODO please fix this line! added for TypeScript 1.1.0-1 https://github.com/DefinitelyTyped/DefinitelyTyped/pull/2932 + (...args: any[]): any; mock: MockContext; mockClear(): void; mockImplementation(fn: Function): Mock; - mockImpl(fn: Function): Mock; + mockImplementationOnce(fn: Function): Mock; mockReturnThis(): Mock; mockReturnValue(value: any): Mock; mockReturnValueOnce(value: any): Mock; @@ -82,42 +154,138 @@ declare namespace jest { calls: any[][]; instances: T[]; } +} + +//Jest ships with a copy of Jasmine. They monkey-patch its APIs and divergence/deprecation are expected. +//Relevant parts of Jasmine's API are below so they can be changed and removed over time. +//This file can't reference jasmine.d.ts since the globals aren't compatible. + +declare function spyOn(object: any, method: string): jasmine.Spy; +/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */ +declare function pending(reason?: string): void; +/** Fails a test when called within one. */ +declare function fail(error?: any): void; +declare namespace jasmine { + var clock: () => Clock; + function any(aclass: any): Any; + function anything(): Any; + function arrayContaining(sample: any[]): ArrayContaining; + function objectContaining(sample: any): ObjectContaining; + function createSpy(name: string, originalFn?: Function): Spy; + function createSpyObj(baseName: string, methodNames: any[]): any; + function createSpyObj(baseName: string, methodNames: any[]): T; + function pp(value: any): string; + function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; + function addMatchers(matchers: CustomMatcherFactories): void; + function stringMatching(value: string | RegExp): Any; + + interface Clock { + install(): void; + uninstall(): void; + /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */ + tick(ms: number): void; + mockDate(date?: Date): void; + } + + interface Any { + new (expectedClass: any): any; + jasmineMatches(other: any): boolean; + jasmineToString(): string; + } + + interface ArrayContaining { + new (sample: any[]): any; + asymmetricMatch(other: any): boolean; + jasmineToString(): string; + } + + interface ObjectContaining { + new (sample: any): any; + jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; + jasmineToString(): string; + } + + interface Spy { + (...params: any[]): any; + identity: string; + and: SpyAnd; + calls: Calls; + mostRecentCall: { args: any[]; }; + argsForCall: any[]; + wasCalled: boolean; + } + + interface SpyAnd { + /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */ + 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. */ + throwError(msg: string): Spy; + /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */ + stub(): Spy; + } + + interface Calls { + /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. */ + any(): boolean; + /** By chaining the spy with calls.count(), will return the number of times the spy was called */ + count(): number; + /** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index */ + argsFor(index: number): any[]; + /** By chaining the spy with calls.allArgs(), will return the arguments to all calls */ + allArgs(): any[]; + /** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls */ + all(): CallInfo[]; + /** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call */ + mostRecent(): CallInfo; + /** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call */ + first(): CallInfo; + /** By chaining the spy with calls.reset(), will clears all tracking for a spy */ + reset(): void; + } + + interface CallInfo { + /** The context (the this) for the call */ + object: any; + /** All arguments passed to the call */ + args: any[]; + /** The return value of the call */ + returnValue: any; + } - // taken from Jasmine since addMatchers calls into the jasmine api interface CustomMatcherFactories { [index: string]: CustomMatcherFactory; } - // taken from Jasmine since addMatchers calls into the jasmine api interface CustomMatcherFactory { (util: MatchersUtil, customEqualityTesters: Array): CustomMatcher; } - // taken from Jasmine since addMatchers calls into the jasmine api interface MatchersUtil { equals(a: any, b: any, customTesters?: Array): boolean; contains(haystack: ArrayLike | string, needle: any, customTesters?: Array): boolean; buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array): string; } - // taken from Jasmine since addMatchers calls into the jasmine api interface CustomEqualityTester { (first: any, second: any): boolean; } - // taken from Jasmine since addMatchers calls into the jasmine api interface CustomMatcher { compare(actual: T, expected: T): CustomMatcherResult; compare(actual: any, expected: any): CustomMatcherResult; } - // taken from Jasmine since addMatchers calls into the jasmine api interface CustomMatcherResult { pass: boolean; - message: string; + message: string | (() => string); } - // taken from Jasmine which takes from TypeScript lib.core.es6.d.ts, applicable to CustomMatchers.contains() interface ArrayLike { length: number; [n: number]: T; diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index 37848203df..c75309b45e 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -752,6 +752,10 @@ schema = Joi.alternatives(schema, anySchema, boolSchema); // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- +schema = Joi.lazy(() => schema) + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + Joi.validate(value, obj); Joi.validate(value, schema); Joi.validate(value, schema, validOpts); diff --git a/joi/joi.d.ts b/joi/joi.d.ts index 3ba51d7383..b827903f9b 100644 --- a/joi/joi.d.ts +++ b/joi/joi.d.ts @@ -816,6 +816,13 @@ declare module 'joi' { export function alternatives(): AlternativesSchema; export function alternatives(types: Schema[]): AlternativesSchema; export function alternatives(type1: Schema, type2: Schema, ...types: Schema[]): AlternativesSchema; + + /** + * Generates a placeholder schema for a schema that you would provide with the fn. + * Supports the same methods of the any() type. + * This is mostly useful for recursive schemas + */ + export function lazy(cb: () => Schema): Schema; /** * Validates a value using the given schema and options. diff --git a/jquery-alertable/jquery-alertable-tests.ts b/jquery-alertable/jquery-alertable-tests.ts new file mode 100644 index 0000000000..df28c8a81b --- /dev/null +++ b/jquery-alertable/jquery-alertable-tests.ts @@ -0,0 +1,79 @@ +/// +/// + +// +// Examples from https://github.com/claviska/jquery-alertable +// + +function example_alerts_tests() { + + // Basic example + $.alertable.alert('Howdy!'); + + // Example with action when the modal is dismissed + $.alertable.alert('Howdy!').always(function() { + // Modal was dismissed + }); +} + +function example_confirmations_tests() { + + // Basic example + $.alertable.confirm('You sure?').then(function() { + // OK was selected + }); + + // Example with then/always + $.alertable.confirm('You sure?').then(function() { + // OK was selected + }, function() { + // Cancel was selected + }).always(function() { + // Modal was dismissed + }); +} + +function example_prompts_tests() { + + // Basic example + $.alertable.prompt('How many?').then(function(data) { + // Prompt was submitted + }); + + // Example with then/always + $.alertable.prompt('How many?').then(function(data) { + // Prompt was submitted + }, function() { + // Prompt was canceled + }).always(function() { + // Modal was dismissed + }); +} + +function options_tests() { + $.alertable.alert('Howdy!', { + container: 'body', + html: false, + cancelButton: '', + okButton: '', + overlay: '
', + prompt: '', + modal: `
+
+
+
+
`, + hide: () => $(this.modal).add(this.overlay).fadeOut(100), + show: () => $(this.modal).add(this.overlay).fadeIn(100) + }); + + $.alertable.confirm('You sure?', { + container: 'body' + }); + + $.alertable.prompt('How many?', { + container: 'body' + }); + + $.alertable.defaults.container = 'body'; +} diff --git a/jquery-alertable/jquery-alertable.d.ts b/jquery-alertable/jquery-alertable.d.ts new file mode 100644 index 0000000000..93e219ef18 --- /dev/null +++ b/jquery-alertable/jquery-alertable.d.ts @@ -0,0 +1,29 @@ +// Type definitions for jquery-alertable 1.0.2 +// Project: https://github.com/claviska/jquery-alertable +// Definitions by: Steven Robertson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +interface JQueryStatic { + alertable: Alertable; +} + +interface Alertable { + alert(message: string, options?: AlertableOptions): JQueryPromise; + confirm(message: string, options?: AlertableOptions): JQueryPromise; + prompt(message: string, options?: AlertableOptions): JQueryPromise; + defaults: AlertableOptions; +} + +interface AlertableOptions { + container?: string; + html?: boolean; + cancelButton?: string; + okButton?: string; + overlay?: string; + prompt?: string; + modal?: string; + hide?: Function; + show?: Function; +} diff --git a/jquery-mockjax/jquery-mockjax-tests.ts b/jquery-mockjax/jquery-mockjax-tests.ts index 6fae52eb07..36ebd7e64c 100644 --- a/jquery-mockjax/jquery-mockjax-tests.ts +++ b/jquery-mockjax/jquery-mockjax-tests.ts @@ -9,7 +9,7 @@ class Tests { run(): void { const self = this; - var t = QUnit.test; + let t = QUnit.test; QUnit.begin(() => { @@ -36,7 +36,7 @@ class Tests { responseText: 'Hello Word' }); - var xhr = $.ajax({ + let xhr = $.ajax({ url: '/xmlhttprequest', complete: () => { } }); @@ -67,7 +67,7 @@ class Tests { }); t('Intercept asynchronized proxy calls', (assert) => { - var done = assert.async(); + let done = assert.async(); $.mockjax({ url: '/proxy', proxy: 'test_proxy.json' @@ -85,7 +85,7 @@ class Tests { }); t('Intercept and proxy (sub-ajax request)', (assert) => { - var done = assert.async(); + let done = assert.async(); $.mockjax({ url: '/proxy', @@ -104,7 +104,7 @@ class Tests { }); t('Proxy type specification', (assert) => { - var done = assert.async(); + let done = assert.async(); $.mockjax({ url: '/proxy', @@ -124,7 +124,7 @@ class Tests { }); t('Support 1.5 $.ajax(url, settings) signature.', (assert) => { - var done = assert.async(); + let done = assert.async(); $.mockjax({ url: '/resource', @@ -141,9 +141,9 @@ class Tests { }); t('Dynamic response callback', (assert) => { - var done = assert.async(); + let done = assert.async(); - var settings: MockJaxSettings = { + let settings: MockJaxSettings = { url: '/response-callback', response: (settings) => { settings.responseText = settings.data.response + ' 2'; @@ -165,8 +165,36 @@ class Tests { } }); }); + + t('Asyncronous response callback', (assert) => { + let done = assert.async(); + + let settings: MockJaxSettings = { + url: '/async-response-callback', + response: (settings, completed) => { + setTimeout(() => { + settings.responseText = settings.data.response + ' 3'; + completed(); + }, 10); + } + }; + + $.mockjax(settings); + + $.ajax({ + url: '/async-response-callback', + dataType: 'text', + data: { + response: 'Hello world' + }, + error: self._noErrorCallbackExpected, + complete: (xhr) => { + assert.equal(xhr.responseText, 'Hello world 3', 'Response Text matches'); + done(); + } + }); + }); } } -var tests = new Tests(); -tests.run(); +new Tests().run(); diff --git a/jquery-mockjax/jquery-mockjax.d.ts b/jquery-mockjax/jquery-mockjax.d.ts index 7505a30e6f..c054f33317 100644 --- a/jquery-mockjax/jquery-mockjax.d.ts +++ b/jquery-mockjax/jquery-mockjax.d.ts @@ -22,7 +22,7 @@ interface MockJaxSettings { isTimeout?: boolean; dataType?: string; contentType?: string; - response?: (settings: any) => void; + response?: (settings: any, done?: Function) => void; responseText?: string | Object; responseXml?: string; proxy?: string; diff --git a/jquery.dataTables/jquery.dataTables-tests.ts b/jquery.dataTables/jquery.dataTables-tests.ts index 4d1d114cb4..09014f39f4 100644 --- a/jquery.dataTables/jquery.dataTables-tests.ts +++ b/jquery.dataTables/jquery.dataTables-tests.ts @@ -82,21 +82,21 @@ $(document).ready(function () { width: "200px" } col = - { - data: "", - orderData: [10, 11, 20], - render: "", - } + { + data: "", + orderData: [10, 11, 20], + render: "", + } col = - { - data: colDataObject, - render: colRenderObject, - } + { + data: colDataObject, + render: colRenderObject, + } col = - { - data: colDataFunc, - render: colRenderFunc, - } + { + data: colDataFunc, + render: colRenderFunc, + } //#endregion "Column" @@ -124,16 +124,16 @@ $(document).ready(function () { }; colDef = - { - targets: "2", - cellType: "th", - }; + { + targets: "2", + cellType: "th", + }; colDef = - { - targets: ["2", 5], - cellType: "th", - }; + { + targets: ["2", 5], + cellType: "th", + }; //#endregion "ColumnDef" @@ -159,7 +159,7 @@ $(document).ready(function () { var ajaxFunc: DataTables.FunctionAjax = function (data, callback, settings) { }; - var ajaxDataFunc: DataTables.FunctionAjaxData = function (data) { + var ajaxDataFunc: DataTables.FunctionAjaxData = function (data, settings) { return data; }; @@ -229,41 +229,41 @@ $(document).ready(function () { config = - { - ajax: ajaxFunc, - deferLoading: [10, 100], - lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]], - order: [0, 'asc'], - orderFixed: [[0, 'asc'], [1, 'asc']], - renderer: { - header: "bootstrap", - pageButton: "jqueryui" - }, - search: { "search": "", "smart": true, "regex": false, "caseInsensitive": true }, - searchCols: [ - null, - { "search": "", "smart": true, "regex": false, "caseInsensitive": true }, - { "search": "" }, - { "search": "", "smart": true }, - null - ], - }; + { + ajax: ajaxFunc, + deferLoading: [10, 100], + lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]], + order: [0, 'asc'], + orderFixed: [[0, 'asc'], [1, 'asc']], + renderer: { + header: "bootstrap", + pageButton: "jqueryui" + }, + search: { "search": "", "smart": true, "regex": false, "caseInsensitive": true }, + searchCols: [ + null, + { "search": "", "smart": true, "regex": false, "caseInsensitive": true }, + { "search": "" }, + { "search": "", "smart": true }, + null + ], + }; config = - { - ajax: { - data: {}, - dataSrc: "", - }, - }; + { + ajax: { + data: {}, + dataSrc: "", + }, + }; config = - { - ajax: { - data: ajaxDataFunc, - dataSrc: function (data) { }, - }, - }; + { + ajax: { + data: ajaxDataFunc, + dataSrc: function (data) { }, + }, + }; //#endregion "Settings" @@ -309,6 +309,11 @@ $(document).ready(function () { draw = dt.draw(true); draw.$(""); + var initSettings = dt.init(); + + var i18n: string = dt.i18n('buttons.copy', 'Copy to clipboard'); + i18n = dt.i18n('select.rows', { _: '%d rows selected', 1: '1 row selected' }, 0); + var off = dt.off("event"); off = dt.off("event", function () { }); off.$(""); @@ -385,11 +390,11 @@ $(document).ready(function () { var select = $('